@rockshin/tao-ui 0.0.42 → 0.0.43
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 +7 -1
- package/component-manifest.json +34 -17
- package/dist/components/alert/alert.css +1 -0
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/calendar/calendar.css +10 -60
- package/dist/components/calendar/calendar.js +46 -43
- package/dist/components/card/card.css +1 -1
- package/dist/components/carousel/carousel.css +1 -0
- package/dist/components/carousel/carousel.js +62 -7
- package/dist/components/collapse/collapse-panels.d.ts +4 -0
- package/dist/components/collapse/collapse-panels.js +413 -0
- package/dist/components/collapse/collapse.css +199 -0
- package/dist/components/collapse/collapse.d.ts +77 -0
- package/dist/components/{collapsible/collapsible.js → collapse/collapse.js} +26 -10
- package/dist/components/color-picker/color-picker.css +8 -42
- package/dist/components/color-picker/color-picker.js +220 -145
- package/dist/components/date-picker/date-picker.css +18 -56
- package/dist/components/date-picker/date-picker.d.ts +2 -0
- package/dist/components/date-picker/date-picker.js +11 -6
- package/dist/components/date-picker/presets.js +5 -2
- package/dist/components/date-picker/range-picker.d.ts +2 -0
- package/dist/components/date-picker/range-picker.js +3 -1
- package/dist/components/form/form-item.js +1 -0
- package/dist/components/form/form.css +15 -0
- package/dist/components/form/form.js +1 -0
- package/dist/components/form-field/form-field-view.d.ts +3 -1
- package/dist/components/form-field/form-field-view.js +109 -84
- package/dist/components/input/base-input.d.ts +25 -0
- package/dist/components/input/base-input.js +104 -0
- package/dist/components/input/input-shared.css +75 -0
- package/dist/components/input/input-shared.d.ts +59 -0
- package/dist/components/input/input-shared.js +152 -0
- package/dist/components/input/input.css +99 -4
- package/dist/components/input/input.d.ts +12 -16
- package/dist/components/input/input.js +11 -154
- package/dist/components/input/otp.d.ts +29 -0
- package/dist/components/input/otp.js +335 -0
- package/dist/components/input/password.d.ts +12 -0
- package/dist/components/input/password.js +117 -0
- package/dist/components/input/search.d.ts +16 -0
- package/dist/components/input/search.js +99 -0
- package/dist/components/input-number/input-number.d.ts +2 -2
- package/dist/components/input-number/input-number.js +2 -2
- package/dist/components/list/list-pagination.css +5 -5
- package/dist/components/list/list-pagination.js +1 -0
- package/dist/components/mentions/mentions.css +7 -0
- package/dist/components/modal/modal.css +1 -0
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.js +78 -73
- package/dist/components/select/mobile-select.css +1 -16
- package/dist/components/select/mobile-select.d.ts +2 -1
- package/dist/components/select/mobile-select.js +68 -63
- package/dist/components/select/select-types.d.ts +2 -0
- package/dist/components/select/select.css +19 -0
- package/dist/components/select/select.js +31 -17
- package/dist/components/spinner/spinner.css +1 -1
- package/dist/components/steps/steps.css +53 -3
- package/dist/components/table/table.css +0 -5
- package/dist/components/table/table.js +21 -22
- package/dist/components/textarea/textarea.css +20 -0
- package/dist/components/textarea/textarea.d.ts +12 -6
- package/dist/components/textarea/textarea.js +120 -219
- package/dist/components/time-picker/time-picker.css +7 -0
- package/dist/components/tree/tree-check.d.ts +1 -0
- package/dist/components/tree/tree-check.js +36 -0
- package/dist/components/tree/tree.css +13 -18
- package/dist/components/tree/tree.js +2 -3
- package/dist/components/tree-select/select-engine.css +7 -0
- package/dist/components/tree-select/tree-select.js +2 -3
- package/dist/components/upload/upload.css +0 -11
- package/dist/components/upload/upload.js +13 -3
- package/dist/docs/component-docs.js +2 -2
- package/dist/docs/components/{collapsible.doc.d.ts → collapse.doc.d.ts} +1 -1
- package/dist/docs/components/collapse.doc.js +47 -0
- package/dist/docs/components/input.doc.js +11 -4
- package/dist/docs/components/textarea.doc.js +4 -2
- package/dist/entries/collapse.d.ts +3 -0
- package/dist/entries/{collapsible.js → collapse.js} +1 -1
- package/dist/entries/input.d.ts +1 -1
- package/dist/entries/textarea.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/provider/locale.d.ts +6 -0
- package/dist/provider/locale.js +10 -0
- package/dist/provider/tao-provider.js +1 -0
- package/dist/theme/control.css +2 -2
- package/dist/theme/theme.css +3 -1
- package/dist/theme/tokens.d.ts +2 -2
- package/dist/theme/tokens.js +1 -0
- package/dist/utils/field-label.d.ts +4 -0
- package/dist/utils/field-label.js +7 -0
- package/llms.txt +18 -15
- package/package.json +7 -4
- package/dist/components/collapsible/collapsible.css +0 -49
- package/dist/components/collapsible/collapsible.d.ts +0 -39
- package/dist/docs/components/collapsible.doc.js +0 -39
- package/dist/entries/collapsible.d.ts +0 -3
|
@@ -5,6 +5,7 @@ import { useTaoInternalConfig } from "../../provider/tao-provider.js";
|
|
|
5
5
|
import { cx } from "../../utils/semantic.js";
|
|
6
6
|
import { ChevronDownIcon, CloseIcon } from "../select/select-icons.js";
|
|
7
7
|
import { Spinner } from "../spinner/spinner.js";
|
|
8
|
+
import { TreeCheck } from "../tree/tree-check.js";
|
|
8
9
|
import { SelectEnginePopup, selectAllowClear } from "./select-engine.js";
|
|
9
10
|
import "../tree/tree.css";
|
|
10
11
|
import "./select-engine.css";
|
|
@@ -60,9 +61,7 @@ function InternalTreeSelect(props, ref) {
|
|
|
60
61
|
classNames: classes,
|
|
61
62
|
styles: semanticStyles,
|
|
62
63
|
multiple: !!(treeCheckable || multiple),
|
|
63
|
-
treeCheckable: treeCheckable ? /*#__PURE__*/ jsx(
|
|
64
|
-
"data-tao-tree-check": ""
|
|
65
|
-
}) : false,
|
|
64
|
+
treeCheckable: treeCheckable ? /*#__PURE__*/ jsx(TreeCheck, {}) : false,
|
|
66
65
|
treeLine: !!treeLine,
|
|
67
66
|
treeIcon: treeIcon,
|
|
68
67
|
showTreeIcon: !!treeIcon,
|
|
@@ -100,21 +100,10 @@
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
[data-tao-upload-actions] button {
|
|
103
|
-
border-radius: var(--tao-radius-sm);
|
|
104
103
|
width: 28px;
|
|
105
104
|
height: 28px;
|
|
106
105
|
color: var(--tao-color-text-secondary);
|
|
107
|
-
cursor: pointer;
|
|
108
|
-
background: none;
|
|
109
|
-
border: 0;
|
|
110
|
-
justify-content: center;
|
|
111
|
-
align-items: center;
|
|
112
106
|
padding: 0;
|
|
113
|
-
display: inline-flex;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
[data-tao-upload-actions] button:hover {
|
|
117
|
-
background: var(--tao-color-fill-secondary);
|
|
118
107
|
}
|
|
119
108
|
|
|
120
109
|
[data-tao-upload] :is(a, button, [role="button"]):focus-visible {
|
|
@@ -5,6 +5,7 @@ import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "re
|
|
|
5
5
|
import { flushSync } from "react-dom";
|
|
6
6
|
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
7
7
|
import { cx } from "../../utils/semantic.js";
|
|
8
|
+
import { Button } from "../button/button.js";
|
|
8
9
|
import { Progress } from "../progress/progress.js";
|
|
9
10
|
import "./upload.css";
|
|
10
11
|
import { interopDefault } from "../../utils/interop-default.js";
|
|
@@ -368,19 +369,28 @@ const UploadRoot = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
368
369
|
/*#__PURE__*/ jsxs("span", {
|
|
369
370
|
"data-tao-upload-actions": "",
|
|
370
371
|
children: [
|
|
371
|
-
visible(listConfig.showPreviewIcon, file_13, 'picture-card' === listType || 'picture-circle' === listType) && /*#__PURE__*/ jsx(
|
|
372
|
+
visible(listConfig.showPreviewIcon, file_13, 'picture-card' === listType || 'picture-circle' === listType) && /*#__PURE__*/ jsx(Button, {
|
|
373
|
+
variant: "ghost",
|
|
374
|
+
size: "small",
|
|
375
|
+
disabled: false,
|
|
372
376
|
type: "button",
|
|
373
377
|
"aria-label": `${locale.previewFile} ${file_13.name}`,
|
|
374
378
|
onClick: actions.preview,
|
|
375
379
|
children: renderOption(listConfig.previewIcon, file_13) ?? '↗'
|
|
376
380
|
}),
|
|
377
|
-
visible(listConfig.showDownloadIcon, file_13, false) && /*#__PURE__*/ jsx(
|
|
381
|
+
visible(listConfig.showDownloadIcon, file_13, false) && /*#__PURE__*/ jsx(Button, {
|
|
382
|
+
variant: "ghost",
|
|
383
|
+
size: "small",
|
|
384
|
+
disabled: false,
|
|
378
385
|
type: "button",
|
|
379
386
|
"aria-label": `${locale.downloadFile} ${file_13.name}`,
|
|
380
387
|
onClick: actions.download,
|
|
381
388
|
children: renderOption(listConfig.downloadIcon, file_13) ?? '↓'
|
|
382
389
|
}),
|
|
383
|
-
visible(listConfig.showRemoveIcon, file_13, true) && !disabled && /*#__PURE__*/ jsx(
|
|
390
|
+
visible(listConfig.showRemoveIcon, file_13, true) && !disabled && /*#__PURE__*/ jsx(Button, {
|
|
391
|
+
variant: "ghost",
|
|
392
|
+
size: "small",
|
|
393
|
+
disabled: false,
|
|
384
394
|
type: "button",
|
|
385
395
|
"aria-label": `${locale.removeFile} ${file_13.name}`,
|
|
386
396
|
onClick: actions.remove,
|
|
@@ -12,7 +12,7 @@ import { cardDoc } from "./components/card.doc.js";
|
|
|
12
12
|
import { carouselDoc } from "./components/carousel.doc.js";
|
|
13
13
|
import { cascaderDoc } from "./components/cascader.doc.js";
|
|
14
14
|
import { checkboxDoc } from "./components/checkbox.doc.js";
|
|
15
|
-
import {
|
|
15
|
+
import { collapseDoc } from "./components/collapse.doc.js";
|
|
16
16
|
import { colorPickerDoc } from "./components/color-picker.doc.js";
|
|
17
17
|
import { contextMenuDoc } from "./components/context-menu.doc.js";
|
|
18
18
|
import { datePickerDoc } from "./components/date-picker.doc.js";
|
|
@@ -86,7 +86,7 @@ const componentDocs = [
|
|
|
86
86
|
carouselDoc,
|
|
87
87
|
cascaderDoc,
|
|
88
88
|
checkboxDoc,
|
|
89
|
-
|
|
89
|
+
collapseDoc,
|
|
90
90
|
colorPickerDoc,
|
|
91
91
|
contextMenuDoc,
|
|
92
92
|
datePickerDoc,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const collapseDoc = {
|
|
2
|
+
name: 'collapse',
|
|
3
|
+
displayName: 'Collapse',
|
|
4
|
+
category: 'Data Display',
|
|
5
|
+
description: 'Groups content into accessible item-based panels with built-in headers, expand icons and accordion behavior.',
|
|
6
|
+
exports: [
|
|
7
|
+
'Collapse'
|
|
8
|
+
],
|
|
9
|
+
source: 'src/components/collapse/collapse.tsx',
|
|
10
|
+
story: 'stories/collapse.stories.tsx',
|
|
11
|
+
tests: [
|
|
12
|
+
'tests/collapse/collapse.test.tsx',
|
|
13
|
+
'tests/collapse/panels.test.tsx'
|
|
14
|
+
],
|
|
15
|
+
semanticParts: [
|
|
16
|
+
'root',
|
|
17
|
+
'item',
|
|
18
|
+
'header',
|
|
19
|
+
'trigger',
|
|
20
|
+
'title',
|
|
21
|
+
'icon',
|
|
22
|
+
'extra',
|
|
23
|
+
'content',
|
|
24
|
+
'body'
|
|
25
|
+
],
|
|
26
|
+
keywords: [
|
|
27
|
+
'accordion',
|
|
28
|
+
'disclosure',
|
|
29
|
+
'expand'
|
|
30
|
+
],
|
|
31
|
+
related: [
|
|
32
|
+
'Drawer',
|
|
33
|
+
'Tabs'
|
|
34
|
+
],
|
|
35
|
+
usage: {
|
|
36
|
+
description: 'Pass items with key, label and children for ready-to-use panels; use accordion to allow one open panel and activeKey/onChange for controlled state.',
|
|
37
|
+
bestPractices: [
|
|
38
|
+
'Make the trigger label describe the hidden content.',
|
|
39
|
+
'Use activeKey/onChange when expansion must coordinate with other UI.',
|
|
40
|
+
'Keep independent header actions in extra; reserve collapsible="icon" for icon-only activation.'
|
|
41
|
+
],
|
|
42
|
+
avoid: [
|
|
43
|
+
'Do not hide required form inputs in a collapsed region without a clear cue.'
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export { collapseDoc };
|
|
@@ -2,20 +2,25 @@ const inputDoc = {
|
|
|
2
2
|
name: 'input',
|
|
3
3
|
displayName: 'Input',
|
|
4
4
|
category: 'Data Entry',
|
|
5
|
-
description: '
|
|
5
|
+
description: 'Text inputs with clearing, counting, password visibility, search, text areas and OTP.',
|
|
6
6
|
exports: [
|
|
7
7
|
'Input'
|
|
8
8
|
],
|
|
9
9
|
source: 'src/components/input/input.tsx',
|
|
10
10
|
story: 'stories/input.stories.tsx',
|
|
11
11
|
tests: [
|
|
12
|
-
'tests/input/input.test.tsx'
|
|
12
|
+
'tests/input/input.test.tsx',
|
|
13
|
+
'tests/input/family.test.tsx'
|
|
13
14
|
],
|
|
14
15
|
semanticParts: [
|
|
15
16
|
'root',
|
|
16
17
|
'input',
|
|
17
18
|
'prefix',
|
|
18
|
-
'suffix'
|
|
19
|
+
'suffix',
|
|
20
|
+
'clear',
|
|
21
|
+
'count',
|
|
22
|
+
'addonBefore',
|
|
23
|
+
'addonAfter'
|
|
19
24
|
],
|
|
20
25
|
keywords: [
|
|
21
26
|
'text field',
|
|
@@ -30,7 +35,9 @@ const inputDoc = {
|
|
|
30
35
|
description: 'Use Input for short text values such as names, filters, search terms, and identifiers.',
|
|
31
36
|
bestPractices: [
|
|
32
37
|
'Pair with FormField for labels and validation.',
|
|
33
|
-
'Use type, inputMode, and autoComplete when applicable.'
|
|
38
|
+
'Use type, inputMode, and autoComplete when applicable.',
|
|
39
|
+
'Use Input.Password, Input.Search, Input.TextArea and Input.OTP for specialized input.',
|
|
40
|
+
'Use count.max for a soft limit; add exceedFormatter for custom clipping.'
|
|
34
41
|
]
|
|
35
42
|
}
|
|
36
43
|
};
|
|
@@ -2,7 +2,7 @@ const textareaDoc = {
|
|
|
2
2
|
name: 'textarea',
|
|
3
3
|
displayName: 'Textarea',
|
|
4
4
|
category: 'Data Entry',
|
|
5
|
-
description: 'Multi-line text input with
|
|
5
|
+
description: 'Multi-line text input with auto sizing, clearing and custom character counts; also available as Input.TextArea.',
|
|
6
6
|
exports: [
|
|
7
7
|
'Textarea'
|
|
8
8
|
],
|
|
@@ -13,7 +13,9 @@ const textareaDoc = {
|
|
|
13
13
|
],
|
|
14
14
|
semanticParts: [
|
|
15
15
|
'root',
|
|
16
|
-
'textarea'
|
|
16
|
+
'textarea',
|
|
17
|
+
'clear',
|
|
18
|
+
'count'
|
|
17
19
|
],
|
|
18
20
|
keywords: [
|
|
19
21
|
'textarea',
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import '../theme/theme.css';
|
|
2
|
+
import '../theme/control.css';
|
|
3
|
+
export { Collapse, type CollapseContentProps, type CollapseExpandIconProps, type CollapseItem, type CollapseProps, type CollapseSemanticPart, type CollapseTriggerProps, type CollapseTriggerType, } from '../components/collapse/collapse.js';
|
package/dist/entries/input.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../theme/theme.css';
|
|
2
2
|
import '../theme/control.css';
|
|
3
|
-
export { Input, type InputProps, type InputSemanticPart, } from '../components/input/input.js';
|
|
3
|
+
export { Input, type InputProps, type InputRef, type InputFocusOptions, type InputVariant, type AllowClearConfig, type CountConfig, type CountInfo, type PasswordProps, type VisibilityToggle, type SearchProps, type SearchSemanticPart, type OTPProps, type OTPRef, type OTPSemanticPart, type TextAreaProps, type TextAreaRef, type InputSemanticPart, } from '../components/input/input.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../theme/theme.css';
|
|
2
2
|
import '../theme/control.css';
|
|
3
|
-
export { type AutoSizeOptions, Textarea, type TextareaProps, type TextareaSemanticPart, } from '../components/textarea/textarea.js';
|
|
3
|
+
export { type AutoSizeOptions, Textarea, type TextareaProps, type TextareaRef, type TextareaSemanticPart, } from '../components/textarea/textarea.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export { Carousel, type CarouselEffect, type CarouselProps, type CarouselRef, ty
|
|
|
16
16
|
export type { BaseOptionType, CascaderAutoProps, CascaderPanelAutoProps, CascaderPanelProps, CascaderProps, CascaderRef, CascaderSemanticPart, CascaderSemanticType, DefaultOptionType, FieldNamesType, FilledFieldNamesType, } from './components/cascader/cascader.js';
|
|
17
17
|
export { Cascader, CascaderPanel } from './components/cascader/cascader.js';
|
|
18
18
|
export { Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxOptionType, type CheckboxProps, type CheckboxSemanticPart, } from './components/checkbox/checkbox.js';
|
|
19
|
-
export {
|
|
19
|
+
export { Collapse, type CollapseContentProps, type CollapseExpandIconProps, type CollapseItem, type CollapseProps, type CollapseSemanticPart, type CollapseTriggerProps, type CollapseTriggerType, } from './components/collapse/collapse.js';
|
|
20
20
|
export type { Color, ColorFormatType, ColorGenInput, ColorValueType, GradientColor, LineGradientType, ModeType, } from './components/color-picker/color.js';
|
|
21
21
|
export { ColorPicker } from './components/color-picker/color-picker.js';
|
|
22
22
|
export type { ColorPickerClassNames, ColorPickerProps, ColorPickerSemanticPart, ColorPickerStyles, PresetsItem, } from './components/color-picker/color-picker-types.js';
|
|
@@ -34,7 +34,7 @@ export { FormActions, type FormActionsProps, type FormActionsSemanticPart, } fro
|
|
|
34
34
|
export { FormField, type FormFieldProps, type FormFieldSemanticPart, } from './components/form-field/form-field.js';
|
|
35
35
|
export { FormSection, type FormSectionProps, type FormSectionSemanticPart, } from './components/form-section/form-section.js';
|
|
36
36
|
export { type DeprecatedPreviewConfig, type GroupPreviewConfig, Image, ImagePreviewGroup, type ImageProgressConfig, type ImageProps, type ImageSemanticPart, type ImageSemanticType, type PlaceholderType, type PreviewConfig, type PreviewGroupProps, type ProgressClassNames, type ProgressStyles, } from './components/image/image.js';
|
|
37
|
-
export { Input, type InputProps, type InputSemanticPart, } from './components/input/input.js';
|
|
37
|
+
export { Input, type InputProps, type InputRef, type InputFocusOptions, type InputVariant, type AllowClearConfig, type CountConfig, type CountInfo, type PasswordProps, type VisibilityToggle, type SearchProps, type SearchSemanticPart, type OTPProps, type OTPRef, type OTPSemanticPart, type TextAreaProps, type TextAreaRef, type InputSemanticPart, } from './components/input/input.js';
|
|
38
38
|
export { InputNumber, type InputNumberProps, type InputNumberSemanticPart, } from './components/input-number/input-number.js';
|
|
39
39
|
export { List, type ColumnCount, type ColumnType, type ListConsumerProps, type ListGridType, type ListItemLayout, type ListItemMetaProps, type ListItemMetaRef, type ListItemMetaSemanticPart, type ListItemProps, type ListItemSemanticClassNames, type ListItemSemanticName, type ListItemSemanticPart, type ListItemSemanticStyles, type ListLocale, type ListPagination, type ListProps, type ListSemanticPart, type ListSize, } from './components/list/list.js';
|
|
40
40
|
export { Listy, type ListyClassNames, type ListyProps, type ListyRef, type ListyScrollToConfig, type ListySemanticPart, type ListyStyles, type ScrollAlign, } from './components/listy/listy.js';
|
|
@@ -65,7 +65,7 @@ export { Switch, type SwitchProps, type SwitchSemanticPart, } from './components
|
|
|
65
65
|
export { type SorterResult, type SortOrder, Table, type TableColumn, type TableExpandable, type TableFilterItem, type TablePagination, type TableProps, type TableRowSelection, type TableSemanticPart, type TableSummaryCellProps, type TableSummaryProps, type TableSummaryRowProps, type TableVariant, } from './components/table/table.js';
|
|
66
66
|
export { type TabItem, Tabs, type TabsProps, type TabsSemanticPart, } from './components/tabs/tabs.js';
|
|
67
67
|
export { CheckableTag, type CheckableTagProps, Tag, type TagColor, type TagProps, type TagSemanticPart, type TagVariant, } from './components/tag/tag.js';
|
|
68
|
-
export { type AutoSizeOptions, Textarea, type TextareaProps, type TextareaSemanticPart, } from './components/textarea/textarea.js';
|
|
68
|
+
export { type AutoSizeOptions, Textarea, type TextareaProps, type TextareaRef, type TextareaSemanticPart, } from './components/textarea/textarea.js';
|
|
69
69
|
export { TimePicker, type TimePickerClassNames, type TimePickerLocale, type TimePickerLocaleConfig, type TimePickerProps, type TimePickerRef, type TimePickerSemanticPart, type TimePickerStyles, TimeRangePicker, type TimeRangePickerProps, type TimeRangePickerRef, } from './components/time-picker/time-picker.js';
|
|
70
70
|
export { type ItemPlacement, type ItemPosition, Timeline, type TimelineItemSemanticPart, type TimelineItemType, type TimelineMode, type TimelineProps, type TimelineSemanticPart, } from './components/timeline/timeline.js';
|
|
71
71
|
export { Tooltip, type TooltipPlacement, type TooltipProps, type TooltipSemanticPart, } from './components/tooltip/tooltip.js';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export { Card } from "./components/card/card.js";
|
|
|
14
14
|
export { Carousel } from "./components/carousel/carousel.js";
|
|
15
15
|
export { Cascader, CascaderPanel } from "./components/cascader/cascader.js";
|
|
16
16
|
export { Checkbox, CheckboxGroup } from "./components/checkbox/checkbox.js";
|
|
17
|
-
export {
|
|
17
|
+
export { Collapse } from "./components/collapse/collapse.js";
|
|
18
18
|
export { ColorPicker } from "./components/color-picker/color-picker.js";
|
|
19
19
|
export { ContextMenu } from "./components/context-menu/context-menu.js";
|
|
20
20
|
export { DatePicker } from "./components/date-picker/date-picker.js";
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
export interface TaoLocale {
|
|
3
3
|
select: string;
|
|
4
4
|
searchPlaceholder: string;
|
|
5
|
+
search?: string;
|
|
6
|
+
showPassword?: string;
|
|
7
|
+
hidePassword?: string;
|
|
8
|
+
otpLabel?: (index: number, length: number) => string;
|
|
5
9
|
searchOptions: string;
|
|
6
10
|
noResults: string;
|
|
7
11
|
/** Empty-state text. Omitted custom locales use the built-in English text. */
|
|
@@ -13,6 +17,8 @@ export interface TaoLocale {
|
|
|
13
17
|
close: string;
|
|
14
18
|
remove: (label: string) => string;
|
|
15
19
|
dateTime: string;
|
|
20
|
+
/** Date-only picker title. Omitted custom locales use the built-in English text. */
|
|
21
|
+
selectDate?: string;
|
|
16
22
|
selectTime?: string;
|
|
17
23
|
startTime?: string;
|
|
18
24
|
endTime?: string;
|
package/dist/provider/locale.js
CHANGED
|
@@ -2,6 +2,10 @@ const enUS = {
|
|
|
2
2
|
locale: 'en_US',
|
|
3
3
|
select: 'Select',
|
|
4
4
|
searchPlaceholder: 'Search...',
|
|
5
|
+
search: 'Search',
|
|
6
|
+
showPassword: 'Show password',
|
|
7
|
+
hidePassword: 'Hide password',
|
|
8
|
+
otpLabel: (index, length)=>`Character ${index} of ${length}`,
|
|
5
9
|
searchOptions: 'Search options',
|
|
6
10
|
noResults: 'No results',
|
|
7
11
|
emptyDescription: 'No data',
|
|
@@ -10,6 +14,7 @@ const enUS = {
|
|
|
10
14
|
close: 'Close',
|
|
11
15
|
remove: (label)=>`Remove ${label}`,
|
|
12
16
|
dateTime: 'Date & Time',
|
|
17
|
+
selectDate: 'Select date',
|
|
13
18
|
selectTime: 'Select time',
|
|
14
19
|
startTime: 'Start time',
|
|
15
20
|
endTime: 'End time',
|
|
@@ -76,6 +81,10 @@ const zhCN = {
|
|
|
76
81
|
locale: 'zh_CN',
|
|
77
82
|
select: '选择',
|
|
78
83
|
searchPlaceholder: '搜索…',
|
|
84
|
+
search: '搜索',
|
|
85
|
+
showPassword: '显示密码',
|
|
86
|
+
hidePassword: '隐藏密码',
|
|
87
|
+
otpLabel: (index, length)=>`第 ${index} 位,共 ${length} 位`,
|
|
79
88
|
searchOptions: '搜索选项',
|
|
80
89
|
noResults: '暂无结果',
|
|
81
90
|
emptyDescription: '暂无数据',
|
|
@@ -84,6 +93,7 @@ const zhCN = {
|
|
|
84
93
|
close: '关闭',
|
|
85
94
|
remove: (label)=>`移除${label}`,
|
|
86
95
|
dateTime: '选择日期和时间',
|
|
96
|
+
selectDate: '选择日期',
|
|
87
97
|
selectTime: '选择时间',
|
|
88
98
|
startTime: '开始时间',
|
|
89
99
|
endTime: '结束时间',
|
|
@@ -151,6 +151,7 @@ const TOKEN_TO_VAR_NUMBER = {
|
|
|
151
151
|
zIndexPopupBase: '--tao-z-index-popup-base'
|
|
152
152
|
};
|
|
153
153
|
const DEFAULT_TOKEN_STYLE = {
|
|
154
|
+
'--tao-border-text-weight': '12%',
|
|
154
155
|
'--tao-color-primary': 'oklch(0.205 0.01 70)',
|
|
155
156
|
'--tao-color-success': 'oklch(0.555 0.14 155)',
|
|
156
157
|
'--tao-color-warning': 'oklch(0.7 0.15 70)',
|
package/dist/theme/control.css
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
background: none;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
[data-tao-control][data-tao-variant="outlined"]:hover:not([data-disabled]):not(:focus-within):not([data-state="open"]) {
|
|
20
|
+
[data-tao-control][data-tao-variant="outlined"]:hover:not([data-disabled]):not(:has(input:disabled)):not(:focus-within):not([data-state="open"]) {
|
|
21
21
|
border-color: var(--tao-input-hover-border-color, color-mix(in oklch,
|
|
22
|
-
var(--tao-color-text-base)
|
|
22
|
+
var(--tao-color-text-base) calc(var(--tao-border-text-weight) + 8%),
|
|
23
23
|
var(--tao-color-bg-base)));
|
|
24
24
|
}
|
|
25
25
|
|
package/dist/theme/theme.css
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
--tao-color-error: oklch(57% .19 25);
|
|
7
7
|
--tao-color-bg-base: oklch(98.5% .004 70);
|
|
8
8
|
--tao-color-text-base: oklch(15.5% .01 70);
|
|
9
|
+
--tao-border-text-weight: 12%;
|
|
9
10
|
--tao-color-bg-surface: oklch(100% 0 0);
|
|
10
11
|
--tao-color-text-light-solid: oklch(98.5% .004 70);
|
|
11
12
|
--tao-radius: 6px;
|
|
@@ -99,7 +100,7 @@
|
|
|
99
100
|
var(--tao-color-bg-surface) 94%,
|
|
100
101
|
white);
|
|
101
102
|
--tao-color-border: color-mix(in oklch,
|
|
102
|
-
var(--tao-color-text-base)
|
|
103
|
+
var(--tao-color-text-base) var(--tao-border-text-weight),
|
|
103
104
|
var(--tao-color-bg-base));
|
|
104
105
|
--tao-color-border-secondary: color-mix(in oklch,
|
|
105
106
|
var(--tao-color-text-base) 5%,
|
|
@@ -217,6 +218,7 @@
|
|
|
217
218
|
--tao-color-bg-base: oklch(16.5% .005 70);
|
|
218
219
|
--tao-color-text-base: oklch(92.2% .005 70);
|
|
219
220
|
--tao-color-bg-surface: oklch(21% .005 70);
|
|
221
|
+
--tao-border-text-weight: 36%;
|
|
220
222
|
--tao-color-primary: oklch(92.2% .005 70);
|
|
221
223
|
--tao-primary-hover: color-mix(in oklab,
|
|
222
224
|
var(--tao-color-primary) 85%,
|
package/dist/theme/tokens.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type TaoTokenName = '--tao-box-shadow' | '--tao-box-shadow-secondary' | '--tao-box-shadow-tertiary' | '--tao-box-shadow-xs' | '--tao-color-bg-base' | '--tao-color-bg-container' | '--tao-color-bg-container-disabled' | '--tao-color-bg-disabled' | '--tao-color-bg-elevated' | '--tao-color-bg-layout' | '--tao-color-bg-mask' | '--tao-color-bg-surface' | '--tao-color-bg-text-active' | '--tao-color-bg-text-hover' | '--tao-color-border' | '--tao-color-border-secondary' | '--tao-color-error' | '--tao-color-error-outline' | '--tao-color-fill' | '--tao-color-fill-quaternary' | '--tao-color-fill-secondary' | '--tao-color-fill-tertiary' | '--tao-color-primary' | '--tao-color-shadow-hint' | '--tao-color-split' | '--tao-color-success' | '--tao-color-text' | '--tao-color-text-base' | '--tao-color-text-description' | '--tao-color-text-disabled' | '--tao-color-text-heading' | '--tao-color-text-label' | '--tao-color-text-light-solid' | '--tao-color-text-placeholder' | '--tao-color-text-quaternary' | '--tao-color-text-secondary' | '--tao-color-text-tertiary' | '--tao-color-warning' | '--tao-color-warning-outline' | '--tao-control-height' | '--tao-control-height-lg' | '--tao-control-height-sm' | '--tao-control-item-bg-active' | '--tao-control-item-bg-active-hover' | '--tao-control-item-bg-hover' | '--tao-control-outline' | '--tao-control-padding-horizontal' | '--tao-control-padding-horizontal-sm' | '--tao-control-range-width' | '--tao-control-width' | '--tao-drop-shadow-popover' | '--tao-error' | '--tao-error-active' | '--tao-error-bg' | '--tao-error-border' | '--tao-error-fg' | '--tao-error-hover' | '--tao-font-family' | '--tao-font-family-code' | '--tao-font-size' | '--tao-font-size-base' | '--tao-font-size-lg' | '--tao-font-size-sm' | '--tao-font-size-xl' | '--tao-font-size-xs' | '--tao-font-weight-medium' | '--tao-font-weight-normal' | '--tao-font-weight-strong' | '--tao-line-height' | '--tao-line-height-lg' | '--tao-line-height-sm' | '--tao-line-width' | '--tao-line-width-bold' | '--tao-margin' | '--tao-margin-lg' | '--tao-margin-md' | '--tao-margin-sm' | '--tao-margin-xl' | '--tao-margin-xs' | '--tao-margin-xxl' | '--tao-margin-xxs' | '--tao-motion-duration-fast' | '--tao-motion-duration-mid' | '--tao-motion-duration-slow' | '--tao-motion-ease-in-out' | '--tao-motion-ease-out' | '--tao-motion-ease-out-expo' | '--tao-motion-ease-out-quint' | '--tao-motion-unit' | '--tao-opacity-loading' | '--tao-padding' | '--tao-padding-lg' | '--tao-padding-md' | '--tao-padding-sm' | '--tao-padding-xl' | '--tao-padding-xs' | '--tao-padding-xxs' | '--tao-primary' | '--tao-primary-active' | '--tao-primary-bg' | '--tao-primary-bg-hover' | '--tao-primary-border' | '--tao-primary-fg' | '--tao-primary-hover' | '--tao-radius' | '--tao-radius-2xl' | '--tao-radius-full' | '--tao-radius-lg' | '--tao-radius-md' | '--tao-radius-sm' | '--tao-radius-xl' | '--tao-radius-xs' | '--tao-ring-width' | '--tao-size' | '--tao-size-lg' | '--tao-size-md' | '--tao-size-ms' | '--tao-size-sm' | '--tao-size-step' | '--tao-size-unit' | '--tao-size-xl' | '--tao-size-xs' | '--tao-size-xxl' | '--tao-size-xxs' | '--tao-success' | '--tao-success-bg' | '--tao-success-border' | '--tao-warning' | '--tao-warning-bg' | '--tao-warning-border' | '--tao-z-index-base' | '--tao-z-index-drawer' | '--tao-z-index-modal' | '--tao-z-index-popup' | '--tao-z-index-popup-base';
|
|
1
|
+
export type TaoTokenName = '--tao-border-text-weight' | '--tao-box-shadow' | '--tao-box-shadow-secondary' | '--tao-box-shadow-tertiary' | '--tao-box-shadow-xs' | '--tao-color-bg-base' | '--tao-color-bg-container' | '--tao-color-bg-container-disabled' | '--tao-color-bg-disabled' | '--tao-color-bg-elevated' | '--tao-color-bg-layout' | '--tao-color-bg-mask' | '--tao-color-bg-surface' | '--tao-color-bg-text-active' | '--tao-color-bg-text-hover' | '--tao-color-border' | '--tao-color-border-secondary' | '--tao-color-error' | '--tao-color-error-outline' | '--tao-color-fill' | '--tao-color-fill-quaternary' | '--tao-color-fill-secondary' | '--tao-color-fill-tertiary' | '--tao-color-primary' | '--tao-color-shadow-hint' | '--tao-color-split' | '--tao-color-success' | '--tao-color-text' | '--tao-color-text-base' | '--tao-color-text-description' | '--tao-color-text-disabled' | '--tao-color-text-heading' | '--tao-color-text-label' | '--tao-color-text-light-solid' | '--tao-color-text-placeholder' | '--tao-color-text-quaternary' | '--tao-color-text-secondary' | '--tao-color-text-tertiary' | '--tao-color-warning' | '--tao-color-warning-outline' | '--tao-control-height' | '--tao-control-height-lg' | '--tao-control-height-sm' | '--tao-control-item-bg-active' | '--tao-control-item-bg-active-hover' | '--tao-control-item-bg-hover' | '--tao-control-outline' | '--tao-control-padding-horizontal' | '--tao-control-padding-horizontal-sm' | '--tao-control-range-width' | '--tao-control-width' | '--tao-drop-shadow-popover' | '--tao-error' | '--tao-error-active' | '--tao-error-bg' | '--tao-error-border' | '--tao-error-fg' | '--tao-error-hover' | '--tao-font-family' | '--tao-font-family-code' | '--tao-font-size' | '--tao-font-size-base' | '--tao-font-size-lg' | '--tao-font-size-sm' | '--tao-font-size-xl' | '--tao-font-size-xs' | '--tao-font-weight-medium' | '--tao-font-weight-normal' | '--tao-font-weight-strong' | '--tao-line-height' | '--tao-line-height-lg' | '--tao-line-height-sm' | '--tao-line-width' | '--tao-line-width-bold' | '--tao-margin' | '--tao-margin-lg' | '--tao-margin-md' | '--tao-margin-sm' | '--tao-margin-xl' | '--tao-margin-xs' | '--tao-margin-xxl' | '--tao-margin-xxs' | '--tao-motion-duration-fast' | '--tao-motion-duration-mid' | '--tao-motion-duration-slow' | '--tao-motion-ease-in-out' | '--tao-motion-ease-out' | '--tao-motion-ease-out-expo' | '--tao-motion-ease-out-quint' | '--tao-motion-unit' | '--tao-opacity-loading' | '--tao-padding' | '--tao-padding-lg' | '--tao-padding-md' | '--tao-padding-sm' | '--tao-padding-xl' | '--tao-padding-xs' | '--tao-padding-xxs' | '--tao-primary' | '--tao-primary-active' | '--tao-primary-bg' | '--tao-primary-bg-hover' | '--tao-primary-border' | '--tao-primary-fg' | '--tao-primary-hover' | '--tao-radius' | '--tao-radius-2xl' | '--tao-radius-full' | '--tao-radius-lg' | '--tao-radius-md' | '--tao-radius-sm' | '--tao-radius-xl' | '--tao-radius-xs' | '--tao-ring-width' | '--tao-size' | '--tao-size-lg' | '--tao-size-md' | '--tao-size-ms' | '--tao-size-sm' | '--tao-size-step' | '--tao-size-unit' | '--tao-size-xl' | '--tao-size-xs' | '--tao-size-xxl' | '--tao-size-xxs' | '--tao-success' | '--tao-success-bg' | '--tao-success-border' | '--tao-warning' | '--tao-warning-bg' | '--tao-warning-border' | '--tao-z-index-base' | '--tao-z-index-drawer' | '--tao-z-index-modal' | '--tao-z-index-popup' | '--tao-z-index-popup-base';
|
|
2
2
|
export declare function tokenVar(name: TaoTokenName | (string & {})): string;
|
|
3
|
-
export declare const taoTokenNames: readonly ["--tao-box-shadow", "--tao-box-shadow-secondary", "--tao-box-shadow-tertiary", "--tao-box-shadow-xs", "--tao-color-bg-base", "--tao-color-bg-container", "--tao-color-bg-container-disabled", "--tao-color-bg-disabled", "--tao-color-bg-elevated", "--tao-color-bg-layout", "--tao-color-bg-mask", "--tao-color-bg-surface", "--tao-color-bg-text-active", "--tao-color-bg-text-hover", "--tao-color-border", "--tao-color-border-secondary", "--tao-color-error", "--tao-color-error-outline", "--tao-color-fill", "--tao-color-fill-quaternary", "--tao-color-fill-secondary", "--tao-color-fill-tertiary", "--tao-color-primary", "--tao-color-shadow-hint", "--tao-color-split", "--tao-color-success", "--tao-color-text", "--tao-color-text-base", "--tao-color-text-description", "--tao-color-text-disabled", "--tao-color-text-heading", "--tao-color-text-label", "--tao-color-text-light-solid", "--tao-color-text-placeholder", "--tao-color-text-quaternary", "--tao-color-text-secondary", "--tao-color-text-tertiary", "--tao-color-warning", "--tao-color-warning-outline", "--tao-control-height", "--tao-control-height-lg", "--tao-control-height-sm", "--tao-control-item-bg-active", "--tao-control-item-bg-active-hover", "--tao-control-item-bg-hover", "--tao-control-outline", "--tao-control-padding-horizontal", "--tao-control-padding-horizontal-sm", "--tao-control-range-width", "--tao-control-width", "--tao-drop-shadow-popover", "--tao-error", "--tao-error-active", "--tao-error-bg", "--tao-error-border", "--tao-error-fg", "--tao-error-hover", "--tao-font-family", "--tao-font-family-code", "--tao-font-size", "--tao-font-size-base", "--tao-font-size-lg", "--tao-font-size-sm", "--tao-font-size-xl", "--tao-font-size-xs", "--tao-font-weight-medium", "--tao-font-weight-normal", "--tao-font-weight-strong", "--tao-line-height", "--tao-line-height-lg", "--tao-line-height-sm", "--tao-line-width", "--tao-line-width-bold", "--tao-margin", "--tao-margin-lg", "--tao-margin-md", "--tao-margin-sm", "--tao-margin-xl", "--tao-margin-xs", "--tao-margin-xxl", "--tao-margin-xxs", "--tao-motion-duration-fast", "--tao-motion-duration-mid", "--tao-motion-duration-slow", "--tao-motion-ease-in-out", "--tao-motion-ease-out", "--tao-motion-ease-out-expo", "--tao-motion-ease-out-quint", "--tao-motion-unit", "--tao-opacity-loading", "--tao-padding", "--tao-padding-lg", "--tao-padding-md", "--tao-padding-sm", "--tao-padding-xl", "--tao-padding-xs", "--tao-padding-xxs", "--tao-primary", "--tao-primary-active", "--tao-primary-bg", "--tao-primary-bg-hover", "--tao-primary-border", "--tao-primary-fg", "--tao-primary-hover", "--tao-radius", "--tao-radius-2xl", "--tao-radius-full", "--tao-radius-lg", "--tao-radius-md", "--tao-radius-sm", "--tao-radius-xl", "--tao-radius-xs", "--tao-ring-width", "--tao-size", "--tao-size-lg", "--tao-size-md", "--tao-size-ms", "--tao-size-sm", "--tao-size-step", "--tao-size-unit", "--tao-size-xl", "--tao-size-xs", "--tao-size-xxl", "--tao-size-xxs", "--tao-success", "--tao-success-bg", "--tao-success-border", "--tao-warning", "--tao-warning-bg", "--tao-warning-border", "--tao-z-index-base", "--tao-z-index-drawer", "--tao-z-index-modal", "--tao-z-index-popup", "--tao-z-index-popup-base"];
|
|
3
|
+
export declare const taoTokenNames: readonly ["--tao-border-text-weight", "--tao-box-shadow", "--tao-box-shadow-secondary", "--tao-box-shadow-tertiary", "--tao-box-shadow-xs", "--tao-color-bg-base", "--tao-color-bg-container", "--tao-color-bg-container-disabled", "--tao-color-bg-disabled", "--tao-color-bg-elevated", "--tao-color-bg-layout", "--tao-color-bg-mask", "--tao-color-bg-surface", "--tao-color-bg-text-active", "--tao-color-bg-text-hover", "--tao-color-border", "--tao-color-border-secondary", "--tao-color-error", "--tao-color-error-outline", "--tao-color-fill", "--tao-color-fill-quaternary", "--tao-color-fill-secondary", "--tao-color-fill-tertiary", "--tao-color-primary", "--tao-color-shadow-hint", "--tao-color-split", "--tao-color-success", "--tao-color-text", "--tao-color-text-base", "--tao-color-text-description", "--tao-color-text-disabled", "--tao-color-text-heading", "--tao-color-text-label", "--tao-color-text-light-solid", "--tao-color-text-placeholder", "--tao-color-text-quaternary", "--tao-color-text-secondary", "--tao-color-text-tertiary", "--tao-color-warning", "--tao-color-warning-outline", "--tao-control-height", "--tao-control-height-lg", "--tao-control-height-sm", "--tao-control-item-bg-active", "--tao-control-item-bg-active-hover", "--tao-control-item-bg-hover", "--tao-control-outline", "--tao-control-padding-horizontal", "--tao-control-padding-horizontal-sm", "--tao-control-range-width", "--tao-control-width", "--tao-drop-shadow-popover", "--tao-error", "--tao-error-active", "--tao-error-bg", "--tao-error-border", "--tao-error-fg", "--tao-error-hover", "--tao-font-family", "--tao-font-family-code", "--tao-font-size", "--tao-font-size-base", "--tao-font-size-lg", "--tao-font-size-sm", "--tao-font-size-xl", "--tao-font-size-xs", "--tao-font-weight-medium", "--tao-font-weight-normal", "--tao-font-weight-strong", "--tao-line-height", "--tao-line-height-lg", "--tao-line-height-sm", "--tao-line-width", "--tao-line-width-bold", "--tao-margin", "--tao-margin-lg", "--tao-margin-md", "--tao-margin-sm", "--tao-margin-xl", "--tao-margin-xs", "--tao-margin-xxl", "--tao-margin-xxs", "--tao-motion-duration-fast", "--tao-motion-duration-mid", "--tao-motion-duration-slow", "--tao-motion-ease-in-out", "--tao-motion-ease-out", "--tao-motion-ease-out-expo", "--tao-motion-ease-out-quint", "--tao-motion-unit", "--tao-opacity-loading", "--tao-padding", "--tao-padding-lg", "--tao-padding-md", "--tao-padding-sm", "--tao-padding-xl", "--tao-padding-xs", "--tao-padding-xxs", "--tao-primary", "--tao-primary-active", "--tao-primary-bg", "--tao-primary-bg-hover", "--tao-primary-border", "--tao-primary-fg", "--tao-primary-hover", "--tao-radius", "--tao-radius-2xl", "--tao-radius-full", "--tao-radius-lg", "--tao-radius-md", "--tao-radius-sm", "--tao-radius-xl", "--tao-radius-xs", "--tao-ring-width", "--tao-size", "--tao-size-lg", "--tao-size-md", "--tao-size-ms", "--tao-size-sm", "--tao-size-step", "--tao-size-unit", "--tao-size-xl", "--tao-size-xs", "--tao-size-xxl", "--tao-size-xxs", "--tao-success", "--tao-success-bg", "--tao-success-border", "--tao-warning", "--tao-warning-bg", "--tao-warning-border", "--tao-z-index-base", "--tao-z-index-drawer", "--tao-z-index-modal", "--tao-z-index-popup", "--tao-z-index-popup-base"];
|
|
4
4
|
export declare const taoTokenVars: Record<TaoTokenName, string>;
|
package/dist/theme/tokens.js
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** The field's label content, without its required mark or help text. */
|
|
3
|
+
export declare const FieldLabelContext: import("react").Context<ReactNode>;
|
|
4
|
+
export declare function useMobileTitle(title: ReactNode, fallback: ReactNode): ReactNode;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
const FieldLabelContext = createContext(void 0);
|
|
3
|
+
function useMobileTitle(title, fallback) {
|
|
4
|
+
const label = useContext(FieldLabelContext);
|
|
5
|
+
return title ?? label ?? fallback;
|
|
6
|
+
}
|
|
7
|
+
export { FieldLabelContext, useMobileTitle };
|
package/llms.txt
CHANGED
|
@@ -19,11 +19,14 @@ The package root remains available and includes all component styles.
|
|
|
19
19
|
- Components expose semantic DOM customization through `classNames` and `styles` props.
|
|
20
20
|
- Theme tokens are CSS custom properties prefixed with `--tao-*`; import `tokenVar(name)` and `taoTokenNames` from `@rockshin/tao-ui/tokens`.
|
|
21
21
|
- Import `componentDocs` and `getComponentDoc(name)` from `@rockshin/tao-ui/meta` for machine-readable component metadata.
|
|
22
|
+
- Resolve `@rockshin/tao-ui/component-manifest.json` for plain JSON without loading component code.
|
|
23
|
+
- [Agent guide](https://rickyshin93.github.io/tao-ui/guide/agents.md): read contracts, choose imports, and verify generated code.
|
|
24
|
+
- [Website discovery index](https://rickyshin93.github.io/tao-ui/agent-manifest.json): current website version and bilingual Markdown/API links. Match it to your installed version.
|
|
22
25
|
|
|
23
26
|
## Component Groups
|
|
24
27
|
|
|
25
28
|
- Config: App, TaoProvider
|
|
26
|
-
- Data Display: Avatar, Badge, Calendar, Card, Carousel,
|
|
29
|
+
- Data Display: Avatar, Badge, Calendar, Card, Carousel, Collapse, Descriptions, Empty, Image, List, Listy, Masonry, Popover, QRCode, ScrollArea, Statistic, Table, Tag, Timeline, Tooltip, Tree
|
|
27
30
|
- Data Entry: AutoComplete, Cascader, Checkbox, ColorPicker, DatePicker, Form, FormActions, FormField, FormSection, Input, InputNumber, Mentions, Radio, RangePicker, Rate, Segmented, Select, Slider, Switch, Textarea, TimePicker, Transfer, TreeSelect, Upload
|
|
28
31
|
- Feedback: Alert, Drawer, Modal, Popconfirm, Progress, Result, Skeleton, Sonner, Spinner, Tour
|
|
29
32
|
- General: BorderBeam, Button, FloatButton, Watermark
|
|
@@ -215,18 +218,18 @@ Selects one or more independent boolean options.
|
|
|
215
218
|
|
|
216
219
|
Use Checkbox for independent choices, or CheckboxGroup when users can select multiple options from a set.
|
|
217
220
|
|
|
218
|
-
###
|
|
221
|
+
### Collapse
|
|
219
222
|
|
|
220
|
-
|
|
223
|
+
Groups content into accessible item-based panels with built-in headers, expand icons and accordion behavior.
|
|
221
224
|
|
|
222
225
|
- Category: Data Display
|
|
223
|
-
- Exports: `
|
|
224
|
-
- Source: `src/components/
|
|
225
|
-
- Storybook: `stories/
|
|
226
|
-
- Tests: `tests/
|
|
227
|
-
- Semantic parts: `root`, `trigger`, `content`
|
|
226
|
+
- Exports: `Collapse`
|
|
227
|
+
- Source: `src/components/collapse/collapse.tsx`
|
|
228
|
+
- Storybook: `stories/collapse.stories.tsx`
|
|
229
|
+
- Tests: `tests/collapse/collapse.test.tsx`, `tests/collapse/panels.test.tsx`
|
|
230
|
+
- Semantic parts: `root`, `item`, `header`, `trigger`, `title`, `icon`, `extra`, `content`, `body`
|
|
228
231
|
|
|
229
|
-
|
|
232
|
+
Pass items with key, label and children for ready-to-use panels; use accordion to allow one open panel and activeKey/onChange for controlled state.
|
|
230
233
|
|
|
231
234
|
### ColorPicker
|
|
232
235
|
|
|
@@ -437,14 +440,14 @@ Images with keyboard-accessible preview, grouping, transforms, fallbacks and upl
|
|
|
437
440
|
|
|
438
441
|
### Input
|
|
439
442
|
|
|
440
|
-
|
|
443
|
+
Text inputs with clearing, counting, password visibility, search, text areas and OTP.
|
|
441
444
|
|
|
442
445
|
- Category: Data Entry
|
|
443
446
|
- Exports: `Input`
|
|
444
447
|
- Source: `src/components/input/input.tsx`
|
|
445
448
|
- Storybook: `stories/input.stories.tsx`
|
|
446
|
-
- Tests: `tests/input/input.test.tsx`
|
|
447
|
-
- Semantic parts: `root`, `input`, `prefix`, `suffix`
|
|
449
|
+
- Tests: `tests/input/input.test.tsx`, `tests/input/family.test.tsx`
|
|
450
|
+
- Semantic parts: `root`, `input`, `prefix`, `suffix`, `clear`, `count`, `addonBefore`, `addonAfter`
|
|
448
451
|
|
|
449
452
|
Use Input for short text values such as names, filters, search terms, and identifiers.
|
|
450
453
|
|
|
@@ -852,14 +855,14 @@ Wrap an app or subtree with TaoProvider to set size, disabled, variant, and them
|
|
|
852
855
|
|
|
853
856
|
### Textarea
|
|
854
857
|
|
|
855
|
-
Multi-line text input with
|
|
858
|
+
Multi-line text input with auto sizing, clearing and custom character counts; also available as Input.TextArea.
|
|
856
859
|
|
|
857
860
|
- Category: Data Entry
|
|
858
861
|
- Exports: `Textarea`
|
|
859
862
|
- Source: `src/components/textarea/textarea.tsx`
|
|
860
863
|
- Storybook: `stories/textarea.stories.tsx`
|
|
861
864
|
- Tests: `tests/textarea/textarea.test.tsx`
|
|
862
|
-
- Semantic parts: `root`, `textarea`
|
|
865
|
+
- Semantic parts: `root`, `textarea`, `clear`, `count`
|
|
863
866
|
|
|
864
867
|
Use Textarea for longer freeform content such as descriptions, notes, and comments.
|
|
865
868
|
|
|
@@ -982,7 +985,7 @@ Repeats a text or image watermark over content and inherited dialog panels.
|
|
|
982
985
|
|
|
983
986
|
## Notes For Code Generation
|
|
984
987
|
|
|
985
|
-
- Prefer
|
|
988
|
+
- Prefer component subpaths for smaller imports; the root entry remains supported.
|
|
986
989
|
- Customize internals through semantic `classNames` and `styles`, not private class names.
|
|
987
990
|
- Prefer provider-level defaults for app-wide size, disabled, variant, and theme choices.
|
|
988
991
|
- Use `Modal.useModal()` inside React components so dialogs inherit the surrounding provider context.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rockshin/tao-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A modern React component library with semantic DOM customization and OKLCH-based theming.",
|
|
6
6
|
"keywords": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"type": "git",
|
|
20
20
|
"url": "git+https://github.com/rickyshin93/tao-ui.git"
|
|
21
21
|
},
|
|
22
|
-
"homepage": "https://github.
|
|
22
|
+
"homepage": "https://rickyshin93.github.io/tao-ui/",
|
|
23
23
|
"bugs": "https://github.com/rickyshin93/tao-ui/issues",
|
|
24
24
|
"sideEffects": [
|
|
25
25
|
"**/*.css",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"./src/entries/*.ts"
|
|
30
30
|
],
|
|
31
31
|
"exports": {
|
|
32
|
+
"./component-manifest.json": "./component-manifest.json",
|
|
32
33
|
".": {
|
|
33
34
|
"types": "./dist/index.d.ts",
|
|
34
35
|
"import": "./dist/index.js"
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
"check:components": "node scripts/check-component-sync.mjs",
|
|
61
62
|
"dev": "rslib --watch",
|
|
62
63
|
"doc": "rspress dev",
|
|
63
|
-
"doc:build": "rspress build",
|
|
64
|
+
"doc:build": "rspress build && node scripts/build-discovery.mjs",
|
|
64
65
|
"doc:preview": "rspress preview",
|
|
65
66
|
"docs:generate": "node scripts/generate-component-manifest.mjs",
|
|
66
67
|
"docs:check": "node scripts/generate-component-manifest.mjs --check",
|
|
@@ -100,6 +101,7 @@
|
|
|
100
101
|
"@types/react18": "npm:@types/react@18",
|
|
101
102
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
102
103
|
"happy-dom": "~20.13.2",
|
|
104
|
+
"motion": "^14.9.1",
|
|
103
105
|
"react": "^19.3.1",
|
|
104
106
|
"react-dom": "^19.3.1",
|
|
105
107
|
"react-dom18": "npm:react-dom@18.2.0",
|
|
@@ -109,7 +111,8 @@
|
|
|
109
111
|
"storybook-addon-rslib": "^3.6.1",
|
|
110
112
|
"storybook-react-rsbuild": "^3.6.1",
|
|
111
113
|
"typescript": "^7.0.2",
|
|
112
|
-
"typescript-compiler": "npm:typescript@6.0.3"
|
|
114
|
+
"typescript-compiler": "npm:typescript@6.0.3",
|
|
115
|
+
"zustand": "^5.0.16"
|
|
113
116
|
},
|
|
114
117
|
"peerDependencies": {
|
|
115
118
|
"react": "^18.2.0 || ^19.0.0",
|