@rockshin/tao-ui 0.0.20 → 0.0.22

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 (109) hide show
  1. package/README.md +8 -1
  2. package/component-manifest.json +77 -48
  3. package/dist/components/button/button.css +11 -11
  4. package/dist/components/button/button.d.ts +3 -2
  5. package/dist/components/button/button.js +55 -47
  6. package/dist/components/checkbox/checkbox.d.ts +3 -2
  7. package/dist/components/checkbox/checkbox.js +91 -81
  8. package/dist/components/date-picker/calendar/calendar-grid.d.ts +7 -1
  9. package/dist/components/date-picker/calendar/calendar-grid.js +158 -160
  10. package/dist/components/date-picker/calendar/time-panel.js +64 -70
  11. package/dist/components/date-picker/date-picker.css +11 -5
  12. package/dist/components/date-picker/date-picker.d.ts +13 -5
  13. package/dist/components/date-picker/date-picker.js +389 -718
  14. package/dist/components/date-picker/range-picker.d.ts +12 -5
  15. package/dist/components/date-picker/range-picker.js +68 -12
  16. package/dist/components/date-picker/types.d.ts +5 -0
  17. package/dist/components/drawer/drawer.css +3 -1
  18. package/dist/components/drawer/drawer.js +119 -133
  19. package/dist/components/form-field/form-field.d.ts +1 -1
  20. package/dist/components/form-field/form-field.js +106 -63
  21. package/dist/components/input/input.css +30 -9
  22. package/dist/components/input/input.d.ts +2 -1
  23. package/dist/components/input/input.js +76 -70
  24. package/dist/components/input-number/input-number.d.ts +5 -3
  25. package/dist/components/input-number/input-number.js +63 -47
  26. package/dist/components/modal/modal.css +2 -1
  27. package/dist/components/modal/modal.js +116 -130
  28. package/dist/components/radio/radio.d.ts +3 -2
  29. package/dist/components/radio/radio.js +43 -39
  30. package/dist/components/select/mobile-select.d.ts +1 -1
  31. package/dist/components/select/mobile-select.js +1 -1
  32. package/dist/components/select/select-icons.d.ts +7 -0
  33. package/dist/components/select/select-icons.js +141 -0
  34. package/dist/components/select/select-model.d.ts +4 -0
  35. package/dist/components/select/select-model.js +22 -0
  36. package/dist/components/select/select-searchable-list.d.ts +22 -0
  37. package/dist/components/select/select-searchable-list.js +101 -0
  38. package/dist/components/select/select-tags.d.ts +15 -0
  39. package/dist/components/select/select-tags.js +152 -0
  40. package/dist/components/select/select-types.d.ts +82 -0
  41. package/dist/components/select/select-types.js +0 -0
  42. package/dist/components/select/select.css +2 -1
  43. package/dist/components/select/select.d.ts +2 -118
  44. package/dist/components/select/select.js +91 -404
  45. package/dist/components/select/use-is-mobile.js +2 -5
  46. package/dist/components/sonner/sonner.js +9 -3
  47. package/dist/components/spinner/spinner.css +1 -1
  48. package/dist/components/splitter/splitter.js +181 -133
  49. package/dist/components/switch/switch.css +17 -8
  50. package/dist/components/switch/switch.d.ts +3 -2
  51. package/dist/components/switch/switch.js +90 -79
  52. package/dist/components/table/table-filter.d.ts +6 -0
  53. package/dist/components/table/table-filter.js +123 -0
  54. package/dist/components/table/table-icons.d.ts +9 -0
  55. package/dist/components/table/table-icons.js +157 -0
  56. package/dist/components/table/table-model.d.ts +11 -0
  57. package/dist/components/table/table-model.js +33 -0
  58. package/dist/components/table/table-types.d.ts +87 -0
  59. package/dist/components/table/table-types.js +0 -0
  60. package/dist/components/table/table.css +14 -15
  61. package/dist/components/table/table.d.ts +3 -101
  62. package/dist/components/table/table.js +29 -329
  63. package/dist/components/tabs/tabs.css +5 -2
  64. package/dist/components/tabs/tabs.js +71 -62
  65. package/dist/components/textarea/textarea.d.ts +5 -3
  66. package/dist/components/textarea/textarea.js +102 -85
  67. package/dist/docs/component-docs.d.ts +1 -0
  68. package/dist/docs/components/breadcrumb.doc.js +3 -1
  69. package/dist/docs/components/checkbox.doc.js +2 -5
  70. package/dist/docs/components/context-menu.doc.js +7 -2
  71. package/dist/docs/components/drawer.doc.js +4 -2
  72. package/dist/docs/components/dropdown.doc.js +7 -3
  73. package/dist/docs/components/form-field.doc.js +0 -1
  74. package/dist/docs/components/form-layout.doc.d.ts +1 -0
  75. package/dist/docs/components/form-layout.doc.js +3 -0
  76. package/dist/docs/components/form-section.doc.js +1 -1
  77. package/dist/docs/components/input-number.doc.js +2 -3
  78. package/dist/docs/components/input.doc.js +1 -2
  79. package/dist/docs/components/modal.doc.js +1 -1
  80. package/dist/docs/components/pagination.doc.js +1 -3
  81. package/dist/docs/components/radio.doc.js +1 -4
  82. package/dist/docs/components/range-picker.doc.js +2 -2
  83. package/dist/docs/components/select.doc.js +19 -6
  84. package/dist/docs/components/spinner.doc.js +4 -1
  85. package/dist/docs/components/splitter.doc.js +1 -1
  86. package/dist/docs/components/stack.doc.d.ts +1 -0
  87. package/dist/docs/components/stack.doc.js +3 -0
  88. package/dist/docs/components/switch.doc.js +1 -2
  89. package/dist/docs/components/table.doc.js +9 -4
  90. package/dist/docs/components/tabs.doc.js +2 -1
  91. package/dist/docs/components/tag.doc.js +1 -0
  92. package/dist/docs/components/tao-provider.doc.js +1 -2
  93. package/dist/index.d.ts +7 -9
  94. package/dist/index.js +4 -5
  95. package/dist/layouts/form-layout/form-layout.d.ts +8 -2
  96. package/dist/layouts/form-layout/form-layout.js +33 -9
  97. package/dist/layouts/stack/stack.d.ts +8 -2
  98. package/dist/layouts/stack/stack.js +36 -12
  99. package/dist/provider/tao-provider.d.ts +3 -9
  100. package/dist/provider/tao-provider.js +99 -33
  101. package/dist/theme/theme.css +24 -14
  102. package/dist/theme/tokens.d.ts +2 -2
  103. package/dist/theme/tokens.js +4 -1
  104. package/dist/utils/portal.d.ts +4 -0
  105. package/dist/utils/portal.js +4 -0
  106. package/dist/utils/refs.d.ts +2 -0
  107. package/dist/utils/refs.js +7 -0
  108. package/llms.txt +26 -24
  109. package/package.json +16 -4
