@fangxinyan/lumina 0.3.0 → 0.5.0

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 (171) hide show
  1. package/dist/Accordion.cjs +3 -3
  2. package/dist/Accordion.js +2 -2
  3. package/dist/Alert.cjs +3 -3
  4. package/dist/Alert.js +2 -2
  5. package/dist/AutoComplete-P5KZMZO5.css +54 -0
  6. package/dist/AutoComplete.cjs +15 -0
  7. package/dist/AutoComplete.cjs.map +1 -0
  8. package/dist/AutoComplete.d.cts +51 -0
  9. package/dist/AutoComplete.d.ts +51 -0
  10. package/dist/AutoComplete.js +6 -0
  11. package/dist/AutoComplete.js.map +1 -0
  12. package/dist/Button.cjs +4 -4
  13. package/dist/Button.js +2 -2
  14. package/dist/Calendar.cjs +3 -3
  15. package/dist/Calendar.js +2 -2
  16. package/dist/Cascader.cjs +3 -3
  17. package/dist/Cascader.js +2 -2
  18. package/dist/Checkbox.cjs +4 -4
  19. package/dist/Checkbox.js +2 -2
  20. package/dist/CommandPalette.cjs +4 -4
  21. package/dist/CommandPalette.js +3 -3
  22. package/dist/Drawer.cjs +3 -3
  23. package/dist/Drawer.js +2 -2
  24. package/dist/Form-5GRVZNDO.css +67 -0
  25. package/dist/Form.cjs +20 -0
  26. package/dist/Form.cjs.map +1 -0
  27. package/dist/Form.d.cts +85 -0
  28. package/dist/Form.d.ts +85 -0
  29. package/dist/Form.js +3 -0
  30. package/dist/Form.js.map +1 -0
  31. package/dist/Icon.cjs +3 -3
  32. package/dist/Icon.d.cts +1 -1
  33. package/dist/Icon.d.ts +1 -1
  34. package/dist/Icon.js +1 -1
  35. package/dist/Image.cjs +4 -4
  36. package/dist/Image.js +2 -2
  37. package/dist/Input.cjs +4 -4
  38. package/dist/Input.js +2 -2
  39. package/dist/InputNumber-VXQIWLQC.css +40 -0
  40. package/dist/InputNumber.cjs +14 -0
  41. package/dist/InputNumber.cjs.map +1 -0
  42. package/dist/InputNumber.d.cts +46 -0
  43. package/dist/InputNumber.d.ts +46 -0
  44. package/dist/InputNumber.js +5 -0
  45. package/dist/InputNumber.js.map +1 -0
  46. package/dist/Modal.cjs +4 -4
  47. package/dist/Modal.js +3 -3
  48. package/dist/Pagination.cjs +5 -5
  49. package/dist/Pagination.js +4 -4
  50. package/dist/Select.cjs +4 -4
  51. package/dist/Select.js +3 -3
  52. package/dist/{Slider-X4PVA65R.css → Slider-3JKA5EW6.css} +44 -25
  53. package/dist/Slider.cjs +2 -2
  54. package/dist/Slider.d.cts +8 -5
  55. package/dist/Slider.d.ts +8 -5
  56. package/dist/Slider.js +1 -1
  57. package/dist/Table.cjs +8 -8
  58. package/dist/Table.js +6 -6
  59. package/dist/Tag.cjs +4 -4
  60. package/dist/Tag.js +2 -2
  61. package/dist/Toast.cjs +4 -4
  62. package/dist/Toast.js +2 -2
  63. package/dist/Typography.cjs +7 -7
  64. package/dist/Typography.js +2 -2
  65. package/dist/{chunk-RIDCBNCM.cjs → chunk-2ENTRT7R.cjs} +5 -5
  66. package/dist/{chunk-RIDCBNCM.cjs.map → chunk-2ENTRT7R.cjs.map} +1 -1
  67. package/dist/chunk-2TZ2R7L2.js +235 -0
  68. package/dist/chunk-2TZ2R7L2.js.map +1 -0
  69. package/dist/{chunk-24FAK7QU.cjs → chunk-3BZ47QNV.cjs} +7 -7
  70. package/dist/{chunk-24FAK7QU.cjs.map → chunk-3BZ47QNV.cjs.map} +1 -1
  71. package/dist/{chunk-URLSZPS5.js → chunk-6XZ362VL.js} +4 -4
  72. package/dist/{chunk-URLSZPS5.js.map → chunk-6XZ362VL.js.map} +1 -1
  73. package/dist/{chunk-XDFZRV3V.js → chunk-6Z24VO3K.js} +3 -3
  74. package/dist/{chunk-XDFZRV3V.js.map → chunk-6Z24VO3K.js.map} +1 -1
  75. package/dist/{chunk-AWLBLRQX.cjs → chunk-77TZHI76.cjs} +7 -7
  76. package/dist/{chunk-AWLBLRQX.cjs.map → chunk-77TZHI76.cjs.map} +1 -1
  77. package/dist/{chunk-TMZVX6NO.js → chunk-7M7NAMR5.js} +3 -3
  78. package/dist/{chunk-TMZVX6NO.js.map → chunk-7M7NAMR5.js.map} +1 -1
  79. package/dist/{chunk-WQFC5EMC.js → chunk-AESLEYST.js} +4 -4
  80. package/dist/{chunk-WQFC5EMC.js.map → chunk-AESLEYST.js.map} +1 -1
  81. package/dist/chunk-BCPAY65C.cjs +169 -0
  82. package/dist/chunk-BCPAY65C.cjs.map +1 -0
  83. package/dist/{chunk-XZ22B3NW.js → chunk-CTYW42GG.js} +5 -5
  84. package/dist/{chunk-XZ22B3NW.js.map → chunk-CTYW42GG.js.map} +1 -1
  85. package/dist/chunk-E62JFAHW.js +147 -0
  86. package/dist/chunk-E62JFAHW.js.map +1 -0
  87. package/dist/{chunk-U5BZ7E3F.js → chunk-FXQGPHK2.js} +3 -3
  88. package/dist/{chunk-U5BZ7E3F.js.map → chunk-FXQGPHK2.js.map} +1 -1
  89. package/dist/{chunk-3HNRKO3M.cjs → chunk-HJIKU6MF.cjs} +4 -4
  90. package/dist/{chunk-3HNRKO3M.cjs.map → chunk-HJIKU6MF.cjs.map} +1 -1
  91. package/dist/{chunk-EHO2JH2L.cjs → chunk-HXSAH4Y6.cjs} +7 -7
  92. package/dist/{chunk-EHO2JH2L.cjs.map → chunk-HXSAH4Y6.cjs.map} +1 -1
  93. package/dist/{chunk-3LI6QH2Q.js → chunk-I7WLFADD.js} +3 -3
  94. package/dist/{chunk-3LI6QH2Q.js.map → chunk-I7WLFADD.js.map} +1 -1
  95. package/dist/chunk-IHACXMOI.js +307 -0
  96. package/dist/chunk-IHACXMOI.js.map +1 -0
  97. package/dist/{chunk-AGN3JSUH.cjs → chunk-IJA26LRY.cjs} +4 -4
  98. package/dist/{chunk-AGN3JSUH.cjs.map → chunk-IJA26LRY.cjs.map} +1 -1
  99. package/dist/chunk-IOWREUEP.js +170 -0
  100. package/dist/chunk-IOWREUEP.js.map +1 -0
  101. package/dist/{chunk-5UOBYRYJ.js → chunk-JXHMJUVI.js} +3 -3
  102. package/dist/{chunk-5UOBYRYJ.js.map → chunk-JXHMJUVI.js.map} +1 -1
  103. package/dist/{chunk-TY5EAKEI.js → chunk-KW7Z4IQC.js} +3 -3
  104. package/dist/{chunk-TY5EAKEI.js.map → chunk-KW7Z4IQC.js.map} +1 -1
  105. package/dist/{chunk-276NALYW.js → chunk-LXNR6TQK.js} +3 -3
  106. package/dist/{chunk-276NALYW.js.map → chunk-LXNR6TQK.js.map} +1 -1
  107. package/dist/{chunk-WREHBIJ5.cjs → chunk-MDQNUKCP.cjs} +12 -12
  108. package/dist/{chunk-WREHBIJ5.cjs.map → chunk-MDQNUKCP.cjs.map} +1 -1
  109. package/dist/chunk-N6ZLZUBF.cjs +257 -0
  110. package/dist/chunk-N6ZLZUBF.cjs.map +1 -0
  111. package/dist/{chunk-GOIQR4OH.cjs → chunk-N73JGXYZ.cjs} +4 -4
  112. package/dist/{chunk-GOIQR4OH.cjs.map → chunk-N73JGXYZ.cjs.map} +1 -1
  113. package/dist/{chunk-MFWOBALK.cjs → chunk-NN7WMXY4.cjs} +4 -4
  114. package/dist/{chunk-MFWOBALK.cjs.map → chunk-NN7WMXY4.cjs.map} +1 -1
  115. package/dist/{chunk-U4K7HOMW.js → chunk-O7C6S644.js} +3 -3
  116. package/dist/{chunk-U4K7HOMW.js.map → chunk-O7C6S644.js.map} +1 -1
  117. package/dist/{chunk-YXKJOPYT.js → chunk-OM76QWUN.js} +3 -3
  118. package/dist/{chunk-YXKJOPYT.js.map → chunk-OM76QWUN.js.map} +1 -1
  119. package/dist/{chunk-Q2EXOT4B.js → chunk-PKXXR76Q.js} +3 -3
  120. package/dist/{chunk-Q2EXOT4B.js.map → chunk-PKXXR76Q.js.map} +1 -1
  121. package/dist/{chunk-GEYMWUW6.js → chunk-QOGROEVD.js} +23 -5
  122. package/dist/chunk-QOGROEVD.js.map +1 -0
  123. package/dist/chunk-QVFEKGKI.cjs +331 -0
  124. package/dist/chunk-QVFEKGKI.cjs.map +1 -0
  125. package/dist/{chunk-HNVRMOL3.cjs → chunk-RQV7SMIZ.cjs} +5 -5
  126. package/dist/{chunk-HNVRMOL3.cjs.map → chunk-RQV7SMIZ.cjs.map} +1 -1
  127. package/dist/{chunk-RSZNFKCQ.cjs → chunk-RWHWEQQX.cjs} +6 -6
  128. package/dist/{chunk-RSZNFKCQ.cjs.map → chunk-RWHWEQQX.cjs.map} +1 -1
  129. package/dist/{chunk-AR4M7QGF.cjs → chunk-SMHXSEBD.cjs} +7 -7
  130. package/dist/{chunk-AR4M7QGF.cjs.map → chunk-SMHXSEBD.cjs.map} +1 -1
  131. package/dist/{chunk-RVSWH4RH.cjs → chunk-T4PI2ZX7.cjs} +14 -14
  132. package/dist/{chunk-RVSWH4RH.cjs.map → chunk-T4PI2ZX7.cjs.map} +1 -1
  133. package/dist/{chunk-MTCLJHXU.js → chunk-TZLM5GF4.js} +4 -4
  134. package/dist/{chunk-MTCLJHXU.js.map → chunk-TZLM5GF4.js.map} +1 -1
  135. package/dist/{chunk-CALRTZZ7.cjs → chunk-TZXEZFCI.cjs} +5 -5
  136. package/dist/{chunk-CALRTZZ7.cjs.map → chunk-TZXEZFCI.cjs.map} +1 -1
  137. package/dist/chunk-VQBZKRIB.cjs +192 -0
  138. package/dist/chunk-VQBZKRIB.cjs.map +1 -0
  139. package/dist/{chunk-WBMF7WM3.js → chunk-WUOFJPZ4.js} +3 -3
  140. package/dist/{chunk-WBMF7WM3.js.map → chunk-WUOFJPZ4.js.map} +1 -1
  141. package/dist/{chunk-SVVB6POY.cjs → chunk-WVBFQB26.cjs} +6 -6
  142. package/dist/{chunk-SVVB6POY.cjs.map → chunk-WVBFQB26.cjs.map} +1 -1
  143. package/dist/{chunk-DBJIK4JE.js → chunk-XCYE4OQV.js} +3 -3
  144. package/dist/{chunk-DBJIK4JE.js.map → chunk-XCYE4OQV.js.map} +1 -1
  145. package/dist/{chunk-7JYI5THC.cjs → chunk-XYVJ3FBQ.cjs} +5 -5
  146. package/dist/{chunk-7JYI5THC.cjs.map → chunk-XYVJ3FBQ.cjs.map} +1 -1
  147. package/dist/{chunk-YVO7XO4W.cjs → chunk-YCHUHMNP.cjs} +22 -4
  148. package/dist/chunk-YCHUHMNP.cjs.map +1 -0
  149. package/dist/{chunk-MKR4X57L.cjs → chunk-YFBHVTKN.cjs} +7 -7
  150. package/dist/{chunk-MKR4X57L.cjs.map → chunk-YFBHVTKN.cjs.map} +1 -1
  151. package/dist/{chunk-NGQDVJH3.js → chunk-ZFJHUOFU.js} +3 -3
  152. package/dist/{chunk-NGQDVJH3.js.map → chunk-ZFJHUOFU.js.map} +1 -1
  153. package/dist/index.cjs +131 -108
  154. package/dist/index.cjs.map +1 -1
  155. package/dist/index.d.cts +5 -2
  156. package/dist/index.d.ts +5 -2
  157. package/dist/index.js +29 -26
  158. package/dist/index.js.map +1 -1
  159. package/dist/styles.css +38 -25
  160. package/docs/llms/autocomplete.md +56 -0
  161. package/docs/llms/form.md +147 -0
  162. package/docs/llms/inputnumber.md +57 -0
  163. package/docs/llms/slider.md +13 -2
  164. package/docs/llms.md +6 -3
  165. package/package.json +1 -1
  166. package/dist/chunk-B5JH7NRZ.cjs +0 -133
  167. package/dist/chunk-B5JH7NRZ.cjs.map +0 -1
  168. package/dist/chunk-GEYMWUW6.js.map +0 -1
  169. package/dist/chunk-QJGKI2BD.js +0 -111
  170. package/dist/chunk-QJGKI2BD.js.map +0 -1
  171. package/dist/chunk-YVO7XO4W.cjs.map +0 -1
