@rockshin/tao-ui 0.0.42 → 0.0.44

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.
Files changed (107) hide show
  1. package/README.md +8 -2
  2. package/component-manifest.json +37 -18
  3. package/dist/components/alert/alert.css +1 -0
  4. package/dist/components/avatar/avatar.js +1 -1
  5. package/dist/components/calendar/calendar.css +10 -60
  6. package/dist/components/calendar/calendar.js +46 -43
  7. package/dist/components/card/card.css +1 -1
  8. package/dist/components/carousel/carousel.css +1 -0
  9. package/dist/components/carousel/carousel.js +62 -7
  10. package/dist/components/collapse/collapse-panels.d.ts +4 -0
  11. package/dist/components/collapse/collapse-panels.js +413 -0
  12. package/dist/components/collapse/collapse.css +199 -0
  13. package/dist/components/collapse/collapse.d.ts +77 -0
  14. package/dist/components/{collapsible/collapsible.js → collapse/collapse.js} +26 -10
  15. package/dist/components/color-picker/color-picker.css +8 -42
  16. package/dist/components/color-picker/color-picker.js +220 -145
  17. package/dist/components/date-picker/date-picker.css +18 -56
  18. package/dist/components/date-picker/date-picker.d.ts +2 -0
  19. package/dist/components/date-picker/date-picker.js +11 -6
  20. package/dist/components/date-picker/presets.js +5 -2
  21. package/dist/components/date-picker/range-picker.d.ts +2 -0
  22. package/dist/components/date-picker/range-picker.js +3 -1
  23. package/dist/components/form/field-control.d.ts +6 -0
  24. package/dist/components/form/field-control.js +42 -0
  25. package/dist/components/form/form-context.d.ts +3 -0
  26. package/dist/components/form/form-item.d.ts +2 -1
  27. package/dist/components/form/form-item.js +56 -42
  28. package/dist/components/form/form.css +15 -0
  29. package/dist/components/form/form.d.ts +5 -5
  30. package/dist/components/form/form.js +87 -68
  31. package/dist/components/form/index.d.ts +1 -0
  32. package/dist/components/form/use-form.d.ts +16 -0
  33. package/dist/components/form/use-form.js +69 -0
  34. package/dist/components/form-field/form-field-view.d.ts +6 -2
  35. package/dist/components/form-field/form-field-view.js +116 -84
  36. package/dist/components/input/base-input.d.ts +25 -0
  37. package/dist/components/input/base-input.js +104 -0
  38. package/dist/components/input/input-shared.css +75 -0
  39. package/dist/components/input/input-shared.d.ts +59 -0
  40. package/dist/components/input/input-shared.js +152 -0
  41. package/dist/components/input/input.css +99 -4
  42. package/dist/components/input/input.d.ts +12 -16
  43. package/dist/components/input/input.js +11 -154
  44. package/dist/components/input/otp.d.ts +29 -0
  45. package/dist/components/input/otp.js +335 -0
  46. package/dist/components/input/password.d.ts +12 -0
  47. package/dist/components/input/password.js +117 -0
  48. package/dist/components/input/search.d.ts +16 -0
  49. package/dist/components/input/search.js +99 -0
  50. package/dist/components/input-number/input-number.d.ts +2 -2
  51. package/dist/components/input-number/input-number.js +2 -2
  52. package/dist/components/list/list-pagination.css +5 -5
  53. package/dist/components/list/list-pagination.js +1 -0
  54. package/dist/components/mentions/mentions.css +7 -0
  55. package/dist/components/modal/modal.css +1 -0
  56. package/dist/components/radio/radio.d.ts +1 -1
  57. package/dist/components/radio/radio.js +78 -73
  58. package/dist/components/select/mobile-select.css +1 -16
  59. package/dist/components/select/mobile-select.d.ts +2 -1
  60. package/dist/components/select/mobile-select.js +68 -63
  61. package/dist/components/select/select-types.d.ts +2 -0
  62. package/dist/components/select/select.css +19 -0
  63. package/dist/components/select/select.js +31 -17
  64. package/dist/components/spinner/spinner.css +1 -1
  65. package/dist/components/steps/steps.css +53 -3
  66. package/dist/components/table/table.css +0 -5
  67. package/dist/components/table/table.js +21 -22
  68. package/dist/components/textarea/textarea.css +20 -0
  69. package/dist/components/textarea/textarea.d.ts +12 -6
  70. package/dist/components/textarea/textarea.js +120 -219
  71. package/dist/components/time-picker/time-picker.css +7 -0
  72. package/dist/components/tree/tree-check.d.ts +1 -0
  73. package/dist/components/tree/tree-check.js +36 -0
  74. package/dist/components/tree/tree.css +13 -18
  75. package/dist/components/tree/tree.js +2 -3
  76. package/dist/components/tree-select/select-engine.css +7 -0
  77. package/dist/components/tree-select/tree-select.js +2 -3
  78. package/dist/components/upload/upload.css +0 -11
  79. package/dist/components/upload/upload.js +13 -3
  80. package/dist/docs/component-docs.js +2 -2
  81. package/dist/docs/components/{collapsible.doc.d.ts → collapse.doc.d.ts} +1 -1
  82. package/dist/docs/components/collapse.doc.js +47 -0
  83. package/dist/docs/components/form.doc.js +3 -1
  84. package/dist/docs/components/input.doc.js +11 -4
  85. package/dist/docs/components/textarea.doc.js +4 -2
  86. package/dist/entries/collapse.d.ts +3 -0
  87. package/dist/entries/{collapsible.js → collapse.js} +1 -1
  88. package/dist/entries/form.d.ts +2 -2
  89. package/dist/entries/input.d.ts +1 -1
  90. package/dist/entries/textarea.d.ts +1 -1
  91. package/dist/index.d.ts +5 -5
  92. package/dist/index.js +1 -1
  93. package/dist/provider/locale.d.ts +6 -0
  94. package/dist/provider/locale.js +10 -0
  95. package/dist/provider/tao-provider.js +1 -0
  96. package/dist/theme/control.css +2 -2
  97. package/dist/theme/theme.css +3 -1
  98. package/dist/theme/tokens.d.ts +2 -2
  99. package/dist/theme/tokens.js +1 -0
  100. package/dist/utils/field-label.d.ts +4 -0
  101. package/dist/utils/field-label.js +7 -0
  102. package/llms.txt +19 -16
  103. package/package.json +10 -5
  104. package/dist/components/collapsible/collapsible.css +0 -49
  105. package/dist/components/collapsible/collapsible.d.ts +0 -39
  106. package/dist/docs/components/collapsible.doc.js +0 -39
  107. package/dist/entries/collapsible.d.ts +0 -3
