vector-prototype-components 0.1.1 → 0.1.3

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 (218) hide show
  1. package/Accordion/Accordion.js +79 -0
  2. package/Accordion/Accordion.js.map +1 -0
  3. package/Accordion/Accordion.module.css +1 -0
  4. package/Accordion/Accordion.module.css.js +36 -0
  5. package/Accordion/Accordion.module.css.js.map +1 -0
  6. package/ActionMenu/ActionMenu.js +49 -0
  7. package/ActionMenu/ActionMenu.js.map +1 -0
  8. package/ActionMenu/ActionMenu.module.css +1 -0
  9. package/ActionMenu/ActionMenu.module.css.js +16 -0
  10. package/ActionMenu/ActionMenu.module.css.js.map +1 -0
  11. package/Autocomplete/Autocomplete.js +226 -0
  12. package/Autocomplete/Autocomplete.js.map +1 -0
  13. package/Autocomplete/Autocomplete.module.css +1 -0
  14. package/Autocomplete/Autocomplete.module.css.js +46 -0
  15. package/Autocomplete/Autocomplete.module.css.js.map +1 -0
  16. package/Avatar/Avatar.js +66 -0
  17. package/Avatar/Avatar.js.map +1 -0
  18. package/Avatar/Avatar.module.css +1 -0
  19. package/Avatar/Avatar.module.css.js +26 -0
  20. package/Avatar/Avatar.module.css.js.map +1 -0
  21. package/Badge/Badge.js +40 -0
  22. package/Badge/Badge.js.map +1 -0
  23. package/Badge/Badge.module.css +1 -0
  24. package/Badge/Badge.module.css.js +24 -0
  25. package/Badge/Badge.module.css.js.map +1 -0
  26. package/BottomBar/BottomBar.js +19 -0
  27. package/BottomBar/BottomBar.js.map +1 -0
  28. package/BottomBar/BottomBar.module.css +1 -0
  29. package/BottomBar/BottomBar.module.css.js +10 -0
  30. package/BottomBar/BottomBar.module.css.js.map +1 -0
  31. package/Breadcrumbs/Breadcrumbs.js +40 -0
  32. package/Breadcrumbs/Breadcrumbs.js.map +1 -0
  33. package/Breadcrumbs/Breadcrumbs.module.css +1 -0
  34. package/Breadcrumbs/Breadcrumbs.module.css.js +18 -0
  35. package/Breadcrumbs/Breadcrumbs.module.css.js.map +1 -0
  36. package/Button/Button.js +53 -0
  37. package/Button/Button.js.map +1 -0
  38. package/Button/Button.module.css +1 -0
  39. package/Button/Button.module.css.js +24 -0
  40. package/Button/Button.module.css.js.map +1 -0
  41. package/Callout/Callout.js +66 -0
  42. package/Callout/Callout.js.map +1 -0
  43. package/Callout/Callout.module.css +1 -0
  44. package/Callout/Callout.module.css.js +28 -0
  45. package/Callout/Callout.module.css.js.map +1 -0
  46. package/Card/Card.js +39 -0
  47. package/Card/Card.js.map +1 -0
  48. package/Card/Card.module.css +1 -0
  49. package/Card/Card.module.css.js +18 -0
  50. package/Card/Card.module.css.js.map +1 -0
  51. package/Checkbox/Checkbox.js +90 -0
  52. package/Checkbox/Checkbox.js.map +1 -0
  53. package/Checkbox/Checkbox.module.css +1 -0
  54. package/Checkbox/Checkbox.module.css.js +22 -0
  55. package/Checkbox/Checkbox.module.css.js.map +1 -0
  56. package/Chip/Chip.js +62 -0
  57. package/Chip/Chip.js.map +1 -0
  58. package/Chip/Chip.module.css +1 -0
  59. package/Chip/Chip.module.css.js +24 -0
  60. package/Chip/Chip.module.css.js.map +1 -0
  61. package/DatePicker/DatePicker.js +157 -0
  62. package/DatePicker/DatePicker.js.map +1 -0
  63. package/DatePicker/DatePicker.module.css +1 -0
  64. package/DatePicker/DatePicker.module.css.js +48 -0
  65. package/DatePicker/DatePicker.module.css.js.map +1 -0
  66. package/DatePicker/DatePickerCalendar.js +94 -0
  67. package/DatePicker/DatePickerCalendar.js.map +1 -0
  68. package/DatePicker/DatePickerCalendar.module.css +1 -0
  69. package/DatePicker/DatePickerCalendar.module.css.js +32 -0
  70. package/DatePicker/DatePickerCalendar.module.css.js.map +1 -0
  71. package/Divider/Divider.js +22 -0
  72. package/Divider/Divider.js.map +1 -0
  73. package/Divider/Divider.module.css +1 -0
  74. package/Divider/Divider.module.css.js +12 -0
  75. package/Divider/Divider.module.css.js.map +1 -0
  76. package/Dropdown/Dropdown.js +100 -0
  77. package/Dropdown/Dropdown.js.map +1 -0
  78. package/Dropdown/Dropdown.module.css +1 -0
  79. package/Dropdown/Dropdown.module.css.js +20 -0
  80. package/Dropdown/Dropdown.module.css.js.map +1 -0
  81. package/Icon/Icon.js +8 -0
  82. package/Icon/Icon.js.map +1 -0
  83. package/IconButton/IconButton.js +42 -0
  84. package/IconButton/IconButton.js.map +1 -0
  85. package/IconButton/IconButton.module.css +1 -0
  86. package/IconButton/IconButton.module.css.js +20 -0
  87. package/IconButton/IconButton.module.css.js.map +1 -0
  88. package/InputNumber/InputNumber.js +106 -0
  89. package/InputNumber/InputNumber.js.map +1 -0
  90. package/InputNumber/InputNumber.module.css +1 -0
  91. package/InputNumber/InputNumber.module.css.js +30 -0
  92. package/InputNumber/InputNumber.module.css.js.map +1 -0
  93. package/Menu/Menu.js +182 -0
  94. package/Menu/Menu.js.map +1 -0
  95. package/Menu/Menu.module.css +1 -0
  96. package/Menu/Menu.module.css.js +56 -0
  97. package/Menu/Menu.module.css.js.map +1 -0
  98. package/Menu/menuData.js +188 -0
  99. package/Menu/menuData.js.map +1 -0
  100. package/Message/Message.js +88 -0
  101. package/Message/Message.js.map +1 -0
  102. package/Message/Message.module.css +1 -0
  103. package/Message/Message.module.css.js +32 -0
  104. package/Message/Message.module.css.js.map +1 -0
  105. package/Modal/Modal.js +186 -0
  106. package/Modal/Modal.js.map +1 -0
  107. package/Modal/Modal.module.css +1 -0
  108. package/Modal/Modal.module.css.js +44 -0
  109. package/Modal/Modal.module.css.js.map +1 -0
  110. package/Multiselect/Multiselect.js +249 -0
  111. package/Multiselect/Multiselect.js.map +1 -0
  112. package/Multiselect/Multiselect.module.css +1 -0
  113. package/Multiselect/Multiselect.module.css.js +64 -0
  114. package/Multiselect/Multiselect.module.css.js.map +1 -0
  115. package/Overlay/Overlay.js +18 -0
  116. package/Overlay/Overlay.js.map +1 -0
  117. package/Overlay/Overlay.module.css +1 -0
  118. package/Overlay/Overlay.module.css.js +8 -0
  119. package/Overlay/Overlay.module.css.js.map +1 -0
  120. package/Paginator/Paginator.js +118 -0
  121. package/Paginator/Paginator.js.map +1 -0
  122. package/Paginator/Paginator.module.css +1 -0
  123. package/Paginator/Paginator.module.css.js +22 -0
  124. package/Paginator/Paginator.module.css.js.map +1 -0
  125. package/Panel/Panel.js +38 -0
  126. package/Panel/Panel.js.map +1 -0
  127. package/Panel/Panel.module.css +1 -0
  128. package/Panel/Panel.module.css.js +16 -0
  129. package/Panel/Panel.module.css.js.map +1 -0
  130. package/ProgressSpinner/ProgressSpinner.js +64 -0
  131. package/ProgressSpinner/ProgressSpinner.js.map +1 -0
  132. package/ProgressSpinner/ProgressSpinner.module.css +1 -0
  133. package/ProgressSpinner/ProgressSpinner.module.css.js +16 -0
  134. package/ProgressSpinner/ProgressSpinner.module.css.js.map +1 -0
  135. package/Radio/Radio.js +44 -0
  136. package/Radio/Radio.js.map +1 -0
  137. package/Radio/Radio.module.css +1 -0
  138. package/Radio/Radio.module.css.js +18 -0
  139. package/Radio/Radio.module.css.js.map +1 -0
  140. package/SegmentControl/SegmentControl.js +74 -0
  141. package/SegmentControl/SegmentControl.js.map +1 -0
  142. package/SegmentControl/SegmentControl.module.css +1 -0
  143. package/SegmentControl/SegmentControl.module.css.js +16 -0
  144. package/SegmentControl/SegmentControl.module.css.js.map +1 -0
  145. package/Select/Select.js +153 -0
  146. package/Select/Select.js.map +1 -0
  147. package/Select/Select.module.css +1 -0
  148. package/Select/Select.module.css.js +46 -0
  149. package/Select/Select.module.css.js.map +1 -0
  150. package/Skeleton/Skeleton.js +78 -0
  151. package/Skeleton/Skeleton.js.map +1 -0
  152. package/Skeleton/Skeleton.module.css +1 -0
  153. package/Skeleton/Skeleton.module.css.js +18 -0
  154. package/Skeleton/Skeleton.module.css.js.map +1 -0
  155. package/Slider/Slider.js +116 -0
  156. package/Slider/Slider.js.map +1 -0
  157. package/Slider/Slider.module.css +1 -0
  158. package/Slider/Slider.module.css.js +24 -0
  159. package/Slider/Slider.module.css.js.map +1 -0
  160. package/Slot/Slot.js +25 -0
  161. package/Slot/Slot.js.map +1 -0
  162. package/Slot/Slot.module.css +1 -0
  163. package/Slot/Slot.module.css.js +16 -0
  164. package/Slot/Slot.module.css.js.map +1 -0
  165. package/Switch/Switch.js +42 -0
  166. package/Switch/Switch.js.map +1 -0
  167. package/Switch/Switch.module.css +1 -0
  168. package/Switch/Switch.module.css.js +11 -0
  169. package/Switch/Switch.module.css.js.map +1 -0
  170. package/Table/Table.js +268 -0
  171. package/Table/Table.js.map +1 -0
  172. package/Table/Table.module.css +1 -0
  173. package/Table/Table.module.css.js +64 -0
  174. package/Table/Table.module.css.js.map +1 -0
  175. package/TableTree/TableTree.js +139 -0
  176. package/TableTree/TableTree.js.map +1 -0
  177. package/TableTree/TableTree.module.css +1 -0
  178. package/TableTree/TableTree.module.css.js +62 -0
  179. package/TableTree/TableTree.module.css.js.map +1 -0
  180. package/Tabs/Tabs.js +92 -0
  181. package/Tabs/Tabs.js.map +1 -0
  182. package/Tabs/Tabs.module.css +1 -0
  183. package/Tabs/Tabs.module.css.js +18 -0
  184. package/Tabs/Tabs.module.css.js.map +1 -0
  185. package/Tag/Tag.js +48 -0
  186. package/Tag/Tag.js.map +1 -0
  187. package/Tag/Tag.module.css +1 -0
  188. package/Tag/Tag.module.css.js +30 -0
  189. package/Tag/Tag.module.css.js.map +1 -0
  190. package/TextField/TextField.js +93 -0
  191. package/TextField/TextField.js.map +1 -0
  192. package/TextField/TextField.module.css +1 -0
  193. package/TextField/TextField.module.css.js +36 -0
  194. package/TextField/TextField.module.css.js.map +1 -0
  195. package/Textarea/Textarea.js +52 -0
  196. package/Textarea/Textarea.js.map +1 -0
  197. package/Textarea/Textarea.module.css +1 -0
  198. package/Textarea/Textarea.module.css.js +32 -0
  199. package/Textarea/Textarea.module.css.js.map +1 -0
  200. package/Toast/Toast.js +82 -0
  201. package/Toast/Toast.js.map +1 -0
  202. package/Toast/Toast.module.css +1 -0
  203. package/Toast/Toast.module.css.js +28 -0
  204. package/Toast/Toast.module.css.js.map +1 -0
  205. package/Tooltip/Tooltip.js +61 -0
  206. package/Tooltip/Tooltip.js.map +1 -0
  207. package/Tooltip/Tooltip.module.css +1 -0
  208. package/Tooltip/Tooltip.module.css.js +26 -0
  209. package/Tooltip/Tooltip.module.css.js.map +1 -0
  210. package/TopBar/TopBar.js +87 -0
  211. package/TopBar/TopBar.js.map +1 -0
  212. package/TopBar/TopBar.module.css +1 -0
  213. package/TopBar/TopBar.module.css.js +30 -0
  214. package/TopBar/TopBar.module.css.js.map +1 -0
  215. package/index.js +90 -4157
  216. package/index.js.map +1 -1
  217. package/package.json +3 -4
  218. package/style.css +0 -1