package/dist/Form.d.ts ADDED
@@ -0,0 +1,85 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ type FormLayout = "horizontal" | "vertical" | "inline";
5
+ type Rule = {
6
+ required?: boolean;
7
+ message?: string;
8
+ pattern?: RegExp;
9
+ min?: number;
10
+ max?: number;
11
+ len?: number;
12
+ type?: "string" | "number" | "email" | "url" | "array";
13
+ whitespace?: boolean;
14
+ validator?: (rule: Rule, value: unknown) => Promise<void> | void;
15
+ };
16
+ interface ErrorField {
17
+ name: string;
18
+ errors: string[];
19
+ }
20
+ interface FormInstance<V extends Record<string, unknown> = Record<string, unknown>> {
21
+ getFieldValue: <T = unknown>(name: string) => T;
22
+ getFieldsValue: (names?: string[]) => V;
23
+ setFieldValue: (name: string, value: unknown) => void;
24
+ setFieldsValue: (values: Partial<V>) => void;
25
+ resetFields: (names?: string[]) => void;
26
+ validateFields: (names?: string[]) => Promise<V>;
27
+ isFieldTouched: (name: string) => boolean;
28
+ getFieldError: (name: string) => string[];
29
+ /** Programmatic submit — runs validate then onFinish/onFinishFailed. */
30
+ submit: () => void;
31
+ }
32
+ /** `Form.useForm()` — create a form instance. Same shape as antd's hook. */
33
+ declare function useForm<V extends Record<string, unknown> = Record<string, unknown>>(): [FormInstance<V>];
34
+ interface FormProps<V extends Record<string, unknown> = Record<string, unknown>> extends Omit<React.FormHTMLAttributes<HTMLFormElement>, "onChange" | "onSubmit"> {
35
+ form?: FormInstance<V>;
36
+ layout?: FormLayout;
37
+ initialValues?: Partial<V>;
38
+ onFinish?: (values: V) => void;
39
+ onFinishFailed?: (info: {
40
+ values: Partial<V>;
41
+ errorFields: ErrorField[];
42
+ }) => void;
43
+ onValuesChange?: (changed: Partial<V>, all: V) => void;
44
+ /** Show the `*` mark before required field labels. Default true. */
45
+ requiredMark?: boolean;
46
+ /** Disable all fields inside. */
47
+ disabled?: boolean;
48
+ children?: React.ReactNode;
49
+ className?: string;
50
+ }
51
+ declare const FormRoot: <V extends Record<string, unknown> = Record<string, unknown>>(props: FormProps<V>) => react_jsx_runtime.JSX.Element;
52
+ interface FormItemProps {
53
+ /** Field key. Omit for layout-only wrappers (no value binding). */
54
+ name?: string;
55
+ label?: React.ReactNode;
56
+ rules?: Rule[];
57
+ /** Render no wrapper — emit only the (bound) child. */
58
+ noStyle?: boolean;
59
+ /** Inject value into this prop name on the child. Default `"value"`. */
60
+ valuePropName?: string;
61
+ /** Listen for changes on this event name. Default `"onChange"`. */
62
+ trigger?: string;
63
+ /** Event names that trigger validation. Default `["onChange"]`. */
64
+ validateTrigger?: string | string[];
65
+ /** Initial value (used when the form instance has no value yet). */
66
+ initialValue?: unknown;
67
+ /** Extra help text shown under the field. Hidden when an error is shown. */
68
+ help?: React.ReactNode;
69
+ /** Supplementary description below the help line. */
70
+ extra?: React.ReactNode;
71
+ /** Explicitly mark the field as required (cosmetic). */
72
+ required?: boolean;
73
+ /** Hide the entire item (still keeps the field in the form). */
74
+ hidden?: boolean;
75
+ children?: React.ReactNode;
76
+ className?: string;
77
+ style?: React.CSSProperties;
78
+ }
79
+ declare const FormItem: React.FC<FormItemProps>;
80
+ declare const Form: typeof FormRoot & {
81
+ Item: typeof FormItem;
82
+ useForm: typeof useForm;
83
+ };
84
+
85
+ export { type ErrorField, Form, type FormInstance, FormItem, type FormItemProps, type FormLayout, type FormProps, type Rule, useForm };
package/dist/Form.js ADDED
@@ -0,0 +1,3 @@
1
+ export { Form, FormItem, useForm } from './chunk-IHACXMOI.js';
2
+ //# sourceMappingURL=Form.js.map
3
+ //# sourceMappingURL=Form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"Form.js"}
package/dist/Icon.cjs CHANGED
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var chunkYVO7XO4W_cjs = require('./chunk-YVO7XO4W.cjs');
3
+ var chunkYCHUHMNP_cjs = require('./chunk-YCHUHMNP.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "ICON_NAMES", {
8
8
  enumerable: true,
9
- get: function () { return chunkYVO7XO4W_cjs.ICON_NAMES; }
9
+ get: function () { return chunkYCHUHMNP_cjs.ICON_NAMES; }
10
10
  });
