@rockshin/tao-ui 0.0.24 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -6
- package/component-manifest.json +534 -6
- package/dist/components/alert/alert.css +120 -0
- package/dist/components/alert/alert.d.ts +20 -0
- package/dist/components/alert/alert.js +185 -0
- package/dist/components/button/button.css +19 -18
- package/dist/components/button/button.d.ts +8 -0
- package/dist/components/date-picker/date-picker.js +1 -1
- package/dist/components/date-picker/range-picker.js +1 -1
- package/dist/components/dropdown/dropdown.css +22 -1
- package/dist/components/dropdown/dropdown.js +4 -3
- package/dist/components/form/form-context.d.ts +7 -0
- package/dist/components/form/form-context.js +8 -0
- package/dist/components/form/form-item.d.ts +55 -0
- package/dist/components/form/form-item.js +131 -0
- package/dist/components/form/form.css +22 -0
- package/dist/components/form/form.d.ts +35 -0
- package/dist/components/form/form.js +125 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.js +1 -0
- package/dist/components/form-field/form-field-view.d.ts +30 -0
- package/dist/components/form-field/form-field-view.js +154 -0
- package/dist/components/form-field/form-field.d.ts +2 -2
- package/dist/components/form-field/form-field.js +29 -137
- package/dist/components/form-field/form.css +17 -7
- package/dist/components/input/input.css +18 -8
- package/dist/components/modal/confirm-dialog.js +14 -111
- package/dist/components/modal/modal.d.ts +7 -1
- package/dist/components/modal/modal.js +205 -195
- package/dist/components/popconfirm/popconfirm.css +44 -0
- package/dist/components/popconfirm/popconfirm.d.ts +41 -0
- package/dist/components/popconfirm/popconfirm.js +238 -0
- package/dist/components/popover/popover.css +105 -0
- package/dist/components/popover/popover.d.ts +41 -0
- package/dist/components/popover/popover.js +412 -0
- package/dist/components/select/select.js +1 -1
- package/dist/components/status-icon/status-icon.d.ts +5 -0
- package/dist/components/status-icon/status-icon.js +77 -0
- package/dist/components/table/table-types.d.ts +7 -0
- package/dist/components/table/table.d.ts +1 -1
- package/dist/components/table/table.js +296 -283
- package/dist/components/tooltip/tooltip.css +93 -0
- package/dist/components/tooltip/tooltip.d.ts +33 -0
- package/dist/components/tooltip/tooltip.js +226 -0
- package/dist/docs/components/alert.doc.d.ts +29 -0
- package/dist/docs/components/alert.doc.js +93 -0
- package/dist/docs/components/form.doc.d.ts +29 -0
- package/dist/docs/components/form.doc.js +71 -0
- package/dist/docs/components/modal.doc.d.ts +6 -0
- package/dist/docs/components/modal.doc.js +9 -1
- package/dist/docs/components/popconfirm.doc.d.ts +29 -0
- package/dist/docs/components/popconfirm.doc.js +132 -0
- package/dist/docs/components/popover.doc.d.ts +29 -0
- package/dist/docs/components/popover.doc.js +121 -0
- package/dist/docs/components/stack.doc.d.ts +6 -0
- package/dist/docs/components/stack.doc.js +23 -2
- package/dist/docs/components/table.doc.js +2 -1
- package/dist/docs/components/tao-provider.doc.js +11 -1
- package/dist/docs/components/tooltip.doc.d.ts +37 -0
- package/dist/docs/components/tooltip.doc.js +76 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +8 -1
- package/dist/layouts/stack/stack.d.ts +12 -3
- package/dist/layouts/stack/stack.js +60 -34
- package/dist/provider/tao-provider.d.ts +71 -0
- package/dist/provider/tao-provider.js +166 -120
- package/dist/theme/control.css +12 -12
- package/dist/theme/theme.css +23 -0
- package/dist/utils/breakpoint.d.ts +31 -0
- package/dist/utils/breakpoint.js +80 -0
- package/dist/utils/overlay.d.ts +19 -0
- package/dist/utils/overlay.js +41 -0
- package/llms.txt +68 -3
- package/package.json +6 -4
- package/dist/components/select/use-is-mobile.d.ts +0 -1
- package/dist/components/select/use-is-mobile.js +0 -27
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
const popconfirmDoc = {
|
|
2
|
+
name: 'popconfirm',
|
|
3
|
+
displayName: 'Popconfirm',
|
|
4
|
+
category: 'Feedback',
|
|
5
|
+
description: 'Shows a compact confirmation popup anchored to a trigger element, with OK and Cancel actions.',
|
|
6
|
+
exports: [
|
|
7
|
+
'Popconfirm'
|
|
8
|
+
],
|
|
9
|
+
source: 'src/components/popconfirm/popconfirm.tsx',
|
|
10
|
+
story: 'stories/popconfirm.stories.tsx',
|
|
11
|
+
tests: [
|
|
12
|
+
'tests/popconfirm/popconfirm.test.tsx'
|
|
13
|
+
],
|
|
14
|
+
semanticParts: [
|
|
15
|
+
'content',
|
|
16
|
+
'title',
|
|
17
|
+
"description",
|
|
18
|
+
'footer',
|
|
19
|
+
'icon'
|
|
20
|
+
],
|
|
21
|
+
keywords: [
|
|
22
|
+
'popconfirm',
|
|
23
|
+
'confirm',
|
|
24
|
+
'popover',
|
|
25
|
+
'delete',
|
|
26
|
+
'warning'
|
|
27
|
+
],
|
|
28
|
+
related: [
|
|
29
|
+
'Popover',
|
|
30
|
+
'Modal',
|
|
31
|
+
'Button'
|
|
32
|
+
],
|
|
33
|
+
usage: {
|
|
34
|
+
description: 'Use Popconfirm for lightweight inline confirmations such as delete actions, where a full Modal would be too heavy. Use Modal.confirm for critical or complex confirmations.',
|
|
35
|
+
bestPractices: [
|
|
36
|
+
"Keep the title to one short question; put detail in the description.",
|
|
37
|
+
'Use Popconfirm for reversible, low-risk actions anchored to the control that triggers them.'
|
|
38
|
+
],
|
|
39
|
+
avoid: [
|
|
40
|
+
'Do not use Popconfirm for irreversible high-risk operations; use Modal.confirm instead.',
|
|
41
|
+
'Do not put forms or rich interactions inside a Popconfirm.'
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
props: [
|
|
45
|
+
{
|
|
46
|
+
name: 'title',
|
|
47
|
+
type: 'ReactNode (required)',
|
|
48
|
+
description: 'Main question text of the confirm popup.'
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "description",
|
|
52
|
+
type: 'ReactNode',
|
|
53
|
+
description: 'Secondary text shown under the title.'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'onConfirm',
|
|
57
|
+
type: '(e?: MouseEvent<HTMLElement>) => void',
|
|
58
|
+
description: 'Called when OK is clicked; the popup also closes.'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'onCancel',
|
|
62
|
+
type: '(e?: MouseEvent<HTMLElement>) => void',
|
|
63
|
+
description: 'Called when Cancel is clicked; the popup also closes.'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'okText',
|
|
67
|
+
type: 'ReactNode',
|
|
68
|
+
description: 'Text of the OK button.',
|
|
69
|
+
defaultValue: "'OK'"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'cancelText',
|
|
73
|
+
type: 'ReactNode',
|
|
74
|
+
description: 'Text of the Cancel button.',
|
|
75
|
+
defaultValue: "'Cancel'"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'okButtonProps',
|
|
79
|
+
type: 'ButtonProps',
|
|
80
|
+
description: 'Extra props forwarded to the OK button.'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'cancelButtonProps',
|
|
84
|
+
type: 'ButtonProps',
|
|
85
|
+
description: 'Extra props forwarded to the Cancel button.'
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'icon',
|
|
89
|
+
type: 'ReactNode | null',
|
|
90
|
+
description: 'Icon shown before the title. Pass `null` to hide it. Defaults to a warning triangle.'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'disabled',
|
|
94
|
+
type: 'boolean',
|
|
95
|
+
description: 'When true, the trigger still renders but the popup never opens.',
|
|
96
|
+
defaultValue: 'false'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'open',
|
|
100
|
+
type: 'boolean',
|
|
101
|
+
description: 'Controlled open state.'
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'defaultOpen',
|
|
105
|
+
type: 'boolean',
|
|
106
|
+
description: 'Initial open state (uncontrolled).',
|
|
107
|
+
defaultValue: 'false'
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'onOpenChange',
|
|
111
|
+
type: '(open: boolean) => void',
|
|
112
|
+
description: 'Called when the open state changes.'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'placement',
|
|
116
|
+
type: "'top' | 'bottom' | 'left' | 'right'",
|
|
117
|
+
description: 'Popup side relative to the trigger.',
|
|
118
|
+
defaultValue: "'top'"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'classNames',
|
|
122
|
+
type: "SemanticClassNames<'content' | 'title' | 'description' | 'footer' | 'icon'>",
|
|
123
|
+
description: 'Semantic per-part class name overrides.'
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'styles',
|
|
127
|
+
type: "SemanticStyles<'content' | 'title' | 'description' | 'footer' | 'icon'>",
|
|
128
|
+
description: 'Semantic per-part inline style overrides.'
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
};
|
|
132
|
+
export { popconfirmDoc };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const popoverDoc: {
|
|
2
|
+
name: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
category: "Data Display";
|
|
5
|
+
description: string;
|
|
6
|
+
exports: string[];
|
|
7
|
+
source: string;
|
|
8
|
+
story: string;
|
|
9
|
+
tests: string[];
|
|
10
|
+
semanticParts: string[];
|
|
11
|
+
keywords: string[];
|
|
12
|
+
related: string[];
|
|
13
|
+
usage: {
|
|
14
|
+
description: string;
|
|
15
|
+
bestPractices: string[];
|
|
16
|
+
avoid: string[];
|
|
17
|
+
};
|
|
18
|
+
props: ({
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
description: string;
|
|
22
|
+
defaultValue?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
name: string;
|
|
25
|
+
type: string;
|
|
26
|
+
description: string;
|
|
27
|
+
defaultValue: string;
|
|
28
|
+
})[];
|
|
29
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
const popoverDoc = {
|
|
2
|
+
name: 'popover',
|
|
3
|
+
displayName: 'Popover',
|
|
4
|
+
category: 'Data Display',
|
|
5
|
+
description: 'Displays a floating card with rich content anchored to a trigger element, opened by click or hover.',
|
|
6
|
+
exports: [
|
|
7
|
+
'Popover'
|
|
8
|
+
],
|
|
9
|
+
source: 'src/components/popover/popover.tsx',
|
|
10
|
+
story: 'stories/popover.stories.tsx',
|
|
11
|
+
tests: [
|
|
12
|
+
'tests/popover/popover.test.tsx'
|
|
13
|
+
],
|
|
14
|
+
semanticParts: [
|
|
15
|
+
'root',
|
|
16
|
+
'container',
|
|
17
|
+
'title',
|
|
18
|
+
'content',
|
|
19
|
+
'arrow'
|
|
20
|
+
],
|
|
21
|
+
keywords: [
|
|
22
|
+
'popover',
|
|
23
|
+
'popup',
|
|
24
|
+
'floating',
|
|
25
|
+
'card',
|
|
26
|
+
'hover',
|
|
27
|
+
'click'
|
|
28
|
+
],
|
|
29
|
+
related: [
|
|
30
|
+
'Tooltip',
|
|
31
|
+
'Dropdown',
|
|
32
|
+
'Modal'
|
|
33
|
+
],
|
|
34
|
+
usage: {
|
|
35
|
+
description: 'Use Popover for rich, non-blocking contextual content behind a click or hover. Use Tooltip for short text-only hints and Modal for blocking interactions.',
|
|
36
|
+
bestPractices: [
|
|
37
|
+
'Keep the title to one short line; put detail in the content.',
|
|
38
|
+
'Use the default hover trigger for read-only previews and trigger="click" for interactive content.',
|
|
39
|
+
'Keep popup content compact; link out for long-form detail.'
|
|
40
|
+
],
|
|
41
|
+
avoid: [
|
|
42
|
+
'Do not nest essential workflows inside a hover-only popover.',
|
|
43
|
+
'Do not chain popovers from inside another popover.'
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
props: [
|
|
47
|
+
{
|
|
48
|
+
name: 'title',
|
|
49
|
+
type: 'ReactNode',
|
|
50
|
+
description: 'Header text of the popup.'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'content',
|
|
54
|
+
type: 'ReactNode',
|
|
55
|
+
description: 'Body content of the popup.'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'trigger',
|
|
59
|
+
type: "'hover' | 'focus' | 'click' | 'contextMenu' | PopoverTrigger[]",
|
|
60
|
+
description: 'How the popup opens.',
|
|
61
|
+
defaultValue: "'hover'"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'placement',
|
|
65
|
+
type: "'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight' | 'left' | 'leftTop' | 'leftBottom' | 'right' | 'rightTop' | 'rightBottom'",
|
|
66
|
+
description: 'Popup side relative to the trigger.',
|
|
67
|
+
defaultValue: "'top'"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'open',
|
|
71
|
+
type: 'boolean',
|
|
72
|
+
description: 'Controlled open state.'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'defaultOpen',
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
description: 'Initial open state (uncontrolled).',
|
|
78
|
+
defaultValue: 'false'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'onOpenChange',
|
|
82
|
+
type: '(open: boolean) => void',
|
|
83
|
+
description: 'Called when the open state changes.'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'mouseEnterDelay',
|
|
87
|
+
type: 'number',
|
|
88
|
+
description: 'Delay in seconds before a hover opens the popup.',
|
|
89
|
+
defaultValue: '0.1'
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'mouseLeaveDelay',
|
|
93
|
+
type: 'number',
|
|
94
|
+
description: 'Delay in seconds before a hover closes the popup.',
|
|
95
|
+
defaultValue: '0.1'
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'arrow',
|
|
99
|
+
type: 'boolean | { pointAtCenter?: boolean }',
|
|
100
|
+
description: 'Whether to render a pointing arrow on the popup.',
|
|
101
|
+
defaultValue: 'true'
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'destroyOnHidden',
|
|
105
|
+
type: 'boolean',
|
|
106
|
+
description: 'Unmount the popup content while closed. When false, the content is kept mounted and hidden.',
|
|
107
|
+
defaultValue: 'false'
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'classNames',
|
|
111
|
+
type: "SemanticClassNames<'root' | 'container' | 'title' | 'content' | 'arrow'>",
|
|
112
|
+
description: 'Semantic per-part class name overrides.'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'styles',
|
|
116
|
+
type: "SemanticStyles<'root' | 'container' | 'title' | 'content' | 'arrow'>",
|
|
117
|
+
description: 'Semantic per-part inline style overrides.'
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
};
|
|
121
|
+
export { popoverDoc };
|
|
@@ -27,8 +27,29 @@ const stackDoc = {
|
|
|
27
27
|
description: 'Use Stack for simple one-dimensional layout and spacing.',
|
|
28
28
|
bestPractices: [
|
|
29
29
|
'Prefer Stack over one-off margin rules for repeated spacing.',
|
|
30
|
-
'Use semantic containers when the layout has richer meaning.'
|
|
30
|
+
'Use semantic containers when the layout has richer meaning.',
|
|
31
|
+
'Pass breakpoint maps (e.g. direction={{ xs: \'vertical\', md: \'horizontal\' }}) for responsive layouts.'
|
|
31
32
|
]
|
|
32
|
-
}
|
|
33
|
+
},
|
|
34
|
+
props: [
|
|
35
|
+
{
|
|
36
|
+
name: 'direction',
|
|
37
|
+
type: "TaoResponsiveValue<'vertical' | 'horizontal'>",
|
|
38
|
+
description: 'Flex direction; accepts a breakpoint map resolved via useBreakpoint.',
|
|
39
|
+
defaultValue: "'vertical'"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'gap',
|
|
43
|
+
type: "TaoResponsiveValue<'sm' | 'md' | 'lg'>",
|
|
44
|
+
description: 'Spacing between children; accepts a breakpoint map.',
|
|
45
|
+
defaultValue: "'md'"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'align',
|
|
49
|
+
type: "TaoResponsiveValue<'start' | 'center' | 'end' | 'stretch'>",
|
|
50
|
+
description: 'Cross-axis alignment; accepts a breakpoint map.',
|
|
51
|
+
defaultValue: "'stretch'"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
33
54
|
};
|
|
34
55
|
export { stackDoc };
|
|
@@ -41,7 +41,8 @@ const tableDoc = {
|
|
|
41
41
|
bestPractices: [
|
|
42
42
|
'Keep columns focused on the task.',
|
|
43
43
|
'Use stable row keys.',
|
|
44
|
-
'Control sorting and pagination when data is remote.'
|
|
44
|
+
'Control sorting and pagination when data is remote.',
|
|
45
|
+
'Gate secondary columns with column.responsive (e.g. [\'lg\']) instead of hand-rolled media queries.'
|
|
45
46
|
],
|
|
46
47
|
avoid: [
|
|
47
48
|
'Do not use Table for card-like content where comparison is not important.'
|
|
@@ -52,7 +52,17 @@ const taoProviderDoc = {
|
|
|
52
52
|
{
|
|
53
53
|
name: 'theme',
|
|
54
54
|
type: 'TaoThemeConfig',
|
|
55
|
-
description: 'Seed token overrides for the provider scope.'
|
|
55
|
+
description: 'Seed token overrides for the provider scope; also carries mode, compact density, and per-component token overrides.'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'theme.compact',
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
description: 'Compact density: control height 32→28 and paddings one notch tighter, cascades like mode.'
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'theme.components',
|
|
64
|
+
type: 'TaoComponentTokenMap',
|
|
65
|
+
description: 'Per-component token overrides (Button/Input/FormField), serialized to --tao-{component}-* CSS variables.'
|
|
56
66
|
}
|
|
57
67
|
]
|
|
58
68
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const tooltipDoc: {
|
|
2
|
+
name: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
category: "Data Display";
|
|
5
|
+
description: string;
|
|
6
|
+
exports: string[];
|
|
7
|
+
source: string;
|
|
8
|
+
story: string;
|
|
9
|
+
tests: string[];
|
|
10
|
+
semanticParts: string[];
|
|
11
|
+
keywords: string[];
|
|
12
|
+
related: string[];
|
|
13
|
+
usage: {
|
|
14
|
+
description: string;
|
|
15
|
+
bestPractices: string[];
|
|
16
|
+
avoid: string[];
|
|
17
|
+
};
|
|
18
|
+
props: ({
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
description: string;
|
|
22
|
+
required: true;
|
|
23
|
+
defaultValue?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
name: string;
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
defaultValue: string;
|
|
29
|
+
required?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
name: string;
|
|
32
|
+
type: string;
|
|
33
|
+
description: string;
|
|
34
|
+
required?: undefined;
|
|
35
|
+
defaultValue?: undefined;
|
|
36
|
+
})[];
|
|
37
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const tooltipDoc = {
|
|
2
|
+
name: 'tooltip',
|
|
3
|
+
displayName: 'Tooltip',
|
|
4
|
+
category: 'Data Display',
|
|
5
|
+
description: 'Shows a brief informational popup when hovering or focusing an element.',
|
|
6
|
+
exports: [
|
|
7
|
+
'Tooltip'
|
|
8
|
+
],
|
|
9
|
+
source: 'src/components/tooltip/tooltip.tsx',
|
|
10
|
+
story: 'stories/tooltip.stories.tsx',
|
|
11
|
+
tests: [
|
|
12
|
+
'tests/tooltip/tooltip.test.tsx'
|
|
13
|
+
],
|
|
14
|
+
semanticParts: [
|
|
15
|
+
'content',
|
|
16
|
+
'arrow'
|
|
17
|
+
],
|
|
18
|
+
keywords: [
|
|
19
|
+
'hover',
|
|
20
|
+
'hint',
|
|
21
|
+
'popup',
|
|
22
|
+
'infotip'
|
|
23
|
+
],
|
|
24
|
+
related: [
|
|
25
|
+
'Dropdown',
|
|
26
|
+
'Modal'
|
|
27
|
+
],
|
|
28
|
+
usage: {
|
|
29
|
+
description: 'Use Tooltip for short contextual hints on hover or focus. The popup is portaled and inherits the TaoProvider theme.',
|
|
30
|
+
bestPractices: [
|
|
31
|
+
'Keep tooltip text short and supplementary.',
|
|
32
|
+
'Wrap exactly one focusable trigger element.'
|
|
33
|
+
],
|
|
34
|
+
avoid: [
|
|
35
|
+
'Do not put critical information or interactive content inside a Tooltip.'
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
props: [
|
|
39
|
+
{
|
|
40
|
+
name: 'title',
|
|
41
|
+
type: 'ReactNode',
|
|
42
|
+
description: 'Tooltip content; null, undefined or empty string disables the tooltip.',
|
|
43
|
+
required: true
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'placement',
|
|
47
|
+
type: "'top' | 'bottom' | 'left' | 'right'",
|
|
48
|
+
description: 'Popup side relative to the trigger.',
|
|
49
|
+
defaultValue: "'top'"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'arrow',
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
description: 'Show the arrow pointing at the trigger.',
|
|
55
|
+
defaultValue: 'true'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'mouseEnterDelay',
|
|
59
|
+
type: 'number',
|
|
60
|
+
description: 'Hover delay in seconds before opening.',
|
|
61
|
+
defaultValue: '0.1'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'mouseLeaveDelay',
|
|
65
|
+
type: 'number',
|
|
66
|
+
description: 'Delay in seconds before a pointer-leave closes the tooltip; re-entering cancels the close. Esc/blur closes stay immediate.',
|
|
67
|
+
defaultValue: '0.1'
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'color',
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'Custom content background color.'
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
};
|
|
76
|
+
export { tooltipDoc };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import './theme/theme.css';
|
|
2
2
|
import './theme/control.css';
|
|
3
|
+
export { Alert, type AlertProps, type AlertSemanticPart, type AlertType, } from './components/alert/alert';
|
|
3
4
|
export { Breadcrumb, type BreadcrumbItemType, type BreadcrumbProps, type BreadcrumbSemanticPart, } from './components/breadcrumb/breadcrumb';
|
|
4
5
|
export { Button, type ButtonProps, type ButtonSemanticPart, } from './components/button/button';
|
|
5
6
|
export { Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxOptionType, type CheckboxProps, type CheckboxSemanticPart, } from './components/checkbox/checkbox';
|
|
@@ -10,12 +11,16 @@ export { RangePicker, type RangePickerProps, type RangePickerSemanticPart, } fro
|
|
|
10
11
|
export { Drawer, type DrawerPlacement, type DrawerProps, type DrawerResizableConfig, type DrawerSemanticPart, type DrawerSize, } from './components/drawer/drawer';
|
|
11
12
|
export { Dropdown, type DropdownButtonProps, type DropdownPlacement, type DropdownProps, type DropdownSemanticPart, type DropdownTrigger, type MenuDividerType, type MenuGroupType, type MenuItem, type MenuItemType, type MenuProps, } from './components/dropdown/dropdown';
|
|
12
13
|
export { FormActions, type FormActionsProps, type FormActionsSemanticPart, } from './components/form-actions/form-actions';
|
|
14
|
+
export { Form, type FormItemChildren, type FormItemProps, type FormItemSemanticPart, type FormItemValidateStatus, type FormProps, type FormSemanticPart, } from './components/form';
|
|
15
|
+
export type { FormInstance, NamePath, Rule, RuleObject, } from '@rc-component/form';
|
|
13
16
|
export { FormField, type FormFieldProps, type FormFieldSemanticPart, } from './components/form-field/form-field';
|
|
14
17
|
export { FormSection, type FormSectionProps, type FormSectionSemanticPart, } from './components/form-section/form-section';
|
|
15
18
|
export { Input, type InputProps, type InputSemanticPart, } from './components/input/input';
|
|
16
19
|
export { InputNumber, type InputNumberProps, type InputNumberSemanticPart, } from './components/input-number/input-number';
|
|
17
20
|
export { type ConfirmType, Modal, type ModalFooterRender, type ModalFuncProps, type ModalFuncReturn, type ModalHookApi, type ModalProps, type ModalSemanticPart, } from './components/modal';
|
|
18
21
|
export { Pagination, type PaginationProps, type PaginationSemanticPart, } from './components/pagination/pagination';
|
|
22
|
+
export { Popconfirm, type PopconfirmProps, type PopconfirmSemanticPart, } from './components/popconfirm/popconfirm';
|
|
23
|
+
export { Popover, type PopoverPlacement, type PopoverProps, type PopoverSemanticPart, type PopoverTrigger, } from './components/popover/popover';
|
|
19
24
|
export { Radio, RadioGroup, type RadioGroupProps, type RadioOptionType, type RadioProps, type RadioSemanticPart, } from './components/radio/radio';
|
|
20
25
|
export { ScrollArea, type ScrollAreaProps, type ScrollAreaSemanticPart, type ScrollAreaType, } from './components/scroll-area/scroll-area';
|
|
21
26
|
export { Select, type SelectOption, type SelectPlacement, type SelectProps, type SelectRef, type SelectSemanticPart, type TagRenderProps, } from './components/select/select';
|
|
@@ -27,8 +32,11 @@ export { type SorterResult, type SortOrder, Table, type TableColumn, type TableF
|
|
|
27
32
|
export { type TabItem, Tabs, type TabsProps, type TabsSemanticPart, } from './components/tabs/tabs';
|
|
28
33
|
export { CheckableTag, type CheckableTagProps, Tag, type TagColor, type TagProps, type TagSemanticPart, type TagVariant, } from './components/tag/tag';
|
|
29
34
|
export { type AutoSizeOptions, Textarea, type TextareaProps, type TextareaSemanticPart, } from './components/textarea/textarea';
|
|
35
|
+
export { Tooltip, type TooltipPlacement, type TooltipProps, type TooltipSemanticPart, } from './components/tooltip/tooltip';
|
|
30
36
|
export { FormLayout, type FormLayoutProps, type FormLayoutSemanticPart, } from './layouts/form-layout/form-layout';
|
|
31
37
|
export { Stack, type StackProps, type StackSemanticPart, } from './layouts/stack/stack';
|
|
32
38
|
export { type FormatOptions, HeadlessInputNumber, type HeadlessInputNumberProps, NumberInput, type NumberInputProps, type PadDecimalsOnBlur, type UseNumberInputOptions, type UseNumberInputReturn, useNumberInput, } from './number-input';
|
|
33
|
-
export { type TaoConfig, TaoProvider, type TaoProviderProps, type TaoSeedToken, type TaoSize, type TaoStatus, type TaoThemeConfig, type TaoThemeMode, type TaoVariant, useTaoConfig, } from './provider/tao-provider';
|
|
39
|
+
export { type ButtonComponentToken, type FormFieldComponentToken, type InputComponentToken, type TaoComponentTokenMap, type TaoConfig, TaoProvider, type TaoProviderProps, type TaoSeedToken, type TaoSize, type TaoStatus, type TaoThemeConfig, type TaoThemeMode, type TaoVariant, useTaoConfig, useTaoToken, } from './provider/tao-provider';
|
|
40
|
+
export { type TaoTokenName, taoTokenNames, tokenVar } from './theme/tokens';
|
|
41
|
+
export { resolveResponsiveValue, type TaoBreakpoint, type TaoBreakpointMap, type TaoResponsiveValue, useBreakpoint, useIsMobile, } from './utils/breakpoint';
|
|
34
42
|
export { cx, type SemanticClassNames, type SemanticStyles, } from './utils/semantic';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./theme/theme.css";
|
|
3
3
|
import "./theme/control.css";
|
|
4
|
+
export { Alert } from "./components/alert/alert.js";
|
|
4
5
|
export { Breadcrumb } from "./components/breadcrumb/breadcrumb.js";
|
|
5
6
|
export { Button } from "./components/button/button.js";
|
|
6
7
|
export { Checkbox, CheckboxGroup } from "./components/checkbox/checkbox.js";
|
|
@@ -11,12 +12,15 @@ export { RangePicker } from "./components/date-picker/range-picker.js";
|
|
|
11
12
|
export { Drawer } from "./components/drawer/drawer.js";
|
|
12
13
|
export { Dropdown } from "./components/dropdown/dropdown.js";
|
|
13
14
|
export { FormActions } from "./components/form-actions/form-actions.js";
|
|
15
|
+
export { Form } from "./components/form/index.js";
|
|
14
16
|
export { FormField } from "./components/form-field/form-field.js";
|
|
15
17
|
export { FormSection } from "./components/form-section/form-section.js";
|
|
16
18
|
export { Input } from "./components/input/input.js";
|
|
17
19
|
export { InputNumber } from "./components/input-number/input-number.js";
|
|
18
20
|
export { Modal } from "./components/modal/index.js";
|
|
19
21
|
export { Pagination } from "./components/pagination/pagination.js";
|
|
22
|
+
export { Popconfirm } from "./components/popconfirm/popconfirm.js";
|
|
23
|
+
export { Popover } from "./components/popover/popover.js";
|
|
20
24
|
export { Radio, RadioGroup } from "./components/radio/radio.js";
|
|
21
25
|
export { ScrollArea } from "./components/scroll-area/scroll-area.js";
|
|
22
26
|
export { Select } from "./components/select/select.js";
|
|
@@ -28,8 +32,11 @@ export { Table } from "./components/table/table.js";
|
|
|
28
32
|
export { Tabs } from "./components/tabs/tabs.js";
|
|
29
33
|
export { CheckableTag, Tag } from "./components/tag/tag.js";
|
|
30
34
|
export { Textarea } from "./components/textarea/textarea.js";
|
|
35
|
+
export { Tooltip } from "./components/tooltip/tooltip.js";
|
|
31
36
|
export { FormLayout } from "./layouts/form-layout/form-layout.js";
|
|
32
37
|
export { Stack } from "./layouts/stack/stack.js";
|
|
33
38
|
export { HeadlessInputNumber, NumberInput, useNumberInput } from "./number-input/index.js";
|
|
34
|
-
export { TaoProvider, useTaoConfig } from "./provider/tao-provider.js";
|
|
39
|
+
export { TaoProvider, useTaoConfig, useTaoToken } from "./provider/tao-provider.js";
|
|
40
|
+
export { taoTokenNames, tokenVar } from "./theme/tokens.js";
|
|
41
|
+
export { resolveResponsiveValue, useBreakpoint, useIsMobile } from "./utils/breakpoint.js";
|
|
35
42
|
export { cx } from "./utils/semantic.js";
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { type TaoResponsiveValue } from '../../utils/breakpoint';
|
|
2
3
|
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
3
4
|
import './layout.css';
|
|
4
5
|
export type StackSemanticPart = 'root';
|
|
6
|
+
export type StackDirection = 'vertical' | 'horizontal';
|
|
7
|
+
export type StackGap = 'sm' | 'md' | 'lg';
|
|
8
|
+
export type StackAlign = 'start' | 'center' | 'end' | 'stretch';
|
|
5
9
|
export interface StackProps {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Flex direction. Accepts a breakpoint map, e.g.
|
|
12
|
+
* `direction={{ xs: 'vertical', md: 'horizontal' }}` — the largest matching
|
|
13
|
+
* breakpoint wins (SSR/first render falls back to the plain default).
|
|
14
|
+
*/
|
|
15
|
+
direction?: TaoResponsiveValue<StackDirection>;
|
|
16
|
+
gap?: TaoResponsiveValue<StackGap>;
|
|
17
|
+
align?: TaoResponsiveValue<StackAlign>;
|
|
9
18
|
children: ReactNode;
|
|
10
19
|
className?: string;
|
|
11
20
|
style?: CSSProperties;
|