@demokit-ui/demokit 0.1.0 → 0.1.2

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 (190) hide show
  1. package/README.md +3 -0
  2. package/dist/app/demo1-shell.js +195 -188
  3. package/dist/app/tweak-panel.d.ts +1 -2
  4. package/dist/app/tweak-panel.js +20 -4
  5. package/dist/index.js +811 -479
  6. package/dist/kit/components/chart/chart/chart.examples.d.ts +24 -0
  7. package/dist/kit/components/chart/chart/chart.examples.js +422 -0
  8. package/dist/kit/components/composite/action-bar/action-bar.examples.d.ts +2 -0
  9. package/dist/kit/components/composite/action-bar/action-bar.examples.js +35 -0
  10. package/dist/kit/components/composite/action-card/action-card.examples.d.ts +2 -0
  11. package/dist/kit/components/composite/action-card/action-card.examples.js +34 -0
  12. package/dist/kit/components/composite/activity-feed/activity-feed.examples.d.ts +2 -0
  13. package/dist/kit/components/composite/activity-feed/activity-feed.examples.js +44 -0
  14. package/dist/kit/components/composite/alert-card/alert-card.examples.d.ts +2 -0
  15. package/dist/kit/components/composite/alert-card/alert-card.examples.js +18 -0
  16. package/dist/kit/components/composite/approval-flow/approval-flow.examples.d.ts +2 -0
  17. package/dist/kit/components/composite/approval-flow/approval-flow.examples.js +70 -0
  18. package/dist/kit/components/composite/auth-shell/auth-shell.examples.d.ts +2 -0
  19. package/dist/kit/components/composite/auth-shell/auth-shell.examples.js +23 -0
  20. package/dist/kit/components/composite/board-toolbar/board-toolbar.examples.d.ts +2 -0
  21. package/dist/kit/components/composite/board-toolbar/board-toolbar.examples.js +32 -0
  22. package/dist/kit/components/composite/chart-card/chart-card.examples.d.ts +3 -0
  23. package/dist/kit/components/composite/chart-card/chart-card.examples.js +58 -0
  24. package/dist/kit/components/composite/chart-toolbar/chart-toolbar.examples.d.ts +2 -0
  25. package/dist/kit/components/composite/chart-toolbar/chart-toolbar.examples.js +39 -0
  26. package/dist/kit/components/composite/data-section/data-section.examples.d.ts +3 -0
  27. package/dist/kit/components/composite/data-section/data-section.examples.js +48 -0
  28. package/dist/kit/components/composite/description-grid/description-grid.examples.d.ts +2 -0
  29. package/dist/kit/components/composite/description-grid/description-grid.examples.js +30 -0
  30. package/dist/kit/components/composite/detail-header/detail-header.examples.d.ts +2 -0
  31. package/dist/kit/components/composite/detail-header/detail-header.examples.js +37 -0
  32. package/dist/kit/components/composite/filter-panel/filter-panel.examples.d.ts +2 -0
  33. package/dist/kit/components/composite/filter-panel/filter-panel.examples.js +63 -0
  34. package/dist/kit/components/composite/filter-toolbar/filter-toolbar.examples.d.ts +2 -0
  35. package/dist/kit/components/composite/filter-toolbar/filter-toolbar.examples.js +39 -0
  36. package/dist/kit/components/composite/forgot-password-form/forgot-password-form.examples.d.ts +2 -0
  37. package/dist/kit/components/composite/forgot-password-form/forgot-password-form.examples.js +19 -0
  38. package/dist/kit/components/composite/form-section/form-section.examples.d.ts +2 -0
  39. package/dist/kit/components/composite/form-section/form-section.examples.js +40 -0
  40. package/dist/kit/components/composite/kanban-board/kanban-board.examples.d.ts +2 -0
  41. package/dist/kit/components/composite/kanban-board/kanban-board.examples.js +72 -0
  42. package/dist/kit/components/composite/login-card/login-card.examples.d.ts +3 -0
  43. package/dist/kit/components/composite/login-card/login-card.examples.js +30 -0
  44. package/dist/kit/components/composite/message-list-card/message-list-card.examples.d.ts +2 -0
  45. package/dist/kit/components/composite/message-list-card/message-list-card.examples.js +56 -0
  46. package/dist/kit/components/composite/metric-card/metric-card.examples.d.ts +2 -0
  47. package/dist/kit/components/composite/metric-card/metric-card.examples.js +50 -0
  48. package/dist/kit/components/composite/milestone-card/milestone-card.examples.d.ts +2 -0
  49. package/dist/kit/components/composite/milestone-card/milestone-card.examples.js +54 -0
  50. package/dist/kit/components/composite/oauth-login-buttons/oauth-login-buttons.examples.d.ts +2 -0
  51. package/dist/kit/components/composite/oauth-login-buttons/oauth-login-buttons.examples.js +24 -0
  52. package/dist/kit/components/composite/page-header/page-header.examples.d.ts +3 -0
  53. package/dist/kit/components/composite/page-header/page-header.examples.js +56 -0
  54. package/dist/kit/components/composite/profile-card/profile-card.examples.d.ts +2 -0
  55. package/dist/kit/components/composite/profile-card/profile-card.examples.js +45 -0
  56. package/dist/kit/components/composite/progress-card/progress-card.examples.d.ts +2 -0
  57. package/dist/kit/components/composite/progress-card/progress-card.examples.js +42 -0
  58. package/dist/kit/components/composite/project-card/project-card.examples.d.ts +2 -0
  59. package/dist/kit/components/composite/project-card/project-card.examples.js +48 -0
  60. package/dist/kit/components/composite/shortcut-card/shortcut-card.examples.d.ts +2 -0
  61. package/dist/kit/components/composite/shortcut-card/shortcut-card.examples.js +18 -0
  62. package/dist/kit/components/composite/sprint-summary/sprint-summary.examples.d.ts +2 -0
  63. package/dist/kit/components/composite/sprint-summary/sprint-summary.examples.js +27 -0
  64. package/dist/kit/components/composite/state-panel/state-panel.examples.d.ts +2 -0
  65. package/dist/kit/components/composite/state-panel/state-panel.examples.js +48 -0
  66. package/dist/kit/components/composite/summary-card/summary-card.examples.d.ts +2 -0
  67. package/dist/kit/components/composite/summary-card/summary-card.examples.js +32 -0
  68. package/dist/kit/components/composite/task-card/task-card.examples.d.ts +2 -0
  69. package/dist/kit/components/composite/task-card/task-card.examples.js +39 -0
  70. package/dist/kit/components/composite/timeline/timeline.examples.d.ts +2 -0
  71. package/dist/kit/components/composite/timeline/timeline.examples.js +75 -0
  72. package/dist/kit/components/composite/todo-card/todo-card.examples.d.ts +2 -0
  73. package/dist/kit/components/composite/todo-card/todo-card.examples.js +42 -0
  74. package/dist/kit/components/data-display/avatar/avatar.examples.d.ts +7 -0
  75. package/dist/kit/components/data-display/avatar/avatar.examples.js +48 -0
  76. package/dist/kit/components/data-display/avatar-group/avatar-group.examples.d.ts +3 -0
  77. package/dist/kit/components/data-display/avatar-group/avatar-group.examples.js +35 -0
  78. package/dist/kit/components/data-display/badge/badge.examples.d.ts +9 -0
  79. package/dist/kit/components/data-display/badge/badge.examples.js +57 -0
  80. package/dist/kit/components/data-display/card/card.examples.d.ts +16 -0
  81. package/dist/kit/components/data-display/card/card.examples.js +72 -0
  82. package/dist/kit/components/data-display/data-grid/data-grid.examples.d.ts +2 -0
  83. package/dist/kit/components/data-display/data-grid/data-grid.examples.js +92 -0
  84. package/dist/kit/components/data-display/kbd/kbd.examples.d.ts +3 -0
  85. package/dist/kit/components/data-display/kbd/kbd.examples.js +43 -0
  86. package/dist/kit/components/data-display/money-amount/money-amount.examples.d.ts +1 -0
  87. package/dist/kit/components/data-display/money-amount/money-amount.examples.js +26 -0
  88. package/dist/kit/components/data-display/progress/progress.examples.d.ts +3 -0
  89. package/dist/kit/components/data-display/progress/progress.examples.js +45 -0
  90. package/dist/kit/components/data-display/skeleton/skeleton.examples.d.ts +3 -0
  91. package/dist/kit/components/data-display/skeleton/skeleton.examples.js +37 -0
  92. package/dist/kit/components/data-display/sliding-number/sliding-number.examples.d.ts +3 -0
  93. package/dist/kit/components/data-display/sliding-number/sliding-number.examples.js +42 -0
  94. package/dist/kit/components/data-display/stepper/stepper.examples.d.ts +2 -0
  95. package/dist/kit/components/data-display/stepper/stepper.examples.js +28 -0
  96. package/dist/kit/components/data-display/table/table.examples.d.ts +4 -0
  97. package/dist/kit/components/data-display/table/table.examples.js +78 -0
  98. package/dist/kit/components/decorative/aurora-background/aurora-background.examples.d.ts +2 -0
  99. package/dist/kit/components/decorative/aurora-background/aurora-background.examples.js +22 -0
  100. package/dist/kit/components/decorative/grid-background/grid-background.examples.d.ts +4 -0
  101. package/dist/kit/components/decorative/grid-background/grid-background.examples.js +42 -0
  102. package/dist/kit/components/decorative/shimmering-text/shimmering-text.examples.d.ts +4 -0
  103. package/dist/kit/components/decorative/shimmering-text/shimmering-text.examples.js +54 -0
  104. package/dist/kit/components/decorative/text-reveal/text-reveal.examples.d.ts +2 -0
  105. package/dist/kit/components/decorative/text-reveal/text-reveal.examples.js +46 -0
  106. package/dist/kit/components/feedback/alert/alert.examples.d.ts +2 -0
  107. package/dist/kit/components/feedback/alert/alert.examples.js +37 -0
  108. package/dist/kit/components/feedback/alert-dialog/alert-dialog.examples.d.ts +2 -0
  109. package/dist/kit/components/feedback/alert-dialog/alert-dialog.examples.js +28 -0
  110. package/dist/kit/components/feedback/context-menu/context-menu.examples.d.ts +2 -0
  111. package/dist/kit/components/feedback/context-menu/context-menu.examples.js +33 -0
  112. package/dist/kit/components/feedback/dialog/dialog.examples.d.ts +2 -0
  113. package/dist/kit/components/feedback/dialog/dialog.examples.js +51 -0
  114. package/dist/kit/components/feedback/drawer/drawer.examples.d.ts +2 -0
  115. package/dist/kit/components/feedback/drawer/drawer.examples.js +29 -0
  116. package/dist/kit/components/feedback/dropdown-menu/dropdown-menu.examples.d.ts +3 -0
  117. package/dist/kit/components/feedback/dropdown-menu/dropdown-menu.examples.js +54 -0
  118. package/dist/kit/components/feedback/hover-card/hover-card.examples.d.ts +2 -0
  119. package/dist/kit/components/feedback/hover-card/hover-card.examples.js +27 -0
  120. package/dist/kit/components/feedback/popover/popover.examples.d.ts +2 -0
  121. package/dist/kit/components/feedback/popover/popover.examples.js +42 -0
  122. package/dist/kit/components/feedback/sheet/sheet.examples.d.ts +2 -0
  123. package/dist/kit/components/feedback/sheet/sheet.examples.js +39 -0
  124. package/dist/kit/components/feedback/sonner/sonner.examples.d.ts +3 -0
  125. package/dist/kit/components/feedback/sonner/sonner.examples.js +49 -0
  126. package/dist/kit/components/feedback/title-help/title-help.examples.d.ts +1 -0
  127. package/dist/kit/components/feedback/title-help/title-help.examples.js +25 -0
  128. package/dist/kit/components/feedback/tooltip/tooltip.examples.d.ts +3 -0
  129. package/dist/kit/components/feedback/tooltip/tooltip.examples.js +44 -0
  130. package/dist/kit/components/form/button/button.examples.d.ts +13 -0
  131. package/dist/kit/components/form/button/button.examples.js +84 -0
  132. package/dist/kit/components/form/calendar/calendar.examples.d.ts +2 -0
  133. package/dist/kit/components/form/calendar/calendar.examples.js +23 -0
  134. package/dist/kit/components/form/checkbox/checkbox.examples.d.ts +4 -0
  135. package/dist/kit/components/form/checkbox/checkbox.examples.js +72 -0
  136. package/dist/kit/components/form/command/command.examples.d.ts +3 -0
  137. package/dist/kit/components/form/command/command.examples.js +52 -0
  138. package/dist/kit/components/form/datefield/datefield.examples.d.ts +2 -0
  139. package/dist/kit/components/form/datefield/datefield.examples.js +19 -0
  140. package/dist/kit/components/form/file-upload/file-upload.examples.d.ts +1 -0
  141. package/dist/kit/components/form/file-upload/file-upload.examples.js +18 -0
  142. package/dist/kit/components/form/form/form.examples.d.ts +2 -0
  143. package/dist/kit/components/form/form/form.examples.js +77 -0
  144. package/dist/kit/components/form/input/input.examples.d.ts +5 -0
  145. package/dist/kit/components/form/input/input.examples.js +64 -0
  146. package/dist/kit/components/form/label/label.examples.d.ts +4 -0
  147. package/dist/kit/components/form/label/label.examples.js +49 -0
  148. package/dist/kit/components/form/radio-group/radio-group.examples.d.ts +3 -0
  149. package/dist/kit/components/form/radio-group/radio-group.examples.js +40 -0
  150. package/dist/kit/components/form/select/select.examples.d.ts +3 -0
  151. package/dist/kit/components/form/select/select.examples.js +58 -0
  152. package/dist/kit/components/form/slider/slider.examples.d.ts +3 -0
  153. package/dist/kit/components/form/slider/slider.examples.js +46 -0
  154. package/dist/kit/components/form/switch/switch.examples.d.ts +3 -0
  155. package/dist/kit/components/form/switch/switch.examples.js +37 -0
  156. package/dist/kit/components/form/textarea/textarea.examples.d.ts +3 -0
  157. package/dist/kit/components/form/textarea/textarea.examples.js +49 -0
  158. package/dist/kit/components/form/toggle/toggle.examples.d.ts +3 -0
  159. package/dist/kit/components/form/toggle/toggle.examples.js +33 -0
  160. package/dist/kit/components/form/toggle-group/toggle-group.examples.d.ts +4 -0
  161. package/dist/kit/components/form/toggle-group/toggle-group.examples.js +46 -0
  162. package/dist/kit/components/index.d.ts +91 -0
  163. package/dist/kit/components/layout/accordion/accordion.examples.d.ts +2 -0
  164. package/dist/kit/components/layout/accordion/accordion.examples.js +34 -0
  165. package/dist/kit/components/layout/aspect-ratio/aspect-ratio.examples.d.ts +3 -0
  166. package/dist/kit/components/layout/aspect-ratio/aspect-ratio.examples.js +29 -0
  167. package/dist/kit/components/layout/collapsible/collapsible.examples.d.ts +2 -0
  168. package/dist/kit/components/layout/collapsible/collapsible.examples.js +28 -0
  169. package/dist/kit/components/layout/resizable/resizable.examples.d.ts +2 -0
  170. package/dist/kit/components/layout/resizable/resizable.examples.js +26 -0
  171. package/dist/kit/components/layout/scroll-area/scroll-area.examples.d.ts +2 -0
  172. package/dist/kit/components/layout/scroll-area/scroll-area.examples.js +16 -0
  173. package/dist/kit/components/layout/separator/separator.examples.d.ts +3 -0
  174. package/dist/kit/components/layout/separator/separator.examples.js +35 -0
  175. package/dist/kit/components/navigation/accordion-menu/accordion-menu.examples.d.ts +2 -0
  176. package/dist/kit/components/navigation/accordion-menu/accordion-menu.examples.js +36 -0
  177. package/dist/kit/components/navigation/breadcrumb/breadcrumb.examples.d.ts +3 -0
  178. package/dist/kit/components/navigation/breadcrumb/breadcrumb.examples.js +39 -0
  179. package/dist/kit/components/navigation/menubar/menubar.examples.d.ts +2 -0
  180. package/dist/kit/components/navigation/menubar/menubar.examples.js +54 -0
  181. package/dist/kit/components/navigation/navigation-menu/navigation-menu.examples.d.ts +2 -0
  182. package/dist/kit/components/navigation/navigation-menu/navigation-menu.examples.js +31 -0
  183. package/dist/kit/components/navigation/pagination/pagination.examples.d.ts +2 -0
  184. package/dist/kit/components/navigation/pagination/pagination.examples.js +42 -0
  185. package/dist/kit/components/navigation/scrollspy/scrollspy.examples.d.ts +2 -0
  186. package/dist/kit/components/navigation/scrollspy/scrollspy.examples.js +68 -0
  187. package/dist/kit/components/navigation/tabs/tabs.examples.d.ts +5 -0
  188. package/dist/kit/components/navigation/tabs/tabs.examples.js +43 -0
  189. package/dist/styles.css +29 -12
  190. package/package.json +7 -2
