@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.
Files changed (105) 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/form-field/form-field.d.ts +1 -1
  19. package/dist/components/form-field/form-field.js +106 -63
  20. package/dist/components/input/input.css +13 -0
  21. package/dist/components/input/input.d.ts +2 -1
  22. package/dist/components/input/input.js +76 -70
  23. package/dist/components/input-number/input-number.d.ts +5 -3
  24. package/dist/components/input-number/input-number.js +63 -47
  25. package/dist/components/modal/modal.css +2 -1
  26. package/dist/components/radio/radio.d.ts +3 -2
  27. package/dist/components/radio/radio.js +43 -39
  28. package/dist/components/select/mobile-select.d.ts +1 -1
  29. package/dist/components/select/mobile-select.js +1 -1
  30. package/dist/components/select/select-icons.d.ts +7 -0
  31. package/dist/components/select/select-icons.js +141 -0
  32. package/dist/components/select/select-model.d.ts +4 -0
  33. package/dist/components/select/select-model.js +22 -0
  34. package/dist/components/select/select-searchable-list.d.ts +22 -0
  35. package/dist/components/select/select-searchable-list.js +101 -0
  36. package/dist/components/select/select-tags.d.ts +15 -0
  37. package/dist/components/select/select-tags.js +152 -0
  38. package/dist/components/select/select-types.d.ts +82 -0
  39. package/dist/components/select/select-types.js +0 -0
  40. package/dist/components/select/select.css +2 -1
  41. package/dist/components/select/select.d.ts +2 -118
  42. package/dist/components/select/select.js +91 -404
  43. package/dist/components/select/use-is-mobile.js +2 -5
  44. package/dist/components/sonner/sonner.js +9 -3
  45. package/dist/components/spinner/spinner.css +1 -1
  46. package/dist/components/splitter/splitter.js +181 -133
  47. package/dist/components/switch/switch.css +17 -8
  48. package/dist/components/switch/switch.d.ts +3 -2
  49. package/dist/components/switch/switch.js +90 -79
  50. package/dist/components/table/table-filter.d.ts +6 -0
  51. package/dist/components/table/table-filter.js +123 -0
  52. package/dist/components/table/table-icons.d.ts +9 -0
  53. package/dist/components/table/table-icons.js +157 -0
  54. package/dist/components/table/table-model.d.ts +11 -0
  55. package/dist/components/table/table-model.js +33 -0
  56. package/dist/components/table/table-types.d.ts +87 -0
  57. package/dist/components/table/table-types.js +0 -0
  58. package/dist/components/table/table.css +14 -15
  59. package/dist/components/table/table.d.ts +3 -101
  60. package/dist/components/table/table.js +29 -329
  61. package/dist/components/tabs/tabs.css +5 -2
  62. package/dist/components/tabs/tabs.js +71 -62
  63. package/dist/components/textarea/textarea.d.ts +5 -3
  64. package/dist/components/textarea/textarea.js +102 -85
  65. package/dist/docs/component-docs.d.ts +1 -0
  66. package/dist/docs/components/breadcrumb.doc.js +3 -1
  67. package/dist/docs/components/checkbox.doc.js +2 -5
  68. package/dist/docs/components/context-menu.doc.js +7 -2
  69. package/dist/docs/components/drawer.doc.js +4 -2
  70. package/dist/docs/components/dropdown.doc.js +7 -3
  71. package/dist/docs/components/form-field.doc.js +0 -1
  72. package/dist/docs/components/form-layout.doc.d.ts +1 -0
  73. package/dist/docs/components/form-layout.doc.js +3 -0
  74. package/dist/docs/components/form-section.doc.js +1 -1
  75. package/dist/docs/components/input-number.doc.js +2 -3
  76. package/dist/docs/components/input.doc.js +1 -2
  77. package/dist/docs/components/modal.doc.js +1 -1
  78. package/dist/docs/components/pagination.doc.js +1 -3
  79. package/dist/docs/components/radio.doc.js +1 -4
  80. package/dist/docs/components/range-picker.doc.js +2 -2
  81. package/dist/docs/components/select.doc.js +19 -6
  82. package/dist/docs/components/spinner.doc.js +4 -1
  83. package/dist/docs/components/splitter.doc.js +1 -1
  84. package/dist/docs/components/stack.doc.d.ts +1 -0
  85. package/dist/docs/components/stack.doc.js +3 -0
  86. package/dist/docs/components/switch.doc.js +1 -2
  87. package/dist/docs/components/table.doc.js +9 -4
  88. package/dist/docs/components/tabs.doc.js +2 -1
  89. package/dist/docs/components/tag.doc.js +1 -0
  90. package/dist/docs/components/tao-provider.doc.js +1 -2
  91. package/dist/index.d.ts +7 -9
  92. package/dist/index.js +4 -5
  93. package/dist/layouts/form-layout/form-layout.d.ts +8 -2
  94. package/dist/layouts/form-layout/form-layout.js +33 -9
  95. package/dist/layouts/stack/stack.d.ts +8 -2
  96. package/dist/layouts/stack/stack.js +36 -12
  97. package/dist/provider/tao-provider.d.ts +3 -9
  98. package/dist/provider/tao-provider.js +99 -33
  99. package/dist/theme/theme.css +24 -14
  100. package/dist/theme/tokens.d.ts +2 -2
  101. package/dist/theme/tokens.js +4 -1
  102. package/dist/utils/refs.d.ts +2 -0
  103. package/dist/utils/refs.js +7 -0
  104. package/llms.txt +26 -24
  105. package/package.json +16 -4
