@payfit/unity-components 0.0.0-alpha.7 → 0.0.0-alpha.8
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/cjs/components/alert/Alert.js +1 -1
- package/dist/cjs/components/avatar/parts/AvatarPair.js +1 -1
- package/dist/cjs/components/badge/Badge.d.ts +3 -0
- package/dist/cjs/components/badge/Badge.js +1 -1
- package/dist/cjs/components/breadcrumbs/parts/Breadcrumb.js +1 -1
- package/dist/cjs/components/checkbox/parts/CheckboxIndicator.js +1 -1
- package/dist/cjs/components/collapsible/Collapsible.d.ts +33 -0
- package/dist/cjs/components/collapsible/parts/CollapsibleContent.d.ts +36 -0
- package/dist/cjs/components/collapsible/parts/CollapsibleTitle.d.ts +39 -0
- package/dist/cjs/components/date-picker/DatePicker.js +1 -1
- package/dist/cjs/components/date-picker/parts/DateInput.js +1 -1
- package/dist/cjs/components/fieldset/Fieldset.d.ts +150 -0
- package/dist/cjs/components/fieldset/Fieldset.js +1 -0
- package/dist/cjs/components/fieldset/parts/FieldGroup.d.ts +27 -0
- package/dist/cjs/components/fieldset/parts/FieldGroup.js +1 -0
- package/dist/cjs/components/form-field/parts/FormControl.d.ts +23 -0
- package/dist/cjs/components/icon-button/CircularIconButton.js +1 -1
- package/dist/cjs/components/icon-button/IconButton.variants.js +1 -1
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/menu/parts/MenuContent.js +1 -1
- package/dist/cjs/components/multi-select/MultiSelect.d.ts +62 -0
- package/dist/cjs/components/multi-select/MultiSelect.js +1 -0
- package/dist/cjs/components/multi-select/Multiselect.context.d.ts +7 -0
- package/dist/cjs/components/multi-select/Multiselect.context.js +1 -0
- package/dist/cjs/components/multi-select/Multiselect.types.d.ts +109 -0
- package/dist/cjs/components/multi-select/hooks/use-combobox-filter.d.ts +12 -0
- package/dist/cjs/components/multi-select/hooks/use-combobox-filter.js +1 -0
- package/dist/cjs/components/multi-select/hooks/use-multiselection-state.d.ts +14 -0
- package/dist/cjs/components/multi-select/hooks/use-multiselection-state.js +1 -0
- package/dist/cjs/components/multi-select/parts/MultiSelectButton.d.ts +16 -0
- package/dist/cjs/components/multi-select/parts/MultiSelectButton.js +1 -0
- package/dist/cjs/components/multi-select/parts/MultiSelectOptGroup.d.ts +69 -0
- package/dist/cjs/components/multi-select/parts/MultiSelectOptGroup.js +1 -0
- package/dist/cjs/components/multi-select/parts/MultiSelectOption.d.ts +20 -0
- package/dist/cjs/components/multi-select/parts/MultiSelectOption.js +1 -0
- package/dist/cjs/components/multi-select/parts/MultiSelectPopover.d.ts +7 -0
- package/dist/cjs/components/multi-select/parts/MultiSelectPopover.js +1 -0
- package/dist/cjs/components/multi-select-field/MultiSelectField.d.ts +59 -0
- package/dist/cjs/components/multi-select-field/MultiSelectField.js +1 -0
- package/dist/cjs/components/segmented-button-group/SegmentedButtonGroup.d.ts +43 -0
- package/dist/cjs/components/segmented-button-group/SegmentedButtonGroups.context.d.ts +8 -0
- package/dist/cjs/components/segmented-button-group/parts/ToggleButton.d.ts +47 -0
- package/dist/cjs/components/select/Select.js +1 -1
- package/dist/cjs/components/select/parts/SearchInput.js +1 -1
- package/dist/cjs/components/selectable-button-group/SelectableButtonGroup.context.d.ts +2 -0
- package/dist/cjs/components/selectable-button-group/SelectableButtonGroup.context.js +1 -0
- package/dist/cjs/components/selectable-button-group/SelectableButtonGroup.d.ts +59 -0
- package/dist/cjs/components/selectable-button-group/SelectableButtonGroup.js +1 -0
- package/dist/cjs/components/selectable-button-group/parts/SelectableButton.d.ts +127 -0
- package/dist/cjs/components/selectable-button-group/parts/SelectableButton.js +1 -0
- package/dist/cjs/components/tabs/parts/TabList.js +1 -1
- package/dist/cjs/components/text-area/TextArea.js +1 -1
- package/dist/cjs/components/toast/UnityToast.d.ts +2 -2
- package/dist/cjs/components/toast/UnityToast.js +1 -1
- package/dist/cjs/components/tooltip/Tooltip.js +1 -1
- package/dist/cjs/index.d.ts +10 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/utils.d.ts +1 -0
- package/dist/esm/components/alert/Alert.mjs +1 -1
- package/dist/esm/components/app-menu/parts/AppMenuFooter.mjs +3 -3
- package/dist/esm/components/avatar/parts/AvatarPair.mjs +10 -10
- package/dist/esm/components/badge/Badge.d.mts +3 -0
- package/dist/esm/components/badge/Badge.mjs +12 -10
- package/dist/esm/components/breadcrumbs/parts/Breadcrumb.mjs +10 -10
- package/dist/esm/components/checkbox/parts/CheckboxIndicator.mjs +1 -1
- package/dist/esm/components/collapsible/Collapsible.d.mts +33 -0
- package/dist/esm/components/collapsible/parts/CollapsibleContent.d.mts +36 -0
- package/dist/esm/components/collapsible/parts/CollapsibleTitle.d.mts +39 -0
- package/dist/esm/components/date-picker/DatePicker.mjs +1 -1
- package/dist/esm/components/date-picker/parts/DateInput.mjs +7 -7
- package/dist/esm/components/fieldset/Fieldset.d.mts +150 -0
- package/dist/esm/components/fieldset/Fieldset.mjs +65 -0
- package/dist/esm/components/fieldset/parts/FieldGroup.d.mts +27 -0
- package/dist/esm/components/fieldset/parts/FieldGroup.mjs +18 -0
- package/dist/esm/components/form/Form.mjs +5 -5
- package/dist/esm/components/form-field/parts/FormControl.d.mts +23 -0
- package/dist/esm/components/icon-button/CircularIconButton.mjs +10 -11
- package/dist/esm/components/icon-button/IconButton.variants.mjs +9 -9
- package/dist/esm/components/input/Input.mjs +30 -30
- package/dist/esm/components/menu/parts/MenuContent.mjs +1 -1
- package/dist/esm/components/multi-select/MultiSelect.d.mts +62 -0
- package/dist/esm/components/multi-select/MultiSelect.mjs +230 -0
- package/dist/esm/components/multi-select/Multiselect.context.d.mts +7 -0
- package/dist/esm/components/multi-select/Multiselect.context.mjs +8 -0
- package/dist/esm/components/multi-select/Multiselect.types.d.mts +109 -0
- package/dist/esm/components/multi-select/hooks/use-combobox-filter.d.mts +12 -0
- package/dist/esm/components/multi-select/hooks/use-combobox-filter.mjs +22 -0
- package/dist/esm/components/multi-select/hooks/use-multiselection-state.d.mts +14 -0
- package/dist/esm/components/multi-select/hooks/use-multiselection-state.mjs +47 -0
- package/dist/esm/components/multi-select/parts/MultiSelectButton.d.mts +16 -0
- package/dist/esm/components/multi-select/parts/MultiSelectButton.mjs +160 -0
- package/dist/esm/components/multi-select/parts/MultiSelectOptGroup.d.mts +69 -0
- package/dist/esm/components/multi-select/parts/MultiSelectOptGroup.mjs +34 -0
- package/dist/esm/components/multi-select/parts/MultiSelectOption.d.mts +20 -0
- package/dist/esm/components/multi-select/parts/MultiSelectOption.mjs +85 -0
- package/dist/esm/components/multi-select/parts/MultiSelectPopover.d.mts +7 -0
- package/dist/esm/components/multi-select/parts/MultiSelectPopover.mjs +65 -0
- package/dist/esm/components/multi-select-field/MultiSelectField.d.mts +59 -0
- package/dist/esm/components/multi-select-field/MultiSelectField.mjs +81 -0
- package/dist/esm/components/segmented-button-group/SegmentedButtonGroup.d.mts +43 -0
- package/dist/esm/components/segmented-button-group/SegmentedButtonGroups.context.d.mts +8 -0
- package/dist/esm/components/segmented-button-group/parts/ToggleButton.d.mts +47 -0
- package/dist/esm/components/select/Select.mjs +19 -19
- package/dist/esm/components/select/parts/SearchInput.mjs +7 -7
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.context.d.mts +2 -0
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.context.mjs +5 -0
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.d.mts +59 -0
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.mjs +25 -0
- package/dist/esm/components/selectable-button-group/parts/SelectableButton.d.mts +127 -0
- package/dist/esm/components/selectable-button-group/parts/SelectableButton.mjs +98 -0
- package/dist/esm/components/tabs/parts/TabList.mjs +47 -25
- package/dist/esm/components/text-area/TextArea.mjs +28 -30
- package/dist/esm/components/toast/UnityToast.d.mts +2 -2
- package/dist/esm/components/toast/UnityToast.mjs +5 -5
- package/dist/esm/components/tooltip/Tooltip.mjs +11 -17
- package/dist/esm/index.d.mts +10 -0
- package/dist/esm/index.mjs +176 -155
- package/dist/esm/providers/router/RouterProvider.mjs +3 -3
- package/dist/esm/types/utils.d.mts +1 -0
- package/i18n/en-GB.json +1 -0
- package/i18n/es-ES.json +1 -0
- package/i18n/fr-FR.json +1 -0
- package/package.json +20 -18
- package/dist/cjs/components/index.d.ts +0 -4
- package/dist/esm/components/index.d.mts +0 -4
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as j, forwardRef as E, useContext as A, useMemo as D } from "react";
|
|
3
|
+
import { useSelectContext as K, useStoreState as $, Select as k } from "@ariakit/react";
|
|
4
|
+
import { useId as L } from "react-aria";
|
|
5
|
+
import { useIntl as R } from "react-intl";
|
|
6
|
+
import { tv as U } from "tailwind-variants";
|
|
7
|
+
import { Badge as W } from "../../badge/Badge.mjs";
|
|
8
|
+
import { CircularIconButton as q } from "../../icon-button/CircularIconButton.mjs";
|
|
9
|
+
import { Icon as p } from "../../icon/Icon.mjs";
|
|
10
|
+
import { Spinner as F } from "../../spinner/Spinner.mjs";
|
|
11
|
+
import { MultiSelectContext as G } from "../Multiselect.context.mjs";
|
|
12
|
+
const H = U({
|
|
13
|
+
slots: {
|
|
14
|
+
base: "uy-h-500 uy-flex uy-items-center uy-justify-between uy-py-100 uy-px-150 uy-w-full uy-border uy-border-solid uy-rounded-100 focus-within:uy-outline-none focus-within:uy-ring-2 focus-within:uy-ring-utility-focus-ring focus-within:uy-ring-offset-2 active:not([disabled]):uy-border-border-form-active !uy-pointer-events-auto",
|
|
15
|
+
inputValue: "uy-flex-1 uy-typography-body uy-text-content-form-enabled uy-text-left uy-line-clamp-1",
|
|
16
|
+
state: "uy-grow-0 uy-outline-none uy-typography-body placeholder:uy-text-content-neutral-lowest uy-inline-flex uy-gap-50 uy-items-center uy-px-100",
|
|
17
|
+
suffix: ""
|
|
18
|
+
},
|
|
19
|
+
variants: {
|
|
20
|
+
isDisabled: {
|
|
21
|
+
true: {
|
|
22
|
+
base: "uy-bg-surface-form-disabled uy-cursor-not-allowed uy-border-border-form-disabled uy-text-content-form-disabled",
|
|
23
|
+
inputValue: "!uy-text-content-form-disabled",
|
|
24
|
+
state: "uy-text-content-form-disabled",
|
|
25
|
+
suffix: "uy-text-content-form-disabled"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
isReadOnly: {
|
|
29
|
+
true: {
|
|
30
|
+
base: "uy-bg-surface-form-disabled uy-cursor-not-allowed uy-border-border-form-disabled",
|
|
31
|
+
inputValue: "uy-text-content-form-disabled",
|
|
32
|
+
state: "uy-text-content-form-disabled",
|
|
33
|
+
suffix: "uy-text-content-form-disabled"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
isInvalid: {
|
|
37
|
+
true: {
|
|
38
|
+
base: "uy-bg-surface-form-error uy-border-border-form-error",
|
|
39
|
+
inputValue: "uy-text-content-form-error",
|
|
40
|
+
state: "uy-text-content-form-error",
|
|
41
|
+
suffix: "uy-text-content-form-error"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
isEmpty: {
|
|
45
|
+
true: {
|
|
46
|
+
inputValue: "uy-text-content-neutral-lowest"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
compoundVariants: [
|
|
51
|
+
{
|
|
52
|
+
isInvalid: !1,
|
|
53
|
+
isDisabled: !1,
|
|
54
|
+
isReadOnly: !1,
|
|
55
|
+
className: {
|
|
56
|
+
base: "uy-border-border-form-enabled uy-bg-surface-form-enabled",
|
|
57
|
+
inputValue: "uy-text-content-form-enabled uy-bg-surface-form-enabled",
|
|
58
|
+
state: "uy-text-content-neutral-disabled",
|
|
59
|
+
suffix: "uy-border-border-form-enabled uy-text-content-form-enabled"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
});
|
|
64
|
+
function J({
|
|
65
|
+
isDisabled: r,
|
|
66
|
+
isReadOnly: t,
|
|
67
|
+
isLoading: d,
|
|
68
|
+
isInvalid: n,
|
|
69
|
+
placeholder: u,
|
|
70
|
+
selectedItems: g,
|
|
71
|
+
renderValue: m,
|
|
72
|
+
onClearButtonPress: i,
|
|
73
|
+
...h
|
|
74
|
+
}, w) {
|
|
75
|
+
const f = L(), s = R(), S = K(), M = $(S, "open"), y = A(G), l = y.maxVisibleItems ?? 0, a = y.selectedKeys ?? /* @__PURE__ */ new Set(), o = Array.from(g), { base: I, inputValue: v, state: C, suffix: V } = H({
|
|
76
|
+
isDisabled: !!r,
|
|
77
|
+
isReadOnly: !!t,
|
|
78
|
+
isInvalid: !!n,
|
|
79
|
+
isEmpty: a.size === 0
|
|
80
|
+
}), b = Math.max(
|
|
81
|
+
o.length - l,
|
|
82
|
+
0
|
|
83
|
+
), N = a.size > 0 && !r && !t && !d, B = D(() => {
|
|
84
|
+
if (o.length === 0) return u;
|
|
85
|
+
const O = o.slice(0, l), z = new Set(O);
|
|
86
|
+
return m(z);
|
|
87
|
+
}, [o, l, m, u]);
|
|
88
|
+
return /* @__PURE__ */ c(
|
|
89
|
+
k,
|
|
90
|
+
{
|
|
91
|
+
...h,
|
|
92
|
+
ref: w,
|
|
93
|
+
className: I(),
|
|
94
|
+
disabled: r || t,
|
|
95
|
+
"aria-invalid": n,
|
|
96
|
+
"aria-readonly": t,
|
|
97
|
+
"aria-labelledby": `${f}-select-button-label`,
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ e("span", { id: `${f}-select-button-label`, className: v(), children: a.size > 0 ? B : u }),
|
|
100
|
+
/* @__PURE__ */ c("div", { className: C(), children: [
|
|
101
|
+
d && /* @__PURE__ */ e(
|
|
102
|
+
F,
|
|
103
|
+
{
|
|
104
|
+
color: "inherit",
|
|
105
|
+
size: "small",
|
|
106
|
+
label: s.formatMessage({
|
|
107
|
+
id: "unity:component:form-field:form-input:spinner:label",
|
|
108
|
+
defaultMessage: "Loading"
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
n && /* @__PURE__ */ e(
|
|
113
|
+
p,
|
|
114
|
+
{
|
|
115
|
+
src: "WarningCircleOutlined",
|
|
116
|
+
color: "content.form.invalid",
|
|
117
|
+
alt: s.formatMessage({
|
|
118
|
+
id: "unity:component:form-field:form-input:error:alt",
|
|
119
|
+
defaultMessage: "Error"
|
|
120
|
+
})
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
b > 0 && /* @__PURE__ */ c(W, { variant: "numeric", children: [
|
|
124
|
+
"+",
|
|
125
|
+
b
|
|
126
|
+
] }),
|
|
127
|
+
N && /* @__PURE__ */ e(
|
|
128
|
+
q,
|
|
129
|
+
{
|
|
130
|
+
title: s.formatMessage({
|
|
131
|
+
id: "unity:component:form-field:form-input:clear:title",
|
|
132
|
+
defaultMessage: "Clear"
|
|
133
|
+
}),
|
|
134
|
+
className: "uy-text-content-neutral-enabled",
|
|
135
|
+
icon: "CloseOutlined",
|
|
136
|
+
onPress: () => {
|
|
137
|
+
i == null || i();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
] }),
|
|
142
|
+
/* @__PURE__ */ e(
|
|
143
|
+
p,
|
|
144
|
+
{
|
|
145
|
+
color: "inherit",
|
|
146
|
+
className: V(),
|
|
147
|
+
src: M ? "CaretUpOutlined" : "CaretDownOutlined",
|
|
148
|
+
role: "presentation"
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
const x = j(E(J));
|
|
156
|
+
x.displayName = "MultiselectButton";
|
|
157
|
+
const ne = x;
|
|
158
|
+
export {
|
|
159
|
+
ne as MultiSelectButton
|
|
160
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { default as React, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Base props for both static and dynamic MultiSelectOptGroup variants
|
|
4
|
+
*/
|
|
5
|
+
type BaseOptGroupProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
6
|
+
/** The label text displayed at the top of the group */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Whether to show a separator line after the group */
|
|
9
|
+
withSeparator?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Props for the dynamic API of MultiSelectOptGroup
|
|
13
|
+
* @template T - The type of items in the group
|
|
14
|
+
*/
|
|
15
|
+
export interface DynamicMultiSelectOptGroup<T> extends BaseOptGroupProps {
|
|
16
|
+
/** Array of items to render as options within the group */
|
|
17
|
+
items: T[];
|
|
18
|
+
/** Render function that converts each item into a MultiSelectOption */
|
|
19
|
+
children: (item: T) => React.JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Props for the static API of MultiSelectOptGroup
|
|
23
|
+
*/
|
|
24
|
+
export interface StaticMultiSelectOptGroup extends BaseOptGroupProps {
|
|
25
|
+
/** Not used in static API */
|
|
26
|
+
items?: never;
|
|
27
|
+
/** Static MultiSelectOption components to render within the group */
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Combined props type for MultiSelectOptGroup
|
|
32
|
+
* @template T - The type of items when using dynamic API
|
|
33
|
+
*/
|
|
34
|
+
export type MultiSelectOptGroupProps<T = unknown> = DynamicMultiSelectOptGroup<T> | StaticMultiSelectOptGroup;
|
|
35
|
+
/**
|
|
36
|
+
* Groups related options within a `MultiSelect` component.
|
|
37
|
+
*
|
|
38
|
+
* This component provides two APIs for grouping options:
|
|
39
|
+
* 1. Static API - Directly nest MultiSelectOption components
|
|
40
|
+
* 2. Dynamic API - Provide an array of items and a render function for dynamic items
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* // Static API
|
|
44
|
+
* <MultiSelectOptGroup label="Fruits" withSeparator>
|
|
45
|
+
* <MultiSelectOption value="apple">Apple</MultiSelectOption>
|
|
46
|
+
* <MultiSelectOption value="banana">Banana</MultiSelectOption>
|
|
47
|
+
* </MultiSelectOptGroup>
|
|
48
|
+
*
|
|
49
|
+
* // Dynamic API
|
|
50
|
+
* <MultiSelectOptGroup
|
|
51
|
+
* label="Fruits"
|
|
52
|
+
* items={fruits}
|
|
53
|
+
* withSeparator
|
|
54
|
+
* >
|
|
55
|
+
* {fruit => (
|
|
56
|
+
* <MultiSelectOption value={fruit.id}>
|
|
57
|
+
* {fruit.name}
|
|
58
|
+
* </MultiSelectOption>
|
|
59
|
+
* )}
|
|
60
|
+
* </MultiSelectOptGroup>
|
|
61
|
+
* ```
|
|
62
|
+
* @template T - The type of items when using the dynamic API
|
|
63
|
+
* @see {@link MultiSelectOption} for the child component API
|
|
64
|
+
*/
|
|
65
|
+
declare function MultiSelectOptGroup<T>(props: MultiSelectOptGroupProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
declare namespace MultiSelectOptGroup {
|
|
67
|
+
var displayName: string;
|
|
68
|
+
}
|
|
69
|
+
export { MultiSelectOptGroup };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as h } from "react";
|
|
3
|
+
import { ComboboxGroup as x, ComboboxGroupLabel as C, SelectGroup as G, SelectGroupLabel as S } from "@ariakit/react";
|
|
4
|
+
import { tv as N } from "tailwind-variants";
|
|
5
|
+
import { MultiSelectContext as g } from "../Multiselect.context.mjs";
|
|
6
|
+
const M = N({
|
|
7
|
+
slots: {
|
|
8
|
+
base: "uy-flex uy-flex-col uy-bg-surface-neutral",
|
|
9
|
+
label: "uy-px-150 uy-py-100 uy-typography-body-strong uy-text-content-neutral",
|
|
10
|
+
separator: "uy-my-100 uy-border-t uy-border-border-neutral"
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
function O(e) {
|
|
14
|
+
return "items" in e && Array.isArray(e.items) && typeof e.children == "function";
|
|
15
|
+
}
|
|
16
|
+
function j(e) {
|
|
17
|
+
const c = h(g), { base: i, label: r, separator: n } = M(), { label: o, withSeparator: a, className: m, ...y } = e, p = (b, d) => b.map((f) => d(f)), l = O(e) ? p(e.items, e.children) : e.children, s = {
|
|
18
|
+
className: i({ className: m }),
|
|
19
|
+
...y
|
|
20
|
+
};
|
|
21
|
+
return c.isSearchable ? /* @__PURE__ */ u(x, { ...s, children: [
|
|
22
|
+
/* @__PURE__ */ t(C, { className: r(), children: o }),
|
|
23
|
+
l,
|
|
24
|
+
a && /* @__PURE__ */ t("hr", { className: n(), "aria-hidden": !0, role: "presentation" })
|
|
25
|
+
] }) : /* @__PURE__ */ u(G, { ...s, children: [
|
|
26
|
+
/* @__PURE__ */ t(S, { className: r(), children: o }),
|
|
27
|
+
l,
|
|
28
|
+
a && /* @__PURE__ */ t("hr", { className: n(), "aria-hidden": !0, role: "presentation" })
|
|
29
|
+
] });
|
|
30
|
+
}
|
|
31
|
+
j.displayName = "MultiSelectOptGroup";
|
|
32
|
+
export {
|
|
33
|
+
j as MultiSelectOptGroup
|
|
34
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the MultiSelectOption component.
|
|
4
|
+
* @template T - The type of the value this option represents (string or number)
|
|
5
|
+
*/
|
|
6
|
+
export interface MultiSelectOptionProps<T> {
|
|
7
|
+
/** The value associated with this option. Must be unique within the MultiSelect */
|
|
8
|
+
value: T;
|
|
9
|
+
/** The content to display for this option */
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/** Whether the option is disabled. When true, the option cannot be selected */
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
/** Whether the option should receive focus when rendered. Use sparingly */
|
|
14
|
+
autoFocus?: boolean;
|
|
15
|
+
/** Additional text displayed below the option to provide more context */
|
|
16
|
+
helperText?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const MultiSelectOption: <T>(props: MultiSelectOptionProps<T> & {
|
|
19
|
+
ref?: React.ForwardedRef<HTMLDivElement>;
|
|
20
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p, useContext as b, createElement as x } from "react";
|
|
3
|
+
import { SelectItem as v, ComboboxItem as h, SelectItemCheck as S } from "@ariakit/react";
|
|
4
|
+
import { tv as g } from "tailwind-variants";
|
|
5
|
+
import C from "../../../hooks/use-id.mjs";
|
|
6
|
+
import { CheckboxIndicator as k } from "../../checkbox/parts/CheckboxIndicator.mjs";
|
|
7
|
+
import { MultiSelectContext as I } from "../Multiselect.context.mjs";
|
|
8
|
+
const O = g({
|
|
9
|
+
slots: {
|
|
10
|
+
base: [
|
|
11
|
+
"uy-flex uy-flex-col uy-transition",
|
|
12
|
+
"uy-w-full uy-px-150 uy-py-100",
|
|
13
|
+
"uy-rounded-50 uy-cursor-pointer",
|
|
14
|
+
"hover:uy-bg-surface-neutral-hover",
|
|
15
|
+
"active:uy-bg-surface-neutral-pressed",
|
|
16
|
+
"focus-visible:uy-outline focus-visible:uy-outline-2 focus-visible:uy-outline-utility-focus-ring focus-visible:uy-outline-offset-2",
|
|
17
|
+
"data-[active-item=true]:uy-outline data-[active-item=true]:uy-outline-2 data-[active-item=true]:uy-outline-utility-focus-ring data-[active-item=true]:uy-outline-offset-2"
|
|
18
|
+
],
|
|
19
|
+
label: "uy-inline-flex uy-items-center uy-gap-100 uy-text-content-neutral uy-typography-body",
|
|
20
|
+
helperText: "uy-inline-block uy-typography-body uy-text-content-neutral-low uy-pl-300"
|
|
21
|
+
},
|
|
22
|
+
variants: {
|
|
23
|
+
isDisabled: {
|
|
24
|
+
true: {
|
|
25
|
+
base: "!uy-cursor-not-allowed",
|
|
26
|
+
label: "uy-text-content-neutral-disabled"
|
|
27
|
+
},
|
|
28
|
+
false: {
|
|
29
|
+
base: ""
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
function w({
|
|
35
|
+
isDisabled: i
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ e(
|
|
38
|
+
S,
|
|
39
|
+
{
|
|
40
|
+
render: (t) => /* @__PURE__ */ e(
|
|
41
|
+
k,
|
|
42
|
+
{
|
|
43
|
+
isSelected: "children" in t && !!t.children,
|
|
44
|
+
isDisabled: i
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function n({
|
|
51
|
+
value: i,
|
|
52
|
+
children: t,
|
|
53
|
+
isDisabled: u,
|
|
54
|
+
helperText: l,
|
|
55
|
+
autoFocus: r = !1,
|
|
56
|
+
...a
|
|
57
|
+
}, s) {
|
|
58
|
+
const o = C(), c = b(I), { base: y, label: d, helperText: f } = O({ isDisabled: u });
|
|
59
|
+
return /* @__PURE__ */ x(
|
|
60
|
+
v,
|
|
61
|
+
{
|
|
62
|
+
...a,
|
|
63
|
+
ref: s,
|
|
64
|
+
id: o,
|
|
65
|
+
key: o,
|
|
66
|
+
value: String(i),
|
|
67
|
+
disabled: u,
|
|
68
|
+
className: y(),
|
|
69
|
+
autoFocus: r,
|
|
70
|
+
focusOnHover: !1,
|
|
71
|
+
"aria-describedby": l ? `${o}-helper-text` : void 0,
|
|
72
|
+
render: c.isSearchable ? /* @__PURE__ */ e(h, {}) : void 0
|
|
73
|
+
},
|
|
74
|
+
/* @__PURE__ */ m("div", { className: d(), children: [
|
|
75
|
+
/* @__PURE__ */ e(w, { isDisabled: u }),
|
|
76
|
+
t
|
|
77
|
+
] }),
|
|
78
|
+
l && /* @__PURE__ */ e("span", { id: `${o}-helper-text`, className: f(), children: l })
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
n.displayName = "MultiSelectOption";
|
|
82
|
+
const R = p(n);
|
|
83
|
+
export {
|
|
84
|
+
R as MultiSelectOption
|
|
85
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SelectPopoverProps } from '@ariakit/react';
|
|
2
|
+
type MultiSelectPopoverProps = SelectPopoverProps & {
|
|
3
|
+
onBlur?: () => void;
|
|
4
|
+
};
|
|
5
|
+
declare function MultiSelectPopoverComponent({ children, ...props }: MultiSelectPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const MultiSelectPopover: import('react').MemoExoticComponent<typeof MultiSelectPopoverComponent>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { memo as b, useContext as f } from "react";
|
|
3
|
+
import { SelectPopover as v, Combobox as h, ComboboxList as x } from "@ariakit/react";
|
|
4
|
+
import { tv as i } from "tailwind-variants";
|
|
5
|
+
import { Icon as g } from "../../icon/Icon.mjs";
|
|
6
|
+
import { MultiSelectContext as w } from "../Multiselect.context.mjs";
|
|
7
|
+
const S = i({
|
|
8
|
+
slots: {
|
|
9
|
+
base: "uy-shadow-floating uy-absolute uy-top-full uy-left-0 uy-w-full uy-rounded-75 uy-border uy-border-solid uy-border-border-neutral uy-bg-surface-neutral uy-overflow-auto uy-max-h-[min(var(--popover-available-height,300px),300px)] uy-outline-none",
|
|
10
|
+
list: "uy-p-100"
|
|
11
|
+
}
|
|
12
|
+
}), N = i({
|
|
13
|
+
slots: {
|
|
14
|
+
wrapper: "uy-sticky uy-top-0 uy-bg-surface-neutral uy-pt-100 uy-px-100",
|
|
15
|
+
base: "uy-flex uy-w-full uy-gap-100 uy-h-500 uy-border uy-border-solid uy-rounded-75 uy-py-100 uy-border-border-form-enabled uy-bg-surface-form-enabled uy-px-150 focus-within:uy-outline-none focus-within:uy-ring-2 focus-within:uy-ring-utility-focus-ring focus-within:uy-ring-offset-2 active:uy-border-border-form-active",
|
|
16
|
+
input: "focus-visible:uy-outline-none",
|
|
17
|
+
divider: "uy-my-100 uy-border-t uy-border-border-neutral"
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
function C({
|
|
21
|
+
children: t,
|
|
22
|
+
...s
|
|
23
|
+
}) {
|
|
24
|
+
const l = f(w), { base: n, list: u } = S(), { base: a, input: y, wrapper: c, divider: d } = N(), { onBlur: o, ...p } = s;
|
|
25
|
+
return /* @__PURE__ */ e(
|
|
26
|
+
v,
|
|
27
|
+
{
|
|
28
|
+
portal: !0,
|
|
29
|
+
sameWidth: !0,
|
|
30
|
+
unmountOnHide: !0,
|
|
31
|
+
className: n(),
|
|
32
|
+
onClose: () => o == null ? void 0 : o(),
|
|
33
|
+
...p,
|
|
34
|
+
children: l.isSearchable ? /* @__PURE__ */ r(m, { children: [
|
|
35
|
+
/* @__PURE__ */ r("div", { className: c(), children: [
|
|
36
|
+
/* @__PURE__ */ r("div", { className: a(), children: [
|
|
37
|
+
/* @__PURE__ */ e(
|
|
38
|
+
g,
|
|
39
|
+
{
|
|
40
|
+
src: "MagnifyingGlassOutlined",
|
|
41
|
+
color: "content.neutral.lowest",
|
|
42
|
+
"aria-hidden": !0
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ e(
|
|
46
|
+
h,
|
|
47
|
+
{
|
|
48
|
+
autoSelect: !0,
|
|
49
|
+
placeholder: "Search...",
|
|
50
|
+
className: y()
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ e("hr", { className: d() })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ e(x, { className: u(), children: t })
|
|
57
|
+
] }) : /* @__PURE__ */ e("div", { className: u(), children: t })
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
const M = b(C);
|
|
62
|
+
M.displayName = "MultiSelectPopover";
|
|
63
|
+
export {
|
|
64
|
+
M as MultiSelectPopover
|
|
65
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ForwardedRef, ReactNode } from 'react';
|
|
2
|
+
import { FieldPath, FieldValues } from 'react-hook-form';
|
|
3
|
+
import { infer as ZodInfer } from 'zod';
|
|
4
|
+
import { Schema } from '../../hooks/use-form.types.mjs';
|
|
5
|
+
import { LabelProps } from '../label/Label.mjs';
|
|
6
|
+
import { MultiSelectProps } from '../multi-select/Multiselect.types.mjs';
|
|
7
|
+
type Key = string | number;
|
|
8
|
+
interface FieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Pick<LabelProps, 'isRequired' | 'requiredVariant'> {
|
|
9
|
+
/** The name of the field, which should match the form schema. */
|
|
10
|
+
name: TName;
|
|
11
|
+
/** The label for the multi-select field. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Helper text to display below the multi-select field. */
|
|
14
|
+
helperText?: ReactNode;
|
|
15
|
+
/** Feedback text to display below the multi-select field. */
|
|
16
|
+
feedbackText?: ReactNode;
|
|
17
|
+
/** A contextual link to display below the multi-select field. */
|
|
18
|
+
contextualLink?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
type BaseMultiSelectProps<TItem, // Item type
|
|
21
|
+
TItemKey extends keyof TItem, // key name of the item
|
|
22
|
+
TKeyType extends TItem[TItemKey] & Key> = Omit<MultiSelectProps<TItem, TItemKey, TKeyType>, 'value' | 'defaultValue' | 'onChange' | 'aria-labelledby' | 'aria-label'>;
|
|
23
|
+
export type MultiSelectFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TItem = unknown, TItemKey extends keyof TItem = keyof TItem, TKeyType extends TItem[TItemKey] & Key = TItem[TItemKey] & Key> = FieldProps<TFieldValues, TName> & BaseMultiSelectProps<TItem, TItemKey, TKeyType>;
|
|
24
|
+
/**
|
|
25
|
+
* The `MultiSelectField` component renders a full field that allows selecting multiple items from a dropdown list, and integrates with the `Form` component automatically.
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* const schema = z.object({
|
|
29
|
+
* fruits: z.set(z.string()),
|
|
30
|
+
* })
|
|
31
|
+
*
|
|
32
|
+
* function MyForm() {
|
|
33
|
+
* const { Form } = useUnityForm(schema)
|
|
34
|
+
*
|
|
35
|
+
* return (
|
|
36
|
+
* <Form action={handleSubmit}>
|
|
37
|
+
* <MultiSelectField<typeof schema>
|
|
38
|
+
* name="fruits"
|
|
39
|
+
* label="Select fruits"
|
|
40
|
+
* >
|
|
41
|
+
* <MultiSelectOption value="apple">Apple</MultiSelectOption>
|
|
42
|
+
* <MultiSelectOption value="banana">Banana</MultiSelectOption>
|
|
43
|
+
* <MultiSelectOption value="orange">Orange</MultiSelectOption>
|
|
44
|
+
* </MultiSelectField>
|
|
45
|
+
* </Form>
|
|
46
|
+
* )
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
* @note The schema type parameter is needed to ensure type safety with the form's schema. If you omit it, the `name` prop will not be type-safe.
|
|
50
|
+
* @remarks
|
|
51
|
+
* [API & Docs](https://unity-components.payfit.io/?path=/docs/forms-multiselectfield--docs) • [Design Guidelines](https://www.payfit.design/24f360409/p/928776-multiselect)
|
|
52
|
+
*/
|
|
53
|
+
export declare const MultiSelectField: {
|
|
54
|
+
<TSchema extends Schema, TItem = unknown>(props: MultiSelectFieldProps<ZodInfer<TSchema>, FieldPath<ZodInfer<TSchema>>, TItem, keyof TItem, TItem[keyof TItem] & Key> & {
|
|
55
|
+
ref?: ForwardedRef<HTMLButtonElement>;
|
|
56
|
+
}): React.JSX.Element;
|
|
57
|
+
displayName?: string;
|
|
58
|
+
};
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsxs as V, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as P } from "react";
|
|
3
|
+
import { useFormContext as T } from "react-hook-form";
|
|
4
|
+
import { tv as g } from "tailwind-variants";
|
|
5
|
+
import { FormField as L } from "../form-field/FormField.mjs";
|
|
6
|
+
import { FormControl as R } from "../form-field/parts/FormControl.mjs";
|
|
7
|
+
import { FormFeedbackText as j } from "../form-field/parts/FormFeedbackText.mjs";
|
|
8
|
+
import { FormHelperText as k } from "../form-field/parts/FormHelperText.mjs";
|
|
9
|
+
import { FormLabel as q } from "../form-field/parts/FormLabel.mjs";
|
|
10
|
+
import { MultiSelect as u } from "../multi-select/MultiSelect.mjs";
|
|
11
|
+
const v = g({
|
|
12
|
+
base: "uy-flex uy-flex-col uy-gap-100"
|
|
13
|
+
});
|
|
14
|
+
function w(e, i) {
|
|
15
|
+
const { control: l, setValue: f } = T(), {
|
|
16
|
+
name: o,
|
|
17
|
+
label: p,
|
|
18
|
+
helperText: n,
|
|
19
|
+
feedbackText: x,
|
|
20
|
+
contextualLink: F,
|
|
21
|
+
isRequired: h,
|
|
22
|
+
isInvalid: b,
|
|
23
|
+
isLoading: m,
|
|
24
|
+
isDisabled: c,
|
|
25
|
+
isReadOnly: s,
|
|
26
|
+
requiredVariant: S,
|
|
27
|
+
children: a,
|
|
28
|
+
onClearButtonPress: r,
|
|
29
|
+
...y
|
|
30
|
+
} = e, I = {
|
|
31
|
+
isRequired: h,
|
|
32
|
+
isInvalid: b,
|
|
33
|
+
isLoading: m,
|
|
34
|
+
isDisabled: c,
|
|
35
|
+
isReadOnly: s
|
|
36
|
+
}, M = "items" in e && "getItemValue" in e, d = {
|
|
37
|
+
onClearButtonPress: () => {
|
|
38
|
+
f(o, /* @__PURE__ */ new Set()), r == null || r();
|
|
39
|
+
},
|
|
40
|
+
placeholder: e.placeholder,
|
|
41
|
+
isSearchable: e.isSearchable,
|
|
42
|
+
maxVisibleItems: e.maxVisibleItems,
|
|
43
|
+
isDisabled: c,
|
|
44
|
+
isReadOnly: s,
|
|
45
|
+
isLoading: m
|
|
46
|
+
};
|
|
47
|
+
return /* @__PURE__ */ V(
|
|
48
|
+
L,
|
|
49
|
+
{
|
|
50
|
+
control: l,
|
|
51
|
+
name: o,
|
|
52
|
+
className: v(),
|
|
53
|
+
...I,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ t(q, { requiredVariant: S, children: p }),
|
|
56
|
+
n && /* @__PURE__ */ t(k, { children: n }),
|
|
57
|
+
/* @__PURE__ */ t(R, { children: M ? (
|
|
58
|
+
// @ts-expect-error - Type system cannot fully express this but it works correctly at runtime
|
|
59
|
+
/* @__PURE__ */ t(
|
|
60
|
+
u,
|
|
61
|
+
{
|
|
62
|
+
...y,
|
|
63
|
+
...d,
|
|
64
|
+
ref: i,
|
|
65
|
+
children: a
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
) : /* @__PURE__ */ t(u, { ...d, ref: i, children: a }) }),
|
|
69
|
+
/* @__PURE__ */ t(j, { children: x }),
|
|
70
|
+
F
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
const C = P(function(i, l) {
|
|
76
|
+
return w(i, l);
|
|
77
|
+
});
|
|
78
|
+
C.displayName = "MultiSelectField";
|
|
79
|
+
export {
|
|
80
|
+
C as MultiSelectField
|
|
81
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RadioGroupProps } from 'react-aria-components';
|
|
3
|
+
export interface BasedSegmentedButtonGroupProps extends Omit<RadioGroupProps, 'children' | 'style' | 'className' | 'isDisabled' | 'isInvalid' | 'isReadOnly' | 'orientation' | 'validationBehavior' | 'isRequired' | 'validate' | 'defaultValue'> {
|
|
4
|
+
/**
|
|
5
|
+
* The content of the `SegmentedButtonGroup`. Should contain `ToggleButton` components as children.
|
|
6
|
+
*/
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface UncontrolledSegmentedButtonGroupProps extends BasedSegmentedButtonGroupProps, Required<Pick<RadioGroupProps, 'defaultValue'>> {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The `SegmentedButtonGroup` component is an accessible control that allows users to select one option from a set of mutually exclusive options.
|
|
13
|
+
* It's similar to a radio group but styled as connected buttons, providing a more compact and visually distinct selection mechanism.
|
|
14
|
+
* Use this component when you need to:
|
|
15
|
+
* - Present a small set of related but mutually exclusive options
|
|
16
|
+
* - Create a toggle between different views or modes
|
|
17
|
+
* - Provide a compact alternative to radio buttons or tabs
|
|
18
|
+
* - Allow users to switch between different states of the same content*
|
|
19
|
+
* The component supports both controlled and uncontrolled usage patterns.
|
|
20
|
+
* @see {@link ToggleButton} - The child component used within SegmentedButtonGroup
|
|
21
|
+
* @see {@link https://react-spectrum.adobe.com/react-aria/useRadioGroup.html|React Aria useRadioGroup} - The underlying hook used for accessibility
|
|
22
|
+
* @see {@link https://www.payfit.design/24f360409/p/2745fe-segmented-control|Design System Documentation}
|
|
23
|
+
* @example
|
|
24
|
+
* Basic usage:
|
|
25
|
+
* ```tsx
|
|
26
|
+
* import { SegmentedButtonGroup, ToggleButton } from '@payfit/unity'
|
|
27
|
+
*
|
|
28
|
+
* function Example() {
|
|
29
|
+
* return (
|
|
30
|
+
* <SegmentedButtonGroup>
|
|
31
|
+
* <ToggleButton value="option1">Option 1</ToggleButton>
|
|
32
|
+
* <ToggleButton value="option2">Option 2</ToggleButton>
|
|
33
|
+
* <ToggleButton value="option3">Option 3</ToggleButton>
|
|
34
|
+
* </SegmentedButtonGroup>
|
|
35
|
+
* )
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare const SegmentedButtonGroup: {
|
|
40
|
+
(props: UncontrolledSegmentedButtonGroupProps | BasedSegmentedButtonGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
|
43
|
+
export { SegmentedButtonGroup };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { RadioGroupState } from 'react-stately';
|
|
3
|
+
interface SegmentedButtonGroupContextValue {
|
|
4
|
+
state: RadioGroupState;
|
|
5
|
+
}
|
|
6
|
+
export declare const SegmentedButtonGroupContext: import('react').Context<SegmentedButtonGroupContextValue>;
|
|
7
|
+
export declare function SegmentedButtonGroupProvider({ children, state, }: PropsWithChildren<SegmentedButtonGroupContextValue>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|