11
11
  Object.defineProperty(exports, "Icon", {
12
12
  enumerable: true,
13
- get: function () { return chunkYVO7XO4W_cjs.Icon; }
13
+ get: function () { return chunkYCHUHMNP_cjs.Icon; }
14
14
  });
15
15
  //# sourceMappingURL=Icon.cjs.map
16
16
  //# sourceMappingURL=Icon.cjs.map
package/dist/Icon.d.cts CHANGED
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  /**
4
4
  * Name of a built-in icon. To add your own, pass `children` (raw SVG paths) instead.
5
5
  */
6
- type IconName = "search" | "plus" | "minus" | "check" | "x" | "chevDown" | "chevRight" | "chevLeft" | "chevUp" | "arrowRight" | "settings" | "user" | "bell" | "mail" | "heart" | "star" | "home" | "folder" | "file" | "image" | "play" | "pause" | "volume" | "trash" | "edit" | "copy" | "download" | "upload" | "info" | "alert" | "check2" | "eye" | "eyeOff" | "sparkle" | "moon" | "sun" | "palette" | "layers" | "grid" | "list" | "zap" | "filter" | "mic" | "send" | "calendar" | "clock" | "menu" | "more" | "sliders";
6
+ type IconName = "search" | "plus" | "minus" | "check" | "x" | "chevDown" | "chevRight" | "chevLeft" | "chevUp" | "arrowRight" | "settings" | "user" | "bell" | "mail" | "heart" | "star" | "home" | "folder" | "file" | "image" | "play" | "pause" | "volume" | "trash" | "edit" | "copy" | "download" | "upload" | "info" | "alert" | "check2" | "eye" | "eyeOff" | "sparkle" | "moon" | "sun" | "palette" | "layers" | "grid" | "list" | "zap" | "filter" | "mic" | "send" | "calendar" | "clock" | "menu" | "more" | "sliders" | "aim" | "swap" | "camera" | "qq";
7
7
  interface IconProps extends Omit<React.SVGAttributes<SVGSVGElement>, "stroke"> {
8
8
  name: IconName;
9
9
  size?: number;
package/dist/Icon.d.ts CHANGED
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  /**
4
4
  * Name of a built-in icon. To add your own, pass `children` (raw SVG paths) instead.
5
5
  */
6
- type IconName = "search" | "plus" | "minus" | "check" | "x" | "chevDown" | "chevRight" | "chevLeft" | "chevUp" | "arrowRight" | "settings" | "user" | "bell" | "mail" | "heart" | "star" | "home" | "folder" | "file" | "image" | "play" | "pause" | "volume" | "trash" | "edit" | "copy" | "download" | "upload" | "info" | "alert" | "check2" | "eye" | "eyeOff" | "sparkle" | "moon" | "sun" | "palette" | "layers" | "grid" | "list" | "zap" | "filter" | "mic" | "send" | "calendar" | "clock" | "menu" | "more" | "sliders";
6
+ type IconName = "search" | "plus" | "minus" | "check" | "x" | "chevDown" | "chevRight" | "chevLeft" | "chevUp" | "arrowRight" | "settings" | "user" | "bell" | "mail" | "heart" | "star" | "home" | "folder" | "file" | "image" | "play" | "pause" | "volume" | "trash" | "edit" | "copy" | "download" | "upload" | "info" | "alert" | "check2" | "eye" | "eyeOff" | "sparkle" | "moon" | "sun" | "palette" | "layers" | "grid" | "list" | "zap" | "filter" | "mic" | "send" | "calendar" | "clock" | "menu" | "more" | "sliders" | "aim" | "swap" | "camera" | "qq";
7
7
  interface IconProps extends Omit<React.SVGAttributes<SVGSVGElement>, "stroke"> {
8
8
  name: IconName;
9
9
  size?: number;
package/dist/Icon.js CHANGED
@@ -1,3 +1,3 @@
1
- export { ICON_NAMES, Icon } from './chunk-GEYMWUW6.js';
1
+ export { ICON_NAMES, Icon } from './chunk-QOGROEVD.js';
2
2
  //# sourceMappingURL=Icon.js.map
3
3
  //# sourceMappingURL=Icon.js.map
package/dist/Image.cjs CHANGED
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkEHO2JH2L_cjs = require('./chunk-EHO2JH2L.cjs');
4
- require('./chunk-YVO7XO4W.cjs');
3
+ var chunkHXSAH4Y6_cjs = require('./chunk-HXSAH4Y6.cjs');
4
+ require('./chunk-YCHUHMNP.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Image", {
9
9
  enumerable: true,
10
- get: function () { return chunkEHO2JH2L_cjs.Image; }
10
+ get: function () { return chunkHXSAH4Y6_cjs.Image; }
11
11
  });
12
12
  Object.defineProperty(exports, "ImageGrid", {
13
13
  enumerable: true,
14
- get: function () { return chunkEHO2JH2L_cjs.ImageGrid; }
14
+ get: function () { return chunkHXSAH4Y6_cjs.ImageGrid; }
15
15
  });
16
16
  //# sourceMappingURL=Image.cjs.map
17
17
  //# sourceMappingURL=Image.cjs.map
package/dist/Image.js CHANGED
@@ -1,4 +1,4 @@
1
- export { Image, ImageGrid } from './chunk-YXKJOPYT.js';
2
- import './chunk-GEYMWUW6.js';
1
+ export { Image, ImageGrid } from './chunk-OM76QWUN.js';
2
+ import './chunk-QOGROEVD.js';
3
3
  //# sourceMappingURL=Image.js.map
4
4
  //# sourceMappingURL=Image.js.map
package/dist/Input.cjs CHANGED
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkMKR4X57L_cjs = require('./chunk-MKR4X57L.cjs');
4
- require('./chunk-YVO7XO4W.cjs');
3
+ var chunkYFBHVTKN_cjs = require('./chunk-YFBHVTKN.cjs');
4
+ require('./chunk-YCHUHMNP.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Input", {
9
9
  enumerable: true,
10
- get: function () { return chunkMKR4X57L_cjs.Input; }
10
+ get: function () { return chunkYFBHVTKN_cjs.Input; }
11
11
  });
