@bricks-toolkit/toolkit 0.1.19 → 0.1.21

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 (100) hide show
  1. package/dist/chunk-4PRNRENN.mjs +104 -0
  2. package/dist/chunk-62JXQJBD.cjs +533 -0
  3. package/dist/chunk-6LBTRQZD.mjs +806 -0
  4. package/dist/chunk-J53N2LAE.cjs +115 -0
  5. package/dist/chunk-M6XPQ5BE.cjs +808 -0
  6. package/dist/chunk-UPSMZISM.mjs +567 -0
  7. package/dist/chunk-YV3WWKQY.cjs +569 -0
  8. package/dist/chunk-Z5FRCULF.mjs +531 -0
  9. package/dist/date-picker/index.cjs +3 -2
  10. package/dist/date-picker/index.mjs +2 -1
  11. package/dist/date-time-picker/index.cjs +12 -0
  12. package/dist/date-time-picker/index.mjs +3 -0
  13. package/dist/index.cjs +27 -21
  14. package/dist/index.mjs +7 -5
  15. package/dist/time-picker/index.cjs +2 -2
  16. package/dist/time-picker/index.mjs +1 -1
  17. package/package.json +11 -1
  18. package/dist/Button.types-BsQYqZml.d.ts +0 -27
  19. package/dist/Button.types-D-srlWFf.d.mts +0 -27
  20. package/dist/TextInput.types-DRI8HQza.d.mts +0 -32
  21. package/dist/TextInput.types-DRI8HQza.d.ts +0 -32
  22. package/dist/Tooltip.types-PbUasE3C.d.mts +0 -36
  23. package/dist/Tooltip.types-PbUasE3C.d.ts +0 -36
  24. package/dist/avatar/index.d.mts +0 -29
  25. package/dist/avatar/index.d.ts +0 -29
  26. package/dist/badge/index.d.mts +0 -57
  27. package/dist/badge/index.d.ts +0 -57
  28. package/dist/breadcrumbs/index.d.mts +0 -32
  29. package/dist/breadcrumbs/index.d.ts +0 -32
  30. package/dist/button/index.d.mts +0 -8
  31. package/dist/button/index.d.ts +0 -8
  32. package/dist/card/index.d.mts +0 -42
  33. package/dist/card/index.d.ts +0 -42
  34. package/dist/checkbox/index.d.mts +0 -36
  35. package/dist/checkbox/index.d.ts +0 -36
  36. package/dist/chunk-7WNJ7L4Z.mjs +0 -335
  37. package/dist/chunk-DHC5LI2P.cjs +0 -338
  38. package/dist/chunk-VKQDW7C2.mjs +0 -336
  39. package/dist/chunk-W2ZAPLQH.cjs +0 -337
  40. package/dist/combo-box/index.d.mts +0 -62
  41. package/dist/combo-box/index.d.ts +0 -62
  42. package/dist/date-picker/index.d.mts +0 -32
  43. package/dist/date-picker/index.d.ts +0 -32
  44. package/dist/dialog/index.d.mts +0 -61
  45. package/dist/dialog/index.d.ts +0 -61
  46. package/dist/dropdown-menu/index.d.mts +0 -34
  47. package/dist/dropdown-menu/index.d.ts +0 -34
  48. package/dist/email/index.d.mts +0 -38
  49. package/dist/email/index.d.ts +0 -38
  50. package/dist/file-upload/index.d.mts +0 -27
  51. package/dist/file-upload/index.d.ts +0 -27
  52. package/dist/header/index.d.mts +0 -28
  53. package/dist/header/index.d.ts +0 -28
  54. package/dist/icon-button/index.d.mts +0 -16
  55. package/dist/icon-button/index.d.ts +0 -16
  56. package/dist/image/index.d.mts +0 -48
  57. package/dist/image/index.d.ts +0 -48
  58. package/dist/index.d.mts +0 -141
  59. package/dist/index.d.ts +0 -141
  60. package/dist/link/index.d.mts +0 -25
  61. package/dist/link/index.d.ts +0 -25
  62. package/dist/loader/index.d.mts +0 -21
  63. package/dist/loader/index.d.ts +0 -21
  64. package/dist/modal/index.d.mts +0 -116
  65. package/dist/modal/index.d.ts +0 -116
  66. package/dist/multi-select/index.d.mts +0 -59
  67. package/dist/multi-select/index.d.ts +0 -59
  68. package/dist/otp-input/index.d.mts +0 -57
  69. package/dist/otp-input/index.d.ts +0 -57
  70. package/dist/password-input/index.d.mts +0 -32
  71. package/dist/password-input/index.d.ts +0 -32
  72. package/dist/phone/index.d.mts +0 -41
  73. package/dist/phone/index.d.ts +0 -41
  74. package/dist/radio-button/index.d.mts +0 -56
  75. package/dist/radio-button/index.d.ts +0 -56
  76. package/dist/search-input/index.d.mts +0 -22
  77. package/dist/search-input/index.d.ts +0 -22
  78. package/dist/select/index.d.mts +0 -36
  79. package/dist/select/index.d.ts +0 -36
  80. package/dist/sidebar/index.d.mts +0 -96
  81. package/dist/sidebar/index.d.ts +0 -96
  82. package/dist/skeleton/index.d.mts +0 -76
  83. package/dist/skeleton/index.d.ts +0 -76
  84. package/dist/styles.d.mts +0 -2
  85. package/dist/styles.d.ts +0 -2
  86. package/dist/table/index.d.mts +0 -92
  87. package/dist/table/index.d.ts +0 -92
  88. package/dist/tabs/index.d.mts +0 -26
  89. package/dist/tabs/index.d.ts +0 -26
  90. package/dist/text-input/index.d.mts +0 -7
  91. package/dist/text-input/index.d.ts +0 -7
  92. package/dist/theme-provider/index.d.mts +0 -122
  93. package/dist/theme-provider/index.d.ts +0 -122
  94. package/dist/theme.css +0 -62
  95. package/dist/time-picker/index.d.mts +0 -32
  96. package/dist/time-picker/index.d.ts +0 -32
  97. package/dist/toaster/index.d.mts +0 -28
  98. package/dist/toaster/index.d.ts +0 -28
  99. package/dist/tooltip/index.d.mts +0 -7
  100. package/dist/tooltip/index.d.ts +0 -7