@@ -9,7 +9,8 @@ const formDoc = {
9
9
  source: 'src/components/form/form.tsx',
10
10
  story: 'stories/form.stories.tsx',
11
11
  tests: [
12
- 'tests/form/form.test.tsx'
12
+ 'tests/form/form.test.tsx',
13
+ 'tests/form/form-scroll.test.tsx'
13
14
  ],
14
15
  semanticParts: [
15
16
  'root'
@@ -32,6 +33,7 @@ const formDoc = {
32
33
  'Declare validation as rules on Form.Item; the required mark is inferred from rules.',
33
34
  'Use dependencies for cross-field rules such as password confirmation.',
34
35
  'Use Form.useForm() for imperative control (setFieldsValue, resetFields, submit).',
36
+ 'Call form.scrollToField(name, { focus: true }) to reveal a mounted field, including full Form.List paths; custom controls must forward ref or id.',
35
37
  'Set size or disabled on Form to cascade them to every control inside.'
36
38
  ],
37
39
  avoid: [
@@ -2,20 +2,25 @@ const inputDoc = {
2
2
  name: 'input',
3
3
  displayName: 'Input',
4
4
  category: 'Data Entry',
5
- description: 'Single-line text input for short freeform values.',
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 optional auto sizing.',
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';
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  import "../theme/theme.css";
3
3
  import "../theme/control.css";
4
- export { Collapsible } from "../components/collapsible/collapsible.js";
4
+ export { Collapse } from "../components/collapse/collapse.js";
@@ -1,4 +1,4 @@
1
1
  import '../theme/theme.css';
2
2
  import '../theme/control.css';
3
- export type { FormInstance, NamePath, Rule, RuleObject, } from '@rc-component/form';
4
- export { Form, type FormItemChildren, type FormItemProps, type FormItemSemanticPart, type FormItemValidateStatus, type FormProps, type FormSemanticPart, } from '../components/form/index.js';
3
+ export type { NamePath, Rule, RuleObject, } from '@rc-component/form';
4
+ export { Form, type FormInstance, type FormScrollOptions, type FormItemChildren, type FormItemProps, type FormItemSemanticPart, type FormItemValidateStatus, type FormProps, type FormSemanticPart, } from '../components/form/index.js';
@@ -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
@@ -1,6 +1,6 @@
1
1
  import './theme/theme.css';
2
2
  import './theme/control.css';
3
- export type { FormInstance, NamePath, Rule, RuleObject, } from '@rc-component/form';
3
+ export type { NamePath, Rule, RuleObject, } from '@rc-component/form';
4
4
  export { Affix, type AffixProps, type AffixRef, type AffixSemanticPart, } from './components/affix/affix.js';
5
5
  export { Alert, type AlertProps, type AlertSemanticPart, type AlertType, } from './components/alert/alert.js';
6
6
  export type { AutoCompleteOption, AutoCompleteProps, AutoCompleteRef, AutoCompleteSemanticPart, AutoCompleteSemanticType, DataSourceItemObject, DataSourceItemType, } from './components/auto-complete/auto-complete.js';
@@ -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 { Collapsible, type CollapsibleContentProps, type CollapsibleProps, type CollapsibleSemanticPart, type CollapsibleTriggerProps, } from './components/collapsible/collapsible.js';
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';
@@ -29,12 +29,12 @@ export { Drawer, type DrawerPlacement, type DrawerProps, type DrawerResizableCon
29
29
  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.js';
30
30
  export { Empty, type EmptyProps, type EmptyRef, type EmptySemanticPart, } from './components/empty/empty.js';
31
31
  export { type BackTopProps, FloatButton, type FloatButtonBackTopProps, type FloatButtonBadgeProps, type FloatButtonElement, type FloatButtonGroupProps, type FloatButtonGroupRef, type FloatButtonGroupSemanticPart, type FloatButtonGroupTrigger, type FloatButtonProps, type FloatButtonRef, type FloatButtonSemanticPart, type FloatButtonShape, type FloatButtonType, } from './components/float-button/float-button.js';
32
- export { Form, type FormItemChildren, type FormItemProps, type FormItemSemanticPart, type FormItemValidateStatus, type FormProps, type FormSemanticPart, } from './components/form/index.js';
32
+ export { Form, type FormInstance, type FormScrollOptions, type FormItemChildren, type FormItemProps, type FormItemSemanticPart, type FormItemValidateStatus, type FormProps, type FormSemanticPart, } from './components/form/index.js';
33
33
  export { FormActions, type FormActionsProps, type FormActionsSemanticPart, } from './components/form-actions/form-actions.js';
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 { Collapsible } from "./components/collapsible/collapsible.js";
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;
@@ -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)',
@@ -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) 20%,
22
+ var(--tao-color-text-base) calc(var(--tao-border-text-weight) + 8%),
23
23
  var(--tao-color-bg-base)));
24
24
  }