12
12
  Object.defineProperty(exports, "Textarea", {
13
13
  enumerable: true,
14
- get: function () { return chunkMKR4X57L_cjs.Textarea; }
14
+ get: function () { return chunkYFBHVTKN_cjs.Textarea; }
15
15
  });
16
16
  //# sourceMappingURL=Input.cjs.map
17
17
  //# sourceMappingURL=Input.cjs.map
package/dist/Input.js CHANGED
@@ -1,4 +1,4 @@
1
- export { Input, Textarea } from './chunk-WBMF7WM3.js';
2
- import './chunk-GEYMWUW6.js';
1
+ export { Input, Textarea } from './chunk-WUOFJPZ4.js';
2
+ import './chunk-QOGROEVD.js';
3
3
  //# sourceMappingURL=Input.js.map
4
4
  //# sourceMappingURL=Input.js.map
@@ -0,0 +1,40 @@
1
+ /* ============ InputNumber ============ */
2
+ .ipn-steppers {
3
+ display: inline-flex;
4
+ flex-direction: column;
5
+ align-self: stretch;
6
+ margin: 4px -6px 4px 6px;
7
+ width: 16px;
8
+ border-left: 1px solid var(--divider);
9
+ overflow: hidden;
10
+ border-top-right-radius: calc(var(--r-md) - 4px);
11
+ border-bottom-right-radius: calc(var(--r-md) - 4px);
12
+ }
13
+ .input-wrap.sm .ipn-steppers { margin: 3px -4px 3px 6px; width: 14px; }
14
+ .input-wrap.lg .ipn-steppers { margin: 5px -6px 5px 8px; width: 18px; }
15
+
16
+ .ipn-step {
17
+ flex: 1;
18
+ display: inline-flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ padding: 0;
22
+ border: none;
23
+ background: transparent;
24
+ color: var(--fg-subtle);
25
+ cursor: pointer;
26
+ transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
27
+ }
28
+ .ipn-step.up:not(.down) { border-bottom: 1px solid var(--divider); }
29
+ .ipn-step.up { border-bottom: 1px solid var(--divider); }
30
+ .ipn-step:hover:not(:disabled) {
31
+ color: var(--accent-ink);
32
+ background: var(--bg-sunken);
33
+ }
34
+ .ipn-step:active:not(:disabled) {
35
+ color: var(--accent);
36
+ }
37
+ .ipn-step:disabled {
38
+ cursor: not-allowed;
39
+ opacity: 0.35;
40
+ }
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var chunkBCPAY65C_cjs = require('./chunk-BCPAY65C.cjs');
4
+ require('./chunk-YFBHVTKN.cjs');
5
+ require('./chunk-YCHUHMNP.cjs');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "InputNumber", {
10
+ enumerable: true,
11
+ get: function () { return chunkBCPAY65C_cjs.InputNumber; }
12
+ });
13
+ //# sourceMappingURL=InputNumber.cjs.map
14
+ //# sourceMappingURL=InputNumber.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"InputNumber.cjs"}
@@ -0,0 +1,46 @@
1
+ import * as React from 'react';
2
+
3
+ interface InputNumberProps {
4
+ /** Controlled value. `null` = empty field. */
5
+ value?: number | null;
6
+ /** Uncontrolled initial value. */
7
+ defaultValue?: number;
8
+ /** Fires with the parsed number (or `null` when the input is emptied). */
9
+ onChange?: (value: number | null) => void;
10
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
11
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
12
+ /** Fires when the Enter key is pressed (matches antd's `onPressEnter`). */
13
+ onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>;
14
+ min?: number;
15
+ max?: number;
16
+ /** Step for up/down buttons + arrow keys. Default 1. */
17
+ step?: number;
18
+ /** Number of decimal places to round to. Omit for no rounding. */
19
+ precision?: number;
20
+ size?: "sm" | "md" | "lg";
21
+ disabled?: boolean;
22
+ readOnly?: boolean;
23
+ placeholder?: string;
24
+ /** Show the up/down stepper buttons. Default true. */
25
+ controls?: boolean;
26
+ invalid?: boolean;
27
+ className?: string;
28
+ prefix?: React.ReactNode;
29
+ suffix?: React.ReactNode;
30
+ autoFocus?: boolean;
31
+ id?: string;
32
+ name?: string;
33
+ style?: React.CSSProperties;
34
+ }
35
+ /**
36
+ * `InputNumber` — numeric input with up/down stepper buttons. Arrow-key
37
+ * and mouse-wheel increments; min / max clamping; optional rounding.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * <InputNumber min={0} max={100} step={1} defaultValue={10} onChange={...} />
42
+ * ```
43
+ */
44
+ declare const InputNumber: React.ForwardRefExoticComponent<InputNumberProps & React.RefAttributes<HTMLInputElement>>;
45
+
46
+ export { InputNumber, type InputNumberProps };
@@ -0,0 +1,46 @@
1
+ import * as React from 'react';
2
+
3
+ interface InputNumberProps {
4
+ /** Controlled value. `null` = empty field. */
5
+ value?: number | null;
6
+ /** Uncontrolled initial value. */
7
+ defaultValue?: number;
8
+ /** Fires with the parsed number (or `null` when the input is emptied). */
9
+ onChange?: (value: number | null) => void;
10
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
11
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
12
+ /** Fires when the Enter key is pressed (matches antd's `onPressEnter`). */
13
+ onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>;
14
+ min?: number;
15
+ max?: number;
16
+ /** Step for up/down buttons + arrow keys. Default 1. */
17
+ step?: number;
18
+ /** Number of decimal places to round to. Omit for no rounding. */
19
+ precision?: number;
20
+ size?: "sm" | "md" | "lg";
21
+ disabled?: boolean;
22
+ readOnly?: boolean;
23
+ placeholder?: string;
24
+ /** Show the up/down stepper buttons. Default true. */
25
+ controls?: boolean;
26
+ invalid?: boolean;
27
+ className?: string;
28
+ prefix?: React.ReactNode;
29
+ suffix?: React.ReactNode;
30
+ autoFocus?: boolean;
31
+ id?: string;
32
+ name?: string;
33
+ style?: React.CSSProperties;
34
+ }
35
+ /**
36
+ * `InputNumber` — numeric input with up/down stepper buttons. Arrow-key
37
+ * and mouse-wheel increments; min / max clamping; optional rounding.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * <InputNumber min={0} max={100} step={1} defaultValue={10} onChange={...} />
42
+ * ```
43
+ */
44
+ declare const InputNumber: React.ForwardRefExoticComponent<InputNumberProps & React.RefAttributes<HTMLInputElement>>;
45
+
46
+ export { InputNumber, type InputNumberProps };
@@ -0,0 +1,5 @@
1
+ export { InputNumber } from './chunk-E62JFAHW.js';
2
+ import './chunk-WUOFJPZ4.js';
3
+ import './chunk-QOGROEVD.js';
4
+ //# sourceMappingURL=InputNumber.js.map
5
+ //# sourceMappingURL=InputNumber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"InputNumber.js"}
package/dist/Modal.cjs CHANGED
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var chunkAR4M7QGF_cjs = require('./chunk-AR4M7QGF.cjs');
4
- require('./chunk-RSZNFKCQ.cjs');
5
- require('./chunk-YVO7XO4W.cjs');
3
+ var chunkSMHXSEBD_cjs = require('./chunk-SMHXSEBD.cjs');
4
+ require('./chunk-RWHWEQQX.cjs');
5
+ require('./chunk-YCHUHMNP.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "Modal", {
10
10
  enumerable: true,
11
- get: function () { return chunkAR4M7QGF_cjs.Modal; }
11
+ get: function () { return chunkSMHXSEBD_cjs.Modal; }
12
12
  });
