Skip to content

Commit c74ee8b

Browse files
authored
feat(react): redesign quick actions (#125)
* refactor: rename component * feat(react): redesign quick actions * chore: add changeset for quick actions redesign * chore: lint
1 parent 35e3b82 commit c74ee8b

46 files changed

Lines changed: 1801 additions & 1163 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@tiny-design/react": patch
3+
---
4+
5+
Redesign QuickActions with a new product-grade API, richer action content, and improved keyboard and hover interactions.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
"@tiny-design/react": major
3-
"@tiny-design/tokens": major
2+
"@tiny-design/react": patch
3+
"@tiny-design/tokens": patch
44
---
55

66
Redesign Skeleton animation APIs, component structure, and related configuration.

apps/docs/public/llms-full.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,29 +1874,29 @@ export interface SpaceProps extends BaseProps, React.PropsWithRef<JSX.IntrinsicE
18741874

18751875
```
18761876

1877-
### speed-dial
1877+
### quick-actions
18781878
```typescript
18791879
import React from 'react';
18801880
import { BaseProps } from '../_utils/props';
18811881

1882-
export type SpeedDialDirection = 'up' | 'down' | 'left' | 'right';
1883-
export type SpeedDialTrigger = 'hover' | 'click';
1882+
export type QuickActionsDirection = 'up' | 'down' | 'left' | 'right';
1883+
export type QuickActionsTrigger = 'hover' | 'click';
18841884

1885-
export interface SpeedDialProps
1885+
export interface QuickActionsProps
18861886
extends BaseProps,
18871887
Omit<React.PropsWithoutRef<JSX.IntrinsicElements['div']>, 'children'> {
18881888
icon?: React.ReactNode;
18891889
openIcon?: React.ReactNode;
1890-
direction?: SpeedDialDirection;
1890+
direction?: QuickActionsDirection;
18911891
open?: boolean;
1892-
trigger?: SpeedDialTrigger;
1892+
trigger?: QuickActionsTrigger;
18931893
onOpen?: () => void;
18941894
onClose?: () => void;
18951895
disabled?: boolean;
18961896
children?: React.ReactNode;
18971897
}
18981898

1899-
export interface SpeedDialActionProps
1899+
export interface QuickActionsActionProps
19001900
extends BaseProps,
19011901
Omit<React.PropsWithoutRef<JSX.IntrinsicElements['button']>, 'children'> {
19021902
icon: React.ReactNode;

apps/docs/public/llms.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Components that accept sizes use: `'sm' | 'md' | 'lg'`
8181
- **Dropdown** — Drop-down list with menu items.
8282
- **Menu** — Navigation menu with dropdown support. Props: `mode` (`'horizontal'|'vertical'|'inline'`).
8383
- **Pagination** — Page through data sets. Props: `total`, `current`, `pageSize`, `onChange`.
84-
- **SpeedDial** — Floating action button expanding to actions.
84+
- **QuickActions** — Floating action button expanding to actions.
8585
- **Steps** — Wizard-like numbered step navigation.
8686

8787
### Data Display

apps/docs/src/containers/components/component-icons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const icons: Record<string, IconFn> = {
2929
dropdown: () => <svg viewBox="0 0 24 24" fill="none"><rect x="4" y="4" width="16" height="5" rx="1.5" {...s} /><polyline points="9,15 12,18 15,15" {...s} /><rect x="4" y="12" width="16" height="9" rx="1.5" {...s} strokeDasharray="3 2" /></svg>,
3030
menu: () => <svg viewBox="0 0 24 24" fill="none"><line x1="4" y1="6" x2="20" y2="6" {...s} /><line x1="4" y1="12" x2="20" y2="12" {...s} /><line x1="4" y1="18" x2="20" y2="18" {...s} /></svg>,
3131
pagination: () => <svg viewBox="0 0 24 24" fill="none"><polyline points="3,12 6,9 6,15" {...s} /><rect x="8" y="9" width="3" height="6" rx="1" fill="currentColor" opacity="0.2" {...s} /><rect x="13" y="9" width="3" height="6" rx="1" {...s} /><rect x="18" y="9" width="3" height="6" rx="1" {...s} /></svg>,
32-
'speed-dial': () => <svg viewBox="0 0 24 24" fill="none"><circle cx="12" cy="18" r="3" {...s} /><line x1="12" y1="15" x2="12" y2="13" {...s} /><circle cx="12" cy="11" r="1.5" {...s} /><circle cx="12" cy="6" r="1.5" {...s} /></svg>,
32+
'quick-actions': () => <svg viewBox="0 0 24 24" fill="none"><circle cx="12" cy="18" r="3" {...s} /><line x1="12" y1="15" x2="12" y2="13" {...s} /><circle cx="12" cy="11" r="1.5" {...s} /><circle cx="12" cy="6" r="1.5" {...s} /></svg>,
3333
steps: () => <svg viewBox="0 0 24 24" fill="none"><circle cx="5" cy="12" r="2.5" fill="currentColor" opacity="0.2" {...s} /><line x1="7.5" y1="12" x2="10" y2="12" {...s} /><circle cx="12" cy="12" r="2.5" {...s} /><line x1="14.5" y1="12" x2="17" y2="12" {...s} /><circle cx="19" cy="12" r="2.5" {...s} /></svg>,
3434

3535
// Data Display

apps/docs/src/routers.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const c = {
161161
keyboard: ll(() => import('../../../packages/react/src/keyboard/index.md'), () => import('../../../packages/react/src/keyboard/index.zh_CN.md')),
162162
sticky: ll(() => import('../../../packages/react/src/sticky/index.md'), () => import('../../../packages/react/src/sticky/index.zh_CN.md')),
163163
select: ll(() => import('../../../packages/react/src/select/index.md'), () => import('../../../packages/react/src/select/index.zh_CN.md')),
164-
speedDial: ll(() => import('../../../packages/react/src/speed-dial/index.md'), () => import('../../../packages/react/src/speed-dial/index.zh_CN.md')),
164+
quickActions: ll(() => import('../../../packages/react/src/quick-actions/index.md'), () => import('../../../packages/react/src/quick-actions/index.zh_CN.md')),
165165
anchor: ll(() => import('../../../packages/react/src/anchor/index.md'), () => import('../../../packages/react/src/anchor/index.zh_CN.md')),
166166
autoComplete: ll(() => import('../../../packages/react/src/auto-complete/index.md'), () => import('../../../packages/react/src/auto-complete/index.zh_CN.md')),
167167
inputOTP: ll(() => import('../../../packages/react/src/input-otp/index.md'), () => import('../../../packages/react/src/input-otp/index.zh_CN.md')),
@@ -251,7 +251,7 @@ export const getComponentMenu = (s: SiteLocale): RouterItem[] => {
251251
{ title: 'Dropdown', route: 'dropdown', component: pick(c.dropdown, z) },
252252
{ title: 'Menu', route: 'menu', component: pick(c.menu, z) },
253253
{ title: 'Pagination', route: 'pagination', component: pick(c.pagination, z) },
254-
{ title: 'SpeedDial', route: 'speed-dial', component: pick(c.speedDial, z) },
254+
{ title: 'QuickActions', route: 'quick-actions', component: pick(c.quickActions, z) },
255255
{ title: 'Steps', route: 'steps', component: pick(c.steps, z) },
256256
],
257257
},

packages/extract/src/extract-components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const CATEGORY_MAP: Record<string, string> = {
1818
waterfall: 'Layout',
1919

2020
anchor: 'Navigation', breadcrumb: 'Navigation', dropdown: 'Navigation',
21-
menu: 'Navigation', pagination: 'Navigation', 'speed-dial': 'Navigation',
21+
menu: 'Navigation', pagination: 'Navigation', 'quick-actions': 'Navigation',
2222
steps: 'Navigation',
2323

2424
avatar: 'Data Display', badge: 'Data Display', calendar: 'Data Display',

0 commit comments

Comments
 (0)