@rockshin/tao-ui 0.0.1

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/LICENSE +21 -0
  2. package/README.md +65 -0
  3. package/dist/components/button/button.css +1055 -0
  4. package/dist/components/button/button.d.ts +15 -0
  5. package/dist/components/button/button.js +93 -0
  6. package/dist/components/checkbox/checkbox.css +1035 -0
  7. package/dist/components/checkbox/checkbox.d.ts +33 -0
  8. package/dist/components/checkbox/checkbox.js +312 -0
  9. package/dist/components/date-picker/calendar/calendar-grid.d.ts +18 -0
  10. package/dist/components/date-picker/calendar/calendar-grid.js +173 -0
  11. package/dist/components/date-picker/calendar/calendar-header.d.ts +10 -0
  12. package/dist/components/date-picker/calendar/calendar-header.js +336 -0
  13. package/dist/components/date-picker/calendar/month-grid.d.ts +9 -0
  14. package/dist/components/date-picker/calendar/month-grid.js +61 -0
  15. package/dist/components/date-picker/calendar/time-panel.d.ts +12 -0
  16. package/dist/components/date-picker/calendar/time-panel.js +233 -0
  17. package/dist/components/date-picker/calendar/use-calendar.d.ts +15 -0
  18. package/dist/components/date-picker/calendar/use-calendar.js +24 -0
  19. package/dist/components/date-picker/calendar/year-grid.d.ts +9 -0
  20. package/dist/components/date-picker/calendar/year-grid.js +60 -0
  21. package/dist/components/date-picker/date-picker.css +1799 -0
  22. package/dist/components/date-picker/date-picker.d.ts +29 -0
  23. package/dist/components/date-picker/date-picker.js +663 -0
  24. package/dist/components/date-picker/presets.d.ts +9 -0
  25. package/dist/components/date-picker/presets.js +36 -0
  26. package/dist/components/date-picker/range-picker.d.ts +30 -0
  27. package/dist/components/date-picker/range-picker.js +432 -0
  28. package/dist/components/date-picker/types.d.ts +39 -0
  29. package/dist/components/date-picker/types.js +7 -0
  30. package/dist/components/drawer/drawer.css +1112 -0
  31. package/dist/components/drawer/drawer.d.ts +17 -0
  32. package/dist/components/drawer/drawer.js +184 -0
  33. package/dist/components/form-actions/form-actions.d.ts +12 -0
  34. package/dist/components/form-actions/form-actions.js +42 -0
  35. package/dist/components/form-field/form-field.d.ts +17 -0
  36. package/dist/components/form-field/form-field.js +101 -0
  37. package/dist/components/form-field/form.css +1036 -0
  38. package/dist/components/form-section/form-section.d.ts +14 -0
  39. package/dist/components/form-section/form-section.js +92 -0
  40. package/dist/components/input/input.css +1185 -0
  41. package/dist/components/input/input.d.ts +15 -0
  42. package/dist/components/input/input.js +143 -0
  43. package/dist/components/pagination/pagination.css +1099 -0
  44. package/dist/components/pagination/pagination.d.ts +22 -0
  45. package/dist/components/pagination/pagination.js +310 -0
  46. package/dist/components/radio/radio.css +1045 -0
  47. package/dist/components/radio/radio.d.ts +34 -0
  48. package/dist/components/radio/radio.js +215 -0
  49. package/dist/components/scroll-area/scroll-area.css +1099 -0
  50. package/dist/components/scroll-area/scroll-area.d.ts +33 -0
  51. package/dist/components/scroll-area/scroll-area.js +375 -0
  52. package/dist/components/select/mobile-select.css +1044 -0
  53. package/dist/components/select/mobile-select.d.ts +19 -0
  54. package/dist/components/select/mobile-select.js +224 -0
  55. package/dist/components/select/select.css +1327 -0
  56. package/dist/components/select/select.d.ts +32 -0
  57. package/dist/components/select/select.js +532 -0
  58. package/dist/components/select/use-is-mobile.d.ts +1 -0
  59. package/dist/components/select/use-is-mobile.js +30 -0
  60. package/dist/components/splitter/splitter.css +1104 -0
  61. package/dist/components/splitter/splitter.d.ts +33 -0
  62. package/dist/components/splitter/splitter.js +451 -0
  63. package/dist/components/switch/switch.css +1170 -0
  64. package/dist/components/switch/switch.d.ts +19 -0
  65. package/dist/components/switch/switch.js +143 -0
  66. package/dist/components/table/table.css +1255 -0
  67. package/dist/components/table/table.d.ts +73 -0
  68. package/dist/components/table/table.js +1022 -0
  69. package/dist/components/tabs/tabs.css +1076 -0
  70. package/dist/components/tabs/tabs.d.ts +24 -0
  71. package/dist/components/tabs/tabs.js +256 -0
  72. package/dist/components/tag/tag.css +1124 -0
  73. package/dist/components/tag/tag.d.ts +33 -0
  74. package/dist/components/tag/tag.js +237 -0
  75. package/dist/index.d.ts +23 -0
  76. package/dist/index.js +23 -0
  77. package/dist/layouts/form-layout/form-layout.d.ts +6 -0
  78. package/dist/layouts/form-layout/form-layout.js +18 -0
  79. package/dist/layouts/stack/layout.css +1003 -0
  80. package/dist/layouts/stack/stack.d.ts +9 -0
  81. package/dist/layouts/stack/stack.js +27 -0
  82. package/dist/number-input/cursor.d.ts +9 -0
  83. package/dist/number-input/cursor.js +44 -0
  84. package/dist/number-input/format.d.ts +5 -0
  85. package/dist/number-input/format.js +50 -0
  86. package/dist/number-input/index.d.ts +5 -0
  87. package/dist/number-input/index.js +2 -0
  88. package/dist/number-input/number-input.d.ts +9 -0
  89. package/dist/number-input/number-input.js +101 -0
  90. package/dist/number-input/percentage.d.ts +3 -0
  91. package/dist/number-input/percentage.js +28 -0
  92. package/dist/number-input/types.d.ts +5 -0
  93. package/dist/number-input/types.js +0 -0
  94. package/dist/number-input/use-number-input.d.ts +30 -0
  95. package/dist/number-input/use-number-input.js +211 -0
  96. package/dist/number-input/validate.d.ts +3 -0
  97. package/dist/number-input/validate.js +17 -0
  98. package/dist/provider/tao-provider.d.ts +42 -0
  99. package/dist/provider/tao-provider.js +67 -0
  100. package/dist/theme/control.css +1061 -0
  101. package/dist/theme/theme.css +957 -0
  102. package/dist/utils/semantic.d.ts +10 -0
  103. package/dist/utils/semantic.js +5 -0
  104. package/llms.txt +67 -0
  105. package/package.json +97 -0