13
13
  //# sourceMappingURL=Modal.cjs.map
14
14
  //# sourceMappingURL=Modal.cjs.map
package/dist/Modal.js CHANGED
@@ -1,5 +1,5 @@
1
- export { Modal } from './chunk-MTCLJHXU.js';
2
- import './chunk-5UOBYRYJ.js';
3
- import './chunk-GEYMWUW6.js';
1
+ export { Modal } from './chunk-TZLM5GF4.js';
2
+ import './chunk-JXHMJUVI.js';
3
+ import './chunk-QOGROEVD.js';
4
4
  //# sourceMappingURL=Modal.js.map
5
5
  //# sourceMappingURL=Modal.js.map
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var chunkAWLBLRQX_cjs = require('./chunk-AWLBLRQX.cjs');
4
- require('./chunk-RVSWH4RH.cjs');
5
- require('./chunk-HNVRMOL3.cjs');
3
+ var chunk77TZHI76_cjs = require('./chunk-77TZHI76.cjs');
4
+ require('./chunk-T4PI2ZX7.cjs');
5
+ require('./chunk-RQV7SMIZ.cjs');
6
6
  require('./chunk-RZ2E3XEU.cjs');
7
- require('./chunk-YVO7XO4W.cjs');
7
+ require('./chunk-YCHUHMNP.cjs');
8
8
 