@@ -0,0 +1 @@
1
+ ._checkbox_16nt9_2{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-family:var(--font-family-base, system-ui, sans-serif);font-size:var(--font-size-14);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-14);color:var(--color-text-neutral-mudle);-webkit-user-select:none;user-select:none}._checkbox_16nt9_2._disabled_16nt9_15{opacity:.5;cursor:not-allowed;pointer-events:none}._input_16nt9_22{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._box_16nt9_54{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;border-radius:4px;border:2px solid var(--color-stroke-neutral-default);background-color:var(--color-canvas-neutral-white);color:var(--color-icon-neutral-inverse);transition:background-color .12s ease,border-color .12s ease,box-shadow .12s ease;box-sizing:border-box}._checkbox_16nt9_2:not(._disabled_16nt9_15):hover ._box_16nt9_54{border-color:var(--color-stroke-interaction-neutral-hover)}._box_16nt9_54._checked_16nt9_78,._box_16nt9_54._indeterminate_16nt9_79{background-color:var(--color-fill-brand-default);border-color:var(--color-fill-brand-default)}._checkbox_16nt9_2:not(._disabled_16nt9_15):hover ._box_16nt9_54._checked_16nt9_78,._checkbox_16nt9_2:not(._disabled_16nt9_15):hover ._box_16nt9_54._indeterminate_16nt9_79{background-color:var(--color-fill-interaction-brand-hover);border-color:var(--color-stroke-interaction-brand-hover)}._input_16nt9_22:focus-visible~._box_16nt9_54{outline:none;box-shadow:var(--shadow-focus)}._icon_16nt9_98{display:flex;align-items:center;justify-content:center;color:var(--color-icon-neutral-inverse)}._label_16nt9_107{color:var(--color-text-neutral-mudle);font-size:var(--font-size-14);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-14)}
@@ -0,0 +1,22 @@
1
+ import './Checkbox.module.css';const n = "_checkbox_16nt9_2", t = "_disabled_16nt9_15", e = "_input_16nt9_22", c = "_box_16nt9_54", _ = "_checked_16nt9_78", o = "_indeterminate_16nt9_79", i = "_icon_16nt9_98", s = "_label_16nt9_107", d = {
2
+ checkbox: n,
3
+ disabled: t,
4
+ input: e,
5
+ box: c,
6
+ checked: _,
7
+ indeterminate: o,
8
+ icon: i,
9
+ label: s
10
+ };
11
+ export {
12
+ c as box,
13
+ n as checkbox,
14
+ _ as checked,
15
+ d as default,
16
+ t as disabled,
17
+ i as icon,
18
+ o as indeterminate,
19
+ e as input,
20
+ s as label
21
+ };
22
+ //# sourceMappingURL=Checkbox.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
package/Chip/Chip.js ADDED
@@ -0,0 +1,62 @@
1
+ import { jsxs as h, jsx as i } from "react/jsx-runtime";
2
+ import { XCircle as z } from "@phosphor-icons/react";
3
+ import { Icon as t } from "../Icon/Icon.js";
4
+ import e from "./Chip.module.css.js";
5
+ const C = {
6
+ filled: e.typeFilled,
7
+ outline: e.typeOutline
8
+ }, S = {
9
+ xsmall: e.sizeXsmall,
10
+ small: e.sizeSmall,
11
+ medium: e.sizeMedium,
12
+ large: e.sizeLarge
13
+ };
14
+ function v({
15
+ type: o = "filled",
16
+ size: a = "medium",
17
+ label: m = "Chip",
18
+ leadingIcon: s,
19
+ showClose: r = !1,
20
+ onClose: n,
21
+ closeLabel: c = "Dismiss",
22
+ disabled: l = !1,
23
+ className: p,
24
+ children: u,
25
+ ...f
26
+ }) {
27
+ const d = [
28
+ e.chip,
29
+ C[o],
30
+ S[a],
31
+ p
32
+ ].filter(Boolean).join(" ");
33
+ return /* @__PURE__ */ h(
34
+ "div",
35
+ {
36
+ className: d,
37
+ "aria-disabled": l || void 0,
38
+ role: "status",
39
+ ...f,
40
+ children: [
41
+ s && /* @__PURE__ */ i(t, { as: s, size: 16 }),
42
+ /* @__PURE__ */ i("span", { className: e.label, children: u ?? m }),
43
+ r && /* @__PURE__ */ i(
44
+ "button",
45
+ {
46
+ type: "button",
47
+ className: e.closeButton,
48
+ onClick: l ? void 0 : n,
49
+ "aria-label": c,
50
+ tabIndex: l ? -1 : 0,
51
+ disabled: l,
52
+ children: /* @__PURE__ */ i(t, { as: z, size: 16 })
53
+ }
54
+ )
55
+ ]
56
+ }
57
+ );
58
+ }
59
+ export {
60
+ v as Chip
61
+ };
62
+ //# sourceMappingURL=Chip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chip.js","sources":["../../src/Chip/Chip.tsx"],"sourcesContent":["import React from 'react';\nimport type { Icon as PhosphorIcon } from '@phosphor-icons/react';\nimport { XCircle } from '@phosphor-icons/react';\nimport { Icon } from '../Icon/index.js';\nimport styles from './Chip.module.css';\n\nexport type ChipType = 'filled' | 'outline';\nexport type ChipSize = 'xsmall' | 'small' | 'medium' | 'large';\n\nexport interface ChipProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Visual style of the chip */\n type?: ChipType;\n /** Size of the chip */\n size?: ChipSize;\n /** Text label displayed inside the chip */\n label?: string;\n /** Optional leading icon */\n leadingIcon?: PhosphorIcon;\n /** Whether to show the dismiss/close button */\n showClose?: boolean;\n /** Callback fired when the close button is clicked */\n onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n /** Accessible label for the close button. Defaults to \"Dismiss\". */\n closeLabel?: string;\n /** Whether the chip is disabled */\n disabled?: boolean;\n}\n\nconst TYPE_CLASS: Record<ChipType, string> = {\n filled: styles.typeFilled,\n outline: styles.typeOutline,\n};\n\nconst SIZE_CLASS: Record<ChipSize, string> = {\n xsmall: styles.sizeXsmall,\n small: styles.sizeSmall,\n medium: styles.sizeMedium,\n large: styles.sizeLarge,\n};\n\nexport function Chip({\n type = 'filled',\n size = 'medium',\n label = 'Chip',\n leadingIcon,\n showClose = false,\n onClose,\n closeLabel = 'Dismiss',\n disabled = false,\n className,\n children,\n ...props\n}: ChipProps) {\n const cls = [\n styles.chip,\n TYPE_CLASS[type],\n SIZE_CLASS[size],\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div\n className={cls}\n aria-disabled={disabled || undefined}\n role=\"status\"\n {...props}\n >\n {leadingIcon && (\n <Icon as={leadingIcon} size={16} />\n )}\n <span className={styles.label}>{children ?? label}</span>\n {showClose && (\n <button\n type=\"button\"\n className={styles.closeButton}\n onClick={disabled ? undefined : onClose}\n aria-label={closeLabel}\n tabIndex={disabled ? -1 : 0}\n disabled={disabled}\n >\n <Icon as={XCircle} size={16} />\n </button>\n )}\n </div>\n );\n}\n"],"names":["TYPE_CLASS","styles","SIZE_CLASS","Chip","type","size","label","leadingIcon","showClose","onClose","closeLabel","disabled","className","children","props","cls","jsxs","jsx","Icon","XCircle"],"mappings":";;;;AA4BA,MAAMA,IAAuC;AAAA,EAC3C,QAASC,EAAO;AAAA,EAChB,SAASA,EAAO;AAClB,GAEMC,IAAuC;AAAA,EAC3C,QAAQD,EAAO;AAAA,EACf,OAAQA,EAAO;AAAA,EACf,QAAQA,EAAO;AAAA,EACf,OAAQA,EAAO;AACjB;AAEO,SAASE,EAAK;AAAA,EACnB,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,aAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,SAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,UAAAC,IAAW;AAAA,EACX,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAAc;AACZ,QAAMC,IAAM;AAAA,IACVd,EAAO;AAAA,IACPD,EAAWI,CAAI;AAAA,IACfF,EAAWG,CAAI;AAAA,IACfO;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD;AAAA,MACX,iBAAeJ,KAAY;AAAA,MAC3B,MAAK;AAAA,MACJ,GAAGG;AAAA,MAEH,UAAA;AAAA,QAAAP,KACC,gBAAAU,EAACC,GAAA,EAAK,IAAIX,GAAa,MAAM,IAAI;AAAA,0BAElC,QAAA,EAAK,WAAWN,EAAO,OAAQ,eAAYK,GAAM;AAAA,QACjDE,KACC,gBAAAS;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAWhB,EAAO;AAAA,YAClB,SAASU,IAAW,SAAYF;AAAA,YAChC,cAAYC;AAAA,YACZ,UAAUC,IAAW,KAAK;AAAA,YAC1B,UAAAA;AAAA,YAEA,UAAA,gBAAAM,EAACC,GAAA,EAAK,IAAIC,GAAS,MAAM,GAAA,CAAI;AAAA,UAAA;AAAA,QAAA;AAAA,MAC/B;AAAA,IAAA;AAAA,EAAA;AAIR;"}
@@ -0,0 +1 @@
1
+ ._chip_12bpc_2{display:inline-flex;align-items:center;gap:4px;padding:4px 12px;border-radius:9999px;box-sizing:border-box;font-family:var(--font-family-base, system-ui, sans-serif);font-size:var(--font-size-12);font-weight:var(--font-weight-semibold);line-height:var(--font-line-height-12);white-space:nowrap;flex-shrink:0;cursor:default;max-width:200px;transition:background-color .12s ease,border-color .12s ease,color .12s ease,box-shadow .12s ease,opacity .12s ease}._chip_12bpc_2:focus-visible{outline:none;box-shadow:var(--shadow-focus)}._label_12bpc_31{flex:1 0 0;min-width:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._closeButton_12bpc_40{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;margin:0;cursor:pointer;color:inherit;flex-shrink:0;border-radius:9999px;transition:opacity .12s ease}._closeButton_12bpc_40:focus-visible{outline:none;box-shadow:var(--shadow-focus)}._chip_12bpc_2:disabled,._chip_12bpc_2[aria-disabled=true]{opacity:.5;cursor:not-allowed;pointer-events:none}._sizeXsmall_12bpc_69{height:24px}._sizeSmall_12bpc_73{height:28px}._sizeMedium_12bpc_77{height:32px}._sizeLarge_12bpc_81{height:36px}._typeFilled_12bpc_87{background-color:var(--color-fill-neutral-muted);color:var(--color-text-neutral-mudle)}._typeFilled_12bpc_87:hover:not([aria-disabled=true]):not(:disabled){background-color:var(--color-fill-interaction-neutral-muted-hover)}._typeOutline_12bpc_100{background-color:var(--color-canvas-neutral-white);color:var(--color-text-neutral-mudle);border:1px solid var(--color-stroke-neutral-default)}._typeOutline_12bpc_100:hover:not([aria-disabled=true]):not(:disabled){border-color:var(--color-stroke-interaction-neutral-hover)}
@@ -0,0 +1,24 @@
1
+ import './Chip.module.css';const e = "_chip_12bpc_2", l = "_label_12bpc_31", s = "_closeButton_12bpc_40", t = "_sizeXsmall_12bpc_69", _ = "_sizeSmall_12bpc_73", c = "_sizeMedium_12bpc_77", i = "_sizeLarge_12bpc_81", p = "_typeFilled_12bpc_87", o = "_typeOutline_12bpc_100", n = {
2
+ chip: e,
3
+ label: l,
4
+ closeButton: s,
5
+ sizeXsmall: t,
6
+ sizeSmall: _,
7
+ sizeMedium: c,
8
+ sizeLarge: i,
9
+ typeFilled: p,
10
+ typeOutline: o
11
+ };
12
+ export {
13
+ e as chip,
14
+ s as closeButton,
15
+ n as default,
16
+ l as label,
17
+ i as sizeLarge,
18
+ c as sizeMedium,
19
+ _ as sizeSmall,
20
+ t as sizeXsmall,
21
+ p as typeFilled,
22
+ o as typeOutline
23
+ };
24
+ //# sourceMappingURL=Chip.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chip.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,157 @@
1
+ import { jsxs as g, jsx as i } from "react/jsx-runtime";
2
+ import { useId as Y, useRef as q, useState as C, useEffect as $, useCallback as A } from "react";
3
+ import { CalendarDots as J, Info as K, Warning as Q, CheckCircle as U, XCircle as V } from "@phosphor-icons/react";
4
+ import { Icon as h } from "../Icon/Icon.js";
5
+ import { DatePickerCalendar as Z } from "./DatePickerCalendar.js";
6
+ import e from "./DatePicker.module.css.js";
7
+ function _(a) {
8
+ const n = a.replace(/\D/g, "").slice(0, 8);
9
+ let t = n.slice(0, 2);
10
+ return n.length > 2 && (t += "/" + n.slice(2, 4)), n.length > 4 && (t += "/" + n.slice(4, 8)), t;
11
+ }
12
+ function y(a) {
13
+ const n = a.replace(/\D/g, "");
14
+ if (n.length !== 8) return null;
15
+ const t = n.slice(0, 2), c = n.slice(2, 4), u = n.slice(4, 8), d = Number(t), l = Number(c), f = Number(u);
16
+ if (l < 1 || l > 12 || d < 1 || d > 31 || f < 1) return null;
17
+ const s = new Date(f, l - 1, d);
18
+ return s.getFullYear() !== f || s.getMonth() !== l - 1 || s.getDate() !== d ? null : `${u}-${c}-${t}`;
19
+ }
20
+ function k(a) {
21
+ if (!a) return "";
22
+ const [n, t, c] = a.split("-");
23
+ return !n || !t || !c ? "" : `${c}/${t}/${n}`;
24
+ }
25
+ function ae({
26
+ label: a = "Label",
27
+ showLabel: n = !0,
28
+ value: t = "",
29
+ placeholder: c = "dd/mm/aaaa",
30
+ hint: u,
31
+ hintType: d = "default",
32
+ state: l = "default",
33
+ disabled: f = !1,
34
+ onChange: s,
35
+ className: z,
36
+ id: S,
37
+ min: B,
38
+ max: O
39
+ }) {
40
+ const P = Y(), w = S ?? P, I = q(null), [x, D] = C(() => k(t)), [b, N] = C(!1);
41
+ $(() => {
42
+ const r = y(x) ?? "";
43
+ t !== r && D(k(t));
44
+ }, [t]);
45
+ const W = A(() => N(!1), []);
46
+ $(() => {
47
+ if (!b) return;
48
+ function r(p) {
49
+ I.current && !I.current.contains(p.target) && N(!1);
50
+ }
51
+ return document.addEventListener("mousedown", r), () => document.removeEventListener("mousedown", r);
52
+ }, [b]);
53
+ const m = f || l === "disabled", v = l === "danger", T = l === "success", E = [
54
+ e.field,
55
+ v && e.fieldDanger,
56
+ T && e.fieldSuccess,
57
+ m && e.fieldDisabled
58
+ ].filter(Boolean).join(" "), L = [
59
+ e.datePicker,
60
+ m && e.disabled,
61
+ z
62
+ ].filter(Boolean).join(" "), o = v ? "danger" : T ? "success" : d, F = [
63
+ e.hintText,
64
+ o === "danger" && e.hintDanger,
65
+ o === "success" && e.hintSuccess,
66
+ o === "warning" && e.hintWarning
67
+ ].filter(Boolean).join(" "), H = [
68
+ e.hintIcon,
69
+ o === "danger" && e.hintIconDanger,
70
+ o === "success" && e.hintIconSuccess,
71
+ o === "warning" && e.hintIconWarning
72
+ ].filter(Boolean).join(" ");
73
+ function M() {
74
+ switch (o) {
75
+ case "danger":
76
+ return /* @__PURE__ */ i(h, { as: V, size: 16 });
77
+ case "success":
78
+ return /* @__PURE__ */ i(h, { as: U, size: 16 });
79
+ case "warning":
80
+ return /* @__PURE__ */ i(h, { as: Q, size: 16 });
81
+ default:
82
+ return /* @__PURE__ */ i(h, { as: K, size: 16 });
83
+ }
84
+ }
85
+ function R(r) {
86
+ const p = _(r.target.value);
87
+ if (D(p), p === "") {
88
+ s == null || s("");
89
+ return;
90
+ }
91
+ const j = y(p);
92
+ j && (s == null || s(j));
93
+ }
94
+ function G() {
95
+ m || N((r) => !r);
96
+ }
97
+ function X(r) {
98
+ s == null || s(r), D(k(r));
99
+ }
100
+ return /* @__PURE__ */ g("div", { ref: I, className: L, children: [
101
+ /* @__PURE__ */ g("div", { className: e.topGroup, children: [
102
+ n && /* @__PURE__ */ i("label", { className: e.label, htmlFor: w, children: a }),
103
+ /* @__PURE__ */ g("div", { className: e.fieldWrapper, children: [
104
+ /* @__PURE__ */ g("div", { className: E, children: [
105
+ /* @__PURE__ */ i(
106
+ "input",
107
+ {
108
+ id: w,
109
+ type: "text",
110
+ inputMode: "numeric",
111
+ className: e.input,
112
+ value: x,
113
+ disabled: m,
114
+ placeholder: c,
115
+ maxLength: 10,
116
+ onChange: R,
117
+ "aria-label": n ? void 0 : a || c,
118
+ "aria-invalid": v ? !0 : void 0
119
+ }
120
+ ),
121
+ /* @__PURE__ */ i(
122
+ "button",
123
+ {
124
+ type: "button",
125
+ className: e.calendarIcon,
126
+ onClick: G,
127
+ disabled: m,
128
+ tabIndex: -1,
129
+ "aria-label": "Open calendar",
130
+ "aria-expanded": b,
131
+ "aria-haspopup": "true",
132
+ children: /* @__PURE__ */ i(h, { as: J, size: 20 })
133
+ }
134
+ )
135
+ ] }),
136
+ b && /* @__PURE__ */ i("div", { className: e.calendarPopup, children: /* @__PURE__ */ i(
137
+ Z,
138
+ {
139
+ value: y(x) ?? void 0,
140
+ min: B,
141
+ max: O,
142
+ onChange: X,
143
+ onClose: W
144
+ }
145
+ ) })
146
+ ] })
147
+ ] }),
148
+ u && /* @__PURE__ */ g("div", { className: e.hint, role: v ? "alert" : void 0, children: [
149
+ /* @__PURE__ */ i("span", { className: H, children: /* @__PURE__ */ i(M, {}) }),
150
+ /* @__PURE__ */ i("span", { className: F, children: u })
151
+ ] })
152
+ ] });
153
+ }
154
+ export {
155
+ ae as DatePicker
156
+ };
157
+ //# sourceMappingURL=DatePicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePicker.js","sources":["../../src/DatePicker/DatePicker.tsx"],"sourcesContent":["import React, { useId, useRef, useState, useEffect, useCallback } from 'react';\nimport { CalendarDots, Info, XCircle, CheckCircle, Warning } from '@phosphor-icons/react';\nimport { Icon } from '../Icon/index.js';\nimport { DatePickerCalendar } from './DatePickerCalendar.js';\nimport styles from './DatePicker.module.css';\n\n/** Mask a raw string into incremental dd/mm/aaaa as the user types. */\nfunction maskDate(raw: string): string {\n const digits = raw.replace(/\\D/g, '').slice(0, 8);\n let out = digits.slice(0, 2);\n if (digits.length > 2) out += '/' + digits.slice(2, 4);\n if (digits.length > 4) out += '/' + digits.slice(4, 8);\n return out;\n}\n\n/** Convert a complete, valid dd/mm/aaaa string to ISO (YYYY-MM-DD), or null. */\nfunction textToIso(text: string): string | null {\n const digits = text.replace(/\\D/g, '');\n if (digits.length !== 8) return null;\n const dd = digits.slice(0, 2);\n const mm = digits.slice(2, 4);\n const yyyy = digits.slice(4, 8);\n const d = Number(dd);\n const m = Number(mm);\n const y = Number(yyyy);\n if (m < 1 || m > 12 || d < 1 || d > 31 || y < 1) return null;\n const date = new Date(y, m - 1, d);\n if (date.getFullYear() !== y || date.getMonth() !== m - 1 || date.getDate() !== d) {\n return null;\n }\n return `${yyyy}-${mm}-${dd}`;\n}\n\n/** Convert an ISO date (YYYY-MM-DD) to a dd/mm/aaaa display string. */\nfunction isoToText(iso: string): string {\n if (!iso) return '';\n const [y, m, d] = iso.split('-');\n if (!y || !m || !d) return '';\n return `${d}/${m}/${y}`;\n}\n\nexport type DatePickerState = 'default' | 'hover' | 'disabled' | 'danger' | 'success';\nexport type DatePickerHintType = 'default' | 'danger' | 'success' | 'warning';\n\nexport interface DatePickerProps {\n /** Field label text */\n label?: string;\n /** Whether to show the label */\n showLabel?: boolean;\n /** Current value (YYYY-MM-DD) */\n value?: string;\n /** Placeholder text shown when no value is selected */\n placeholder?: string;\n /** Hint / helper text rendered below the field */\n hint?: string;\n /** Visual type of the hint row */\n hintType?: DatePickerHintType;\n /** Visual state of the component */\n state?: DatePickerState;\n /** Whether the field is disabled */\n disabled?: boolean;\n /** Change handler – receives the new date string (YYYY-MM-DD) */\n onChange?: (value: string) => void;\n /** Additional class name for the wrapper element */\n className?: string;\n /** id forwarded to the underlying <input> */\n id?: string;\n /** Minimum selectable date (YYYY-MM-DD) */\n min?: string;\n /** Maximum selectable date (YYYY-MM-DD) */\n max?: string;\n}\n\nexport function DatePicker({\n label = 'Label',\n showLabel = true,\n value = '',\n placeholder = 'dd/mm/aaaa',\n hint,\n hintType = 'default',\n state = 'default',\n disabled = false,\n onChange,\n className,\n id: idProp,\n min,\n max,\n}: DatePickerProps) {\n const generatedId = useId();\n const inputId = idProp ?? generatedId;\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n const [text, setText] = useState(() => isoToText(value));\n const [calendarOpen, setCalendarOpen] = useState(false);\n\n useEffect(() => {\n const currentIso = textToIso(text) ?? '';\n if (value !== currentIso) {\n setText(isoToText(value));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n\n const closeCalendar = useCallback(() => setCalendarOpen(false), []);\n\n useEffect(() => {\n if (!calendarOpen) return;\n function handleOutside(e: MouseEvent) {\n if (wrapperRef.current && !wrapperRef.current.contains(e.target as Node)) {\n setCalendarOpen(false);\n }\n }\n document.addEventListener('mousedown', handleOutside);\n return () => document.removeEventListener('mousedown', handleOutside);\n }, [calendarOpen]);\n\n const isDisabled = disabled || state === 'disabled';\n const isDanger = state === 'danger';\n const isSuccess = state === 'success';\n\n const fieldCls = [\n styles.field,\n isDanger && styles.fieldDanger,\n isSuccess && styles.fieldSuccess,\n isDisabled && styles.fieldDisabled,\n ]\n .filter(Boolean)\n .join(' ');\n\n const wrapperCls = [\n styles.datePicker,\n isDisabled && styles.disabled,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const resolvedHintType: DatePickerHintType = isDanger\n ? 'danger'\n : isSuccess\n ? 'success'\n : hintType;\n\n const hintTextCls = [\n styles.hintText,\n resolvedHintType === 'danger' && styles.hintDanger,\n resolvedHintType === 'success' && styles.hintSuccess,\n resolvedHintType === 'warning' && styles.hintWarning,\n ]\n .filter(Boolean)\n .join(' ');\n\n const hintIconCls = [\n styles.hintIcon,\n resolvedHintType === 'danger' && styles.hintIconDanger,\n resolvedHintType === 'success' && styles.hintIconSuccess,\n resolvedHintType === 'warning' && styles.hintIconWarning,\n ]\n .filter(Boolean)\n .join(' ');\n\n function HintIcon() {\n switch (resolvedHintType) {\n case 'danger':\n return <Icon as={XCircle} size={16} />;\n case 'success':\n return <Icon as={CheckCircle} size={16} />;\n case 'warning':\n return <Icon as={Warning} size={16} />;\n default:\n return <Icon as={Info} size={16} />;\n }\n }\n\n function handleTextChange(e: React.ChangeEvent<HTMLInputElement>) {\n const masked = maskDate(e.target.value);\n setText(masked);\n if (masked === '') {\n onChange?.('');\n return;\n }\n const iso = textToIso(masked);\n if (iso) onChange?.(iso);\n }\n\n function toggleCalendar() {\n if (!isDisabled) setCalendarOpen(o => !o);\n }\n\n function handleCalendarChange(iso: string) {\n onChange?.(iso);\n setText(isoToText(iso));\n }\n\n return (\n <div ref={wrapperRef} className={wrapperCls}>\n <div className={styles.topGroup}>\n {showLabel && (\n <label className={styles.label} htmlFor={inputId}>\n {label}\n </label>\n )}\n\n <div className={styles.fieldWrapper}>\n <div className={fieldCls}>\n <input\n id={inputId}\n type=\"text\"\n inputMode=\"numeric\"\n className={styles.input}\n value={text}\n disabled={isDisabled}\n placeholder={placeholder}\n maxLength={10}\n onChange={handleTextChange}\n aria-label={showLabel ? undefined : label || placeholder}\n aria-invalid={isDanger ? true : undefined}\n />\n\n <button\n type=\"button\"\n className={styles.calendarIcon}\n onClick={toggleCalendar}\n disabled={isDisabled}\n tabIndex={-1}\n aria-label=\"Open calendar\"\n aria-expanded={calendarOpen}\n aria-haspopup=\"true\"\n >\n <Icon as={CalendarDots} size={20} />\n </button>\n </div>\n\n {calendarOpen && (\n <div className={styles.calendarPopup}>\n <DatePickerCalendar\n value={textToIso(text) ?? undefined}\n min={min}\n max={max}\n onChange={handleCalendarChange}\n onClose={closeCalendar}\n />\n </div>\n )}\n </div>\n </div>\n\n {hint && (\n <div className={styles.hint} role={isDanger ? 'alert' : undefined}>\n <span className={hintIconCls}>\n <HintIcon />\n </span>\n <span className={hintTextCls}>{hint}</span>\n </div>\n )}\n </div>\n );\n}\n"],"names":["maskDate","raw","digits","out","textToIso","text","dd","mm","yyyy","m","y","date","isoToText","iso","d","DatePicker","label","showLabel","value","placeholder","hint","hintType","state","disabled","onChange","className","idProp","min","max","generatedId","useId","inputId","wrapperRef","useRef","setText","useState","calendarOpen","setCalendarOpen","useEffect","currentIso","closeCalendar","useCallback","handleOutside","e","isDisabled","isDanger","isSuccess","fieldCls","styles","wrapperCls","resolvedHintType","hintTextCls","hintIconCls","HintIcon","jsx","Icon","XCircle","CheckCircle","Warning","Info","handleTextChange","masked","toggleCalendar","o","handleCalendarChange","jsxs","CalendarDots","DatePickerCalendar"],"mappings":";;;;;;AAOA,SAASA,EAASC,GAAqB;AACrC,QAAMC,IAASD,EAAI,QAAQ,OAAO,EAAE,EAAE,MAAM,GAAG,CAAC;AAChD,MAAIE,IAAMD,EAAO,MAAM,GAAG,CAAC;AAC3B,SAAIA,EAAO,SAAS,MAAGC,KAAO,MAAMD,EAAO,MAAM,GAAG,CAAC,IACjDA,EAAO,SAAS,MAAGC,KAAO,MAAMD,EAAO,MAAM,GAAG,CAAC,IAC9CC;AACT;AAGA,SAASC,EAAUC,GAA6B;AAC9C,QAAMH,IAASG,EAAK,QAAQ,OAAO,EAAE;AACrC,MAAIH,EAAO,WAAW,EAAG,QAAO;AAChC,QAAMI,IAAKJ,EAAO,MAAM,GAAG,CAAC,GACtBK,IAAKL,EAAO,MAAM,GAAG,CAAC,GACtBM,IAAON,EAAO,MAAM,GAAG,CAAC,GACxB,IAAI,OAAOI,CAAE,GACbG,IAAI,OAAOF,CAAE,GACbG,IAAI,OAAOF,CAAI;AACrB,MAAIC,IAAI,KAAKA,IAAI,MAAM,IAAI,KAAK,IAAI,MAAMC,IAAI,EAAG,QAAO;AACxD,QAAMC,IAAO,IAAI,KAAKD,GAAGD,IAAI,GAAG,CAAC;AACjC,SAAIE,EAAK,kBAAkBD,KAAKC,EAAK,eAAeF,IAAI,KAAKE,EAAK,QAAA,MAAc,IACvE,OAEF,GAAGH,CAAI,IAAID,CAAE,IAAID,CAAE;AAC5B;AAGA,SAASM,EAAUC,GAAqB;AACtC,MAAI,CAACA,EAAK,QAAO;AACjB,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AAA;AAAA,UAAA;AAAA,QACpC,GACF;AAAA,QAEC9B,KACC,gBAAAkB,EAAC,OAAA,EAAI,WAAWN,EAAO,eACrB,UAAA,gBAAAM;AAAA,UAACa;AAAA,UAAA;AAAA,YACC,OAAO/D,EAAUC,CAAI,KAAK;AAAA,YAC1B,KAAAsB;AAAA,YACA,KAAAC;AAAA,YACA,UAAUoC;AAAA,YACV,SAASxB;AAAA,UAAA;AAAA,QAAA,EACX,CACF;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA,GACF;AAAA,IAECpB,uBACE,OAAA,EAAI,WAAW4B,EAAO,MAAM,MAAMH,IAAW,UAAU,QACtD,UAAA;AAAA,MAAA,gBAAAS,EAAC,QAAA,EAAK,WAAWF,GACf,UAAA,gBAAAE,EAACD,KAAS,GACZ;AAAA,MACA,gBAAAC,EAAC,QAAA,EAAK,WAAWH,GAAc,UAAA/B,EAAA,CAAK;AAAA,IAAA,EAAA,CACtC;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -0,0 +1 @@
1
+ ._datePicker_1suoh_2{display:flex;flex-direction:column;gap:4px;align-items:flex-start;width:100%;font-family:var(--font-family-base, system-ui, sans-serif)}._topGroup_1suoh_12{display:flex;flex-direction:column;gap:8px;align-items:flex-start;width:100%}._fieldWrapper_1suoh_21{position:relative;width:100%}._calendarPopup_1suoh_27{position:absolute;top:calc(100% + 4px);right:0;z-index:100}._label_1suoh_35{display:flex;align-items:center;gap:4px;font-size:var(--font-size-14);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-14);color:var(--color-text-neutral-mudle);-webkit-user-select:none;user-select:none}._field_1suoh_21{display:flex;align-items:center;gap:8px;height:42px;padding:4px 12px;width:100%;border-radius:8px;border:1px solid transparent;background-color:var(--color-fill-neutral-muted);cursor:pointer;transition:background-color .12s ease,border-color .12s ease,box-shadow .12s ease,opacity .12s ease;box-sizing:border-box;position:relative}._field_1suoh_21:hover:not(._fieldDisabled_1suoh_67){background-color:var(--color-fill-interaction-neutral-muted-hover)}._field_1suoh_21:focus-within:not(._fieldDisabled_1suoh_67),._fieldFocused_1suoh_72:not(._fieldDisabled_1suoh_67){background-color:var(--color-canvas-neutral-white);border-color:var(--color-stroke-interaction-brand-focus);box-shadow:var(--shadow-focus);outline:none}._field_1suoh_21:focus-visible{outline:none}._fieldDanger_1suoh_84{background-color:var(--color-fill-feedback-danger-subtle);border-color:var(--color-stroke-feedback-danger-default)}._fieldDanger_1suoh_84:hover:not(._fieldDisabled_1suoh_67){background-color:var(--color-fill-feedback-danger-subtle);border-color:var(--color-stroke-interaction-danger-hover)}._fieldDanger_1suoh_84:focus-within:not(._fieldDisabled_1suoh_67){background-color:var(--color-canvas-neutral-white);border-color:var(--color-stroke-interaction-brand-focus);box-shadow:var(--shadow-focus)}._fieldSuccess_1suoh_101{background-color:var(--color-fill-feedback-success-subtle);border-color:var(--color-stroke-feedback-success-default)}._fieldSuccess_1suoh_101:hover:not(._fieldDisabled_1suoh_67){background-color:var(--color-fill-feedback-success-subtle);border-color:var(--color-stroke-feedback-success-default)}._fieldSuccess_1suoh_101:focus-within:not(._fieldDisabled_1suoh_67){background-color:var(--color-canvas-neutral-white);border-color:var(--color-stroke-interaction-brand-focus);box-shadow:var(--shadow-focus)}._datePicker_1suoh_2._disabled_1suoh_118{opacity:.5;cursor:not-allowed}._fieldDisabled_1suoh_67{pointer-events:none}._input_1suoh_128{flex:1 0 0;min-width:0;height:100%;border:none;background:none;padding:0;margin:0;font-family:inherit;font-size:var(--font-size-14);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-14);color:var(--color-text-neutral-default);cursor:text;outline:none}._input_1suoh_128::placeholder{color:var(--color-text-neutral-subtlest);opacity:1}._input_1suoh_128:disabled{cursor:not-allowed;color:var(--color-text-neutral-default)}._hiddenPicker_1suoh_156{position:absolute;width:1px;height:1px;padding:0;margin:0;border:0;opacity:0;pointer-events:none;right:12px;bottom:0}._calendarIcon_1suoh_171{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0;border:none;background:none;color:var(--color-icon-neutral-default);cursor:pointer}._calendarIcon_1suoh_171:disabled{cursor:not-allowed}._hint_1suoh_188{display:flex;align-items:center;gap:4px;width:100%}._hintIcon_1suoh_195{flex-shrink:0;display:flex;align-items:center;color:var(--color-icon-neutral-subtle)}._hintText_1suoh_202{flex:1 0 0;min-width:0;font-size:var(--font-size-12);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-12);color:var(--color-text-neutral-mudle)}._hintText_1suoh_202._hintDanger_1suoh_211{color:var(--color-text-feedback-danger-default)}._hintText_1suoh_202._hintSuccess_1suoh_215{color:var(--color-text-feedback-success-default)}._hintText_1suoh_202._hintWarning_1suoh_219{color:var(--color-text-feedback-warning-default)}._hintIconDanger_1suoh_223{color:var(--color-icon-feedback-danger-default)}._hintIconSuccess_1suoh_227{color:var(--color-icon-feedback-success-default)}._hintIconWarning_1suoh_231{color:var(--color-icon-feedback-warning-default)}
@@ -0,0 +1,48 @@
1
+ import './DatePicker.module.css';const n = "_datePicker_1suoh_2", s = "_topGroup_1suoh_12", o = "_fieldWrapper_1suoh_21", c = "_calendarPopup_1suoh_27", t = "_label_1suoh_35", e = "_field_1suoh_21", _ = "_fieldDisabled_1suoh_67", i = "_fieldDanger_1suoh_84", h = "_fieldSuccess_1suoh_101", a = "_disabled_1suoh_118", u = "_input_1suoh_128", l = "_calendarIcon_1suoh_171", d = "_hint_1suoh_188", r = "_hintIcon_1suoh_195", p = "_hintText_1suoh_202", f = "_hintDanger_1suoh_211", g = "_hintSuccess_1suoh_215", I = "_hintWarning_1suoh_219", D = "_hintIconDanger_1suoh_223", b = "_hintIconSuccess_1suoh_227", S = "_hintIconWarning_1suoh_231", W = {
2
+ datePicker: n,
3
+ topGroup: s,
4
+ fieldWrapper: o,
5
+ calendarPopup: c,
6
+ label: t,
7
+ field: e,
8
+ fieldDisabled: _,
9
+ fieldDanger: i,
10
+ fieldSuccess: h,
11
+ disabled: a,
12
+ input: u,
13
+ calendarIcon: l,
14
+ hint: d,
15
+ hintIcon: r,
16
+ hintText: p,
17
+ hintDanger: f,
18
+ hintSuccess: g,
19
+ hintWarning: I,
20
+ hintIconDanger: D,
21
+ hintIconSuccess: b,
22
+ hintIconWarning: S
23
+ };
24
+ export {
25
+ l as calendarIcon,
26
+ c as calendarPopup,
27
+ n as datePicker,
28
+ W as default,
29
+ a as disabled,
30
+ e as field,
31
+ i as fieldDanger,
32
+ _ as fieldDisabled,
33
+ h as fieldSuccess,
34
+ o as fieldWrapper,
35
+ d as hint,
36
+ f as hintDanger,
37
+ r as hintIcon,
38
+ D as hintIconDanger,
39
+ b as hintIconSuccess,
40
+ S as hintIconWarning,
41
+ g as hintSuccess,
42
+ p as hintText,
43
+ I as hintWarning,
44
+ u as input,
45
+ t as label,
46
+ s as topGroup
47
+ };
48
+ //# sourceMappingURL=DatePicker.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePicker.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,94 @@
1
+ import { jsxs as y, jsx as a } from "react/jsx-runtime";
2
+ import { useState as D } from "react";
3
+ import { CaretLeft as Y, CaretRight as $ } from "@phosphor-icons/react";
4
+ import { Icon as g } from "../Icon/Icon.js";
5
+ import s from "./DatePickerCalendar.module.css.js";
6
+ const I = [
7
+ "Janeiro",
8
+ "Fevereiro",
9
+ "Março",
10
+ "Abril",
11
+ "Maio",
12
+ "Junho",
13
+ "Julho",
14
+ "Agosto",
15
+ "Setembro",
16
+ "Outubro",
17
+ "Novembro",
18
+ "Dezembro"
19
+ ], P = ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"];
20
+ function A() {
21
+ const t = /* @__PURE__ */ new Date();
22
+ return `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}`;
23
+ }
24
+ function S(t, o, r) {
25
+ return `${String(t).padStart(4, "0")}-${String(o + 1).padStart(2, "0")}-${String(r).padStart(2, "0")}`;
26
+ }
27
+ function O(t, o) {
28
+ const r = new Date(t, o, 1).getDay(), m = new Date(t, o + 1, 0).getDate(), l = new Date(t, o, 0).getDate(), [u, p] = o === 0 ? [t - 1, 11] : [t, o - 1], [b, f] = o === 11 ? [t + 1, 0] : [t, o + 1], c = [];
29
+ for (let e = r - 1; e >= 0; e--) {
30
+ const i = l - e;
31
+ c.push({ day: i, kind: "prev", iso: S(u, p, i) });
32
+ }
33
+ for (let e = 1; e <= m; e++)
34
+ c.push({ day: e, kind: "current", iso: S(t, o, e) });
35
+ for (let e = 1; c.length < 42; e++)
36
+ c.push({ day: e, kind: "next", iso: S(b, f, e) });
37
+ return Array.from({ length: 6 }, (e, i) => c.slice(i * 7, i * 7 + 7));
38
+ }
39
+ function j({ day: t, outside: o, selected: r, today: m, disabled: l, onClick: u }) {
40
+ const p = [
41
+ s.date,
42
+ o && s.dateOutside,
43
+ r && s.dateSelected,
44
+ m && !r && s.dateToday,
45
+ l && s.dateDisabled
46
+ ].filter(Boolean).join(" ");
47
+ return /* @__PURE__ */ a("button", { type: "button", className: p, onClick: u, disabled: l, children: t });
48
+ }
49
+ function _({ value: t, min: o, max: r, onChange: m, onClose: l }) {
50
+ const u = A(), p = Number(t ? t.slice(0, 4) : u.slice(0, 4)), b = t ? Number(t.slice(5, 7)) - 1 : Number(u.slice(5, 7)) - 1, [f, c] = D(p), [e, i] = D(b);
51
+ function N() {
52
+ e === 0 ? (c((n) => n - 1), i(11)) : i((n) => n - 1);
53
+ }
54
+ function w() {
55
+ e === 11 ? (c((n) => n + 1), i(0)) : i((n) => n + 1);
56
+ }
57
+ function k(n) {
58
+ n.key === "Escape" && l();
59
+ }
60
+ const h = O(f, e), M = h[5].every((n) => n.kind === "next") ? h.slice(0, 5) : h;
61
+ return /* @__PURE__ */ y("div", { className: s.calendar, onKeyDown: k, children: [
62
+ /* @__PURE__ */ y("div", { className: s.header, children: [
63
+ /* @__PURE__ */ a("button", { type: "button", className: s.navBtn, onClick: N, "aria-label": "Mês anterior", children: /* @__PURE__ */ a(g, { as: Y, size: 16 }) }),
64
+ /* @__PURE__ */ y("span", { className: s.monthYear, children: [
65
+ I[e],
66
+ " ",
67
+ f
68
+ ] }),
69
+ /* @__PURE__ */ a("button", { type: "button", className: s.navBtn, onClick: w, "aria-label": "Próximo mês", children: /* @__PURE__ */ a(g, { as: $, size: 16 }) })
70
+ ] }),
71
+ /* @__PURE__ */ a("div", { className: s.dayLabelsRow, children: P.map((n) => /* @__PURE__ */ a("span", { className: s.dayLabel, children: n }, n)) }),
72
+ /* @__PURE__ */ a("div", { className: s.grid, children: M.map((n, v) => /* @__PURE__ */ a("div", { className: s.week, children: n.map((d) => {
73
+ const x = !!t && t === d.iso, C = u === d.iso, T = !!o && d.iso < o || !!r && d.iso > r;
74
+ return /* @__PURE__ */ a(
75
+ j,
76
+ {
77
+ day: d.day,
78
+ outside: d.kind !== "current",
79
+ selected: x,
80
+ today: C,
81
+ disabled: T,
82
+ onClick: () => {
83
+ m(d.iso), l();
84
+ }
85
+ },
86
+ d.iso
87
+ );
88
+ }) }, v)) })
89
+ ] });
90
+ }
91
+ export {
92
+ _ as DatePickerCalendar
93
+ };
94
+ //# sourceMappingURL=DatePickerCalendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePickerCalendar.js","sources":["../../src/DatePicker/DatePickerCalendar.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { CaretLeft, CaretRight } from '@phosphor-icons/react';\nimport { Icon } from '../Icon/index.js';\nimport styles from './DatePickerCalendar.module.css';\n\nconst MONTHS_PT = [\n 'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho',\n 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro',\n];\n\nconst DAYS_PT = ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'];\n\nfunction currentIso(): string {\n const d = new Date();\n return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;\n}\n\nfunction toIso(year: number, month: number, day: number): string {\n return `${String(year).padStart(4, '0')}-${String(month + 1).padStart(2, '0')}-${String(day).padStart(2, '0')}`;\n}\n\ninterface CalendarDay {\n day: number;\n kind: 'prev' | 'current' | 'next';\n iso: string;\n}\n\nfunction buildGrid(year: number, month: number): CalendarDay[][] {\n const firstDayOfWeek = new Date(year, month, 1).getDay();\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n const daysInPrevMonth = new Date(year, month, 0).getDate();\n const [py, pm] = month === 0 ? [year - 1, 11] : [year, month - 1];\n const [ny, nm] = month === 11 ? [year + 1, 0] : [year, month + 1];\n\n const cells: CalendarDay[] = [];\n\n for (let i = firstDayOfWeek - 1; i >= 0; i--) {\n const day = daysInPrevMonth - i;\n cells.push({ day, kind: 'prev', iso: toIso(py, pm, day) });\n }\n for (let day = 1; day <= daysInMonth; day++) {\n cells.push({ day, kind: 'current', iso: toIso(year, month, day) });\n }\n for (let day = 1; cells.length < 42; day++) {\n cells.push({ day, kind: 'next', iso: toIso(ny, nm, day) });\n }\n\n return Array.from({ length: 6 }, (_, i) => cells.slice(i * 7, i * 7 + 7));\n}\n\n// ─── CalendarDate ─────────────────────────────────────────────────────────────\n\ninterface CalendarDateProps {\n day: number;\n outside: boolean;\n selected: boolean;\n today: boolean;\n disabled: boolean;\n onClick: () => void;\n}\n\nfunction CalendarDate({ day, outside, selected, today, disabled, onClick }: CalendarDateProps) {\n const cls = [\n styles.date,\n outside && styles.dateOutside,\n selected && styles.dateSelected,\n today && !selected && styles.dateToday,\n disabled && styles.dateDisabled,\n ].filter(Boolean).join(' ');\n\n return (\n <button type=\"button\" className={cls} onClick={onClick} disabled={disabled}>\n {day}\n </button>\n );\n}\n\n// ─── DatePickerCalendar ───────────────────────────────────────────────────────\n\nexport interface DatePickerCalendarProps {\n value?: string;\n min?: string;\n max?: string;\n onChange: (iso: string) => void;\n onClose: () => void;\n}\n\nexport function DatePickerCalendar({ value, min, max, onChange, onClose }: DatePickerCalendarProps) {\n const today = currentIso();\n\n const initYear = value ? Number(value.slice(0, 4)) : Number(today.slice(0, 4));\n const initMonth = value ? Number(value.slice(5, 7)) - 1 : Number(today.slice(5, 7)) - 1;\n\n const [viewYear, setViewYear] = useState(initYear);\n const [viewMonth, setViewMonth] = useState(initMonth);\n\n function prevMonth() {\n if (viewMonth === 0) { setViewYear(y => y - 1); setViewMonth(11); }\n else setViewMonth(m => m - 1);\n }\n\n function nextMonth() {\n if (viewMonth === 11) { setViewYear(y => y + 1); setViewMonth(0); }\n else setViewMonth(m => m + 1);\n }\n\n function handleKeyDown(e: React.KeyboardEvent) {\n if (e.key === 'Escape') onClose();\n }\n\n const rows = buildGrid(viewYear, viewMonth);\n const visibleRows = rows[5].every(d => d.kind === 'next') ? rows.slice(0, 5) : rows;\n\n return (\n <div className={styles.calendar} onKeyDown={handleKeyDown}>\n {/* Header: prev | Mês Ano | next */}\n <div className={styles.header}>\n <button type=\"button\" className={styles.navBtn} onClick={prevMonth} aria-label=\"Mês anterior\">\n <Icon as={CaretLeft} size={16} />\n </button>\n <span className={styles.monthYear}>\n {MONTHS_PT[viewMonth]} {viewYear}\n </span>\n <button type=\"button\" className={styles.navBtn} onClick={nextMonth} aria-label=\"Próximo mês\">\n <Icon as={CaretRight} size={16} />\n </button>\n </div>\n\n {/* Day labels: Dom … Sáb */}\n <div className={styles.dayLabelsRow}>\n {DAYS_PT.map(label => (\n <span key={label} className={styles.dayLabel}>{label}</span>\n ))}\n </div>\n\n {/* Date grid */}\n <div className={styles.grid}>\n {visibleRows.map((row, ri) => (\n <div key={ri} className={styles.week}>\n {row.map(cell => {\n const isSelected = !!value && value === cell.iso;\n const isToday = today === cell.iso;\n const isDisabled = (!!min && cell.iso < min) || (!!max && cell.iso > max);\n return (\n <CalendarDate\n key={cell.iso}\n day={cell.day}\n outside={cell.kind !== 'current'}\n selected={isSelected}\n today={isToday}\n disabled={isDisabled}\n onClick={() => { onChange(cell.iso); onClose(); }}\n />\n );\n })}\n </div>\n ))}\n </div>\n </div>\n );\n}\n"],"names":["MONTHS_PT","DAYS_PT","currentIso","d","toIso","year","month","day","buildGrid","firstDayOfWeek","daysInMonth","daysInPrevMonth","py","pm","ny","nm","cells","i","_","CalendarDate","outside","selected","today","disabled","onClick","cls","styles","jsx","DatePickerCalendar","value","min","max","onChange","onClose","initYear","initMonth","viewYear","setViewYear","useState","viewMonth","setViewMonth","prevMonth","y","m","nextMonth","handleKeyDown","e","rows","visibleRows","jsxs","Icon","CaretLeft","CaretRight","label","row","ri","cell","isSelected","isToday","isDisabled"],"mappings":";;;;;AAKA,MAAMA,IAAY;AAAA,EAChB;AAAA,EAAW;AAAA,EAAa;AAAA,EAAS;AAAA,EAAS;AAAA,EAAQ;AAAA,EAClD;AAAA,EAAS;AAAA,EAAU;AAAA,EAAY;AAAA,EAAW;AAAA,EAAY;AACxD,GAEMC,IAAU,CAAC,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK;AAEhE,SAASC,IAAqB;AAC5B,QAAMC,wBAAQ,KAAA;AACd,SAAO,GAAGA,EAAE,YAAA,CAAa,IAAI,OAAOA,EAAE,SAAA,IAAa,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC,IAAI,OAAOA,EAAE,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC;AAChH;AAEA,SAASC,EAAMC,GAAcC,GAAeC,GAAqB;AAC/D,SAAO,GAAG,OAAOF,CAAI,EAAE,SAAS,GAAG,GAAG,CAAC,IAAI,OAAOC,IAAQ,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC,IAAI,OAAOC,CAAG,EAAE,SAAS,GAAG,GAAG,CAAC;AAC/G;AAQA,SAASC,EAAUH,GAAcC,GAAgC;AAC/D,QAAMG,IAAiB,IAAI,KAAKJ,GAAMC,GAAO,CAAC,EAAE,OAAA,GAC1CI,IAAc,IAAI,KAAKL,GAAMC,IAAQ,GAAG,CAAC,EAA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D,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
@@ -0,0 +1 @@
1
+ ._calendar_1tmzb_2{background:var(--color-canvas-neutral-white);border:1px solid var(--color-stroke-neutral-default);border-radius:8px;padding:16px;width:284px;box-sizing:border-box;display:flex;flex-direction:column;gap:16px;box-shadow:var(--shadow-layer-md)}._header_1tmzb_16{display:flex;align-items:center;justify-content:space-between;width:252px}._navBtn_1tmzb_23{display:flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:9999px;border:1px solid var(--color-stroke-neutral-default);background:var(--color-canvas-neutral-white);color:var(--color-icon-neutral-default);cursor:pointer;padding:0;transition:background-color .12s ease}._navBtn_1tmzb_23:hover{background:var(--color-fill-neutral-subtle)}._monthYear_1tmzb_43{font-family:inherit;font-size:var(--font-size-16);font-weight:var(--font-weight-semibold);line-height:var(--font-line-height-16);color:var(--color-text-neutral-default);white-space:nowrap}._dayLabelsRow_1tmzb_53{display:flex;align-items:center}._dayLabel_1tmzb_53{display:flex;align-items:center;justify-content:center;width:36px;height:21px;flex-shrink:0;font-family:inherit;font-size:var(--font-size-12);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-12);color:var(--color-text-neutral-subtlest)}._grid_1tmzb_73{display:flex;flex-direction:column}._week_1tmzb_78{display:flex;align-items:center;padding-top:4px}._date_1tmzb_85{display:flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;min-height:36px;flex-shrink:0;border-radius:9999px;border:none;background:transparent;font-family:inherit;font-size:var(--font-size-14);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-14);color:var(--color-text-neutral-default);cursor:pointer;padding:0;transition:background-color .12s ease,color .12s ease}._date_1tmzb_85:hover:not(:disabled):not(._dateSelected_1tmzb_107){background:var(--color-fill-neutral-subtle)}._dateOutside_1tmzb_111{color:var(--color-text-neutral-subtlest)}._dateSelected_1tmzb_107{background:var(--color-fill-brand-default);color:var(--color-text-neutral-inverse)}._dateSelected_1tmzb_107:hover{background:var(--color-fill-interaction-brand-hover)}._dateToday_1tmzb_124{position:relative}._dateToday_1tmzb_124:after{content:"";position:absolute;bottom:5px;left:50%;transform:translate(-50%);width:4px;height:4px;border-radius:50%;background:var(--color-fill-brand-default)}._dateDisabled_1tmzb_140{opacity:.4;cursor:not-allowed}
@@ -0,0 +1,32 @@
1
+ import './DatePickerCalendar.module.css';const e = "_calendar_1tmzb_2", t = "_header_1tmzb_16", a = "_navBtn_1tmzb_23", d = "_monthYear_1tmzb_43", _ = "_dayLabelsRow_1tmzb_53", n = "_dayLabel_1tmzb_53", s = "_grid_1tmzb_73", o = "_week_1tmzb_78", b = "_date_1tmzb_85", c = "_dateSelected_1tmzb_107", l = "_dateOutside_1tmzb_111", m = "_dateToday_1tmzb_124", r = "_dateDisabled_1tmzb_140", z = {
2
+ calendar: e,
3
+ header: t,
4
+ navBtn: a,
5
+ monthYear: d,
6
+ dayLabelsRow: _,
7
+ dayLabel: n,
8
+ grid: s,
9
+ week: o,
10
+ date: b,
11
+ dateSelected: c,
12
+ dateOutside: l,
13
+ dateToday: m,
14
+ dateDisabled: r
15
+ };
16
+ export {
17
+ e as calendar,
18
+ b as date,
19
+ r as dateDisabled,
20
+ l as dateOutside,
21
+ c as dateSelected,
22
+ m as dateToday,
23
+ n as dayLabel,
24
+ _ as dayLabelsRow,
25
+ z as default,
26
+ s as grid,
27
+ t as header,
28
+ d as monthYear,
29
+ a as navBtn,
30
+ o as week
31
+ };
32
+ //# sourceMappingURL=DatePickerCalendar.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePickerCalendar.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
@@ -0,0 +1,22 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import r from "./Divider.module.css.js";
3
+ function s({ type: o = "horizontal", className: i, ...t }) {
4
+ const a = [
5
+ r.divider,
6
+ o === "vertical" ? r.vertical : r.horizontal,
7
+ i
8
+ ].filter(Boolean).join(" ");
9
+ return /* @__PURE__ */ e(
10
+ "hr",
11
+ {
12
+ role: "separator",
13
+ "aria-orientation": o,
14
+ className: a,
15
+ ...t
16
+ }
17
+ );
18
+ }
19
+ export {
20
+ s as Divider
21
+ };
22
+ //# sourceMappingURL=Divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Divider.js","sources":["../../src/Divider/Divider.tsx"],"sourcesContent":["import React from 'react';\nimport styles from './Divider.module.css';\n\nexport type DividerType = 'horizontal' | 'vertical';\n\nexport interface DividerProps extends React.HTMLAttributes<HTMLHRElement> {\n /** Controls the orientation of the divider line. Defaults to \"horizontal\". */\n type?: DividerType;\n}\n\nexport function Divider({ type = 'horizontal', className, ...props }: DividerProps) {\n const cls = [\n styles.divider,\n type === 'vertical' ? styles.vertical : styles.horizontal,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <hr\n role=\"separator\"\n aria-orientation={type}\n className={cls}\n {...props}\n />\n );\n}\n"],"names":["Divider","type","className","props","cls","styles","jsx"],"mappings":";;AAUO,SAASA,EAAQ,EAAE,MAAAC,IAAO,cAAc,WAAAC,GAAW,GAAGC,KAAuB;AAClF,QAAMC,IAAM;AAAA,IACVC,EAAO;AAAA,IACPJ,MAAS,aAAaI,EAAO,WAAWA,EAAO;AAAA,IAC/CH;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,oBAAkBL;AAAA,MAClB,WAAWG;AAAA,MACV,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGV;"}
@@ -0,0 +1 @@
1
+ ._divider_14u26_2{display:block;flex-shrink:0;border:none;background-color:var(--color-stroke-neutral-default)}._horizontal_14u26_11{width:100%;height:1px;align-self:stretch}._vertical_14u26_19{width:1px;height:100%;align-self:stretch}
@@ -0,0 +1,12 @@
1
+ import './Divider.module.css';const t = "_divider_14u26_2", i = "_horizontal_14u26_11", o = "_vertical_14u26_19", r = {
2
+ divider: t,
3
+ horizontal: i,
4
+ vertical: o
5
+ };
6
+ export {
7
+ r as default,
8
+ t as divider,
9
+ i as horizontal,
10
+ o as vertical
11
+ };
12
+ //# sourceMappingURL=Divider.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Divider.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}