@@ -0,0 +1,14 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
3
+ import '../form-field/form.css';
4
+ export type FormSectionSemanticPart = 'root' | 'header' | 'title' | 'description' | 'body';
5
+ export interface FormSectionProps {
6
+ title?: string;
7
+ description?: string;
8
+ children: ReactNode;
9
+ className?: string;
10
+ style?: CSSProperties;
11
+ classNames?: SemanticClassNames<FormSectionSemanticPart>;
12
+ styles?: SemanticStyles<FormSectionSemanticPart>;
13
+ }
14
+ export declare function FormSection({ title, description, children, className, style, classNames, styles, }: FormSectionProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,92 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
3
+ import { cx } from "../../utils/semantic.js";
4
+ import "../form-field/form.css";
5
+ function FormSection(t0) {
6
+ const $ = c(24);
7
+ const { title, description, children, className, style, classNames, styles } = t0;
8
+ const t1 = classNames?.root;
9
+ let t2;
10
+ if ($[0] !== className || $[1] !== t1) {
11
+ t2 = cx(t1, className);
12
+ $[0] = className;
13
+ $[1] = t1;
14
+ $[2] = t2;
15
+ } else t2 = $[2];
16
+ const t3 = styles?.root;
17
+ let t4;
18
+ if ($[3] !== style || $[4] !== t3) {
19
+ t4 = {
20
+ ...t3,
21
+ ...style
22
+ };
23
+ $[3] = style;
24
+ $[4] = t3;
25
+ $[5] = t4;
26
+ } else t4 = $[5];
27
+ let t5;
28
+ if ($[6] !== classNames?.description || $[7] !== classNames?.header || $[8] !== classNames?.title || $[9] !== description || $[10] !== styles?.description || $[11] !== styles?.header || $[12] !== styles?.title || $[13] !== title) {
29
+ t5 = (title || description) && /*#__PURE__*/ jsxs("div", {
30
+ className: classNames?.header,
31
+ style: styles?.header,
32
+ "data-tao-form-section-header": "",
33
+ children: [
34
+ title && /*#__PURE__*/ jsx("legend", {
35
+ className: classNames?.title,
36
+ style: styles?.title,
37
+ "data-tao-form-section-title": "",
38
+ children: title
39
+ }),
40
+ description && /*#__PURE__*/ jsx("p", {
41
+ className: classNames?.description,
42
+ style: styles?.description,
43
+ "data-tao-form-section-description": "",
44
+ children: description
45
+ })
46
+ ]
47
+ });
48
+ $[6] = classNames?.description;
49
+ $[7] = classNames?.header;
50
+ $[8] = classNames?.title;
51
+ $[9] = description;
52
+ $[10] = styles?.description;
53
+ $[11] = styles?.header;
54
+ $[12] = styles?.title;
55
+ $[13] = title;
56
+ $[14] = t5;
57
+ } else t5 = $[14];
58
+ const t6 = classNames?.body;
59
+ const t7 = styles?.body;
60
+ let t8;
61
+ if ($[15] !== children || $[16] !== t6 || $[17] !== t7) {
62
+ t8 = /*#__PURE__*/ jsx("div", {
63
+ className: t6,
64
+ style: t7,
65
+ "data-tao-form-section-body": "",
66
+ children: children
67
+ });
68
+ $[15] = children;
69
+ $[16] = t6;
70
+ $[17] = t7;
71
+ $[18] = t8;
72
+ } else t8 = $[18];
73
+ let t9;
74
+ if ($[19] !== t2 || $[20] !== t4 || $[21] !== t5 || $[22] !== t8) {
75
+ t9 = /*#__PURE__*/ jsxs("fieldset", {
76
+ className: t2,
77
+ style: t4,
78
+ "data-tao-form-section": "",
79
+ children: [
80
+ t5,
81
+ t8
82
+ ]
83
+ });
84
+ $[19] = t2;
85
+ $[20] = t4;
86
+ $[21] = t5;
87
+ $[22] = t8;
88
+ $[23] = t9;
89
+ } else t9 = $[23];
90
+ return t9;
91
+ }
92
+ export { FormSection };