@@ -1,337 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkL5VQZZVR_cjs = require('./chunk-L5VQZZVR.cjs');
4
- var react = require('react');
5
- var outline = require('@heroicons/react/24/outline');
6
- var jsxRuntime = require('react/jsx-runtime');
7
-
8
- var sizeClasses = {
9
- xs: "h-6 px-2 text-xs",
10
- sm: "h-8 px-3 text-sm",
11
- md: "h-10 px-3 text-sm",
12
- lg: "h-11 px-4 text-base",
13
- xl: "h-12 px-4 text-lg"
14
- };
15
- var labelSizeClasses = {
16
- xs: "text-xs",
17
- sm: "text-xs",
18
- md: "text-sm",
19
- lg: "text-sm",
20
- xl: "text-base"
21
- };
22
- var variantClasses = {
23
- default: "rounded-md border border-border bg-surface shadow-sm focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0 transition-all duration-normal",
24
- filled: "rounded-md border border-transparent bg-surface-secondary focus:bg-surface focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0 transition-all duration-normal",
25
- flushed: "rounded-none border-0 border-b border-border bg-transparent focus:outline-none focus:ring-0",
26
- unstyled: "border-0 bg-transparent p-0 focus:outline-none focus:ring-0"
27
- };
28
- var stateVariantClasses = {
29
- default: {
30
- default: "border-border focus:border-primary focus:ring-primary/40",
31
- filled: "focus:border-primary focus:ring-primary/40",
32
- flushed: "border-border focus:border-primary",
33
- unstyled: ""
34
- },
35
- error: {
36
- default: "border-error focus:border-error focus:ring-error/20",
37
- filled: "bg-error/5 focus:border-error focus:ring-error/20",
38
- flushed: "border-error focus:border-error",
39
- unstyled: ""
40
- },
41
- success: {
42
- default: "border-success focus:border-success focus:ring-success/20",
43
- filled: "bg-success/5 focus:border-success focus:ring-success/20",
44
- flushed: "border-success focus:border-success",
45
- unstyled: ""
46
- },
47
- warning: {
48
- default: "border-warning focus:border-warning focus:ring-warning/20",
49
- filled: "bg-warning/5 focus:border-warning focus:ring-warning/20",
50
- flushed: "border-warning focus:border-warning",
51
- unstyled: ""
52
- }
53
- };
54
- var stateMessageClasses = {
55
- default: "text-text-muted",
56
- error: "text-error font-medium",
57
- success: "text-success font-medium",
58
- warning: "text-warning font-medium"
59
- };
60
- var disabledClasses = "disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-surface-secondary";
61
- function getAddonPadding(hasLeft, hasRight, size) {
62
- const leftPad = {
63
- xs: "pl-6",
64
- sm: "pl-8",
65
- md: "pl-9",
66
- lg: "pl-10",
67
- xl: "pl-11"
68
- };
69
- const rightPad = {
70
- xs: "pr-6",
71
- sm: "pr-8",
72
- md: "pr-9",
73
- lg: "pr-10",
74
- xl: "pr-11"
75
- };
76
- const parts = [];
77
- if (hasLeft) parts.push(leftPad[size]);
78
- if (hasRight) parts.push(rightPad[size]);
79
- return parts.join(" ");
80
- }
81
- function getStateMessage(state, errorMessage, successMessage, warningMessage) {
82
- if (state === "error" && errorMessage) return errorMessage;
83
- if (state === "success" && successMessage) return successMessage;
84
- if (state === "warning" && warningMessage) return warningMessage;
85
- return void 0;
86
- }
87
- function AddonIcon({
88
- children,
89
- side,
90
- size,
91
- pointerEvents = false
92
- }) {
93
- const iconSizeClasses = {
94
- xs: "w-3.5 h-3.5",
95
- sm: "w-4 h-4",
96
- md: "w-4 h-4",
97
- lg: "w-5 h-5",
98
- xl: "w-5 h-5"
99
- };
100
- return /* @__PURE__ */ jsxRuntime.jsx(
101
- "span",
102
- {
103
- "aria-hidden": "true",
104
- className: chunkL5VQZZVR_cjs.cn(
105
- "absolute top-1/2 -translate-y-1/2 text-text-secondary flex items-center justify-center",
106
- !pointerEvents && "pointer-events-none",
107
- side === "left" ? "left-3" : "right-3",
108
- iconSizeClasses[size]
109
- ),
110
- children
111
- }
112
- );
113
- }
114
- function Addon({ children, side }) {
115
- return /* @__PURE__ */ jsxRuntime.jsx(
116
- "span",
117
- {
118
- "aria-hidden": "true",
119
- className: chunkL5VQZZVR_cjs.cn(
120
- "inline-flex items-center border border-border bg-surface-secondary px-3 text-sm text-text-secondary select-none",
121
- side === "left" ? "rounded-l-md border-r-0" : "rounded-r-md border-l-0"
122
- ),
123
- children
124
- }
125
- );
126
- }
127
- var DatePicker = react.forwardRef(function DatePicker2({
128
- label,
129
- required = false,
130
- helperText,
131
- errorMessage,
132
- successMessage,
133
- warningMessage,
134
- variant = "default",
135
- size = "md",
136
- state = "default",
137
- fullWidth = true,
138
- leftElement,
139
- rightElement,
140
- prefix,
141
- suffix,
142
- wrapperClassName,
143
- inputGroupClassName,
144
- inputClassName,
145
- labelClassName,
146
- helperClassName,
147
- id: idProp,
148
- disabled,
149
- className,
150
- clearable,
151
- isLoading,
152
- value,
153
- onChange,
154
- ...rest
155
- }, ref) {
156
- const generatedId = react.useId();
157
- const inputId = idProp ?? generatedId;
158
- const helperId = `${inputId}-helper`;
159
- const stateMessageId = `${inputId}-state`;
160
- const isValueString = typeof value === "string";
161
- const showClear = clearable && isValueString && value.length > 0;
162
- const hasLeftElement = leftElement !== void 0;
163
- const hasRightElement = rightElement !== void 0 || Boolean(showClear) || Boolean(isLoading);
164
- const stateMessage = getStateMessage(state, errorMessage, successMessage, warningMessage);
165
- const describedBy = [helperText ? helperId : null, stateMessage ? stateMessageId : null].filter(Boolean).join(" ") || void 0;
166
- const handleClear = () => {
167
- if (ref && typeof ref !== "function" && ref.current) {
168
- const descriptor = Reflect.getOwnPropertyDescriptor(
169
- window.HTMLInputElement.prototype,
170
- "value"
171
- );
172
- const nativeInputValueSetter = descriptor?.set;
173
- if (nativeInputValueSetter) {
174
- Reflect.apply(nativeInputValueSetter, ref.current, [""]);
175
- }
176
- const event = new Event("input", { bubbles: true });
177
- ref.current.dispatchEvent(event);
178
- } else if (onChange) {
179
- const e = {
180
- target: { value: "" },
181
- currentTarget: { value: "" },
182
- preventDefault: () => {
183
- },
184
- stopPropagation: () => {
185
- }
186
- };
187
- onChange(e);
188
- }
189
- };
190
- const renderRightIcon = () => {
191
- if (isLoading) {
192
- return /* @__PURE__ */ jsxRuntime.jsxs(
193
- "svg",
194
- {
195
- className: "animate-spin h-full w-full text-text-muted",
196
- xmlns: "http://www.w3.org/2000/svg",
197
- fill: "none",
198
- viewBox: "0 0 24 24",
199
- children: [
200
- /* @__PURE__ */ jsxRuntime.jsx(
201
- "circle",
202
- {
203
- className: "opacity-25",
204
- cx: "12",
205
- cy: "12",
206
- r: "10",
207
- stroke: "currentColor",
208
- strokeWidth: "4"
209
- }
210
- ),
211
- /* @__PURE__ */ jsxRuntime.jsx(
212
- "path",
213
- {
214
- className: "opacity-75",
215
- fill: "currentColor",
216
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
217
- }
218
- )
219
- ]
220
- }
221
- );
222
- }
223
- if (showClear) {
224
- return /* @__PURE__ */ jsxRuntime.jsx(
225
- "button",
226
- {
227
- type: "button",
228
- onClick: handleClear,
229
- className: "flex items-center justify-center rounded-full text-text-muted hover:text-text hover:bg-hover p-0.5 transition-all duration-fast",
230
- "aria-label": "Clear input",
231
- children: /* @__PURE__ */ jsxRuntime.jsx(outline.XMarkIcon, { className: "w-full h-full", strokeWidth: 2.5 })
232
- }
233
- );
234
- }
235
- return rightElement;
236
- };
237
- const inputElement = /* @__PURE__ */ jsxRuntime.jsx(
238
- "input",
239
- {
240
- ref,
241
- id: inputId,
242
- disabled: Boolean(disabled) || Boolean(isLoading),
243
- type: "date",
244
- value,
245
- onChange,
246
- "aria-invalid": state === "error" ? true : void 0,
247
- "aria-describedby": describedBy,
248
- "aria-required": required,
249
- className: chunkL5VQZZVR_cjs.cn(
250
- "w-full transition-colors duration-150",
251
- sizeClasses[size],
252
- variantClasses[variant],
253
- stateVariantClasses[state][variant],
254
- disabledClasses,
255
- getAddonPadding(hasLeftElement, hasRightElement, size),
256
- inputClassName
257
- ),
258
- ...rest
259
- }
260
- );
261
- return /* @__PURE__ */ jsxRuntime.jsxs(
262
- "div",
263
- {
264
- className: chunkL5VQZZVR_cjs.cn(
265
- "flex flex-col gap-1",
266
- fullWidth ? "w-full" : "w-fit",
267
- wrapperClassName,
268
- className
269
- ),
270
- children: [
271
- label !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(
272
- "label",
273
- {
274
- htmlFor: inputId,
275
- className: chunkL5VQZZVR_cjs.cn(
276
- "font-black leading-none text-text uppercase tracking-widest",
277
- labelSizeClasses[size],
278
- labelClassName
279
- ),
280
- children: [
281
- label,
282
- required && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "ml-1 text-error", children: "*" })
283
- ]
284
- }
285
- ),
286
- /* @__PURE__ */ jsxRuntime.jsxs(
287
- "div",
288
- {
289
- className: chunkL5VQZZVR_cjs.cn("flex items-stretch", fullWidth ? "w-full" : "w-fit", inputGroupClassName),
290
- children: [
291
- prefix !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Addon, { side: "left", children: prefix }),
292
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-1 items-center", children: [
293
- hasLeftElement && /* @__PURE__ */ jsxRuntime.jsx(AddonIcon, { side: "left", size, children: leftElement }),
294
- /* @__PURE__ */ jsxRuntime.jsx(
295
- "div",
296
- {
297
- className: chunkL5VQZZVR_cjs.cn(
298
- "flex-1",
299
- prefix !== void 0 && suffix !== void 0 ? "[&>input]:rounded-none" : prefix !== void 0 ? "[&>input]:rounded-l-none" : suffix !== void 0 ? "[&>input]:rounded-r-none" : ""
300
- ),
301
- children: inputElement
302
- }
303
- ),
304
- hasRightElement && /* @__PURE__ */ jsxRuntime.jsx(AddonIcon, { side: "right", size, pointerEvents: !rightElement && Boolean(showClear), children: renderRightIcon() })
305
- ] }),
306
- suffix !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Addon, { side: "right", children: suffix })
307
- ]
308
- }
309
- ),
310
- helperText !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
311
- "p",
312
- {
313
- id: helperId,
314
- className: chunkL5VQZZVR_cjs.cn("text-xs leading-tight text-text-muted font-medium", helperClassName),
315
- children: helperText
316
- }
317
- ),
318
- stateMessage !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
319
- "p",
320
- {
321
- id: stateMessageId,
322
- role: state === "error" ? "alert" : void 0,
323
- className: chunkL5VQZZVR_cjs.cn(
324
- "text-xs leading-tight mt-1 font-medium",
325
- stateMessageClasses[state],
326
- helperClassName
327
- ),
328
- children: stateMessage
329
- }
330
- )
331
- ]
332
- }
333
- );
334
- });
335
- DatePicker.displayName = "DatePicker";
336
-
337
- exports.DatePicker = DatePicker;
@@ -1,62 +0,0 @@
1
- import { InputHTMLAttributes, ReactNode } from 'react';
2
-
3
- type ComboBoxSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
- type ComboBoxState = 'default' | 'error' | 'success' | 'warning';
5
- interface ComboBoxOption {
6
- /** The underlying value submitted/returned. */
7
- value: string;
8
- /** The human-readable label shown in the dropdown and input. */
9
- label: string;
10
- /** When true the option is shown but cannot be selected. */
11
- disabled?: boolean;
12
- }
13
- interface ComboBoxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'value' | 'onChange' | 'multiple'> {
14
- /** List of selectable options. */
15
- options: ComboBoxOption[];
16
- /** Currently selected value(s). Pass string for single, string[] for multi. */
17
- value?: string | string[];
18
- /** Fired when selection changes. */
19
- onChange?: (value: string | string[]) => void;
20
- /** Allow selecting multiple options. Defaults to false. */
21
- multiple?: boolean;
22
- /** Allow the user to type and filter options. Defaults to true. */
23
- searchable?: boolean;
24
- /** Show a clear (×) button when a value is selected. Defaults to false. */
25
- clearable?: boolean;
26
- /** Field label rendered above the input. */
27
- label?: string;
28
- /** Makes the label show a required asterisk. */
29
- required?: boolean;
30
- /** Helper text shown below the field. */
31
- helperText?: string;
32
- /** Message shown when state = 'error'. */
33
- errorMessage?: string;
34
- /** Message shown when state = 'success'. */
35
- successMessage?: string;
36
- /** Message shown when state = 'warning'. */
37
- warningMessage?: string;
38
- /** Visual / validation state. Defaults to 'default'. */
39
- state?: ComboBoxState;
40
- /** Input size. Defaults to 'md'. */
41
- size?: ComboBoxSize;
42
- /** Stretch to fill its container. Defaults to true. */
43
- fullWidth?: boolean;
44
- /** Placeholder shown in the input when nothing is selected. */
45
- placeholder?: string;
46
- /** Rendered when no options match the current search query. */
47
- noOptionsMessage?: ReactNode;
48
- /** Additional class for the outer wrapper div. */
49
- wrapperClassName?: string;
50
- /** Additional class for the trigger / input element. */
51
- inputClassName?: string;
52
- /** Additional class for the dropdown list. */
53
- listClassName?: string;
54
- /** Additional class for the label element. */
55
- labelClassName?: string;
56
- /** Additional class for helper / state message text. */
57
- helperClassName?: string;
58
- }
59
-
60
- declare const ComboBox: React.ForwardRefExoticComponent<ComboBoxProps & React.RefAttributes<HTMLInputElement>>;
61
-
62
- export { ComboBox, type ComboBoxOption, type ComboBoxProps, type ComboBoxSize, type ComboBoxState };
@@ -1,62 +0,0 @@
1
- import { InputHTMLAttributes, ReactNode } from 'react';
2
-
3
- type ComboBoxSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
- type ComboBoxState = 'default' | 'error' | 'success' | 'warning';
5
- interface ComboBoxOption {
6
- /** The underlying value submitted/returned. */
7
- value: string;
8
- /** The human-readable label shown in the dropdown and input. */
9
- label: string;
10
- /** When true the option is shown but cannot be selected. */
11
- disabled?: boolean;
12
- }
13
- interface ComboBoxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'value' | 'onChange' | 'multiple'> {
14
- /** List of selectable options. */
15
- options: ComboBoxOption[];
16
- /** Currently selected value(s). Pass string for single, string[] for multi. */
17
- value?: string | string[];
18
- /** Fired when selection changes. */
19
- onChange?: (value: string | string[]) => void;
20
- /** Allow selecting multiple options. Defaults to false. */
21
- multiple?: boolean;
22
- /** Allow the user to type and filter options. Defaults to true. */
23
- searchable?: boolean;
24
- /** Show a clear (×) button when a value is selected. Defaults to false. */
25
- clearable?: boolean;
26
- /** Field label rendered above the input. */
27
- label?: string;
28
- /** Makes the label show a required asterisk. */
29
- required?: boolean;
30
- /** Helper text shown below the field. */
31
- helperText?: string;
32
- /** Message shown when state = 'error'. */
33
- errorMessage?: string;
34
- /** Message shown when state = 'success'. */
35
- successMessage?: string;
36
- /** Message shown when state = 'warning'. */
37
- warningMessage?: string;
38
- /** Visual / validation state. Defaults to 'default'. */
39
- state?: ComboBoxState;
40
- /** Input size. Defaults to 'md'. */
41
- size?: ComboBoxSize;
42
- /** Stretch to fill its container. Defaults to true. */
43
- fullWidth?: boolean;
44
- /** Placeholder shown in the input when nothing is selected. */
45
- placeholder?: string;
46
- /** Rendered when no options match the current search query. */
47
- noOptionsMessage?: ReactNode;
48
- /** Additional class for the outer wrapper div. */
49
- wrapperClassName?: string;
50
- /** Additional class for the trigger / input element. */
51
- inputClassName?: string;
52
- /** Additional class for the dropdown list. */
53
- listClassName?: string;
54
- /** Additional class for the label element. */
55
- labelClassName?: string;
56
- /** Additional class for helper / state message text. */
57
- helperClassName?: string;
58
- }
59
-
60
- declare const ComboBox: React.ForwardRefExoticComponent<ComboBoxProps & React.RefAttributes<HTMLInputElement>>;
61
-
62
- export { ComboBox, type ComboBoxOption, type ComboBoxProps, type ComboBoxSize, type ComboBoxState };
@@ -1,32 +0,0 @@
1
- import { InputHTMLAttributes, ReactNode } from 'react';
2
-
3
- type DatePickerVariant = 'default' | 'filled' | 'flushed' | 'unstyled';
4
- type DatePickerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
- type DatePickerState = 'default' | 'error' | 'success' | 'warning';
6
- interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'type'> {
7
- label?: string;
8
- required?: boolean;
9
- helperText?: string;
10
- errorMessage?: string;
11
- successMessage?: string;
12
- warningMessage?: string;
13
- variant?: DatePickerVariant;
14
- size?: DatePickerSize;
15
- state?: DatePickerState;
16
- fullWidth?: boolean;
17
- leftElement?: ReactNode;
18
- rightElement?: ReactNode;
19
- prefix?: ReactNode;
20
- suffix?: ReactNode;
21
- wrapperClassName?: string;
22
- inputGroupClassName?: string;
23
- inputClassName?: string;
24
- labelClassName?: string;
25
- helperClassName?: string;
26
- clearable?: boolean;
27
- isLoading?: boolean;
28
- }
29
-
30
- declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
31
-
32
- export { DatePicker, type DatePickerProps, type DatePickerSize, type DatePickerState, type DatePickerVariant };
@@ -1,32 +0,0 @@
1
- import { InputHTMLAttributes, ReactNode } from 'react';
2
-
3
- type DatePickerVariant = 'default' | 'filled' | 'flushed' | 'unstyled';
4
- type DatePickerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
- type DatePickerState = 'default' | 'error' | 'success' | 'warning';
6
- interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'type'> {
7
- label?: string;
8
- required?: boolean;
9
- helperText?: string;
10
- errorMessage?: string;
11
- successMessage?: string;
12
- warningMessage?: string;
13
- variant?: DatePickerVariant;
14
- size?: DatePickerSize;
15
- state?: DatePickerState;
16
- fullWidth?: boolean;
17
- leftElement?: ReactNode;
18
- rightElement?: ReactNode;
19
- prefix?: ReactNode;
20
- suffix?: ReactNode;
21
- wrapperClassName?: string;
22
- inputGroupClassName?: string;
23
- inputClassName?: string;
24
- labelClassName?: string;
25
- helperClassName?: string;
26
- clearable?: boolean;
27
- isLoading?: boolean;
28
- }
29
-
30
- declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
31
-
32
- export { DatePicker, type DatePickerProps, type DatePickerSize, type DatePickerState, type DatePickerVariant };
@@ -1,61 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | 'full';
4
- interface DialogProps {
5
- /** If true, the dialog will be open. */
6
- isOpen: boolean;
7
- /** Callback invoked when the dialog should close. */
8
- onClose: () => void;
9
- /** The content of the dialog. Usually includes DialogHeader, DialogBody, and DialogFooter. */
10
- children: ReactNode;
11
- /** The size of the dialog. Defaults to 'md'. */
12
- size?: DialogSize;
13
- /** If true, the dialog will be centered on the screen. Defaults to false. */
14
- isCentered?: boolean;
15
- /** If true, the dialog will close when the overlay is clicked. Defaults to true. */
16
- closeOnOverlayClick?: boolean;
17
- /** If true, the dialog will close when the ESC key is pressed. Defaults to true. */
18
- closeOnEsc?: boolean;
19
- /** If true, focus will be trapped inside the dialog. Defaults to true. */
20
- trapFocus?: boolean;
21
- /** If true, the body scroll will be locked when the dialog is open. Defaults to true. */
22
- lockScroll?: boolean;
23
- /** Additional class names for the dialog content. */
24
- contentClassName?: string;
25
- /** Additional class names for the overlay. */
26
- overlayClassName?: string;
27
- /** If true, the backdrop will be visible. Defaults to true. */
28
- showBackdrop?: boolean;
29
- /** If true, the dialog will be treated as a modal (traps focus, locked scroll). Defaults to true. */
30
- isModal?: boolean;
31
- /** ARIA label for the dialog. */
32
- ariaLabel?: string;
33
- /** ID of the element that labels the dialog. */
34
- ariaLabelledby?: string;
35
- /** ID of the element that describes the dialog. */
36
- ariaDescribedby?: string;
37
- }
38
- interface DialogHeaderProps {
39
- children: ReactNode;
40
- className?: string;
41
- }
42
- interface DialogBodyProps {
43
- children: ReactNode;
44
- className?: string;
45
- }
46
- interface DialogFooterProps {
47
- children: ReactNode;
48
- className?: string;
49
- }
50
- interface DialogCloseButtonProps {
51
- onClick?: () => void;
52
- className?: string;
53
- }
54
-
55
- declare function Dialog({ isOpen, onClose, children, size, isCentered, closeOnOverlayClick, closeOnEsc, trapFocus, lockScroll, contentClassName, overlayClassName, showBackdrop, isModal, ariaLabel, ariaLabelledby, ariaDescribedby, }: DialogProps): React.ReactPortal | null;
56
- declare function DialogHeader({ children, className }: DialogHeaderProps): React.JSX.Element;
57
- declare function DialogBody({ children, className }: DialogBodyProps): React.JSX.Element;
58
- declare function DialogFooter({ children, className }: DialogFooterProps): React.JSX.Element;
59
- declare function DialogCloseButton({ onClick, className, }: DialogCloseButtonProps): React.JSX.Element;
60
-
61
- export { Dialog, DialogBody, type DialogBodyProps, DialogCloseButton, type DialogCloseButtonProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, type DialogProps, type DialogSize };
@@ -1,61 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | 'full';
4
- interface DialogProps {
5
- /** If true, the dialog will be open. */
6
- isOpen: boolean;
7
- /** Callback invoked when the dialog should close. */
8
- onClose: () => void;
9
- /** The content of the dialog. Usually includes DialogHeader, DialogBody, and DialogFooter. */
10
- children: ReactNode;
11
- /** The size of the dialog. Defaults to 'md'. */
12
- size?: DialogSize;
13
- /** If true, the dialog will be centered on the screen. Defaults to false. */
14
- isCentered?: boolean;
15
- /** If true, the dialog will close when the overlay is clicked. Defaults to true. */
16
- closeOnOverlayClick?: boolean;
17
- /** If true, the dialog will close when the ESC key is pressed. Defaults to true. */
18
- closeOnEsc?: boolean;
19
- /** If true, focus will be trapped inside the dialog. Defaults to true. */
20
- trapFocus?: boolean;
21
- /** If true, the body scroll will be locked when the dialog is open. Defaults to true. */
22
- lockScroll?: boolean;
23
- /** Additional class names for the dialog content. */
24
- contentClassName?: string;
25
- /** Additional class names for the overlay. */
26
- overlayClassName?: string;
27
- /** If true, the backdrop will be visible. Defaults to true. */
28
- showBackdrop?: boolean;
29
- /** If true, the dialog will be treated as a modal (traps focus, locked scroll). Defaults to true. */
30
- isModal?: boolean;
31
- /** ARIA label for the dialog. */
32
- ariaLabel?: string;
33
- /** ID of the element that labels the dialog. */
34
- ariaLabelledby?: string;
35
- /** ID of the element that describes the dialog. */
36
- ariaDescribedby?: string;
37
- }
38
- interface DialogHeaderProps {
39
- children: ReactNode;
40
- className?: string;
41
- }
42
- interface DialogBodyProps {
43
- children: ReactNode;
44
- className?: string;
45
- }
46
- interface DialogFooterProps {
47
- children: ReactNode;
48
- className?: string;
49
- }
50
- interface DialogCloseButtonProps {
51
- onClick?: () => void;
52
- className?: string;
53
- }
54
-
55
- declare function Dialog({ isOpen, onClose, children, size, isCentered, closeOnOverlayClick, closeOnEsc, trapFocus, lockScroll, contentClassName, overlayClassName, showBackdrop, isModal, ariaLabel, ariaLabelledby, ariaDescribedby, }: DialogProps): React.ReactPortal | null;
56
- declare function DialogHeader({ children, className }: DialogHeaderProps): React.JSX.Element;
57
- declare function DialogBody({ children, className }: DialogBodyProps): React.JSX.Element;
58
- declare function DialogFooter({ children, className }: DialogFooterProps): React.JSX.Element;
59
- declare function DialogCloseButton({ onClick, className, }: DialogCloseButtonProps): React.JSX.Element;
60
-
61
- export { Dialog, DialogBody, type DialogBodyProps, DialogCloseButton, type DialogCloseButtonProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, type DialogProps, type DialogSize };
@@ -1,34 +0,0 @@
1
- import * as React from 'react';
2
- import { ReactNode, HTMLAttributes, ButtonHTMLAttributes } from 'react';
3
-
4
- type DropdownMenuSize = 'sm' | 'md' | 'lg';
5
- type DropdownMenuVariant = 'default' | 'subtle' | 'ghost';
6
- interface DropdownMenuProps {
7
- children: ReactNode;
8
- open?: boolean;
9
- onOpenChange?: (open: boolean) => void;
10
- className?: string;
11
- }
12
- interface DropdownMenuTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
13
- size?: DropdownMenuSize;
14
- variant?: DropdownMenuVariant;
15
- }
16
- interface DropdownMenuContentProps extends HTMLAttributes<HTMLDivElement> {
17
- align?: 'left' | 'right' | 'center';
18
- width?: string | number;
19
- }
20
- interface DropdownMenuItemProps extends HTMLAttributes<HTMLDivElement> {
21
- disabled?: boolean;
22
- destructive?: boolean;
23
- icon?: ReactNode;
24
- shortcut?: string;
25
- }
26
- type DropdownMenuSeparatorProps = HTMLAttributes<HTMLDivElement>;
27
-
28
- declare const DropdownMenu: React.FC<DropdownMenuProps>;
29
- declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
30
- declare const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
31
- declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
32
- declare const DropdownMenuSeparator: React.FC<DropdownMenuSeparatorProps>;
33
-
34
- export { DropdownMenu, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, type DropdownMenuSize, DropdownMenuTrigger, type DropdownMenuTriggerProps, type DropdownMenuVariant };