25
25
 
@@ -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) 12%,
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%,
@@ -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>;
@@ -2,6 +2,7 @@ function tokenVar(name) {
2
2
  return `var(${name})`;
3
3
  }
4
4
  const taoTokenNames = [
5
+ '--tao-border-text-weight',
5
6
  '--tao-box-shadow',
6
7
  '--tao-box-shadow-secondary',
7
8
  '--tao-box-shadow-tertiary',
@@ -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, Collapsible, Descriptions, Empty, Image, List, Listy, Masonry, Popover, QRCode, ScrollArea, Statistic, Table, Tag, Timeline, Tooltip, Tree
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
- ### Collapsible
221
+ ### Collapse
219
222
 
220
- Shows and hides a region of content while keeping disclosure state accessible.
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: `Collapsible`
224
- - Source: `src/components/collapsible/collapsible.tsx`
225
- - Storybook: `stories/collapsible.stories.tsx`
226
- - Tests: `tests/collapsible/collapsible.test.tsx`
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
- Use Collapsible to hide secondary details while preserving a lightweight page layout.
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
 
@@ -353,7 +356,7 @@ Collects and validates field values with an antd-aligned API (rules, dependencie
353
356
  - Exports: `Form`
354
357
  - Source: `src/components/form/form.tsx`
355
358
  - Storybook: `stories/form.stories.tsx`
356
- - Tests: `tests/form/form.test.tsx`
359
+ - Tests: `tests/form/form.test.tsx`, `tests/form/form-scroll.test.tsx`
357
360
  - Semantic parts: `root`
358
361
 
359
362
  Use Form with Form.Item when fields need a value store, rule validation, or submit handling. Use the lighter FormField when you manage state yourself.
@@ -437,14 +440,14 @@ Images with keyboard-accessible preview, grouping, transforms, fallbacks and upl
437
440
 
438
441
  ### Input
439
442
 
440
- Single-line text input for short freeform values.
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 optional auto sizing.
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 root imports from `@rockshin/tao-ui`.
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.42",
3
+ "version": "0.0.44",
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.com/rickyshin93/tao-ui#readme",
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",
@@ -148,8 +151,10 @@
148
151
  "@rc-component/tree": "~1.5.3",
149
152
  "@rc-component/tree-select": "~1.19.0",
150
153
  "@rc-component/upload": "~1.1.1",
154
+ "@rc-component/util": "1.14.0",
151
155
  "dayjs": "^1.11.23",
152
156
  "react-compiler-runtime": "^1.0.0",
153
- "react-remove-scroll": "^2.7.2"
157
+ "react-remove-scroll": "^2.7.2",
158
+ "scroll-into-view-if-needed": "3.1.0"
154
159
  }
155
160
  }