9
9
 
10
10
 
11
11
  Object.defineProperty(exports, "Pagination", {
12
12
  enumerable: true,
13
- get: function () { return chunkAWLBLRQX_cjs.Pagination; }
13
+ get: function () { return chunk77TZHI76_cjs.Pagination; }
14
14
  });
15
15
  //# sourceMappingURL=Pagination.cjs.map
16
16
  //# sourceMappingURL=Pagination.cjs.map
@@ -1,7 +1,7 @@
1
- export { Pagination } from './chunk-WQFC5EMC.js';
2
- import './chunk-URLSZPS5.js';
3
- import './chunk-276NALYW.js';
1
+ export { Pagination } from './chunk-AESLEYST.js';
2
+ import './chunk-6XZ362VL.js';
3
+ import './chunk-LXNR6TQK.js';
4
4
  import './chunk-V2DIQ3RH.js';
5
- import './chunk-GEYMWUW6.js';
5
+ import './chunk-QOGROEVD.js';
6
6
  //# sourceMappingURL=Pagination.js.map
7
7
  //# sourceMappingURL=Pagination.js.map
package/dist/Select.cjs CHANGED
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkRVSWH4RH_cjs = require('./chunk-RVSWH4RH.cjs');
4
- require('./chunk-HNVRMOL3.cjs');
3
+ var chunkT4PI2ZX7_cjs = require('./chunk-T4PI2ZX7.cjs');
4
+ require('./chunk-RQV7SMIZ.cjs');
5
5
  require('./chunk-RZ2E3XEU.cjs');
