@foi/design-system 0.0.14 → 0.0.16
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/README.md +117 -18
- package/dist/{RadioGroup-DCJBoZc-.js → RadioGroup-BdWsLUz-.js} +4 -4
- package/dist/{RadioGroup-DCJBoZc-.js.map → RadioGroup-BdWsLUz-.js.map} +1 -1
- package/dist/{RadioGroup.context-QNk2hW_4.js → RadioGroup.context-BBa8PDLt.js} +4 -4
- package/dist/RadioGroup.context-BBa8PDLt.js.map +1 -0
- package/dist/{Switch-JF9P9VJf.js → Switch-BNFdKefE.js} +1394 -886
- package/dist/Switch-BNFdKefE.js.map +1 -0
- package/dist/{ThemeProvider-Q2Hjezbt.js → ThemeProvider-C47pyWG6.js} +2 -2
- package/dist/{ThemeProvider-Q2Hjezbt.js.map → ThemeProvider-C47pyWG6.js.map} +1 -1
- package/dist/atoms.d.ts +4 -2
- package/dist/atoms.mjs +3 -3
- package/dist/components/atoms/NumberField/NumberField.d.ts +5 -0
- package/dist/components/atoms/NumberField/NumberField.interface.d.ts +57 -0
- package/dist/components/atoms/NumberField/index.d.ts +4 -0
- package/dist/components/atoms/TextField/TextField.d.ts +5 -0
- package/dist/components/atoms/TextField/TextField.emotion.d.ts +2 -0
- package/dist/components/atoms/TextField/TextField.interface.d.ts +51 -0
- package/dist/components/atoms/TextField/index.d.ts +4 -0
- package/dist/{emotion-react-jsx-runtime.browser.esm-C4rLUMui.js → emotion-react-jsx-runtime.browser.esm-Ch-DwUYg.js} +2 -2
- package/dist/{emotion-react-jsx-runtime.browser.esm-C4rLUMui.js.map → emotion-react-jsx-runtime.browser.esm-Ch-DwUYg.js.map} +1 -1
- package/dist/hocs/ThemeProvider/components/NumberField.d.ts +38 -0
- package/dist/hocs/ThemeProvider/components/{Input.d.ts → TextField.d.ts} +1 -1
- package/dist/hocs/ThemeProvider/components/index.d.ts +3 -2
- package/dist/hocs/ThemeProvider/interfaces/Components.interface.d.ts +2 -1
- package/dist/hocs.mjs +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +187 -187
- package/dist/index.mjs.map +1 -1
- package/dist/molecules.mjs +1 -1
- package/dist/theme/dark/components/NumberField.d.ts +60 -0
- package/dist/theme/dark/components/{Input.d.ts → TextField.d.ts} +1 -1
- package/dist/theme/dark/components/index.d.ts +58 -1
- package/dist/theme/dark/index.d.ts +58 -1
- package/dist/theme/index.d.ts +58 -1
- package/dist/{theme-Cxg9jdmX.js → theme-D01EcUA9.js} +81 -44
- package/dist/theme-D01EcUA9.js.map +1 -0
- package/dist/theme.mjs +1 -1
- package/package.json +1 -1
- package/dist/RadioGroup.context-QNk2hW_4.js.map +0 -1
- package/dist/Switch-JF9P9VJf.js.map +0 -1
- package/dist/components/atoms/Input/Input.d.ts +0 -10
- package/dist/components/atoms/Input/Input.interface.d.ts +0 -108
- package/dist/components/atoms/Input/index.d.ts +0 -4
- package/dist/theme-Cxg9jdmX.js.map +0 -1
- /package/dist/components/atoms/{Input/Input.emotion.d.ts → NumberField/NumberField.emotion.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -42,20 +42,21 @@ npm publish --access public
|
|
|
42
42
|
|
|
43
43
|
### Atoms
|
|
44
44
|
|
|
45
|
-
| Component
|
|
46
|
-
|
|
|
47
|
-
| `Button`
|
|
48
|
-
| `Checkbox`
|
|
49
|
-
| `DatePicker`
|
|
50
|
-
| `Icon`
|
|
51
|
-
| `IconButton`
|
|
52
|
-
| `
|
|
53
|
-
| `Pagination`
|
|
54
|
-
| `Radio`
|
|
55
|
-
| `Select`
|
|
56
|
-
| `Skeleton`
|
|
57
|
-
| `Slider`
|
|
58
|
-
| `Switch`
|
|
45
|
+
| Component | Description |
|
|
46
|
+
| ------------- | ------------------------------------------------------------------------------------------ |
|
|
47
|
+
| `Button` | Primary action button with variant/size/color support |
|
|
48
|
+
| `Checkbox` | Single checkbox — standalone, RHF, or inside a group |
|
|
49
|
+
| `DatePicker` | Date input with calendar menu, integrates with RHF |
|
|
50
|
+
| `Icon` | Font-based icon using Material Symbols Rounded — pass a `name` prop |
|
|
51
|
+
| `IconButton` | Clickable icon with button semantics |
|
|
52
|
+
| `NumberField` | Numeric input with increment/decrement buttons, min/max/step support, and two layout modes |
|
|
53
|
+
| `Pagination` | Page navigation bar with first/prev/next/last buttons and optional rows-per-page selector |
|
|
54
|
+
| `Radio` | Single radio button — used inside `RadioGroup` |
|
|
55
|
+
| `Select` | Dropdown select with RHF integration |
|
|
56
|
+
| `Skeleton` | Animated placeholder shown while content is loading — rectangular or circular |
|
|
57
|
+
| `Slider` | Range slider with RHF integration |
|
|
58
|
+
| `Switch` | Toggle switch — boolean RHF field |
|
|
59
|
+
| `TextField` | Text input (text, password, email) with label, helper text, and error state |
|
|
59
60
|
|
|
60
61
|
### Molecules
|
|
61
62
|
|
|
@@ -80,12 +81,13 @@ All field components share the same integration pattern. Define a Zod schema, pa
|
|
|
80
81
|
import { useForm } from 'react-hook-form';
|
|
81
82
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
82
83
|
import { z } from 'zod';
|
|
83
|
-
import
|
|
84
|
+
import TextField from '@components/atoms/TextField';
|
|
85
|
+
import NumberField from '@components/atoms/NumberField';
|
|
84
86
|
import Button from '@components/atoms/Button';
|
|
85
87
|
|
|
86
88
|
const schema = z.object({
|
|
87
89
|
email: z.string().email('Invalid email'),
|
|
88
|
-
age: z.number().min(18, 'Must be 18 or older'),
|
|
90
|
+
age: z.number({ message: 'Required' }).min(18, 'Must be 18 or older'),
|
|
89
91
|
});
|
|
90
92
|
|
|
91
93
|
type FormValues = z.infer<typeof schema>;
|
|
@@ -97,8 +99,8 @@ const MyForm = () => {
|
|
|
97
99
|
|
|
98
100
|
return (
|
|
99
101
|
<form onSubmit={handleSubmit(console.log)}>
|
|
100
|
-
<
|
|
101
|
-
<
|
|
102
|
+
<TextField name='email' control={control} label='Email' />
|
|
103
|
+
<NumberField name='age' control={control} label='Age' min={18} />
|
|
102
104
|
<Button type='submit' label='Submit' />
|
|
103
105
|
</form>
|
|
104
106
|
);
|
|
@@ -131,6 +133,103 @@ const [agreed, setAgreed] = useState(false);
|
|
|
131
133
|
<Checkbox checked={agreed} onChecked={setAgreed} label='I agree to the terms' />;
|
|
132
134
|
```
|
|
133
135
|
|
|
136
|
+
## TextField
|
|
137
|
+
|
|
138
|
+
A text input field with a floating label, helper text, and full error state integration. Only accepts `text`, `password`, and `email` as input types. For numeric input use `NumberField`.
|
|
139
|
+
|
|
140
|
+
### Props
|
|
141
|
+
|
|
142
|
+
| Prop | Type | Default | Description |
|
|
143
|
+
| --------------- | ----------------------------------------- | ---------- | ---------------------------------------------------- |
|
|
144
|
+
| `name` | `string` | — | Field name, used by RHF |
|
|
145
|
+
| `label` | `string` | — | Floating label text |
|
|
146
|
+
| `control` | `Control` | — | RHF control object; omit for uncontrolled mode |
|
|
147
|
+
| `value` | `string` | — | Value in uncontrolled mode |
|
|
148
|
+
| `onValueChange` | `(value: string) => void` | — | Change handler in uncontrolled mode |
|
|
149
|
+
| `type` | `'text' \| 'password' \| 'email'` | `'text'` | HTML input type |
|
|
150
|
+
| `width` | `'small' \| 'medium' \| 'large' \| 'full'` | — | Preset width |
|
|
151
|
+
| `helperText` | `string` | — | Hint text shown below the field when there is no error |
|
|
152
|
+
| `showErrorText` | `boolean` | `true` | Show the validation error message below the field |
|
|
153
|
+
| `hasPadding` | `boolean` | `false` | Add bottom padding to reserve space for helper/error text |
|
|
154
|
+
| `startAdornment`| `JSX.Element` | — | Element rendered to the left of the input |
|
|
155
|
+
| `endAdornment` | `JSX.Element` | — | Element rendered to the right of the input |
|
|
156
|
+
| `regex` | `RegExp` | — | Block keystrokes that don't match the pattern |
|
|
157
|
+
| `format` | `(value: string) => string` | — | Transform the value before it is stored |
|
|
158
|
+
| `disabled` | `boolean` | `false` | Disable the field |
|
|
159
|
+
| `theme` | `EVENTS` | — | One-off token override for this instance |
|
|
160
|
+
| `variant` | `string` | `'default'`| Theme variant name |
|
|
161
|
+
|
|
162
|
+
### Example
|
|
163
|
+
|
|
164
|
+
```tsx
|
|
165
|
+
import TextField from '@components/atoms/TextField';
|
|
166
|
+
import Icon from '@components/atoms/Icon';
|
|
167
|
+
|
|
168
|
+
<TextField
|
|
169
|
+
name='email'
|
|
170
|
+
control={control}
|
|
171
|
+
label='Email'
|
|
172
|
+
type='email'
|
|
173
|
+
startAdornment={<Icon name='mail' />}
|
|
174
|
+
helperText='We will never share your email'
|
|
175
|
+
/>
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## NumberField
|
|
179
|
+
|
|
180
|
+
A numeric input that stores a `number` in RHF (or `undefined` when empty). The field always renders increment/decrement buttons; their position depends on the `display` prop.
|
|
181
|
+
|
|
182
|
+
### Props
|
|
183
|
+
|
|
184
|
+
All `TextField` props apply except `type`, `endAdornment`, and `startAdornment` (in `spinner` mode). The following props are specific to `NumberField`:
|
|
185
|
+
|
|
186
|
+
| Prop | Type | Default | Description |
|
|
187
|
+
| --------- | ----------------------------- | ------------ | ------------------------------------------------------------------------ |
|
|
188
|
+
| `min` | `number` | — | Minimum allowed value; decrement button disables at this bound |
|
|
189
|
+
| `max` | `number` | — | Maximum allowed value; increment button disables at this bound |
|
|
190
|
+
| `step` | `number` | `1` | Amount added or subtracted on each button click |
|
|
191
|
+
| `display` | `'standard' \| 'spinner'` | `'standard'` | `standard`: both buttons on the right; `spinner`: remove left, input centre, add right |
|
|
192
|
+
|
|
193
|
+
### Display modes
|
|
194
|
+
|
|
195
|
+
**`standard`** (default) — both buttons grouped on the right:
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
[startAdornment?] [ input ] [− +]
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**`spinner`** — decrement on the left, input centred, increment on the right:
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
[−] [ input ] [+]
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Example
|
|
208
|
+
|
|
209
|
+
```tsx
|
|
210
|
+
import NumberField from '@components/atoms/NumberField';
|
|
211
|
+
|
|
212
|
+
// Standard — quantity picker with bounds
|
|
213
|
+
<NumberField
|
|
214
|
+
name='quantity'
|
|
215
|
+
control={control}
|
|
216
|
+
label='Quantity'
|
|
217
|
+
min={1}
|
|
218
|
+
max={99}
|
|
219
|
+
step={1}
|
|
220
|
+
/>
|
|
221
|
+
|
|
222
|
+
// Spinner layout
|
|
223
|
+
<NumberField
|
|
224
|
+
name='quantity'
|
|
225
|
+
control={control}
|
|
226
|
+
label='Quantity'
|
|
227
|
+
display='spinner'
|
|
228
|
+
min={0}
|
|
229
|
+
max={100}
|
|
230
|
+
/>
|
|
231
|
+
```
|
|
232
|
+
|
|
134
233
|
## Theming
|
|
135
234
|
|
|
136
235
|
Wrap your app in `ThemeProvider` and pass one or more named themes. The active theme is selected by the `theme` prop and its tokens are injected as CSS custom properties that every component consumes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as e, n as t, r as n } from "./emotion-react-jsx-runtime.browser.esm-
|
|
2
|
-
import { r } from "./theme-
|
|
3
|
-
import { a as i, i as a, n as o, o as s, r as c, t as l } from "./RadioGroup.context-
|
|
1
|
+
import { i as e, n as t, r as n } from "./emotion-react-jsx-runtime.browser.esm-Ch-DwUYg.js";
|
|
2
|
+
import { r } from "./theme-D01EcUA9.js";
|
|
3
|
+
import { a as i, i as a, n as o, o as s, r as c, t as l } from "./RadioGroup.context-BBa8PDLt.js";
|
|
4
4
|
import u, { useEffect as d, useMemo as f, useRef as p } from "react";
|
|
5
5
|
import { css as m } from "@emotion/react";
|
|
6
6
|
import { useController as h } from "react-hook-form";
|
|
@@ -321,4 +321,4 @@ var g = (e, t) => `
|
|
|
321
321
|
//#endregion
|
|
322
322
|
export { w as n, b as r, k as t };
|
|
323
323
|
|
|
324
|
-
//# sourceMappingURL=RadioGroup-
|
|
324
|
+
//# sourceMappingURL=RadioGroup-BdWsLUz-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup-DCJBoZc-.js","names":[],"sources":["../src/components/molecules/CheckboxGroup/CheckboxGroup.emotion.ts","../src/components/molecules/CheckboxGroup/CheckboxGroup.tsx","../src/components/molecules/CheckboxGroup/index.tsx","../src/components/molecules/CheckboxTree/CheckboxTree.emotion.ts","../src/components/molecules/CheckboxTree/CheckboxTree.tsx","../src/components/molecules/CheckboxTree/index.tsx","../src/components/molecules/RadioGroup/RadioGroup.emotion.ts","../src/components/molecules/RadioGroup/RadioGroup.tsx","../src/components/molecules/RadioGroup/index.tsx"],"sourcesContent":["import { css } from '@emotion/react';\nimport { getStyle } from '@utilities/emotion/styles';\n\nconst labelColor = (theme: Record<string, string>, event: string): string => `\n .--CHECKBOXGROUP-label {\n ${getStyle(theme, 'color', `--CHECKBOXGROUP-EVENTS-${event}-COLOR-PRIMARY`)}\n }\n\n .--CHECKBOXGROUP-helperText {\n ${getStyle(theme, 'color', `--CHECKBOXGROUP-EVENTS-${event}-COLOR-SECONDARY`)}\n }\n`;\n\nconst Style = (theme: Record<string, string>) => css`\n &.--CHECKBOXGROUP {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: fit-content;\n\n // ENABLED\n ${labelColor(theme, 'ENABLED')};\n\n // ERROR\n &.--CHECKBOXGROUP-error {\n ${labelColor(theme, 'ERROR')};\n }\n\n // DISABLED\n &.--CHECKBOXGROUP-disabled {\n ${labelColor(theme, 'DISABLED')};\n }\n\n .--CHECKBOXGROUP-items {\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n\n &.--CHECKBOXGROUP--horizontal .--CHECKBOXGROUP-items {\n flex-direction: row;\n flex-wrap: wrap;\n }\n\n .--CHECKBOXGROUP-label {\n // FONT\n font-family: ${theme['--FONTFAMILY-PRIMARY']};\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1;\n }\n\n .--CHECKBOXGROUP-helperText {\n // FONT\n font-family: ${theme['--FONTFAMILY-PRIMARY']};\n font-size: 13px;\n line-height: 16px;\n margin-left: 14px;\n }\n }\n`;\n\nexport default Style;\n","// Component Base\nimport emotion from './CheckboxGroup.emotion';\nimport type { CheckboxGroupProps } from './CheckboxGroup.interface';\nimport { CheckboxGroupContext } from './CheckboxGroup.context';\n// External Libraries\nimport { useController, type FieldValues, type FieldPath } from 'react-hook-form';\n\nconst CLASS = '--CHECKBOXGROUP';\n\n/**\n * CheckboxGroup manages a set of `<Checkbox>` children as a single RHF field.\n * The form value is `string[]` — the `value` props of every checked child.\n *\n * Validation (min, max, custom) is declared on the Zod schema:\n * ```ts\n * z.object({\n * options: z.array(z.string()).min(1, 'Select at least one').max(3, 'Select at most 3'),\n * })\n * ```\n *\n * @example\n * ```tsx\n * <CheckboxGroup name=\"options\" control={control} label=\"Skills\">\n * <Checkbox value=\"react\" label=\"React\" />\n * <Checkbox value=\"vue\" label=\"Vue\" />\n * </CheckboxGroup>\n * ```\n */\nconst CheckboxGroup = <TFieldValues extends FieldValues = FieldValues>({\n name,\n control,\n children,\n label,\n helperText,\n showErrorText = true,\n disabled,\n direction = 'vertical',\n style,\n className,\n}: CheckboxGroupProps<TFieldValues>) => {\n const { field, fieldState } = useController({ control, name: name as FieldPath<TFieldValues> });\n\n const checkedValues: string[] = Array.isArray(field.value) ? field.value : [];\n const errorText = fieldState.error;\n\n const onChange = (value: string, checked: boolean) => {\n const next = checked ? [...checkedValues, value] : checkedValues.filter(v => v !== value);\n field.onChange(next);\n field.onBlur();\n };\n\n return (\n <CheckboxGroupContext.Provider value={{ checkedValues, onChange, disabled, error: errorText }}>\n <div\n className={[\n CLASS,\n `${CLASS}--${direction}`,\n showErrorText && errorText?.message && `${CLASS}-error`,\n disabled && `${CLASS}-disabled`,\n className || '',\n ].join(' ')}\n css={emotion(style)}\n data-testid={CLASS}\n >\n {label && (\n <span className={`${CLASS}-label`} data-testid={`${CLASS}-label`}>\n {label}\n </span>\n )}\n\n <div className={`${CLASS}-items`} data-testid={`${CLASS}-items`}>\n {children}\n </div>\n\n <span className={`${CLASS}-helperText`} data-testid={`${CLASS}-helperText`}>\n {helperText && (!errorText || !showErrorText) && helperText}\n {showErrorText && errorText && errorText.message}\n </span>\n </div>\n </CheckboxGroupContext.Provider>\n );\n};\n\nexport default CheckboxGroup;\n","import { useCreateComponentStyles } from '@hocs/ThemeProvider/useThemeProvider.hook';\nimport { Component } from '@hocs/ThemeProvider/interfaces';\nimport type { CheckboxGroupStyleProps } from './CheckboxGroup.interface';\nimport type { FieldValues } from 'react-hook-form';\nimport CheckboxGroupBase from './CheckboxGroup';\n\nconst CheckboxGroup = <TFieldValues extends FieldValues = FieldValues>({\n theme,\n variant = 'default',\n ...rest\n}: CheckboxGroupStyleProps<TFieldValues>) => {\n const { componentStyles } = useCreateComponentStyles([Component.CHECKBOXGROUP], theme, variant.toUpperCase());\n\n return <CheckboxGroupBase {...rest} style={componentStyles} />;\n};\n\nexport default CheckboxGroup;\n","import { css } from '@emotion/react';\nimport { getStyle } from '@utilities/emotion/styles';\n\nconst Style = (theme: Record<string, string>) => css`\n &.--CHECKBOXTREE {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: fit-content;\n\n .--CHECKBOXTREE-children {\n display: flex;\n flex-direction: column;\n padding-left: 36px;\n gap: 16px;\n }\n\n .--CHECKBOXTREE-helperText {\n font-family: ${theme['--FONTFAMILY-PRIMARY']};\n font-size: 13px;\n line-height: 16px;\n margin-left: 14px;\n ${getStyle(theme, 'color', '--CHECKBOXTREE-EVENTS-ENABLED-COLOR-SECONDARY')}\n\n &:empty {\n display: none;\n }\n }\n\n &.--CHECKBOXTREE-error {\n .--CHECKBOXTREE-helperText {\n ${getStyle(theme, 'color', '--CHECKBOXTREE-EVENTS-ERROR-COLOR-SECONDARY')}\n }\n }\n\n &.--CHECKBOXTREE-disabled {\n .--CHECKBOXTREE-helperText {\n ${getStyle(theme, 'color', '--CHECKBOXTREE-EVENTS-DISABLED-COLOR-SECONDARY')}\n }\n }\n }\n`;\n\nexport default Style;\n","import React, { useRef, useEffect, useMemo } from 'react';\n// External Libraries\nimport { useController, type FieldValues, type FieldPath } from 'react-hook-form';\nimport Icon from '@components/atoms/Icon';\n// Component Base\nimport emotion from './CheckboxTree.emotion';\nimport type { CheckboxTreeProps } from './CheckboxTree.interface';\nimport Checkbox from '@components/atoms/Checkbox';\nimport { CheckboxTreeContext } from './CheckboxTree.context';\n\nconst CLASS = '--CHECKBOXTREE';\n\n/**\n * CheckboxTree renders a parent `<Checkbox>` that controls all of its `<Checkbox>` children.\n *\n * Parent states:\n * - **Checked** — all children are checked.\n * - **Unchecked** — no children are checked.\n * - **Indeterminate** — some (but not all) children are checked.\n *\n * The form value is `string[]` — the `value` props of every checked child.\n * Validation is declared on the Zod schema, the same way as CheckboxGroup.\n *\n * @example\n * ```tsx\n * <CheckboxTree name=\"options\" control={control} label=\"Select all\">\n * <Checkbox value=\"a\" label=\"Option A\" />\n * <Checkbox value=\"b\" label=\"Option B\" />\n * </CheckboxTree>\n * ```\n */\nconst CheckboxTree = <TFieldValues extends FieldValues = FieldValues>({\n name,\n control,\n children,\n label,\n iconChecked = <Icon name='check' />,\n iconIndeterminate = <Icon name='remove' />,\n helperText,\n showErrorText = true,\n disabled,\n style,\n className,\n}: CheckboxTreeProps<TFieldValues>) => {\n const { field, fieldState } = useController({ control, name: name as FieldPath<TFieldValues> });\n\n const checkedValues: string[] = Array.isArray(field.value) ? field.value : [];\n const errorText = fieldState.error;\n\n const childValues = useMemo(\n () =>\n React.Children.toArray(children)\n .map(child => {\n const el = child as React.ReactElement<{ value?: string; name?: string }>;\n return el.props?.value ?? el.props?.name ?? '';\n })\n .filter(Boolean),\n [children],\n );\n\n const allChecked = childValues.length > 0 && childValues.every(v => checkedValues.includes(v));\n const someChecked = !allChecked && childValues.some(v => checkedValues.includes(v));\n const rootRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const input = rootRef.current?.querySelectorAll<HTMLInputElement>('input[type=\"checkbox\"]')[0];\n if (input) input.indeterminate = someChecked;\n }, [someChecked]);\n\n const onParentChange = (checked: boolean) => {\n const next = checked ? [...childValues] : [];\n field.onChange(next);\n field.onBlur();\n };\n\n const onChange = (value: string, checked: boolean) => {\n const next = checked ? [...checkedValues, value] : checkedValues.filter(v => v !== value);\n field.onChange(next);\n field.onBlur();\n };\n\n return (\n <div\n ref={rootRef}\n className={[\n CLASS,\n showErrorText && errorText?.message ? `${CLASS}-error` : '',\n disabled ? `${CLASS}-disabled` : '',\n className || '',\n ].join(' ')}\n css={emotion(style)}\n data-testid={CLASS}\n >\n <Checkbox\n checked={allChecked || someChecked}\n onChecked={onParentChange}\n label={label}\n icon={someChecked ? iconIndeterminate : iconChecked}\n disabled={disabled}\n showErrorText={false}\n helperText={undefined}\n />\n\n <CheckboxTreeContext.Provider value={{ checkedValues, onChange, disabled, error: errorText }}>\n <div className={`${CLASS}-children`} data-testid={`${CLASS}-children`}>\n {children}\n </div>\n </CheckboxTreeContext.Provider>\n\n <span className={`${CLASS}-helperText`} data-testid={`${CLASS}-helperText`}>\n {helperText && (!errorText || !showErrorText) && helperText}\n {showErrorText && errorText && errorText.message}\n </span>\n </div>\n );\n};\n\nexport default CheckboxTree;\n","import { useCreateComponentStyles } from '@hocs/ThemeProvider/useThemeProvider.hook';\nimport { Component } from '@hocs/ThemeProvider/interfaces';\nimport type { CheckboxTreeStyleProps } from './CheckboxTree.interface';\nimport type { FieldValues } from 'react-hook-form';\nimport CheckboxTreeBase from './CheckboxTree';\n\nconst CheckboxTree = <TFieldValues extends FieldValues = FieldValues>({\n theme,\n variant = 'default',\n ...rest\n}: CheckboxTreeStyleProps<TFieldValues>) => {\n const { componentStyles } = useCreateComponentStyles([Component.CHECKBOXTREE], theme, variant.toUpperCase());\n\n return <CheckboxTreeBase {...rest} style={componentStyles} />;\n};\n\nexport default CheckboxTree;\n","import { css } from '@emotion/react';\nimport { getStyle } from '@utilities/emotion/styles';\n\nconst labelColor = (theme: Record<string, string>, event: string): string => `\n .--RADIOGROUP-label {\n ${getStyle(theme, 'color', `--RADIOGROUP-EVENTS-${event}-COLOR-PRIMARY`)}\n }\n\n .--RADIOGROUP-helperText {\n ${getStyle(theme, 'color', `--RADIOGROUP-EVENTS-${event}-COLOR-SECONDARY`)}\n }\n`;\n\nconst Style = (theme: Record<string, string>) => css`\n &.--RADIOGROUP {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: fit-content;\n\n // ENABLED\n ${labelColor(theme, 'ENABLED')};\n\n // ERROR\n &.--RADIOGROUP-error {\n ${labelColor(theme, 'ERROR')};\n }\n\n // DISABLED\n &.--RADIOGROUP-disabled {\n ${labelColor(theme, 'DISABLED')};\n }\n\n .--RADIOGROUP-items {\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n\n &.--RADIOGROUP--horizontal .--RADIOGROUP-items {\n flex-direction: row;\n flex-wrap: wrap;\n }\n\n .--RADIOGROUP-label {\n // FONT\n font-family: ${theme['--FONTFAMILY-PRIMARY']};\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1;\n }\n\n .--RADIOGROUP-helperText {\n // FONT\n font-family: ${theme['--FONTFAMILY-PRIMARY']};\n font-size: 13px;\n line-height: 16px;\n margin-left: 14px;\n }\n }\n`;\n\nexport default Style;\n","// Component Base\nimport React from 'react';\nimport emotion from './RadioGroup.emotion';\nimport type { RadioGroupProps } from './RadioGroup.interface';\nimport { RadioGroupContext } from '@components/atoms/Radio/RadioGroup.context';\n// External Libraries\nimport { useController, type FieldValues, type FieldPath } from 'react-hook-form';\n\nconst CLASS = '--RADIOGROUP';\n\n/**\n * RadioGroup manages a set of `<Radio>` children as a single RHF field.\n * The form value is a `string` — the `value` prop of the selected Radio.\n *\n * Provides a `RadioGroupContext` that every child `<Radio>` reads its selected state from.\n * Rendering a `<Radio>` outside a RadioGroup throws an error.\n *\n * @example\n * ```tsx\n * <RadioGroup name=\"option\" control={control} label=\"Pick one\">\n * <Radio value=\"a\" label=\"Option A\" />\n * <Radio value=\"b\" label=\"Option B\" />\n * </RadioGroup>\n * ```\n */\nconst RadioGroup = <TFieldValues extends FieldValues = FieldValues>({\n name,\n control,\n children,\n label,\n helperText,\n showErrorText = true,\n disabled,\n direction = 'vertical',\n style,\n className,\n}: RadioGroupProps<TFieldValues>) => {\n const { field, fieldState } = useController({ control, name: name as FieldPath<TFieldValues> });\n\n const selectedValue: string = typeof field.value === 'string' ? field.value : '';\n const errorText = fieldState.error;\n\n const onChange = (value: string) => {\n field.onChange(value);\n field.onBlur();\n };\n\n const firstValue =\n (\n React.Children.toArray(children).find(\n (child): child is React.ReactElement<{ value?: string; disabled?: boolean }> =>\n React.isValidElement<{ value?: string; disabled?: boolean }>(child) && !child.props.disabled,\n ) as React.ReactElement<{ value?: string }> | undefined\n )?.props.value ?? '';\n\n return (\n <RadioGroupContext.Provider value={{ name, selectedValue, onChange, disabled, error: errorText, firstValue }}>\n <div\n className={[\n CLASS,\n `${CLASS}--${direction}`,\n showErrorText && errorText?.message && `${CLASS}-error`,\n disabled && `${CLASS}-disabled`,\n className || '',\n ].join(' ')}\n css={emotion(style)}\n data-testid={CLASS}\n >\n {label && (\n <span className={`${CLASS}-label`} data-testid={`${CLASS}-label`}>\n {label}\n </span>\n )}\n\n <div className={`${CLASS}-items`} data-testid={`${CLASS}-items`}>\n {children}\n </div>\n\n <span className={`${CLASS}-helperText`} data-testid={`${CLASS}-helperText`}>\n {helperText && (!errorText || !showErrorText) && helperText}\n {showErrorText && errorText && errorText.message}\n </span>\n </div>\n </RadioGroupContext.Provider>\n );\n};\n\nexport default RadioGroup;\n","import { useCreateComponentStyles } from '@hocs/ThemeProvider/useThemeProvider.hook';\nimport { Component } from '@hocs/ThemeProvider/interfaces';\nimport type { RadioGroupStyleProps } from './RadioGroup.interface';\nimport type { FieldValues } from 'react-hook-form';\nimport RadioGroupBase from './RadioGroup';\n\nconst RadioGroup = <TFieldValues extends FieldValues = FieldValues>({\n theme,\n variant = 'default',\n ...rest\n}: RadioGroupStyleProps<TFieldValues>) => {\n const { componentStyles } = useCreateComponentStyles([Component.RADIOGROUP], theme, variant.toUpperCase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M;KAAS,eAAa,GAAG,EAAM;eACtD;KACI,CAAA;IAGT,kBAAC,OAAD;KAAK,WAAW,GAAG,EAAM;KAAS,eAAa,GAAG,EAAM;KACrD;KACG,CAAA;IAEN,kBAAC,QAAD;KAAM,WAAW,GAAG,EAAM;KAAc,eAAa,GAAG,EAAM;eAA9D,CACG,MAAe,CAAC,KAAa,CAAC,MAAkB,GAChD,KAAiB,KAAa,EAAU,QACpC;;IACH;;EACqB,CAAA;GC7E3B,KAA8D,EAClE,UACA,aAAU,WACV,GAAG,QACqC;CACxC,IAAM,EAAE,uBAAoB,EAAyB,CAAC,EAAU,WAAW,EAAE,GAAO,EAAQ,aAAa,CAAC;CAE1G,OAAO,kBAAC,GAAD;EAAgB,GAAI;EAAM,OAAO;EAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"RadioGroup-BdWsLUz-.js","names":[],"sources":["../src/components/molecules/CheckboxGroup/CheckboxGroup.emotion.ts","../src/components/molecules/CheckboxGroup/CheckboxGroup.tsx","../src/components/molecules/CheckboxGroup/index.tsx","../src/components/molecules/CheckboxTree/CheckboxTree.emotion.ts","../src/components/molecules/CheckboxTree/CheckboxTree.tsx","../src/components/molecules/CheckboxTree/index.tsx","../src/components/molecules/RadioGroup/RadioGroup.emotion.ts","../src/components/molecules/RadioGroup/RadioGroup.tsx","../src/components/molecules/RadioGroup/index.tsx"],"sourcesContent":["import { css } from '@emotion/react';\nimport { getStyle } from '@utilities/emotion/styles';\n\nconst labelColor = (theme: Record<string, string>, event: string): string => `\n .--CHECKBOXGROUP-label {\n ${getStyle(theme, 'color', `--CHECKBOXGROUP-EVENTS-${event}-COLOR-PRIMARY`)}\n }\n\n .--CHECKBOXGROUP-helperText {\n ${getStyle(theme, 'color', `--CHECKBOXGROUP-EVENTS-${event}-COLOR-SECONDARY`)}\n }\n`;\n\nconst Style = (theme: Record<string, string>) => css`\n &.--CHECKBOXGROUP {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: fit-content;\n\n // ENABLED\n ${labelColor(theme, 'ENABLED')};\n\n // ERROR\n &.--CHECKBOXGROUP-error {\n ${labelColor(theme, 'ERROR')};\n }\n\n // DISABLED\n &.--CHECKBOXGROUP-disabled {\n ${labelColor(theme, 'DISABLED')};\n }\n\n .--CHECKBOXGROUP-items {\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n\n &.--CHECKBOXGROUP--horizontal .--CHECKBOXGROUP-items {\n flex-direction: row;\n flex-wrap: wrap;\n }\n\n .--CHECKBOXGROUP-label {\n // FONT\n font-family: ${theme['--FONTFAMILY-PRIMARY']};\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1;\n }\n\n .--CHECKBOXGROUP-helperText {\n // FONT\n font-family: ${theme['--FONTFAMILY-PRIMARY']};\n font-size: 13px;\n line-height: 16px;\n margin-left: 14px;\n }\n }\n`;\n\nexport default Style;\n","// Component Base\nimport emotion from './CheckboxGroup.emotion';\nimport type { CheckboxGroupProps } from './CheckboxGroup.interface';\nimport { CheckboxGroupContext } from './CheckboxGroup.context';\n// External Libraries\nimport { useController, type FieldValues, type FieldPath } from 'react-hook-form';\n\nconst CLASS = '--CHECKBOXGROUP';\n\n/**\n * CheckboxGroup manages a set of `<Checkbox>` children as a single RHF field.\n * The form value is `string[]` — the `value` props of every checked child.\n *\n * Validation (min, max, custom) is declared on the Zod schema:\n * ```ts\n * z.object({\n * options: z.array(z.string()).min(1, 'Select at least one').max(3, 'Select at most 3'),\n * })\n * ```\n *\n * @example\n * ```tsx\n * <CheckboxGroup name=\"options\" control={control} label=\"Skills\">\n * <Checkbox value=\"react\" label=\"React\" />\n * <Checkbox value=\"vue\" label=\"Vue\" />\n * </CheckboxGroup>\n * ```\n */\nconst CheckboxGroup = <TFieldValues extends FieldValues = FieldValues>({\n name,\n control,\n children,\n label,\n helperText,\n showErrorText = true,\n disabled,\n direction = 'vertical',\n style,\n className,\n}: CheckboxGroupProps<TFieldValues>) => {\n const { field, fieldState } = useController({ control, name: name as FieldPath<TFieldValues> });\n\n const checkedValues: string[] = Array.isArray(field.value) ? field.value : [];\n const errorText = fieldState.error;\n\n const onChange = (value: string, checked: boolean) => {\n const next = checked ? [...checkedValues, value] : checkedValues.filter(v => v !== value);\n field.onChange(next);\n field.onBlur();\n };\n\n return (\n <CheckboxGroupContext.Provider value={{ checkedValues, onChange, disabled, error: errorText }}>\n <div\n className={[\n CLASS,\n `${CLASS}--${direction}`,\n showErrorText && errorText?.message && `${CLASS}-error`,\n disabled && `${CLASS}-disabled`,\n className || '',\n ].join(' ')}\n css={emotion(style)}\n data-testid={CLASS}\n >\n {label && (\n <span className={`${CLASS}-label`} data-testid={`${CLASS}-label`}>\n {label}\n </span>\n )}\n\n <div className={`${CLASS}-items`} data-testid={`${CLASS}-items`}>\n {children}\n </div>\n\n <span className={`${CLASS}-helperText`} data-testid={`${CLASS}-helperText`}>\n {helperText && (!errorText || !showErrorText) && helperText}\n {showErrorText && errorText && errorText.message}\n </span>\n </div>\n </CheckboxGroupContext.Provider>\n );\n};\n\nexport default CheckboxGroup;\n","import { useCreateComponentStyles } from '@hocs/ThemeProvider/useThemeProvider.hook';\nimport { Component } from '@hocs/ThemeProvider/interfaces';\nimport type { CheckboxGroupStyleProps } from './CheckboxGroup.interface';\nimport type { FieldValues } from 'react-hook-form';\nimport CheckboxGroupBase from './CheckboxGroup';\n\nconst CheckboxGroup = <TFieldValues extends FieldValues = FieldValues>({\n theme,\n variant = 'default',\n ...rest\n}: CheckboxGroupStyleProps<TFieldValues>) => {\n const { componentStyles } = useCreateComponentStyles([Component.CHECKBOXGROUP], theme, variant.toUpperCase());\n\n return <CheckboxGroupBase {...rest} style={componentStyles} />;\n};\n\nexport default CheckboxGroup;\n","import { css } from '@emotion/react';\nimport { getStyle } from '@utilities/emotion/styles';\n\nconst Style = (theme: Record<string, string>) => css`\n &.--CHECKBOXTREE {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: fit-content;\n\n .--CHECKBOXTREE-children {\n display: flex;\n flex-direction: column;\n padding-left: 36px;\n gap: 16px;\n }\n\n .--CHECKBOXTREE-helperText {\n font-family: ${theme['--FONTFAMILY-PRIMARY']};\n font-size: 13px;\n line-height: 16px;\n margin-left: 14px;\n ${getStyle(theme, 'color', '--CHECKBOXTREE-EVENTS-ENABLED-COLOR-SECONDARY')}\n\n &:empty {\n display: none;\n }\n }\n\n &.--CHECKBOXTREE-error {\n .--CHECKBOXTREE-helperText {\n ${getStyle(theme, 'color', '--CHECKBOXTREE-EVENTS-ERROR-COLOR-SECONDARY')}\n }\n }\n\n &.--CHECKBOXTREE-disabled {\n .--CHECKBOXTREE-helperText {\n ${getStyle(theme, 'color', '--CHECKBOXTREE-EVENTS-DISABLED-COLOR-SECONDARY')}\n }\n }\n }\n`;\n\nexport default Style;\n","import React, { useRef, useEffect, useMemo } from 'react';\n// External Libraries\nimport { useController, type FieldValues, type FieldPath } from 'react-hook-form';\nimport Icon from '@components/atoms/Icon';\n// Component Base\nimport emotion from './CheckboxTree.emotion';\nimport type { CheckboxTreeProps } from './CheckboxTree.interface';\nimport Checkbox from '@components/atoms/Checkbox';\nimport { CheckboxTreeContext } from './CheckboxTree.context';\n\nconst CLASS = '--CHECKBOXTREE';\n\n/**\n * CheckboxTree renders a parent `<Checkbox>` that controls all of its `<Checkbox>` children.\n *\n * Parent states:\n * - **Checked** — all children are checked.\n * - **Unchecked** — no children are checked.\n * - **Indeterminate** — some (but not all) children are checked.\n *\n * The form value is `string[]` — the `value` props of every checked child.\n * Validation is declared on the Zod schema, the same way as CheckboxGroup.\n *\n * @example\n * ```tsx\n * <CheckboxTree name=\"options\" control={control} label=\"Select all\">\n * <Checkbox value=\"a\" label=\"Option A\" />\n * <Checkbox value=\"b\" label=\"Option B\" />\n * </CheckboxTree>\n * ```\n */\nconst CheckboxTree = <TFieldValues extends FieldValues = FieldValues>({\n name,\n control,\n children,\n label,\n iconChecked = <Icon name='check' />,\n iconIndeterminate = <Icon name='remove' />,\n helperText,\n showErrorText = true,\n disabled,\n style,\n className,\n}: CheckboxTreeProps<TFieldValues>) => {\n const { field, fieldState } = useController({ control, name: name as FieldPath<TFieldValues> });\n\n const checkedValues: string[] = Array.isArray(field.value) ? field.value : [];\n const errorText = fieldState.error;\n\n const childValues = useMemo(\n () =>\n React.Children.toArray(children)\n .map(child => {\n const el = child as React.ReactElement<{ value?: string; name?: string }>;\n return el.props?.value ?? el.props?.name ?? '';\n })\n .filter(Boolean),\n [children],\n );\n\n const allChecked = childValues.length > 0 && childValues.every(v => checkedValues.includes(v));\n const someChecked = !allChecked && childValues.some(v => checkedValues.includes(v));\n const rootRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const input = rootRef.current?.querySelectorAll<HTMLInputElement>('input[type=\"checkbox\"]')[0];\n if (input) input.indeterminate = someChecked;\n }, [someChecked]);\n\n const onParentChange = (checked: boolean) => {\n const next = checked ? [...childValues] : [];\n field.onChange(next);\n field.onBlur();\n };\n\n const onChange = (value: string, checked: boolean) => {\n const next = checked ? [...checkedValues, value] : checkedValues.filter(v => v !== value);\n field.onChange(next);\n field.onBlur();\n };\n\n return (\n <div\n ref={rootRef}\n className={[\n CLASS,\n showErrorText && errorText?.message ? `${CLASS}-error` : '',\n disabled ? `${CLASS}-disabled` : '',\n className || '',\n ].join(' ')}\n css={emotion(style)}\n data-testid={CLASS}\n >\n <Checkbox\n checked={allChecked || someChecked}\n onChecked={onParentChange}\n label={label}\n icon={someChecked ? iconIndeterminate : iconChecked}\n disabled={disabled}\n showErrorText={false}\n helperText={undefined}\n />\n\n <CheckboxTreeContext.Provider value={{ checkedValues, onChange, disabled, error: errorText }}>\n <div className={`${CLASS}-children`} data-testid={`${CLASS}-children`}>\n {children}\n </div>\n </CheckboxTreeContext.Provider>\n\n <span className={`${CLASS}-helperText`} data-testid={`${CLASS}-helperText`}>\n {helperText && (!errorText || !showErrorText) && helperText}\n {showErrorText && errorText && errorText.message}\n </span>\n </div>\n );\n};\n\nexport default CheckboxTree;\n","import { useCreateComponentStyles } from '@hocs/ThemeProvider/useThemeProvider.hook';\nimport { Component } from '@hocs/ThemeProvider/interfaces';\nimport type { CheckboxTreeStyleProps } from './CheckboxTree.interface';\nimport type { FieldValues } from 'react-hook-form';\nimport CheckboxTreeBase from './CheckboxTree';\n\nconst CheckboxTree = <TFieldValues extends FieldValues = FieldValues>({\n theme,\n variant = 'default',\n ...rest\n}: CheckboxTreeStyleProps<TFieldValues>) => {\n const { componentStyles } = useCreateComponentStyles([Component.CHECKBOXTREE], theme, variant.toUpperCase());\n\n return <CheckboxTreeBase {...rest} style={componentStyles} />;\n};\n\nexport default CheckboxTree;\n","import { css } from '@emotion/react';\nimport { getStyle } from '@utilities/emotion/styles';\n\nconst labelColor = (theme: Record<string, string>, event: string): string => `\n .--RADIOGROUP-label {\n ${getStyle(theme, 'color', `--RADIOGROUP-EVENTS-${event}-COLOR-PRIMARY`)}\n }\n\n .--RADIOGROUP-helperText {\n ${getStyle(theme, 'color', `--RADIOGROUP-EVENTS-${event}-COLOR-SECONDARY`)}\n }\n`;\n\nconst Style = (theme: Record<string, string>) => css`\n &.--RADIOGROUP {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: fit-content;\n\n // ENABLED\n ${labelColor(theme, 'ENABLED')};\n\n // ERROR\n &.--RADIOGROUP-error {\n ${labelColor(theme, 'ERROR')};\n }\n\n // DISABLED\n &.--RADIOGROUP-disabled {\n ${labelColor(theme, 'DISABLED')};\n }\n\n .--RADIOGROUP-items {\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n\n &.--RADIOGROUP--horizontal .--RADIOGROUP-items {\n flex-direction: row;\n flex-wrap: wrap;\n }\n\n .--RADIOGROUP-label {\n // FONT\n font-family: ${theme['--FONTFAMILY-PRIMARY']};\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1;\n }\n\n .--RADIOGROUP-helperText {\n // FONT\n font-family: ${theme['--FONTFAMILY-PRIMARY']};\n font-size: 13px;\n line-height: 16px;\n margin-left: 14px;\n }\n }\n`;\n\nexport default Style;\n","// Component Base\nimport React from 'react';\nimport emotion from './RadioGroup.emotion';\nimport type { RadioGroupProps } from './RadioGroup.interface';\nimport { RadioGroupContext } from '@components/atoms/Radio/RadioGroup.context';\n// External Libraries\nimport { useController, type FieldValues, type FieldPath } from 'react-hook-form';\n\nconst CLASS = '--RADIOGROUP';\n\n/**\n * RadioGroup manages a set of `<Radio>` children as a single RHF field.\n * The form value is a `string` — the `value` prop of the selected Radio.\n *\n * Provides a `RadioGroupContext` that every child `<Radio>` reads its selected state from.\n * Rendering a `<Radio>` outside a RadioGroup throws an error.\n *\n * @example\n * ```tsx\n * <RadioGroup name=\"option\" control={control} label=\"Pick one\">\n * <Radio value=\"a\" label=\"Option A\" />\n * <Radio value=\"b\" label=\"Option B\" />\n * </RadioGroup>\n * ```\n */\nconst RadioGroup = <TFieldValues extends FieldValues = FieldValues>({\n name,\n control,\n children,\n label,\n helperText,\n showErrorText = true,\n disabled,\n direction = 'vertical',\n style,\n className,\n}: RadioGroupProps<TFieldValues>) => {\n const { field, fieldState } = useController({ control, name: name as FieldPath<TFieldValues> });\n\n const selectedValue: string = typeof field.value === 'string' ? field.value : '';\n const errorText = fieldState.error;\n\n const onChange = (value: string) => {\n field.onChange(value);\n field.onBlur();\n };\n\n const firstValue =\n (\n React.Children.toArray(children).find(\n (child): child is React.ReactElement<{ value?: string; disabled?: boolean }> =>\n React.isValidElement<{ value?: string; disabled?: boolean }>(child) && !child.props.disabled,\n ) as React.ReactElement<{ value?: string }> | undefined\n )?.props.value ?? '';\n\n return (\n <RadioGroupContext.Provider value={{ name, selectedValue, onChange, disabled, error: errorText, firstValue }}>\n <div\n className={[\n CLASS,\n `${CLASS}--${direction}`,\n showErrorText && errorText?.message && `${CLASS}-error`,\n disabled && `${CLASS}-disabled`,\n className || '',\n ].join(' ')}\n css={emotion(style)}\n data-testid={CLASS}\n >\n {label && (\n <span className={`${CLASS}-label`} data-testid={`${CLASS}-label`}>\n {label}\n </span>\n )}\n\n <div className={`${CLASS}-items`} data-testid={`${CLASS}-items`}>\n {children}\n </div>\n\n <span className={`${CLASS}-helperText`} data-testid={`${CLASS}-helperText`}>\n {helperText && (!errorText || !showErrorText) && helperText}\n {showErrorText && errorText && errorText.message}\n </span>\n </div>\n </RadioGroupContext.Provider>\n );\n};\n\nexport default RadioGroup;\n","import { useCreateComponentStyles } from '@hocs/ThemeProvider/useThemeProvider.hook';\nimport { Component } from '@hocs/ThemeProvider/interfaces';\nimport type { RadioGroupStyleProps } from './RadioGroup.interface';\nimport type { FieldValues } from 'react-hook-form';\nimport RadioGroupBase from './RadioGroup';\n\nconst RadioGroup = <TFieldValues extends FieldValues = FieldValues>({\n theme,\n variant = 'default',\n ...rest\n}: RadioGroupStyleProps<TFieldValues>) => {\n const { componentStyles } = useCreateComponentStyles([Component.RADIOGROUP], theme, variant.toUpperCase());\n\n return <RadioGroupBase {...rest} style={componentStyles} />;\n};\n\nexport default RadioGroup;\n"],"mappings":";;;;;;;AAGA,IAAM,KAAc,GAA+B,MAA0B;;MAEvE,EAAS,GAAO,SAAS,0BAA0B,EAAM,gBAAgB,CAAC;;;;MAI1E,EAAS,GAAO,SAAS,0BAA0B,EAAM,kBAAkB,CAAC;;GAI5E,KAAS,MAAkC,CAAG;;;;;;;;MAQ9C,EAAW,GAAO,UAAU,CAAC;;;;QAI3B,EAAW,GAAO,QAAQ,CAAC;;;;;QAK3B,EAAW,GAAO,WAAW,CAAC;;;;;;;;;;;;;;;;qBAgBjB,EAAM,wBAAwB;;;;;;;;qBAQ9B,EAAM,wBAAwB;;;;;;GC/C7C,IAAQ,mBAqBR,KAAiE,EACrE,SACA,YACA,aACA,UACA,eACA,mBAAgB,IAChB,aACA,eAAY,YACZ,UACA,mBACsC;CACtC,IAAM,EAAE,UAAO,kBAAe,EAAc;EAAE;EAAe;EAAiC,CAAC,EAEzF,IAA0B,MAAM,QAAQ,EAAM,MAAM,GAAG,EAAM,QAAQ,EAAE,EACvE,IAAY,EAAW;CAQ7B,OACE,kBAAC,EAAqB,U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AkB;EAElC,AADA,EAAM,SAAS,EAAM,EACrB,EAAM,QAAQ;IAGV,IAEF,EAAM,SAAS,QAAQ,EAAS,CAAC,MAC9B,MACC,EAAM,eAAuD,EAAM,IAAI,CAAC,EAAM,MAAM,SACvF,EACA,MAAM,SAAS;CAEpB,OACE,kBAAC,EAAkB,UAAnB;EAA4B,OAAO;GAAE;GAAM;GAAe;GAAU;GAAU,OAAO;GAAW;GAAY;YAC1G,kBAAC,OAAD;GACE,WAAW;IACT;IACA,GAAG,EAAM,IAAI;IACb,KAAiB,GAAW,WAAW,GAAG,EAAM;IAChD,KAAY,GAAG,EAAM;IACrB,KAAa;IACd,CAAC,KAAK,IAAI;GACX,KAAK,EAAQ,EAAM;GACnB,eAAa;aATf;IAWG,KACC,kBAAC,QAAD;KAAM,WAAW,GAAG,EAAM;KAAS,eAAa,GAAG,EAAM;eACtD;KACI,CAAA;IAGT,kBAAC,OAAD;KAAK,WAAW,GAAG,EAAM;KAAS,eAAa,GAAG,EAAM;KACrD;KACG,CAAA;IAEN,kBAAC,QAAD;KAAM,WAAW,GAAG,EAAM;KAAc,eAAa,GAAG,EAAM;eAA9D,CACG,MAAe,CAAC,KAAa,CAAC,MAAkB,GAChD,KAAiB,KAAa,EAAU,QACpC;;IACH;;EACqB,CAAA;GC7E3B,KAA8D,EAClE,UACA,aAAU,WACV,GAAG,QACqC;CACxC,IAAM,EAAE,uBAAoB,EAAyB,CAAC,EAAU,WAAW,EAAE,GAAO,EAAQ,aAAa,CAAC;CAE1G,OAAO,kBAAC,GAAD;EAAgB,GAAI;EAAM,OAAO;EAAmB,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { i as e, n as t, r as n } from "./emotion-react-jsx-runtime.browser.esm-
|
|
2
|
-
import { r } from "./theme-
|
|
1
|
+
import { i as e, n as t, r as n } from "./emotion-react-jsx-runtime.browser.esm-Ch-DwUYg.js";
|
|
2
|
+
import { r } from "./theme-D01EcUA9.js";
|
|
3
3
|
import i, { createContext as a, useContext as o, useState as s } from "react";
|
|
4
4
|
import { css as c } from "@emotion/react";
|
|
5
5
|
import { useController as l } from "react-hook-form";
|
|
6
6
|
//#region src/hocs/ThemeProvider/interfaces/Components.interface.ts
|
|
7
7
|
var u = /* @__PURE__ */ function(e) {
|
|
8
|
-
return e.BUTTON = "BUTTON", e.ICONBUTTON = "ICONBUTTON", e.
|
|
8
|
+
return e.BUTTON = "BUTTON", e.ICONBUTTON = "ICONBUTTON", e.TEXTFIELD = "TEXTFIELD", e.NUMBERFIELD = "NUMBERFIELD", e.CHECKBOX = "CHECKBOX", e.RADIO = "RADIO", e.SELECT = "SELECT", e.SELECTMENU = "SELECTMENU", e.SWITCH = "SWITCH", e.SLIDER = "SLIDER", e.DATEPICKER = "DATEPICKER", e.DATEPICKERMENU = "DATEPICKERMENU", e.PAGINATION = "PAGINATION", e.PAGINATIONMENU = "PAGINATIONMENU", e.CHECKBOXGROUP = "CHECKBOXGROUP", e.CHECKBOXTREE = "CHECKBOXTREE", e.RADIOGROUP = "RADIOGROUP", e.MODAL = "MODAL", e.DATAGRID = "DATAGRID", e.DATAGRIDMENU = "DATAGRIDMENU", e;
|
|
9
9
|
}({}), d = () => c`
|
|
10
10
|
&.--ICON {
|
|
11
11
|
font-family: 'Material Symbols Rounded';
|
|
@@ -442,4 +442,4 @@ var T = ({ name: e, control: n, ...r }) => {
|
|
|
442
442
|
//#endregion
|
|
443
443
|
export { p as a, x as i, D as n, u as o, S as r, O as t };
|
|
444
444
|
|
|
445
|
-
//# sourceMappingURL=RadioGroup.context-
|
|
445
|
+
//# sourceMappingURL=RadioGroup.context-BBa8PDLt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.context-BBa8PDLt.js","names":[],"sources":["../src/hocs/ThemeProvider/interfaces/Components.interface.ts","../src/components/atoms/Icon/Icon.emotion.ts","../src/components/atoms/Icon/Icon.tsx","../src/components/atoms/Checkbox/Checkbox.emotion.ts","../src/components/molecules/CheckboxGroup/CheckboxGroup.context.ts","../src/components/molecules/CheckboxTree/CheckboxTree.context.ts","../src/components/atoms/Checkbox/Checkbox.tsx","../src/components/atoms/Checkbox/index.tsx","../src/components/atoms/Radio/RadioGroup.context.ts"],"sourcesContent":["export enum Component {\n // atoms\n BUTTON = 'BUTTON',\n ICONBUTTON = 'ICONBUTTON',\n TEXTFIELD = 'TEXTFIELD',\n NUMBERFIELD = 'NUMBERFIELD',\n CHECKBOX = 'CHECKBOX',\n RADIO = 'RADIO',\n SELECT = 'SELECT',\n SELECTMENU = 'SELECTMENU',\n SWITCH = 'SWITCH',\n SLIDER = 'SLIDER',\n DATEPICKER = 'DATEPICKER',\n DATEPICKERMENU = 'DATEPICKERMENU',\n PAGINATION = 'PAGINATION',\n PAGINATIONMENU = 'PAGINATIONMENU',\n\n // molecules\n CHECKBOXGROUP = 'CHECKBOXGROUP',\n CHECKBOXTREE = 'CHECKBOXTREE',\n RADIOGROUP = 'RADIOGROUP',\n MODAL = 'MODAL',\n\n // organisms\n DATAGRID = 'DATAGRID',\n DATAGRIDMENU = 'DATAGRIDMENU',\n}\n","import { css } from '@emotion/react';\n\nconst Style = () => css`\n &.--ICON {\n font-family: 'Material Symbols Rounded';\n font-weight: normal;\n font-style: normal;\n font-size: 20px;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n font-variation-settings:\n 'FILL' 0,\n 'wght' 400,\n 'GRAD' 0,\n 'opsz' 24;\n user-select: none;\n vertical-align: middle;\n\n &.--ICON-fill {\n font-variation-settings:\n 'FILL' 1,\n 'wght' 500,\n 'GRAD' 0,\n 'opsz' 24;\n }\n\n &.--ICON-sm {\n font-size: 18px;\n }\n &.--ICON-lg {\n font-size: 24px;\n }\n &.--ICON-xl {\n font-size: 36px;\n }\n }\n`;\n\nexport default Style;\n","// Component Base\nimport type { FC } from 'react';\nimport emotion from './Icon.emotion';\nimport type { IconProps } from './Icon.interface';\n\nconst CLASS = '--ICON';\n\n/**\n * Renders a single Material Symbols Rounded icon using font ligatures.\n *\n * Pass the ligature name as `name` (e.g. `'home'`, `'search'`, `'close'`).\n * The icon font is loaded once by `ThemeProvider` — no extra requests per icon.\n */\nconst Icon: FC<IconProps> = ({ name, fill = false, size = 'md', className, style }) => {\n return (\n <span\n className={[CLASS, fill && `${CLASS}-fill`, size !== 'md' && `${CLASS}-${size}`, className]\n .filter(Boolean)\n .join(' ')}\n css={emotion()}\n style={style}\n aria-hidden='true'\n data-testid={CLASS}\n >\n {name}\n </span>\n );\n};\n\nexport default Icon;\n","import { css } from '@emotion/react';\nimport { getStyle } from '@utilities/emotion/styles';\n\nconst background = (theme: Record<string, string>, event: string): string => `\n // BACKGROUNDS \n ${getStyle(theme, 'background-color', `--CHECKBOX-EVENTS-${event}-BACKGROUND-COLOR`)}\n`;\n\nconst border = (theme: Record<string, string>, event: string): string => `\n // BORDERS\n ${getStyle(theme, 'border-color', `--CHECKBOX-EVENTS-${event}-BORDER-COLOR`)}\n ${getStyle(theme, 'border-width', `--CHECKBOX-EVENTS-${event}-BORDER-WIDTH`)}\n ${getStyle(theme, 'border-style', `--CHECKBOX-EVENTS-${event}-BORDER-STYLE`)}\n`;\n\nconst outline = (theme: Record<string, string>, event: string): string => ` \n // OUTLINE\n ${getStyle(theme, 'outline-color', `--CHECKBOX-EVENTS-${event}-OUTLINE-COLOR`)}\n ${getStyle(theme, 'outline-width', `--CHECKBOX-EVENTS-${event}-OUTLINE-WIDTH`)}\n ${getStyle(theme, 'outline-style', `--CHECKBOX-EVENTS-${event}-OUTLINE-STYLE`)}\n ${getStyle(theme, 'outline-offset', `--CHECKBOX-EVENTS-${event}-OUTLINE-OFFSET`)}\n`;\n\nconst shadow = (theme: Record<string, string>, event: string): string => ` \n // SHADOW\n ${getStyle(theme, 'background-color', `--CHECKBOX-EVENTS-${event}-SHADOW-COLOR`)}\n`;\n\nconst icon = (theme: Record<string, string>, event: string): string => `\n // UTILS\n > span {\n ${getStyle(theme, 'color', `--CHECKBOX-EVENTS-${event}-ICON-COLOR`)};\n }\n`;\n\nconst label = (theme: Record<string, string>, event: string): string => `\n // TYPOGRAPHY\n .--CHECKBOX-label {\n ${getStyle(theme, 'color', `--CHECKBOX-EVENTS-${event}-COLOR-PRIMARY`)}\n }\n\n ~ .--CHECKBOX-helperText {\n ${getStyle(theme, 'color', `--CHECKBOX-EVENTS-${event}-COLOR-SECONDARY`)}\n }\n`;\n\nconst Style = (theme: Record<string, string>) => css`\n &.--CHECKBOX {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: fit-content;\n\n .--CHECKBOX-container {\n display: flex;\n flex-direction: row;\n gap: 12px;\n align-items: center;\n cursor: pointer;\n\n // ENABLED\n ${label(theme, 'ENABLED')};\n\n // VALUE\n &:has(.--CHECKBOX-inputField:checked) {\n ${label(theme, 'VALUE')};\n }\n\n // HOVER\n &:hover {\n ${label(theme, 'HOVER')};\n\n .--CHECKBOX-checkbox .--CHECKBOX-span {\n &:before {\n opacity: 1;\n ${shadow(theme, 'HOVER')};\n }\n }\n }\n\n // ACTIVE\n &:has(.--CHECKBOX-inputField.--CHECKBOX-active, .--CHECKBOX-inputField:active) {\n ${label(theme, 'ACTIVE')};\n }\n\n // FOCUS-VISIBLE\n &:has(.--CHECKBOX-inputField:focus-visible) {\n ${label(theme, 'FOCUS')};\n }\n\n // ERROR\n &:has(.--CHECKBOX-inputField.--CHECKBOX-error) {\n ${label(theme, 'ERROR')};\n }\n\n // ERROR + VALUE\n &:has(.--CHECKBOX-inputField.--CHECKBOX-error:checked) {\n ${label(theme, 'ERROR_VALUE')};\n }\n\n // ERROR + HOVER\n &:hover:has(.--CHECKBOX-inputField.--CHECKBOX-error) {\n ${label(theme, 'ERROR_HOVER')};\n\n .--CHECKBOX-checkbox .--CHECKBOX-span {\n &:before {\n opacity: 1;\n ${shadow(theme, 'ERROR_HOVER')};\n }\n }\n }\n\n // ERROR + ACTIVE\n &:has(.--CHECKBOX-inputField.--CHECKBOX-error:active),\n &:has(.--CHECKBOX-inputField.--CHECKBOX-error.--CHECKBOX-active) {\n ${label(theme, 'ERROR_ACTIVE')};\n }\n\n // ERROR + FOCUS\n &:has(.--CHECKBOX-inputField.--CHECKBOX-error:focus-visible) {\n ${label(theme, 'ERROR_FOCUS')};\n }\n\n // DISABLED\n &:has(.--CHECKBOX-inputField:disabled) {\n pointer-events: none;\n ${label(theme, 'DISABLED')};\n }\n\n // DISABLED + VALUE\n &:has(.--CHECKBOX-inputField:disabled:checked) {\n ${label(theme, 'DISABLED_VALUE')};\n }\n\n .--CHECKBOX-checkbox {\n position: relative;\n display: inline-flex;\n width: 24px;\n height: 24px;\n isolation: isolate;\n\n .--CHECKBOX-inputField {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n width: 100%;\n height: 100%;\n z-index: 2;\n margin: 0;\n -webkit-tap-highlight-color: transparent;\n\n ~ .--CHECKBOX-span > span {\n visibility: hidden;\n }\n &:checked ~ .--CHECKBOX-span > span,\n &:indeterminate ~ .--CHECKBOX-span > span {\n visibility: visible;\n }\n\n // ENABLED\n ~ .--CHECKBOX-span {\n ${background(theme, 'ENABLED')};\n ${border(theme, 'ENABLED')};\n ${icon(theme, 'ENABLED')};\n }\n\n // VALUE\n &:checked ~ .--CHECKBOX-span {\n ${background(theme, 'VALUE')};\n ${border(theme, 'VALUE')};\n ${icon(theme, 'VALUE')};\n }\n\n // INDETERMINATE (same appearance as VALUE)\n &:indeterminate ~ .--CHECKBOX-span {\n ${background(theme, 'VALUE')};\n ${border(theme, 'VALUE')};\n ${icon(theme, 'VALUE')};\n }\n\n // HOVER\n // Is at the container level\n\n // ACTIVE\n &.--CHECKBOX-active ~ .--CHECKBOX-span,\n &:active ~ .--CHECKBOX-span {\n &:before {\n opacity: 1;\n ${shadow(theme, 'ACTIVE')};\n }\n }\n\n // FOCUS\n &:focus-visible ~ .--CHECKBOX-span {\n outline: none;\n ${outline(theme, 'FOCUS')};\n ${icon(theme, 'FOCUS')};\n }\n\n // ERROR\n &.--CHECKBOX-error ~ .--CHECKBOX-span {\n ${background(theme, 'ERROR')};\n ${border(theme, 'ERROR')};\n ${icon(theme, 'ERROR')};\n }\n\n // ERROR + VALUE\n &.--CHECKBOX-error:checked ~ .--CHECKBOX-span {\n ${background(theme, 'ERROR_VALUE')};\n ${border(theme, 'ERROR_VALUE')};\n ${icon(theme, 'ERROR_VALUE')};\n }\n\n // ERROR + VALUE\n // Is at the container level\n\n // ERROR + ACTIVE\n &.--CHECKBOX-error:active ~ .--CHECKBOX-span,\n &.--CHECKBOX-error.--CHECKBOX-active ~ .--CHECKBOX-span {\n &:before {\n opacity: 1;\n ${shadow(theme, 'ERROR_ACTIVE')};\n }\n }\n\n // ERROR + FOCUS\n &.--CHECKBOX-error:focus-visible ~ .--CHECKBOX-span {\n ${outline(theme, 'ERROR_FOCUS')};\n ${icon(theme, 'ERROR_FOCUS')};\n }\n\n // DISABLED\n &:disabled ~ .--CHECKBOX-span {\n ${background(theme, 'DISABLED')};\n ${border(theme, 'DISABLED')};\n ${icon(theme, 'DISABLED')};\n }\n\n // DISABLED + VALUE\n &:disabled:checked ~ .--CHECKBOX-span {\n ${background(theme, 'DISABLED_VALUE')};\n ${border(theme, 'DISABLED_VALUE')};\n ${icon(theme, 'DISABLED_VALUE')};\n }\n }\n\n .--CHECKBOX-span {\n width: 24px;\n height: 24px;\n ${getStyle(theme, 'border-radius', '--CHECKBOX-ROOT-BORDER-RADIUS')};\n position: absolute;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n transition:\n background-color 150ms ease-in-out,\n border-color 150ms ease-in-out;\n\n > span {\n width: 100%;\n height: auto;\n z-index: 1;\n }\n\n &:before {\n content: '';\n position: absolute;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n opacity: 0;\n transition: opacity 150ms ease-in-out;\n z-index: -1;\n }\n }\n }\n\n .--CHECKBOX-label {\n // FONT\n font-family: ${theme['--FONTFAMILY-PRIMARY']};\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1;\n }\n }\n\n .--CHECKBOX-helperText {\n // FONT\n font-family: ${theme['--FONTFAMILY-PRIMARY']};\n font-size: 13px;\n line-height: 16px;\n margin-left: 14px;\n }\n }\n`;\n\nexport default Style;\n","import { createContext } from 'react';\n\nexport interface CheckboxGroupContextValue {\n /** Array of currently checked option values */\n checkedValues: string[];\n /** Toggle a value in/out of the checked array */\n onChange: (value: string, checked: boolean) => void;\n /** Group-level disabled state */\n disabled?: boolean;\n /** Group-level validation error */\n error?: { message?: string };\n}\n\nexport const CheckboxGroupContext = createContext<CheckboxGroupContextValue | null>(null);\n","import { createContext } from 'react';\n\nexport interface CheckboxTreeContextValue {\n /** Array of currently checked option values */\n checkedValues: string[];\n /** Toggle a value in/out of the checked array */\n onChange: (value: string, checked: boolean) => void;\n /** Tree-level disabled state */\n disabled?: boolean;\n /** Tree-level validation error */\n error?: { message?: string };\n}\n\nexport const CheckboxTreeContext = createContext<CheckboxTreeContextValue | null>(null);\n","import React, { useState, useContext } from 'react';\n// Component Base\nimport emotion from './Checkbox.emotion';\nimport type { CheckboxProps, CheckboxBaseProps } from './Checkbox.interface';\nimport { CheckboxGroupContext } from '../../molecules/CheckboxGroup/CheckboxGroup.context';\nimport { CheckboxTreeContext } from '../../molecules/CheckboxTree/CheckboxTree.context';\n// External Libraries\nimport { useController, type FieldValues, type FieldPath } from 'react-hook-form';\n// Custom Components\nimport Icon from '@components/atoms/Icon';\n\nconst CLASS = '--CHECKBOX';\n\n/**\n * Headless presentational layer for the checkbox.\n * Accepts `checked` and `onChecked` directly — use this when you need a controlled checkbox outside of React Hook Form.\n */\nexport const CheckboxBase = React.forwardRef<HTMLInputElement, CheckboxBaseProps>(\n (\n {\n label,\n icon = <Icon name='check' />,\n helperText,\n showErrorText = true,\n className,\n style = {},\n disabled,\n checked,\n onChecked,\n error,\n onKeyDown,\n onKeyUp,\n onBlur,\n ...rest\n }: CheckboxBaseProps,\n ref,\n ) => {\n const [isActive, setIsActive] = useState(false);\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter' || event.key === 'Space') setIsActive(true);\n onKeyDown?.(event);\n };\n\n const handleKeyUp = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter' || event.key === 'Space') {\n setIsActive(false);\n onChecked(!checked);\n }\n onKeyUp?.(event);\n };\n\n const handleBlur = () => {\n setIsActive(false);\n onBlur?.({} as React.FocusEvent<HTMLInputElement>);\n };\n\n return (\n <div\n className={[CLASS, isActive ? `${CLASS}-active` : '', className || ''].join(' ')}\n css={emotion(style)}\n data-testid={CLASS}\n >\n <label className={`${CLASS}-container`}>\n <div className={`${CLASS}-checkbox`}>\n <input\n className={[\n `${CLASS}-inputField`,\n isActive ? `${CLASS}-active` : '',\n showErrorText && error && `${CLASS}-error`,\n ].join(' ')}\n type='checkbox'\n checked={checked}\n disabled={disabled}\n onChange={e => onChecked(e.target.checked)}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n onBlur={handleBlur}\n ref={ref}\n data-testid={`${CLASS}-inputField`}\n {...rest}\n />\n <span className={`${CLASS}-span`} data-testid={`${CLASS}-icon`}>\n {icon}\n </span>\n </div>\n <span className={`${CLASS}-label`} data-testid={`${CLASS}-label`}>\n {label}\n </span>\n </label>\n {(helperText || showErrorText) && (\n <span className={`${CLASS}-helperText`} data-testid={`${CLASS}-helperText`}>\n {helperText && (!error || !showErrorText) && helperText}\n {showErrorText && error && error.message}\n </span>\n )}\n </div>\n );\n },\n);\n\nCheckboxBase.displayName = 'CheckboxBase';\n\nconst CheckboxRHF = <TFieldValues extends FieldValues = FieldValues>({\n name,\n control,\n ...rest\n}: CheckboxProps<TFieldValues>) => {\n const { field, fieldState } = useController({ control: control!, name: name! as FieldPath<TFieldValues> });\n const [value, setValue] = useState<boolean>(field.value || false);\n const errorText = fieldState.error;\n\n const onChecked = (checked: boolean) => {\n field.onChange(checked);\n setValue(checked);\n if (errorText) field.onBlur();\n };\n\n return (\n <CheckboxBase\n {...rest}\n name={name}\n checked={value}\n onChecked={onChecked}\n onBlur={() => field.onBlur()}\n error={errorText}\n />\n );\n};\n\nconst Checkbox = <TFieldValues extends FieldValues = FieldValues>(props: CheckboxProps<TFieldValues>) => {\n const groupCtx = useContext(CheckboxGroupContext);\n const treeCtx = useContext(CheckboxTreeContext);\n const ctx = groupCtx ?? treeCtx;\n\n if (typeof props.checked === 'boolean' && !props.control) {\n const { checked, onChecked, name, control, ...rest } = props;\n return <CheckboxBase {...rest} name={name} checked={checked} onChecked={onChecked ?? (() => {})} />;\n }\n\n if (ctx) {\n const { value, name, control, ...rest } = props;\n const itemValue = (value as string) ?? name ?? '';\n const checked = ctx.checkedValues.includes(itemValue);\n\n return (\n <CheckboxBase\n {...rest}\n name={name}\n value={itemValue}\n checked={checked}\n onChecked={c => ctx.onChange(itemValue, c)}\n disabled={rest.disabled ?? ctx.disabled}\n error={ctx.error}\n showErrorText={false}\n helperText={undefined}\n />\n );\n }\n\n return <CheckboxRHF {...props} />;\n};\n\nexport default Checkbox;\n","import { useCreateComponentStyles } from '@hocs/ThemeProvider/useThemeProvider.hook';\nimport { Component } from '@hocs/ThemeProvider/interfaces';\nimport type { CheckboxStyleProps } from './Checkbox.interface';\nimport type { FieldValues } from 'react-hook-form';\nimport CheckboxBase from './Checkbox';\n\nconst Checkbox = <TFieldValues extends FieldValues = FieldValues>({\n theme,\n variant = 'default',\n ...rest\n}: CheckboxStyleProps<TFieldValues>) => {\n const { componentStyles } = useCreateComponentStyles([Component.CHECKBOX], theme, variant.toUpperCase());\n\n return <CheckboxBase {...rest} style={componentStyles} />;\n};\n\nexport default Checkbox;\n","import { createContext } from 'react';\n\nexport interface RadioGroupContextValue {\n /** The name attribute shared by all radios in this group */\n name: string;\n /** The currently selected value */\n selectedValue: string;\n /** Select a value */\n onChange: (value: string) => void;\n /** Group-level disabled state */\n disabled?: boolean;\n /** Group-level validation error */\n error?: { message?: string };\n /** Value of the first non-disabled Radio child — used to implement roving tabindex */\n firstValue: string;\n}\n\nexport const RadioGroupContext = createContext<RadioGroupContextValue | null>(null);\n"],"mappings":";;;;;;AAAA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,SAAS,UACT,EAAA,aAAa,cACb,EAAA,YAAY,aACZ,EAAA,cAAc,eACd,EAAA,WAAW,YACX,EAAA,QAAQ,SACR,EAAA,SAAS,UACT,EAAA,aAAa,cACb,EAAA,SAAS,UACT,EAAA,SAAS,UACT,EAAA,aAAa,cACb,EAAA,iBAAiB,kBACjB,EAAA,aAAa,cACb,EAAA,iBAAiB,kBAGjB,EAAA,gBAAgB,iBAChB,EAAA,eAAe,gBACf,EAAA,aAAa,cACb,EAAA,QAAQ,SAGR,EAAA,WAAW,YACX,EAAA,eAAe;KAChB,ECxBK,UAAc,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCGjB,IAAQ,UAQR,KAAuB,EAAE,SAAM,UAAO,IAAO,UAAO,MAAM,cAAW,eAEvE,kBAAC,QAAD;CACE,WAAW;EAAC;EAAO,KAAQ,GAAG,EAAM;EAAQ,MAAS,QAAQ,GAAG,EAAM,GAAG;EAAQ;EAAU,CACxF,OAAO,QAAQ,CACf,KAAK,IAAI;CACZ,KAAK,GAAS;CACP;CACP,eAAY;CACZ,eAAa;WAEZ;CACI,CAAA,ECtBL,KAAc,GAA+B,MAA0B;;IAEzE,EAAS,GAAO,oBAAoB,qBAAqB,EAAM,mBAAmB,CAAC;GAGjF,KAAU,GAA+B,MAA0B;;IAErE,EAAS,GAAO,gBAAgB,qBAAqB,EAAM,eAAe,CAAC;IAC3E,EAAS,GAAO,gBAAgB,qBAAqB,EAAM,eAAe,CAAC;IAC3E,EAAS,GAAO,gBAAgB,qBAAqB,EAAM,eAAe,CAAC;GAGzE,KAAW,GAA+B,MAA0B;;IAEtE,EAAS,GAAO,iBAAiB,qBAAqB,EAAM,gBAAgB,CAAC;IAC7E,EAAS,GAA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