@rockshin/tao-ui 0.0.21 → 0.0.23
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 +8 -1
- package/component-manifest.json +77 -48
- package/dist/components/button/button.css +11 -11
- package/dist/components/button/button.d.ts +3 -2
- package/dist/components/button/button.js +55 -47
- package/dist/components/checkbox/checkbox.d.ts +3 -2
- package/dist/components/checkbox/checkbox.js +91 -81
- package/dist/components/date-picker/calendar/calendar-grid.d.ts +7 -1
- package/dist/components/date-picker/calendar/calendar-grid.js +158 -160
- package/dist/components/date-picker/calendar/time-panel.js +64 -70
- package/dist/components/date-picker/date-picker.css +11 -5
- package/dist/components/date-picker/date-picker.d.ts +13 -5
- package/dist/components/date-picker/date-picker.js +389 -718
- package/dist/components/date-picker/range-picker.d.ts +12 -5
- package/dist/components/date-picker/range-picker.js +68 -12
- package/dist/components/date-picker/types.d.ts +5 -0
- package/dist/components/drawer/drawer.css +3 -1
- package/dist/components/form-field/form-field.d.ts +1 -1
- package/dist/components/form-field/form-field.js +106 -63
- package/dist/components/input/input.css +13 -0
- package/dist/components/input/input.d.ts +2 -1
- package/dist/components/input/input.js +76 -70
- package/dist/components/input-number/input-number.d.ts +5 -3
- package/dist/components/input-number/input-number.js +63 -47
- package/dist/components/modal/modal.css +2 -1
- package/dist/components/radio/radio.d.ts +3 -2
- package/dist/components/radio/radio.js +43 -39
- package/dist/components/select/mobile-select.d.ts +1 -1
- package/dist/components/select/mobile-select.js +1 -1
- package/dist/components/select/select-icons.d.ts +7 -0
- package/dist/components/select/select-icons.js +141 -0
- package/dist/components/select/select-model.d.ts +4 -0
- package/dist/components/select/select-model.js +22 -0
- package/dist/components/select/select-searchable-list.d.ts +22 -0
- package/dist/components/select/select-searchable-list.js +101 -0
- package/dist/components/select/select-tags.d.ts +15 -0
- package/dist/components/select/select-tags.js +152 -0
- package/dist/components/select/select-types.d.ts +82 -0
- package/dist/components/select/select-types.js +0 -0
- package/dist/components/select/select.css +2 -1
- package/dist/components/select/select.d.ts +2 -118
- package/dist/components/select/select.js +91 -404
- package/dist/components/select/use-is-mobile.js +2 -5
- package/dist/components/sonner/sonner.js +9 -3
- package/dist/components/spinner/spinner.css +1 -1
- package/dist/components/splitter/splitter.js +181 -133
- package/dist/components/switch/switch.css +17 -8
- package/dist/components/switch/switch.d.ts +3 -2
- package/dist/components/switch/switch.js +90 -79
- package/dist/components/table/table-filter.d.ts +6 -0
- package/dist/components/table/table-filter.js +123 -0
- package/dist/components/table/table-icons.d.ts +9 -0
- package/dist/components/table/table-icons.js +157 -0
- package/dist/components/table/table-model.d.ts +11 -0
- package/dist/components/table/table-model.js +33 -0
- package/dist/components/table/table-types.d.ts +87 -0
- package/dist/components/table/table-types.js +0 -0
- package/dist/components/table/table.css +14 -15
- package/dist/components/table/table.d.ts +3 -101
- package/dist/components/table/table.js +29 -329
- package/dist/components/tabs/tabs.css +5 -2
- package/dist/components/tabs/tabs.js +71 -62
- package/dist/components/textarea/textarea.d.ts +5 -3
- package/dist/components/textarea/textarea.js +102 -85
- package/dist/docs/component-docs.d.ts +1 -0
- package/dist/docs/components/breadcrumb.doc.js +3 -1
- package/dist/docs/components/checkbox.doc.js +2 -5
- package/dist/docs/components/context-menu.doc.js +7 -2
- package/dist/docs/components/drawer.doc.js +4 -2
- package/dist/docs/components/dropdown.doc.js +7 -3
- package/dist/docs/components/form-field.doc.js +0 -1
- package/dist/docs/components/form-layout.doc.d.ts +1 -0
- package/dist/docs/components/form-layout.doc.js +3 -0
- package/dist/docs/components/form-section.doc.js +1 -1
- package/dist/docs/components/input-number.doc.js +2 -3
- package/dist/docs/components/input.doc.js +1 -2
- package/dist/docs/components/modal.doc.js +1 -1
- package/dist/docs/components/pagination.doc.js +1 -3
- package/dist/docs/components/radio.doc.js +1 -4
- package/dist/docs/components/range-picker.doc.js +2 -2
- package/dist/docs/components/select.doc.js +19 -6
- package/dist/docs/components/spinner.doc.js +4 -1
- package/dist/docs/components/splitter.doc.js +1 -1
- package/dist/docs/components/stack.doc.d.ts +1 -0
- package/dist/docs/components/stack.doc.js +3 -0
- package/dist/docs/components/switch.doc.js +1 -2
- package/dist/docs/components/table.doc.js +9 -4
- package/dist/docs/components/tabs.doc.js +2 -1
- package/dist/docs/components/tag.doc.js +1 -0
- package/dist/docs/components/tao-provider.doc.js +1 -2
- package/dist/index.d.ts +7 -9
- package/dist/index.js +4 -5
- package/dist/layouts/form-layout/form-layout.d.ts +8 -2
- package/dist/layouts/form-layout/form-layout.js +33 -9
- package/dist/layouts/stack/stack.d.ts +8 -2
- package/dist/layouts/stack/stack.js +36 -12
- package/dist/provider/tao-provider.d.ts +3 -9
- package/dist/provider/tao-provider.js +99 -33
- package/dist/theme/theme.css +24 -14
- package/dist/theme/tokens.d.ts +2 -2
- package/dist/theme/tokens.js +4 -1
- package/dist/utils/refs.d.ts +2 -0
- package/dist/utils/refs.js +7 -0
- package/llms.txt +26 -24
- package/package.json +16 -4
package/dist/theme/theme.css
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
--tao-control-width: 200px;
|
|
15
15
|
--tao-control-range-width: 360px;
|
|
16
16
|
--tao-size-unit: 4px;
|
|
17
|
+
--tao-size-step: 4;
|
|
17
18
|
--tao-line-width: 1px;
|
|
18
19
|
--tao-ring-width: 3px;
|
|
19
20
|
--tao-font-family: "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
@@ -22,9 +23,8 @@
|
|
|
22
23
|
--tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
|
|
23
24
|
"Liberation Mono", monospace;
|
|
24
25
|
--tao-motion-unit: .1s;
|
|
25
|
-
--tao-z-index-
|
|
26
|
-
--tao-z-index-
|
|
27
|
-
--tao-z-index-popup: 1100;
|
|
26
|
+
--tao-z-index-base: 0;
|
|
27
|
+
--tao-z-index-popup-base: 1000;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
:root, [data-tao-provider], [data-tao-theme] {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
var(--tao-color-text-base) 65%,
|
|
75
75
|
var(--tao-color-bg-base));
|
|
76
76
|
--tao-color-text-tertiary: color-mix(in oklch,
|
|
77
|
-
var(--tao-color-text-base)
|
|
77
|
+
var(--tao-color-text-base) 55%,
|
|
78
78
|
var(--tao-color-bg-base));
|
|
79
79
|
--tao-color-text-quaternary: color-mix(in oklch,
|
|
80
80
|
var(--tao-color-text-base) 30%,
|
|
@@ -113,11 +113,11 @@
|
|
|
113
113
|
--tao-radius-full: 9999px;
|
|
114
114
|
--tao-control-height-sm: calc(var(--tao-control-height) - 4px);
|
|
115
115
|
--tao-control-height-lg: calc(var(--tao-control-height) + 4px);
|
|
116
|
-
--tao-font-size-xs:
|
|
117
|
-
--tao-font-size-sm:
|
|
116
|
+
--tao-font-size-xs: calc(var(--tao-font-size) - 2px);
|
|
117
|
+
--tao-font-size-sm: calc(var(--tao-font-size) - 1px);
|
|
118
118
|
--tao-font-size-base: var(--tao-font-size);
|
|
119
|
-
--tao-font-size-lg:
|
|
120
|
-
--tao-font-size-xl:
|
|
119
|
+
--tao-font-size-lg: calc(var(--tao-font-size) + 2px);
|
|
120
|
+
--tao-font-size-xl: calc(var(--tao-font-size) + 6px);
|
|
121
121
|
--tao-font-weight-normal: 400;
|
|
122
122
|
--tao-font-weight-medium: 500;
|
|
123
123
|
--tao-font-weight-strong: 600;
|
|
@@ -125,15 +125,19 @@
|
|
|
125
125
|
--tao-line-height-sm: 1.6667;
|
|
126
126
|
--tao-line-height-lg: 1.5;
|
|
127
127
|
--tao-padding-xxs: 2px;
|
|
128
|
-
--tao-padding-xs: calc(var(--tao-size-unit) * 2);
|
|
129
|
-
--tao-padding-sm: calc(var(--tao-size-unit) *
|
|
130
|
-
--tao-padding: calc(var(--tao-size-unit) *
|
|
131
|
-
--tao-padding-md: calc(var(--tao-size-unit) *
|
|
132
|
-
--tao-padding-lg: calc(var(--tao-size-unit) *
|
|
133
|
-
--tao-padding-xl: calc(var(--tao-size-unit) *
|
|
128
|
+
--tao-padding-xs: calc(var(--tao-size-unit) * (var(--tao-size-step) - 2));
|
|
129
|
+
--tao-padding-sm: calc(var(--tao-size-unit) * (var(--tao-size-step) - 1));
|
|
130
|
+
--tao-padding: calc(var(--tao-size-unit) * var(--tao-size-step));
|
|
131
|
+
--tao-padding-md: calc(var(--tao-size-unit) * (var(--tao-size-step) + 1));
|
|
132
|
+
--tao-padding-lg: calc(var(--tao-size-unit) * (var(--tao-size-step) + 2));
|
|
133
|
+
--tao-padding-xl: calc(var(--tao-size-unit) * (var(--tao-size-step) + 4));
|
|
134
134
|
--tao-motion-duration-fast: calc(var(--tao-motion-unit) * 1);
|
|
135
135
|
--tao-motion-duration-mid: calc(var(--tao-motion-unit) * 2);
|
|
136
136
|
--tao-motion-duration-slow: calc(var(--tao-motion-unit) * 3);
|
|
137
|
+
--tao-z-index-drawer: calc(var(--tao-z-index-base) +
|
|
138
|
+
var(--tao-z-index-popup-base));
|
|
139
|
+
--tao-z-index-modal: var(--tao-z-index-drawer);
|
|
140
|
+
--tao-z-index-popup: calc(var(--tao-z-index-drawer) + 100);
|
|
137
141
|
--tao-motion-ease-out: cubic-bezier(.215, .61, .355, 1);
|
|
138
142
|
--tao-motion-ease-in-out: cubic-bezier(.645, .045, .355, 1);
|
|
139
143
|
--tao-motion-ease-out-quint: cubic-bezier(.23, 1, .32, 1);
|
|
@@ -190,3 +194,9 @@
|
|
|
190
194
|
}
|
|
191
195
|
}
|
|
192
196
|
|
|
197
|
+
@media (prefers-reduced-motion: reduce) {
|
|
198
|
+
:root, [data-tao-provider], [data-tao-theme] {
|
|
199
|
+
--tao-motion-unit: 0s !important;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
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-disabled' | '--tao-color-bg-elevated' | '--tao-color-bg-layout' | '--tao-color-bg-mask' | '--tao-color-bg-surface' | '--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-success' | '--tao-color-text' | '--tao-color-text-base' | '--tao-color-text-disabled' | '--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-hover' | '--tao-control-outline' | '--tao-control-range-width' | '--tao-control-width' | '--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-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-unit' | '--tao-success' | '--tao-success-bg' | '--tao-success-border' | '--tao-warning' | '--tao-warning-bg' | '--tao-warning-border' | '--tao-z-index-drawer' | '--tao-z-index-modal' | '--tao-z-index-popup';
|
|
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-disabled' | '--tao-color-bg-elevated' | '--tao-color-bg-layout' | '--tao-color-bg-mask' | '--tao-color-bg-surface' | '--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-success' | '--tao-color-text' | '--tao-color-text-base' | '--tao-color-text-disabled' | '--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-hover' | '--tao-control-outline' | '--tao-control-range-width' | '--tao-control-width' | '--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-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-step' | '--tao-size-unit' | '--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-disabled", "--tao-color-bg-elevated", "--tao-color-bg-layout", "--tao-color-bg-mask", "--tao-color-bg-surface", "--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-success", "--tao-color-text", "--tao-color-text-base", "--tao-color-text-disabled", "--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-hover", "--tao-control-outline", "--tao-control-range-width", "--tao-control-width", "--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-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-unit", "--tao-success", "--tao-success-bg", "--tao-success-border", "--tao-warning", "--tao-warning-bg", "--tao-warning-border", "--tao-z-index-drawer", "--tao-z-index-modal", "--tao-z-index-popup"];
|
|
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-disabled", "--tao-color-bg-elevated", "--tao-color-bg-layout", "--tao-color-bg-mask", "--tao-color-bg-surface", "--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-success", "--tao-color-text", "--tao-color-text-base", "--tao-color-text-disabled", "--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-hover", "--tao-control-outline", "--tao-control-range-width", "--tao-control-width", "--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-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-step", "--tao-size-unit", "--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
|
@@ -95,6 +95,7 @@ const taoTokenNames = [
|
|
|
95
95
|
'--tao-radius-xl',
|
|
96
96
|
'--tao-radius-xs',
|
|
97
97
|
'--tao-ring-width',
|
|
98
|
+
'--tao-size-step',
|
|
98
99
|
'--tao-size-unit',
|
|
99
100
|
'--tao-success',
|
|
100
101
|
'--tao-success-bg',
|
|
@@ -102,9 +103,11 @@ const taoTokenNames = [
|
|
|
102
103
|
'--tao-warning',
|
|
103
104
|
'--tao-warning-bg',
|
|
104
105
|
'--tao-warning-border',
|
|
106
|
+
'--tao-z-index-base',
|
|
105
107
|
'--tao-z-index-drawer',
|
|
106
108
|
'--tao-z-index-modal',
|
|
107
|
-
'--tao-z-index-popup'
|
|
109
|
+
'--tao-z-index-popup',
|
|
110
|
+
'--tao-z-index-popup-base'
|
|
108
111
|
];
|
|
109
112
|
const taoTokenVars = Object.fromEntries(taoTokenNames.map((name)=>[
|
|
110
113
|
name,
|
package/llms.txt
CHANGED
|
@@ -15,8 +15,8 @@ Import from the package root. The package entry imports tao-ui CSS side effects
|
|
|
15
15
|
|
|
16
16
|
- `TaoProvider` supplies size, disabled, variant, portal scope, and theme seed token defaults.
|
|
17
17
|
- Components expose semantic DOM customization through `classNames` and `styles` props.
|
|
18
|
-
- Theme tokens are CSS custom properties prefixed with `--tao-*`;
|
|
19
|
-
- `componentDocs` and `getComponentDoc(name)`
|
|
18
|
+
- Theme tokens are CSS custom properties prefixed with `--tao-*`; import `tokenVar(name)` and `taoTokenNames` from `@rockshin/tao-ui/tokens`.
|
|
19
|
+
- Import `componentDocs` and `getComponentDoc(name)` from `@rockshin/tao-ui/meta` for machine-readable component metadata.
|
|
20
20
|
|
|
21
21
|
## Component Groups
|
|
22
22
|
|
|
@@ -40,7 +40,7 @@ Renders the user location in a hierarchy of pages or views.
|
|
|
40
40
|
- Source: `src/components/breadcrumb/breadcrumb.tsx`
|
|
41
41
|
- Storybook: `stories/breadcrumb.stories.tsx`
|
|
42
42
|
- Tests: `tests/breadcrumb/breadcrumb.test.tsx`
|
|
43
|
-
- Semantic parts: `root`, `list`, `item`, `link`, `separator`
|
|
43
|
+
- Semantic parts: `root`, `list`, `item`, `link`, `page`, `separator`, `ellipsis`
|
|
44
44
|
|
|
45
45
|
Use Breadcrumb near the top of a page when users need to understand or move through nested context.
|
|
46
46
|
|
|
@@ -66,7 +66,7 @@ Selects one or more independent boolean options.
|
|
|
66
66
|
- Source: `src/components/checkbox/checkbox.tsx`
|
|
67
67
|
- Storybook: `stories/checkbox.stories.tsx`
|
|
68
68
|
- Tests: `tests/checkbox/checkbox.test.tsx`
|
|
69
|
-
- Semantic parts: `root`, `
|
|
69
|
+
- Semantic parts: `root`, `indicator`, `label`
|
|
70
70
|
|
|
71
71
|
Use Checkbox for independent choices, or CheckboxGroup when users can select multiple options from a set.
|
|
72
72
|
|
|
@@ -92,7 +92,7 @@ Displays contextual actions from a right click or long press interaction.
|
|
|
92
92
|
- Source: `src/components/context-menu/context-menu.tsx`
|
|
93
93
|
- Storybook: `stories/context-menu.stories.tsx`
|
|
94
94
|
- Tests: `tests/context-menu/context-menu.test.tsx`
|
|
95
|
-
- Semantic parts: `root`, `
|
|
95
|
+
- Semantic parts: `root`, `content`, `item`, `itemIcon`, `itemLabel`, `itemExtra`, `divider`, `groupLabel`, `subTrigger`, `subContent`
|
|
96
96
|
|
|
97
97
|
Use ContextMenu for secondary actions attached to an object or region.
|
|
98
98
|
|
|
@@ -118,7 +118,7 @@ Opens a side panel for related tasks without leaving the current page.
|
|
|
118
118
|
- Source: `src/components/drawer/drawer.tsx`
|
|
119
119
|
- Storybook: `stories/drawer.stories.tsx`
|
|
120
120
|
- Tests: `tests/drawer/drawer.test.tsx`
|
|
121
|
-
- Semantic parts: `root`, `overlay`, `
|
|
121
|
+
- Semantic parts: `root`, `overlay`, `header`, `title`, `extra`, `body`, `footer`, `close`, `dragger`
|
|
122
122
|
|
|
123
123
|
Use Drawer for inspection, editing, or supporting workflows that should stay connected to the current page.
|
|
124
124
|
|
|
@@ -131,7 +131,7 @@ Opens a menu of actions or navigation choices from a trigger.
|
|
|
131
131
|
- Source: `src/components/dropdown/dropdown.tsx`
|
|
132
132
|
- Storybook: `stories/dropdown.stories.tsx`
|
|
133
133
|
- Tests: `tests/dropdown/dropdown.test.tsx`
|
|
134
|
-
- Semantic parts: `root`, `
|
|
134
|
+
- Semantic parts: `root`, `content`, `item`, `itemIcon`, `itemLabel`, `itemExtra`, `divider`, `groupLabel`, `subTrigger`, `subContent`
|
|
135
135
|
|
|
136
136
|
Use Dropdown for compact action sets that do not need to stay visible.
|
|
137
137
|
|
|
@@ -157,7 +157,7 @@ Associates labels, help text, validation state, and controls.
|
|
|
157
157
|
- Source: `src/components/form-field/form-field.tsx`
|
|
158
158
|
- Storybook: `stories/form.stories.tsx`
|
|
159
159
|
- Tests: `tests/form-field/form-field.test.tsx`
|
|
160
|
-
- Semantic parts: `root`, `label`, `
|
|
160
|
+
- Semantic parts: `root`, `label`, `description`, `error`
|
|
161
161
|
|
|
162
162
|
Use FormField to provide accessible labeling and status text around a single control.
|
|
163
163
|
|
|
@@ -170,6 +170,7 @@ Arranges form content with consistent label and control alignment.
|
|
|
170
170
|
- Source: `src/layouts/form-layout/form-layout.tsx`
|
|
171
171
|
- Storybook: `stories/form-layout.stories.tsx`
|
|
172
172
|
- Tests: `tests/layouts/form-layout/form-layout.test.tsx`
|
|
173
|
+
- Semantic parts: `root`
|
|
173
174
|
|
|
174
175
|
Use FormLayout to keep dense forms aligned and predictable.
|
|
175
176
|
|
|
@@ -182,7 +183,7 @@ Groups related form fields with a title and optional description.
|
|
|
182
183
|
- Source: `src/components/form-section/form-section.tsx`
|
|
183
184
|
- Storybook: `stories/form.stories.tsx`
|
|
184
185
|
- Tests: `tests/form-section/form-section.test.tsx`
|
|
185
|
-
- Semantic parts: `root`, `header`, `title`, `description`, `
|
|
186
|
+
- Semantic parts: `root`, `header`, `title`, `description`, `body`
|
|
186
187
|
|
|
187
188
|
Use FormSection to break long forms into scannable groups.
|
|
188
189
|
|
|
@@ -207,7 +208,7 @@ Single-line text input for short freeform values.
|
|
|
207
208
|
- Source: `src/components/input/input.tsx`
|
|
208
209
|
- Storybook: `stories/input.stories.tsx`
|
|
209
210
|
- Tests: `tests/input/input.test.tsx`
|
|
210
|
-
- Semantic parts: `root`, `input`, `prefix`, `suffix
|
|
211
|
+
- Semantic parts: `root`, `input`, `prefix`, `suffix`
|
|
211
212
|
|
|
212
213
|
Use Input for short text values such as names, filters, search terms, and identifiers.
|
|
213
214
|
|
|
@@ -220,7 +221,7 @@ A styled numeric input built on tao-ui number formatting and validation behavior
|
|
|
220
221
|
- Source: `src/components/input-number/input-number.tsx`
|
|
221
222
|
- Storybook: `stories/input-number.stories.tsx`
|
|
222
223
|
- Tests: `tests/input-number/input-number.test.tsx`
|
|
223
|
-
- Semantic parts: `root`, `input`, `
|
|
224
|
+
- Semantic parts: `root`, `input`, `prefix`, `suffix`
|
|
224
225
|
|
|
225
226
|
Use InputNumber for numeric values that need min, max, step, precision, or formatted display.
|
|
226
227
|
|
|
@@ -233,7 +234,7 @@ Displays a focused dialog for decisions, forms, and interruptive information.
|
|
|
233
234
|
- Source: `src/components/modal/modal.tsx`
|
|
234
235
|
- Storybook: `stories/modal.stories.tsx`
|
|
235
236
|
- Tests: `tests/modal/modal.test.tsx`
|
|
236
|
-
- Semantic parts: `root`, `overlay`, `
|
|
237
|
+
- Semantic parts: `root`, `overlay`, `header`, `title`, `body`, `footer`, `close`
|
|
237
238
|
|
|
238
239
|
Use Modal for focused tasks or decisions. Static helpers such as Modal.confirm mirror common confirmation flows.
|
|
239
240
|
|
|
@@ -246,7 +247,7 @@ Moves through paged data with current page and page-size controls.
|
|
|
246
247
|
- Source: `src/components/pagination/pagination.tsx`
|
|
247
248
|
- Storybook: `stories/pagination.stories.tsx`
|
|
248
249
|
- Tests: `tests/pagination/pagination.test.tsx`
|
|
249
|
-
- Semantic parts: `root`, `item`, `
|
|
250
|
+
- Semantic parts: `root`, `item`, `total`
|
|
250
251
|
|
|
251
252
|
Use Pagination when a collection is split into pages rather than infinitely loaded.
|
|
252
253
|
|
|
@@ -259,7 +260,7 @@ Selects exactly one option from a mutually exclusive set.
|
|
|
259
260
|
- Source: `src/components/radio/radio.tsx`
|
|
260
261
|
- Storybook: `stories/radio.stories.tsx`
|
|
261
262
|
- Tests: `tests/radio/radio.test.tsx`
|
|
262
|
-
- Semantic parts: `root`, `
|
|
263
|
+
- Semantic parts: `root`, `indicator`, `label`
|
|
263
264
|
|
|
264
265
|
Use RadioGroup when every option is visible and only one can be selected.
|
|
265
266
|
|
|
@@ -272,7 +273,7 @@ Lets users select a start and end date as one range value.
|
|
|
272
273
|
- Source: `src/components/date-picker/range-picker.tsx`
|
|
273
274
|
- Storybook: `stories/date-picker.stories.tsx`
|
|
274
275
|
- Tests: `tests/date-picker/range-picker.test.tsx`, `tests/date-picker/use-calendar.test.ts`
|
|
275
|
-
- Semantic parts: `root`, `input`, `popup`, `calendar`, `cell
|
|
276
|
+
- Semantic parts: `root`, `input`, `separator`, `popup`, `calendar`, `cell`
|
|
276
277
|
|
|
277
278
|
Use RangePicker for reporting windows, booking windows, and filters with start/end dates.
|
|
278
279
|
|
|
@@ -294,11 +295,11 @@ Use ScrollArea when a fixed region needs overflow behavior without changing page
|
|
|
294
295
|
Chooses one value from a compact list of options.
|
|
295
296
|
|
|
296
297
|
- Category: Data Entry
|
|
297
|
-
- Exports: `Select
|
|
298
|
+
- Exports: `Select`
|
|
298
299
|
- Source: `src/components/select/select.tsx`
|
|
299
300
|
- Storybook: `stories/select.stories.tsx`
|
|
300
301
|
- Tests: `tests/select/select.test.tsx`
|
|
301
|
-
- Semantic parts: `root`, `
|
|
302
|
+
- Semantic parts: `root`, `prefix`, `suffix`, `placeholder`, `clear`, `popup`, `search`, `searchInput`, `group`, `groupLabel`, `item`, `itemIcon`, `itemLabel`, `itemDesc`, `empty`, `tag`, `tagLabel`, `tagClose`, `tagRest`, `values`
|
|
302
303
|
|
|
303
304
|
Use Select when choices are known but too numerous or secondary to show as radios.
|
|
304
305
|
|
|
@@ -324,7 +325,7 @@ Indicates indeterminate loading activity.
|
|
|
324
325
|
- Source: `src/components/spinner/spinner.tsx`
|
|
325
326
|
- Storybook: `stories/spinner.stories.tsx`
|
|
326
327
|
- Tests: `tests/spinner/spinner.test.tsx`
|
|
327
|
-
- Semantic parts: `root`
|
|
328
|
+
- Semantic parts: `root`, `indicator`, `tip`, `overlay`
|
|
328
329
|
|
|
329
330
|
Use Spinner for short indeterminate waits when progress cannot be measured.
|
|
330
331
|
|
|
@@ -337,7 +338,7 @@ Creates resizable panes separated by draggable handles.
|
|
|
337
338
|
- Source: `src/components/splitter/splitter.tsx`
|
|
338
339
|
- Storybook: `stories/splitter.stories.tsx`
|
|
339
340
|
- Tests: `tests/splitter/splitter.test.tsx`
|
|
340
|
-
- Semantic parts: `root`, `panel`, `
|
|
341
|
+
- Semantic parts: `root`, `panel`, `dragger`
|
|
341
342
|
|
|
342
343
|
Use Splitter for work surfaces where users need to allocate space between adjacent panes.
|
|
343
344
|
|
|
@@ -350,6 +351,7 @@ Composes children in a flex row or column with consistent spacing.
|
|
|
350
351
|
- Source: `src/layouts/stack/stack.tsx`
|
|
351
352
|
- Storybook: `stories/stack.stories.tsx`
|
|
352
353
|
- Tests: `tests/layouts/stack/stack.test.tsx`
|
|
354
|
+
- Semantic parts: `root`
|
|
353
355
|
|
|
354
356
|
Use Stack for simple one-dimensional layout and spacing.
|
|
355
357
|
|
|
@@ -362,7 +364,7 @@ Toggles a setting on or off with immediate effect.
|
|
|
362
364
|
- Source: `src/components/switch/switch.tsx`
|
|
363
365
|
- Storybook: `stories/switch.stories.tsx`
|
|
364
366
|
- Tests: `tests/switch/switch.test.tsx`
|
|
365
|
-
- Semantic parts: `root`, `
|
|
367
|
+
- Semantic parts: `root`, `handle`
|
|
366
368
|
|
|
367
369
|
Use Switch for settings that take effect immediately.
|
|
368
370
|
|
|
@@ -375,7 +377,7 @@ Displays structured row and column data with selection, sorting, filtering, and
|
|
|
375
377
|
- Source: `src/components/table/table.tsx`
|
|
376
378
|
- Storybook: `stories/table.stories.tsx`
|
|
377
379
|
- Tests: `tests/table/table.test.tsx`
|
|
378
|
-
- Semantic parts: `root`, `table`, `header`, `header.cell`, `
|
|
380
|
+
- Semantic parts: `root`, `scroll`, `table`, `header.wrapper`, `header.row`, `header.cell`, `header.content`, `header.title`, `body.row`, `body.cell`, `selection.cell`, `empty`, `pagination`
|
|
379
381
|
|
|
380
382
|
Use Table for dense, comparable records that benefit from aligned columns.
|
|
381
383
|
|
|
@@ -388,7 +390,7 @@ Switches between peer panels within the same page context.
|
|
|
388
390
|
- Source: `src/components/tabs/tabs.tsx`
|
|
389
391
|
- Storybook: `stories/tabs.stories.tsx`
|
|
390
392
|
- Tests: `tests/tabs/tabs.test.tsx`
|
|
391
|
-
- Semantic parts: `root`, `
|
|
393
|
+
- Semantic parts: `root`, `nav`, `tab`, `indicator`, `panel`
|
|
392
394
|
|
|
393
395
|
Use Tabs to separate peer views without navigating away from the current task.
|
|
394
396
|
|
|
@@ -401,7 +403,7 @@ Displays compact labels, statuses, categories, or checkable chips.
|
|
|
401
403
|
- Source: `src/components/tag/tag.tsx`
|
|
402
404
|
- Storybook: `stories/tag.stories.tsx`
|
|
403
405
|
- Tests: `tests/tag/tag.test.tsx`
|
|
404
|
-
- Semantic parts: `root`, `icon`, `close`
|
|
406
|
+
- Semantic parts: `root`, `icon`, `content`, `close`
|
|
405
407
|
|
|
406
408
|
Use Tag for lightweight metadata or status markers. Use CheckableTag for compact filter choices.
|
|
407
409
|
|
|
@@ -410,7 +412,7 @@ Use Tag for lightweight metadata or status markers. Use CheckableTag for compact
|
|
|
410
412
|
Provides global component defaults, portal scoping, and theme seed token overrides.
|
|
411
413
|
|
|
412
414
|
- Category: Config
|
|
413
|
-
- Exports: `TaoProvider
|
|
415
|
+
- Exports: `TaoProvider`
|
|
414
416
|
- Source: `src/provider/tao-provider.tsx`
|
|
415
417
|
- Storybook: `stories/provider.stories.tsx`
|
|
416
418
|
- Tests: `tests/provider/tao-provider.test.tsx`
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rockshin/tao-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
|
+
"packageManager": "bun@1.3.14",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"description": "A modern React 19 component library with semantic DOM customization and OKLCH-based theming.",
|
|
6
7
|
"keywords": [
|
|
@@ -29,6 +30,14 @@
|
|
|
29
30
|
".": {
|
|
30
31
|
"types": "./dist/index.d.ts",
|
|
31
32
|
"import": "./dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./meta": {
|
|
35
|
+
"types": "./dist/docs/index.d.ts",
|
|
36
|
+
"import": "./dist/docs/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./tokens": {
|
|
39
|
+
"types": "./dist/theme/tokens.d.ts",
|
|
40
|
+
"import": "./dist/theme/tokens.js"
|
|
32
41
|
}
|
|
33
42
|
},
|
|
34
43
|
"types": "./dist/index.d.ts",
|
|
@@ -47,11 +56,15 @@
|
|
|
47
56
|
"doc:build": "rspress build",
|
|
48
57
|
"doc:preview": "rspress preview",
|
|
49
58
|
"docs:generate": "node scripts/generate-component-manifest.mjs",
|
|
59
|
+
"docs:check": "node scripts/generate-component-manifest.mjs --check",
|
|
50
60
|
"format": "biome format --write",
|
|
61
|
+
"lint": "biome lint --error-on-warnings src tests stories scripts",
|
|
51
62
|
"release": "bun scripts/release.mjs",
|
|
52
63
|
"storybook": "storybook dev",
|
|
53
64
|
"test": "rstest",
|
|
54
|
-
"test:
|
|
65
|
+
"test:types": "tsc --noEmit --project tsconfig.type-tests.json",
|
|
66
|
+
"test:watch": "rstest --watch",
|
|
67
|
+
"typecheck": "tsc --noEmit --project tsconfig.json"
|
|
55
68
|
},
|
|
56
69
|
"devDependencies": {
|
|
57
70
|
"@biomejs/biome": "2.4.14",
|
|
@@ -71,6 +84,7 @@
|
|
|
71
84
|
"@storybook/react": "^10.5.3",
|
|
72
85
|
"@testing-library/jest-dom": "^6.9.1",
|
|
73
86
|
"@testing-library/react": "^16.3.2",
|
|
87
|
+
"@testing-library/user-event": "^14.6.1",
|
|
74
88
|
"@types/node": "^24.12.4",
|
|
75
89
|
"@types/react": "^19.2.14",
|
|
76
90
|
"@types/react-dom": "^19",
|
|
@@ -85,7 +99,6 @@
|
|
|
85
99
|
"typescript": "^6.0.3"
|
|
86
100
|
},
|
|
87
101
|
"peerDependencies": {
|
|
88
|
-
"dayjs": ">=1.11.0",
|
|
89
102
|
"react": ">=19.0.0",
|
|
90
103
|
"react-dom": ">=19.0.0"
|
|
91
104
|
},
|
|
@@ -101,7 +114,6 @@
|
|
|
101
114
|
"@radix-ui/react-popover": "^1.1.15",
|
|
102
115
|
"@radix-ui/react-select": "^2.2.6",
|
|
103
116
|
"@radix-ui/react-slot": "^1.2.3",
|
|
104
|
-
"@tanstack/react-virtual": "^3.14.2",
|
|
105
117
|
"dayjs": "^1.11.21"
|
|
106
118
|
}
|
|
107
119
|
}
|