@frontify/fondue-components 18.0.0 → 18.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fondue-components.js +56 -54
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +28 -142
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +141 -34
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +36 -103
- package/dist/fondue-components12.js.map +1 -1
- package/dist/fondue-components13.js +103 -36
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components14.js +30 -40
- package/dist/fondue-components14.js.map +1 -1
- package/dist/fondue-components15.js +47 -28
- package/dist/fondue-components15.js.map +1 -1
- package/dist/fondue-components16.js +28 -39
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components17.js +34 -16
- package/dist/fondue-components17.js.map +1 -1
- package/dist/fondue-components18.js +21 -71
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +71 -36
- package/dist/fondue-components19.js.map +1 -1
- package/dist/fondue-components20.js +34 -53
- package/dist/fondue-components20.js.map +1 -1
- package/dist/fondue-components21.js +54 -137
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +136 -53
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +54 -28
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +28 -153
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +151 -118
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +120 -31
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +32 -65
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +65 -10
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +10 -55
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +1 -1
- package/dist/fondue-components30.js +55 -14
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +15 -32
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +7 -4
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +7 -12
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +32 -155
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +5 -118
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +10 -116
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +147 -13
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +116 -30
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +118 -62
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +56 -34
- package/dist/fondue-components4.js.map +1 -1
- package/dist/fondue-components40.js +20 -129
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +32 -21
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +62 -45
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +129 -7
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +21 -13
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +45 -15
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +8 -60
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +13 -18
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +12 -16
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +60 -5
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components5.js +32 -38
- package/dist/fondue-components5.js.map +1 -1
- package/dist/fondue-components50.js +18 -15
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +18 -4
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +3 -17
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +15 -35
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +4 -4
- package/dist/fondue-components55.js +17 -11
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +35 -5
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +4 -24
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +12 -16
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +4 -146
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components6.js +42 -45
- package/dist/fondue-components6.js.map +1 -1
- package/dist/fondue-components60.js +25 -16
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +16 -76
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +147 -8
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +16 -33
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +75 -47
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +8 -11
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +32 -12
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +48 -12
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +10 -20
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +13 -15
- package/dist/fondue-components69.js.map +1 -1
- package/dist/fondue-components7.js +46 -51
- package/dist/fondue-components7.js.map +1 -1
- package/dist/fondue-components70.js +12 -52
- package/dist/fondue-components70.js.map +1 -1
- package/dist/fondue-components71.js +20 -14
- package/dist/fondue-components71.js.map +1 -1
- package/dist/fondue-components72.js +15 -26
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +55 -14
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +14 -6
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +23 -4
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +15 -2
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components77.js +5 -15
- package/dist/fondue-components77.js.map +1 -1
- package/dist/fondue-components78.js +6 -39
- package/dist/fondue-components78.js.map +1 -1
- package/dist/fondue-components79.js +5 -0
- package/dist/fondue-components79.js.map +1 -0
- package/dist/fondue-components8.js +46 -144
- package/dist/fondue-components8.js.map +1 -1
- package/dist/fondue-components80.js +8 -0
- package/dist/fondue-components80.js.map +1 -0
- package/dist/fondue-components81.js +8 -0
- package/dist/fondue-components81.js.map +1 -0
- package/dist/fondue-components82.js +20 -0
- package/dist/fondue-components82.js.map +1 -0
- package/dist/fondue-components83.js +43 -0
- package/dist/fondue-components83.js.map +1 -0
- package/dist/fondue-components9.js +146 -27
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +70 -7
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,141 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
i.current = !0, e.currentTarget.dataset.showFocusRing = "false";
|
|
53
|
-
},
|
|
54
|
-
onFocus: (e) => {
|
|
55
|
-
i.current || (e.target.dataset.showFocusRing = "true");
|
|
56
|
-
},
|
|
57
|
-
onBlur: (e) => {
|
|
58
|
-
e.target.dataset.showFocusRing = "false", i.current = !1;
|
|
59
|
-
},
|
|
60
|
-
children: /* @__PURE__ */ d(
|
|
61
|
-
"div",
|
|
62
|
-
{
|
|
63
|
-
className: o.root,
|
|
64
|
-
"data-status": n,
|
|
65
|
-
"data-disabled": m,
|
|
66
|
-
"data-empty": !r,
|
|
67
|
-
"data-test-id": c,
|
|
68
|
-
...m ? {} : O({
|
|
69
|
-
"aria-label": "aria-label" in l ? l["aria-label"] : void 0,
|
|
70
|
-
ref: F
|
|
71
|
-
}),
|
|
72
|
-
children: [
|
|
73
|
-
/* @__PURE__ */ a("span", { className: o.selectedValue, children: H }),
|
|
74
|
-
v,
|
|
75
|
-
u && /* @__PURE__ */ a(
|
|
76
|
-
q,
|
|
77
|
-
{
|
|
78
|
-
onClick: (e) => {
|
|
79
|
-
e.stopPropagation(), V();
|
|
80
|
-
},
|
|
81
|
-
className: o.clear,
|
|
82
|
-
children: u
|
|
83
|
-
}
|
|
84
|
-
),
|
|
85
|
-
/* @__PURE__ */ d("div", { className: o.icons, children: [
|
|
86
|
-
/* @__PURE__ */ a(T, { size: 16, className: o.caret }),
|
|
87
|
-
n === "success" ? /* @__PURE__ */ a(
|
|
88
|
-
$,
|
|
89
|
-
{
|
|
90
|
-
size: 16,
|
|
91
|
-
className: o.iconSuccess,
|
|
92
|
-
"data-test-id": `${c}-success-icon`
|
|
93
|
-
}
|
|
94
|
-
) : null,
|
|
95
|
-
n === "error" ? /* @__PURE__ */ a(
|
|
96
|
-
A,
|
|
97
|
-
{
|
|
98
|
-
size: 16,
|
|
99
|
-
className: o.iconError,
|
|
100
|
-
"data-test-id": `${c}-error-icon`
|
|
101
|
-
}
|
|
102
|
-
) : null
|
|
103
|
-
] })
|
|
104
|
-
]
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
/* @__PURE__ */ a(
|
|
110
|
-
Y,
|
|
111
|
-
{
|
|
112
|
-
align: w,
|
|
113
|
-
side: y,
|
|
114
|
-
highlightedIndex: E,
|
|
115
|
-
getMenuProps: z,
|
|
116
|
-
getItemProps: D,
|
|
117
|
-
selectedItem: r,
|
|
118
|
-
hasInteractedSinceOpening: G,
|
|
119
|
-
viewportCollisionPadding: x,
|
|
120
|
-
children: k
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
] });
|
|
1
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "@radix-ui/react-toggle-group";
|
|
3
|
+
import { forwardRef as i } from "react";
|
|
4
|
+
import { useControllableState as N } from "./fondue-components60.js";
|
|
5
|
+
import e from "./fondue-components61.js";
|
|
6
|
+
const d = ({
|
|
7
|
+
children: a,
|
|
8
|
+
value: o,
|
|
9
|
+
defaultValue: s,
|
|
10
|
+
onValueChange: p,
|
|
11
|
+
hugWidth: f = !0,
|
|
12
|
+
...m
|
|
13
|
+
}, g) => {
|
|
14
|
+
const [C, u] = N({
|
|
15
|
+
prop: o,
|
|
16
|
+
defaultProp: s,
|
|
17
|
+
onChange: p
|
|
18
|
+
});
|
|
19
|
+
return /* @__PURE__ */ l(
|
|
20
|
+
n.Root,
|
|
21
|
+
{
|
|
22
|
+
ref: g,
|
|
23
|
+
...m,
|
|
24
|
+
className: e.root,
|
|
25
|
+
onValueChange: (r) => {
|
|
26
|
+
r && u(r);
|
|
27
|
+
},
|
|
28
|
+
value: C,
|
|
29
|
+
type: "single",
|
|
30
|
+
asChild: !1,
|
|
31
|
+
"data-hug-width": f,
|
|
32
|
+
"aria-disabled": m.disabled,
|
|
33
|
+
children: [
|
|
34
|
+
a,
|
|
35
|
+
/* @__PURE__ */ t("div", { className: e.activeIndicator })
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
d.displayName = "SegmentedControl.Root";
|
|
41
|
+
const c = ({ children: a, ...o }, s) => /* @__PURE__ */ l(n.Item, { ref: s, ...o, className: e.item, asChild: !1, children: [
|
|
42
|
+
/* @__PURE__ */ t("span", { className: e.separator }),
|
|
43
|
+
/* @__PURE__ */ l("span", { className: e.itemLabel, children: [
|
|
44
|
+
/* @__PURE__ */ t("span", { className: e.itemLabelActive, children: a }),
|
|
45
|
+
/* @__PURE__ */ t("span", { className: e.itemLabelInactive, children: a })
|
|
46
|
+
] })
|
|
47
|
+
] });
|
|
48
|
+
c.displayName = "SegmentedControl.Item";
|
|
49
|
+
const S = {
|
|
50
|
+
Root: i(d),
|
|
51
|
+
Item: i(c)
|
|
124
52
|
};
|
|
125
|
-
S.displayName = "Select";
|
|
126
|
-
const ee = K(S), t = ee;
|
|
127
|
-
t.displayName = "Select";
|
|
128
|
-
t.Combobox = U;
|
|
129
|
-
t.Combobox.displayName = "Select.Combobox";
|
|
130
|
-
t.Item = W;
|
|
131
|
-
t.Item.displayName = "Select.Item";
|
|
132
|
-
t.Group = X;
|
|
133
|
-
t.Group.displayName = "Select.Group";
|
|
134
|
-
t.Slot = Z;
|
|
135
|
-
t.Slot.displayName = "Select.Slot";
|
|
136
53
|
export {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
54
|
+
S as SegmentedControl,
|
|
55
|
+
c as SegmentedControlItem,
|
|
56
|
+
d as SegmentedControlRoot
|
|
140
57
|
};
|
|
141
58
|
//# sourceMappingURL=fondue-components21.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components21.js","sources":["../src/components/Select/Select.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretDown, IconCheckMark, IconExclamationMarkTriangle } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { Slot as RadixSlot } from '@radix-ui/react-slot';\nimport { useSelect } from 'downshift';\nimport { forwardRef, useRef, useState, type ForwardedRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\n\nimport { ForwardedRefCombobox } from './Combobox';\nimport { ForwardedRefSelectItem, ForwardedRefSelectItemGroup } from './SelectItem';\nimport { SelectMenu, type SelectMenuViewportCollisionPadding } from './SelectMenu';\nimport { ForwardedRefSelectSlot } from './SelectSlot';\nimport styles from './styles/select.module.scss';\nimport { useSelectData } from './useSelectData';\n\nexport type SelectComponentProps = {\n /**\n * Children of the Select component. This can contain the `Select.Slot` components for the label, decorators, clear action and menu.\n */\n children?: ReactNode;\n /**\n * Callback function that is called when an item is selected.\n */\n onSelect?: (selectedValue: string | null) => void;\n /**\n * The active value in the select component. This is used to control the select externally.\n */\n value?: string | null;\n /**\n * The default value of the select component. Used for uncontrolled usages.\n */\n defaultValue?: string;\n /**\n * The placeholder in the select component.\n */\n placeholder?: string;\n /**\n * Status of the text input\n * @default \"neutral\"\n */\n status?: 'neutral' | 'success' | 'error';\n /**\n * Disables the select component.\n */\n disabled?: boolean;\n /**\n * The alignment of the menu.\n * @default \"start\"\n */\n alignMenu?: 'start' | 'center' | 'end';\n /**\n * Defines the preferred side of the select. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side?: 'left' | 'right' | 'bottom' | 'top';\n /**\n * The data test id of the select component.\n */\n 'data-test-id'?: string;\n /**\n * Id of the select component\n */\n id?: string;\n /**\n * The value of the select is shown as plan text when set to true, items child components are used if set to true\n * @default true\n */\n showStringValue?: boolean;\n /**\n * Define the minimum distance between the select menu and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: SelectMenuViewportCollisionPadding;\n} & CommonAriaProps;\n\nexport const SelectInput = (\n {\n children,\n onSelect,\n value,\n defaultValue,\n placeholder = '',\n status = 'neutral',\n disabled,\n alignMenu = 'start',\n side = 'bottom',\n id,\n showStringValue = true,\n 'data-test-id': dataTestId = 'fondue-select',\n viewportCollisionPadding = 'compact',\n ...props\n }: SelectComponentProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n const { inputSlots, menuSlots, items, clearButton, getItemByValue } = useSelectData(children);\n\n const defaultItem = getItemByValue(defaultValue);\n const activeItem = getItemByValue(value);\n\n const wasClicked = useRef(false);\n\n const [hasInteractedSinceOpening, setHasInteractedSinceOpening] = useState(false);\n\n const { getToggleButtonProps, getMenuProps, getItemProps, reset, selectedItem, isOpen, highlightedIndex } =\n useSelect({\n items,\n defaultSelectedItem: defaultItem,\n selectedItem: activeItem,\n toggleButtonId: id,\n labelId: 'aria-labelledby' in props ? props['aria-labelledby'] : undefined,\n onIsOpenChange: () => {\n setHasInteractedSinceOpening(false);\n },\n onHighlightedIndexChange: () => {\n setHasInteractedSinceOpening(true);\n },\n onSelectedItemChange: ({ selectedItem }) => {\n onSelect?.(selectedItem?.value ?? null);\n },\n itemToString: (item) => (item ? item.label : ''),\n });\n\n const displayedValue = selectedItem\n ? (!showStringValue && selectedItem.children) || selectedItem.label\n : placeholder;\n\n return (\n <RadixPopover.Root open={isOpen}>\n <RadixPopover.Anchor\n asChild\n onMouseDown={(mouseEvent) => {\n wasClicked.current = true;\n mouseEvent.currentTarget.dataset.showFocusRing = 'false';\n }}\n onFocus={(focusEvent) => {\n if (!wasClicked.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasClicked.current = false;\n }}\n >\n <div\n className={styles.root}\n data-status={status}\n data-disabled={disabled}\n data-empty={!selectedItem}\n data-test-id={dataTestId}\n {...(disabled\n ? {}\n : getToggleButtonProps({\n 'aria-label': 'aria-label' in props ? props['aria-label'] : undefined,\n ref: forwardedRef,\n }))}\n >\n <span className={styles.selectedValue}>{displayedValue}</span>\n {inputSlots}\n {clearButton && (\n <RadixSlot\n onClick={(event) => {\n event.stopPropagation();\n reset();\n }}\n className={styles.clear}\n >\n {clearButton}\n </RadixSlot>\n )}\n <div className={styles.icons}>\n <IconCaretDown size={16} className={styles.caret} />\n {status === 'success' ? (\n <IconCheckMark\n size={16}\n className={styles.iconSuccess}\n data-test-id={`${dataTestId}-success-icon`}\n />\n ) : null}\n {status === 'error' ? (\n <IconExclamationMarkTriangle\n size={16}\n className={styles.iconError}\n data-test-id={`${dataTestId}-error-icon`}\n />\n ) : null}\n </div>\n </div>\n </RadixPopover.Anchor>\n\n <SelectMenu\n align={alignMenu}\n side={side}\n highlightedIndex={highlightedIndex}\n getMenuProps={getMenuProps}\n getItemProps={getItemProps}\n selectedItem={selectedItem}\n hasInteractedSinceOpening={hasInteractedSinceOpening}\n viewportCollisionPadding={viewportCollisionPadding}\n >\n {menuSlots}\n </SelectMenu>\n </RadixPopover.Root>\n );\n};\nSelectInput.displayName = 'Select';\n\nexport const ForwardedRefSelect = forwardRef<HTMLDivElement, SelectComponentProps>(SelectInput);\n\n// @ts-expect-error We support both Select and Select.Combobox as the Root\nexport const Select: typeof SelectInput & {\n Combobox: typeof ForwardedRefCombobox;\n Item: typeof ForwardedRefSelectItem;\n Group: typeof ForwardedRefSelectItemGroup;\n Slot: typeof ForwardedRefSelectSlot;\n} = ForwardedRefSelect;\nSelect.displayName = 'Select';\nSelect.Combobox = ForwardedRefCombobox;\nSelect.Combobox.displayName = 'Select.Combobox';\nSelect.Item = ForwardedRefSelectItem;\nSelect.Item.displayName = 'Select.Item';\nSelect.Group = ForwardedRefSelectItemGroup;\nSelect.Group.displayName = 'Select.Group';\nSelect.Slot = ForwardedRefSelectSlot;\nSelect.Slot.displayName = 'Select.Slot';\n"],"names":["SelectInput","children","onSelect","value","defaultValue","placeholder","status","disabled","alignMenu","side","id","showStringValue","dataTestId","viewportCollisionPadding","props","forwardedRef","inputSlots","menuSlots","items","clearButton","getItemByValue","useSelectData","defaultItem","activeItem","wasClicked","useRef","hasInteractedSinceOpening","setHasInteractedSinceOpening","useState","getToggleButtonProps","getMenuProps","getItemProps","reset","selectedItem","isOpen","highlightedIndex","useSelect","item","displayedValue","jsxs","RadixPopover","jsx","mouseEvent","focusEvent","blurEvent","styles","RadixSlot","event","IconCaretDown","IconCheckMark","IconExclamationMarkTriangle","SelectMenu","ForwardedRefSelect","forwardRef","Select","ForwardedRefCombobox","ForwardedRefSelectItem","ForwardedRefSelectItemGroup","ForwardedRefSelectSlot"],"mappings":";;;;;;;;;;;;AA6EO,MAAMA,IAAc,CACvB;AAAA,EACI,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,QAAAC,IAAS;AAAA,EACT,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,IAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,gBAAgBC,IAAa;AAAA,EAC7B,0BAAAC,IAA2B;AAAA,EAC3B,GAAGC;AACP,GACAC,MACC;AACK,QAAA,EAAE,YAAAC,GAAY,WAAAC,GAAW,OAAAC,GAAO,aAAAC,GAAa,gBAAAC,EAAe,IAAIC,EAAcpB,CAAQ,GAEtFqB,IAAcF,EAAehB,CAAY,GACzCmB,IAAaH,EAAejB,CAAK,GAEjCqB,IAAaC,EAAO,EAAK,GAEzB,CAACC,GAA2BC,CAA4B,IAAIC,EAAS,EAAK,GAE1E,EAAE,sBAAAC,GAAsB,cAAAC,GAAc,cAAAC,GAAc,OAAAC,GAAO,cAAAC,GAAc,QAAAC,GAAQ,kBAAAC,EAAiB,IACpGC,EAAU;AAAA,IACN,OAAAlB;AAAA,IACA,qBAAqBI;AAAA,IACrB,cAAcC;AAAA,IACd,gBAAgBb;AAAA,IAChB,SAAS,qBAAqBI,IAAQA,EAAM,iBAAiB,IAAI;AAAA,IACjE,gBAAgB,MAAM;AAClB,MAAAa,EAA6B,EAAK;AAAA,IACtC;AAAA,IACA,0BAA0B,MAAM;AAC5B,MAAAA,EAA6B,EAAI;AAAA,IACrC;AAAA,I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Control.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { forwardRef, type ForwardedRef, type ReactElement, type ReactNode } from 'react';\n\nimport { useControllableState } from '#/hooks/useControllableState';\n\nimport styles from './styles/segmentedControl.module.scss';\n\nexport type SegmentedControlRootProps<TValue extends string = string> = {\n id?: string;\n children: ReactNode;\n /**\n * The default value of the segmented control\n * Used for uncontrolled components\n */\n defaultValue: TValue;\n /**\n * The controlled value of the segmented control\n */\n value?: TValue;\n /**\n * Event handler called when the value changes\n */\n onValueChange?: (value: TValue) => void;\n /**\n * Disable the segmented control\n * @default false\n */\n disabled?: boolean;\n /**\n * Specify if the segmented control should only take the width of its content\n * @default true\n */\n hugWidth?: boolean;\n};\n\nexport const SegmentedControlRoot = <TValue extends string = string>(\n {\n children,\n value: propsValue,\n defaultValue,\n onValueChange,\n hugWidth = true,\n ...rootProps\n }: SegmentedControlRootProps<TValue>,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const [value, setValue] = useControllableState({\n prop: propsValue,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n return (\n <ToggleGroupPrimitive.Root\n ref={ref}\n {...rootProps}\n className={styles.root}\n onValueChange={(value) => {\n if (value) {\n setValue(value as TValue);\n }\n }}\n value={value}\n type=\"single\"\n asChild={false}\n data-hug-width={hugWidth}\n aria-disabled={rootProps.disabled}\n >\n {children}\n {/* Active indicator */}\n <div className={styles.activeIndicator} />\n </ToggleGroupPrimitive.Root>\n );\n};\nSegmentedControlRoot.displayName = 'SegmentedControl.Root';\n\ntype SegmentedControlItemProps = {\n children: ReactNode;\n value: string;\n};\n\nexport const SegmentedControlItem = (\n { children, ...itemProps }: SegmentedControlItemProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => (\n <ToggleGroupPrimitive.Item ref={ref} {...itemProps} className={styles.item} asChild={false}>\n {/* Separator */}\n <span className={styles.separator} />\n <span className={styles.itemLabel}>\n {/* Active children */}\n <span className={styles.itemLabelActive}>{children}</span>\n\n {/* Inactive children */}\n <span className={styles.itemLabelInactive}>{children}</span>\n </span>\n </ToggleGroupPrimitive.Item>\n);\nSegmentedControlItem.displayName = 'SegmentedControl.Item';\n\nexport const SegmentedControl = {\n Root: forwardRef(SegmentedControlRoot) as <TValue extends string = string>(\n props: SegmentedControlRootProps<TValue> & { ref?: ForwardedRef<HTMLDivElement> },\n ) => ReactElement,\n Item: forwardRef(SegmentedControlItem),\n};\n"],"names":["SegmentedControlRoot","children","propsValue","defaultValue","onValueChange","hugWidth","rootProps","ref","value","setValue","useControllableState","jsxs","ToggleGroupPrimitive","styles","jsx","SegmentedControlItem","itemProps","SegmentedControl","forwardRef"],"mappings":";;;;;AAqCO,MAAMA,IAAuB,CAChC;AAAA,EACI,UAAAC;AAAA,EACA,OAAOC;AAAA,EACP,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,GAAGC;AACP,GACAC,MACC;AACD,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAqB;AAAA,IAC3C,MAAMR;AAAA,IACN,aAAaC;AAAA,IACb,UAAUC;AAAA,EAAA,CACb;AAGG,SAAA,gBAAAO;AAAA,IAACC,EAAqB;AAAA,IAArB;AAAA,MACG,KAAAL;AAAA,MACC,GAAGD;AAAA,MACJ,WAAWO,EAAO;AAAA,MAClB,eAAe,CAACL,MAAU;AACtB,QAAIA,KACAC,EAASD,CAAe;AAAA,MAEhC;AAAA,MACA,OAAAA;AAAA,MACA,MAAK;AAAA,MACL,SAAS;AAAA,MACT,kBAAgBH;AAAA,MAChB,iBAAeC,EAAU;AAAA,MAExB,UAAA;AAAA,QAAAL;AAAA,QAEA,gBAAAa,EAAA,OAAA,EAAI,WAAWD,EAAO,gBAAiB,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAC5C;AAER;AACAb,EAAqB,cAAc;AAO5B,MAAMe,IAAuB,CAChC,EAAE,UAAAd,GAAU,GAAGe,EAAA,GACfT,MAEA,gBAAAI,EAACC,EAAqB,MAArB,EAA0B,KAAAL,GAAW,GAAGS,GAAW,WAAWH,EAAO,MAAM,SAAS,IAEjF,UAAA;AAAA,EAAC,gBAAAC,EAAA,QAAA,EAAK,WAAWD,EAAO,UAAW,CAAA;AAAA,EAClC,gBAAAF,EAAA,QAAA,EAAK,WAAWE,EAAO,WAEpB,UAAA;AAAA,IAAA,gBAAAC,EAAC,QAAK,EAAA,WAAWD,EAAO,iBAAkB,UAAAZ,GAAS;AAAA,IAGlD,gBAAAa,EAAA,QAAA,EAAK,WAAWD,EAAO,mBAAoB,UAAAZ,EAAS,CAAA;AAAA,EAAA,EACzD,CAAA;AAAA,EACJ,CAAA;AAEJc,EAAqB,cAAc;AAE5B,MAAME,IAAmB;AAAA,EAC5B,MAAMC,EAAWlB,CAAoB;AAAA,EAGrC,MAAMkB,EAAWH,CAAoB;AACzC;"}
|
|
@@ -1,58 +1,141 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { IconCaretDown as T, IconCheckMark as $, IconExclamationMarkTriangle as A } from "@frontify/fondue-icons";
|
|
3
|
+
import * as g from "@radix-ui/react-popover";
|
|
4
|
+
import { Slot as q } from "@radix-ui/react-slot";
|
|
5
|
+
import { useSelect as J } from "downshift";
|
|
6
|
+
import { forwardRef as K, useRef as L, useState as Q } from "react";
|
|
7
|
+
import { ForwardedRefCombobox as U } from "./fondue-components62.js";
|
|
8
|
+
import { ForwardedRefSelectItem as W, ForwardedRefSelectItemGroup as X } from "./fondue-components63.js";
|
|
9
|
+
import { SelectMenu as Y } from "./fondue-components64.js";
|
|
10
|
+
import { ForwardedRefSelectSlot as Z } from "./fondue-components65.js";
|
|
11
|
+
import o from "./fondue-components66.js";
|
|
12
|
+
import { useSelectData as _ } from "./fondue-components67.js";
|
|
13
|
+
const S = ({
|
|
14
|
+
children: h,
|
|
15
|
+
onSelect: s,
|
|
16
|
+
value: b,
|
|
17
|
+
defaultValue: I,
|
|
18
|
+
placeholder: N = "",
|
|
19
|
+
status: n = "neutral",
|
|
20
|
+
disabled: m,
|
|
21
|
+
alignMenu: w = "start",
|
|
22
|
+
side: y = "bottom",
|
|
23
|
+
id: C,
|
|
24
|
+
showStringValue: R = !0,
|
|
25
|
+
"data-test-id": c = "fondue-select",
|
|
26
|
+
viewportCollisionPadding: x = "compact",
|
|
27
|
+
...l
|
|
28
|
+
}, F) => {
|
|
29
|
+
const { inputSlots: v, menuSlots: k, items: B, clearButton: u, getItemByValue: p } = _(h), M = p(I), P = p(b), i = L(!1), [G, f] = Q(!1), { getToggleButtonProps: O, getMenuProps: z, getItemProps: D, reset: V, selectedItem: r, isOpen: j, highlightedIndex: E } = J({
|
|
30
|
+
items: B,
|
|
31
|
+
defaultSelectedItem: M,
|
|
32
|
+
selectedItem: P,
|
|
33
|
+
toggleButtonId: C,
|
|
34
|
+
labelId: "aria-labelledby" in l ? l["aria-labelledby"] : void 0,
|
|
35
|
+
onIsOpenChange: () => {
|
|
36
|
+
f(!1);
|
|
37
|
+
},
|
|
38
|
+
onHighlightedIndexChange: () => {
|
|
39
|
+
f(!0);
|
|
40
|
+
},
|
|
41
|
+
onSelectedItemChange: ({ selectedItem: e }) => {
|
|
42
|
+
s == null || s((e == null ? void 0 : e.value) ?? null);
|
|
43
|
+
},
|
|
44
|
+
itemToString: (e) => e ? e.label : ""
|
|
45
|
+
}), H = r ? !R && r.children || r.label : N;
|
|
46
|
+
return /* @__PURE__ */ d(g.Root, { open: j, children: [
|
|
47
|
+
/* @__PURE__ */ a(
|
|
48
|
+
g.Anchor,
|
|
49
|
+
{
|
|
50
|
+
asChild: !0,
|
|
51
|
+
onMouseDown: (e) => {
|
|
52
|
+
i.current = !0, e.currentTarget.dataset.showFocusRing = "false";
|
|
53
|
+
},
|
|
54
|
+
onFocus: (e) => {
|
|
55
|
+
i.current || (e.target.dataset.showFocusRing = "true");
|
|
56
|
+
},
|
|
57
|
+
onBlur: (e) => {
|
|
58
|
+
e.target.dataset.showFocusRing = "false", i.current = !1;
|
|
59
|
+
},
|
|
60
|
+
children: /* @__PURE__ */ d(
|
|
61
|
+
"div",
|
|
28
62
|
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
63
|
+
className: o.root,
|
|
64
|
+
"data-status": n,
|
|
65
|
+
"data-disabled": m,
|
|
66
|
+
"data-empty": !r,
|
|
67
|
+
"data-test-id": c,
|
|
68
|
+
...m ? {} : O({
|
|
69
|
+
"aria-label": "aria-label" in l ? l["aria-label"] : void 0,
|
|
70
|
+
ref: F
|
|
71
|
+
}),
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ a("span", { className: o.selectedValue, children: H }),
|
|
74
|
+
v,
|
|
75
|
+
u && /* @__PURE__ */ a(
|
|
76
|
+
q,
|
|
77
|
+
{
|
|
78
|
+
onClick: (e) => {
|
|
79
|
+
e.stopPropagation(), V();
|
|
80
|
+
},
|
|
81
|
+
className: o.clear,
|
|
82
|
+
children: u
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ d("div", { className: o.icons, children: [
|
|
86
|
+
/* @__PURE__ */ a(T, { size: 16, className: o.caret }),
|
|
87
|
+
n === "success" ? /* @__PURE__ */ a(
|
|
88
|
+
$,
|
|
89
|
+
{
|
|
90
|
+
size: 16,
|
|
91
|
+
className: o.iconSuccess,
|
|
92
|
+
"data-test-id": `${c}-success-icon`
|
|
93
|
+
}
|
|
94
|
+
) : null,
|
|
95
|
+
n === "error" ? /* @__PURE__ */ a(
|
|
96
|
+
A,
|
|
97
|
+
{
|
|
98
|
+
size: 16,
|
|
99
|
+
className: o.iconError,
|
|
100
|
+
"data-test-id": `${c}-error-icon`
|
|
101
|
+
}
|
|
102
|
+
) : null
|
|
103
|
+
] })
|
|
104
|
+
]
|
|
34
105
|
}
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ a(
|
|
110
|
+
Y,
|
|
111
|
+
{
|
|
112
|
+
align: w,
|
|
113
|
+
side: y,
|
|
114
|
+
highlightedIndex: E,
|
|
115
|
+
getMenuProps: z,
|
|
116
|
+
getItemProps: D,
|
|
117
|
+
selectedItem: r,
|
|
118
|
+
hasInteractedSinceOpening: G,
|
|
119
|
+
viewportCollisionPadding: x,
|
|
120
|
+
children: k
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
] });
|
|
124
|
+
};
|
|
125
|
+
S.displayName = "Select";
|
|
126
|
+
const ee = K(S), t = ee;
|
|
127
|
+
t.displayName = "Select";
|
|
128
|
+
t.Combobox = U;
|
|
129
|
+
t.Combobox.displayName = "Select.Combobox";
|
|
130
|
+
t.Item = W;
|
|
131
|
+
t.Item.displayName = "Select.Item";
|
|
132
|
+
t.Group = X;
|
|
133
|
+
t.Group.displayName = "Select.Group";
|
|
134
|
+
t.Slot = Z;
|
|
135
|
+
t.Slot.displayName = "Select.Slot";
|
|
55
136
|
export {
|
|
56
|
-
|
|
137
|
+
ee as ForwardedRefSelect,
|
|
138
|
+
t as Select,
|
|
139
|
+
S as SelectInput
|
|
57
140
|
};
|
|
58
141
|
//# sourceMappingURL=fondue-components22.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components22.js","sources":["../src/components/Slider/Slider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixSlider from '@radix-ui/react-slider';\nimport { type ForwardedRef, forwardRef, useRef } from 'react';\n\nimport { type CommonAriaAttrs } from '#/utilities/types';\n\nimport styles from './styles/slider.module.scss';\n\nexport type SliderProps = {\n id?: string;\n name?: string;\n /**\n * The default value of the slider\n * Used for uncontrolled components\n * @default [0]\n */\n defaultValue?: number[];\n /**\n * The controlled value of the slider\n * @default [0]\n */\n value?: number[];\n /**\n * Minimum value of the slider\n * @default 0\n */\n min?: number;\n /**\n * Maximum value of the slider\n * @default 100\n */\n max?: number;\n /**\n * The granularity with which the slider can step through values\n * @default 1\n */\n step?: number;\n /**\n * The minimum steps between thumbs in a range slider\n * @default 0\n */\n minStepsBetweenThumbs?: number;\n /**\n * Disable the slider\n * @default false\n */\n disabled?: boolean;\n onChange?: (value: number[]) => void;\n onCommit?: (value: number[]) => void;\n 'data-test-id'?: string;\n} & CommonAriaAttrs;\n\nconst SliderComponent = (\n {\n value,\n defaultValue = [0],\n onChange,\n onCommit,\n 'data-test-id': dataTestId = 'fondue-slider',\n ...props\n }: SliderProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n const sliderThumbRef = useRef<HTMLSpanElement | null>(null);\n return (\n <RadixSlider.Root\n ref={ref}\n className={styles.root}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onChange}\n onValueCommit={onCommit}\n data-test-id={dataTestId}\n {...props}\n >\n <RadixSlider.Track\n onPointerDown={() => {\n if (sliderThumbRef.current) {\n sliderThumbRef.current.dataset.showFocusRing = 'false';\n }\n }}\n className={styles.track}\n >\n <RadixSlider.Range className={styles.range} />\n </RadixSlider.Track>\n {(value || defaultValue).map((_, index) => (\n <RadixSlider.Thumb\n ref={sliderThumbRef}\n className={styles.thumb}\n onPointerDown={(event) => {\n event.currentTarget.dataset.showFocusRing = 'false';\n }}\n onBlur={(event) => {\n event.currentTarget.dataset.showFocusRing = 'true';\n }}\n key={index}\n />\n ))}\n </RadixSlider.Root>\n );\n};\n\nexport const Slider = forwardRef<HTMLButtonElement, SliderProps>(SliderComponent);\nSlider.displayName = 'Slider';\n"],"names":["SliderComponent","value","defaultValue","onChange","onCommit","dataTestId","props","ref","sliderThumbRef","useRef","jsxs","RadixSlider","styles","jsx","_","index","event","Slider","forwardRef"],"mappings":";;;;AAqDA,MAAMA,IAAkB,CACpB;AAAA,EACI,OAAAC;AAAA,EACA,cAAAC,IAAe,CAAC,CAAC;AAAA,EACjB,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,GAAGC;AACP,GACAC,MACC;AACK,QAAAC,IAAiBC,EAA+B,IAAI;AAEtD,SAAA,gBAAAC;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACG,KAAAJ;AAAA,MACA,WAAWK,EAAO;AAAA,MAClB,OAAAX;AAAA,MACA,cAAAC;AAAA,MACA,eAAeC;AAAA,MACf,eAAeC;AAAA,MACf,gBAAcC;AAAA,MACb,GAAGC;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAO;AAAA,UAACF,EAAY;AAAA,UAAZ;AAAA,YACG,eAAe,MAAM;AACjB,cAAIH,EAAe,YACAA,EAAA,QAAQ,QAAQ,gBAAgB;AAAA,YAEvD;AAAA,YACA,WAAWI,EAAO;AAAA,YAElB,4BAACD,EAAY,OAAZ,EAAkB,WAAWC,EAAO,MAAO,CAAA;AAAA,UAAA;AAAA,QAChD;AAAA,SACEX,KAASC,GAAc,IAAI,CAACY,GAAGC,MAC7B,gBAAAF;AAAA,UAACF,EAAY;AAAA,UAAZ;AAAA,YACG,KAAKH;AAAA,YACL,WAAWI,EAAO;AAAA,YAClB,eAAe,CAACI,MAAU;AAChB,cAAAA,EAAA,cAAc,QAAQ,gBAAgB;AAAA,YAChD;AAAA,YACA,QAAQ,CAACA,MAAU;AACT,cAAAA,EAAA,cAAc,QAAQ,gBAAgB;AAAA,YAAA;AAAA,UAChD;AAAA,UACKD;AAAA,QAEZ,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACL;AAER,GAEaE,IAASC,EAA2ClB,CAAe;AAChFiB,EAAO,cAAc;"}
|
|
1
|
+
{"version":3,"file":"fondue-components22.js","sources":["../src/components/Select/Select.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretDown, IconCheckMark, IconExclamationMarkTriangle } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { Slot as RadixSlot } from '@radix-ui/react-slot';\nimport { useSelect } from 'downshift';\nimport { forwardRef, useRef, useState, type ForwardedRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\n\nimport { ForwardedRefCombobox } from './Combobox';\nimport { ForwardedRefSelectItem, ForwardedRefSelectItemGroup } from './SelectItem';\nimport { SelectMenu, type SelectMenuViewportCollisionPadding } from './SelectMenu';\nimport { ForwardedRefSelectSlot } from './SelectSlot';\nimport styles from './styles/select.module.scss';\nimport { useSelectData } from './useSelectData';\n\nexport type SelectComponentProps = {\n /**\n * Children of the Select component. This can contain the `Select.Slot` components for the label, decorators, clear action and menu.\n */\n children?: ReactNode;\n /**\n * Callback function that is called when an item is selected.\n */\n onSelect?: (selectedValue: string | null) => void;\n /**\n * The active value in the select component. This is used to control the select externally.\n */\n value?: string | null;\n /**\n * The default value of the select component. Used for uncontrolled usages.\n */\n defaultValue?: string;\n /**\n * The placeholder in the select component.\n */\n placeholder?: string;\n /**\n * Status of the text input\n * @default \"neutral\"\n */\n status?: 'neutral' | 'success' | 'error';\n /**\n * Disables the select component.\n */\n disabled?: boolean;\n /**\n * The alignment of the menu.\n * @default \"start\"\n */\n alignMenu?: 'start' | 'center' | 'end';\n /**\n * Defines the preferred side of the select. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side?: 'left' | 'right' | 'bottom' | 'top';\n /**\n * The data test id of the select component.\n */\n 'data-test-id'?: string;\n /**\n * Id of the select component\n */\n id?: string;\n /**\n * The value of the select is shown as plan text when set to true, items child components are used if set to true\n * @default true\n */\n showStringValue?: boolean;\n /**\n * Define the minimum distance between the select menu and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: SelectMenuViewportCollisionPadding;\n} & CommonAriaProps;\n\nexport const SelectInput = (\n {\n children,\n onSelect,\n value,\n defaultValue,\n placeholder = '',\n status = 'neutral',\n disabled,\n alignMenu = 'start',\n side = 'bottom',\n id,\n showStringValue = true,\n 'data-test-id': dataTestId = 'fondue-select',\n viewportCollisionPadding = 'compact',\n ...props\n }: SelectComponentProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n const { inputSlots, menuSlots, items, clearButton, getItemByValue } = useSelectData(children);\n\n const defaultItem = getItemByValue(defaultValue);\n const activeItem = getItemByValue(value);\n\n const wasClicked = useRef(false);\n\n const [hasInteractedSinceOpening, setHasInteractedSinceOpening] = useState(false);\n\n const { getToggleButtonProps, getMenuProps, getItemProps, reset, selectedItem, isOpen, highlightedIndex } =\n useSelect({\n items,\n defaultSelectedItem: defaultItem,\n selectedItem: activeItem,\n toggleButtonId: id,\n labelId: 'aria-labelledby' in props ? props['aria-labelledby'] : undefined,\n onIsOpenChange: () => {\n setHasInteractedSinceOpening(false);\n },\n onHighlightedIndexChange: () => {\n setHasInteractedSinceOpening(true);\n },\n onSelectedItemChange: ({ selectedItem }) => {\n onSelect?.(selectedItem?.value ?? null);\n },\n itemToString: (item) => (item ? item.label : ''),\n });\n\n const displayedValue = selectedItem\n ? (!showStringValue && selectedItem.children) || selectedItem.label\n : placeholder;\n\n return (\n <RadixPopover.Root open={isOpen}>\n <RadixPopover.Anchor\n asChild\n onMouseDown={(mouseEvent) => {\n wasClicked.current = true;\n mouseEvent.currentTarget.dataset.showFocusRing = 'false';\n }}\n onFocus={(focusEvent) => {\n if (!wasClicked.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasClicked.current = false;\n }}\n >\n <div\n className={styles.root}\n data-status={status}\n data-disabled={disabled}\n data-empty={!selectedItem}\n data-test-id={dataTestId}\n {...(disabled\n ? {}\n : getToggleButtonProps({\n 'aria-label': 'aria-label' in props ? props['aria-label'] : undefined,\n ref: forwardedRef,\n }))}\n >\n <span className={styles.selectedValue}>{displayedValue}</span>\n {inputSlots}\n {clearButton && (\n <RadixSlot\n onClick={(event) => {\n event.stopPropagation();\n reset();\n }}\n className={styles.clear}\n >\n {clearButton}\n </RadixSlot>\n )}\n <div className={styles.icons}>\n <IconCaretDown size={16} className={styles.caret} />\n {status === 'success' ? (\n <IconCheckMark\n size={16}\n className={styles.iconSuccess}\n data-test-id={`${dataTestId}-success-icon`}\n />\n ) : null}\n {status === 'error' ? (\n <IconExclamationMarkTriangle\n size={16}\n className={styles.iconError}\n data-test-id={`${dataTestId}-error-icon`}\n />\n ) : null}\n </div>\n </div>\n </RadixPopover.Anchor>\n\n <SelectMenu\n align={alignMenu}\n side={side}\n highlightedIndex={highlightedIndex}\n getMenuProps={getMenuProps}\n getItemProps={getItemProps}\n selectedItem={selectedItem}\n hasInteractedSinceOpening={hasInteractedSinceOpening}\n viewportCollisionPadding={viewportCollisionPadding}\n >\n {menuSlots}\n </SelectMenu>\n </RadixPopover.Root>\n );\n};\nSelectInput.displayName = 'Select';\n\nexport const ForwardedRefSelect = forwardRef<HTMLDivElement, SelectComponentProps>(SelectInput);\n\n// @ts-expect-error We support both Select and Select.Combobox as the Root\nexport const Select: typeof SelectInput & {\n Combobox: typeof ForwardedRefCombobox;\n Item: typeof ForwardedRefSelectItem;\n Group: typeof ForwardedRefSelectItemGroup;\n Slot: typeof ForwardedRefSelectSlot;\n} = ForwardedRefSelect;\nSelect.displayName = 'Select';\nSelect.Combobox = ForwardedRefCombobox;\nSelect.Combobox.displayName = 'Select.Combobox';\nSelect.Item = ForwardedRefSelectItem;\nSelect.Item.displayName = 'Select.Item';\nSelect.Group = ForwardedRefSelectItemGroup;\nSelect.Group.displayName = 'Select.Group';\nSelect.Slot = ForwardedRefSelectSlot;\nSelect.Slot.displayName = 'Select.Slot';\n"],"names":["SelectInput","children","onSelect","value","defaultValue","placeholder","status","disabled","alignMenu","side","id","showStringValue","dataTestId","viewportCollisionPadding","props","forwardedRef","inputSlots","menuSlots","items","clearButton","getItemByValue","useSelectData","defaultItem","activeItem","wasClicked","useRef","hasInteractedSinceOpening","setHasInteractedSinceOpening","useState","getToggleButtonProps","getMenuProps","getItemProps","reset","selectedItem","isOpen","highlightedIndex","useSelect","item","displayedValue","jsxs","RadixPopover","jsx","mouseEvent","focusEvent","blurEvent","styles","RadixSlot","event","IconCaretDown","IconCheckMark","IconExclamationMarkTriangle","SelectMenu","ForwardedRefSelect","forwardRef","Select","ForwardedRefCombobox","ForwardedRefSelectItem","ForwardedRefSelectItemGroup","ForwardedRefSelectSlot"],"mappings":";;;;;;;;;;;;AA6EO,MAAMA,IAAc,CACvB;AAAA,EACI,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,QAAAC,IAAS;AAAA,EACT,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,IAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,gBAAgBC,IAAa;AAAA,EAC7B,0BAAAC,IAA2B;AAAA,EAC3B,GAAGC;AACP,GACAC,MACC;AACK,QAAA,EAAE,YAAAC,GAAY,WAAAC,GAAW,OAAAC,GAAO,aAAAC,GAAa,gBAAA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,MAAA;AAAA,QACG,OAAO3C;AAAA,QACP,MAAAC;AAAA,QACA,kBAAA0B;AAAA,QACA,cAAAL;AAAA,QACA,cAAAC;AAAA,QACA,cAAAE;AAAA,QACA,2BAAAP;AAAA,QACA,0BAAAb;AAAA,QAEC,UAAAI;AAAA,MAAA;AAAA,IAAA;AAAA,EACL,GACJ;AAER;AACAjB,EAAY,cAAc;AAEb,MAAAoD,KAAqBC,EAAiDrD,CAAW,GAGjFsD,IAKTF;AACJE,EAAO,cAAc;AACrBA,EAAO,WAAWC;AAClBD,EAAO,SAAS,cAAc;AAC9BA,EAAO,OAAOE;AACdF,EAAO,KAAK,cAAc;AAC1BA,EAAO,QAAQG;AACfH,EAAO,MAAM,cAAc;AAC3BA,EAAO,OAAOI;AACdJ,EAAO,KAAK,cAAc;"}
|
|
@@ -1,32 +1,58 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const n = ({
|
|
1
|
+
import { jsxs as f, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as e from "@radix-ui/react-slider";
|
|
3
|
+
import { forwardRef as h, useRef as R } from "react";
|
|
4
|
+
import r from "./fondue-components68.js";
|
|
5
|
+
const g = ({
|
|
7
6
|
value: a,
|
|
8
|
-
defaultValue:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"data-test-id": c = "fondue-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
7
|
+
defaultValue: n = [0],
|
|
8
|
+
onChange: i,
|
|
9
|
+
onCommit: m,
|
|
10
|
+
"data-test-id": c = "fondue-slider",
|
|
11
|
+
...d
|
|
12
|
+
}, l) => {
|
|
13
|
+
const o = R(null);
|
|
14
|
+
return /* @__PURE__ */ f(
|
|
15
|
+
e.Root,
|
|
16
|
+
{
|
|
17
|
+
ref: l,
|
|
18
|
+
className: r.root,
|
|
19
|
+
value: a,
|
|
20
|
+
defaultValue: n,
|
|
21
|
+
onValueChange: i,
|
|
22
|
+
onValueCommit: m,
|
|
23
|
+
"data-test-id": c,
|
|
24
|
+
...d,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ s(
|
|
27
|
+
e.Track,
|
|
28
|
+
{
|
|
29
|
+
onPointerDown: () => {
|
|
30
|
+
o.current && (o.current.dataset.showFocusRing = "false");
|
|
31
|
+
},
|
|
32
|
+
className: r.track,
|
|
33
|
+
children: /* @__PURE__ */ s(e.Range, { className: r.range })
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
(a || n).map((w, u) => /* @__PURE__ */ s(
|
|
37
|
+
e.Thumb,
|
|
38
|
+
{
|
|
39
|
+
ref: o,
|
|
40
|
+
className: r.thumb,
|
|
41
|
+
onPointerDown: (t) => {
|
|
42
|
+
t.currentTarget.dataset.showFocusRing = "false";
|
|
43
|
+
},
|
|
44
|
+
onBlur: (t) => {
|
|
45
|
+
t.currentTarget.dataset.showFocusRing = "true";
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
u
|
|
49
|
+
))
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}, p = h(g);
|
|
54
|
+
p.displayName = "Slider";
|
|
29
55
|
export {
|
|
30
|
-
p as
|
|
56
|
+
p as Slider
|
|
31
57
|
};
|
|
32
58
|
//# sourceMappingURL=fondue-components23.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components23.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components23.js","sources":["../src/components/Slider/Slider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixSlider from '@radix-ui/react-slider';\nimport { type ForwardedRef, forwardRef, useRef } from 'react';\n\nimport { type CommonAriaAttrs } from '#/utilities/types';\n\nimport styles from './styles/slider.module.scss';\n\nexport type SliderProps = {\n id?: string;\n name?: string;\n /**\n * The default value of the slider\n * Used for uncontrolled components\n * @default [0]\n */\n defaultValue?: number[];\n /**\n * The controlled value of the slider\n * @default [0]\n */\n value?: number[];\n /**\n * Minimum value of the slider\n * @default 0\n */\n min?: number;\n /**\n * Maximum value of the slider\n * @default 100\n */\n max?: number;\n /**\n * The granularity with which the slider can step through values\n * @default 1\n */\n step?: number;\n /**\n * The minimum steps between thumbs in a range slider\n * @default 0\n */\n minStepsBetweenThumbs?: number;\n /**\n * Disable the slider\n * @default false\n */\n disabled?: boolean;\n onChange?: (value: number[]) => void;\n onCommit?: (value: number[]) => void;\n 'data-test-id'?: string;\n} & CommonAriaAttrs;\n\nconst SliderComponent = (\n {\n value,\n defaultValue = [0],\n onChange,\n onCommit,\n 'data-test-id': dataTestId = 'fondue-slider',\n ...props\n }: SliderProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n const sliderThumbRef = useRef<HTMLSpanElement | null>(null);\n return (\n <RadixSlider.Root\n ref={ref}\n className={styles.root}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onChange}\n onValueCommit={onCommit}\n data-test-id={dataTestId}\n {...props}\n >\n <RadixSlider.Track\n onPointerDown={() => {\n if (sliderThumbRef.current) {\n sliderThumbRef.current.dataset.showFocusRing = 'false';\n }\n }}\n className={styles.track}\n >\n <RadixSlider.Range className={styles.range} />\n </RadixSlider.Track>\n {(value || defaultValue).map((_, index) => (\n <RadixSlider.Thumb\n ref={sliderThumbRef}\n className={styles.thumb}\n onPointerDown={(event) => {\n event.currentTarget.dataset.showFocusRing = 'false';\n }}\n onBlur={(event) => {\n event.currentTarget.dataset.showFocusRing = 'true';\n }}\n key={index}\n />\n ))}\n </RadixSlider.Root>\n );\n};\n\nexport const Slider = forwardRef<HTMLButtonElement, SliderProps>(SliderComponent);\nSlider.displayName = 'Slider';\n"],"names":["SliderComponent","value","defaultValue","onChange","onCommit","dataTestId","props","ref","sliderThumbRef","useRef","jsxs","RadixSlider","styles","jsx","_","index","event","Slider","forwardRef"],"mappings":";;;;AAqDA,MAAMA,IAAkB,CACpB;AAAA,EACI,OAAAC;AAAA,EACA,cAAAC,IAAe,CAAC,CAAC;AAAA,EACjB,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,GAAGC;AACP,GACAC,MACC;AACK,QAAAC,IAAiBC,EAA+B,IAAI;AAEtD,SAAA,gBAAAC;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACG,KAAAJ;AAAA,MACA,WAAWK,EAAO;AAAA,MAClB,OAAAX;AAAA,MACA,cAAAC;AAAA,MACA,eAAeC;AAAA,MACf,eAAeC;AAAA,MACf,gBAAcC;AAAA,MACb,GAAGC;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAO;AAAA,UAACF,EAAY;AAAA,UAAZ;AAAA,YACG,eAAe,MAAM;AACjB,cAAIH,EAAe,YACAA,EAAA,QAAQ,QAAQ,gBAAgB;AAAA,YAEvD;AAAA,YACA,WAAWI,EAAO;AAAA,YAElB,4BAACD,EAAY,OAAZ,EAAkB,WAAWC,EAAO,MAAO,CAAA;AAAA,UAAA;AAAA,QAChD;AAAA,SACEX,KAASC,GAAc,IAAI,CAACY,GAAGC,MAC7B,gBAAAF;AAAA,UAACF,EAAY;AAAA,UAAZ;AAAA,YACG,KAAKH;AAAA,YACL,WAAWI,EAAO;AAAA,YAClB,eAAe,CAACI,MAAU;AAChB,cAAAA,EAAA,cAAc,QAAQ,gBAAgB;AAAA,YAChD;AAAA,YACA,QAAQ,CAACA,MAAU;AACT,cAAAA,EAAA,cAAc,QAAQ,gBAAgB;AAAA,YAAA;AAAA,UAChD;AAAA,UACKD;AAAA,QAEZ,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACL;AAER,GAEaE,IAASC,EAA2ClB,CAAe;AAChFiB,EAAO,cAAc;"}
|