package/README.md CHANGED
@@ -5,7 +5,7 @@ A modern React 19 component library with semantic DOM customization and OKLCH-ba
5
5
  ## Features
6
6
 
7
7
  - **React 19** — built for the latest React, ships with the React Compiler.
8
- - **Semantic DOM** — every component exposes `classNames` / `styles` props to style internal parts by semantic name, no fragile selector hacks.
8
+ - **Semantic DOM** — every visual component exposes `classNames` / `styles` props to style internal parts by semantic name, no fragile selector hacks.
9
9
  - **OKLCH theming** — `TaoProvider` derives a full theme (radius, font scale, control heights) from a small seed token set; components inherit `size` / `disabled` / `variant`.
10
10
  - **Typed** — full `.d.ts`, every Props and SemanticPart type exported.
11
11
 
@@ -85,6 +85,13 @@ import '@fontsource/geist-mono/400.css';
85
85
 
86
86
  Headless utilities: `useNumberInput` / `NumberInput`, and the `cx` semantic-class helper.
87
87
 
88
+ Package metadata and token helpers use explicit subpath imports:
89
+
90
+ ```ts
91
+ import { componentDocs, getComponentDoc } from '@rockshin/tao-ui/meta';
92
+ import { taoTokenNames, tokenVar } from '@rockshin/tao-ui/tokens';
93
+ ```
94
+
88
95
  ## License
