doom-design-system 0.5.0 → 0.6.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 (211) hide show
  1. package/dist/components/Accordion/Accordion.module.css +121 -124
  2. package/dist/components/ActionRow/ActionRow.module.css +25 -24
  3. package/dist/components/Alert/Alert.module.css +74 -76
  4. package/dist/components/Avatar/Avatar.module.css +66 -66
  5. package/dist/components/Badge/Badge.module.css +50 -48
  6. package/dist/components/Breadcrumbs/Breadcrumbs.module.css +32 -33
  7. package/dist/components/Button/Button.d.ts +2 -2
  8. package/dist/components/Button/Button.js +1 -1
  9. package/dist/components/Button/Button.module.css +150 -152
  10. package/dist/components/Card/Card.module.css +37 -39
  11. package/dist/components/Chart/Chart.module.css +213 -245
  12. package/dist/components/Chart/behaviors/DraggablePuck.d.ts +36 -0
  13. package/dist/components/Chart/behaviors/DraggablePuck.js +94 -0
  14. package/dist/components/Chart/behaviors/Markers.js +6 -4
  15. package/dist/components/Chart/behaviors/SelectionUpdate.js +2 -4
  16. package/dist/components/Chart/behaviors/index.d.ts +1 -1
  17. package/dist/components/Chart/behaviors/index.js +1 -1
  18. package/dist/components/Chart/engine/CoordinateSystem.d.ts +59 -0
  19. package/dist/components/Chart/engine/CoordinateSystem.js +126 -0
  20. package/dist/components/Chart/engine/Engine.d.ts +102 -0
  21. package/dist/components/Chart/engine/Engine.js +226 -0
  22. package/dist/components/Chart/engine/Scheduler.d.ts +59 -0
  23. package/dist/components/Chart/engine/Scheduler.js +139 -0
  24. package/dist/components/Chart/engine/SpatialMap.d.ts +114 -0
  25. package/dist/components/Chart/engine/SpatialMap.js +270 -0
  26. package/dist/components/Chart/engine/index.d.ts +13 -0
  27. package/dist/components/Chart/engine/index.js +9 -0
  28. package/dist/components/Chart/engine/types.d.ts +137 -0
  29. package/dist/components/Chart/engine/types.js +47 -0
  30. package/dist/components/Chart/hooks/useEngine.d.ts +43 -0
  31. package/dist/components/Chart/hooks/useEngine.js +128 -0
  32. package/dist/components/Chart/sensors/DataHoverSensor/DataHoverSensor.d.ts +17 -19
  33. package/dist/components/Chart/sensors/DataHoverSensor/DataHoverSensor.js +38 -51
  34. package/dist/components/Chart/sensors/DragSensor/DragSensor.d.ts +38 -0
  35. package/dist/components/Chart/sensors/DragSensor/DragSensor.js +105 -0
  36. package/dist/components/Chart/sensors/DragSensor/index.d.ts +2 -0
  37. package/dist/components/Chart/sensors/DragSensor/index.js +1 -0
  38. package/dist/components/Chart/sensors/{KeyboardSensor.d.ts → KeyboardSensor/KeyboardSensor.d.ts} +1 -1
  39. package/dist/components/Chart/sensors/KeyboardSensor/KeyboardSensor.js +86 -0
  40. package/dist/components/Chart/sensors/KeyboardSensor/index.d.ts +1 -0
  41. package/dist/components/Chart/sensors/KeyboardSensor/index.js +1 -0
  42. package/dist/components/Chart/sensors/{SelectionSensor.d.ts → SelectionSensor/SelectionSensor.d.ts} +2 -2
  43. package/dist/components/Chart/sensors/SelectionSensor/SelectionSensor.js +39 -0
  44. package/dist/components/Chart/sensors/SelectionSensor/index.d.ts +1 -0
  45. package/dist/components/Chart/sensors/SelectionSensor/index.js +1 -0
  46. package/dist/components/Chart/sensors/SensorManager/SensorManager.js +36 -41
  47. package/dist/components/Chart/sensors/index.d.ts +1 -0
  48. package/dist/components/Chart/sensors/index.js +3 -2
  49. package/dist/components/Chart/sensors/utils/search.d.ts +1 -1
  50. package/dist/components/Chart/sensors/utils/search.js +25 -4
  51. package/dist/components/Chart/state/store/chart.store.js +18 -0
  52. package/dist/components/Chart/state/store/slices/series.slice.d.ts +1 -0
  53. package/dist/components/Chart/state/store/slices/series.slice.js +3 -2
  54. package/dist/components/Chart/subcomponents/Axis/Axis.module.css +32 -33
  55. package/dist/components/Chart/subcomponents/BarSeries/BarSeries.js +6 -1
  56. package/dist/components/Chart/subcomponents/BarSeries/BarSeries.module.css +11 -9
  57. package/dist/components/Chart/subcomponents/Cursor/Cursor.js +8 -1
  58. package/dist/components/Chart/subcomponents/Cursor/Cursor.module.css +14 -13
  59. package/dist/components/Chart/subcomponents/CustomSeries/CustomSeries.js +4 -0
  60. package/dist/components/Chart/subcomponents/CustomSeries/CustomSeries.module.css +5 -3
  61. package/dist/components/Chart/subcomponents/Footer/Footer.module.css +5 -3
  62. package/dist/components/Chart/subcomponents/Grid/Grid.module.css +12 -11
  63. package/dist/components/Chart/subcomponents/Header/Header.module.css +8 -7
  64. package/dist/components/Chart/subcomponents/InteractionLayer/InteractionLayer.d.ts +4 -4
  65. package/dist/components/Chart/subcomponents/InteractionLayer/InteractionLayer.js +39 -76
  66. package/dist/components/Chart/subcomponents/Legend/Legend.module.css +30 -32
  67. package/dist/components/Chart/subcomponents/LineSeries/LineSeries.js +9 -3
  68. package/dist/components/Chart/subcomponents/LineSeries/LineSeries.module.css +21 -21
  69. package/dist/components/Chart/subcomponents/Root/Root.js +113 -7
  70. package/dist/components/Chart/subcomponents/Root/Root.module.css +70 -82
  71. package/dist/components/Chart/subcomponents/ScatterSeries/ScatterSeries.js +6 -1
  72. package/dist/components/Chart/subcomponents/ScatterSeries/ScatterSeries.module.css +7 -5
  73. package/dist/components/Chart/subcomponents/Series/Series.module.css +118 -128
  74. package/dist/components/Chart/subcomponents/SeriesPoint/SeriesPoint.module.css +10 -8
  75. package/dist/components/Chart/subcomponents/Tooltip/Tooltip.js +2 -3
  76. package/dist/components/Chart/subcomponents/Tooltip/Tooltip.module.css +52 -67
  77. package/dist/components/Chart/types/context.d.ts +9 -0
  78. package/dist/components/Chart/types/events.d.ts +5 -7
  79. package/dist/components/Chart/types/interaction.d.ts +24 -2
  80. package/dist/components/Chart/types/interaction.js +1 -0
  81. package/dist/components/Checkbox/Checkbox.module.css +57 -59
  82. package/dist/components/Chip/Chip.module.css +105 -115
  83. package/dist/components/Combobox/Combobox.d.ts +2 -1
  84. package/dist/components/Combobox/Combobox.js +2 -2
  85. package/dist/components/Combobox/Combobox.module.css +233 -210
  86. package/dist/components/CopyButton/CopyButton.module.css +84 -90
  87. package/dist/components/Drawer/Drawer.module.css +126 -145
  88. package/dist/components/Dropdown/Dropdown.d.ts +3 -1
  89. package/dist/components/Dropdown/Dropdown.js +3 -3
  90. package/dist/components/Dropdown/Dropdown.module.css +52 -32
  91. package/dist/components/FileUpload/FileUpload.js +24 -0
  92. package/dist/components/FileUpload/FileUpload.module.css +295 -313
  93. package/dist/components/Form/Form.module.css +35 -39
  94. package/dist/components/Image/Image.module.css +53 -54
  95. package/dist/components/Input/Input.d.ts +4 -2
  96. package/dist/components/Input/Input.js +2 -2
  97. package/dist/components/Input/Input.module.css +135 -119
  98. package/dist/components/Label/Label.module.css +17 -15
  99. package/dist/components/Layout/Layout.module.css +95 -111
  100. package/dist/components/Link/Link.module.css +67 -65
  101. package/dist/components/Modal/Modal.module.css +112 -132
  102. package/dist/components/Page/Page.module.css +21 -21
  103. package/dist/components/Pagination/Pagination.module.css +56 -56
  104. package/dist/components/Popover/Popover.module.css +17 -16
  105. package/dist/components/ProgressBar/ProgressBar.module.css +36 -37
  106. package/dist/components/RadioGroup/RadioGroup.module.css +74 -77
  107. package/dist/components/Select/Select.d.ts +2 -1
  108. package/dist/components/Select/Select.js +2 -2
  109. package/dist/components/Select/Select.module.css +133 -98
  110. package/dist/components/Sheet/Sheet.module.css +134 -154
  111. package/dist/components/Sidebar/Sidebar.module.css +72 -74
  112. package/dist/components/Sidebar/subcomponents/Footer/Footer.module.css +7 -5
  113. package/dist/components/Sidebar/subcomponents/Group/Group.module.css +80 -85
  114. package/dist/components/Sidebar/subcomponents/Header/Header.module.css +12 -10
  115. package/dist/components/Sidebar/subcomponents/Item/Item.module.css +54 -55
  116. package/dist/components/Sidebar/subcomponents/MobileOverlay/MobileOverlay.module.css +38 -38
  117. package/dist/components/Sidebar/subcomponents/MobileTrigger/MobileTrigger.module.css +5 -3
  118. package/dist/components/Sidebar/subcomponents/Nav/Nav.module.css +13 -11
  119. package/dist/components/Sidebar/subcomponents/Rail/Rail.module.css +62 -63
  120. package/dist/components/Sidebar/subcomponents/Section/Section.module.css +86 -91
  121. package/dist/components/Skeleton/Skeleton.module.css +28 -26
  122. package/dist/components/Slat/Slat.module.css +93 -94
  123. package/dist/components/Slider/Slider.module.css +116 -121
  124. package/dist/components/Spinner/Spinner.module.css +28 -27
  125. package/dist/components/SplitButton/SplitButton.d.ts +3 -1
  126. package/dist/components/SplitButton/SplitButton.js +2 -2
  127. package/dist/components/SplitButton/SplitButton.module.css +104 -87
  128. package/dist/components/Switch/Switch.module.css +64 -63
  129. package/dist/components/Table/FilterBuilder/FilterBuilder.module.css +36 -36
  130. package/dist/components/Table/FilterBuilder/FilterConditionRow.js +1 -1
  131. package/dist/components/Table/FilterBuilder/FilterConditionRow.module.css +21 -22
  132. package/dist/components/Table/FilterBuilder/FilterGroup.js +4 -4
  133. package/dist/components/Table/FilterBuilder/FilterGroup.module.css +355 -389
  134. package/dist/components/Table/FilterBuilder/FilterSheet.module.css +68 -71
  135. package/dist/components/Table/Table.d.ts +4 -2
  136. package/dist/components/Table/Table.js +50 -13
  137. package/dist/components/Table/Table.module.css +210 -188
  138. package/dist/components/Table/TableHeaderFilter.js +1 -1
  139. package/dist/components/Table/TableHeaderFilter.module.css +51 -57
  140. package/dist/components/Tabs/Tabs.module.css +79 -80
  141. package/dist/components/Text/Text.module.css +108 -131
  142. package/dist/components/Textarea/Textarea.d.ts +3 -1
  143. package/dist/components/Textarea/Textarea.js +2 -2
  144. package/dist/components/Textarea/Textarea.module.css +114 -94
  145. package/dist/components/Toast/Toast.module.css +82 -82
  146. package/dist/components/Tooltip/Tooltip.module.css +17 -16
  147. package/dist/styles/globals.css +1677 -1691
  148. package/dist/styles/palettes.d.ts +0 -5
  149. package/dist/styles/palettes.js +0 -8
  150. package/dist/styles/themes/definitions.d.ts +0 -8
  151. package/dist/styles/themes/definitions.js +117 -5
  152. package/dist/styles/types.d.ts +2 -0
  153. package/dist/styles/types.js +1 -0
  154. package/dist/tsconfig.build.tsbuildinfo +1 -1
  155. package/package.json +4 -4
  156. package/.agent/skills/doom/a2ui/a2ui-examples.md +0 -289
  157. package/.agent/skills/doom/a2ui/a2ui-principles.md +0 -49
  158. package/.agent/skills/doom/a2ui/a2ui-protocol.md +0 -191
  159. package/.agent/skills/doom/components/a2ui.md +0 -46
  160. package/.agent/skills/doom/components/accordion.md +0 -44
  161. package/.agent/skills/doom/components/actionrow.md +0 -33
  162. package/.agent/skills/doom/components/alert.md +0 -35
  163. package/.agent/skills/doom/components/avatar.md +0 -36
  164. package/.agent/skills/doom/components/badge.md +0 -29
  165. package/.agent/skills/doom/components/breadcrumbs.md +0 -33
  166. package/.agent/skills/doom/components/button.md +0 -43
  167. package/.agent/skills/doom/components/card.md +0 -41
  168. package/.agent/skills/doom/components/chart.md +0 -106
  169. package/.agent/skills/doom/components/checkbox.md +0 -38
  170. package/.agent/skills/doom/components/chip.md +0 -35
  171. package/.agent/skills/doom/components/combobox.md +0 -50
  172. package/.agent/skills/doom/components/copybutton.md +0 -41
  173. package/.agent/skills/doom/components/drawer.md +0 -69
  174. package/.agent/skills/doom/components/dropdown.md +0 -33
  175. package/.agent/skills/doom/components/fileupload.md +0 -49
  176. package/.agent/skills/doom/components/form.md +0 -55
  177. package/.agent/skills/doom/components/icon.md +0 -47
  178. package/.agent/skills/doom/components/image.md +0 -48
  179. package/.agent/skills/doom/components/input.md +0 -54
  180. package/.agent/skills/doom/components/label.md +0 -32
  181. package/.agent/skills/doom/components/layout.md +0 -92
  182. package/.agent/skills/doom/components/link.md +0 -39
  183. package/.agent/skills/doom/components/modal.md +0 -71
  184. package/.agent/skills/doom/components/page.md +0 -41
  185. package/.agent/skills/doom/components/pagination.md +0 -32
  186. package/.agent/skills/doom/components/popover.md +0 -45
  187. package/.agent/skills/doom/components/progressbar.md +0 -37
  188. package/.agent/skills/doom/components/radiogroup.md +0 -45
  189. package/.agent/skills/doom/components/select.md +0 -43
  190. package/.agent/skills/doom/components/sheet.md +0 -71
  191. package/.agent/skills/doom/components/sidebar.md +0 -92
  192. package/.agent/skills/doom/components/skeleton.md +0 -35
  193. package/.agent/skills/doom/components/slat.md +0 -46
  194. package/.agent/skills/doom/components/slider.md +0 -51
  195. package/.agent/skills/doom/components/spinner.md +0 -34
  196. package/.agent/skills/doom/components/splitbutton.md +0 -35
  197. package/.agent/skills/doom/components/switch.md +0 -40
  198. package/.agent/skills/doom/components/table.md +0 -82
  199. package/.agent/skills/doom/components/tabs.md +0 -65
  200. package/.agent/skills/doom/components/text.md +0 -42
  201. package/.agent/skills/doom/components/textarea.md +0 -46
  202. package/.agent/skills/doom/components/toast.md +0 -59
  203. package/.agent/skills/doom/components/tooltip.md +0 -35
  204. package/.agent/skills/doom/index.md +0 -167
  205. package/.agent/skills/doom/styles/aesthetic.md +0 -151
  206. package/.agent/skills/doom/styles/css-variables.md +0 -80
  207. package/.agent/skills/doom/styles/mixins.md +0 -97
  208. package/.agent/skills/doom/styles/tokens.md +0 -129
  209. package/.agent/skills/doom/styles/utilities.md +0 -84
  210. package/dist/components/Chart/sensors/KeyboardSensor.js +0 -82
  211. package/dist/components/Chart/sensors/SelectionSensor.js +0 -41