@@ -1,49 +0,0 @@
1
- [data-tao-collapsible] {
2
- font-family: var(--tao-font-family);
3
- color: var(--tao-color-text);
4
- }
5
-
6
- [data-tao-collapsible-trigger] {
7
- align-items: center;
8
- gap: var(--tao-padding-xs);
9
- appearance: none;
10
- font: inherit;
11
- color: inherit;
12
- text-align: start;
13
- cursor: pointer;
14
- border-radius: var(--tao-radius-sm);
15
- transition: color var(--tao-motion-duration-fast) var(--tao-motion-ease-out);
16
- background: none;
17
- border: none;
18
- outline: none;
19
- margin: 0;
20
- padding: 0;
21
- display: inline-flex;
22
- }
23
-
24
- [data-tao-collapsible-trigger]:focus-visible {
25
- outline: var(--tao-line-width-focus, 2px) solid var(--tao-color-primary);
26
- outline-offset: 2px;
27
- }
28
-
29
- [data-tao-collapsible-trigger][data-disabled] {
30
- color: var(--tao-color-text-disabled);
31
- cursor: not-allowed;
32
- }
33
-
34
- [data-tao-collapsible-chevron] {
35
- color: var(--tao-color-text-tertiary);
36
- transition: transform var(--tao-motion-duration-fast)
37
- var(--tao-motion-ease-out);
38
- align-items: center;
39
- display: inline-flex;
40
- }
41
-
42
- [data-tao-collapsible-trigger][data-state="open"] [data-tao-collapsible-chevron] {
43
- transform: rotate(180deg);
44
- }
45
-
46
- [data-tao-collapsible-content] {
47
- color: var(--tao-color-text-secondary);
48
- }
49
-
@@ -1,39 +0,0 @@
1
- import { type CSSProperties, type ReactNode } from 'react';
2
- import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
3
- import './collapsible.css';
4
- export type CollapsibleSemanticPart = 'root' | 'trigger' | 'content';
5
- export interface CollapsibleProps {
6
- /** Controlled open state. */
7
- open?: boolean;
8
- /** Uncontrolled initial open state. Defaults to `false`. */
9
- defaultOpen?: boolean;
10
- onOpenChange?: (open: boolean) => void;
11
- /** Disable the trigger. Falls back to TaoProvider's `disabled`. */
12
- disabled?: boolean;
13
- children?: ReactNode;
14
- /** Merged into the root element. */
15
- className?: string;
16
- style?: CSSProperties;
17
- classNames?: SemanticClassNames<CollapsibleSemanticPart>;
18
- styles?: SemanticStyles<CollapsibleSemanticPart>;
19
- }
20
- export interface CollapsibleTriggerProps {
21
- children?: ReactNode;
22
- /** Render the child element as the trigger instead of a default button. */
23
- asChild?: boolean;
24
- className?: string;
25
- style?: CSSProperties;
26
- }
27
- export interface CollapsibleContentProps {
28
- children?: ReactNode;
29
- className?: string;
30
- style?: CSSProperties;
31
- }
32
- export declare function Collapsible(props: CollapsibleProps): import("react").JSX.Element;
33
- export declare namespace Collapsible {
34
- export { CollapsibleTrigger as Trigger };
35
- export { CollapsibleContent as Content };
36
- }
37
- declare function CollapsibleTrigger(props: CollapsibleTriggerProps): import("react").JSX.Element;
38
- declare function CollapsibleContent(props: CollapsibleContentProps): import("react").JSX.Element;
39
- export {};
@@ -1,39 +0,0 @@
1
- const collapsibleDoc = {
2
- name: 'collapsible',
3
- displayName: 'Collapsible',
4
- category: 'Data Display',
5
- description: 'Shows and hides a region of content while keeping disclosure state accessible.',
6
- exports: [
7
- 'Collapsible'
8
- ],
9
- source: 'src/components/collapsible/collapsible.tsx',
10
- story: 'stories/collapsible.stories.tsx',
11
- tests: [
12
- 'tests/collapsible/collapsible.test.tsx'
13
- ],
14
- semanticParts: [
15
- 'root',
16
- 'trigger',
17
- 'content'
18
- ],
19
- keywords: [
20
- 'accordion',
21
- 'disclosure',
22
- 'expand'
23
- ],
24
- related: [
25
- 'Drawer',
26
- 'Tabs'
27
- ],
28
- usage: {
29
- description: 'Use Collapsible to hide secondary details while preserving a lightweight page layout.',
30
- bestPractices: [
31
- 'Make the trigger label describe the hidden content.',
32
- 'Use controlled open state when it must coordinate with other UI.'
33
- ],
34
- avoid: [
35
- 'Do not hide required form inputs in a collapsed region without a clear cue.'
36
- ]
37
- }
38
- };
39
- export { collapsibleDoc };