@@ -5,7 +5,7 @@ import { useTaoConfig } from "../../provider/tao-provider.js";
5
5
  import { cx } from "../../utils/semantic.js";
6
6
  import "./input.css";
7
7
  const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
8
- const $ = c(42);
8
+ const $ = c(44);
9
9
  let className;
10
10
  let classNames;
11
11
  let disabled;
@@ -13,12 +13,13 @@ const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
13
13
  let prefix;
14
14
  let rest;
15
15
  let size;
16
+ let status;
16
17
  let style;
17
18
  let styles;
18
19
  let suffix;
19
20
  let variant;
20
21
  if ($[0] !== t0) {
21
- ({ size, variant, prefix, suffix, error, disabled, className, style, classNames, styles, ...rest } = t0);
22
+ ({ size, variant, prefix, suffix, error, status, disabled, className, style, classNames, styles, ...rest } = t0);
22
23
  $[0] = t0;
23
24
  $[1] = className;
24
25
  $[2] = classNames;
@@ -27,10 +28,11 @@ const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
27
28
  $[5] = prefix;
28
29
  $[6] = rest;
29
30
  $[7] = size;
30
- $[8] = style;
31
- $[9] = styles;
32
- $[10] = suffix;
33
- $[11] = variant;
31
+ $[8] = status;
32
+ $[9] = style;
33
+ $[10] = styles;
34
+ $[11] = suffix;
35
+ $[12] = variant;
34
36
  } else {
35
37
  className = $[1];
36
38
  classNames = $[2];
@@ -39,10 +41,11 @@ const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
39
41
  prefix = $[5];
40
42
  rest = $[6];
41
43
  size = $[7];
42
- style = $[8];
43
- styles = $[9];
44
- suffix = $[10];
45
- variant = $[11];
44
+ status = $[8];
45
+ style = $[9];
46
+ styles = $[10];
47
+ suffix = $[11];
48
+ variant = $[12];
46
49
  }
47
50
  const ctx = useTaoConfig();
48
51
  const resolvedSize = size ?? ctx.size;
@@ -50,74 +53,75 @@ const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
50
53
  const resolvedDisabled = disabled ?? ctx.disabled;
51
54
  const t1 = classNames?.root;
52
55
  let t2;
