@vkzstudio/muza-ui 1.0.43 → 1.0.45
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/dist/components/Accordion/Accordion.d.ts +42 -6
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +71 -17
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +66 -20
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +39 -39
- package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +69 -36
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +38 -7
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +165 -163
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +3 -17
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/components/EdgeButton/EdgeButton.d.ts +10 -11
- package/dist/components/EdgeButton/EdgeButton.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.d.ts +103 -19
- package/dist/components/ExpandableTable/ExpandableTable.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.js +100 -111
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts +6 -1
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts.map +1 -1
- package/dist/components/ExpandableTable/index.d.ts +1 -1
- package/dist/components/ExpandableTable/index.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.d.ts +22 -0
- package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.js +38 -41
- package/dist/components/FileUpload/FileUpload.d.ts +137 -42
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.js +87 -83
- package/dist/components/FileUpload/FileUpload.stories.d.ts +1 -0
- package/dist/components/FileUpload/FileUpload.stories.d.ts.map +1 -1
- package/dist/components/FileUpload/index.d.ts +1 -1
- package/dist/components/FileUpload/index.d.ts.map +1 -1
- package/dist/components/Flex/Flex.d.ts +1 -1
- package/dist/components/Icons/CustomBadges.d.ts +14 -0
- package/dist/components/Icons/CustomBadges.d.ts.map +1 -0
- package/dist/components/Icons/CustomBadges.js +334 -0
- package/dist/components/Icons/CustomIcons.d.ts +24 -0
- package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.js +88 -42
- package/dist/components/Icons/CustomLogos.d.ts +29 -0
- package/dist/components/Icons/CustomLogos.d.ts.map +1 -0
- package/dist/components/Icons/CustomLogos.js +593 -0
- package/dist/components/Icons/LogosAndBadges.stories.d.ts +7 -0
- package/dist/components/Icons/LogosAndBadges.stories.d.ts.map +1 -0
- package/dist/components/Icons/index.d.ts +2 -0
- package/dist/components/Icons/index.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts +33 -34
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts +24 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.js +71 -52
- package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts +2 -0
- package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +50 -23
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +18 -17
- package/dist/components/Reorderable/Reorderable.d.ts +48 -1
- package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.d.ts +34 -17
- package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts +266 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.examples.d.ts +39 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.examples.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.js +134 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.stories.d.ts +14 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.stories.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/index.d.ts +2 -0
- package/dist/components/ResponsiveLayoutTable/index.d.ts.map +1 -0
- package/dist/components/Select/Select.d.ts +58 -28
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +123 -92
- package/dist/components/Select/Select.stories.d.ts +1 -0
- package/dist/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/utils.d.ts +1 -0
- package/dist/components/Select/utils.d.ts.map +1 -1
- package/dist/components/Select/utils.js +5 -2
- package/dist/components/TextEditor/TextEditor.d.ts +82 -46
- package/dist/components/TextEditor/TextEditor.d.ts.map +1 -1
- package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -1
- package/dist/components/TextEditor/index.d.ts +1 -1
- package/dist/components/TextEditor/index.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +41 -10
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.stories.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/ToggleCheckButton/ToggleCheckButton.d.ts +69 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.d.ts.map +1 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.js +64 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.stories.d.ts +8 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.stories.d.ts.map +1 -0
- package/dist/components/ToggleCheckButton/index.d.ts +2 -0
- package/dist/components/ToggleCheckButton/index.d.ts.map +1 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.examples.d.ts +19 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.examples.d.ts.map +1 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.stories.d.ts +8 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.stories.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/hooks/use-is-breakpoint.d.ts +11 -0
- package/dist/hooks/use-is-breakpoint.d.ts.map +1 -1
- package/dist/hooks/use-is-breakpoint.js +24 -13
- package/dist/index.js +236 -215
- package/dist/muza-ui.css +1 -1
- package/dist/styles/token-colors.css +64 -3
- package/dist/styles/token-sizes.css +86 -54
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/cn.js +16 -5
- package/package.json +1 -1
|
@@ -7,53 +7,54 @@ declare const inputWrapperVariants: (props?: ({
|
|
|
7
7
|
/**
|
|
8
8
|
* Props for the Input component.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* Extends standard input attributes except `size` (replaced by a custom size
|
|
11
|
+
* variant), `type` (narrowed to a supported union), and `prefix`/`suffix`
|
|
12
|
+
* (replaced by ReactNode slots rendered inside the wrapper).
|
|
12
13
|
*/
|
|
13
14
|
export interface InputProps extends Omit<ComponentProps<'input'>, 'size' | 'prefix' | 'suffix' | 'type'>, VariantProps<typeof inputWrapperVariants> {
|
|
14
|
-
/**
|
|
15
|
+
/** Label text rendered above the input. */
|
|
15
16
|
label?: string;
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
-
* @default
|
|
18
|
+
* HTML input type controlling keyboard layout and browser validation.
|
|
19
|
+
* @default 'text'
|
|
19
20
|
*/
|
|
20
21
|
type?: 'text' | 'email' | 'password' | 'number' | 'time';
|
|
21
|
-
/**
|
|
22
|
-
* Controls the visual size variant affecting height and typography.
|
|
23
|
-
* @default "base"
|
|
24
|
-
*/
|
|
22
|
+
/** Controls height and typography. @default 'base' */
|
|
25
23
|
size?: 'xs' | 'sm' | 'base' | 'lg';
|
|
26
|
-
/**
|
|
27
|
-
* Enables error state with red border and red hint text.
|
|
28
|
-
* @default false
|
|
29
|
-
*/
|
|
24
|
+
/** Applies error border and hint styling. @default false */
|
|
30
25
|
error?: boolean;
|
|
31
|
-
/**
|
|
26
|
+
/** Content rendered before the input value (e.g. an icon). */
|
|
32
27
|
prefix?: ReactNode;
|
|
33
|
-
/**
|
|
28
|
+
/** Content rendered after the input value (e.g. an icon or action button). */
|
|
34
29
|
suffix?: ReactNode;
|
|
35
30
|
/**
|
|
36
|
-
* Hides the required asterisk
|
|
31
|
+
* Hides the required asterisk in the label even when `required` is `true`.
|
|
37
32
|
* @default false
|
|
38
33
|
*/
|
|
39
34
|
disableRequiredAsterisk?: boolean;
|
|
40
|
-
/**
|
|
35
|
+
/** Helper or error text rendered below the input. */
|
|
41
36
|
hint?: string;
|
|
42
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Custom content rendered inline next to the label. Takes precedence over
|
|
39
|
+
* `infoTooltip` when both are provided.
|
|
40
|
+
*/
|
|
43
41
|
labelExtra?: ReactNode;
|
|
44
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Tooltip content shown in an info icon next to the label. Ignored when
|
|
44
|
+
* `labelExtra` is provided.
|
|
45
|
+
*/
|
|
45
46
|
infoTooltip?: string;
|
|
46
47
|
/**
|
|
47
|
-
* Input mask pattern using react-imask syntax.
|
|
48
|
+
* Input mask pattern using [react-imask](https://imask.js.org/) syntax.
|
|
49
|
+
* All alphabetic input is automatically uppercased.
|
|
48
50
|
*
|
|
49
|
-
*
|
|
50
|
-
* - `0`
|
|
51
|
-
* - `a`
|
|
52
|
-
* - `*`
|
|
53
|
-
* -
|
|
51
|
+
* Pattern tokens:
|
|
52
|
+
* - `0` — digit (0-9)
|
|
53
|
+
* - `a` — letter (auto-uppercased)
|
|
54
|
+
* - `*` — alphanumeric (auto-uppercased)
|
|
55
|
+
* - any other character — literal
|
|
54
56
|
*
|
|
55
57
|
* @example
|
|
56
|
-
* ```tsx
|
|
57
58
|
* // Phone number: (123) 456-7890
|
|
58
59
|
* <Input mask="(000) 000-0000" />
|
|
59
60
|
*
|
|
@@ -62,18 +63,16 @@ export interface InputProps extends Omit<ComponentProps<'input'>, 'size' | 'pref
|
|
|
62
63
|
*
|
|
63
64
|
* // Mixed format: AB-1234-CD
|
|
64
65
|
* <Input mask="aa-0000-aa" />
|
|
65
|
-
* ```
|
|
66
66
|
*/
|
|
67
67
|
mask?: string;
|
|
68
68
|
/**
|
|
69
|
-
* Stops `click` events on the wrapper from propagating to ancestors. Use
|
|
70
|
-
* when the Input
|
|
71
|
-
* ReorderableTable row
|
|
72
|
-
*
|
|
69
|
+
* Stops `click` events on the wrapper from propagating to ancestors. Use
|
|
70
|
+
* when the Input sits inside a clickable container (e.g. a DataTable or
|
|
71
|
+
* ReorderableTable row with `onRowClick`) so clicking the input's padding,
|
|
72
|
+
* prefix, or suffix area does not trigger the parent's click handler.
|
|
73
73
|
*
|
|
74
|
-
*
|
|
75
|
-
* and `keydown`
|
|
76
|
-
* itself is preserved.
|
|
74
|
+
* Only `click` events are stopped — `focus`, `pointerdown`/`mousedown`,
|
|
75
|
+
* and `keydown` still bubble, and focus behavior on the input is preserved.
|
|
77
76
|
* @default false
|
|
78
77
|
*/
|
|
79
78
|
stopClickPropagation?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAMjE,QAAA,MAAM,oBAAoB;;;8EA0BzB,CAAA;AAgBD
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAMjE,QAAA,MAAM,oBAAoB;;;8EA0BzB,CAAA;AAgBD;;;;;;GAMG;AACH,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC,EAC1E,YAAY,CAAC,OAAO,oBAAoB,CAAC;IAC3C,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAA;IACxD,sDAAsD;IACtD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IAClC,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,8DAA8D;IAC9D,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED,eAAO,MAAM,KAAK,sHAiJjB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAE3D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAE3D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAgK5B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAA;AAGnC,eAAO,MAAM,OAAO,EAAE,KAarB,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,KAgBtC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAgBnC,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAgB5B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAgB3B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAyB3B,CAAA;AAED,eAAO,MAAM,yBAAyB,EAAE,KAyBvC,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAqBtB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAsBtB,CAAA"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
import { ButtonProps } from '../Button';
|
|
1
2
|
/**
|
|
2
3
|
* Represents a single language option in the LanguageSwitcher dropdown.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* const english: LanguageOption = {
|
|
8
|
+
* name: 'English',
|
|
9
|
+
* value: 'en',
|
|
10
|
+
* icon: <FlagEn />,
|
|
11
|
+
* }
|
|
12
|
+
* ```
|
|
3
13
|
*/
|
|
4
14
|
export interface LanguageOption {
|
|
5
15
|
/** Display label for the language (e.g. "English", "Čeština"). */
|
|
@@ -24,7 +34,20 @@ export interface LanguageSwitcherProps {
|
|
|
24
34
|
defaultValue?: string;
|
|
25
35
|
/** Controlled selected language value. Use with onValueChange for controlled behavior. */
|
|
26
36
|
value?: string;
|
|
37
|
+
/**
|
|
38
|
+
* When true, renders a compact icon-only flag button instead of the full text trigger.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
isIconButton?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Props forwarded to the underlying Button when `isIconButton` is true.
|
|
44
|
+
* The `icon` prop is reserved for the active language flag and cannot be overridden.
|
|
45
|
+
* @see ButtonProps
|
|
46
|
+
*/
|
|
47
|
+
buttonProps?: Omit<ButtonProps, 'icon'>;
|
|
48
|
+
/** Prevents interaction and applies disabled styling. @default false */
|
|
49
|
+
disabled?: boolean;
|
|
27
50
|
}
|
|
28
|
-
declare const LanguageSwitcher: ({ languages, onValueChange, defaultValue, value, }: LanguageSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
declare const LanguageSwitcher: ({ languages, onValueChange, defaultValue, value, isIconButton, buttonProps, disabled, }: LanguageSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
52
|
export { LanguageSwitcher };
|
|
30
53
|
//# sourceMappingURL=LanguageSwitcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LanguageSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAWpD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAA;IACZ,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,SAAS,EAAE,cAAc,EAAE,CAAA;IAC3B,wFAAwF;IACxF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,0FAA0F;IAC1F,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0FAA0F;IAC1F,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;IACvC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,gBAAgB,GAAI,yFAQvB,qBAAqB,4CAuEvB,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,64 +1,83 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { DropdownMenu as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useEffect as v } from "react";
|
|
3
|
+
import { DropdownMenu as w, DropdownMenuTrigger as x, DropdownMenuContent as b, DropdownMenuRadioGroup as D, DropdownMenuRadioItem as y } from "../DropdownMenu/DropdownMenu.js";
|
|
4
|
+
import { Button as z } from "../Button/Button.js";
|
|
5
|
+
import { Typography as M } from "../Typography/Typography.js";
|
|
6
|
+
import { AltArrowDownOutline as N } from "@solar-icons/react-perf";
|
|
7
|
+
import { cn as A } from "../../utils/cn.js";
|
|
8
|
+
const G = ({
|
|
8
9
|
languages: i,
|
|
9
|
-
onValueChange:
|
|
10
|
-
defaultValue:
|
|
11
|
-
value:
|
|
10
|
+
onValueChange: s,
|
|
11
|
+
defaultValue: u,
|
|
12
|
+
value: n,
|
|
13
|
+
isIconButton: f,
|
|
14
|
+
buttonProps: g,
|
|
15
|
+
disabled: a
|
|
12
16
|
}) => {
|
|
13
|
-
var
|
|
14
|
-
const [
|
|
15
|
-
|
|
17
|
+
var p;
|
|
18
|
+
const [c, m] = h(
|
|
19
|
+
u || ((p = i[0]) == null ? void 0 : p.value) || ""
|
|
16
20
|
);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
21
|
+
v(() => {
|
|
22
|
+
n && m(n);
|
|
23
|
+
}, [n]);
|
|
24
|
+
const e = i.find(({ value: o }) => o === c);
|
|
25
|
+
return /* @__PURE__ */ r(w, { children: [
|
|
26
|
+
/* @__PURE__ */ t(x, { asChild: !0, children: f ? /* @__PURE__ */ t(
|
|
27
|
+
z,
|
|
28
|
+
{
|
|
29
|
+
variant: "tertiary",
|
|
30
|
+
size: "sm",
|
|
31
|
+
disabled: a,
|
|
32
|
+
...g,
|
|
33
|
+
icon: e == null ? void 0 : e.icon
|
|
34
|
+
}
|
|
35
|
+
) : /* @__PURE__ */ r(
|
|
36
|
+
"button",
|
|
37
|
+
{
|
|
38
|
+
disabled: a,
|
|
39
|
+
className: "group flex cursor-pointer items-center gap-sm hover:text-comp-language-switcher-hover focus-visible:text-comp-language-switcher-focused focus-visible:focus-default disabled:pointer-events-none disabled:text-comp-language-switcher-disabled",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ t(
|
|
42
|
+
M,
|
|
43
|
+
{
|
|
44
|
+
component: "span",
|
|
45
|
+
size: "sm",
|
|
46
|
+
weight: "medium",
|
|
47
|
+
variant: "body",
|
|
48
|
+
fixY: !0,
|
|
49
|
+
children: e ? /* @__PURE__ */ r("span", { className: "flex items-center gap-sm [&>svg]:size-icon-small group-disabled:[&>svg]:opacity-50", children: [
|
|
50
|
+
e.icon && e.icon,
|
|
51
|
+
e.name
|
|
52
|
+
] }) : null
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ t(
|
|
56
|
+
N,
|
|
57
|
+
{
|
|
58
|
+
className: A(
|
|
59
|
+
"size-[12px] transition-transform duration-300 group-hover:text-comp-language-switcher-hover group-data-[state=open]:rotate-180"
|
|
60
|
+
)
|
|
61
|
+
}
|
|
43
62
|
)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
) }),
|
|
66
|
+
/* @__PURE__ */ t(b, { className: "w-50", side: "bottom", align: "end", children: /* @__PURE__ */ t(
|
|
67
|
+
D,
|
|
49
68
|
{
|
|
50
|
-
value:
|
|
51
|
-
onValueChange: (
|
|
52
|
-
|
|
69
|
+
value: c,
|
|
70
|
+
onValueChange: (o) => {
|
|
71
|
+
m(o), s == null || s(o);
|
|
53
72
|
},
|
|
54
|
-
children: i.map(({ name:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
] }) },
|
|
73
|
+
children: i.map(({ name: o, value: l, icon: d }) => /* @__PURE__ */ t(y, { value: l, children: /* @__PURE__ */ r("span", { className: "flex items-center gap-sm [&>svg]:size-icon-small", children: [
|
|
74
|
+
d && d,
|
|
75
|
+
o
|
|
76
|
+
] }) }, l))
|
|
58
77
|
}
|
|
59
78
|
) })
|
|
60
79
|
] });
|
|
61
80
|
};
|
|
62
81
|
export {
|
|
63
|
-
|
|
82
|
+
G as LanguageSwitcher
|
|
64
83
|
};
|
|
@@ -4,5 +4,7 @@ declare const meta: Meta<typeof LanguageSwitcher>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof LanguageSwitcher>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
+
export declare const IconButton: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
7
9
|
export declare const Controlled: Story;
|
|
8
10
|
//# sourceMappingURL=LanguageSwitcher.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSwitcher.stories.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,
|
|
1
|
+
{"version":3,"file":"LanguageSwitcher.stories.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAwCvC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE9C,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KA8BxB,CAAA"}
|
|
@@ -1,31 +1,53 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Single selectable option in the MultiSelect dropdown.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* const option: IMultiSelectOption = {
|
|
7
|
+
* value: 'food',
|
|
8
|
+
* label: 'Food & Dining',
|
|
9
|
+
* icon: <Cutlery />,
|
|
10
|
+
* disabled: false,
|
|
11
|
+
* }
|
|
12
|
+
*/
|
|
13
|
+
export interface IMultiSelectOption {
|
|
14
|
+
/** Unique value identifying the option. Matched against `value` to determine selection. */
|
|
15
|
+
value: string;
|
|
16
|
+
/** Display content rendered inside the dropdown item and inside the selected tag. */
|
|
17
|
+
label: ReactNode;
|
|
18
|
+
/** Prevents the option from being toggled. Still visible in the dropdown. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Icon rendered before the label inside the dropdown item. */
|
|
21
|
+
icon?: ReactNode;
|
|
22
|
+
}
|
|
2
23
|
/**
|
|
3
24
|
* Props for the MultiSelect component.
|
|
4
25
|
*/
|
|
5
26
|
export interface IMultiSelectProps {
|
|
6
|
-
/** Label
|
|
27
|
+
/** Label rendered above the select via FormField. */
|
|
7
28
|
label?: string;
|
|
8
|
-
/** Helper text
|
|
29
|
+
/** Helper text rendered below the select. Switches to error color when `error` is true. */
|
|
9
30
|
hint?: string;
|
|
10
|
-
/** Applies error
|
|
31
|
+
/** Applies error border and switches `hint` to error color. @default false */
|
|
11
32
|
error?: boolean;
|
|
12
|
-
/** Marks the field as required
|
|
33
|
+
/** Marks the field as required. Renders an asterisk next to the label and sets `aria-required`. @default false */
|
|
13
34
|
required?: boolean;
|
|
14
35
|
/** Hides the required asterisk even when `required` is true. @default false */
|
|
15
36
|
disableRequiredAsterisk?: boolean;
|
|
16
|
-
/**
|
|
37
|
+
/** Reserved slot for content rendered after the selected values. Not currently rendered. */
|
|
17
38
|
suffix?: ReactNode;
|
|
18
|
-
/** Icon or element
|
|
39
|
+
/** Icon or element rendered before the selected tags or placeholder inside the trigger. */
|
|
19
40
|
prefix?: ReactNode;
|
|
20
|
-
/** Placeholder
|
|
41
|
+
/** Placeholder rendered when no options are selected. @default translations.select.placeholder */
|
|
21
42
|
placeholder?: string;
|
|
22
|
-
/** Text
|
|
43
|
+
/** Text rendered inside the dropdown when `options` is empty. @default translations.select.noOptions */
|
|
23
44
|
emptyMessage?: string;
|
|
24
|
-
/** Controls height and padding. @default 'base' */
|
|
45
|
+
/** Controls trigger height and padding. @default 'base' */
|
|
25
46
|
size?: 'xs' | 'sm' | 'base' | 'lg';
|
|
26
47
|
/**
|
|
27
|
-
*
|
|
48
|
+
* Selectable options rendered inside the dropdown.
|
|
28
49
|
*
|
|
50
|
+
* @see IMultiSelectOption
|
|
29
51
|
* @example
|
|
30
52
|
* <MultiSelect options={[
|
|
31
53
|
* { value: 'a', label: 'Option A' },
|
|
@@ -33,25 +55,30 @@ export interface IMultiSelectProps {
|
|
|
33
55
|
* { value: 'c', label: 'Option C', icon: <Icon /> },
|
|
34
56
|
* ]} />
|
|
35
57
|
*/
|
|
36
|
-
options:
|
|
37
|
-
|
|
38
|
-
label: ReactNode;
|
|
39
|
-
disabled?: boolean;
|
|
40
|
-
icon?: ReactNode;
|
|
41
|
-
}>;
|
|
42
|
-
/** Prevents interaction and applies disabled styling. */
|
|
58
|
+
options: IMultiSelectOption[];
|
|
59
|
+
/** Prevents interaction and applies disabled styling. @default false */
|
|
43
60
|
disabled?: boolean;
|
|
44
|
-
/** Maximum number of tag chips
|
|
61
|
+
/** Maximum number of tag chips rendered before overflow collapses into a `+N` counter tag. @default 2 */
|
|
45
62
|
maxNumberOfVisibleTags?: number;
|
|
46
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* Currently selected option values. Use with `onChange` for controlled mode.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* <MultiSelect value={['apple', 'banana']} onChange={setValue} options={...} />
|
|
68
|
+
*/
|
|
47
69
|
value?: string[];
|
|
48
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Fires when the selection changes. Receives the full updated array of selected values.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* <MultiSelect onChange={(values) => setSelected(values)} />
|
|
75
|
+
*/
|
|
49
76
|
onChange?: (value: string[]) => void;
|
|
50
|
-
/** Extra content rendered inline next to the label (e.g. a tooltip icon). */
|
|
77
|
+
/** Extra content rendered inline next to the label (e.g. a tooltip icon). Takes precedence over `infoTooltip`. */
|
|
51
78
|
labelExtra?: ReactNode;
|
|
52
|
-
/** Tooltip content
|
|
79
|
+
/** Tooltip content rendered in an info icon next to the label. Ignored if `labelExtra` is provided. */
|
|
53
80
|
infoTooltip?: string;
|
|
54
|
-
/** Distance in pixels from viewport edge before the dropdown repositions.
|
|
81
|
+
/** Distance in pixels from the viewport edge before the dropdown repositions. Forwarded to Radix `collisionPadding`. */
|
|
55
82
|
collisionPadding?: number;
|
|
56
83
|
}
|
|
57
84
|
export declare const MultiSelect: React.ForwardRefExoticComponent<IMultiSelectProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSelect/MultiSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAgBd;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,
|
|
1
|
+
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSelect/MultiSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAgBd;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,2FAA2F;IAC3F,KAAK,EAAE,MAAM,CAAA;IACb,qFAAqF;IACrF,KAAK,EAAE,SAAS,CAAA;IAChB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2FAA2F;IAC3F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,kHAAkH;IAClH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,4FAA4F;IAC5F,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,kGAAkG;IAClG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wGAAwG;IACxG,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IAClC;;;;;;;;;;OAUG;IACH,OAAO,EAAE,kBAAkB,EAAE,CAAA;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yGAAyG;IACzG,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACpC,kHAAkH;IAClH,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,uGAAuG;IACvG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wHAAwH;IACxH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,eAAO,MAAM,WAAW,6FAqOvB,CAAA"}
|
|
@@ -15,12 +15,12 @@ const ne = L(
|
|
|
15
15
|
label: x,
|
|
16
16
|
hint: b,
|
|
17
17
|
error: w,
|
|
18
|
-
options:
|
|
18
|
+
options: a,
|
|
19
19
|
onChange: s,
|
|
20
20
|
value: r,
|
|
21
|
-
disabled:
|
|
21
|
+
disabled: o,
|
|
22
22
|
prefix: d,
|
|
23
|
-
maxNumberOfVisibleTags:
|
|
23
|
+
maxNumberOfVisibleTags: c = 2,
|
|
24
24
|
size: O,
|
|
25
25
|
placeholder: S,
|
|
26
26
|
emptyMessage: W,
|
|
@@ -29,9 +29,9 @@ const ne = L(
|
|
|
29
29
|
labelExtra: A,
|
|
30
30
|
infoTooltip: C,
|
|
31
31
|
collisionPadding: F
|
|
32
|
-
} = D, y = S ?? g.select.placeholder, q = W ?? g.select.noOptions, N = U(), E = x ? `${N}-label` : void 0, P = b ? `${N}-hint` : void 0, M = k(() => new Map(
|
|
32
|
+
} = D, y = S ?? g.select.placeholder, q = W ?? g.select.noOptions, N = U(), E = x ? `${N}-label` : void 0, P = b ? `${N}-hint` : void 0, M = k(() => new Map(a.map((e) => [e.value, e.label])), [a]), V = k(() => {
|
|
33
33
|
const e = r && r.map((n) => M.get(n));
|
|
34
|
-
return e != null && e.length ? e.length <=
|
|
34
|
+
return e != null && e.length ? e.length <= c ? /* @__PURE__ */ t(
|
|
35
35
|
z,
|
|
36
36
|
{
|
|
37
37
|
gap: "xs",
|
|
@@ -39,7 +39,7 @@ const ne = L(
|
|
|
39
39
|
align: "start",
|
|
40
40
|
flex: 1,
|
|
41
41
|
className: "min-w-0",
|
|
42
|
-
children: e.map((n,
|
|
42
|
+
children: e.map((n, i) => /* @__PURE__ */ t(f, { variant: "info", className: "min-w-[50px] shrink-1", children: n }, i))
|
|
43
43
|
}
|
|
44
44
|
) : /* @__PURE__ */ t(
|
|
45
45
|
z,
|
|
@@ -50,17 +50,17 @@ const ne = L(
|
|
|
50
50
|
flex: 1,
|
|
51
51
|
className: "min-w-0",
|
|
52
52
|
children: [
|
|
53
|
-
...e.slice(0,
|
|
53
|
+
...e.slice(0, c).map((n, i) => /* @__PURE__ */ t(
|
|
54
54
|
f,
|
|
55
55
|
{
|
|
56
56
|
variant: "info",
|
|
57
57
|
className: "min-w-[50px] shrink-1 overflow-hidden",
|
|
58
58
|
children: /* @__PURE__ */ t("span", { className: "truncate", children: n })
|
|
59
59
|
},
|
|
60
|
-
|
|
60
|
+
i
|
|
61
61
|
)),
|
|
62
62
|
/* @__PURE__ */ p(f, { variant: "info", children: [
|
|
63
|
-
e.length -
|
|
63
|
+
e.length - c,
|
|
64
64
|
"+"
|
|
65
65
|
] }, "more")
|
|
66
66
|
]
|
|
@@ -75,7 +75,7 @@ const ne = L(
|
|
|
75
75
|
children: y
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
|
-
}, [r, y,
|
|
78
|
+
}, [r, y, c, M]), [R, $] = u.useState(!1), [T, _] = u.useState(0), m = u.useRef(!1), B = G(null), l = (typeof h == "function" ? null : h) ?? B;
|
|
79
79
|
return H(() => {
|
|
80
80
|
const e = () => {
|
|
81
81
|
l.current && _(l.current.offsetWidth);
|
|
@@ -104,14 +104,14 @@ const ne = L(
|
|
|
104
104
|
$(e);
|
|
105
105
|
},
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */ t(Y, { disabled:
|
|
107
|
+
/* @__PURE__ */ t(Y, { disabled: o, asChild: !0, children: /* @__PURE__ */ t(
|
|
108
108
|
"button",
|
|
109
109
|
{
|
|
110
110
|
ref: l,
|
|
111
111
|
type: "button",
|
|
112
112
|
role: "input",
|
|
113
113
|
tabIndex: 0,
|
|
114
|
-
disabled:
|
|
114
|
+
disabled: o,
|
|
115
115
|
"aria-required": v,
|
|
116
116
|
className: J({
|
|
117
117
|
size: O,
|
|
@@ -123,7 +123,7 @@ const ne = L(
|
|
|
123
123
|
d && /* @__PURE__ */ t(
|
|
124
124
|
"span",
|
|
125
125
|
{
|
|
126
|
-
className:
|
|
126
|
+
className: o ? "text-comp-select-icon-disabled" : "text-comp-select-icon-brand-def",
|
|
127
127
|
children: d
|
|
128
128
|
}
|
|
129
129
|
),
|
|
@@ -133,7 +133,8 @@ const ne = L(
|
|
|
133
133
|
{
|
|
134
134
|
className: re(
|
|
135
135
|
"shrink-0 transition-transform duration-200",
|
|
136
|
-
R ? "rotate-0" : "rotate-180"
|
|
136
|
+
R ? "rotate-0" : "rotate-180",
|
|
137
|
+
o ? "text-comp-select-icon-disabled" : "text-comp-select-icon-brand-def"
|
|
137
138
|
)
|
|
138
139
|
}
|
|
139
140
|
)
|
|
@@ -151,7 +152,7 @@ const ne = L(
|
|
|
151
152
|
m.current || e.preventDefault(), m.current = !1;
|
|
152
153
|
},
|
|
153
154
|
collisionPadding: F,
|
|
154
|
-
children:
|
|
155
|
+
children: a.length === 0 ? /* @__PURE__ */ t("div", { className: "px-lg py-md", role: "presentation", children: /* @__PURE__ */ t(
|
|
155
156
|
I,
|
|
156
157
|
{
|
|
157
158
|
component: "span",
|
|
@@ -160,7 +161,7 @@ const ne = L(
|
|
|
160
161
|
className: "text-comp-select-text-secondary",
|
|
161
162
|
children: q
|
|
162
163
|
}
|
|
163
|
-
) }) :
|
|
164
|
+
) }) : a.map((e) => /* @__PURE__ */ t(
|
|
164
165
|
ee,
|
|
165
166
|
{
|
|
166
167
|
checked: r == null ? void 0 : r.includes(e.value),
|
|
@@ -168,7 +169,7 @@ const ne = L(
|
|
|
168
169
|
icon: e.icon,
|
|
169
170
|
onCheckedChange: (n) => {
|
|
170
171
|
n ? s == null || s([...r || [], e.value]) : s == null || s(
|
|
171
|
-
(r || []).filter((
|
|
172
|
+
(r || []).filter((i) => i !== e.value)
|
|
172
173
|
), m.current = !0;
|
|
173
174
|
},
|
|
174
175
|
children: e.label
|