@recursica/mantine-adapter 0.5.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.
- package/.storybook/commonArgTypes.ts +148 -0
- package/CHANGELOG.md +69 -0
- package/dist/mantine-adapter.cjs +1 -1
- package/dist/mantine-adapter.cjs.map +1 -1
- package/dist/mantine-adapter.css +1 -1
- package/dist/mantine-adapter.js +1076 -266
- package/dist/mantine-adapter.js.map +1 -1
- package/dist/src/components/Accordion/Accordion.d.ts +13 -28
- package/dist/src/components/AssistiveElement/AssistiveElement.d.ts +10 -0
- package/dist/src/components/Avatar/Avatar.d.ts +1 -1
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +6 -3
- package/dist/src/components/Button/Button.d.ts +1 -1
- package/dist/src/components/Card/Card.d.ts +38 -3
- package/dist/src/components/Checkbox/Checkbox.d.ts +11 -3
- package/dist/src/components/Checkbox/CheckboxGroup.d.ts +9 -0
- package/dist/src/components/Chip/Chip.d.ts +14 -2
- package/dist/src/components/FormControlWrapper/FormControlWrapper.d.ts +18 -0
- package/dist/src/components/Label/Label.d.ts +21 -0
- package/dist/src/components/Label/index.d.ts +1 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyField.d.ts +19 -2
- package/dist/src/components/ReadOnlyField/ReadOnlyTextField.d.ts +8 -0
- package/dist/src/components/ReadOnlyField/WithReadOnlyWrapper.d.ts +22 -0
- package/dist/src/components/ReadOnlyField/index.d.ts +3 -0
- package/dist/src/components/Text/Text.d.ts +17 -0
- package/dist/src/components/TextField/TextField.d.ts +8 -2
- package/dist/src/components/Title/Title.d.ts +13 -0
- package/dist/src/components/index.d.ts +3 -1
- package/dist/src/utils/ColorSchemeWrapper.d.ts +3 -0
- package/dist/src/utils/filterStylingProps.d.ts +6 -2
- package/package.json +9 -5
- package/src/OverStyling.stories.tsx +174 -0
- package/src/Version.stories.tsx +56 -0
- package/src/components/Accordion/ACCORDION_IMPLEMENTATION_NOTES.md +48 -0
- package/src/components/Accordion/Accordion.module.css +261 -0
- package/src/components/Accordion/Accordion.stories.tsx +145 -0
- package/src/components/Accordion/Accordion.tsx +200 -0
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/AssistiveElement/AssistiveElement.module.css +111 -0
- package/src/components/AssistiveElement/AssistiveElement.stories.tsx +73 -0
- package/src/components/AssistiveElement/AssistiveElement.tsx +91 -0
- package/src/components/Avatar/AVATAR_IMPLEMENTATION_NOTES.md +24 -0
- package/src/components/Avatar/Avatar.module.css +340 -0
- package/src/components/Avatar/Avatar.stories.tsx +102 -0
- package/src/components/Avatar/Avatar.tsx +100 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Badge/BADGE_IMPLEMENTATION_NOTES.md +18 -0
- package/src/components/Badge/Badge.module.css +124 -0
- package/src/components/Badge/Badge.stories.tsx +77 -0
- package/src/components/Badge/Badge.tsx +66 -0
- package/src/components/Breadcrumb/BREADCRUMB_IMPLEMENTATION_NOTES.md +14 -0
- package/src/components/Breadcrumb/Breadcrumb.module.css +26 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +77 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +64 -0
- package/src/components/Button/Button.module.css +275 -0
- package/src/components/Button/Button.stories.tsx +105 -0
- package/src/components/Button/Button.tsx +122 -0
- package/src/components/Button/IMPLEMENTATION_NOTES.md +45 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Card/CARD_IMPLEMENTATION_NOTES.md +10 -0
- package/src/components/Card/Card.module.css +60 -0
- package/src/components/Card/Card.stories.tsx +141 -0
- package/src/components/Card/Card.tsx +176 -0
- package/src/components/Checkbox/CHECKBOX_IMPLEMENTATION_NOTES.md +25 -0
- package/src/components/Checkbox/Checkbox.module.css +204 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +73 -0
- package/src/components/Checkbox/Checkbox.tsx +111 -0
- package/src/components/Checkbox/CheckboxGroup.stories.tsx +138 -0
- package/src/components/Checkbox/CheckboxGroup.tsx +140 -0
- package/src/components/Chip/CHIP_IMPLEMENTATION_NOTES.md +35 -0
- package/src/components/Chip/Chip.module.css +218 -0
- package/src/components/Chip/Chip.stories.tsx +115 -0
- package/src/components/Chip/Chip.tsx +143 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +22 -0
- package/src/components/DatePicker/DatePicker.tsx +7 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +22 -0
- package/src/components/Dropdown/Dropdown.tsx +7 -0
- package/src/components/FileInput/FileInput.stories.tsx +22 -0
- package/src/components/FileInput/FileInput.tsx +7 -0
- package/src/components/FileUpload/FileUpload.stories.tsx +22 -0
- package/src/components/FileUpload/FileUpload.tsx +7 -0
- package/src/components/FormControlWrapper/FORMCONTROLWRAPPER_IMPLEMENTATION_NOTES.md +32 -0
- package/src/components/FormControlWrapper/FormControlWrapper.module.css +46 -0
- package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +116 -0
- package/src/components/FormControlWrapper/FormControlWrapper.tsx +170 -0
- package/src/components/HoverCard/HoverCard.stories.tsx +17 -0
- package/src/components/HoverCard/HoverCard.tsx +7 -0
- package/src/components/Label/LABEL_IMPLEMENTATION_NOTES.md +48 -0
- package/src/components/Label/Label.module.css +177 -0
- package/src/components/Label/Label.stories.tsx +123 -0
- package/src/components/Label/Label.tsx +132 -0
- package/src/components/Label/index.ts +1 -0
- package/src/components/Link/Link.stories.tsx +17 -0
- package/src/components/Link/Link.tsx +7 -0
- package/src/components/Loader/Loader.stories.tsx +17 -0
- package/src/components/Loader/Loader.tsx +7 -0
- package/src/components/Menu/Menu.stories.tsx +17 -0
- package/src/components/Menu/Menu.tsx +7 -0
- package/src/components/Modal/Modal.stories.tsx +17 -0
- package/src/components/Modal/Modal.tsx +7 -0
- package/src/components/NumberInput/NumberInput.stories.tsx +22 -0
- package/src/components/NumberInput/NumberInput.tsx +7 -0
- package/src/components/Pagination/Pagination.stories.tsx +17 -0
- package/src/components/Pagination/Pagination.tsx +7 -0
- package/src/components/Panel/Panel.stories.tsx +17 -0
- package/src/components/Panel/Panel.tsx +7 -0
- package/src/components/Popover/Popover.stories.tsx +17 -0
- package/src/components/Popover/Popover.tsx +7 -0
- package/src/components/Radio/Radio.stories.tsx +22 -0
- package/src/components/Radio/Radio.tsx +7 -0
- package/src/components/ReadOnlyField/READ_ONLY_FIELD_IMPLEMENTATION_NOTES.md +15 -0
- package/src/components/ReadOnlyField/ReadOnlyField.module.css +49 -0
- package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +120 -0
- package/src/components/ReadOnlyField/ReadOnlyField.tsx +75 -0
- package/src/components/ReadOnlyField/ReadOnlyTextField.tsx +46 -0
- package/src/components/ReadOnlyField/WithReadOnlyWrapper.tsx +85 -0
- package/src/components/ReadOnlyField/index.ts +3 -0
- package/src/components/Search/Search.stories.tsx +17 -0
- package/src/components/Search/Search.tsx +7 -0
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +22 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +7 -0
- package/src/components/Slider/Slider.stories.tsx +22 -0
- package/src/components/Slider/Slider.tsx +7 -0
- package/src/components/Stepper/Stepper.stories.tsx +17 -0
- package/src/components/Stepper/Stepper.tsx +7 -0
- package/src/components/Switch/Switch.stories.tsx +22 -0
- package/src/components/Switch/Switch.tsx +7 -0
- package/src/components/Table/Table.stories.tsx +17 -0
- package/src/components/Table/Table.tsx +7 -0
- package/src/components/Tabs/Tabs.stories.tsx +17 -0
- package/src/components/Tabs/Tabs.tsx +7 -0
- package/src/components/Text/Text.stories.tsx +88 -0
- package/src/components/Text/Text.tsx +54 -0
- package/src/components/TextArea/TextArea.stories.tsx +22 -0
- package/src/components/TextArea/TextArea.tsx +7 -0
- package/src/components/TextField/TEXTFIELD_IMPLEMENTATION_NOTES.md +19 -0
- package/src/components/TextField/TextField.module.css +225 -0
- package/src/components/TextField/TextField.stories.tsx +162 -0
- package/src/components/TextField/TextField.tsx +138 -0
- package/src/components/TimePicker/TimePicker.stories.tsx +22 -0
- package/src/components/TimePicker/TimePicker.tsx +7 -0
- package/src/components/Timeline/Timeline.stories.tsx +17 -0
- package/src/components/Timeline/Timeline.tsx +7 -0
- package/src/components/Title/Title.stories.tsx +63 -0
- package/src/components/Title/Title.tsx +45 -0
- package/src/components/Toast/Toast.stories.tsx +17 -0
- package/src/components/Toast/Toast.tsx +7 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +17 -0
- package/src/components/Tooltip/Tooltip.tsx +7 -0
- package/src/components/TransferList/TransferList.stories.tsx +17 -0
- package/src/components/TransferList/TransferList.tsx +7 -0
- package/src/components/index.ts +39 -0
- package/src/env.d.ts +7 -0
- package/src/index.ts +3 -0
- package/src/types/index.ts +9 -0
- package/src/types/mantine.d.ts +7 -0
- package/src/types/scss-modules.d.ts +9 -0
- package/src/utils/ColorSchemeWrapper.tsx +27 -0
- package/src/utils/copyToClipboard.ts +36 -0
- package/src/utils/filterStylingProps.ts +139 -0
- 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
|
package/dist/mantine-adapter.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("react"),b=require("@mantine/core"),k="Accordion-module__root___Dem6d",z="Accordion-module__item___7ryVk",O="Accordion-module__noDivider___Ni2tT",M="Accordion-module__control___b4wgX",V="Accordion-module__label___Ss7uW",q="Accordion-module__chevron___i-HVZ",H="Accordion-module__iconLeftWrapper___5oLen",K="Accordion-module__panel___Wx50w",U="Accordion-module__content___PEM9t",_={root:k,item:z,noDivider:O,control:M,label:V,chevron:q,iconLeftWrapper:H,panel:K,content:U},L=function({className:r,classNames:t,variant:n="unstyled",...i}){const c={root:_.root,item:_.item,control:_.control,label:_.label,chevron:_.chevron,panel:_.panel,content:_.content};if(t&&typeof t=="object"&&!Array.isArray(t)){const a=t;Object.keys(a).forEach(s=>{c[s]?c[s]=`${c[s]} ${a[s]}`:c[s]=a[s]})}return o.jsx(b.Accordion,{variant:n,className:r,classNames:c,...i})};L.displayName="Accordion";const C=h.forwardRef(function({title:r,leftIcon:t,divider:n=!0,children:i,...c},a){return o.jsx(b.Accordion.Item,{ref:a,className:n?void 0:_.noDivider,...c,children:r?o.jsxs(o.Fragment,{children:[o.jsx(T,{leftIcon:t,children:r}),o.jsx(P,{children:i})]}):i})});C.displayName="AccordionItem";const T=h.forwardRef(function({leftIcon:r,children:t,...n},i){return o.jsx(b.Accordion.Control,{ref:i,icon:r?o.jsx("span",{className:_.iconLeftWrapper,"aria-hidden":!0,children:r}):void 0,...n,children:t})});T.displayName="AccordionControl";const P=h.forwardRef(function(r,t){return o.jsx(b.Accordion.Panel,{ref:t,...r})});P.displayName="AccordionPanel";const S=L;S.Item=C;S.Control=T;S.Panel=P;const G="Avatar-module__root___fXu-J",J="Avatar-module__iconWrapper___ojly2",X="Avatar-module__textWrapper___zp-jD",Y="Avatar-module__image___ieqGp",Z="Avatar-module__placeholder___IDW7-",d={root:G,iconWrapper:J,textWrapper:X,image:Y,placeholder:Z},R=h.forwardRef(function({size:r="default",variant:t="solid",icon:n,className:i,classNames:c,children:a,style:s,src:f,...A},p){const v={solid:"filled",outline:"outline",ghost:"transparent"},$={default:"md",small:"sm",large:"lg"};let y="text";f?y="image":n&&(y="icon");const x={root:d.root,image:d.image,placeholder:d.placeholder};if(c&&typeof c=="object"&&!Array.isArray(c)){const l=c;x.root=l.root?`${d.root} ${l.root}`:d.root,x.image=l.image?`${d.image} ${l.image}`:d.image,x.placeholder=l.placeholder?`${d.placeholder} ${l.placeholder}`:d.placeholder}return o.jsx(b.Avatar,{ref:p,className:i,classNames:x,variant:v[t],size:$[r],style:s,src:f,"data-variant":t,"data-size":r,"data-style":y,...A,children:n!=null?o.jsx("span",{className:d.iconWrapper,"aria-hidden":!0,children:n}):a!=null?o.jsx("span",{className:d.textWrapper,children:a}):void 0})});R.displayName="Avatar";const Q=["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"];function W(e,r){if(r)return e;const t={...e};for(const n of Q)n in t&&delete t[n];return t}const ee="Badge-module__root___5osNT",m={root:ee},D=h.forwardRef(function({variant:r="primary-color",overStyled:t=!1,...n},i){const c=W(n,t),a={root:m.root,section:m.section,label:m.label},s=c.classNames;if(s&&typeof s=="object"&&!Array.isArray(s)){const p=s;a.root=p.root?`${m.root} ${p.root}`:m.root,a.section=p.section??m.section,a.label=p.label??m.label}const f=c.className,A=f?`${m.root} ${f}`:m.root;return o.jsx(b.Badge,{ref:i,variant:"filled","data-variant":r,...c,className:A,classNames:a})});D.displayName="Badge";const oe=e=>o.jsx("div",{...e,children:"Breadcrumb"}),te="Button-module__root___Q2R8-",re="Button-module__label___UJ3Zt",ne="Button-module__labelText___rFV5p",ce="Button-module__iconWrapper___uEKPa",ae="Button-module__section___f2mKr",u={root:te,label:re,labelText:ne,iconWrapper:ce,section:ae};function se(e){return e==null||e===""?!1:typeof e=="string"?e.trim()!=="":!0}const F=h.forwardRef(function({variant:r="solid",size:t="default",icon:n,children:i,overStyled:c=!1,...a},s){const f={solid:"filled",outline:"outline",text:"subtle"},A={default:"md",small:"sm"},p=W(a,c),v=p,$=!!n||!!v.leftSection,y=!!v.rightSection,x=($||y)&&!se(i);typeof process<"u"&&process.env.NODE_ENV!=="production"&&x&&!v["aria-label"]&&console.warn('[Recursica Button] Icon-only buttons must provide an accessible name. Pass aria-label (e.g. aria-label="Submit").');const l={root:u.root,section:u.section,label:u.label},g=v.classNames;if(g&&typeof g=="object"&&!Array.isArray(g)){const N=g;l.root=N.root?`${u.root} ${N.root}`:u.root,l.section=N.section??u.section,l.label=N.label??u.label}const B=v.className,E=B?`${u.root} ${B}`:u.root;return o.jsx(b.Button,{ref:s,className:E,classNames:l,variant:f[r],size:A[t],leftSection:n!=null?o.jsx("span",{className:u.iconWrapper,"aria-hidden":!0,children:n}):void 0,"data-variant":r,"data-size":t,...x?{"data-icon-only":""}:{},...p,children:o.jsx("span",{className:u.labelText,children:i})})});F.displayName="Button";const ie=e=>o.jsx("div",{...e,children:"Card"}),le=e=>o.jsx("div",{...e,children:"Checkbox"}),de=e=>o.jsx("div",{...e,children:"Chip"}),ue=e=>o.jsx("div",{...e,children:"DatePicker"}),pe=e=>o.jsx("div",{...e,children:"Dropdown"}),me=e=>o.jsx("div",{...e,children:"FileInput"}),_e=e=>o.jsx("div",{...e,children:"FileUpload"}),he=e=>o.jsx("div",{...e,children:"HoverCard"}),fe=e=>o.jsx("div",{...e,children:"Link"}),ve=e=>o.jsx("div",{...e,children:"Loader"}),xe=e=>o.jsx("div",{...e,children:"Menu"}),be=e=>o.jsx("div",{...e,children:"Modal"}),je=e=>o.jsx("div",{...e,children:"NumberInput"}),Ae=e=>o.jsx("div",{...e,children:"Pagination"}),ye=e=>o.jsx("div",{...e,children:"Panel"}),ge=e=>o.jsx("div",{...e,children:"Popover"}),Ne=e=>o.jsx("div",{...e,children:"Radio"}),Te=e=>o.jsx("div",{...e,children:"ReadOnlyField"}),Pe=e=>o.jsx("div",{...e,children:"Search"}),Se=e=>o.jsx("div",{...e,children:"SegmentedControl"}),$e=e=>o.jsx("div",{...e,children:"Slider"}),Ce=e=>o.jsx("div",{...e,children:"Stepper"}),Be=e=>o.jsx("div",{...e,children:"Switch"}),we=e=>o.jsx("div",{...e,children:"Table"}),Le=e=>o.jsx("div",{...e,children:"Tabs"}),Re=e=>o.jsx("div",{...e,children:"TextArea"}),We=e=>o.jsx("div",{...e,children:"TextField"}),De=e=>o.jsx("div",{...e,children:"TimePicker"}),Fe=e=>o.jsx("div",{...e,children:"Timeline"}),Ie=e=>o.jsx("div",{...e,children:"Toast"}),Ee=e=>o.jsx("div",{...e,children:"Tooltip"}),ke=e=>o.jsx("div",{...e,children:"TransferList"}),ze="_root_1qhn7_3",Oe="_contents_1qhn7_18",j={root:ze,contents:Oe},I=h.forwardRef(function({layer:e,contentsOnly:r,children:t,className:n,style:i,...c},a){const s=r?n?`${j.root} ${j.contents} ${n}`:`${j.root} ${j.contents}`:n?`${j.root} ${n}`:j.root;return o.jsx("div",{ref:a,className:s,style:i,...r?{}:{"data-recursica-layer":String(e)},...c,children:t})});I.displayName="Layer";const w="data-recursica-theme";function Me({children:e,theme:r="light"}){return h.useEffect(()=>{const t=document.documentElement;return t.setAttribute(w,r),()=>{t.removeAttribute(w)}},[r]),o.jsx(o.Fragment,{children:e})}exports.Accordion=S;exports.AccordionControl=T;exports.AccordionItem=C;exports.AccordionPanel=P;exports.Avatar=R;exports.Badge=D;exports.Breadcrumb=oe;exports.Button=F;exports.Card=ie;exports.Checkbox=le;exports.Chip=de;exports.DatePicker=ue;exports.Dropdown=pe;exports.FileInput=me;exports.FileUpload=_e;exports.HoverCard=he;exports.Layer=I;exports.Link=fe;exports.Loader=ve;exports.Menu=xe;exports.Modal=be;exports.NumberInput=je;exports.Pagination=Ae;exports.Panel=ye;exports.Popover=ge;exports.Radio=Ne;exports.ReadOnlyField=Te;exports.RecursicaThemeProvider=Me;exports.Search=Pe;exports.SegmentedControl=Se;exports.Slider=$e;exports.Stepper=Ce;exports.Switch=Be;exports.Table=we;exports.Tabs=Le;exports.TextArea=Re;exports.TextField=We;exports.TimePicker=De;exports.Timeline=Fe;exports.Toast=Ie;exports.Tooltip=Ee;exports.TransferList=ke;
|
|
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
|