53
- if ($[12] !== className || $[13] !== t1) {
56
+ if ($[13] !== className || $[14] !== t1) {
54
57
  t2 = cx(t1, className);
55
- $[12] = className;
56
- $[13] = t1;
57
- $[14] = t2;
58
- } else t2 = $[14];
58
+ $[13] = className;
59
+ $[14] = t1;
60
+ $[15] = t2;
61
+ } else t2 = $[15];
59
62
  const t3 = styles?.root;
60
63
  let t4;
61
- if ($[15] !== style || $[16] !== t3) {
64
+ if ($[16] !== style || $[17] !== t3) {
62
65
  t4 = {
63
66
  ...t3,
64
67
  ...style
65
68
  };
66
- $[15] = style;
67
- $[16] = t3;
68
- $[17] = t4;
69
- } else t4 = $[17];
70
- const t5 = error || void 0;
71
- let t6;
72
- if ($[18] !== classNames?.prefix || $[19] !== prefix || $[20] !== styles?.prefix) {
73
- t6 = null != prefix && /*#__PURE__*/ jsx("span", {
69
+ $[16] = style;
70
+ $[17] = t3;
71
+ $[18] = t4;
72
+ } else t4 = $[18];
73
+ const t5 = "error" === status || error || void 0;
74
+ const t6 = "warning" === status || void 0;
75
+ let t7;
76
+ if ($[19] !== classNames?.prefix || $[20] !== prefix || $[21] !== styles?.prefix) {
77
+ t7 = null != prefix && /*#__PURE__*/ jsx("span", {
74
78
  className: classNames?.prefix,
75
79
  style: styles?.prefix,
76
80
  "data-tao-prefix": "",
77
81
  children: prefix
78
82
  });
79
- $[18] = classNames?.prefix;
80
- $[19] = prefix;
81
- $[20] = styles?.prefix;
82
- $[21] = t6;
83
- } else t6 = $[21];
84
- const t7 = classNames?.input;
85
- const t8 = styles?.input;
86
- const t9 = error || void 0;
87
- let t10;
88
- if ($[22] !== ref || $[23] !== resolvedDisabled || $[24] !== rest || $[25] !== t7 || $[26] !== t8 || $[27] !== t9) {
89
- t10 = /*#__PURE__*/ jsx("input", {
83
+ $[19] = classNames?.prefix;
84
+ $[20] = prefix;
85
+ $[21] = styles?.prefix;
86
+ $[22] = t7;
87
+ } else t7 = $[22];
88
+ const t8 = classNames?.input;
89
+ const t9 = styles?.input;
90
+ const t10 = "error" === status || error || void 0;
91
+ let t11;
92
+ if ($[23] !== ref || $[24] !== resolvedDisabled || $[25] !== rest || $[26] !== t10 || $[27] !== t8 || $[28] !== t9) {
93
+ t11 = /*#__PURE__*/ jsx("input", {
90
94
  ...rest,
91
95
  ref: ref,
92
- className: t7,
93
- style: t8,
96
+ className: t8,
97
+ style: t9,
94
98
  disabled: resolvedDisabled,
95
- "aria-invalid": t9
99
+ "aria-invalid": t10
96
100
  });
97
- $[22] = ref;
98
- $[23] = resolvedDisabled;
99
- $[24] = rest;
100
- $[25] = t7;
101
- $[26] = t8;
102
- $[27] = t9;
103
- $[28] = t10;
104
- } else t10 = $[28];
105
- let t11;
106
- if ($[29] !== classNames?.suffix || $[30] !== styles?.suffix || $[31] !== suffix) {
107
- t11 = null != suffix && /*#__PURE__*/ jsx("span", {
101
+ $[23] = ref;
102
+ $[24] = resolvedDisabled;
103
+ $[25] = rest;
104
+ $[26] = t10;
105
+ $[27] = t8;
106
+ $[28] = t9;
107
+ $[29] = t11;
108
+ } else t11 = $[29];
109
+ let t12;
110
+ if ($[30] !== classNames?.suffix || $[31] !== styles?.suffix || $[32] !== suffix) {
111
+ t12 = null != suffix && /*#__PURE__*/ jsx("span", {
108
112
  className: classNames?.suffix,
109
113
  style: styles?.suffix,
110
114
  "data-tao-suffix": "",
111
115
  children: suffix
112
116
  });
113
- $[29] = classNames?.suffix;
114
- $[30] = styles?.suffix;
115
- $[31] = suffix;
116
- $[32] = t11;
117
- } else t11 = $[32];
118
- let t12;
119
- if ($[33] !== resolvedSize || $[34] !== resolvedVariant || $[35] !== t10 || $[36] !== t11 || $[37] !== t2 || $[38] !== t4 || $[39] !== t5 || $[40] !== t6) {
120
- t12 = /*#__PURE__*/ jsxs("div", {
117
+ $[30] = classNames?.suffix;
118
+ $[31] = styles?.suffix;
119
+ $[32] = suffix;
120
+ $[33] = t12;
121
+ } else t12 = $[33];
122
+ let t13;
123
+ if ($[34] !== resolvedSize || $[35] !== resolvedVariant || $[36] !== t11 || $[37] !== t12 || $[38] !== t2 || $[39] !== t4 || $[40] !== t5 || $[41] !== t6 || $[42] !== t7) {
124
+ t13 = /*#__PURE__*/ jsxs("div", {
121
125
  className: t2,
122
126
  style: t4,
123
127
  "data-tao-control": "",
@@ -125,22 +129,24 @@ const input_Input = /*#__PURE__*/ forwardRef(function(t0, ref) {
125
129
  "data-tao-size": resolvedSize,
126
130
  "data-tao-variant": resolvedVariant,
127
131
  "data-tao-error": t5,
132
+ "data-tao-warning": t6,
128
133
  children: [
129
- t6,
130
- t10,
131
- t11
134
+ t7,
135
+ t11,
136
+ t12
132
137
  ]
133
138
  });
134
- $[33] = resolvedSize;
135
- $[34] = resolvedVariant;
136
- $[35] = t10;
139
+ $[34] = resolvedSize;
140
+ $[35] = resolvedVariant;
137
141
  $[36] = t11;
138
- $[37] = t2;
139
- $[38] = t4;
140
- $[39] = t5;
141
- $[40] = t6;
142
- $[41] = t12;
143
- } else t12 = $[41];
144
- return t12;
142
+ $[37] = t12;
143
+ $[38] = t2;
144
+ $[39] = t4;
145
+ $[40] = t5;
146
+ $[41] = t6;
147
+ $[42] = t7;
148
+ $[43] = t13;
149
+ } else t13 = $[43];
150
+ return t13;
145
151
  });
146
152
  export { input_Input as Input };
@@ -1,6 +1,6 @@
1
- import type { ReactNode } from 'react';
1
+ import type { ReactNode, Ref } from 'react';
2
2
  import { type UseNumberInputOptions } from '../../number-input/use-number-input';
3
- import type { TaoSize, TaoVariant } from '../../provider/tao-provider';
3
+ import type { TaoSize, TaoStatus, TaoVariant } from '../../provider/tao-provider';
4
4
  import type { SemanticClassNames, SemanticStyles } from '../../utils/semantic';
5
5
  import { type InputSemanticPart } from '../input/input';
6
6
  export type InputNumberSemanticPart = InputSemanticPart;
@@ -10,6 +10,8 @@ export interface InputNumberProps extends UseNumberInputOptions {
10
10
  size?: TaoSize;
11
11
  variant?: TaoVariant;
12
12
  error?: boolean;
13
+ status?: TaoStatus;
14
+ ref?: Ref<HTMLInputElement>;
13
15
  disabled?: boolean;
14
16
  placeholder?: string;
15
17
  id?: string;
@@ -19,4 +21,4 @@ export interface InputNumberProps extends UseNumberInputOptions {
19
21
  classNames?: SemanticClassNames<InputNumberSemanticPart>;
20
22
  styles?: SemanticStyles<InputNumberSemanticPart>;
21
23
  }
22
- export declare function InputNumber({ prefix, suffix, size, variant, error, disabled, placeholder, id, name, 'aria-label': ariaLabel, className, classNames, styles, ...hookOptions }: InputNumberProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare function InputNumber({ prefix, suffix, size, variant, error, status, disabled, placeholder, id, name, 'aria-label': ariaLabel, className, classNames, styles, ref: forwardedRef, ...hookOptions }: InputNumberProps): import("react/jsx-runtime").JSX.Element;
@@ -1,77 +1,92 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useNumberInput } from "../../number-input/use-number-input.js";
4
+ import { mergeRefs } from "../../utils/refs.js";
4
5
  import { Input } from "../input/input.js";
5
6
  function InputNumber(t0) {
6
- const $ = c(34);
7
+ const $ = c(40);
7
8
  let ariaLabel;
8
9
  let className;
9
10
  let classNames;
10
11
  let disabled;
11
12
  let error;
13
+ let forwardedRef;
12
14
  let hookOptions;
13
15
  let id;
14
16
  let name;
15
17
  let placeholder;
16
18
  let prefix;
17
19
  let size;
20
+ let status;
18
21
  let styles;
19
22
  let suffix;
20
23
  let variant;
21
24
  if ($[0] !== t0) {
22
- ({ prefix, suffix, size, variant, error, disabled, placeholder, id, name, "aria-label": ariaLabel, className, classNames, styles, ...hookOptions } = t0);
25
+ ({ prefix, suffix, size, variant, error, status, disabled, placeholder, id, name, "aria-label": ariaLabel, className, classNames, styles, ref: forwardedRef, ...hookOptions } = t0);
23
26
  $[0] = t0;
24
27
  $[1] = ariaLabel;
25
28
  $[2] = className;
26
29
  $[3] = classNames;
27
30
  $[4] = disabled;
28
31
  $[5] = error;
29
- $[6] = hookOptions;
30
- $[7] = id;
31
- $[8] = name;
32
- $[9] = placeholder;
33
- $[10] = prefix;
34
- $[11] = size;
35
- $[12] = styles;
36
- $[13] = suffix;
37
- $[14] = variant;
32
+ $[6] = forwardedRef;
33
+ $[7] = hookOptions;
34
+ $[8] = id;
35
+ $[9] = name;
36
+ $[10] = placeholder;
37
+ $[11] = prefix;
38
+ $[12] = size;
39
+ $[13] = status;
40
+ $[14] = styles;
41
+ $[15] = suffix;
42
+ $[16] = variant;
38
43
  } else {
39
44
  ariaLabel = $[1];
40
45
  className = $[2];
41
46
  classNames = $[3];
42
47
  disabled = $[4];
43
48
  error = $[5];
44
- hookOptions = $[6];
45
- id = $[7];
46
- name = $[8];
47
- placeholder = $[9];
48
- prefix = $[10];
49
- size = $[11];
50
- styles = $[12];
51
- suffix = $[13];
52
- variant = $[14];
49
+ forwardedRef = $[6];
50
+ hookOptions = $[7];
51
+ id = $[8];
52
+ name = $[9];
53
+ placeholder = $[10];
54
+ prefix = $[11];
55
+ size = $[12];
56
+ status = $[13];
57
+ styles = $[14];
58
+ suffix = $[15];
59
+ variant = $[16];
53
60
  }
54
61
  const { inputProps } = useNumberInput(hookOptions);
55
62
  let inputRest;
56
63
  let ref;
57
- if ($[15] !== inputProps) {
64
+ if ($[17] !== inputProps) {
58
65
  ({ ref, ...inputRest } = inputProps);
59
- $[15] = inputProps;
60
- $[16] = inputRest;
61
- $[17] = ref;
66
+ $[17] = inputProps;
67
+ $[18] = inputRest;
68
+ $[19] = ref;
62
69
  } else {
63
- inputRest = $[16];
64
- ref = $[17];
70
+ inputRest = $[18];
71
+ ref = $[19];
65
72
  }
66
73
  let t1;
67
- if ($[18] !== ariaLabel || $[19] !== className || $[20] !== classNames || $[21] !== disabled || $[22] !== error || $[23] !== id || $[24] !== inputRest || $[25] !== name || $[26] !== placeholder || $[27] !== prefix || $[28] !== ref || $[29] !== size || $[30] !== styles || $[31] !== suffix || $[32] !== variant) {
68
- t1 = /*#__PURE__*/ jsx(Input, {
69
- ref: ref,
74
+ if ($[20] !== forwardedRef || $[21] !== ref) {
75
+ t1 = mergeRefs(ref, forwardedRef);
76
+ $[20] = forwardedRef;
77
+ $[21] = ref;
78
+ $[22] = t1;
79
+ } else t1 = $[22];
80
+ let t2;
81
+ if ($[23] !== ariaLabel || $[24] !== className || $[25] !== classNames || $[26] !== disabled || $[27] !== error || $[28] !== id || $[29] !== inputRest || $[30] !== name || $[31] !== placeholder || $[32] !== prefix || $[33] !== size || $[34] !== status || $[35] !== styles || $[36] !== suffix || $[37] !== t1 || $[38] !== variant) {
82
+ t2 = /*#__PURE__*/ jsx(Input, {
83
+ ref: t1,
70
84
  prefix: prefix,
71
85
  suffix: suffix,
72
86
  size: size,
73
87
  variant: variant,
74
88
  error: error,
89
+ status: status,
75
90
  disabled: disabled,
76
91
  placeholder: placeholder,
77
92
  id: id,
@@ -82,23 +97,24 @@ function InputNumber(t0) {
82
97
  styles: styles,
83
98
  ...inputRest
84
99
  });
85
- $[18] = ariaLabel;
86
- $[19] = className;
87
- $[20] = classNames;
88
- $[21] = disabled;
89
- $[22] = error;
90
- $[23] = id;
91
- $[24] = inputRest;
92
- $[25] = name;
93
- $[26] = placeholder;
94
- $[27] = prefix;
95
- $[28] = ref;
96
- $[29] = size;
97
- $[30] = styles;
98
- $[31] = suffix;
99
- $[32] = variant;
100
- $[33] = t1;
101
- } else t1 = $[33];
102
- return t1;
100
+ $[23] = ariaLabel;
101
+ $[24] = className;
102
+ $[25] = classNames;
103
+ $[26] = disabled;
104
+ $[27] = error;
105
+ $[28] = id;
106
+ $[29] = inputRest;
107
+ $[30] = name;
108
+ $[31] = placeholder;
109
+ $[32] = prefix;
110
+ $[33] = size;
111
+ $[34] = status;
112
+ $[35] = styles;
113
+ $[36] = suffix;
114
+ $[37] = t1;
115
+ $[38] = variant;
116
+ $[39] = t2;
117
+ } else t2 = $[39];
118
+ return t2;
103
119
  }
104
120
  export { InputNumber };
@@ -93,7 +93,8 @@ button[data-tao-modal-close] {
93
93
  color: var(--tao-color-text-tertiary);
94
94
  cursor: pointer;
95
95
  margin: 0;
96
- transition: all var(--tao-motion-duration-fast) ease-out;
96
+ transition: background-color var(--tao-motion-duration-fast) ease-out,
97
+ color var(--tao-motion-duration-fast) ease-out;
97
98
  appearance: none;
98
99
  background: none;
99
100
  border: none;
@@ -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 './radio.css';
@@ -13,8 +13,9 @@ export interface RadioProps {
13
13
  name?: string;
14
14
  classNames?: SemanticClassNames<RadioSemanticPart>;
15
15
  styles?: SemanticStyles<RadioSemanticPart>;
16
+ ref?: Ref<HTMLInputElement>;
16
17
  }
17
- export declare function Radio({ value, checked, disabled, onChange, children, name, classNames, styles, }: RadioProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function Radio({ value, checked, defaultChecked, disabled, onChange, children, name, classNames, styles, ref, }: RadioProps): import("react/jsx-runtime").JSX.Element;
18
19
  export type RadioOptionType = {
19
20
  label: ReactNode;
20
21
  value: string;
@@ -6,8 +6,8 @@ import { cx } from "../../utils/semantic.js";
6
6
  import "./radio.css";
7
7
  const RadioGroupContext = /*#__PURE__*/ createContext(null);
8
8
  function Radio(t0) {
9
- const $ = c(31);
10
- const { value, checked, disabled, onChange, children, name, classNames, styles } = t0;
9
+ const $ = c(33);
10
+ const { value, checked, defaultChecked, disabled, onChange, children, name, classNames, styles, ref } = t0;
11
11
  const ctx = useTaoConfig();
12
12
  const groupCtx = useContext(RadioGroupContext);
13
13
  const resolvedDisabled = disabled ?? groupCtx?.disabled ?? ctx.disabled ?? false;
@@ -35,47 +35,51 @@ function Radio(t0) {
35
35
  } else t4 = $[5];
36
36
  const t5 = styles?.root;
37
37
  let t6;
38
- if ($[6] !== handleChange || $[7] !== resolvedChecked || $[8] !== resolvedDisabled || $[9] !== resolvedName || $[10] !== value) {
38
+ if ($[6] !== defaultChecked || $[7] !== handleChange || $[8] !== ref || $[9] !== resolvedChecked || $[10] !== resolvedDisabled || $[11] !== resolvedName || $[12] !== value) {
39
39
  t6 = /*#__PURE__*/ jsx("input", {
40
+ ref: ref,
40
41
  type: "radio",
41
42
  name: resolvedName,
42
43
  value: value,
43
44
  checked: resolvedChecked,
45
+ defaultChecked: defaultChecked,
44
46
  disabled: resolvedDisabled,
45
47
  onChange: handleChange,
46
48
  "data-tao-radio-input": ""
47
49
  });
48
- $[6] = handleChange;
49
- $[7] = resolvedChecked;
50
- $[8] = resolvedDisabled;
51
- $[9] = resolvedName;
52
- $[10] = value;
53
- $[11] = t6;
54
- } else t6 = $[11];
50
+ $[6] = defaultChecked;
51
+ $[7] = handleChange;
52
+ $[8] = ref;
53
+ $[9] = resolvedChecked;
54
+ $[10] = resolvedDisabled;
55
+ $[11] = resolvedName;
56
+ $[12] = value;
57
+ $[13] = t6;
58
+ } else t6 = $[13];
55
59
  const t7 = resolvedChecked || void 0;
56
60
  const t8 = classNames?.indicator;
57
61
  let t9;
58
- if ($[12] !== t8) {
62
+ if ($[14] !== t8) {
59
63
  t9 = cx(t8);
60
- $[12] = t8;
61
- $[13] = t9;
62
- } else t9 = $[13];
64
+ $[14] = t8;
65
+ $[15] = t9;
66
+ } else t9 = $[15];
63
67
  const t10 = styles?.indicator;
64
68
  let t11;
65
- if ($[14] !== t10 || $[15] !== t7 || $[16] !== t9) {
69
+ if ($[16] !== t10 || $[17] !== t7 || $[18] !== t9) {
66
70
  t11 = /*#__PURE__*/ jsx("span", {
67
71
  "data-tao-radio": "",
68
72
  "data-tao-checked": t7,
69
73
  className: t9,
70
74
  style: t10
71
75
  });
72
- $[14] = t10;
73
- $[15] = t7;
74
- $[16] = t9;
75
- $[17] = t11;
76
- } else t11 = $[17];
76
+ $[16] = t10;
77
+ $[17] = t7;
78
+ $[18] = t9;
79
+ $[19] = t11;
80
+ } else t11 = $[19];
77
81
  let t12;
78
- if ($[18] !== t11 || $[19] !== t6) {
82
+ if ($[20] !== t11 || $[21] !== t6) {
79
83
  t12 = /*#__PURE__*/ jsxs("span", {
80
84
  "data-tao-radio-control": "",
81
85
  children: [
@@ -83,25 +87,25 @@ function Radio(t0) {
83
87
  t11
84
88
  ]
85
89
  });
86
- $[18] = t11;
87
- $[19] = t6;
88
- $[20] = t12;
89
- } else t12 = $[20];
90
+ $[20] = t11;
91
+ $[21] = t6;
92
+ $[22] = t12;
93
+ } else t12 = $[22];
90
94
  let t13;
91
- if ($[21] !== children || $[22] !== classNames?.label || $[23] !== styles?.label) {
95
+ if ($[23] !== children || $[24] !== classNames?.label || $[25] !== styles?.label) {
92
96
  t13 = null != children && /*#__PURE__*/ jsx("span", {
93
97
  "data-tao-radio-label": "",
94
98
  className: cx(classNames?.label),
95
99
  style: styles?.label,
96
100
  children: children
97
101
  });
98
- $[21] = children;
99
- $[22] = classNames?.label;
100
- $[23] = styles?.label;
101
- $[24] = t13;
102
- } else t13 = $[24];
102
+ $[23] = children;
103
+ $[24] = classNames?.label;
104
+ $[25] = styles?.label;
105
+ $[26] = t13;
106
+ } else t13 = $[26];
103
107
  let t14;
104
- if ($[25] !== t12 || $[26] !== t13 || $[27] !== t2 || $[28] !== t4 || $[29] !== t5) {
108
+ if ($[27] !== t12 || $[28] !== t13 || $[29] !== t2 || $[30] !== t4 || $[31] !== t5) {
105
109
  t14 = /*#__PURE__*/ jsxs("label", {
106
110
  "data-tao-radio-wrapper": "",
107
111
  "data-tao-disabled": t2,
@@ -112,13 +116,13 @@ function Radio(t0) {
112
116
  t13
113
117
  ]
114
118
  });
115
- $[25] = t12;
116
- $[26] = t13;
117
- $[27] = t2;
118
- $[28] = t4;
119
- $[29] = t5;
120
- $[30] = t14;
121
- } else t14 = $[30];
119
+ $[27] = t12;
120
+ $[28] = t13;
121
+ $[29] = t2;
122
+ $[30] = t4;
123
+ $[31] = t5;
124
+ $[32] = t14;
125
+ } else t14 = $[32];
122
126
  return t14;
123
127
  }
124
128
  function RadioGroup(t0) {
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import { type SelectOption } from './select';
2
+ import type { SelectOption } from './select-types';
3
3
  import './mobile-select.css';
4
4
  interface MobileSelectContentProps {
5
5
  options: SelectOption[];
@@ -2,7 +2,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { useCallback, useMemo, useState } from "react";
4
4
  import { Drawer } from "../drawer/drawer.js";
5
- import { SearchIcon } from "./select.js";
5
+ import { SearchIcon } from "./select-icons.js";
6
6
  import "./mobile-select.css";
7
7
  const defaultFilter = (input, option)=>{
8
8
  const label = 'string' == typeof option.label ? option.label : String(option.label);
@@ -0,0 +1,7 @@
1
+ export declare function ChevronDownIcon(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function CheckIcon(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function CloseIcon({ small }: {
4
+ small?: boolean;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export declare function SearchIcon(): import("react/jsx-runtime").JSX.Element;
7
+ export declare function LoadingIcon(): import("react/jsx-runtime").JSX.Element;