6
- require('./chunk-YVO7XO4W.cjs');
6
+ require('./chunk-YCHUHMNP.cjs');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "Select", {
11
11
  enumerable: true,
12
- get: function () { return chunkRVSWH4RH_cjs.Select; }
12
+ get: function () { return chunkT4PI2ZX7_cjs.Select; }
13
13
  });
14
14
  //# sourceMappingURL=Select.cjs.map
15
15
  //# sourceMappingURL=Select.cjs.map
package/dist/Select.js CHANGED
@@ -1,6 +1,6 @@
1
- export { Select } from './chunk-URLSZPS5.js';
2
- import './chunk-276NALYW.js';
1
+ export { Select } from './chunk-6XZ362VL.js';
2
+ import './chunk-LXNR6TQK.js';
3
3
  import './chunk-V2DIQ3RH.js';
4
- import './chunk-GEYMWUW6.js';
4
+ import './chunk-QOGROEVD.js';
5
5
  //# sourceMappingURL=Select.js.map
6
6
  //# sourceMappingURL=Select.js.map
@@ -1,14 +1,25 @@
1
1
  /* ============ Slider ============ */
2
2
  .slider {
3
3
  position: relative;
4
- height: 36px;
5
4
  width: 100%;
6
5
  display: flex;
7
6
  align-items: center;
7
+ gap: 10px;
8
8
  cursor: pointer;
9
+ min-height: 36px;
9
10
  }
10
11
  .slider.has-marks { padding-bottom: 26px; }
11
12
  .slider.disabled { opacity: 0.5; cursor: not-allowed; }
13
+
14
+ /* Rail: positioning context for track + thumbs + marks */
15
+ .slider-rail {
16
+ position: relative;
17
+ flex: 1 1 0%;
18
+ height: 36px;
19
+ display: flex;
20
+ align-items: center;
21
+ }
22
+
12
23
  .slider-track {
13
24
  position: relative;
14
25
  width: 100%;
@@ -16,8 +27,10 @@
16
27
  border-radius: 999px;
17
28
  background: var(--bg);
18
29
  box-shadow: var(--neu-in-sm);
19
- overflow: hidden;
30
+ touch-action: none;
31
+ z-index: 1;
20
32
  }
33
+
21
34
  .slider-fill {
22
35
  position: absolute;
23
36
  top: 0; bottom: 0;
@@ -25,7 +38,9 @@
25
38
  box-shadow: 0 0 12px var(--accent-glow);
26
39
  border-radius: 999px;
27
40
  transition: left var(--dur-fast) var(--ease), right var(--dur-fast) var(--ease);
41
+ pointer-events: none;
28
42
  }
43
+
29
44
  .slider-thumb {
30
45
  position: absolute;
31
46
  top: 50%;
@@ -36,43 +51,45 @@
36
51
  transform: translate(-50%, -50%);
37
52
  transition: all var(--dur-fast) var(--ease);
38
53
  display: grid; place-items: center;
39
- pointer-events: none;
54
+ z-index: 3;
55
+ outline: none;
56
+ touch-action: none;
40
57
  }
41
- .slider.has-marks .slider-thumb { top: calc(50% - 13px); }
42
- .slider.has-marks .slider-track { margin-top: -26px; }
43
58
  .slider-thumb::after {
44
59
  content: "";
45
60
  width: 6px; height: 6px;
46
61
  border-radius: 999px;
47
- background: var(--accent);
62
+ background: var(--slider-thumb-color, var(--accent));
63
+ }
64
+ .slider-thumb:focus-visible {
65
+ box-shadow: var(--neu-out-sm), 0 0 0 3px var(--accent-glow);
48
66
  }
49
67
  .slider:hover .slider-thumb { transform: translate(-50%, -50%) scale(1.08); }
