@recursica/mantine-adapter 0.6.0 → 0.7.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 (140) hide show
  1. package/.storybook/commonArgTypes.ts +148 -0
  2. package/CHANGELOG.md +69 -0
  3. package/dist/mantine-adapter.cjs +1 -1
  4. package/dist/mantine-adapter.cjs.map +1 -1
  5. package/dist/mantine-adapter.css +1 -1
  6. package/dist/mantine-adapter.js +660 -586
  7. package/dist/mantine-adapter.js.map +1 -1
  8. package/dist/src/components/Checkbox/CheckboxGroup.d.ts +1 -1
  9. package/dist/src/components/Chip/Chip.d.ts +14 -2
  10. package/package.json +5 -2
  11. package/src/OverStyling.stories.tsx +174 -0
  12. package/src/Version.stories.tsx +56 -0
  13. package/src/components/Accordion/ACCORDION_IMPLEMENTATION_NOTES.md +48 -0
  14. package/src/components/Accordion/Accordion.module.css +261 -0
  15. package/src/components/Accordion/Accordion.stories.tsx +145 -0
  16. package/src/components/Accordion/Accordion.tsx +200 -0
  17. package/src/components/Accordion/index.ts +1 -0
  18. package/src/components/AssistiveElement/AssistiveElement.module.css +111 -0
  19. package/src/components/AssistiveElement/AssistiveElement.stories.tsx +73 -0
  20. package/src/components/AssistiveElement/AssistiveElement.tsx +91 -0
  21. package/src/components/Avatar/AVATAR_IMPLEMENTATION_NOTES.md +24 -0
  22. package/src/components/Avatar/Avatar.module.css +340 -0
  23. package/src/components/Avatar/Avatar.stories.tsx +102 -0
  24. package/src/components/Avatar/Avatar.tsx +100 -0
  25. package/src/components/Avatar/index.ts +1 -0
  26. package/src/components/Badge/BADGE_IMPLEMENTATION_NOTES.md +18 -0
  27. package/src/components/Badge/Badge.module.css +124 -0
  28. package/src/components/Badge/Badge.stories.tsx +77 -0
  29. package/src/components/Badge/Badge.tsx +66 -0
  30. package/src/components/Breadcrumb/BREADCRUMB_IMPLEMENTATION_NOTES.md +14 -0
  31. package/src/components/Breadcrumb/Breadcrumb.module.css +26 -0
  32. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +77 -0
  33. package/src/components/Breadcrumb/Breadcrumb.tsx +64 -0
  34. package/src/components/Button/Button.module.css +275 -0
  35. package/src/components/Button/Button.stories.tsx +105 -0
  36. package/src/components/Button/Button.tsx +122 -0
  37. package/src/components/Button/IMPLEMENTATION_NOTES.md +45 -0
  38. package/src/components/Button/index.ts +1 -0
  39. package/src/components/Card/CARD_IMPLEMENTATION_NOTES.md +10 -0
  40. package/src/components/Card/Card.module.css +60 -0
  41. package/src/components/Card/Card.stories.tsx +141 -0
  42. package/src/components/Card/Card.tsx +176 -0
  43. package/src/components/Checkbox/CHECKBOX_IMPLEMENTATION_NOTES.md +25 -0
  44. package/src/components/Checkbox/Checkbox.module.css +204 -0
  45. package/src/components/Checkbox/Checkbox.stories.tsx +73 -0
  46. package/src/components/Checkbox/Checkbox.tsx +111 -0
  47. package/src/components/Checkbox/CheckboxGroup.stories.tsx +138 -0
  48. package/src/components/Checkbox/CheckboxGroup.tsx +140 -0
  49. package/src/components/Chip/CHIP_IMPLEMENTATION_NOTES.md +35 -0
  50. package/src/components/Chip/Chip.module.css +218 -0
  51. package/src/components/Chip/Chip.stories.tsx +115 -0
  52. package/src/components/Chip/Chip.tsx +143 -0
  53. package/src/components/DatePicker/DatePicker.stories.tsx +22 -0
  54. package/src/components/DatePicker/DatePicker.tsx +7 -0
  55. package/src/components/Dropdown/Dropdown.stories.tsx +22 -0
  56. package/src/components/Dropdown/Dropdown.tsx +7 -0
  57. package/src/components/FileInput/FileInput.stories.tsx +22 -0
  58. package/src/components/FileInput/FileInput.tsx +7 -0
  59. package/src/components/FileUpload/FileUpload.stories.tsx +22 -0
  60. package/src/components/FileUpload/FileUpload.tsx +7 -0
  61. package/src/components/FormControlWrapper/FORMCONTROLWRAPPER_IMPLEMENTATION_NOTES.md +32 -0
  62. package/src/components/FormControlWrapper/FormControlWrapper.module.css +46 -0
  63. package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +116 -0
  64. package/src/components/FormControlWrapper/FormControlWrapper.tsx +170 -0
  65. package/src/components/HoverCard/HoverCard.stories.tsx +17 -0
  66. package/src/components/HoverCard/HoverCard.tsx +7 -0
  67. package/src/components/Label/LABEL_IMPLEMENTATION_NOTES.md +48 -0
  68. package/src/components/Label/Label.module.css +177 -0
  69. package/src/components/Label/Label.stories.tsx +123 -0
  70. package/src/components/Label/Label.tsx +132 -0
  71. package/src/components/Label/index.ts +1 -0
  72. package/src/components/Link/Link.stories.tsx +17 -0
  73. package/src/components/Link/Link.tsx +7 -0
  74. package/src/components/Loader/Loader.stories.tsx +17 -0
  75. package/src/components/Loader/Loader.tsx +7 -0
  76. package/src/components/Menu/Menu.stories.tsx +17 -0
  77. package/src/components/Menu/Menu.tsx +7 -0
  78. package/src/components/Modal/Modal.stories.tsx +17 -0
  79. package/src/components/Modal/Modal.tsx +7 -0
  80. package/src/components/NumberInput/NumberInput.stories.tsx +22 -0
  81. package/src/components/NumberInput/NumberInput.tsx +7 -0
  82. package/src/components/Pagination/Pagination.stories.tsx +17 -0
  83. package/src/components/Pagination/Pagination.tsx +7 -0
  84. package/src/components/Panel/Panel.stories.tsx +17 -0
  85. package/src/components/Panel/Panel.tsx +7 -0
  86. package/src/components/Popover/Popover.stories.tsx +17 -0
  87. package/src/components/Popover/Popover.tsx +7 -0
  88. package/src/components/Radio/Radio.stories.tsx +22 -0
  89. package/src/components/Radio/Radio.tsx +7 -0
  90. package/src/components/ReadOnlyField/READ_ONLY_FIELD_IMPLEMENTATION_NOTES.md +15 -0
  91. package/src/components/ReadOnlyField/ReadOnlyField.module.css +49 -0
  92. package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +120 -0
  93. package/src/components/ReadOnlyField/ReadOnlyField.tsx +75 -0
  94. package/src/components/ReadOnlyField/ReadOnlyTextField.tsx +46 -0
  95. package/src/components/ReadOnlyField/WithReadOnlyWrapper.tsx +85 -0
  96. package/src/components/ReadOnlyField/index.ts +3 -0
  97. package/src/components/Search/Search.stories.tsx +17 -0
  98. package/src/components/Search/Search.tsx +7 -0
  99. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +22 -0
  100. package/src/components/SegmentedControl/SegmentedControl.tsx +7 -0
  101. package/src/components/Slider/Slider.stories.tsx +22 -0
  102. package/src/components/Slider/Slider.tsx +7 -0
  103. package/src/components/Stepper/Stepper.stories.tsx +17 -0
  104. package/src/components/Stepper/Stepper.tsx +7 -0
  105. package/src/components/Switch/Switch.stories.tsx +22 -0
  106. package/src/components/Switch/Switch.tsx +7 -0
  107. package/src/components/Table/Table.stories.tsx +17 -0
  108. package/src/components/Table/Table.tsx +7 -0
  109. package/src/components/Tabs/Tabs.stories.tsx +17 -0
  110. package/src/components/Tabs/Tabs.tsx +7 -0
  111. package/src/components/Text/Text.stories.tsx +88 -0
  112. package/src/components/Text/Text.tsx +54 -0
  113. package/src/components/TextArea/TextArea.stories.tsx +22 -0
  114. package/src/components/TextArea/TextArea.tsx +7 -0
  115. package/src/components/TextField/TEXTFIELD_IMPLEMENTATION_NOTES.md +19 -0
  116. package/src/components/TextField/TextField.module.css +225 -0
  117. package/src/components/TextField/TextField.stories.tsx +162 -0
  118. package/src/components/TextField/TextField.tsx +138 -0
  119. package/src/components/TimePicker/TimePicker.stories.tsx +22 -0
  120. package/src/components/TimePicker/TimePicker.tsx +7 -0
  121. package/src/components/Timeline/Timeline.stories.tsx +17 -0
  122. package/src/components/Timeline/Timeline.tsx +7 -0
  123. package/src/components/Title/Title.stories.tsx +63 -0
  124. package/src/components/Title/Title.tsx +45 -0
  125. package/src/components/Toast/Toast.stories.tsx +17 -0
  126. package/src/components/Toast/Toast.tsx +7 -0
  127. package/src/components/Tooltip/Tooltip.stories.tsx +17 -0
  128. package/src/components/Tooltip/Tooltip.tsx +7 -0
  129. package/src/components/TransferList/TransferList.stories.tsx +17 -0
  130. package/src/components/TransferList/TransferList.tsx +7 -0
  131. package/src/components/index.ts +39 -0
  132. package/src/env.d.ts +7 -0
  133. package/src/index.ts +3 -0
  134. package/src/types/index.ts +9 -0
  135. package/src/types/mantine.d.ts +7 -0
  136. package/src/types/scss-modules.d.ts +9 -0
  137. package/src/utils/ColorSchemeWrapper.tsx +27 -0
  138. package/src/utils/copyToClipboard.ts +36 -0
  139. package/src/utils/filterStylingProps.ts +139 -0
  140. package/src/utils/index.ts +1 -0