@@ -1,55 +1,54 @@
1
- .image {
2
- display: block;
3
- width: 100%;
4
- height: 100%;
5
- opacity: 0;
6
- transition: opacity 0.5s ease-in-out;
7
- background-color: transparent;
8
- }
9
- .image.visible {
10
- opacity: 1;
11
- }
12
- .image.hidden {
13
- opacity: 0;
14
- }
15
- .image.fit-cover {
16
- object-fit: cover;
17
- }
18
- .image.fit-contain {
19
- object-fit: contain;
20
- }
21
- .image.fit-fill {
22
- object-fit: fill;
23
- }
24
- .image.fit-none {
25
- object-fit: none;
26
- }
27
- .image.fit-scale-down {
28
- object-fit: scale-down;
29
- }
30
-
31
- .wrapper {
32
- position: relative;
33
- display: block;
34
- overflow: hidden;
35
- background-color: var(--surface-accent);
36
- isolation: isolate;
37
- }
38
-
39
- .skeletonLayer {
40
- position: absolute;
41
- inset: 0;
42
- width: 100%;
43
- height: 100%;
44
- z-index: 1;
45
- pointer-events: none;
46
- transition: opacity 0.5s ease-in-out;
47
- opacity: 1;
48
- }
49
- .skeletonLayer.fadeOut {
50
- opacity: 0;
51
- }
52
-
53
- .rounded {
54
- border-radius: var(--radius);
1
+ @layer doom.components {
2
+ .image {
3
+ display: block;
4
+ width: 100%;
5
+ height: 100%;
6
+ opacity: 0;
7
+ transition: opacity 0.5s ease-in-out;
8
+ background-color: transparent;
9
+ }
10
+ .image.visible {
11
+ opacity: 1;
12
+ }
13
+ .image.hidden {
14
+ opacity: 0;
15
+ }
16
+ .image.fit-cover {
17
+ object-fit: cover;
18
+ }
19
+ .image.fit-contain {
20
+ object-fit: contain;
21
+ }
22
+ .image.fit-fill {
23
+ object-fit: fill;
24
+ }
25
+ .image.fit-none {
26
+ object-fit: none;
27
+ }
28
+ .image.fit-scale-down {
29
+ object-fit: scale-down;
30
+ }
31
+ .wrapper {
32
+ position: relative;
33
+ display: block;
34
+ overflow: hidden;
35
+ background-color: var(--surface-accent);
36
+ isolation: isolate;
37
+ }
38
+ .skeletonLayer {
39
+ position: absolute;
40
+ inset: 0;
41
+ width: 100%;
42
+ height: 100%;
43
+ z-index: 1;
44
+ pointer-events: none;
45
+ transition: opacity 0.5s ease-in-out;
46
+ opacity: 1;
47
+ }
48
+ .skeletonLayer.fadeOut {
49
+ opacity: 0;
50
+ }
51
+ .rounded {
52
+ border-radius: var(--radius-md);
53
+ }
55
54
  }
@@ -1,5 +1,7 @@
1
1
  import React from "react";
2
- interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "title"> {
2
+ import type { ControlSize } from "../../styles/types";
3
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "title" | "size"> {
4
+ size?: ControlSize;
3
5
  label?: string;
4
6
  error?: string;
5
7
  helperText?: string;
@@ -9,5 +11,5 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
9
11
  format?: (value: string | number | readonly string[] | undefined) => string;
10
12
  validate?: (value: string | number | readonly string[] | undefined) => string | undefined;
11
13
  }
12
- export declare function Input({ label, error: errorProp, helperText, startAdornment, endAdornment, showCount, style, className, format, validate, onBlur, onFocus, onChange, value, defaultValue, id, required, maxLength, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function Input({ size, label, error: errorProp, helperText, startAdornment, endAdornment, showCount, style, className, format, validate, onBlur, onFocus, onChange, value, defaultValue, id, required, maxLength, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
13
15
  export {};
@@ -16,7 +16,7 @@ import React, { useId, useState } from "react";
16
16
  import { Label } from "../Label/Label.js";
17
17
  import styles from "./Input.module.css";
18
18
  export function Input(_a) {
19
- var { label, error: errorProp, helperText, startAdornment, endAdornment, showCount, style, className, format, validate, onBlur, onFocus, onChange, value, defaultValue, id, required, maxLength } = _a, props = __rest(_a, ["label", "error", "helperText", "startAdornment", "endAdornment", "showCount", "style", "className", "format", "validate", "onBlur", "onFocus", "onChange", "value", "defaultValue", "id", "required", "maxLength"]);
19
+ var { size = "md", label, error: errorProp, helperText, startAdornment, endAdornment, showCount, style, className, format, validate, onBlur, onFocus, onChange, value, defaultValue, id, required, maxLength } = _a, props = __rest(_a, ["size", "label", "error", "helperText", "startAdornment", "endAdornment", "showCount", "style", "className", "format", "validate", "onBlur", "onFocus", "onChange", "value", "defaultValue", "id", "required", "maxLength"]);
20
20
  const [isFocused, setIsFocused] = useState(false);
21
21
  const [internalError, setInternalError] = useState(undefined);
22
22
  const [charCount, setCharCount] = useState(((value === null || value === void 0 ? void 0 : value.toString()) || (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.toString()) || "").length);
@@ -54,5 +54,5 @@ export function Input(_a) {
54
54
  }, [value]);
55
55
  const displayValue = !isFocused && format && value !== undefined ? format(value) : value;
56
56
  const describedBy = clsx(helperText && helperId, error && errorId) || undefined;
57
- return (_jsxs("div", { className: clsx(styles.container, className), style: style, children: [label && (_jsx(Label, { htmlFor: inputId, required: required, children: label })), _jsxs("div", { className: styles.wrapper, children: [startAdornment && (_jsx("span", { className: clsx(styles.adornment, styles.start), children: startAdornment })), _jsx("input", Object.assign({ "aria-describedby": describedBy, "aria-invalid": !!error, className: clsx(styles.input, startAdornment && styles.hasStartAdornment, endAdornment && styles.hasEndAdornment, error && styles.error), defaultValue: defaultValue, id: inputId, maxLength: maxLength, required: required, value: displayValue, onBlur: handleBlur, onChange: handleChange, onFocus: handleFocus }, props)), endAdornment && (_jsx("span", { className: clsx(styles.adornment, styles.end), children: endAdornment }))] }), (error || helperText || (showCount !== null && showCount !== void 0 ? showCount : maxLength !== undefined)) && (_jsxs("div", { className: styles.bottomRow, children: [_jsx("div", { className: styles.messageArea, children: error ? (_jsx("span", { className: clsx(styles.helperText, styles.error), id: errorId, role: "alert", children: error })) : (helperText && (_jsx("span", { className: styles.helperText, id: helperId, children: helperText }))) }), (showCount !== null && showCount !== void 0 ? showCount : maxLength !== undefined) && (_jsxs("span", { className: styles.counter, children: [charCount, maxLength !== undefined ? ` / ${maxLength}` : ""] }))] }))] }));
57
+ return (_jsxs("div", { className: clsx(styles.container, className), style: style, children: [label && (_jsx(Label, { htmlFor: inputId, required: required, children: label })), _jsxs("div", { className: clsx(styles.wrapper, size !== "md" && styles[size]), children: [startAdornment && (_jsx("span", { className: clsx(styles.adornment, styles.start), children: startAdornment })), _jsx("input", Object.assign({ "aria-describedby": describedBy, "aria-invalid": !!error, className: clsx(styles.input, startAdornment && styles.hasStartAdornment, endAdornment && styles.hasEndAdornment, error && styles.error), defaultValue: defaultValue, id: inputId, maxLength: maxLength, required: required, value: displayValue, onBlur: handleBlur, onChange: handleChange, onFocus: handleFocus }, props)), endAdornment && (_jsx("span", { className: clsx(styles.adornment, styles.end), children: endAdornment }))] }), (error || helperText || (showCount !== null && showCount !== void 0 ? showCount : maxLength !== undefined)) && (_jsxs("div", { className: styles.bottomRow, children: [_jsx("div", { className: styles.messageArea, children: error ? (_jsx("span", { className: clsx(styles.helperText, styles.error), id: errorId, role: "alert", children: error })) : (helperText && (_jsx("span", { className: styles.helperText, id: helperId, children: helperText }))) }), (showCount !== null && showCount !== void 0 ? showCount : maxLength !== undefined) && (_jsxs("span", { className: styles.counter, children: [charCount, maxLength !== undefined ? ` / ${maxLength}` : ""] }))] }))] }));
58
58
  }
@@ -1,123 +1,139 @@
1
- .container {
2
- display: flex;
3
- flex-direction: column;
4
- gap: var(--spacing-2);
5
- width: 100%;
6
- }
7
-
8
- .wrapper {
9
- position: relative;
10
- display: flex;
11
- align-items: center;
12
- width: 100%;
13
- }
14
-
15
- .input {
16
- width: 100%;
17
- padding: var(--spacing-4) var(--spacing-6);
18
- font-size: var(--text-base);
19
- background: var(--card-bg);
20
- color: var(--foreground);
21
- min-height: var(--control-height-lg);
22
- box-sizing: border-box;
23
- border: var(--border-width) solid var(--card-border);
24
- border-radius: var(--radius);
25
- box-shadow: var(--shadow-hard);
26
- transition: all 0.1s ease;
27
- outline: none;
28
- }
29
- .input:focus-visible, .input[aria-expanded=true] {
30
- outline: none;
31
- transform: translate(-2px, -2px);
32
- box-shadow: 6px 6px 0px 0px var(--shadow-primary);
33
- border-color: var(--primary);
34
- }
35
- .input:focus {
36
- outline: none;
37
- }
38
- .input::placeholder {
39
- color: var(--muted);
40
- }
41
- .input.error {
42
- border-color: var(--error);
43
- box-shadow: 5px 5px 0px 0px var(--shadow-error);
44
- }
45
- .input.error:focus, .input.error:focus-visible {
46
- border-color: var(--error);
47
- box-shadow: 6px 6px 0px 0px var(--shadow-error);
48
- }
49
- .input:disabled {
50
- cursor: not-allowed;
51
- opacity: 0.7;
52
- background-color: var(--muted);
53
- background-image: linear-gradient(45deg, transparent 25%, rgba(0, 0, 0, 0.05) 25%, rgba(0, 0, 0, 0.05) 50%, transparent 50%, transparent 75%, rgba(0, 0, 0, 0.05) 75%, rgba(0, 0, 0, 0.05));
54
- background-size: var(--spacing-5) var(--spacing-5);
55
- box-shadow: none;
56
- transform: none;
57
- color: var(--muted-foreground);
58
- }
59
- .input:disabled::placeholder {
60
- color: var(--muted-foreground);
61
- }
62
- .input.hasStartAdornment {
63
- padding-left: var(--spacing-8);
64
- }
65
- .input.hasEndAdornment {
66
- padding-right: var(--spacing-8);
67
- }
68
-
69
- .adornment {
70
- position: absolute;
71
- color: var(--muted-foreground);
72
- font-size: var(--text-sm);
73
- z-index: 1;
74
- }
75
- .adornment.start {
76
- left: var(--spacing-3);
77
- }
78
- .adornment.end {
79
- right: var(--spacing-3);
80
- }
81
-
82
- .bottomRow {
83
- display: flex;
84
- justify-content: space-between;
85
- align-items: flex-start;
86
- gap: var(--spacing-4);
87
- margin-top: calc(-1 * var(--spacing-1));
88
- }
89
-
90
- .messageArea {
91
- flex: 1;
92
- }
93
-
94
- .helperText {
95
- font-size: var(--text-xs);
96
- font-weight: var(--font-medium);
97
- color: var(--muted-foreground);
98
- display: block;
99
- }
100
- .helperText.error {
101
- color: var(--error);
102
- font-weight: var(--font-bold);
103
- text-transform: uppercase;
104
- animation: input-shake 0.3s ease-in-out;
105
- }
106
- @keyframes input-shake {
107
- 0%, 100% {
108
- transform: translateX(0);
1
+ @layer doom.components {
2
+ .container {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: var(--space-2);
6
+ width: 100%;
109
7
  }
110
- 25% {
111
- transform: translateX(calc(-1 * var(--spacing-1)));
8
+ .wrapper {
9
+ position: relative;
10
+ display: flex;
11
+ align-items: center;
12
+ width: 100%;
112
13
  }
113
- 75% {
114
- transform: translateX(var(--spacing-1));
14
+ .input {
15
+ width: 100%;
16
+ background: var(--card-bg);
17
+ color: var(--foreground);
18
+ box-sizing: border-box;
19
+ height: var(--control-height);
20
+ padding: var(--control-padding-y) var(--control-padding-x);
21
+ font-size: var(--control-font-size);
22
+ border: var(--surface-border-width) solid var(--card-border);
23
+ border-radius: var(--control-radius);
24
+ box-shadow: var(--shadow-md);
25
+ transition: all var(--duration-fast) var(--ease-in-out);
26
+ outline: none;
27
+ }
28
+ .input:focus-visible {
29
+ outline: none;
30
+ transform: translate(calc(-1 * var(--space-0\.5)), calc(-1 * var(--space-0\.5)));
31
+ box-shadow: var(--shadow-offset-xl) var(--shadow-primary);
32
+ border-color: var(--primary);
33
+ }
34
+ .input:focus {
35
+ outline: none;
36
+ }
37
+ .input::placeholder {
38
+ color: var(--muted);
39
+ }
40
+ .input.error {
41
+ border-color: var(--error);
42
+ box-shadow: var(--shadow-offset-lg) var(--shadow-error);
43
+ }
44
+ .input.error:focus, .input.error:focus-visible {
45
+ border-color: var(--error);
46
+ box-shadow: var(--shadow-offset-xl) var(--shadow-error);
47
+ }
48
+ .input:disabled {
49
+ opacity: 0.6;
50
+ cursor: not-allowed !important;
51
+ background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.05) 10px, rgba(0, 0, 0, 0.05) 20px) !important;
52
+ }
53
+ .input:disabled:hover {
54
+ transform: none !important;
55
+ filter: none !important;
56
+ }
57
+ .input:disabled {
58
+ box-shadow: none;
59
+ transform: none;
60
+ color: var(--muted-foreground);
61
+ }
62
+ .input:disabled::placeholder {
63
+ color: var(--muted-foreground);
64
+ }
65
+ .input.hasStartAdornment {
66
+ padding-left: var(--space-8);
67
+ }
68
+ .input.hasEndAdornment {
69
+ padding-right: var(--space-8);
70
+ }
71
+ .sm {
72
+ --control-height: var(--size-7);
73
+ --control-padding-x: var(--space-2);
74
+ --control-padding-y: var(--space-1);
75
+ --control-font-size: var(--text-xs);
76
+ --control-icon-size: var(--size-4);
77
+ --control-gap: var(--space-1);
78
+ --control-radius: var(--radius-sm);
79
+ }
80
+ .lg {
81
+ --control-height: var(--size-10);
82
+ --control-padding-x: var(--space-4);
83
+ --control-padding-y: var(--space-2);
84
+ --control-font-size: var(--text-base);
85
+ --control-icon-size: var(--size-5);
86
+ --control-gap: var(--space-2);
87
+ --control-radius: var(--radius-md);
88
+ }
89
+ .adornment {
90
+ position: absolute;
91
+ color: var(--muted-foreground);
92
+ font-size: var(--text-sm);
93
+ z-index: 1;
94
+ }
95
+ .adornment.start {
96
+ left: var(--space-3);
97
+ }
98
+ .adornment.end {
99
+ right: var(--space-3);
100
+ }
101
+ .bottomRow {
102
+ display: flex;
103
+ justify-content: space-between;
104
+ align-items: flex-start;
105
+ gap: var(--space-3);
106
+ }
107
+ .messageArea {
108
+ flex: 1;
109
+ }
110
+ .helperText {
111
+ font-size: var(--text-xs);
112
+ font-weight: var(--font-medium);
113
+ color: var(--muted-foreground);
114
+ display: block;
115
+ }
116
+ .helperText.error {
117
+ color: var(--error);
118
+ font-weight: var(--font-bold);
119
+ text-transform: uppercase;
120
+ animation: input-shake 0.3s ease-in-out;
121
+ }
122
+ @keyframes input-shake {
123
+ 0%, 100% {
124
+ transform: translateX(0);
125
+ }
126
+ 25% {
127
+ transform: translateX(calc(-1 * var(--space-1)));
128
+ }
129
+ 75% {
130
+ transform: translateX(var(--space-1));
131
+ }
132
+ }
133
+ .counter {
134
+ font-size: var(--text-xs);
135
+ font-weight: var(--font-medium);
136
+ color: var(--muted-foreground);
137
+ white-space: nowrap;
115
138
  }
116
- }
117
-
118
- .counter {
119
- font-size: var(--text-xs);
120
- font-weight: var(--font-medium);
121
- color: var(--muted-foreground);
122
- white-space: nowrap;
123
139
  }
@@ -1,16 +1,18 @@
1
- .label {
2
- font-family: var(--font-heading);
3
- font-weight: var(--font-bold);
4
- font-size: var(--text-sm);
5
- color: var(--foreground);
6
- text-transform: uppercase;
7
- letter-spacing: 0.05em;
8
- display: flex;
9
- align-items: center;
10
- gap: var(--spacing-1);
11
- }
12
- .label.required::after {
13
- content: "*";
14
- color: var(--error);
15
- margin-left: var(--spacing-1);
1
+ @layer doom.components {
2
+ .label {
3
+ font-family: var(--font-heading);
4
+ font-weight: var(--font-bold);
5
+ font-size: var(--text-sm);
6
+ color: var(--foreground);
7
+ text-transform: uppercase;
8
+ letter-spacing: 0.05em;
9
+ display: flex;
10
+ align-items: center;
11
+ gap: var(--space-1);
12
+ }
13
+ .label.required::after {
14
+ content: "*";
15
+ color: var(--error);
16
+ margin-left: var(--space-1);
17
+ }
16
18
  }
@@ -1,118 +1,102 @@
1
- .grid {
2
- display: grid;
3
- }
4
-
5
- .flex {
6
- display: flex;
7
- }
8
-
9
- .direction-row {
10
- flex-direction: row;
11
- }
12
-
13
- .direction-column {
14
- flex-direction: column;
15
- }
16
-
17
- .direction-row-reverse {
18
- flex-direction: row-reverse;
19
- }
20
-
21
- .direction-column-reverse {
22
- flex-direction: column-reverse;
23
- }
24
-
25
- .justify-flex-start {
26
- justify-content: flex-start;
27
- }
28
-
29
- .justify-flex-end {
30
- justify-content: flex-end;
31
- }
32
-
33
- .justify-center {
34
- justify-content: center;
35
- }
36
-
37
- .justify-space-between {
38
- justify-content: space-between;
39
- }
40
-
41
- .justify-space-around {
42
- justify-content: space-around;
43
- }
44
-
45
- .justify-space-evenly {
46
- justify-content: space-evenly;
47
- }
48
-
49
- .align-flex-start {
50
- align-items: flex-start;
51
- }
52
-
53
- .align-flex-end {
54
- align-items: flex-end;
55
- }
56
-
57
- .align-center {
58
- align-items: center;
59
- }
60
-
61
- .align-stretch {
62
- align-items: stretch;
63
- }
64
-
65
- .align-baseline {
66
- align-items: baseline;
67
- }
68
-
69
- .container {
70
- width: 100%;
71
- margin-left: auto;
72
- margin-right: auto;
73
- padding-left: var(--spacing-4);
74
- padding-right: var(--spacing-4);
75
- }
76
- .container.sm {
77
- max-width: 640px;
78
- }
79
- .container.md {
80
- max-width: 768px;
81
- }
82
- .container.lg {
83
- max-width: 1024px;
84
- }
85
- .container.xl {
86
- max-width: 1280px;
87
- }
88
- .container.fluid {
89
- max-width: 100%;
90
- }
91
-
92
- .switcher {
93
- display: flex;
94
- }
95
- @media (max-width: 360px) {
96
- .switcher.switch-xxs {
97
- flex-direction: column;
98
- align-items: flex-start;
1
+ @layer doom.components {
2
+ .grid {
3
+ display: grid;
99
4
  }
100
- }
101
- @media (max-width: 480px) {
102
- .switcher.switch-xs {
103
- flex-direction: column;
104
- align-items: flex-start;
5
+ .flex {
6
+ display: flex;
105
7
  }
106
- }
107
- @media (max-width: 640px) {
108
- .switcher.switch-sm {
109
- flex-direction: column;
110
- align-items: flex-start;
8
+ .direction-row {
9
+ flex-direction: row;
111
10
  }
112
- }
113
- @media (max-width: 768px) {
114
- .switcher.switch-md {
11
+ .direction-column {
115
12
  flex-direction: column;
13
+ }
14
+ .direction-row-reverse {
15
+ flex-direction: row-reverse;
16
+ }
17
+ .direction-column-reverse {
18
+ flex-direction: column-reverse;
19
+ }
20
+ .justify-flex-start {
21
+ justify-content: flex-start;
22
+ }
23
+ .justify-flex-end {
24
+ justify-content: flex-end;
25
+ }
26
+ .justify-center {
27
+ justify-content: center;
28
+ }
29
+ .justify-space-between {
30
+ justify-content: space-between;
31
+ }
32
+ .justify-space-around {
33
+ justify-content: space-around;
34
+ }
35
+ .justify-space-evenly {
36
+ justify-content: space-evenly;
37
+ }
38
+ .align-flex-start {
116
39
  align-items: flex-start;
117
40
  }
41
+ .align-flex-end {
42
+ align-items: flex-end;
43
+ }
44
+ .align-center {
45
+ align-items: center;
46
+ }
47
+ .align-stretch {
48
+ align-items: stretch;
49
+ }
50
+ .align-baseline {
51
+ align-items: baseline;
52
+ }
53
+ .container {
54
+ width: 100%;
55
+ margin-left: auto;
56
+ margin-right: auto;
57
+ padding-left: var(--space-4);
58
+ padding-right: var(--space-4);
59
+ }
60
+ .container.sm {
61
+ max-width: 640px;
62
+ }
63
+ .container.md {
64
+ max-width: 768px;
65
+ }
66
+ .container.lg {
67
+ max-width: 1024px;
68
+ }
69
+ .container.xl {
70
+ max-width: 1280px;
71
+ }
72
+ .container.fluid {
73
+ max-width: 100%;
74
+ }
75
+ .switcher {
76
+ display: flex;
77
+ }
78
+ @media (max-width: 360px) {
79
+ .switcher.switch-xxs {
80
+ flex-direction: column;
81
+ align-items: flex-start;
82
+ }
83
+ }
84
+ @media (max-width: 480px) {
85
+ .switcher.switch-xs {
86
+ flex-direction: column;
87
+ align-items: flex-start;
88
+ }
89
+ }
90
+ @media (max-width: 640px) {
91
+ .switcher.switch-sm {
92
+ flex-direction: column;
93
+ align-items: flex-start;
94
+ }
95
+ }
96
+ @media (max-width: 768px) {
97
+ .switcher.switch-md {
98
+ flex-direction: column;
99
+ align-items: flex-start;
100
+ }
101
+ }
118
102
  }