50
- .slider input[type="range"] {
51
- position: absolute;
52
- inset: 0;
53
- width: 100%; height: 100%;
54
- opacity: 0;
55
- cursor: inherit;
56
- margin: 0;
57
- pointer-events: auto;
68
+
69
+ .slider-value {
70
+ font-family: var(--font-mono);
71
+ font-size: 12px;
72
+ color: var(--accent-ink);
73
+ flex-shrink: 0;
74
+ white-space: nowrap;
58
75
  }
59
- /* In range mode (two stacked inputs), split the hit zones by half so the user can drag either thumb */
60
- .slider input[type="range"]:nth-of-type(1):not(:only-of-type) { right: 50%; }
61
- .slider input[type="range"]:nth-of-type(2) { left: 50%; }
62
- .slider.has-marks input[type="range"] { height: calc(100% - 26px); }
63
- .slider-value { font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); margin-left: 10px; }
76
+
77
+ /* Tone variants */
78
+ .slider.success .slider-thumb { --slider-thumb-color: var(--success); }
64
79
  .slider.success .slider-fill { background: linear-gradient(90deg, color-mix(in oklch, var(--success) 70%, white), var(--success)); box-shadow: 0 0 10px color-mix(in oklch, var(--success) 35%, transparent); }
65
- .slider.success .slider-thumb::after { background: var(--success); }
80
+ .slider.success .slider-thumb:focus-visible { box-shadow: var(--neu-out-sm), 0 0 0 3px color-mix(in oklch, var(--success) 35%, transparent); }
81
+ .slider.warning .slider-thumb { --slider-thumb-color: var(--warning); }
66
82
  .slider.warning .slider-fill { background: linear-gradient(90deg, color-mix(in oklch, var(--warning) 70%, white), var(--warning)); box-shadow: 0 0 10px color-mix(in oklch, var(--warning) 35%, transparent); }
67
- .slider.warning .slider-thumb::after { background: var(--warning); }
83
+ .slider.warning .slider-thumb:focus-visible { box-shadow: var(--neu-out-sm), 0 0 0 3px color-mix(in oklch, var(--warning) 35%, transparent); }
84
+ .slider.danger .slider-thumb { --slider-thumb-color: var(--danger); }
68
85
  .slider.danger .slider-fill { background: linear-gradient(90deg, color-mix(in oklch, var(--danger) 70%, white), var(--danger)); box-shadow: 0 0 10px color-mix(in oklch, var(--danger) 35%, transparent); }
69
- .slider.danger .slider-thumb::after { background: var(--danger); }
86
+ .slider.danger .slider-thumb:focus-visible { box-shadow: var(--neu-out-sm), 0 0 0 3px color-mix(in oklch, var(--danger) 35%, transparent); }
70
87
 
71
88
  /* Marks */
72
89
  .slider-marks {
73
90
  position: absolute;
74
91
  left: 0; right: 0;
75
- bottom: 0;
92
+ bottom: -26px;
76
93
  height: 22px;
77
94
  pointer-events: none;
78
95
  }
@@ -94,8 +111,10 @@
94
111
  border-radius: 999px;
95
112
  background: var(--bg);
96
113
  box-shadow: var(--neu-in-sm);
97
- margin-top: -18px;
98
- position: relative;
114
+ position: absolute;
115
+ top: -12px;
116
+ left: 50%;
117
+ transform: translateX(-50%);
99
118
  z-index: 1;
100
119
  }
101
120
  .slider-mark.active .slider-mark-dot { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
package/dist/Slider.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkB5JH7NRZ_cjs = require('./chunk-B5JH7NRZ.cjs');
3
+ var chunkN6ZLZUBF_cjs = require('./chunk-N6ZLZUBF.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Slider", {
8
8
  enumerable: true,
9
- get: function () { return chunkB5JH7NRZ_cjs.Slider; }
9
+ get: function () { return chunkN6ZLZUBF_cjs.Slider; }
10
10
  });
11
11
  //# sourceMappingURL=Slider.cjs.map
12
12
  //# sourceMappingURL=Slider.cjs.map
package/dist/Slider.d.cts CHANGED
@@ -1,8 +1,7 @@
1
1
  import * as React from 'react';
2
2
 
3
- type SliderSingleValue = number;
4
3
  type SliderRangeValue = [number, number];
5
- type SliderValue = SliderSingleValue | SliderRangeValue;
4
+ type SliderValue = number | SliderRangeValue;
6
5
  interface SliderBaseProps {
7
6
  min?: number;
8
7
  max?: number;
@@ -10,6 +9,8 @@ interface SliderBaseProps {
10
9
  disabled?: boolean;
11
10
  showValue?: boolean;
12
11
  tone?: "accent" | "success" | "warning" | "danger";
12
+ /** Custom gradient colors mapped from min→max. Overrides `tone` for fill & thumb. */
13
+ colors?: string[];
13
14
  /** Tick marks with labels. Clicking a mark snaps to it. */
14
15
  marks?: Record<number, React.ReactNode>;
15
16
  className?: string;
@@ -27,7 +28,9 @@ interface SliderRangeProps extends SliderBaseProps {
27
28
  onChange?: (value: SliderRangeValue) => void;
28
29
  }
29
30
  type SliderProps = SliderSingleProps | SliderRangeProps;
30
- /** `Slider` — neumorphic range input with grooved track. */
31
- declare const Slider: React.FC<SliderProps>;
31
+ /** `Slider` — neumorphic range input with grooved track.
32
+ * @example <Slider defaultValue={40} showValue />
33
+ */
34
+ declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLDivElement>>;
32
35
 
33
- export { Slider, type SliderProps, type SliderRangeProps, type SliderRangeValue, type SliderSingleProps, type SliderSingleValue, type SliderValue };
36
+ export { Slider, type SliderProps, type SliderRangeProps, type SliderRangeValue, type SliderSingleProps, type SliderValue };