@@ -0,0 +1,148 @@
1
+ /**
2
+ * commonArgTypes.ts
3
+ *
4
+ * This file centralizes the standard Storybook Controls (ArgTypes) for all UI Kit
5
+ * components that natively wrap or extend the `FormControlWrapper`.
6
+ *
7
+ * PHILOSOPHY:
8
+ * Recursica ensures strict unified design boundaries across all form inputs (TextField,
9
+ * CheckboxGroup, Dropdown, etc.). Because they all share the exact same label structures,
10
+ * layout variants (stacked vs side-by-side), and assistive text bindings natively supplied
11
+ * by the `FormControlWrapper`, their Storybook experiences should be exactly identical.
12
+ *
13
+ * USAGE:
14
+ * Rather than recreating these controls inside every `Component.stories.tsx` file,
15
+ * developers must spread this object directly into the `argTypes` of their story default block:
16
+ *
17
+ * ```tsx
18
+ * import { formControlArgTypes } from "../../.storybook/commonArgTypes";
19
+ *
20
+ * export default {
21
+ * component: TextField,
22
+ * argTypes: {
23
+ * ...formControlArgTypes,
24
+ * // Component-specific argTypes below...
25
+ * }
26
+ * }
27
+ * ```
28
+ */
29
+ import type { ArgTypes } from "@storybook/react";
30
+
31
+ export const formControlArgTypes: Partial<ArgTypes> = {
32
+ formLayout: {
33
+ control: "inline-radio",
34
+ options: ["stacked", "side-by-side"],
35
+ description:
36
+ "Determines the structural flow layout of the Label relative to the Input.",
37
+ table: {
38
+ category: "Form Layout",
39
+ },
40
+ },
41
+ labelSize: {
42
+ control: "inline-radio",
43
+ options: ["default", "small"],
44
+ description:
45
+ "Adjusts the typographical boundaries bounding the Label section.",
46
+ table: {
47
+ category: "Form Layout",
48
+ },
49
+ },
50
+ labelAlignment: {
51
+ control: "inline-radio",
52
+ options: ["left", "right"],
53
+ description:
54
+ "Adjusts the explicit text alignment axis exclusively evaluating side-by-side structures.",
55
+ table: {
56
+ category: "Form Layout",
57
+ },
58
+ },
59
+ labelOptionalText: {
60
+ control: "text",
61
+ description:
62
+ "Optional secondary stylistic text injected alongside the primary Label node.",
63
+ table: {
64
+ category: "Form Layout",
65
+ },
66
+ },
67
+ labelWithEditIcon: {
68
+ control: "boolean",
69
+ description:
70
+ "Dynamically toggles interactivity hooks revealing the Edit context icon.",
71
+ table: {
72
+ category: "Form Layout",
73
+ },
74
+ },
75
+ description: {
76
+ table: {
77
+ disable: true,
78
+ },
79
+ },
80
+ assistiveText: {
81
+ control: "text",
82
+ description:
83
+ "Helper instructions safely dynamically anchored below the input box natively outperforming description.",
84
+ table: {
85
+ category: "Form Layout",
86
+ },
87
+ },
88
+ assistiveWithIcon: {
89
+ control: "boolean",
90
+ description:
91
+ "Toggles native Recursica Info-styling rendering universally alongside the assistive block.",
92
+ table: {
93
+ category: "Form Layout",
94
+ },
95
+ },
96
+ error: {
97
+ control: "text",
98
+ description:
99
+ "Dynamically maps error feedback validation strings rendering explicit error states.",
100
+ table: {
101
+ category: "Form State",
102
+ },
103
+ },
104
+ required: {
105
+ control: "boolean",
106
+ description:
107
+ "Native DOM compliance flag explicitly marking the field as required natively.",
108
+ table: {
109
+ category: "Form State",
110
+ },
111
+ },
112
+ disabled: {
113
+ control: "boolean",
114
+ description:
115
+ "Globally disables interactive components bounding all click and focus logic natively.",
116
+ table: {
117
+ category: "Form State",
118
+ },
119
+ },
120
+ withAsterisk: {
121
+ control: "boolean",
122
+ description:
123
+ "Visually forces the mandatory asterisk presence completely independent of logical 'required' attribute properties.",
124
+ table: {
125
+ category: "Form State",
126
+ },
127
+ },
128
+ labelActionArea: {
129
+ table: {
130
+ disable: true,
131
+ },
132
+ },
133
+ onLabelEditClick: {
134
+ table: {
135
+ disable: true,
136
+ },
137
+ },
138
+ controlMaxWidth: {
139
+ table: {
140
+ disable: true,
141
+ },
142
+ },
143
+ controlMinWidth: {
144
+ table: {
145
+ disable: true,
146
+ },
147
+ },
148
+ };
package/CHANGELOG.md ADDED
@@ -0,0 +1,69 @@
1
+ # @recursica/mantine-adapter
2
+
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - bce74c3: Updated mantine storybook config
8
+ - a4cf78b: Updates storybook controls and added chip
9
+
10
+ ## 0.6.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 9e31278: Added more mantine adapter components
15
+
16
+ ## 0.5.0
17
+
18
+ ### Minor Changes
19
+
20
+ - a1067c9: Implemented stories in construction and over styling
21
+
22
+ ## 0.4.0
23
+
24
+ ### Minor Changes
25
+
26
+ - eb5561b: Restructured and moved new adapter-common package
27
+ - 6df88b7: Updated storybook layout and consolidated storybook release
28
+ - eb5561b: Updated for latest CSS config and postcss processing
29
+
30
+ ## 0.3.0
31
+
32
+ ### Minor Changes
33
+
34
+ - ea86688: Updated for latest CSS config and postcss processing
35
+
36
+ ## 0.2.0
37
+
38
+ ### Minor Changes
39
+
40
+ - 5e0c31f: Fixed dependency so it will import correctly
41
+
42
+ ### Patch Changes
43
+
44
+ - 5e0c31f: Updated link to readme in package.json
45
+
46
+ ## 0.1.0
47
+
48
+ ### Minor Changes
49
+
50
+ - be88cfc: Updated README and structure and provided Storybook builds
51
+
52
+ ## 0.0.4
53
+
54
+ ### Patch Changes
55
+
56
+ - cec0db5: Renamed ui-kit to mantine-adapter to signal proper peer reference to Mantine
57
+ - cec0db5: Added peer dependency for mantine in the plugin
58
+
59
+ ## 0.0.3
60
+
61
+ ### Patch Changes
62
+
63
+ - 9aab210: update docs
64
+
65
+ ## 0.0.2
66
+
67
+ ### Patch Changes
68
+
69
+ - c6973c2: first publish
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("react"),N=require("@mantine/core"),Ae=["className","classNames","style","styles","vars","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","bd","bdw","bds","bdc","bdr","shadow","w","miw","maw","h","mih","mah"],Pe=new Set(["m","my","mx","mt","mb","ml","mr","gap","rowGap","columnGap","top","left","bottom","right"]),ue={"rec-none":"var(--recursica_brand_dimensions_general_none)","rec-sm":"var(--recursica_brand_dimensions_general_sm)","rec-default":"var(--recursica_brand_dimensions_general_default)","rec-md":"var(--recursica_brand_dimensions_general_md)","rec-lg":"var(--recursica_brand_dimensions_general_lg)","rec-xl":"var(--recursica_brand_dimensions_general_xl)","rec-2xl":"var(--recursica_brand_dimensions_general_2xl)"};function b(e,r){if(r)return e;const a={...e};for(const n of Ae)n in a&&delete a[n];for(const[n,t]of Object.entries(a))typeof t=="string"&&t.startsWith("rec-")&&Pe.has(n)&&t in ue&&(a[n]=ue[t]);return a}const Re="Accordion-module__root___Dem6d",we="Accordion-module__item___7ryVk",We="Accordion-module__noDivider___Ni2tT",ke="Accordion-module__control___b4wgX",Te="Accordion-module__label___Ss7uW",Le="Accordion-module__chevron___i-HVZ",Se="Accordion-module__iconLeftWrapper___5oLen",Fe="Accordion-module__panel___Wx50w",Ee="Accordion-module__content___PEM9t",E={root:Re,item:we,noDivider:We,control:ke,label:Te,chevron:Le,iconLeftWrapper:Se,panel:Fe,content:Ee},xe=function({variant:r="unstyled",overStyled:a=!1,...n}){const t=b(n,a),s={root:E.root,item:E.item,control:E.control,label:E.label,chevron:E.chevron,panel:E.panel,content:E.content},i=t.classNames;if(i&&typeof i=="object"&&!Array.isArray(i)){const l=i;Object.keys(l).forEach(c=>{s[c]?s[c]=`${s[c]} ${l[c]}`:s[c]=l[c]})}const d=t.className;return o.jsx(N.Accordion,{variant:r,className:d,classNames:s,...t})};xe.displayName="Accordion";const ee=u.forwardRef(function({title:r,leftIcon:a,divider:n=!0,children:t,overStyled:s=!1,...i},d){const l=b(i,s),c=l.className,m=[n?void 0:E.noDivider,c].filter(Boolean).join(" ")||void 0;return o.jsx(N.Accordion.Item,{ref:d,className:m,...l,children:r?o.jsxs(o.Fragment,{children:[o.jsx(Z,{leftIcon:a,children:r}),o.jsx(K,{children:t})]}):t})});ee.displayName="AccordionItem";const Z=u.forwardRef(function({leftIcon:r,children:a,overStyled:n=!1,...t},s){const i=b(t,n),d=i.className;return o.jsx(N.Accordion.Control,{ref:s,className:d,icon:r?o.jsx("span",{className:E.iconLeftWrapper,"aria-hidden":!0,children:r}):void 0,...i,children:a})});Z.displayName="AccordionControl";const K=u.forwardRef(function({overStyled:r=!1,...a},n){const t=b(a,r),s=t.className;return o.jsx(N.Accordion.Panel,{ref:n,className:s,...t})});K.displayName="AccordionPanel";const U=xe;U.Item=ee;U.Control=Z;U.Panel=K;const Be="Avatar-module__root___fXu-J",ze="Avatar-module__iconWrapper___ojly2",Ie="Avatar-module__textWrapper___zp-jD",Oe="Avatar-module__image___ieqGp",qe="Avatar-module__placeholder___IDW7-",w={root:Be,iconWrapper:ze,textWrapper:Ie,image:Oe,placeholder:qe},be=u.forwardRef(function({size:r="default",variant:a="solid",icon:n,className:t,classNames:s,children:i,style:d,src:l,...c},m){const _={solid:"filled",outline:"outline",ghost:"transparent"},h={default:"md",small:"sm",large:"lg"};let y="text";l?y="image":n&&(y="icon");const p={root:w.root,image:w.image,placeholder:w.placeholder};if(s&&typeof s=="object"&&!Array.isArray(s)){const x=s;p.root=x.root?`${w.root} ${x.root}`:w.root,p.image=x.image?`${w.image} ${x.image}`:w.image,p.placeholder=x.placeholder?`${w.placeholder} ${x.placeholder}`:w.placeholder}return o.jsx(N.Avatar,{ref:m,className:t,classNames:p,variant:_[a],size:h[r],style:d,src:l,"data-variant":a,"data-size":r,"data-style":y,...c,children:n!=null?o.jsx("span",{className:w.iconWrapper,"aria-hidden":!0,children:n}):i!=null?o.jsx("span",{className:w.textWrapper,children:i}):void 0})});be.displayName="Avatar";const Me="Badge-module__root___5osNT",S={root:Me},he=u.forwardRef(function({variant:r="primary-color",overStyled:a=!1,...n},t){const s=b(n,a),i={root:S.root,section:S.section,label:S.label},d=s.classNames;if(d&&typeof d=="object"&&!Array.isArray(d)){const m=d;i.root=m.root?`${S.root} ${m.root}`:S.root,i.section=m.section??S.section,i.label=m.label??S.label}const l=s.className,c=l?`${S.root} ${l}`:S.root;return o.jsx(N.Badge,{ref:t,variant:"filled","data-variant":r,...s,className:c,classNames:i})});he.displayName="Badge";const Ve="Breadcrumb-module__root___x-9ln",De="Breadcrumb-module__separator___qrUX-",z={root:Ve,separator:De},Ne=u.forwardRef(function({overStyled:r=!1,...a},n){const t=b(a,r),s={root:z.root,separator:z.separator},i=t.classNames;if(i&&typeof i=="object"&&!Array.isArray(i)){const c=i;s.root=c.root?`${z.root} ${c.root}`:z.root,s.separator=c.separator?`${z.separator} ${c.separator}`:z.separator}const d=t.className,l=d?`${z.root} ${d}`:z.root;return o.jsx(N.Breadcrumbs,{ref:n,...t,className:l,classNames:s})});Ne.displayName="Breadcrumb";const Ge="Button-module__root___Q2R8-",He="Button-module__label___UJ3Zt",Ze="Button-module__labelText___rFV5p",Ke="Button-module__iconWrapper___uEKPa",Ue="Button-module__section___f2mKr",W={root:Ge,label:He,labelText:Ze,iconWrapper:Ke,section:Ue};function Ye(e){return e==null||e===""?!1:typeof e=="string"?e.trim()!=="":!0}const ye=u.forwardRef(function({variant:r="solid",size:a="default",icon:n,children:t,overStyled:s=!1,...i},d){const l={solid:"filled",outline:"outline",text:"subtle"},c={default:"md",small:"sm"},m=b(i,s),_=m;delete _.fullWidth;const h=!!n||!!_.leftSection,y=!!_.rightSection,p=(h||y)&&!Ye(t);typeof process<"u"&&process.env.NODE_ENV!=="production"&&p&&!_["aria-label"]&&console.warn('[Recursica Button] Icon-only buttons must provide an accessible name. Pass aria-label (e.g. aria-label="Submit").');const x={root:W.root,section:W.section,label:W.label},j=_.classNames;if(j&&typeof j=="object"&&!Array.isArray(j)){const v=j;x.root=v.root?`${W.root} ${v.root}`:W.root,x.section=v.section??W.section,x.label=v.label??W.label}const $=_.className,C=$?`${W.root} ${$}`:W.root;return o.jsx(N.Button,{ref:d,className:C,classNames:x,variant:l[r],size:c[a],leftSection:n!=null?o.jsx("span",{className:W.iconWrapper,"aria-hidden":!0,children:n}):void 0,"data-variant":r,"data-size":a,...p?{"data-icon-only":""}:{},...m,children:o.jsx("span",{className:W.labelText,children:t})})});ye.displayName="Button";const Xe="Card-module__root___c9KvZ",Je="Card-module__header___PTXf2",Qe="Card-module__footer___Mu-JC",eo="Card-module__section___BRT8H",oo="Card-module__content___oFIQa",B={root:Xe,header:Je,footer:Qe,section:eo,content:oo},Ce=u.forwardRef(function({overStyled:r=!1,...a},n){const t=b(a,r),s={root:B.root},i=t.classNames;if(i&&typeof i=="object"&&!Array.isArray(i)){const l=i;Object.keys(l).forEach(c=>{s[c]?s[c]=`${s[c]} ${l[c]}`:s[c]=l[c]})}const d=t.className;return o.jsx(N.Card,{ref:n,className:d,classNames:s,...t})});Ce.displayName="Card";const oe=u.forwardRef(function({overStyled:r=!1,...a},n){const t=b(a,r),s=t.className;return o.jsx(N.Card.Section,{ref:n,className:s?`${B.section} ${s}`:B.section,...t})});oe.displayName="CardSection";const te=u.forwardRef(function({overStyled:r=!1,...a},n){const t=b(a,r),s=t.className;return o.jsx(N.Card.Section,{ref:n,className:s?`${B.header} ${s}`:B.header,...t})});te.displayName="CardHeader";const re=u.forwardRef(function({overStyled:r=!1,...a},n){const t=b(a,r),s=t.className;return o.jsx(N.Card.Section,{ref:n,className:s?`${B.footer} ${s}`:B.footer,...t})});re.displayName="CardFooter";const se=u.forwardRef(function({overStyled:r=!1,...a},n){const t=b(a,r),s=t.className;return o.jsx("div",{ref:n,className:s?`${B.content} ${s}`:B.content,...t})});se.displayName="CardContent";const G=Ce;G.Section=oe;G.Header=te;G.Footer=re;G.Content=se;const to="_root_1qhn7_3",ro="_contents_1qhn7_18",M={root:to,contents:ro},je=u.forwardRef(function({layer:e,contentsOnly:r,children:a,className:n,style:t,...s},i){const d=r?n?`${M.root} ${M.contents} ${n}`:`${M.root} ${M.contents}`:n?`${M.root} ${n}`:M.root;return o.jsx("div",{ref:i,className:d,style:t,...r?{}:{"data-recursica-layer":String(e)},...s,children:a})});je.displayName="Layer";function Y(e,r){const[a,n]=u.useState(!!e);u.useEffect(()=>{n(!!e)},[e]);const t=u.useCallback(s=>{n(!1),r==null||r(s)},[r]);return{isReadOnly:a,handleEditClick:t}}const D=({emptyText:e="N/A"})=>o.jsx(u.Fragment,{children:e});D.displayName="EmptyValueRenderer";D.check=e=>e==null||e===""||Array.isArray(e)&&e.length===0;const _e="data-recursica-theme";function so({children:e,theme:r="light"}){return u.useEffect(()=>{const a=document.documentElement;return a.setAttribute(_e,r),()=>{a.removeAttribute(_e)}},[r]),o.jsx(o.Fragment,{children:e})}const no="Label-module__root___e6HXZ",ao="Label-module__labelText___rieFR",co="Label-module__required___Ggrzc",io="Label-module__optionalText___Y2yun",lo="Label-module__actionAreaWrapper___ELoZK",po="Label-module__editIconWrapper___NG2xW",P={root:no,labelText:ao,required:co,optionalText:io,actionAreaWrapper:lo,editIconWrapper:po},ne=u.forwardRef(function({formLayout:r="stacked",labelSize:a="default",labelAlignment:n,required:t=!1,labelOptionalText:s,labelWithEditIcon:i,labelActionArea:d,onLabelEditClick:l,children:c,overStyled:m=!1,..._},h){const y=n||(r==="side-by-side"?"right":"left");let p;t||(s===!0?p="optional":s&&(p=s));const x=b(_,m),j=x,$={label:P.root,required:P.required},C=j.classNames;if(C&&typeof C=="object"&&!Array.isArray(C)){const R=C;$.label=R.label?`${P.root} ${R.label}`:P.root,$.required=R.required?`${P.required} ${R.required}`:P.required}const v=j.className,k=v?`${P.root} ${v}`:P.root;return o.jsxs(N.Input.Label,{ref:h,className:k,classNames:$,"data-layout":r,"data-size":a,"data-alignment":y,required:t&&!i,...x,children:[o.jsx("span",{className:P.labelText,children:c}),p&&o.jsx("span",{className:P.optionalText,children:typeof p=="string"?`(${p})`:p}),d?o.jsx("span",{className:P.actionAreaWrapper,children:d}):i?o.jsx("button",{type:"button",className:P.editIconWrapper,"data-replaces-asterisk":t?"true":void 0,onClick:l,"aria-label":"Edit",children:o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M11.5303 2.46967C11.8232 2.17678 12.2981 2.17678 12.591 2.46967L13.5303 3.40898C13.8232 3.70188 13.8232 4.17675 13.5303 4.46964L5.61288 12.3871C5.45268 12.5473 5.24434 12.6483 5.01809 12.6766L2.39534 13.0044C2.10091 13.0412 1.83856 12.7789 1.87538 12.4845L2.2032 9.86175C2.23147 9.63551 2.3325 9.42716 2.4927 9.26696L11.5303 2.46967Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})})}):null]})});ne.displayName="Label";const mo="AssistiveElement-module__root___WhQ43",uo="AssistiveElement-module__textWrapper___sfy5E",_o="AssistiveElement-module__iconWrapper___gObRF",X={root:mo,textWrapper:uo,iconWrapper:_o},fo=()=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"M12 16v-4"}),o.jsx("path",{d:"M12 8h.01"})]}),xo=()=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),o.jsx("path",{d:"M12 9v4"}),o.jsx("path",{d:"M12 17h.01"})]}),Q=u.forwardRef(function({assistiveVariant:r="help",assistiveWithIcon:a=!0,children:n,className:t,overStyled:s=!1,...i},d){const c=b(i,s),m=X.root,_=t?`${m} ${t}`:m,h=r==="error"?xo:fo;return o.jsxs("div",{ref:d,className:_,"data-variant":r,style:c.style,...c,children:[a&&o.jsx("span",{className:X.iconWrapper,children:o.jsx(h,{})}),o.jsx("span",{className:X.textWrapper,children:n})]})});Q.displayName="AssistiveElement";const bo="FormControlWrapper-module__root___c-UHo",ho="FormControlWrapper-module__labelSection___hxSY4",No="FormControlWrapper-module__inputSection___HenXk",J={root:bo,labelSection:ho,inputSection:No},O=u.forwardRef(function({formLayout:r,labelSize:a,labelAlignment:n,labelOptionalText:t,labelWithEditIcon:s,labelActionArea:i,onLabelEditClick:d,label:l,description:c,assistiveText:m,assistiveWithIcon:_=!0,controlMaxWidth:h,controlMinWidth:y,error:p,required:x,withAsterisk:j,id:$,children:C,className:v,overStyled:k=!1,...R},V){const q=u.useId(),T=$||`recursica-fc-${q}`,g=m||c,L=g?`${T}-assistive`:void 0,A=p?`${T}-error`:void 0,H=b(R,k),pe=v||H.className,me=J.root,ve=pe?`${me} ${pe}`:me,ge=u.isValidElement(C)?u.cloneElement(C,{...g&&!C.props["aria-describedby"]?{"aria-describedby":L}:{},...p&&!C.props["aria-errormessage"]?{"aria-errormessage":A}:{}}):C;return o.jsxs(N.Box,{ref:V,className:ve,"data-form-layout":r||"stacked","data-form-alignment":n||"left",style:{...H.style||{},...h?{"--form-control-max-width":h}:{},...y?{"--form-control-min-width":y}:{}},...H,children:[l&&o.jsx("div",{className:J.labelSection,children:o.jsx(ne,{id:T,formLayout:r,labelSize:a,labelAlignment:n,labelOptionalText:t,labelWithEditIcon:s,labelActionArea:i,onLabelEditClick:d,required:j??x,...H.labelElement==="div"?{as:"div"}:{},children:l})}),o.jsxs("div",{className:J.inputSection,children:[ge,p&&o.jsx(Q,{id:A,assistiveVariant:"error",assistiveWithIcon:_,children:p}),!p&&g&&o.jsx(Q,{id:L,assistiveVariant:"help",assistiveWithIcon:_,children:g})]})]})});O.displayName="FormControlWrapper";const yo="Checkbox-module__groupRoot___cBS0o",Co="Checkbox-module__root___mY3qk",jo="Checkbox-module__body___5yC7q",$o="Checkbox-module__inner___rTke4",vo="Checkbox-module__input___2kt-h",go="Checkbox-module__icon___-O7i6",Ao="Checkbox-module__labelWrapper___GpZkr",Po="Checkbox-module__label___cwRtI",f={groupRoot:yo,root:Co,body:jo,inner:$o,input:vo,icon:go,labelWrapper:Ao,label:Po},ae=u.forwardRef(function({overStyled:r=!1,formLayout:a="stacked",labelSize:n,labelAlignment:t,labelOptionalText:s,labelWithEditIcon:i,onLabelEditClick:d,label:l,description:c,assistiveText:m,assistiveWithIcon:_,error:h,required:y,withAsterisk:p,id:x,className:j,style:$,children:C,readOnly:v,readOnlyComponent:k,...R},V){const{isReadOnly:q,handleEditClick:T}=Y(v,d),g=b(R,r),L=g;return delete L.size,q&&k?o.jsx(O,{className:j,style:$,overStyled:r,labelElement:"div",formLayout:a,labelSize:n,labelAlignment:t,labelOptionalText:s,labelWithEditIcon:i,onLabelEditClick:T,label:l,description:c,assistiveText:m,assistiveWithIcon:_,error:h,required:y,withAsterisk:p,id:x,children:k}):o.jsx(O,{className:j,style:$,overStyled:r,labelElement:"div",formLayout:a,labelSize:n,labelAlignment:t,labelOptionalText:s,labelWithEditIcon:i,onLabelEditClick:T,label:l,description:c,assistiveText:m,assistiveWithIcon:_,error:h,required:y,withAsterisk:p,id:x,children:o.jsx(N.Checkbox.Group,{ref:V,...g,children:o.jsx("div",{className:f.groupRoot,"data-layout":a,children:u.Children.map(C,A=>u.isValidElement(A)?u.cloneElement(A,{disabled:q||A.props.disabled}):A)})})})});ae.displayName="CheckboxGroup";const ce=u.forwardRef(function({overStyled:r=!1,readOnly:a,readOnlyComponent:n,disabled:t,...s},i){const{isReadOnly:d}=Y(a),l=b(s,r),c=l;if(delete c.size,delete c.color,delete c.radius,delete c.variant,delete c.iconColor,d&&n)return o.jsx(O,{overStyled:r,...l,children:n});const m={root:f.root,body:f.body,inner:f.inner,input:f.input,icon:f.icon,labelWrapper:f.labelWrapper,label:f.label},_=c.classNames;if(_&&typeof _=="object"&&!Array.isArray(_)){const p=_;m.root=p.root?`${f.root} ${p.root}`:f.root,m.body=p.body?`${f.body} ${p.body}`:f.body,m.inner=p.inner?`${f.inner} ${p.inner}`:f.inner,m.input=p.input?`${f.input} ${p.input}`:f.input,m.icon=p.icon?`${f.icon} ${p.icon}`:f.icon,m.labelWrapper=p.labelWrapper?`${f.labelWrapper} ${p.labelWrapper}`:f.labelWrapper,m.label=p.label?`${f.label} ${p.label}`:f.label}const h=c.className,y=h?`${f.root} ${h}`:f.root;return o.jsx(N.Checkbox,{ref:i,className:y,classNames:m,disabled:d||t,...l})});ce.displayName="Checkbox";ce.Group=ae;const Ro=e=>o.jsx("div",{...e,children:"Chip"}),wo=e=>o.jsx("div",{...e,children:"DatePicker"}),Wo=e=>o.jsx("div",{...e,children:"Dropdown"}),ko=e=>o.jsx("div",{...e,children:"FileInput"}),To=e=>o.jsx("div",{...e,children:"FileUpload"}),Lo=e=>o.jsx("div",{...e,children:"HoverCard"}),So=e=>o.jsx("div",{...e,children:"Link"}),Fo=e=>o.jsx("div",{...e,children:"Loader"}),Eo=e=>o.jsx("div",{...e,children:"Menu"}),Bo=e=>o.jsx("div",{...e,children:"Modal"}),zo=e=>o.jsx("div",{...e,children:"NumberInput"}),Io=e=>o.jsx("div",{...e,children:"Pagination"}),Oo=e=>o.jsx("div",{...e,children:"Panel"}),qo=e=>o.jsx("div",{...e,children:"Popover"}),Mo=e=>o.jsx("div",{...e,children:"Radio"}),Vo="ReadOnlyField-module__textField___qKn25",fe={textField:Vo},ie=({value:e,overStyled:r=!1,...a})=>{const n=b(a,r),t=n.className;return o.jsx(N.Box,{component:"p",className:t?`${fe.textField} ${t}`:fe.textField,...n,children:e!=null?u.isValidElement(e)?e:String(e):""})};ie.displayName="ReadOnlyTextField";const le=u.forwardRef(function({value:r,type:a="text",emptyValueComponent:n,overStyled:t=!1,...s},i){let d=null;const l=b(s,t),c=n||D,_=(c.check?c.check(r):D.check(r))?o.jsx(c,{value:r}):r;switch(a){case"text":default:d=o.jsx(ie,{value:_,overStyled:t});break}return o.jsx(O,{ref:i,overStyled:t,...l,children:d})});le.displayName="ReadOnlyField";const de=u.forwardRef(function({readOnly:r,readOnlyComponent:a,readOnlyType:n="text",readOnlyValue:t,activeComponent:s,overStyled:i,onLabelEditClick:d,...l},c){const{isReadOnly:m,handleEditClick:_}=Y(r,d);return m?a?o.jsx(O,{ref:c,...l,onLabelEditClick:_,overStyled:i,children:a}):o.jsx(le,{ref:c,type:n,value:t,onLabelEditClick:_,overStyled:i,...l}):o.jsx(O,{ref:c,...l,onLabelEditClick:_,overStyled:i,children:s})});de.displayName="WithReadOnlyWrapper";const Do=e=>o.jsx("div",{...e,children:"Search"}),Go=e=>o.jsx("div",{...e,children:"SegmentedControl"}),Ho=e=>o.jsx("div",{...e,children:"Slider"}),Zo=e=>o.jsx("div",{...e,children:"Stepper"}),Ko=e=>o.jsx("div",{...e,children:"Switch"}),Uo=e=>o.jsx("div",{...e,children:"Table"}),Yo=e=>o.jsx("div",{...e,children:"Tabs"}),Xo=e=>o.jsx("div",{...e,children:"TextArea"}),Jo="TextField-module__root___2ZYkG",Qo="TextField-module__input___RL-My",et="TextField-module__section___bCIJ0",F={root:Jo,input:Qo,section:et},$e=u.forwardRef(function({overStyled:r=!1,formLayout:a="stacked",labelSize:n,labelAlignment:t,labelOptionalText:s,labelWithEditIcon:i,onLabelEditClick:d,label:l,assistiveText:c,assistiveWithIcon:m,error:_,required:h,withAsterisk:y,id:p,className:x,style:j,disabled:$,readOnly:C,readOnlyComponent:v,value:k,defaultValue:R,...V},q){const T=b(V,r),g=T;delete g.size,delete g.variant,delete g.radius;const L={wrapper:F.root,input:F.input,section:F.section},A=g.classNames;if(A&&typeof A=="object"&&!Array.isArray(A)){const I=A;L.wrapper=I.wrapper?`${F.root} ${I.wrapper}`:F.root,L.input=I.input?`${F.input} ${I.input}`:F.input,L.section=I.section?`${F.section} ${I.section}`:F.section}return o.jsx(de,{className:x,style:j,controlMaxWidth:"var(--recursica_ui-kit_components_text-field_properties_max-width)",controlMinWidth:"var(--recursica_ui-kit_components_text-field_properties_min-width)",overStyled:r,formLayout:a,labelSize:n,labelAlignment:t,labelOptionalText:s,labelWithEditIcon:i,onLabelEditClick:d,label:l,assistiveText:c,assistiveWithIcon:m,error:_,required:h,withAsterisk:y,id:p,readOnly:C,readOnlyComponent:v,readOnlyType:"text",readOnlyValue:k!==void 0?k:R,activeComponent:o.jsx(N.Input,{ref:q,classNames:L,disabled:$,value:k,defaultValue:R,wrapperProps:{"data-disabled":$?"true":void 0,"data-error":_?"true":void 0},...T})})});$e.displayName="TextField";const ot=e=>o.jsx("div",{...e,children:"TimePicker"}),tt=e=>o.jsx("div",{...e,children:"Timeline"}),rt=e=>o.jsx("div",{...e,children:"Toast"}),st=e=>o.jsx("div",{...e,children:"Tooltip"}),nt=e=>o.jsx("div",{...e,children:"TransferList"});exports.Accordion=U;exports.AccordionControl=Z;exports.AccordionItem=ee;exports.AccordionPanel=K;exports.Avatar=be;exports.Badge=he;exports.Breadcrumb=Ne;exports.Button=ye;exports.Card=G;exports.CardContent=se;exports.CardFooter=re;exports.CardHeader=te;exports.CardSection=oe;exports.Checkbox=ce;exports.CheckboxGroup=ae;exports.Chip=Ro;exports.DatePicker=wo;exports.Dropdown=Wo;exports.EmptyValueRenderer=D;exports.FileInput=ko;exports.FileUpload=To;exports.HoverCard=Lo;exports.Label=ne;exports.Layer=je;exports.Link=So;exports.Loader=Fo;exports.Menu=Eo;exports.Modal=Bo;exports.NumberInput=zo;exports.Pagination=Io;exports.Panel=Oo;exports.Popover=qo;exports.Radio=Mo;exports.ReadOnlyField=le;exports.ReadOnlyTextField=ie;exports.RecursicaThemeProvider=so;exports.Search=Do;exports.SegmentedControl=Go;exports.Slider=Ho;exports.Stepper=Zo;exports.Switch=Ko;exports.Table=Uo;exports.Tabs=Yo;exports.TextArea=Xo;exports.TextField=$e;exports.TimePicker=ot;exports.Timeline=tt;exports.Toast=rt;exports.Tooltip=st;exports.TransferList=nt;exports.WithReadOnlyWrapper=de;exports.useReadOnlyControl=Y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),j=require("@mantine/core"),Ae=["className","classNames","style","styles","vars","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","bd","bdw","bds","bdc","bdr","shadow","w","miw","maw","h","mih","mah"],We=new Set(["m","my","mx","mt","mb","ml","mr","gap","rowGap","columnGap","top","left","bottom","right"]),me={"rec-none":"var(--recursica_brand_dimensions_general_none)","rec-sm":"var(--recursica_brand_dimensions_general_sm)","rec-default":"var(--recursica_brand_dimensions_general_default)","rec-md":"var(--recursica_brand_dimensions_general_md)","rec-lg":"var(--recursica_brand_dimensions_general_lg)","rec-xl":"var(--recursica_brand_dimensions_general_xl)","rec-2xl":"var(--recursica_brand_dimensions_general_2xl)"};function y(o,s){if(s)return o;const a={...o};for(const n of Ae)n in a&&delete a[n];for(const[n,t]of Object.entries(a))typeof t=="string"&&t.startsWith("rec-")&&We.has(n)&&t in me&&(a[n]=me[t]);return a}const we="Accordion-module__root___Dem6d",Re="Accordion-module__item___7ryVk",ke="Accordion-module__noDivider___Ni2tT",Te="Accordion-module__control___b4wgX",Fe="Accordion-module__label___Ss7uW",Ie="Accordion-module__chevron___i-HVZ",Se="Accordion-module__iconLeftWrapper___5oLen",Le="Accordion-module__panel___Wx50w",Be="Accordion-module__content___PEM9t",L={root:we,item:Re,noDivider:ke,control:Te,label:Fe,chevron:Ie,iconLeftWrapper:Se,panel:Le,content:Be},xe=function({variant:s="unstyled",overStyled:a=!1,...n}){const t=y(n,a),r={root:L.root,item:L.item,control:L.control,label:L.label,chevron:L.chevron,panel:L.panel,content:L.content},i=t.classNames;if(i&&typeof i=="object"&&!Array.isArray(i)){const d=i;Object.keys(d).forEach(c=>{r[c]?r[c]=`${r[c]} ${d[c]}`:r[c]=d[c]})}const l=t.className;return e.jsx(j.Accordion,{variant:s,className:l,classNames:r,...t})};xe.displayName="Accordion";const ee=m.forwardRef(function({title:s,leftIcon:a,divider:n=!0,children:t,overStyled:r=!1,...i},l){const d=y(i,r),c=d.className,p=[n?void 0:L.noDivider,c].filter(Boolean).join(" ")||void 0;return e.jsx(j.Accordion.Item,{ref:l,className:p,...d,children:s?e.jsxs(e.Fragment,{children:[e.jsx(K,{leftIcon:a,children:s}),e.jsx(Z,{children:t})]}):t})});ee.displayName="AccordionItem";const K=m.forwardRef(function({leftIcon:s,children:a,overStyled:n=!1,...t},r){const i=y(t,n),l=i.className;return e.jsx(j.Accordion.Control,{ref:r,className:l,icon:s?e.jsx("span",{className:L.iconLeftWrapper,"aria-hidden":!0,children:s}):void 0,...i,children:a})});K.displayName="AccordionControl";const Z=m.forwardRef(function({overStyled:s=!1,...a},n){const t=y(a,s),r=t.className;return e.jsx(j.Accordion.Panel,{ref:n,className:r,...t})});Z.displayName="AccordionPanel";const U=xe;U.Item=ee;U.Control=K;U.Panel=Z;const ze="Avatar-module__root___fXu-J",Ee="Avatar-module__iconWrapper___ojly2",Oe="Avatar-module__textWrapper___zp-jD",Me="Avatar-module__image___ieqGp",qe="Avatar-module__placeholder___IDW7-",w={root:ze,iconWrapper:Ee,textWrapper:Oe,image:Me,placeholder:qe},he=m.forwardRef(function({size:s="default",variant:a="solid",icon:n,className:t,classNames:r,children:i,style:l,src:d,...c},p){const u={solid:"filled",outline:"outline",ghost:"transparent"},N={default:"md",small:"sm",large:"lg"};let _="text";d?_="image":n&&(_="icon");const x={root:w.root,image:w.image,placeholder:w.placeholder};if(r&&typeof r=="object"&&!Array.isArray(r)){const b=r;x.root=b.root?`${w.root} ${b.root}`:w.root,x.image=b.image?`${w.image} ${b.image}`:w.image,x.placeholder=b.placeholder?`${w.placeholder} ${b.placeholder}`:w.placeholder}return e.jsx(j.Avatar,{ref:p,className:t,classNames:x,variant:u[a],size:N[s],style:l,src:d,"data-variant":a,"data-size":s,"data-style":_,...c,children:n!=null?e.jsx("span",{className:w.iconWrapper,"aria-hidden":!0,children:n}):i!=null?e.jsx("span",{className:w.textWrapper,children:i}):void 0})});he.displayName="Avatar";const De="Badge-module__root___5osNT",I={root:De},be=m.forwardRef(function({variant:s="primary-color",overStyled:a=!1,...n},t){const r=y(n,a),i={root:I.root,section:I.section,label:I.label},l=r.classNames;if(l&&typeof l=="object"&&!Array.isArray(l)){const p=l;i.root=p.root?`${I.root} ${p.root}`:I.root,i.section=p.section??I.section,i.label=p.label??I.label}const d=r.className,c=d?`${I.root} ${d}`:I.root;return e.jsx(j.Badge,{ref:t,variant:"filled","data-variant":s,...r,className:c,classNames:i})});be.displayName="Badge";const Ve="Breadcrumb-module__root___x-9ln",Ge="Breadcrumb-module__separator___qrUX-",z={root:Ve,separator:Ge},Ne=m.forwardRef(function({overStyled:s=!1,separator:a=">",...n},t){const r=y({separator:a,...n},s),i={root:z.root,separator:z.separator},l=r.classNames;if(l&&typeof l=="object"&&!Array.isArray(l)){const p=l;i.root=p.root?`${z.root} ${p.root}`:z.root,i.separator=p.separator?`${z.separator} ${p.separator}`:z.separator}const d=r.className,c=d?`${z.root} ${d}`:z.root;return e.jsx(j.Breadcrumbs,{ref:t,...r,className:c,classNames:i})});Ne.displayName="Breadcrumb";const He="Button-module__root___Q2R8-",Ke="Button-module__label___UJ3Zt",Ze="Button-module__labelText___rFV5p",Ue="Button-module__iconWrapper___uEKPa",Ye="Button-module__section___f2mKr",R={root:He,label:Ke,labelText:Ze,iconWrapper:Ue,section:Ye};function Xe(o){return o==null||o===""?!1:typeof o=="string"?o.trim()!=="":!0}const ye=m.forwardRef(function({variant:s="solid",size:a="default",icon:n,children:t,overStyled:r=!1,...i},l){const d={solid:"filled",outline:"outline",text:"subtle"},c={default:"md",small:"sm"},p=y(i,r),u=p;delete u.fullWidth;const N=!!n||!!u.leftSection,_=!!u.rightSection,x=(N||_)&&!Xe(t);typeof process<"u"&&process.env.NODE_ENV!=="production"&&x&&!u["aria-label"]&&console.warn('[Recursica Button] Icon-only buttons must provide an accessible name. Pass aria-label (e.g. aria-label="Submit").');const b={root:R.root,section:R.section,label:R.label},C=u.classNames;if(C&&typeof C=="object"&&!Array.isArray(C)){const g=C;b.root=g.root?`${R.root} ${g.root}`:R.root,b.section=g.section??R.section,b.label=g.label??R.label}const f=u.className,v=f?`${R.root} ${f}`:R.root;return e.jsx(j.Button,{ref:l,className:v,classNames:b,variant:d[s],size:c[a],leftSection:n!=null?e.jsx("span",{className:R.iconWrapper,"aria-hidden":!0,children:n}):void 0,"data-variant":s,"data-size":a,...x?{"data-icon-only":""}:{},...p,children:e.jsx("span",{className:R.labelText,children:t})})});ye.displayName="Button";const Je="Card-module__root___c9KvZ",Qe="Card-module__header___PTXf2",eo="Card-module__footer___Mu-JC",oo="Card-module__section___BRT8H",to="Card-module__content___oFIQa",B={root:Je,header:Qe,footer:eo,section:oo,content:to},je=m.forwardRef(function({overStyled:s=!1,...a},n){const t=y(a,s),r={root:B.root},i=t.classNames;if(i&&typeof i=="object"&&!Array.isArray(i)){const d=i;Object.keys(d).forEach(c=>{r[c]?r[c]=`${r[c]} ${d[c]}`:r[c]=d[c]})}const l=t.className;return e.jsx(j.Card,{ref:n,className:l,classNames:r,...t})});je.displayName="Card";const oe=m.forwardRef(function({overStyled:s=!1,...a},n){const t=y(a,s),r=t.className;return e.jsx(j.Card.Section,{ref:n,className:r?`${B.section} ${r}`:B.section,...t})});oe.displayName="CardSection";const te=m.forwardRef(function({overStyled:s=!1,...a},n){const t=y(a,s),r=t.className;return e.jsx(j.Card.Section,{ref:n,className:r?`${B.header} ${r}`:B.header,...t})});te.displayName="CardHeader";const re=m.forwardRef(function({overStyled:s=!1,...a},n){const t=y(a,s),r=t.className;return e.jsx(j.Card.Section,{ref:n,className:r?`${B.footer} ${r}`:B.footer,...t})});re.displayName="CardFooter";const se=m.forwardRef(function({overStyled:s=!1,...a},n){const t=y(a,s),r=t.className;return e.jsx("div",{ref:n,className:r?`${B.content} ${r}`:B.content,...t})});se.displayName="CardContent";const H=je;H.Section=oe;H.Header=te;H.Footer=re;H.Content=se;const ro="Label-module__root___e6HXZ",so="Label-module__labelText___rieFR",no="Label-module__required___Ggrzc",ao="Label-module__optionalText___Y2yun",co="Label-module__actionAreaWrapper___ELoZK",io="Label-module__editIconWrapper___NG2xW",A={root:ro,labelText:so,required:no,optionalText:ao,actionAreaWrapper:co,editIconWrapper:io},ne=m.forwardRef(function({formLayout:s="stacked",labelSize:a="default",labelAlignment:n,required:t=!1,labelOptionalText:r,labelWithEditIcon:i,labelActionArea:l,onLabelEditClick:d,children:c,overStyled:p=!1,...u},N){const _=n||(s==="side-by-side"?"right":"left");let x;t||(r===!0?x="optional":r&&(x=r));const b=y(u,p),C=b,f={label:A.root,required:A.required},v=C.classNames;if(v&&typeof v=="object"&&!Array.isArray(v)){const W=v;f.label=W.label?`${A.root} ${W.label}`:A.root,f.required=W.required?`${A.required} ${W.required}`:A.required}const g=C.className,k=g?`${A.root} ${g}`:A.root;return e.jsxs(j.Input.Label,{ref:N,className:k,classNames:f,"data-layout":s,"data-size":a,"data-alignment":_,required:t&&!i,...b,children:[e.jsx("span",{className:A.labelText,children:c}),x&&e.jsx("span",{className:A.optionalText,children:typeof x=="string"?`(${x})`:x}),l?e.jsx("span",{className:A.actionAreaWrapper,children:l}):i?e.jsx("button",{type:"button",className:A.editIconWrapper,"data-replaces-asterisk":t?"true":void 0,onClick:d,"aria-label":"Edit",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M11.5303 2.46967C11.8232 2.17678 12.2981 2.17678 12.591 2.46967L13.5303 3.40898C13.8232 3.70188 13.8232 4.17675 13.5303 4.46964L5.61288 12.3871C5.45268 12.5473 5.24434 12.6483 5.01809 12.6766L2.39534 13.0044C2.10091 13.0412 1.83856 12.7789 1.87538 12.4845L2.2032 9.86175C2.23147 9.63551 2.3325 9.42716 2.4927 9.26696L11.5303 2.46967Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})})}):null]})});ne.displayName="Label";const lo="AssistiveElement-module__root___WhQ43",po="AssistiveElement-module__textWrapper___sfy5E",_o="AssistiveElement-module__iconWrapper___gObRF",X={root:lo,textWrapper:po,iconWrapper:_o},mo=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 16v-4"}),e.jsx("path",{d:"M12 8h.01"})]}),uo=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),e.jsx("path",{d:"M12 9v4"}),e.jsx("path",{d:"M12 17h.01"})]}),Q=m.forwardRef(function({assistiveVariant:s="help",assistiveWithIcon:a=!0,children:n,className:t,overStyled:r=!1,...i},l){const c=y(i,r),p=X.root,u=t?`${p} ${t}`:p,N=s==="error"?uo:mo;return e.jsxs("div",{ref:l,className:u,"data-variant":s,style:c.style,...c,children:[a&&e.jsx("span",{className:X.iconWrapper,children:e.jsx(N,{})}),e.jsx("span",{className:X.textWrapper,children:n})]})});Q.displayName="AssistiveElement";const fo="FormControlWrapper-module__root___c-UHo",xo="FormControlWrapper-module__labelSection___hxSY4",ho="FormControlWrapper-module__inputSection___HenXk",J={root:fo,labelSection:xo,inputSection:ho},O=m.forwardRef(function({formLayout:s,labelSize:a,labelAlignment:n,labelOptionalText:t,labelWithEditIcon:r,labelActionArea:i,onLabelEditClick:l,label:d,description:c,assistiveText:p,assistiveWithIcon:u=!0,controlMaxWidth:N,controlMinWidth:_,error:x,required:b,withAsterisk:C,id:f,children:v,className:g,overStyled:k=!1,labelElement:W,...V},M){const q=m.useId(),P=f||`recursica-fc-${q}`,T=p||c,E=T?`${P}-assistive`:void 0,F=x?`${P}-error`:void 0,Y=y(V,k),pe=g||Y.className,_e=J.root,ge=pe?`${_e} ${pe}`:_e,Pe=m.isValidElement(v)?m.cloneElement(v,{...T&&!v.props["aria-describedby"]?{"aria-describedby":E}:{},...x&&!v.props["aria-errormessage"]?{"aria-errormessage":F}:{}}):v;return e.jsxs(j.Box,{ref:M,className:ge,"data-form-layout":s||"stacked","data-form-alignment":n||"left",style:{...Y.style||{},...N?{"--form-control-max-width":N}:{},..._?{"--form-control-min-width":_}:{}},...Y,children:[d&&e.jsx("div",{className:J.labelSection,children:e.jsx(ne,{id:P,formLayout:s,labelSize:a,labelAlignment:n,labelOptionalText:t,labelWithEditIcon:r,labelActionArea:i,onLabelEditClick:l,required:C??b,...W==="div"?{as:"div"}:{},children:d})}),e.jsxs("div",{className:J.inputSection,children:[Pe,x&&e.jsx(Q,{id:F,assistiveVariant:"error",assistiveWithIcon:u,children:x}),!x&&T&&e.jsx(Q,{id:E,assistiveVariant:"help",assistiveWithIcon:u,children:T})]})]})});O.displayName="FormControlWrapper";const bo="Checkbox-module__groupRoot___cBS0o",No="Checkbox-module__root___mY3qk",yo="Checkbox-module__body___5yC7q",jo="Checkbox-module__inner___rTke4",Co="Checkbox-module__input___2kt-h",vo="Checkbox-module__icon___-O7i6",$o="Checkbox-module__labelWrapper___GpZkr",go="Checkbox-module__label___cwRtI",h={groupRoot:bo,root:No,body:yo,inner:jo,input:Co,icon:vo,labelWrapper:$o,label:go},ae=m.forwardRef(function({overStyled:s=!1,formLayout:a="stacked",labelSize:n,labelAlignment:t,labelOptionalText:r,labelWithEditIcon:i,onLabelEditClick:l,label:d,description:c,assistiveText:p,assistiveWithIcon:u,error:N,required:_,withAsterisk:x,id:b,className:C,style:f,children:v,readOnly:g,readOnlyComponent:k,...W},V){const M=y(W,s),q=M;return delete q.size,g&&k?e.jsx(O,{className:C,style:f,controlMaxWidth:"var(--recursica_ui-kit_components_checkbox-item_properties_max-width)",controlMinWidth:void 0,overStyled:s,labelElement:"div",formLayout:a,labelSize:n,labelAlignment:t,labelOptionalText:r,labelWithEditIcon:i,onLabelEditClick:l,label:d,description:c,assistiveText:p,assistiveWithIcon:u,error:N,required:_,withAsterisk:x,id:b,children:k}):e.jsx(O,{className:C,style:f,controlMaxWidth:"var(--recursica_ui-kit_components_checkbox-item_properties_max-width)",controlMinWidth:void 0,overStyled:s,labelElement:"div",formLayout:a,labelSize:n,labelAlignment:t,labelOptionalText:r,labelWithEditIcon:i,onLabelEditClick:l,label:d,description:c,assistiveText:p,assistiveWithIcon:u,error:N,required:_,withAsterisk:x,id:b,children:e.jsx(j.Checkbox.Group,{ref:V,...M,children:e.jsx("div",{className:h.groupRoot,"data-layout":a,children:m.Children.map(v,P=>m.isValidElement(P)?m.cloneElement(P,{disabled:g||P.props.disabled}):P)})})})});ae.displayName="CheckboxGroup";const ce=m.forwardRef(function({overStyled:s=!1,readOnly:a,readOnlyComponent:n,disabled:t,...r},i){const l=y(r,s),d=l;if(delete d.size,delete d.color,delete d.radius,delete d.variant,delete d.iconColor,a&&n)return e.jsx(O,{overStyled:s,...l,children:n});const c={root:h.root,body:h.body,inner:h.inner,input:h.input,icon:h.icon,labelWrapper:h.labelWrapper,label:h.label},p=d.classNames;if(p&&typeof p=="object"&&!Array.isArray(p)){const _=p;c.root=_.root?`${h.root} ${_.root}`:h.root,c.body=_.body?`${h.body} ${_.body}`:h.body,c.inner=_.inner?`${h.inner} ${_.inner}`:h.inner,c.input=_.input?`${h.input} ${_.input}`:h.input,c.icon=_.icon?`${h.icon} ${_.icon}`:h.icon,c.labelWrapper=_.labelWrapper?`${h.labelWrapper} ${_.labelWrapper}`:h.labelWrapper,c.label=_.label?`${h.label} ${_.label}`:h.label}const u=d.className,N=u?`${h.root} ${u}`:h.root;return e.jsx(j.Checkbox,{ref:i,className:N,classNames:c,disabled:a||t,...l})});ce.displayName="Checkbox";ce.Group=ae;const Po="Chip-module__root___f5pFk",Ao="Chip-module__label___Ov9pg",Wo="Chip-module__mantineIconWrapper___KLSz6",wo="Chip-module__innerWrapper___EnrTF",Ro="Chip-module__children___zbRAR",ko="Chip-module__leadingIcon___JBtjQ",To="Chip-module__removeIcon___pVju-",$={root:Po,label:Ao,mantineIconWrapper:Wo,innerWrapper:wo,children:Ro,leadingIcon:ko,removeIcon:To};function Fo(o){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...o,children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const Ce=m.forwardRef(function({error:s=!1,icon:a,onRemove:n,removeLabel:t="Remove",children:r,overStyled:i=!1,...l},d){const c=y(l,i),p=c,u={root:$.root,label:$.label,input:$.input,iconWrapper:$.mantineIconWrapper,checkIcon:$.checkIcon},N=p.classNames;if(N&&typeof N=="object"&&!Array.isArray(N)){const f=N;u.root=f.root?`${$.root} ${f.root}`:$.root,u.label=f.label?`${$.label} ${f.label}`:$.label}const _=p.className,x=_?`${$.root} ${_}`:$.root,b=s?"":void 0,C=!r&&(!!a||!!n);return e.jsx(j.Chip,{ref:d,className:x,classNames:u,...b!==void 0?{"data-error":""}:{},...C?{"data-icon-only":""}:{},...c,children:e.jsxs("span",{className:$.innerWrapper,children:[a&&e.jsx("span",{className:$.leadingIcon,"aria-hidden":!0,children:a}),e.jsx("span",{className:$.children,children:r}),n&&e.jsx("span",{role:"button",className:$.removeIcon,onClick:f=>{f.preventDefault(),f.stopPropagation(),n(f)},"aria-label":t,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),f.stopPropagation(),n(f))},tabIndex:0,children:e.jsx(Fo,{})})]})})});Ce.displayName="Chip";const Io=o=>e.jsx("div",{...o,children:"DatePicker"}),So=o=>e.jsx("div",{...o,children:"Dropdown"}),Lo=o=>e.jsx("div",{...o,children:"FileInput"}),Bo=o=>e.jsx("div",{...o,children:"FileUpload"}),zo=o=>e.jsx("div",{...o,children:"HoverCard"}),Eo=o=>e.jsx("div",{...o,children:"Link"}),Oo=o=>e.jsx("div",{...o,children:"Loader"}),Mo=o=>e.jsx("div",{...o,children:"Menu"}),qo=o=>e.jsx("div",{...o,children:"Modal"}),Do=o=>e.jsx("div",{...o,children:"NumberInput"}),Vo=o=>e.jsx("div",{...o,children:"Pagination"}),Go=o=>e.jsx("div",{...o,children:"Panel"}),Ho=o=>e.jsx("div",{...o,children:"Popover"}),Ko=o=>e.jsx("div",{...o,children:"Radio"}),Zo="_root_1qhn7_3",Uo="_contents_1qhn7_18",D={root:Zo,contents:Uo},ve=m.forwardRef(function({layer:o,contentsOnly:s,children:a,className:n,style:t,...r},i){const l=s?n?`${D.root} ${D.contents} ${n}`:`${D.root} ${D.contents}`:n?`${D.root} ${n}`:D.root;return e.jsx("div",{ref:i,className:l,style:t,...s?{}:{"data-recursica-layer":String(o)},...r,children:a})});ve.displayName="Layer";const G=({emptyText:o="N/A"})=>e.jsx(m.Fragment,{children:o});G.displayName="EmptyValueRenderer";G.check=o=>o==null||o===""||Array.isArray(o)&&o.length===0;const ue="data-recursica-theme";function Yo({children:o,theme:s="light"}){return m.useEffect(()=>{const a=document.documentElement;return a.setAttribute(ue,s),()=>{a.removeAttribute(ue)}},[s]),e.jsx(e.Fragment,{children:o})}const Xo="ReadOnlyField-module__textField___qKn25",fe={textField:Xo},ie=({value:o,overStyled:s=!1,...a})=>{const n=y(a,s),t=n.className;return e.jsx(j.Box,{component:"p",className:t?`${fe.textField} ${t}`:fe.textField,...n,children:o!=null?m.isValidElement(o)?o:String(o):""})};ie.displayName="ReadOnlyTextField";const le=m.forwardRef(function({value:s,type:a="text",emptyValueComponent:n,overStyled:t=!1,...r},i){let l=null;const d=y(r,t),c=n||G,u=(c.check?c.check(s):G.check(s))?e.jsx(c,{value:s}):s;switch(a){case"text":default:l=e.jsx(ie,{value:u,overStyled:t});break}return e.jsx(O,{ref:i,overStyled:t,...d,children:l})});le.displayName="ReadOnlyField";const de=m.forwardRef(function({readOnly:s,readOnlyComponent:a,readOnlyType:n="text",readOnlyValue:t,activeComponent:r,overStyled:i,onLabelEditClick:l,...d},c){return s?a?e.jsx(O,{ref:c,...d,onLabelEditClick:l,overStyled:i,children:a}):e.jsx(le,{ref:c,type:n,value:t,onLabelEditClick:l,overStyled:i,...d}):e.jsx(O,{ref:c,...d,onLabelEditClick:l,overStyled:i,children:r})});de.displayName="WithReadOnlyWrapper";const Jo=o=>e.jsx("div",{...o,children:"Search"}),Qo=o=>e.jsx("div",{...o,children:"SegmentedControl"}),et=o=>e.jsx("div",{...o,children:"Slider"}),ot=o=>e.jsx("div",{...o,children:"Stepper"}),tt=o=>e.jsx("div",{...o,children:"Switch"}),rt=o=>e.jsx("div",{...o,children:"Table"}),st=o=>e.jsx("div",{...o,children:"Tabs"}),nt=o=>e.jsx("div",{...o,children:"TextArea"}),at="TextField-module__root___2ZYkG",ct="TextField-module__input___RL-My",it="TextField-module__section___bCIJ0",S={root:at,input:ct,section:it},$e=m.forwardRef(function({overStyled:s=!1,formLayout:a="stacked",labelSize:n,labelAlignment:t,labelOptionalText:r,labelWithEditIcon:i,onLabelEditClick:l,label:d,assistiveText:c,assistiveWithIcon:p,error:u,required:N,withAsterisk:_,id:x,className:b,style:C,disabled:f,readOnly:v,readOnlyComponent:g,value:k,defaultValue:W,...V},M){const q=y(V,s),P=q;delete P.size,delete P.variant,delete P.radius;const T={wrapper:S.root,input:S.input,section:S.section},E=P.classNames;if(E&&typeof E=="object"&&!Array.isArray(E)){const F=E;T.wrapper=F.wrapper?`${S.root} ${F.wrapper}`:S.root,T.input=F.input?`${S.input} ${F.input}`:S.input,T.section=F.section?`${S.section} ${F.section}`:S.section}return e.jsx(de,{className:b,style:C,controlMaxWidth:"var(--recursica_ui-kit_components_text-field_properties_max-width)",controlMinWidth:"var(--recursica_ui-kit_components_text-field_properties_min-width)",overStyled:s,formLayout:a,labelSize:n,labelAlignment:t,labelOptionalText:r,labelWithEditIcon:i,onLabelEditClick:l,label:d,assistiveText:c,assistiveWithIcon:p,error:u,required:N,withAsterisk:_,id:x,readOnly:v,readOnlyComponent:g,readOnlyType:"text",readOnlyValue:k!==void 0?k:W,activeComponent:e.jsx(j.Input,{ref:M,classNames:T,disabled:f,value:k,defaultValue:W,wrapperProps:{"data-disabled":f?"true":void 0,"data-error":u?"true":void 0},...q})})});$e.displayName="TextField";const lt=o=>e.jsx("div",{...o,children:"TimePicker"}),dt=o=>e.jsx("div",{...o,children:"Timeline"}),pt=o=>e.jsx("div",{...o,children:"Toast"}),_t=o=>e.jsx("div",{...o,children:"Tooltip"}),mt=o=>e.jsx("div",{...o,children:"TransferList"});exports.Accordion=U;exports.AccordionControl=K;exports.AccordionItem=ee;exports.AccordionPanel=Z;exports.Avatar=he;exports.Badge=be;exports.Breadcrumb=Ne;exports.Button=ye;exports.Card=H;exports.CardContent=se;exports.CardFooter=re;exports.CardHeader=te;exports.CardSection=oe;exports.Checkbox=ce;exports.CheckboxGroup=ae;exports.Chip=Ce;exports.DatePicker=Io;exports.Dropdown=So;exports.EmptyValueRenderer=G;exports.FileInput=Lo;exports.FileUpload=Bo;exports.HoverCard=zo;exports.Label=ne;exports.Layer=ve;exports.Link=Eo;exports.Loader=Oo;exports.Menu=Mo;exports.Modal=qo;exports.NumberInput=Do;exports.Pagination=Vo;exports.Panel=Go;exports.Popover=Ho;exports.Radio=Ko;exports.ReadOnlyField=le;exports.ReadOnlyTextField=ie;exports.RecursicaThemeProvider=Yo;exports.Search=Jo;exports.SegmentedControl=Qo;exports.Slider=et;exports.Stepper=ot;exports.Switch=tt;exports.Table=rt;exports.Tabs=st;exports.TextArea=nt;exports.TextField=$e;exports.TimePicker=lt;exports.Timeline=dt;exports.Toast=pt;exports.Tooltip=_t;exports.TransferList=mt;exports.WithReadOnlyWrapper=de;
2
2
  //# sourceMappingURL=mantine-adapter.cjs.map