89
96
 
90
97
  [MIT](./LICENSE) © rickyshin
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "packageName": "@rockshin/tao-ui",
4
- "generatedAt": "2026-07-12T10:40:10.749Z",
4
+ "generatedAt": "2026-08-02T15:18:03.266Z",
5
5
  "components": [
6
6
  {
7
7
  "name": "breadcrumb",
@@ -21,7 +21,9 @@
21
21
  "list",
22
22
  "item",
23
23
  "link",
24
- "separator"
24
+ "page",
25
+ "separator",
26
+ "ellipsis"
25
27
  ],
26
28
  "keywords": [
27
29
  "navigation",
@@ -132,11 +134,8 @@
132
134
  ],
133
135
  "semanticParts": [
134
136
  "root",
135
- "input",
136
- "box",
137
- "label",
138
- "group",
139
- "option"
137
+ "indicator",
138
+ "label"
140
139
  ],
141
140
  "keywords": [
142
141
  "checkbox",
@@ -228,10 +227,15 @@
228
227
  ],
229
228
  "semanticParts": [
230
229
  "root",
231
- "trigger",
232
230
  "content",
233
231
  "item",
234
- "separator"
232
+ "itemIcon",
233
+ "itemLabel",
234
+ "itemExtra",
235
+ "divider",
236
+ "groupLabel",
237
+ "subTrigger",
238
+ "subContent"
235
239
  ],
236
240
  "keywords": [
237
241
  "menu",
@@ -310,11 +314,13 @@
310
314
  "semanticParts": [
311
315
  "root",
312
316
  "overlay",
313
- "content",
314
317
  "header",
318
+ "title",
319
+ "extra",
315
320
  "body",
316
321
  "footer",
317
- "close"
322
+ "close",
323
+ "dragger"
318
324
  ],
319
325
  "keywords": [
320
326
  "panel",
@@ -350,11 +356,15 @@
350
356
  ],
351
357
  "semanticParts": [
352
358
  "root",
353
- "trigger",
354
359
  "content",
355
360
  "item",
356
- "group",
357
- "divider"
361
+ "itemIcon",
362
+ "itemLabel",
363
+ "itemExtra",
364
+ "divider",
365
+ "groupLabel",
366
+ "subTrigger",
367
+ "subContent"
358
368
  ],
359
369
  "keywords": [
360
370
  "menu",
@@ -426,7 +436,6 @@
426
436
  "semanticParts": [
427
437
  "root",
428
438
  "label",
429
- "control",
430
439
  "description",
431
440
  "error"
432
441
  ],
@@ -461,6 +470,9 @@
461
470
  "tests": [
462
471
  "tests/layouts/form-layout/form-layout.test.tsx"
463
472
  ],
473
+ "semanticParts": [
474
+ "root"
475
+ ],
464
476
  "keywords": [
465
477
  "form",
466
478
  "layout",
@@ -496,7 +508,7 @@
496
508
  "header",
497
509
  "title",
498
510
  "description",
499
- "content"
511
+ "body"
500
512
  ],
501
513
  "keywords": [
502
514
  "form",
@@ -567,8 +579,7 @@
567
579
  "root",
568
580
  "input",
569
581
  "prefix",
570
- "suffix",
571
- "clear"
582
+ "suffix"
572
583
  ],
573
584
  "keywords": [
574
585
  "text field",
@@ -603,9 +614,8 @@
603
614
  "semanticParts": [
604
615
  "root",
605
616
  "input",
606
- "controls",
607
- "increment",
608
- "decrement"
617
+ "prefix",
618
+ "suffix"
609
619
  ],
610
620
  "keywords": [
611
621
  "number",
@@ -643,8 +653,8 @@
643
653
  "semanticParts": [
644
654
  "root",
645
655
  "overlay",
646
- "content",
647
656
  "header",
657
+ "title",
648
658
  "body",
649
659
  "footer",
650
660
  "close"
@@ -685,9 +695,7 @@
685
695
  "semanticParts": [
686
696
  "root",
687
697
  "item",
688
- "prev",
689
- "next",
690
- "sizeChanger"
698
+ "total"
691
699
  ],
692
700
  "keywords": [
693
701
  "pages",
@@ -721,11 +729,8 @@
721
729
  ],
722
730
  "semanticParts": [
723
731
  "root",
724
- "input",
725
732
  "indicator",
726
- "label",
727
- "group",
728
- "option"
733
+ "label"
729
734
  ],
730
735
  "keywords": [
731
736
  "radio",
@@ -764,10 +769,10 @@
764
769
  "semanticParts": [
765
770
  "root",
766
771
  "input",
772
+ "separator",
767
773
  "popup",
768
774
  "calendar",
769
- "cell",
770
- "footer"
775
+ "cell"
771
776
  ],
772
777
  "keywords": [
773
778
  "date range",
@@ -826,8 +831,7 @@
826
831
  "category": "Data Entry",
827
832
  "description": "Chooses one value from a compact list of options.",
828
833
  "exports": [
829
- "Select",
830
- "ChevronsUpDownIcon"
834
+ "Select"
831
835
  ],
832
836
  "source": "src/components/select/select.tsx",
833
837
  "story": "stories/select.stories.tsx",
@@ -836,11 +840,25 @@
836
840
  ],
837
841
  "semanticParts": [
838
842
  "root",
839
- "trigger",
840
- "value",
841
- "content",
843
+ "prefix",
844
+ "suffix",
845
+ "placeholder",
846
+ "clear",
847
+ "popup",
848
+ "search",
849
+ "searchInput",
850
+ "group",
851
+ "groupLabel",
842
852
  "item",
843
- "empty"
853
+ "itemIcon",
854
+ "itemLabel",
855
+ "itemDesc",
856
+ "empty",
857
+ "tag",
858
+ "tagLabel",
859
+ "tagClose",
860
+ "tagRest",
861
+ "values"
844
862
  ],
845
863
  "keywords": [
846
864
  "select",
@@ -922,7 +940,10 @@
922
940
  "tests/spinner/spinner.test.tsx"
923
941
  ],
924
942
  "semanticParts": [
925
- "root"
943
+ "root",
944
+ "indicator",
945
+ "tip",
946
+ "overlay"
926
947
  ],
927
948
  "keywords": [
928
949
  "loading",
@@ -959,7 +980,7 @@
959
980
  "semanticParts": [
960
981
  "root",
961
982
  "panel",
962
- "handle"
983
+ "dragger"
963
984
  ],
964
985
  "keywords": [
965
986
  "resizable",
@@ -991,6 +1012,9 @@
991
1012
  "tests": [
992
1013
  "tests/layouts/stack/stack.test.tsx"
993
1014
  ],
1015
+ "semanticParts": [
1016
+ "root"
1017
+ ],
994
1018
  "keywords": [
995
1019
  "layout",
996
1020
  "flex",
@@ -1023,8 +1047,7 @@
1023
1047
  ],
1024
1048
  "semanticParts": [
1025
1049
  "root",
1026
- "thumb",
1027
- "label"
1050
+ "handle"
1028
1051
  ],
1029
1052
  "keywords": [
1030
1053
  "toggle",
@@ -1057,12 +1080,17 @@
1057
1080
  ],
1058
1081
  "semanticParts": [
1059
1082
  "root",
1083
+ "scroll",
1060
1084
  "table",
1061
- "header",
1085
+ "header.wrapper",
1086
+ "header.row",
1062
1087
  "header.cell",
1063
- "body",
1064
- "row",
1065
- "cell",
1088
+ "header.content",
1089
+ "header.title",
1090
+ "body.row",
1091
+ "body.cell",
1092
+ "selection.cell",
1093
+ "empty",
1066
1094
  "pagination"
1067
1095
  ],
1068
1096
  "keywords": [
@@ -1102,8 +1130,9 @@
1102
1130
  ],
1103
1131
  "semanticParts": [
1104
1132
  "root",
1105
- "list",
1133
+ "nav",
1106
1134
  "tab",
1135
+ "indicator",
1107
1136
  "panel"
1108
1137
  ],
1109
1138
  "keywords": [
@@ -1142,6 +1171,7 @@
1142
1171
  "semanticParts": [
1143
1172
  "root",
1144
1173
  "icon",
1174
+ "content",
1145
1175
  "close"
1146
1176
  ],
1147
1177
  "keywords": [
@@ -1171,8 +1201,7 @@
1171
1201
  "category": "Config",
1172
1202
  "description": "Provides global component defaults, portal scoping, and theme seed token overrides.",
1173
1203
  "exports": [
1174
- "TaoProvider",
1175
- "TaoPortalScope"
1204
+ "TaoProvider"
1176
1205
  ],
1177
1206
  "source": "src/provider/tao-provider.tsx",
1178
1207
  "story": "stories/provider.stories.tsx",
@@ -38,6 +38,10 @@ button[data-tao-button][data-tao-size="large"] {
38
38
  border-radius: var(--tao-radius-md);
39
39
  }
40
40
 
41
+ button[data-tao-button][data-tao-has-icon][data-tao-size="medium"], button[data-tao-button][data-tao-has-icon][data-tao-size="large"] {
42
+ padding-inline: var(--tao-padding-sm);
43
+ }
44
+
41
45
  button[data-tao-button][data-tao-variant="primary"] {
42
46
  background: var(--tao-primary);
43
47
  color: var(--tao-primary-fg);
@@ -103,27 +107,23 @@ button[data-tao-button]:disabled {
103
107
 
104
108
  [data-tao-button-icon] {
105
109
  flex: none;
106
- justify-content: center;
107
- align-items: center;
108
- width: 1.25em;
109
- height: 1.25em;
110
- display: inline-flex;
111
- position: relative;
110
+ place-items: center;
111
+ line-height: 0;
112
+ display: inline-grid;
112
113
  }
113
114
 
114
115
  [data-tao-button-icon-idle], [data-tao-button-icon-spin] {
115
116
  transition: opacity var(--tao-motion-duration-fast) var(--tao-motion-ease-out);
117
+ grid-area: 1 / 1;
116
118
  justify-content: center;
117
119
  align-items: center;
118
120
  line-height: 0;
119
121
  display: inline-flex;
120
- position: absolute;
121
- inset: 0;
122
122
  }
123
123
 
124
124
  [data-tao-button-icon-idle] > svg, [data-tao-button-spinner] {
125
- width: 1.25em;
126
- height: 1.25em;
125
+ width: 1em;
126
+ height: 1em;
127
127
  }
128
128
 
129
129
  [data-tao-button-icon]:not([data-tao-loading]) [data-tao-button-icon-spin] {
@@ -143,7 +143,7 @@ button[data-tao-button]:disabled {
143
143
  }
144
144
 
145
145
  [data-tao-button-spinner] {
146
- animation: .8s linear infinite tao-button-spin;
146
+ animation: tao-button-spin calc(var(--tao-motion-unit) * 8) linear infinite;
147
147
  }
148
148
 
149
149
  @keyframes tao-button-spin {
@@ -1,4 +1,4 @@
1
- import type { ButtonHTMLAttributes, ReactNode } from 'react';
1
+ import type { ButtonHTMLAttributes, ReactNode, Ref } from 'react';
2
2
  import { type TaoSize } from '../../provider/tao-provider';
3
3
  import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
4
4
  import './button.css';
@@ -13,7 +13,8 @@ export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement
13
13
  /** Icon shown while loading. Defaults to a built-in spinner. */
14
14
  loadingIcon?: ReactNode;
15
15
  children?: ReactNode;
16
+ ref?: Ref<HTMLButtonElement>;
16
17
  classNames?: SemanticClassNames<ButtonSemanticPart>;
17
18
  styles?: SemanticStyles<ButtonSemanticPart>;
18
19
  }
19
- export declare function Button({ variant, size, disabled, loading, icon, loadingIcon, children, className, style, classNames, styles, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function Button({ variant, size, disabled, loading, icon, loadingIcon, children, ref, className, style, classNames, styles, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -4,7 +4,7 @@ import { useTaoConfig } from "../../provider/tao-provider.js";
4
4
  import { cx } from "../../utils/semantic.js";
5
5
  import "./button.css";
6
6
  function Button(t0) {
7
- const $ = c(34);
7
+ const $ = c(37);
8
8
  let children;
9
9
  let className;
10
10
  let classNames;
@@ -12,13 +12,14 @@ function Button(t0) {
12
12
  let icon;
13
13
  let loading;
14
14
  let loadingIcon;
15
+ let ref;
15
16
  let rest;
16
17
  let size;
17
18
  let style;
18
19
  let styles;
19
20
  let t1;
20
21
  if ($[0] !== t0) {
21
- ({ variant: t1, size, disabled, loading, icon, loadingIcon, children, className, style, classNames, styles, ...rest } = t0);
22
+ ({ variant: t1, size, disabled, loading, icon, loadingIcon, children, ref, className, style, classNames, styles, ...rest } = t0);
22
23
  $[0] = t0;
23
24
  $[1] = children;
24
25
  $[2] = className;
@@ -27,11 +28,12 @@ function Button(t0) {
27
28
  $[5] = icon;
28
29
  $[6] = loading;
29
30
  $[7] = loadingIcon;
30
- $[8] = rest;
31
- $[9] = size;
32
- $[10] = style;
33
- $[11] = styles;
34
- $[12] = t1;
31
+ $[8] = ref;
32
+ $[9] = rest;
33
+ $[10] = size;
34
+ $[11] = style;
35
+ $[12] = styles;
36
+ $[13] = t1;
35
37
  } else {
36
38
  children = $[1];
37
39
  className = $[2];
@@ -40,11 +42,12 @@ function Button(t0) {
40
42
  icon = $[5];
41
43
  loading = $[6];
42
44
  loadingIcon = $[7];
43
- rest = $[8];
44
- size = $[9];
45
- style = $[10];
46
- styles = $[11];
47
- t1 = $[12];
45
+ ref = $[8];
46
+ rest = $[9];
47
+ size = $[10];
48
+ style = $[11];
49
+ styles = $[12];
50
+ t1 = $[13];
48
51
  }
49
52
  const variant = void 0 === t1 ? "primary" : t1;
50
53
  const ctx = useTaoConfig();
@@ -54,27 +57,28 @@ function Button(t0) {
54
57
  const hasIconSlot = null != icon || loading;
55
58
  const t2 = classNames?.root;
56
59
  let t3;
57
- if ($[13] !== className || $[14] !== t2) {
60
+ if ($[14] !== className || $[15] !== t2) {
58
61
  t3 = cx(t2, className);
59
- $[13] = className;
60
- $[14] = t2;
61
- $[15] = t3;
62
- } else t3 = $[15];
62
+ $[14] = className;
63
+ $[15] = t2;
64
+ $[16] = t3;
65
+ } else t3 = $[16];
63
66
  const t4 = styles?.root;
64
67
  let t5;
65
- if ($[16] !== style || $[17] !== t4) {
68
+ if ($[17] !== style || $[18] !== t4) {
66
69
  t5 = {
67
70
  ...t4,
68
71
  ...style
69
72
  };
70
- $[16] = style;
71
- $[17] = t4;
72
- $[18] = t5;
73
- } else t5 = $[18];
73
+ $[17] = style;
74
+ $[18] = t4;
75
+ $[19] = t5;
76
+ } else t5 = $[19];
74
77
  const t6 = loading || void 0;
75
- let t7;
76
- if ($[19] !== hasIconSlot || $[20] !== icon || $[21] !== loading || $[22] !== loadingIcon) {
77
- t7 = hasIconSlot && /*#__PURE__*/ jsxs("span", {
78
+ const t7 = hasIconSlot || void 0;
79
+ let t8;
80
+ if ($[20] !== hasIconSlot || $[21] !== icon || $[22] !== loading || $[23] !== loadingIcon) {
81
+ t8 = hasIconSlot && /*#__PURE__*/ jsxs("span", {
78
82
  "data-tao-button-icon": "",
79
83
  "data-tao-loading": loading || void 0,
80
84
  children: [
@@ -88,15 +92,16 @@ function Button(t0) {
88
92
  })
89
93
  ]
90
94
  });
91
- $[19] = hasIconSlot;
92
- $[20] = icon;
93
- $[21] = loading;
94
- $[22] = loadingIcon;
95
- $[23] = t7;
96
- } else t7 = $[23];
97
- let t8;
98
- if ($[24] !== children || $[25] !== isDisabled || $[26] !== resolvedSize || $[27] !== rest || $[28] !== t3 || $[29] !== t5 || $[30] !== t6 || $[31] !== t7 || $[32] !== variant) {
99
- t8 = /*#__PURE__*/ jsxs("button", {
95
+ $[20] = hasIconSlot;
96
+ $[21] = icon;
97
+ $[22] = loading;
98
+ $[23] = loadingIcon;
99
+ $[24] = t8;
100
+ } else t8 = $[24];
101
+ let t9;
102
+ if ($[25] !== children || $[26] !== isDisabled || $[27] !== ref || $[28] !== resolvedSize || $[29] !== rest || $[30] !== t3 || $[31] !== t5 || $[32] !== t6 || $[33] !== t7 || $[34] !== t8 || $[35] !== variant) {
103
+ t9 = /*#__PURE__*/ jsxs("button", {
104
+ ref: ref,
100
105
  type: "button",
101
106
  ...rest,
102
107
  className: t3,
@@ -104,25 +109,28 @@ function Button(t0) {
104
109
  disabled: isDisabled,
105
110
  "aria-busy": t6,
106
111
  "data-tao-button": "",
112
+ "data-tao-has-icon": t7,
107
113
  "data-tao-variant": variant,
108
114
  "data-tao-size": resolvedSize,
109
115
  children: [
110
- t7,
116
+ t8,
111
117
  children
112
118
  ]
113
119
  });
114
- $[24] = children;
115
- $[25] = isDisabled;
116
- $[26] = resolvedSize;
117
- $[27] = rest;
118
- $[28] = t3;
119
- $[29] = t5;
120
- $[30] = t6;
121
- $[31] = t7;
122
- $[32] = variant;
123
- $[33] = t8;
124
- } else t8 = $[33];
125
- return t8;
120
+ $[25] = children;
121
+ $[26] = isDisabled;
122
+ $[27] = ref;
123
+ $[28] = resolvedSize;
124
+ $[29] = rest;
125
+ $[30] = t3;
126
+ $[31] = t5;
127
+ $[32] = t6;
128
+ $[33] = t7;
129
+ $[34] = t8;
130
+ $[35] = variant;
131
+ $[36] = t9;
132
+ } else t9 = $[36];
133
+ return t9;
126
134
  }
127
135
  function LoadingSpinner() {
128
136
  const $ = c(1);
@@ -1,4 +1,4 @@
1
- import { type ChangeEvent, type ReactNode } from 'react';
1
+ import { type ChangeEvent, type ReactNode, type Ref } from 'react';
2
2
  import { type TaoSize } from '../../provider/tao-provider';
3
3
  import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
4
4
  import './checkbox.css';
@@ -13,8 +13,9 @@ export interface CheckboxProps {
13
13
  children?: ReactNode;
14
14
  classNames?: SemanticClassNames<CheckboxSemanticPart>;
15
15
  styles?: SemanticStyles<CheckboxSemanticPart>;
16
+ ref?: Ref<HTMLInputElement>;
16
17
  }
17
- export declare function Checkbox({ checked, indeterminate, disabled, onChange, value, children, classNames, styles, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function Checkbox({ checked, defaultChecked, indeterminate, disabled, onChange, value, children, classNames, styles, ref, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
18
19
  export type CheckboxOptionType = {
19
20
  label: ReactNode;
20
21
  value: string;