@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,150 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import * as N from "@radix-ui/react-popover";
|
|
4
|
-
import { Slot as K } from "@radix-ui/react-slot";
|
|
5
|
-
import { useCombobox as Q } from "downshift";
|
|
6
|
-
import { forwardRef as U, useState as W, useRef as X, useMemo as Y } from "react";
|
|
7
|
-
import { SelectMenu as Z } from "./fondue-components61.js";
|
|
8
|
-
import o from "./fondue-components63.js";
|
|
9
|
-
import { useSelectData as _ } from "./fondue-components64.js";
|
|
10
|
-
const S = ({
|
|
11
|
-
children: B,
|
|
12
|
-
onSelect: l,
|
|
13
|
-
value: O,
|
|
14
|
-
defaultValue: R,
|
|
15
|
-
placeholder: v = "",
|
|
16
|
-
status: s = "neutral",
|
|
17
|
-
disabled: g,
|
|
18
|
-
"data-test-id": i = "fondue-select-combobox",
|
|
19
|
-
alignMenu: M = "start",
|
|
20
|
-
side: y = "bottom",
|
|
21
|
-
id: F,
|
|
22
|
-
viewportCollisionPadding: L = "compact",
|
|
23
|
-
...a
|
|
24
|
-
}, P) => {
|
|
25
|
-
const { inputSlots: k, menuSlots: D, items: c, filterText: H, clearButton: f, getItemByValue: p, setFilterText: h } = _(B), [T, b] = W(!1), {
|
|
26
|
-
getInputProps: u,
|
|
27
|
-
getToggleButtonProps: V,
|
|
28
|
-
getMenuProps: z,
|
|
29
|
-
getItemProps: j,
|
|
30
|
-
reset: C,
|
|
31
|
-
selectedItem: r,
|
|
32
|
-
isOpen: $,
|
|
33
|
-
highlightedIndex: A,
|
|
34
|
-
inputValue: d
|
|
35
|
-
} = Q({
|
|
36
|
-
items: c,
|
|
37
|
-
selectedItem: p(O),
|
|
38
|
-
defaultSelectedItem: p(R),
|
|
39
|
-
defaultHighlightedIndex: 0,
|
|
40
|
-
toggleButtonId: F,
|
|
41
|
-
labelId: "aria-labelledby" in a ? a["aria-labelledby"] : void 0,
|
|
42
|
-
onSelectedItemChange: ({ selectedItem: e }) => {
|
|
43
|
-
l == null || l((e == null ? void 0 : e.value) ?? null);
|
|
44
|
-
},
|
|
45
|
-
onInputValueChange: ({ inputValue: e }) => {
|
|
46
|
-
h(e);
|
|
47
|
-
},
|
|
48
|
-
onIsOpenChange: () => {
|
|
49
|
-
b(!1), h("");
|
|
50
|
-
},
|
|
51
|
-
onHighlightedIndexChange: () => {
|
|
52
|
-
b(!0);
|
|
53
|
-
},
|
|
54
|
-
itemToString: (e) => e ? e.label : ""
|
|
55
|
-
}), n = X(!1), x = Y(
|
|
56
|
-
() => !c.find((e) => e.label.toLowerCase().includes(d.toLowerCase())),
|
|
57
|
-
[d, c]
|
|
58
|
-
), E = (e) => {
|
|
59
|
-
var I, w;
|
|
60
|
-
e.target.dataset.showFocusRing = "false", n.current = !1, (r == null ? void 0 : r.label.toLocaleLowerCase()) !== d.toLocaleLowerCase() && C(), u().onBlur && ((w = (I = u()).onBlur) == null || w.call(I, e));
|
|
61
|
-
};
|
|
62
|
-
return /* @__PURE__ */ m(N.Root, { open: $, children: [
|
|
63
|
-
/* @__PURE__ */ t(N.Anchor, { asChild: !0, children: /* @__PURE__ */ m("div", { ref: P, className: o.root, "data-status": x ? "error" : s, children: [
|
|
64
|
-
/* @__PURE__ */ t(
|
|
65
|
-
"input",
|
|
66
|
-
{
|
|
67
|
-
...u({
|
|
68
|
-
"aria-label": "aria-label" in a ? a["aria-label"] : void 0
|
|
69
|
-
}),
|
|
70
|
-
"data-test-id": i,
|
|
71
|
-
placeholder: v,
|
|
72
|
-
className: o.input,
|
|
73
|
-
disabled: g,
|
|
74
|
-
onMouseDown: (e) => {
|
|
75
|
-
n.current = !0, e.currentTarget.dataset.showFocusRing = "false";
|
|
76
|
-
},
|
|
77
|
-
onFocus: (e) => {
|
|
78
|
-
n.current || (e.target.dataset.showFocusRing = "true");
|
|
79
|
-
},
|
|
80
|
-
onBlur: E
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
k,
|
|
84
|
-
f && /* @__PURE__ */ t(
|
|
85
|
-
K,
|
|
86
|
-
{
|
|
87
|
-
onClick: (e) => {
|
|
88
|
-
e.stopPropagation(), C();
|
|
89
|
-
},
|
|
90
|
-
className: o.clear,
|
|
91
|
-
role: "button",
|
|
92
|
-
children: f
|
|
93
|
-
}
|
|
94
|
-
),
|
|
95
|
-
/* @__PURE__ */ m("div", { className: o.icons, children: [
|
|
96
|
-
/* @__PURE__ */ t(
|
|
97
|
-
"button",
|
|
98
|
-
{
|
|
99
|
-
"aria-label": "toggle menu",
|
|
100
|
-
...V(),
|
|
101
|
-
type: "button",
|
|
102
|
-
disabled: g,
|
|
103
|
-
onMouseDown: () => {
|
|
104
|
-
n.current = !0;
|
|
105
|
-
},
|
|
106
|
-
children: /* @__PURE__ */ t(q, { size: 16, className: o.caret })
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
s === "success" ? /* @__PURE__ */ t(
|
|
110
|
-
G,
|
|
111
|
-
{
|
|
112
|
-
size: 16,
|
|
113
|
-
className: o.iconSuccess,
|
|
114
|
-
"data-test-id": `${i}-success-icon`
|
|
115
|
-
}
|
|
116
|
-
) : null,
|
|
117
|
-
x || s === "error" ? /* @__PURE__ */ t(
|
|
118
|
-
J,
|
|
119
|
-
{
|
|
120
|
-
size: 16,
|
|
121
|
-
className: o.iconError,
|
|
122
|
-
"data-test-id": `${i}-error-icon`
|
|
123
|
-
}
|
|
124
|
-
) : null
|
|
125
|
-
] })
|
|
126
|
-
] }) }),
|
|
127
|
-
/* @__PURE__ */ t(
|
|
128
|
-
Z,
|
|
129
|
-
{
|
|
130
|
-
align: M,
|
|
131
|
-
side: y,
|
|
132
|
-
highlightedIndex: A,
|
|
133
|
-
filterText: H,
|
|
134
|
-
getMenuProps: z,
|
|
135
|
-
getItemProps: j,
|
|
136
|
-
selectedItem: r,
|
|
137
|
-
hasInteractedSinceOpening: T,
|
|
138
|
-
viewportCollisionPadding: L,
|
|
139
|
-
children: D
|
|
140
|
-
}
|
|
141
|
-
)
|
|
142
|
-
] });
|
|
1
|
+
const o = "_root_5sic9_5", t = {
|
|
2
|
+
root: o
|
|
143
3
|
};
|
|
144
|
-
S.displayName = "Select.Combobox";
|
|
145
|
-
const ce = U(S);
|
|
146
4
|
export {
|
|
147
|
-
|
|
148
|
-
|
|
5
|
+
t as default,
|
|
6
|
+
o as root
|
|
149
7
|
};
|
|
150
8
|
//# sourceMappingURL=fondue-components59.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components59.js","sources":["../src/components/Select/Combobox.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 { useCombobox } from 'downshift';\nimport { forwardRef, useMemo, useRef, useState, type FocusEvent, type ForwardedRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\n\nimport { SelectMenu, type SelectMenuViewportCollisionPadding } from './SelectMenu';\nimport styles from './styles/select.module.scss';\nimport { useSelectData } from './useSelectData';\n\nexport type ComboboxProps = {\n /**\n * Children of the Combobox 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 combobox component. This is used to control the combobox externally.\n */\n value?: string | null;\n /**\n * The default value of the combobox component. Used for uncontrolled usages.\n */\n defaultValue?: string;\n /**\n * The placeholder in the combobox 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 combobox component.\n */\n disabled?: boolean;\n /**\n * The alignment of the menu.\n * @default \"start\"\n */\n alignMenu?: 'start' | 'center' | 'end' /**\n * Defines the preferred side of the combobox. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */;\n side?: 'left' | 'right' | 'bottom' | 'top';\n /**\n * Id of the combobox component\n */\n id?: string;\n /**\n * The data test id of the combobox component.\n */\n 'data-test-id'?: string;\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 SelectCombobox = (\n {\n children,\n onSelect,\n value,\n defaultValue,\n placeholder = '',\n status = 'neutral',\n disabled,\n 'data-test-id': dataTestId = 'fondue-select-combobox',\n alignMenu = 'start',\n side = 'bottom',\n id,\n viewportCollisionPadding = 'compact',\n ...props\n }: ComboboxProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n const { inputSlots, menuSlots, items, filterText, clearButton, getItemByValue, setFilterText } =\n useSelectData(children);\n\n const [hasInteractedSinceOpening, setHasInteractedSinceOpening] = useState(false);\n\n const {\n getInputProps,\n getToggleButtonProps,\n getMenuProps,\n getItemProps,\n reset,\n selectedItem,\n isOpen,\n highlightedIndex,\n inputValue,\n } = useCombobox({\n items,\n selectedItem: getItemByValue(value),\n defaultSelectedItem: getItemByValue(defaultValue),\n defaultHighlightedIndex: 0,\n toggleButtonId: id,\n labelId: 'aria-labelledby' in props ? props['aria-labelledby'] : undefined,\n onSelectedItemChange: ({ selectedItem }) => {\n onSelect?.(selectedItem?.value ?? null);\n },\n onInputValueChange: ({ inputValue }) => {\n setFilterText(inputValue);\n },\n onIsOpenChange: () => {\n setHasInteractedSinceOpening(false);\n setFilterText('');\n },\n onHighlightedIndexChange: () => {\n setHasInteractedSinceOpening(true);\n },\n itemToString: (item) => (item ? item.label : ''),\n });\n\n const wasClicked = useRef(false);\n\n const valueInvalid = useMemo(\n () => !items.find((item) => item.label.toLowerCase().includes(inputValue.toLowerCase())),\n [inputValue, items],\n );\n\n const onBlurHandler = (blurEvent: FocusEvent<HTMLInputElement, Element>) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasClicked.current = false;\n\n const selectedItemNullOrOutdated = selectedItem?.label.toLocaleLowerCase() !== inputValue.toLocaleLowerCase();\n\n if (selectedItemNullOrOutdated) {\n // if there is no selection or\n // the existing selected value is not the same as the input value (old),\n // reset the input\n reset();\n }\n\n if (getInputProps().onBlur) {\n getInputProps().onBlur?.(blurEvent);\n }\n };\n\n return (\n <RadixPopover.Root open={isOpen}>\n <RadixPopover.Anchor asChild>\n <div ref={forwardedRef} className={styles.root} data-status={valueInvalid ? 'error' : status}>\n <input\n {...getInputProps({\n 'aria-label': 'aria-label' in props ? props['aria-label'] : undefined,\n })}\n data-test-id={dataTestId}\n placeholder={placeholder}\n className={styles.input}\n disabled={disabled}\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={onBlurHandler}\n />\n {inputSlots}\n {clearButton && (\n <RadixSlot\n onClick={(event) => {\n event.stopPropagation();\n reset();\n }}\n className={styles.clear}\n role=\"button\"\n >\n {clearButton}\n </RadixSlot>\n )}\n <div className={styles.icons}>\n <button\n aria-label=\"toggle menu\"\n {...getToggleButtonProps()}\n type=\"button\"\n disabled={disabled}\n onMouseDown={() => {\n wasClicked.current = true;\n }}\n >\n <IconCaretDown size={16} className={styles.caret} />\n </button>\n {status === 'success' ? (\n <IconCheckMark\n size={16}\n className={styles.iconSuccess}\n data-test-id={`${dataTestId}-success-icon`}\n />\n ) : null}\n {valueInvalid || 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 filterText={filterText}\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};\nSelectCombobox.displayName = 'Select.Combobox';\n\nexport const ForwardedRefCombobox = forwardRef<HTMLDivElement, ComboboxProps>(SelectCombobox);\n"],"names":["SelectCombobox","children","onSelect","value","defaultValue","placeholder","status","disabled","dataTestId","alignMenu","side","id","viewportCollisionPadding","props","forwardedRef","inputSlots","menuSlots","items","filterText","clearButton","getItemByValue","setFilterText","useSelectData","hasInteractedSinceOpening","setHasInteractedSinceOpening","useState","getInputProps","getToggleButtonProps","getMenuProps","getItemProps","reset","selectedItem","isOpen","highlightedIndex","inputValue","useCombobox","item","wasClicked","useRef","valueInvalid","useMemo","onBlurHandler","blurEvent","_b","_a","jsxs","RadixPopover","jsx","styles","mouseEvent","focusEvent","RadixSlot","event","IconCaretDown","IconCheckMark","IconExclamationMarkTriangle","SelectMenu","ForwardedRefCombobox","forwardRef"],"mappings":";;;;;;;;;AAoEO,MAAMA,IAAiB,CAC1B;AAAA,EACI,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,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,"file":"fondue-components59.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,49 +1,46 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y } from "react";
|
|
3
|
+
import { cn as x } from "./fondue-components36.js";
|
|
4
|
+
import { buttonStyles as S } from "./fondue-components37.js";
|
|
5
|
+
import { iconStyles as k } from "./fondue-components38.js";
|
|
6
|
+
import { textStyles as B } from "./fondue-components39.js";
|
|
7
|
+
const C = y(
|
|
8
|
+
({
|
|
9
|
+
children: f,
|
|
10
|
+
type: d = "button",
|
|
11
|
+
variant: m,
|
|
12
|
+
size: e = "medium",
|
|
13
|
+
form: l,
|
|
14
|
+
"data-test-id": c = "fondue-button",
|
|
15
|
+
className: n = "",
|
|
16
|
+
onPress: o = () => {
|
|
17
|
+
},
|
|
18
|
+
hugWidth: a = !0,
|
|
19
|
+
...t
|
|
20
|
+
}, b) => /* @__PURE__ */ r(
|
|
21
|
+
"button",
|
|
22
|
+
{
|
|
23
|
+
ref: b,
|
|
24
|
+
type: d,
|
|
25
|
+
form: l,
|
|
26
|
+
"data-test-id": c,
|
|
27
|
+
className: x(
|
|
28
|
+
S({ size: e, variant: m, hugWidth: a, ...t }),
|
|
29
|
+
B({ variant: m, ...t }),
|
|
30
|
+
k({ variant: m, ...t }),
|
|
31
|
+
n
|
|
32
32
|
),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
), x = k(f);
|
|
44
|
-
x.displayName = "Checkbox";
|
|
33
|
+
...t,
|
|
34
|
+
onClick: (i) => {
|
|
35
|
+
var u;
|
|
36
|
+
(u = t.onClick) == null || u.call(t, i), o == null || o(i);
|
|
37
|
+
},
|
|
38
|
+
children: f
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
);
|
|
42
|
+
C.displayName = "Button";
|
|
45
43
|
export {
|
|
46
|
-
|
|
47
|
-
f as CheckboxComponent
|
|
44
|
+
C as Button
|
|
48
45
|
};
|
|
49
46
|
//# sourceMappingURL=fondue-components6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components6.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components6.js","sources":["../src/components/Button/Button.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ForwardedRef, type MouseEvent, type ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport { buttonStyles } from './styles/buttonStyles';\nimport { iconStyles } from './styles/iconStyles';\nimport { textStyles } from './styles/textStyles';\n\ntype ButtonRounding = 'medium' | 'full';\n\ntype ButtonStyle = 'default' | 'positive' | 'negative' | 'danger' | 'loud';\n\ntype ButtonSize = 'small' | 'medium' | 'large';\n\ntype ButtonType = 'button' | 'submit' | 'reset';\n\ntype ButtonEmphasis = 'default' | 'weak' | 'strong';\n\ntype ButtonAspect = 'default' | 'square';\n\nexport type ButtonProps = {\n /**\n * @default \"button\"\n */\n type?: ButtonType;\n /**\n * @default null\n */\n title?: string;\n /**\n * @default \"default\"\n */\n variant?: ButtonStyle;\n /**\n * @default \"strong\"\n */\n emphasis?: ButtonEmphasis;\n /**\n * @default \"medium\"\n */\n size?: ButtonSize;\n /**\n * @default \"medium\"\n */\n rounding?: ButtonRounding;\n /**\n * @default false\n */\n disabled?: boolean;\n /**\n * @default \"default\"\n */\n aspect?: ButtonAspect;\n /**\n * @default true\n */\n hugWidth?: boolean;\n children?: ReactNode;\n onPress?: (event?: MouseEvent<HTMLButtonElement>) => void;\n form?: string;\n 'aria-label'?: string;\n 'aria-describedby'?: string;\n 'data-test-id'?: string;\n className?: string;\n};\n\nexport const Button = forwardRef<HTMLButtonElement | null, ButtonProps>(\n (\n {\n children,\n type = 'button',\n variant,\n size = 'medium',\n form,\n 'data-test-id': dataTestId = 'fondue-button',\n className = '',\n onPress = () => {},\n hugWidth = true,\n ...props\n }: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement | null>,\n ) => {\n return (\n <button\n ref={ref}\n type={type}\n form={form}\n data-test-id={dataTestId}\n className={cn(\n buttonStyles({ size, variant, hugWidth, ...props }),\n textStyles({ variant, ...props }),\n iconStyles({ variant, ...props }),\n className,\n )}\n {...props}\n onClick={(event) => {\n // @ts-expect-error - Allows other components who use Button as a trigger to pass an action\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n props.onClick?.(event);\n onPress?.(event);\n }}\n >\n {children}\n </button>\n );\n },\n);\n\nButton.displayName = 'Button';\n"],"names":["Button","forwardRef","children","type","variant","size","form","dataTestId","className","onPress","hugWidth","props","ref","jsx","cn","buttonStyles","textStyles","iconStyles","event","_a"],"mappings":";;;;;;AAoEO,MAAMA,IAASC;AAAA,EAClB,CACI;AAAA,IACI,UAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,SAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,MAAAC;AAAA,IACA,gBAAgBC,IAAa;AAAA,IAC7B,WAAAC,IAAY;AAAA,IACZ,SAAAC,IAAU,MAAM;AAAA,IAAC;AAAA,IACjB,UAAAC,IAAW;AAAA,IACX,GAAGC;AAAA,KAEPC,MAGI,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,KAAAD;AAAA,MACA,MAAAT;AAAA,MACA,MAAAG;AAAA,MACA,gBAAcC;AAAA,MACd,WAAWO;AAAA,QACPC,EAAa,EAAE,MAAAV,GAAM,SAAAD,GAAS,UAAAM,GAAU,GAAGC,GAAO;AAAA,QAClDK,EAAW,EAAE,SAAAZ,GAAS,GAAGO,GAAO;AAAA,QAChCM,EAAW,EAAE,SAAAb,GAAS,GAAGO,GAAO;AAAA,QAChCH;AAAA,MACJ;AAAA,MACC,GAAGG;AAAA,MACJ,SAAS,CAACO,MAAU;;AAGhB,SAAAC,IAAAR,EAAM,YAAN,QAAAQ,EAAA,KAAAR,GAAgBO,IAChBT,KAAA,QAAAA,EAAUS;AAAA,MACd;AAAA,MAEC,UAAAhB;AAAA,IAAA;AAAA,EACL;AAGZ;AAEAF,EAAO,cAAc;"}
|
|
@@ -1,19 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
] })
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { useMemo as f, useCallback as d, useState as v, useRef as S, useEffect as m } from "react";
|
|
2
|
+
const U = ({
|
|
3
|
+
prop: e,
|
|
4
|
+
defaultProp: n,
|
|
5
|
+
onChange: s = () => {
|
|
6
|
+
}
|
|
7
|
+
}) => {
|
|
8
|
+
const [o, c] = b({ defaultProp: n, onChange: s }), t = e !== void 0, i = t ? e : o, r = f(() => s, [s]), a = d(
|
|
9
|
+
(l) => {
|
|
10
|
+
if (t) {
|
|
11
|
+
const u = typeof l == "function" ? l(e) : l;
|
|
12
|
+
u !== e && r(u);
|
|
13
|
+
} else
|
|
14
|
+
c(l);
|
|
15
|
+
},
|
|
16
|
+
[t, e, c, r]
|
|
17
|
+
);
|
|
18
|
+
return [i, a];
|
|
19
|
+
}, b = ({ defaultProp: e, onChange: n }) => {
|
|
20
|
+
const s = v(e), [o] = s, c = S(o), t = f(() => n, [n]);
|
|
21
|
+
return m(() => {
|
|
22
|
+
c.current !== o && (t == null || t(o), c.current = o);
|
|
23
|
+
}, [o, c, t]), s;
|
|
24
|
+
};
|
|
13
25
|
export {
|
|
14
|
-
|
|
15
|
-
S as ForwardedRefSelectItemGroup,
|
|
16
|
-
d as SelectItem,
|
|
17
|
-
m as SelectItemGroup
|
|
26
|
+
U as useControllableState
|
|
18
27
|
};
|
|
19
28
|
//# sourceMappingURL=fondue-components60.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components60.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"fondue-components60.js","sources":["../src/hooks/useControllableState.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type Dispatch, type SetStateAction, useCallback, useMemo, useState, useRef, useEffect } from 'react';\n\n// Radix UI handy hook for handling controlled and uncontrolled state\n// Source: https://github.com/radix-ui/primitives/blob/main/packages/react/use-controllable-state/src/useControllableState.tsx\n\ntype UseControllableStateParams<TValue> = {\n prop?: TValue;\n defaultProp?: TValue;\n onChange?: (state: TValue) => void;\n};\n\ntype SetStateFn<T> = (prevState?: T) => T;\n\nexport const useControllableState = <TValue>({\n prop,\n defaultProp,\n onChange = () => {},\n}: UseControllableStateParams<TValue>) => {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== undefined;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useMemo(() => onChange, [onChange]);\n\n const setValue: Dispatch<SetStateAction<TValue | undefined>> = useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue as SetStateFn<TValue>;\n const value = typeof nextValue === 'function' ? setter(prop) : nextValue;\n if (value !== prop) {\n handleChange(value as TValue);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange],\n );\n\n return [value, setValue] as const;\n};\n\nconst useUncontrolledState = <TValue>({ defaultProp, onChange }: Omit<UseControllableStateParams<TValue>, 'prop'>) => {\n const uncontrolledState = useState<TValue | undefined>(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = useRef(value);\n const handleChange = useMemo(() => onChange, [onChange]);\n\n useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange?.(value as TValue);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n\n return uncontrolledState;\n};\n"],"names":["useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","useUncontrolledState","isControlled","value","handleChange","useMemo","setValue","useCallback","nextValue","uncontrolledState","useState","prevValueRef","useRef","useEffect"],"mappings":";AAeO,MAAMA,IAAuB,CAAS;AAAA,EACzC,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC,IAAW,MAAM;AAAA,EAAA;AACrB,MAA0C;AAChC,QAAA,CAACC,GAAkBC,CAAmB,IAAIC,EAAqB,EAAE,aAAAJ,GAAa,UAAAC,GAAU,GACxFI,IAAeN,MAAS,QACxBO,IAAQD,IAAeN,IAAOG,GAC9BK,IAAeC,EAAQ,MAAMP,GAAU,CAACA,CAAQ,CAAC,GAEjDQ,IAAyDC;AAAA,IAC3D,CAACC,MAAc;AACX,UAAIN,GAAc;AAEd,cAAMC,IAAQ,OAAOK,KAAc,aADpBA,EACwCZ,CAAI,IAAIY;AAC/D,QAAIL,MAAUP,KACVQ,EAAaD,CAAe;AAAA,MAChC;AAEA,QAAAH,EAAoBQ,CAAS;AAAA,IAErC;AAAA,IACA,CAACN,GAAcN,GAAMI,GAAqBI,CAAY;AAAA,EAC1D;AAEO,SAAA,CAACD,GAAOG,CAAQ;AAC3B,GAEML,IAAuB,CAAS,EAAE,aAAAJ,GAAa,UAAAC,QAAiE;AAC5G,QAAAW,IAAoBC,EAA6Bb,CAAW,GAC5D,CAACM,CAAK,IAAIM,GACVE,IAAeC,EAAOT,CAAK,GAC3BC,IAAeC,EAAQ,MAAMP,GAAU,CAACA,CAAQ,CAAC;AAEvD,SAAAe,EAAU,MAAM;AACR,IAAAF,EAAa,YAAYR,MACzBC,KAAA,QAAAA,EAAeD,IACfQ,EAAa,UAAUR;AAAA,EAE5B,GAAA,CAACA,GAAOQ,GAAcP,CAAY,CAAC,GAE/BK;AACX;"}
|
|
@@ -1,80 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
highlightedIndex: p,
|
|
10
|
-
getMenuProps: l,
|
|
11
|
-
getItemProps: m,
|
|
12
|
-
children: u,
|
|
13
|
-
filterText: c,
|
|
14
|
-
align: f,
|
|
15
|
-
side: d,
|
|
16
|
-
selectedItem: t,
|
|
17
|
-
hasInteractedSinceOpening: h,
|
|
18
|
-
viewportCollisionPadding: v = "compact"
|
|
19
|
-
}) => {
|
|
20
|
-
const P = (e) => {
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
}, O = {
|
|
23
|
-
compact: 8,
|
|
24
|
-
spacious: 24
|
|
25
|
-
}, N = g();
|
|
26
|
-
return /* @__PURE__ */ r(i.Portal, { children: /* @__PURE__ */ r(A, { theme: N, children: /* @__PURE__ */ r(
|
|
27
|
-
i.Content,
|
|
28
|
-
{
|
|
29
|
-
align: f,
|
|
30
|
-
side: d,
|
|
31
|
-
collisionPadding: O[v] + 8,
|
|
32
|
-
onOpenAutoFocus: P,
|
|
33
|
-
className: n.portal,
|
|
34
|
-
children: /* @__PURE__ */ r(
|
|
35
|
-
"ul",
|
|
36
|
-
{
|
|
37
|
-
className: n.menu,
|
|
38
|
-
...l({}, { suppressRefError: !0 }),
|
|
39
|
-
"data-has-interacted": h ? "true" : "false",
|
|
40
|
-
"data-test-id": "fondue-select-menu",
|
|
41
|
-
children: D(
|
|
42
|
-
u,
|
|
43
|
-
(e, s) => {
|
|
44
|
-
if (((o) => (
|
|
45
|
-
// @ts-expect-error - We are explicitly checking for ref
|
|
46
|
-
V(o) && o.ref !== void 0
|
|
47
|
-
))(e)) {
|
|
48
|
-
const o = M(e.props), a = m({
|
|
49
|
-
item: o,
|
|
50
|
-
index: s,
|
|
51
|
-
...e.ref ? { ref: e.ref } : {}
|
|
52
|
-
});
|
|
53
|
-
return /* @__PURE__ */ r(
|
|
54
|
-
C,
|
|
55
|
-
{
|
|
56
|
-
className: n.item,
|
|
57
|
-
"data-highlighted": p === s,
|
|
58
|
-
"data-selected": (t == null ? void 0 : t.value) === o.value,
|
|
59
|
-
onTouchStart: (S) => {
|
|
60
|
-
a.onClick && a.onClick(S);
|
|
61
|
-
},
|
|
62
|
-
...a,
|
|
63
|
-
children: e
|
|
64
|
-
},
|
|
65
|
-
e.props.value
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
c
|
|
70
|
-
).parsedChildren
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
) }) });
|
|
1
|
+
const t = "_root_1yzu4_5", e = "_item_1yzu4_30", a = "_itemLabel_1yzu4_50", i = "_itemLabelActive_1yzu4_70", o = "_itemLabelInactive_1yzu4_100", _ = "_activeIndicator_1yzu4_130", c = "_separator_1yzu4_227", n = {
|
|
2
|
+
root: t,
|
|
3
|
+
item: e,
|
|
4
|
+
itemLabel: a,
|
|
5
|
+
itemLabelActive: i,
|
|
6
|
+
itemLabelInactive: o,
|
|
7
|
+
activeIndicator: _,
|
|
8
|
+
separator: c
|
|
75
9
|
};
|
|
76
|
-
T.displayName = "Select.Menu";
|
|
77
10
|
export {
|
|
78
|
-
|
|
11
|
+
_ as activeIndicator,
|
|
12
|
+
n as default,
|
|
13
|
+
e as item,
|
|
14
|
+
a as itemLabel,
|
|
15
|
+
i as itemLabelActive,
|
|
16
|
+
o as itemLabelInactive,
|
|
17
|
+
t as root,
|
|
18
|
+
c as separator
|
|
79
19
|
};
|
|
80
20
|
//# sourceMappingURL=fondue-components61.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components61.js","sources":[
|
|
1
|
+
{"version":3,"file":"fondue-components61.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|