@@ -0,0 +1,77 @@
1
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
+ import { useForm as h } from "react-hook-form";
3
+ import { Form as u, FormField as l, FormItem as t, FormLabel as i, FormControl as m, FormMessage as c, FormDescription as p } from "./form.js";
4
+ import { Input as a } from "../input/input.js";
5
+ import { Textarea as f } from "../textarea/textarea.js";
6
+ import { Button as s } from "../button/button.js";
7
+ function x() {
8
+ const o = h({
9
+ defaultValues: { name: "", email: "", note: "" }
10
+ }), d = (n) => {
11
+ alert(JSON.stringify(n, null, 2));
12
+ };
13
+ return /* @__PURE__ */ e(u, { ...o, children: /* @__PURE__ */ r("form", { onSubmit: o.handleSubmit(d), className: "space-y-4 w-80", children: [
14
+ /* @__PURE__ */ e(
15
+ l,
16
+ {
17
+ control: o.control,
18
+ name: "name",
19
+ rules: { required: "姓名必填" },
20
+ render: ({ field: n }) => /* @__PURE__ */ r(t, { children: [
21
+ /* @__PURE__ */ r(i, { children: [
22
+ "姓名 ",
23
+ /* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
24
+ ] }),
25
+ /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(a, { placeholder: "请输入姓名", ...n }) }),
26
+ /* @__PURE__ */ e(c, {})
27
+ ] })
28
+ }
29
+ ),
30
+ /* @__PURE__ */ e(
31
+ l,
32
+ {
33
+ control: o.control,
34
+ name: "email",
35
+ rules: {
36
+ required: "邮箱必填",
37
+ pattern: { value: /.+@.+\..+/, message: "邮箱格式不正确" }
38
+ },
39
+ render: ({ field: n }) => /* @__PURE__ */ r(t, { children: [
40
+ /* @__PURE__ */ r(i, { children: [
41
+ "邮箱 ",
42
+ /* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
43
+ ] }),
44
+ /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(a, { type: "email", placeholder: "you@example.com", ...n }) }),
45
+ /* @__PURE__ */ e(p, { children: "用于接收通知" }),
46
+ /* @__PURE__ */ e(c, {})
47
+ ] })
48
+ }
49
+ ),
50
+ /* @__PURE__ */ e(
51
+ l,
52
+ {
53
+ control: o.control,
54
+ name: "note",
55
+ render: ({ field: n }) => /* @__PURE__ */ r(t, { children: [
56
+ /* @__PURE__ */ e(i, { children: "备注" }),
57
+ /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(f, { rows: 3, ...n }) }),
58
+ /* @__PURE__ */ e(c, {})
59
+ ] })
60
+ }
61
+ ),
62
+ /* @__PURE__ */ r("div", { className: "flex gap-2", children: [
63
+ /* @__PURE__ */ e(s, { type: "submit", children: "保存" }),
64
+ /* @__PURE__ */ e(s, { type: "button", variant: "outline", onClick: () => o.reset(), children: "重置" })
65
+ ] })
66
+ ] }) });
67
+ }
68
+ function S() {
69
+ return /* @__PURE__ */ e("div", { className: "flex flex-col gap-6", children: /* @__PURE__ */ r("section", { children: [
70
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "带校验的完整表单" }),
71
+ /* @__PURE__ */ e(x, {})
72
+ ] }) });
73
+ }
74
+ export {
75
+ x as FormBasic,
76
+ S as FormShowcase
77
+ };
@@ -0,0 +1,5 @@
1
+ export declare function InputBasic(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function InputTypes(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function InputWithIcon(): import("react/jsx-runtime").JSX.Element;
4
+ export declare function InputStates(): import("react/jsx-runtime").JSX.Element;
5
+ export declare function InputShowcase(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,64 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { RiSearchLine as r } from "@remixicon/react";
3
+ import { Label as c } from "../label/label.js";
4
+ import { Input as s } from "./input.js";
5
+ function a() {
6
+ return /* @__PURE__ */ t("div", { className: "space-y-1.5 w-80", children: [
7
+ /* @__PURE__ */ e(c, { htmlFor: "email", children: "邮箱" }),
8
+ /* @__PURE__ */ e(s, { id: "email", type: "email", placeholder: "you@example.com" })
9
+ ] });
10
+ }
11
+ function n() {
12
+ return /* @__PURE__ */ e("div", { className: "w-80 space-y-4", children: [
13
+ ["text", "文本"],
14
+ ["password", "密码"],
15
+ ["number", "数字"],
16
+ ["url", "URL"]
17
+ ].map(([i, l]) => /* @__PURE__ */ t("div", { className: "space-y-1.5", children: [
18
+ /* @__PURE__ */ e(c, { children: l }),
19
+ /* @__PURE__ */ e(s, { type: i, placeholder: `${l}输入` })
20
+ ] }, i)) });
21
+ }
22
+ function d() {
23
+ return /* @__PURE__ */ t("div", { className: "relative w-80", children: [
24
+ /* @__PURE__ */ e(r, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 size-4 text-muted-foreground" }),
25
+ /* @__PURE__ */ e(s, { placeholder: "搜索...", className: "ps-8" })
26
+ ] });
27
+ }
28
+ function o() {
29
+ return /* @__PURE__ */ t("div", { className: "w-80 space-y-3", children: [
30
+ /* @__PURE__ */ e(s, { placeholder: "默认" }),
31
+ /* @__PURE__ */ e(s, { placeholder: "禁用", disabled: !0 }),
32
+ /* @__PURE__ */ t("div", { children: [
33
+ /* @__PURE__ */ e(s, { placeholder: "错误态", "aria-invalid": !0, className: "border-destructive focus-visible:ring-destructive/30" }),
34
+ /* @__PURE__ */ e("div", { className: "text-xs text-destructive mt-1", children: "必填字段" })
35
+ ] })
36
+ ] });
37
+ }
38
+ function f() {
39
+ return /* @__PURE__ */ t("div", { className: "flex flex-col gap-6", children: [
40
+ /* @__PURE__ */ t("section", { children: [
41
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "基础" }),
42
+ /* @__PURE__ */ e(a, {})
43
+ ] }),
44
+ /* @__PURE__ */ t("section", { children: [
45
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "类型" }),
46
+ /* @__PURE__ */ e(n, {})
47
+ ] }),
48
+ /* @__PURE__ */ t("section", { children: [
49
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "带图标" }),
50
+ /* @__PURE__ */ e(d, {})
51
+ ] }),
52
+ /* @__PURE__ */ t("section", { children: [
53
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "状态" }),
54
+ /* @__PURE__ */ e(o, {})
55
+ ] })
56
+ ] });
57
+ }
58
+ export {
59
+ a as InputBasic,
60
+ f as InputShowcase,
61
+ o as InputStates,
62
+ n as InputTypes,
63
+ d as InputWithIcon
64
+ };
@@ -0,0 +1,4 @@
1
+ export declare function LabelBasic(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function LabelRequired(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function LabelWithHint(): import("react/jsx-runtime").JSX.Element;
4
+ export declare function LabelShowcase(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,49 @@
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { Label as l } from "./label.js";
3
+ import { Input as s } from "../input/input.js";
4
+ function t() {
5
+ return /* @__PURE__ */ i("div", { className: "space-y-1.5 w-64", children: [
6
+ /* @__PURE__ */ e(l, { htmlFor: "name", children: "姓名" }),
7
+ /* @__PURE__ */ e(s, { id: "name", placeholder: "请输入姓名" })
8
+ ] });
9
+ }
10
+ function n() {
11
+ return /* @__PURE__ */ i("div", { className: "space-y-1.5 w-64", children: [
12
+ /* @__PURE__ */ i(l, { htmlFor: "email", children: [
13
+ "邮箱 ",
14
+ /* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
15
+ ] }),
16
+ /* @__PURE__ */ e(s, { id: "email", type: "email", required: !0 })
17
+ ] });
18
+ }
19
+ function r() {
20
+ return /* @__PURE__ */ i("div", { className: "space-y-1.5 w-64", children: [
21
+ /* @__PURE__ */ i("div", { className: "flex items-baseline justify-between", children: [
22
+ /* @__PURE__ */ e(l, { htmlFor: "id", children: "员工工号" }),
23
+ /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "6 位数字" })
24
+ ] }),
25
+ /* @__PURE__ */ e(s, { id: "id" })
26
+ ] });
27
+ }
28
+ function m() {
29
+ return /* @__PURE__ */ i("div", { className: "flex flex-col gap-6", children: [
30
+ /* @__PURE__ */ i("section", { children: [
31
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "基础" }),
32
+ /* @__PURE__ */ e(t, {})
33
+ ] }),
34
+ /* @__PURE__ */ i("section", { children: [
35
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "带必填 *" }),
36
+ /* @__PURE__ */ e(n, {})
37
+ ] }),
38
+ /* @__PURE__ */ i("section", { children: [
39
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "带辅助说明" }),
40
+ /* @__PURE__ */ e(r, {})
41
+ ] })
42
+ ] });
43
+ }
44
+ export {
45
+ t as LabelBasic,
46
+ n as LabelRequired,
47
+ m as LabelShowcase,
48
+ r as LabelWithHint
49
+ };
@@ -0,0 +1,3 @@
1
+ export declare function RadioGroupBasic(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function RadioGroupHorizontal(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function RadioGroupShowcase(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,40 @@
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import { RadioGroup as l, RadioGroupItem as o } from "./radio-group.js";
3
+ import { Label as s } from "../label/label.js";
4
+ function t() {
5
+ return /* @__PURE__ */ e(l, { defaultValue: "weekly", className: "space-y-2", children: [
6
+ ["daily", "每日"],
7
+ ["weekly", "每周"],
8
+ ["monthly", "每月"]
9
+ ].map(([r, i]) => /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
10
+ /* @__PURE__ */ e(o, { value: r, id: `r-${r}` }),
11
+ /* @__PURE__ */ e(s, { htmlFor: `r-${r}`, className: "cursor-pointer", children: i })
12
+ ] }, r)) });
13
+ }
14
+ function c() {
15
+ return /* @__PURE__ */ e(l, { defaultValue: "time", className: "flex gap-6", children: [
16
+ ["time", "按时间"],
17
+ ["priority", "按优先级"],
18
+ ["name", "按名称"]
19
+ ].map(([r, i]) => /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
20
+ /* @__PURE__ */ e(o, { value: r, id: `h-${r}` }),
21
+ /* @__PURE__ */ e(s, { htmlFor: `h-${r}`, className: "cursor-pointer", children: i })
22
+ ] }, r)) });
23
+ }
24
+ function h() {
25
+ return /* @__PURE__ */ a("div", { className: "flex flex-col gap-6", children: [
26
+ /* @__PURE__ */ a("section", { children: [
27
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "纵向" }),
28
+ /* @__PURE__ */ e(t, {})
29
+ ] }),
30
+ /* @__PURE__ */ a("section", { children: [
31
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "横向" }),
32
+ /* @__PURE__ */ e(c, {})
33
+ ] })
34
+ ] });
35
+ }
36
+ export {
37
+ t as RadioGroupBasic,
38
+ c as RadioGroupHorizontal,
39
+ h as RadioGroupShowcase
40
+ };
@@ -0,0 +1,3 @@
1
+ export declare function SelectBasic(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function SelectGrouped(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function SelectShowcase(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,58 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { useState as u } from "react";
3
+ import { Label as n } from "../label/label.js";
4
+ import { Select as t, SelectTrigger as d, SelectValue as a, SelectContent as h, SelectItem as c, SelectGroup as r, SelectLabel as i, SelectSeparator as m } from "./select.js";
5
+ function p() {
6
+ const [o, s] = u();
7
+ return /* @__PURE__ */ l("div", { className: "space-y-1.5 w-48", children: [
8
+ /* @__PURE__ */ e(n, { children: "优先级" }),
9
+ /* @__PURE__ */ l(t, { value: o, onValueChange: s, children: [
10
+ /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(a, { placeholder: "选择优先级" }) }),
11
+ /* @__PURE__ */ l(h, { children: [
12
+ /* @__PURE__ */ e(c, { value: "critical", children: "Critical" }),
13
+ /* @__PURE__ */ e(c, { value: "high", children: "High" }),
14
+ /* @__PURE__ */ e(c, { value: "medium", children: "Medium" }),
15
+ /* @__PURE__ */ e(c, { value: "low", children: "Low" }),
16
+ /* @__PURE__ */ e(c, { value: "none", children: "None" })
17
+ ] })
18
+ ] })
19
+ ] });
20
+ }
21
+ function v() {
22
+ return /* @__PURE__ */ l("div", { className: "space-y-1.5 w-48", children: [
23
+ /* @__PURE__ */ e(n, { children: "选择团队" }),
24
+ /* @__PURE__ */ l(t, { children: [
25
+ /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(a, { placeholder: "选择团队" }) }),
26
+ /* @__PURE__ */ l(h, { children: [
27
+ /* @__PURE__ */ l(r, { children: [
28
+ /* @__PURE__ */ e(i, { children: "工程部门" }),
29
+ /* @__PURE__ */ e(c, { value: "frontend", children: "前端" }),
30
+ /* @__PURE__ */ e(c, { value: "backend", children: "后端" })
31
+ ] }),
32
+ /* @__PURE__ */ e(m, {}),
33
+ /* @__PURE__ */ l(r, { children: [
34
+ /* @__PURE__ */ e(i, { children: "业务部门" }),
35
+ /* @__PURE__ */ e(c, { value: "sales", children: "销售" }),
36
+ /* @__PURE__ */ e(c, { value: "support", children: "客服" })
37
+ ] })
38
+ ] })
39
+ ] })
40
+ ] });
41
+ }
42
+ function g() {
43
+ return /* @__PURE__ */ l("div", { className: "flex flex-col gap-6", children: [
44
+ /* @__PURE__ */ l("section", { children: [
45
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "基础" }),
46
+ /* @__PURE__ */ e(p, {})
47
+ ] }),
48
+ /* @__PURE__ */ l("section", { children: [
49
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "带分组" }),
50
+ /* @__PURE__ */ e(v, {})
51
+ ] })
52
+ ] });
53
+ }
54
+ export {
55
+ p as SelectBasic,
56
+ v as SelectGrouped,
57
+ g as SelectShowcase
58
+ };
@@ -0,0 +1,3 @@
1
+ export declare function SliderBasic(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function SliderRange(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function SliderShowcase(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,46 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { useState as i } from "react";
3
+ import { Label as l } from "../label/label.js";
4
+ import { Slider as r } from "./slider.js";
5
+ function a() {
6
+ const [s, n] = i([50]);
7
+ return /* @__PURE__ */ t("div", { className: "w-80 space-y-2", children: [
8
+ /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
9
+ /* @__PURE__ */ e(l, { children: "音量" }),
10
+ /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground font-mono", children: s[0] })
11
+ ] }),
12
+ /* @__PURE__ */ e(r, { value: s, onValueChange: n, max: 100, step: 1 })
13
+ ] });
14
+ }
15
+ function c() {
16
+ const [s, n] = i([20, 80]);
17
+ return /* @__PURE__ */ t("div", { className: "w-80 space-y-2", children: [
18
+ /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
19
+ /* @__PURE__ */ e(l, { children: "价格区间" }),
20
+ /* @__PURE__ */ t("span", { className: "text-sm text-muted-foreground font-mono", children: [
21
+ "¥",
22
+ s[0],
23
+ " ~ ¥",
24
+ s[1]
25
+ ] })
26
+ ] }),
27
+ /* @__PURE__ */ e(r, { value: s, onValueChange: n, max: 100, step: 5 })
28
+ ] });
29
+ }
30
+ function h() {
31
+ return /* @__PURE__ */ t("div", { className: "flex flex-col gap-6", children: [
32
+ /* @__PURE__ */ t("section", { children: [
33
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "单值" }),
34
+ /* @__PURE__ */ e(a, {})
35
+ ] }),
36
+ /* @__PURE__ */ t("section", { children: [
37
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "区间" }),
38
+ /* @__PURE__ */ e(c, {})
39
+ ] })
40
+ ] });
41
+ }
42
+ export {
43
+ a as SliderBasic,
44
+ c as SliderRange,
45
+ h as SliderShowcase
46
+ };
@@ -0,0 +1,3 @@
1
+ export declare function SwitchBasic(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function SwitchList(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function SwitchShowcase(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,37 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { Switch as d } from "./switch.js";
3
+ import { Label as i } from "../label/label.js";
4
+ function c() {
5
+ return /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
6
+ /* @__PURE__ */ e(d, { id: "s1" }),
7
+ /* @__PURE__ */ e(i, { htmlFor: "s1", className: "cursor-pointer", children: "桌面通知" })
8
+ ] });
9
+ }
10
+ function t() {
11
+ return /* @__PURE__ */ e("div", { className: "space-y-3 w-72", children: [
12
+ { id: "ss-auto", label: "自动保存草稿", defaultChecked: !0 },
13
+ { id: "ss-notify", label: "桌面通知", defaultChecked: !1 },
14
+ { id: "ss-compact", label: "紧凑布局", defaultChecked: !1 },
15
+ { id: "ss-sound", label: "操作音效", disabled: !0 }
16
+ ].map((s) => /* @__PURE__ */ l("div", { className: "flex items-center justify-between", children: [
17
+ /* @__PURE__ */ e(i, { htmlFor: s.id, className: s.disabled ? "text-muted-foreground" : "cursor-pointer", children: s.label }),
18
+ /* @__PURE__ */ e(d, { id: s.id, defaultChecked: s.defaultChecked, disabled: s.disabled })
19
+ ] }, s.id)) });
20
+ }
21
+ function m() {
22
+ return /* @__PURE__ */ l("div", { className: "flex flex-col gap-6", children: [
23
+ /* @__PURE__ */ l("section", { children: [
24
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "基础" }),
25
+ /* @__PURE__ */ e(c, {})
26
+ ] }),
27
+ /* @__PURE__ */ l("section", { children: [
28
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "设置项列表" }),
29
+ /* @__PURE__ */ e(t, {})
30
+ ] })
31
+ ] });
32
+ }
33
+ export {
34
+ c as SwitchBasic,
35
+ t as SwitchList,
36
+ m as SwitchShowcase
37
+ };
@@ -0,0 +1,3 @@
1
+ export declare function TextareaBasic(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function TextareaWithCounter(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function TextareaShowcase(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,49 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { useState as c } from "react";
3
+ import { Label as o } from "../label/label.js";
4
+ import { Textarea as n } from "./textarea.js";
5
+ function l() {
6
+ return /* @__PURE__ */ t("div", { className: "space-y-1.5 w-96", children: [
7
+ /* @__PURE__ */ e(o, { htmlFor: "note", children: "备注" }),
8
+ /* @__PURE__ */ e(n, { id: "note", rows: 4, placeholder: "请输入备注..." })
9
+ ] });
10
+ }
11
+ function i() {
12
+ const [r, a] = c("");
13
+ return /* @__PURE__ */ t("div", { className: "space-y-1.5 w-96", children: [
14
+ /* @__PURE__ */ e(o, { htmlFor: "desc", children: "变更说明" }),
15
+ /* @__PURE__ */ e(
16
+ n,
17
+ {
18
+ id: "desc",
19
+ rows: 4,
20
+ maxLength: 200,
21
+ value: r,
22
+ onChange: (s) => a(s.target.value),
23
+ placeholder: "请描述变更原因..."
24
+ }
25
+ ),
26
+ /* @__PURE__ */ t("div", { className: "text-xs text-muted-foreground text-right font-mono", children: [
27
+ r.length,
28
+ " / ",
29
+ 200
30
+ ] })
31
+ ] });
32
+ }
33
+ function u() {
34
+ return /* @__PURE__ */ t("div", { className: "flex flex-col gap-6", children: [
35
+ /* @__PURE__ */ t("section", { children: [
36
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "基础" }),
37
+ /* @__PURE__ */ e(l, {})
38
+ ] }),
39
+ /* @__PURE__ */ t("section", { children: [
40
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "带字数计数" }),
41
+ /* @__PURE__ */ e(i, {})
42
+ ] })
43
+ ] });
44
+ }
45
+ export {
46
+ l as TextareaBasic,
47
+ u as TextareaShowcase,
48
+ i as TextareaWithCounter
49
+ };
@@ -0,0 +1,3 @@
1
+ export declare function ToggleBasic(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function ToggleText(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function ToggleShowcase(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { RiBold as s, RiItalic as a, RiUnderline as r } from "@remixicon/react";
3
+ import { Toggle as i } from "./toggle.js";
4
+ function c() {
5
+ return /* @__PURE__ */ l("div", { className: "flex gap-2", children: [
6
+ /* @__PURE__ */ e(i, { "aria-label": "加粗", children: /* @__PURE__ */ e(s, { className: "size-4" }) }),
7
+ /* @__PURE__ */ e(i, { "aria-label": "斜体", defaultPressed: !0, children: /* @__PURE__ */ e(a, { className: "size-4" }) }),
8
+ /* @__PURE__ */ e(i, { "aria-label": "下划线", children: /* @__PURE__ */ e(r, { className: "size-4" }) })
9
+ ] });
10
+ }
11
+ function n() {
12
+ return /* @__PURE__ */ l("div", { className: "flex gap-2", children: [
13
+ /* @__PURE__ */ e(i, { children: "仅显示我的" }),
14
+ /* @__PURE__ */ e(i, { defaultPressed: !0, children: "只看未读" })
15
+ ] });
16
+ }
17
+ function m() {
18
+ return /* @__PURE__ */ l("div", { className: "flex flex-col gap-6", children: [
19
+ /* @__PURE__ */ l("section", { children: [
20
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "图标切换" }),
21
+ /* @__PURE__ */ e(c, {})
22
+ ] }),
23
+ /* @__PURE__ */ l("section", { children: [
24
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "文字切换" }),
25
+ /* @__PURE__ */ e(n, {})
26
+ ] })
27
+ ] });
28
+ }
29
+ export {
30
+ c as ToggleBasic,
31
+ m as ToggleShowcase,
32
+ n as ToggleText
33
+ };
@@ -0,0 +1,4 @@
1
+ export declare function ToggleGroupSingle(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function ToggleGroupMultiple(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function ToggleGroupView(): import("react/jsx-runtime").JSX.Element;
4
+ export declare function ToggleGroupShowcase(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,46 @@
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { ToggleGroup as i, ToggleGroupItem as l } from "./toggle-group.js";
3
+ function r() {
4
+ return /* @__PURE__ */ n(i, { type: "single", defaultValue: "center", children: [
5
+ /* @__PURE__ */ e(l, { value: "left", children: "左" }),
6
+ /* @__PURE__ */ e(l, { value: "center", children: "中" }),
7
+ /* @__PURE__ */ e(l, { value: "right", children: "右" }),
8
+ /* @__PURE__ */ e(l, { value: "justify", children: "两端" })
9
+ ] });
10
+ }
11
+ function t() {
12
+ return /* @__PURE__ */ n(i, { type: "multiple", defaultValue: ["bold"], children: [
13
+ /* @__PURE__ */ e(l, { value: "bold", children: "粗" }),
14
+ /* @__PURE__ */ e(l, { value: "italic", children: "斜" }),
15
+ /* @__PURE__ */ e(l, { value: "underline", children: "下划线" })
16
+ ] });
17
+ }
18
+ function c() {
19
+ return /* @__PURE__ */ n(i, { type: "single", defaultValue: "list", children: [
20
+ /* @__PURE__ */ e(l, { value: "list", children: "列表" }),
21
+ /* @__PURE__ */ e(l, { value: "card", children: "卡片" }),
22
+ /* @__PURE__ */ e(l, { value: "kanban", children: "看板" })
23
+ ] });
24
+ }
25
+ function d() {
26
+ return /* @__PURE__ */ n("div", { className: "flex flex-col gap-6", children: [
27
+ /* @__PURE__ */ n("section", { children: [
28
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "互斥单选(对齐)" }),
29
+ /* @__PURE__ */ e(r, {})
30
+ ] }),
31
+ /* @__PURE__ */ n("section", { children: [
32
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "多选(格式)" }),
33
+ /* @__PURE__ */ e(t, {})
34
+ ] }),
35
+ /* @__PURE__ */ n("section", { children: [
36
+ /* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "视图切换" }),
37
+ /* @__PURE__ */ e(c, {})
38
+ ] })
39
+ ] });
40
+ }
41
+ export {
42
+ t as ToggleGroupMultiple,
43
+ d as ToggleGroupShowcase,
44
+ r as ToggleGroupSingle,
45
+ c as ToggleGroupView
46
+ };