@povio/ui 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/browser-tests/checkbox/CheckboxGroupHarness.d.ts +10 -0
- package/dist/browser-tests/checkbox/CheckboxHarness.d.ts +10 -0
- package/dist/browser-tests/checkbox/checkbox-group.spec.d.ts +1 -0
- package/dist/browser-tests/checkbox/checkbox.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/DateTimeHarnesses.d.ts +43 -0
- package/dist/browser-tests/datetime-picker/assertions.d.ts +9 -0
- package/dist/browser-tests/datetime-picker/date-input-focus.firefox.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/date-picker.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/date-range-picker.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/date-time-picker.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/time-picker.spec.d.ts +1 -0
- package/dist/browser-tests/file-upload/FileUploadHarness.d.ts +4 -0
- package/dist/browser-tests/file-upload/file-upload.spec.d.ts +1 -0
- package/dist/browser-tests/file-upload-container/FileUploadContainerHarness.d.ts +4 -0
- package/dist/browser-tests/file-upload-container/file-upload-container.spec.d.ts +1 -0
- package/dist/browser-tests/input-upload/InputUploadHarness.d.ts +9 -0
- package/dist/browser-tests/input-upload/input-upload.spec.d.ts +1 -0
- package/dist/browser-tests/modal/ModalHarness.d.ts +5 -0
- package/dist/browser-tests/modal/modal.spec.d.ts +1 -0
- package/dist/browser-tests/number-input/NumberInputHarness.d.ts +10 -0
- package/dist/browser-tests/number-input/number-input.spec.d.ts +1 -0
- package/dist/browser-tests/number-range-input/NumberRangeInputHarness.d.ts +10 -0
- package/dist/browser-tests/number-range-input/number-range-input.spec.d.ts +1 -0
- package/dist/browser-tests/password-input/PasswordInputHarness.d.ts +6 -0
- package/dist/browser-tests/password-input/password-input.spec.d.ts +1 -0
- package/dist/browser-tests/radio-group/RadioGroupHarness.d.ts +15 -0
- package/dist/browser-tests/radio-group/radio-group.spec.d.ts +1 -0
- package/dist/browser-tests/selection/SelectionHarnesses.d.ts +61 -0
- package/dist/browser-tests/selection/autocomplete.spec.d.ts +1 -0
- package/dist/browser-tests/selection/interactions.d.ts +2 -0
- package/dist/browser-tests/selection/query-autocomplete.spec.d.ts +1 -0
- package/dist/browser-tests/selection/query-select.spec.d.ts +1 -0
- package/dist/browser-tests/selection/select.spec.d.ts +1 -0
- package/dist/browser-tests/slider/SliderHarness.d.ts +11 -0
- package/dist/browser-tests/slider/slider.spec.d.ts +1 -0
- package/dist/browser-tests/text-area/TextAreaHarness.d.ts +10 -0
- package/dist/browser-tests/text-area/text-area.spec.d.ts +1 -0
- package/dist/browser-tests/text-input/TextInputHarness.d.ts +10 -0
- package/dist/browser-tests/text-input/text-input.spec.d.ts +1 -0
- package/dist/browser-tests/toggle/ToggleHarness.d.ts +10 -0
- package/dist/browser-tests/toggle/toggle.spec.d.ts +1 -0
- package/dist/browser-tests/utils/blur.d.ts +22 -0
- package/dist/browser-tests/utils/events.d.ts +4 -0
- package/dist/browser-tests/utils/input.d.ts +10 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +206 -55
- package/dist/components/buttons/Button/button.cva.d.ts +1 -1
- package/dist/components/buttons/Button/button.cva.js +4 -4
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/pillButton.cva.js +4 -4
- package/dist/components/buttons/shared/ButtonContent.js +80 -22
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +222 -74
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +182 -56
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +128 -41
- package/dist/components/inputs/DateTime/shared/Calendar.js +339 -139
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +308 -114
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -35
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +229 -95
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +296 -115
- package/dist/components/inputs/DateTime/shared/DateField.js +306 -135
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +338 -140
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/File/FileUpload.js +1 -1
- package/dist/components/inputs/File/InputUpload.js +261 -65
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +180 -48
- package/dist/components/inputs/File/shared/FileUploadContentError.js +265 -95
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +261 -99
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +234 -56
- package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +313 -75
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +83 -23
- package/dist/components/inputs/Selection/Select/QuerySelect.js +96 -30
- package/dist/components/inputs/Selection/shared/SelectListBox.js +163 -51
- package/dist/components/inputs/Selection/shared/useSelectItems.js +108 -48
- package/dist/components/inputs/Skeleton/InputFrame.js +550 -177
- package/dist/components/inputs/TextEditor/TextEditor.js +389 -87
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +1 -1
- package/dist/components/overlays/Modal/Modal.d.ts +3 -2
- package/dist/components/overlays/Modal/Modal.js +3 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +110 -29
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/text/Typography/Typography.js +23 -8
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.js +39 -8
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFormAutosave.js +120 -33
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/vitest.setup.browser.d.ts +6 -0
- package/package.json +1 -1
|
@@ -5,12 +5,16 @@ import { MenuDesktop } from "../Menu/MenuDesktop.js";
|
|
|
5
5
|
import { Typography } from "../text/Typography/Typography.js";
|
|
6
6
|
import { Tooltip as Tooltip$1 } from "../overlays/Tooltip/Tooltip.js";
|
|
7
7
|
import { LinkContext } from "../../config/link.context.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
8
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { clsx } from "clsx";
|
|
10
11
|
import { useLayoutEffect, useRef, useState } from "react";
|
|
11
12
|
import { Breadcrumb, Breadcrumbs, Button, Link } from "react-aria-components";
|
|
12
13
|
//#region src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
13
|
-
var Breadcrumbs$1 = (
|
|
14
|
+
var Breadcrumbs$1 = (t0) => {
|
|
15
|
+
const $ = c(58);
|
|
16
|
+
const { items, className, onAction, iconOnly: t1 } = t0;
|
|
17
|
+
const iconOnly = t1 === void 0 ? false : t1;
|
|
14
18
|
const breadcrumbsCva = UIOverrides.useCva("breadcrumbs.cva", breadcrumbsDefinition);
|
|
15
19
|
const breadcrumbItem = UIOverrides.useCva("breadcrumbs.itemCva", breadcrumbItemDefinition);
|
|
16
20
|
const breadcrumbSegmentCva = UIOverrides.useCva("breadcrumbs.segmentCva", breadcrumbSegmentDefinition);
|
|
@@ -18,45 +22,61 @@ var Breadcrumbs$1 = ({ items, className, onAction, iconOnly: iconOnly_0 = false
|
|
|
18
22
|
const breadcrumbIconCva = UIOverrides.useCva("breadcrumbs.iconCva", breadcrumbIconDefinition);
|
|
19
23
|
const containerRef = useRef(null);
|
|
20
24
|
const [isOverflowing, setIsOverflowing] = useState(items.length <= 2 ? false : null);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
let t2;
|
|
26
|
+
if ($[0] !== items.length) {
|
|
27
|
+
t2 = () => {
|
|
28
|
+
if (items.length <= 2) {
|
|
29
|
+
setIsOverflowing(false);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const container = containerRef.current;
|
|
33
|
+
if (!container) return;
|
|
34
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
35
|
+
setIsOverflowing(container.scrollWidth > container.clientWidth);
|
|
36
|
+
});
|
|
37
|
+
resizeObserver.observe(container);
|
|
38
|
+
return () => resizeObserver.disconnect();
|
|
39
|
+
};
|
|
40
|
+
$[0] = items.length;
|
|
41
|
+
$[1] = t2;
|
|
42
|
+
} else t2 = $[1];
|
|
43
|
+
let t3;
|
|
44
|
+
if ($[2] !== items) {
|
|
45
|
+
t3 = [items];
|
|
46
|
+
$[2] = items;
|
|
47
|
+
$[3] = t3;
|
|
48
|
+
} else t3 = $[3];
|
|
49
|
+
useLayoutEffect(t2, t3);
|
|
34
50
|
const isReady = isOverflowing !== null;
|
|
35
51
|
const hiddenItems = items.length > 2 ? items.slice(1, -1) : [];
|
|
36
52
|
const firstItem = items[0];
|
|
37
53
|
const lastItem = items[items.length - 1];
|
|
38
54
|
const LinkComponent = LinkContext.useLinkContext()?.LinkComponent ?? Link;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
className:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
let t4;
|
|
56
|
+
if ($[4] !== LinkComponent || $[5] !== breadcrumbIconCva || $[6] !== breadcrumbItem) {
|
|
57
|
+
t4 = (item, isCurrent, iconOnly_0) => /* @__PURE__ */ jsxs(LinkComponent, {
|
|
58
|
+
...item.link,
|
|
59
|
+
className: breadcrumbItem({ isCurrent }),
|
|
60
|
+
children: [item.icon && /* @__PURE__ */ jsx(item.icon, {
|
|
61
|
+
className: breadcrumbIconCva({}),
|
|
62
|
+
"aria-label": item.label
|
|
63
|
+
}), !iconOnly_0 && /* @__PURE__ */ jsx(Typography, {
|
|
64
|
+
variant: "default",
|
|
65
|
+
size: "label-3",
|
|
66
|
+
children: item.label
|
|
67
|
+
})]
|
|
68
|
+
});
|
|
69
|
+
$[4] = LinkComponent;
|
|
70
|
+
$[5] = breadcrumbIconCva;
|
|
71
|
+
$[6] = breadcrumbItem;
|
|
72
|
+
$[7] = t4;
|
|
73
|
+
} else t4 = $[7];
|
|
74
|
+
const renderBreadcrumbLink = t4;
|
|
51
75
|
if (isOverflowing === true && items.length > 2) {
|
|
52
|
-
const menuItems = hiddenItems.map(
|
|
53
|
-
id: item_0.id,
|
|
54
|
-
label: item_0.label,
|
|
55
|
-
link: item_0.link
|
|
56
|
-
}));
|
|
76
|
+
const menuItems = hiddenItems.map(_temp);
|
|
57
77
|
const renderEllipsis = () => /* @__PURE__ */ jsx(MenuDesktop, {
|
|
58
78
|
trigger: /* @__PURE__ */ jsx(Tooltip$1, {
|
|
59
|
-
text: hiddenItems.map(
|
|
79
|
+
text: hiddenItems.map(_temp2).join(", "),
|
|
60
80
|
children: /* @__PURE__ */ jsx(Button, {
|
|
61
81
|
"aria-label": "Show hidden breadcrumbs",
|
|
62
82
|
className: breadcrumbItem({
|
|
@@ -73,40 +93,171 @@ var Breadcrumbs$1 = ({ items, className, onAction, iconOnly: iconOnly_0 = false
|
|
|
73
93
|
items: menuItems,
|
|
74
94
|
onAction: onAction ? (key) => onAction(key) : void 0
|
|
75
95
|
});
|
|
96
|
+
let t5;
|
|
97
|
+
if ($[8] !== breadcrumbsCva || $[9] !== className) {
|
|
98
|
+
t5 = clsx(breadcrumbsCva({}), className);
|
|
99
|
+
$[8] = breadcrumbsCva;
|
|
100
|
+
$[9] = className;
|
|
101
|
+
$[10] = t5;
|
|
102
|
+
} else t5 = $[10];
|
|
103
|
+
const t6 = firstItem.id;
|
|
104
|
+
let t7;
|
|
105
|
+
if ($[11] !== breadcrumbSegmentCva) {
|
|
106
|
+
t7 = breadcrumbSegmentCva({});
|
|
107
|
+
$[11] = breadcrumbSegmentCva;
|
|
108
|
+
$[12] = t7;
|
|
109
|
+
} else t7 = $[12];
|
|
110
|
+
let t8;
|
|
111
|
+
if ($[13] !== firstItem || $[14] !== iconOnly || $[15] !== renderBreadcrumbLink) {
|
|
112
|
+
t8 = renderBreadcrumbLink(firstItem, false, iconOnly);
|
|
113
|
+
$[13] = firstItem;
|
|
114
|
+
$[14] = iconOnly;
|
|
115
|
+
$[15] = renderBreadcrumbLink;
|
|
116
|
+
$[16] = t8;
|
|
117
|
+
} else t8 = $[16];
|
|
118
|
+
let t9;
|
|
119
|
+
if ($[17] !== breadcrumbChevronCva) {
|
|
120
|
+
t9 = breadcrumbChevronCva({});
|
|
121
|
+
$[17] = breadcrumbChevronCva;
|
|
122
|
+
$[18] = t9;
|
|
123
|
+
} else t9 = $[18];
|
|
124
|
+
let t10;
|
|
125
|
+
if ($[19] !== t9) {
|
|
126
|
+
t10 = /* @__PURE__ */ jsx(ChevronRightIcon, { className: t9 });
|
|
127
|
+
$[19] = t9;
|
|
128
|
+
$[20] = t10;
|
|
129
|
+
} else t10 = $[20];
|
|
130
|
+
let t11;
|
|
131
|
+
if ($[21] !== firstItem.id || $[22] !== t10 || $[23] !== t7 || $[24] !== t8) {
|
|
132
|
+
t11 = /* @__PURE__ */ jsxs(Breadcrumb, {
|
|
133
|
+
id: t6,
|
|
134
|
+
className: t7,
|
|
135
|
+
children: [t8, t10]
|
|
136
|
+
});
|
|
137
|
+
$[21] = firstItem.id;
|
|
138
|
+
$[22] = t10;
|
|
139
|
+
$[23] = t7;
|
|
140
|
+
$[24] = t8;
|
|
141
|
+
$[25] = t11;
|
|
142
|
+
} else t11 = $[25];
|
|
143
|
+
let t12;
|
|
144
|
+
if ($[26] !== breadcrumbSegmentCva) {
|
|
145
|
+
t12 = breadcrumbSegmentCva({});
|
|
146
|
+
$[26] = breadcrumbSegmentCva;
|
|
147
|
+
$[27] = t12;
|
|
148
|
+
} else t12 = $[27];
|
|
149
|
+
const t13 = renderEllipsis();
|
|
150
|
+
let t14;
|
|
151
|
+
if ($[28] !== breadcrumbChevronCva) {
|
|
152
|
+
t14 = breadcrumbChevronCva({});
|
|
153
|
+
$[28] = breadcrumbChevronCva;
|
|
154
|
+
$[29] = t14;
|
|
155
|
+
} else t14 = $[29];
|
|
156
|
+
let t15;
|
|
157
|
+
if ($[30] !== t14) {
|
|
158
|
+
t15 = /* @__PURE__ */ jsx(ChevronRightIcon, { className: t14 });
|
|
159
|
+
$[30] = t14;
|
|
160
|
+
$[31] = t15;
|
|
161
|
+
} else t15 = $[31];
|
|
162
|
+
const t16 = lastItem.id;
|
|
163
|
+
let t17;
|
|
164
|
+
if ($[32] !== breadcrumbSegmentCva) {
|
|
165
|
+
t17 = breadcrumbSegmentCva({});
|
|
166
|
+
$[32] = breadcrumbSegmentCva;
|
|
167
|
+
$[33] = t17;
|
|
168
|
+
} else t17 = $[33];
|
|
169
|
+
let t18;
|
|
170
|
+
if ($[34] !== lastItem || $[35] !== renderBreadcrumbLink) {
|
|
171
|
+
t18 = renderBreadcrumbLink(lastItem, true);
|
|
172
|
+
$[34] = lastItem;
|
|
173
|
+
$[35] = renderBreadcrumbLink;
|
|
174
|
+
$[36] = t18;
|
|
175
|
+
} else t18 = $[36];
|
|
176
|
+
let t19;
|
|
177
|
+
if ($[37] !== lastItem.id || $[38] !== t17 || $[39] !== t18) {
|
|
178
|
+
t19 = /* @__PURE__ */ jsx(Breadcrumb, {
|
|
179
|
+
id: t16,
|
|
180
|
+
className: t17,
|
|
181
|
+
children: t18
|
|
182
|
+
});
|
|
183
|
+
$[37] = lastItem.id;
|
|
184
|
+
$[38] = t17;
|
|
185
|
+
$[39] = t18;
|
|
186
|
+
$[40] = t19;
|
|
187
|
+
} else t19 = $[40];
|
|
76
188
|
return /* @__PURE__ */ jsxs(Breadcrumbs, {
|
|
77
189
|
onAction,
|
|
78
|
-
className:
|
|
190
|
+
className: t5,
|
|
79
191
|
children: [
|
|
80
|
-
|
|
81
|
-
id: firstItem.id,
|
|
82
|
-
className: breadcrumbSegmentCva({}),
|
|
83
|
-
children: [renderBreadcrumbLink(firstItem, false, iconOnly_0), /* @__PURE__ */ jsx(ChevronRightIcon, { className: breadcrumbChevronCva({}) })]
|
|
84
|
-
}),
|
|
192
|
+
t11,
|
|
85
193
|
/* @__PURE__ */ jsxs(Breadcrumb, {
|
|
86
194
|
id: "ellipsis",
|
|
87
|
-
className:
|
|
88
|
-
children: [
|
|
195
|
+
className: t12,
|
|
196
|
+
children: [t13, t15]
|
|
89
197
|
}),
|
|
90
|
-
|
|
91
|
-
id: lastItem.id,
|
|
92
|
-
className: breadcrumbSegmentCva({}),
|
|
93
|
-
children: renderBreadcrumbLink(lastItem, true)
|
|
94
|
-
})
|
|
198
|
+
t19
|
|
95
199
|
]
|
|
96
200
|
});
|
|
97
201
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
202
|
+
let t5;
|
|
203
|
+
if ($[41] !== breadcrumbsCva || $[42] !== className) {
|
|
204
|
+
t5 = clsx(breadcrumbsCva({}), className);
|
|
205
|
+
$[41] = breadcrumbsCva;
|
|
206
|
+
$[42] = className;
|
|
207
|
+
$[43] = t5;
|
|
208
|
+
} else t5 = $[43];
|
|
209
|
+
const t6 = isReady ? "visible" : "hidden";
|
|
210
|
+
let t7;
|
|
211
|
+
if ($[44] !== t6) {
|
|
212
|
+
t7 = { visibility: t6 };
|
|
213
|
+
$[44] = t6;
|
|
214
|
+
$[45] = t7;
|
|
215
|
+
} else t7 = $[45];
|
|
216
|
+
let t8;
|
|
217
|
+
if ($[46] !== breadcrumbChevronCva || $[47] !== breadcrumbSegmentCva || $[48] !== iconOnly || $[49] !== items[0] || $[50] !== renderBreadcrumbLink) {
|
|
218
|
+
t8 = (item_1) => /* @__PURE__ */ jsx(Breadcrumb, {
|
|
105
219
|
id: item_1.id,
|
|
106
220
|
className: breadcrumbSegmentCva({}),
|
|
107
|
-
children: (
|
|
108
|
-
|
|
109
|
-
|
|
221
|
+
children: (t9) => {
|
|
222
|
+
const { isCurrent: isCurrent_0 } = t9;
|
|
223
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [renderBreadcrumbLink(item_1, isCurrent_0, iconOnly && item_1 === items[0]), !isCurrent_0 && /* @__PURE__ */ jsx(ChevronRightIcon, { className: breadcrumbChevronCva({}) })] });
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
$[46] = breadcrumbChevronCva;
|
|
227
|
+
$[47] = breadcrumbSegmentCva;
|
|
228
|
+
$[48] = iconOnly;
|
|
229
|
+
$[49] = items[0];
|
|
230
|
+
$[50] = renderBreadcrumbLink;
|
|
231
|
+
$[51] = t8;
|
|
232
|
+
} else t8 = $[51];
|
|
233
|
+
let t9;
|
|
234
|
+
if ($[52] !== items || $[53] !== onAction || $[54] !== t5 || $[55] !== t7 || $[56] !== t8) {
|
|
235
|
+
t9 = /* @__PURE__ */ jsx(Breadcrumbs, {
|
|
236
|
+
ref: containerRef,
|
|
237
|
+
items,
|
|
238
|
+
onAction,
|
|
239
|
+
className: t5,
|
|
240
|
+
style: t7,
|
|
241
|
+
children: t8
|
|
242
|
+
});
|
|
243
|
+
$[52] = items;
|
|
244
|
+
$[53] = onAction;
|
|
245
|
+
$[54] = t5;
|
|
246
|
+
$[55] = t7;
|
|
247
|
+
$[56] = t8;
|
|
248
|
+
$[57] = t9;
|
|
249
|
+
} else t9 = $[57];
|
|
250
|
+
return t9;
|
|
110
251
|
};
|
|
252
|
+
function _temp(item_0) {
|
|
253
|
+
return {
|
|
254
|
+
id: item_0.id,
|
|
255
|
+
label: item_0.label,
|
|
256
|
+
link: item_0.link
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function _temp2(i) {
|
|
260
|
+
return i.label;
|
|
261
|
+
}
|
|
111
262
|
//#endregion
|
|
112
263
|
export { Breadcrumbs$1 as Breadcrumbs };
|
|
@@ -92,7 +92,7 @@ export declare const buttonIconSizeDefinition: {
|
|
|
92
92
|
export type ButtonIconSizeConfig = NonNullable<typeof buttonIconSizeDefinition.config>;
|
|
93
93
|
export declare const buttonTypography: (props: {
|
|
94
94
|
readonly width?: "fill" | "hug" | null | undefined;
|
|
95
|
-
readonly size?: "none" | "
|
|
95
|
+
readonly size?: "none" | "s" | "xs" | "m" | "l" | null | undefined;
|
|
96
96
|
readonly color?: "error" | "primary" | "dual" | "secondary" | "success" | "warning" | null | undefined;
|
|
97
97
|
readonly variant?: "text" | "contained" | "outlined" | "subtle" | "ghost" | null | undefined;
|
|
98
98
|
readonly inverted?: boolean | null | undefined;
|
|
@@ -88,7 +88,7 @@ var buttonDefinition = UIOverrides.defineConfig({
|
|
|
88
88
|
"pressed:border-interactive-subtle-primary-pressed pressed:bg-interactive-subtle-primary-pressed pressed:text-interactive-subtle-primary-on-pressed",
|
|
89
89
|
"disabled:border-interactive-subtle-primary-disabled disabled:bg-interactive-subtle-primary-disabled disabled:text-interactive-subtle-primary-on-disabled",
|
|
90
90
|
"focus-visible:outline-interactive-subtle-primary-focus",
|
|
91
|
-
"selected:border-interactive-
|
|
91
|
+
"selected:border-interactive-subtle-primary-toggled-idle selected:bg-interactive-subtle-primary-toggled-idle selected:text-interactive-subtle-primary-on-toggled-idle",
|
|
92
92
|
"selected:hover:border-interactive-subtle-primary-toggled-hover selected:hover:bg-interactive-subtle-primary-toggled-hover selected:hover:text-interactive-subtle-primary-on-toggled-hover",
|
|
93
93
|
"selected:disabled:border-interactive-subtle-primary-toggled-disabled selected:disabled:bg-interactive-subtle-primary-toggled-disabled selected:disabled:text-interactive-subtle-primary-on-toggled-disabled",
|
|
94
94
|
"group-data-[split]/split:data-[separator]:after:bg-interactive-subtle-primary-on-idle!"
|
|
@@ -133,9 +133,9 @@ var buttonDefinition = UIOverrides.defineConfig({
|
|
|
133
133
|
"pressed:border-interactive-outlined-secondary-outline-pressed pressed:bg-interactive-outlined-secondary-pressed pressed:text-interactive-outlined-secondary-on-pressed",
|
|
134
134
|
"disabled:border-interactive-outlined-secondary-outline-disabled disabled:bg-interactive-outlined-secondary-disabled disabled:text-interactive-outlined-secondary-on-disabled",
|
|
135
135
|
"focus-visible:outline-interactive-outlined-secondary-focus",
|
|
136
|
-
"selected:border-interactive-
|
|
137
|
-
"selected:hover:border-interactive-
|
|
138
|
-
"selected:disabled:border-interactive-
|
|
136
|
+
"selected:border-interactive-outlined-secondary-toggled-idle selected:bg-interactive-outlined-secondary-toggled-idle selected:text-interactive-outlined-secondary-on-toggled-idle",
|
|
137
|
+
"selected:hover:border-interactive-outlined-secondary-toggled-hover selected:hover:bg-interactive-outlined-secondary-toggled-hover selected:hover:text-interactive-outlined-secondary-on-toggled-hover",
|
|
138
|
+
"selected:disabled:border-interactive-outlined-secondary-toggled-disabled selected:disabled:bg-interactive-outlined-secondary-toggled-disabled selected:disabled:text-interactive-outlined-secondary-on-toggled-disabled"
|
|
139
139
|
]
|
|
140
140
|
},
|
|
141
141
|
{
|
|
@@ -1,15 +1,40 @@
|
|
|
1
1
|
import { Button } from "../Button/Button.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/buttons/InlineIconButton/InlineIconButton.tsx
|
|
4
|
-
var InlineIconButton = (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
var InlineIconButton = (t0) => {
|
|
6
|
+
const $ = c(8);
|
|
7
|
+
let label;
|
|
8
|
+
let props;
|
|
9
|
+
let t1;
|
|
10
|
+
if ($[0] !== t0) {
|
|
11
|
+
({label, size: t1, ...props} = t0);
|
|
12
|
+
$[0] = t0;
|
|
13
|
+
$[1] = label;
|
|
14
|
+
$[2] = props;
|
|
15
|
+
$[3] = t1;
|
|
16
|
+
} else {
|
|
17
|
+
label = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
t1 = $[3];
|
|
20
|
+
}
|
|
21
|
+
const size = t1 === void 0 ? "none" : t1;
|
|
22
|
+
let t2;
|
|
23
|
+
if ($[4] !== label || $[5] !== props || $[6] !== size) {
|
|
24
|
+
t2 = /* @__PURE__ */ jsx(Button, {
|
|
25
|
+
...props,
|
|
26
|
+
iconOnly: true,
|
|
27
|
+
variant: "text",
|
|
28
|
+
size,
|
|
29
|
+
width: "hug",
|
|
30
|
+
children: label
|
|
31
|
+
});
|
|
32
|
+
$[4] = label;
|
|
33
|
+
$[5] = props;
|
|
34
|
+
$[6] = size;
|
|
35
|
+
$[7] = t2;
|
|
36
|
+
} else t2 = $[7];
|
|
37
|
+
return t2;
|
|
13
38
|
};
|
|
14
39
|
//#endregion
|
|
15
40
|
export { InlineIconButton };
|
|
@@ -63,7 +63,7 @@ var pillButtonDefinition = UIOverrides.defineConfig({
|
|
|
63
63
|
"pressed:border-interactive-subtle-primary-pressed pressed:bg-interactive-subtle-primary-pressed pressed:text-interactive-subtle-primary-on-pressed",
|
|
64
64
|
"disabled:border-interactive-subtle-primary-disabled disabled:bg-interactive-subtle-primary-disabled disabled:text-interactive-subtle-primary-on-disabled",
|
|
65
65
|
"focus-visible:outline-interactive-subtle-primary-focus",
|
|
66
|
-
"selected:border-interactive-
|
|
66
|
+
"selected:border-interactive-subtle-primary-toggled-idle selected:bg-interactive-subtle-primary-toggled-idle selected:text-interactive-subtle-primary-on-toggled-idle",
|
|
67
67
|
"selected:hover:border-interactive-subtle-primary-toggled-hover selected:hover:bg-interactive-subtle-primary-toggled-hover selected:hover:text-interactive-subtle-primary-on-toggled-hover",
|
|
68
68
|
"selected:disabled:border-interactive-subtle-primary-toggled-disabled selected:disabled:bg-interactive-subtle-primary-toggled-disabled selected:disabled:text-interactive-subtle-primary-on-toggled-disabled"
|
|
69
69
|
]
|
|
@@ -91,9 +91,9 @@ var pillButtonDefinition = UIOverrides.defineConfig({
|
|
|
91
91
|
"pressed:border-interactive-outlined-secondary-outline-pressed pressed:bg-interactive-outlined-secondary-pressed pressed:text-interactive-outlined-secondary-on-pressed",
|
|
92
92
|
"disabled:border-interactive-outlined-secondary-outline-disabled disabled:bg-interactive-outlined-secondary-disabled disabled:text-interactive-outlined-secondary-on-disabled",
|
|
93
93
|
"focus-visible:outline-interactive-outlined-secondary-focus",
|
|
94
|
-
"selected:border-interactive-
|
|
95
|
-
"selected:hover:border-interactive-
|
|
96
|
-
"selected:disabled:border-interactive-
|
|
94
|
+
"selected:border-interactive-outlined-secondary-toggled-idle selected:bg-interactive-outlined-secondary-toggled-idle selected:text-interactive-outlined-secondary-on-toggled-idle",
|
|
95
|
+
"selected:hover:border-interactive-outlined-secondary-toggled-hover selected:hover:bg-interactive-outlined-secondary-toggled-hover selected:hover:text-interactive-outlined-secondary-on-toggled-hover",
|
|
96
|
+
"selected:disabled:border-interactive-outlined-secondary-toggled-disabled selected:disabled:bg-interactive-outlined-secondary-toggled-disabled selected:disabled:text-interactive-outlined-secondary-on-toggled-disabled"
|
|
97
97
|
]
|
|
98
98
|
},
|
|
99
99
|
{
|
|
@@ -2,36 +2,94 @@ import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { typographyDefinition } from "../../text/Typography/typography.cva.js";
|
|
3
3
|
import { buttonContentLabel } from "./buttonContent.cva.js";
|
|
4
4
|
import { Loader } from "../../status/Loader/Loader.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { clsx } from "clsx";
|
|
7
8
|
import { isValidElement } from "react";
|
|
8
9
|
//#region src/components/buttons/shared/ButtonContent.tsx
|
|
9
|
-
var ButtonContent = (
|
|
10
|
+
var ButtonContent = (t0) => {
|
|
11
|
+
const $ = c(21);
|
|
12
|
+
const { ref, content, isLoading, icon: Icon, iconClassName, hideText, iconPosition: t1, typography: typographyOverrides } = t0;
|
|
13
|
+
const iconPosition = t1 === void 0 ? "left" : t1;
|
|
10
14
|
const typographyCva = UIOverrides.useCva("typography.cva", typographyDefinition);
|
|
11
15
|
let iconOrLoader = null;
|
|
12
|
-
if (isLoading)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})
|
|
16
|
+
if (isLoading) {
|
|
17
|
+
let t2;
|
|
18
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
19
|
+
t2 = /* @__PURE__ */ jsx(Loader, { className: "shrink-0" });
|
|
20
|
+
$[0] = t2;
|
|
21
|
+
} else t2 = $[0];
|
|
22
|
+
iconOrLoader = t2;
|
|
23
|
+
} else if (Icon) if (isValidElement(Icon)) iconOrLoader = Icon;
|
|
24
|
+
else {
|
|
25
|
+
let t2;
|
|
26
|
+
if ($[1] !== iconClassName) {
|
|
27
|
+
t2 = clsx("shrink-0", iconClassName);
|
|
28
|
+
$[1] = iconClassName;
|
|
29
|
+
$[2] = t2;
|
|
30
|
+
} else t2 = $[2];
|
|
31
|
+
let t3;
|
|
32
|
+
if ($[3] !== Icon || $[4] !== t2) {
|
|
33
|
+
t3 = /* @__PURE__ */ jsx(Icon, { className: t2 });
|
|
34
|
+
$[3] = Icon;
|
|
35
|
+
$[4] = t2;
|
|
36
|
+
$[5] = t3;
|
|
37
|
+
} else t3 = $[5];
|
|
38
|
+
iconOrLoader = t3;
|
|
39
|
+
}
|
|
40
|
+
let t2;
|
|
41
|
+
let t3;
|
|
42
|
+
if ($[6] !== hideText || $[7] !== iconOrLoader || $[8] !== iconPosition || $[9] !== typographyCva || $[10] !== typographyOverrides) {
|
|
43
|
+
const resolvedTypography = {
|
|
44
|
+
size: "label-2",
|
|
45
|
+
variant: "prominent-1",
|
|
46
|
+
...typographyOverrides
|
|
47
|
+
};
|
|
48
|
+
t3 = iconOrLoader && iconPosition === "left" && iconOrLoader;
|
|
49
|
+
t2 = clsx(typographyCva({
|
|
50
|
+
...resolvedTypography,
|
|
51
|
+
sizeMobile: resolvedTypography.sizeMobile ?? resolvedTypography.size
|
|
52
|
+
}), buttonContentLabel({
|
|
53
|
+
iconPosition: iconOrLoader ? iconPosition : "none",
|
|
54
|
+
hideText: !!hideText
|
|
55
|
+
}));
|
|
56
|
+
$[6] = hideText;
|
|
57
|
+
$[7] = iconOrLoader;
|
|
58
|
+
$[8] = iconPosition;
|
|
59
|
+
$[9] = typographyCva;
|
|
60
|
+
$[10] = typographyOverrides;
|
|
61
|
+
$[11] = t2;
|
|
62
|
+
$[12] = t3;
|
|
63
|
+
} else {
|
|
64
|
+
t2 = $[11];
|
|
65
|
+
t3 = $[12];
|
|
66
|
+
}
|
|
67
|
+
let t4;
|
|
68
|
+
if ($[13] !== content || $[14] !== ref || $[15] !== t2) {
|
|
69
|
+
t4 = /* @__PURE__ */ jsx("span", {
|
|
70
|
+
className: t2,
|
|
30
71
|
ref,
|
|
31
72
|
children: content
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
73
|
+
});
|
|
74
|
+
$[13] = content;
|
|
75
|
+
$[14] = ref;
|
|
76
|
+
$[15] = t2;
|
|
77
|
+
$[16] = t4;
|
|
78
|
+
} else t4 = $[16];
|
|
79
|
+
const t5 = iconOrLoader && iconPosition === "right" && iconOrLoader;
|
|
80
|
+
let t6;
|
|
81
|
+
if ($[17] !== t3 || $[18] !== t4 || $[19] !== t5) {
|
|
82
|
+
t6 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
83
|
+
t3,
|
|
84
|
+
t4,
|
|
85
|
+
t5
|
|
86
|
+
] });
|
|
87
|
+
$[17] = t3;
|
|
88
|
+
$[18] = t4;
|
|
89
|
+
$[19] = t5;
|
|
90
|
+
$[20] = t6;
|
|
91
|
+
} else t6 = $[20];
|
|
92
|
+
return t6;
|
|
35
93
|
};
|
|
36
94
|
//#endregion
|
|
37
95
|
export { ButtonContent };
|
|
@@ -2,24 +2,38 @@ import { CheckboxCheckmarkIcon } from "../../../assets/icons/CheckboxCheckmark.j
|
|
|
2
2
|
import { CheckboxIndeterminateIcon } from "../../../assets/icons/CheckboxIndeterminate.js";
|
|
3
3
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
4
4
|
import { checkboxDefinition, checkboxIconDefinition } from "./checkbox.cva.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
//#region src/components/inputs/Checkbox/CheckboxCheckmark.tsx
|
|
7
|
-
var CheckboxCheckmark = (
|
|
8
|
+
var CheckboxCheckmark = (t0) => {
|
|
9
|
+
const $ = c(3);
|
|
10
|
+
const { variant, className, selectedIcon: t1, indeterminateIcon: t2, ...props } = t0;
|
|
11
|
+
const SelectedIcon = t1 === void 0 ? CheckboxCheckmarkIcon : t1;
|
|
12
|
+
const IndeterminateIcon = t2 === void 0 ? CheckboxIndeterminateIcon : t2;
|
|
8
13
|
const checkboxCva = UIOverrides.useCva("checkbox.cva", checkboxDefinition);
|
|
9
14
|
const checkboxIconCva = UIOverrides.useCva("checkbox.iconCva", checkboxIconDefinition);
|
|
15
|
+
const t3 = checkboxCva({
|
|
16
|
+
variant,
|
|
17
|
+
...props,
|
|
18
|
+
className
|
|
19
|
+
});
|
|
20
|
+
const t4 = checkboxIconCva({
|
|
21
|
+
...props,
|
|
22
|
+
iconVariant: "indeterminate"
|
|
23
|
+
});
|
|
24
|
+
let t5;
|
|
25
|
+
if ($[0] !== IndeterminateIcon || $[1] !== t4) {
|
|
26
|
+
t5 = /* @__PURE__ */ jsx(IndeterminateIcon, { className: t4 });
|
|
27
|
+
$[0] = IndeterminateIcon;
|
|
28
|
+
$[1] = t4;
|
|
29
|
+
$[2] = t5;
|
|
30
|
+
} else t5 = $[2];
|
|
10
31
|
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
-
className:
|
|
12
|
-
variant,
|
|
13
|
-
...props,
|
|
14
|
-
className
|
|
15
|
-
}),
|
|
32
|
+
className: t3,
|
|
16
33
|
children: [/* @__PURE__ */ jsx(SelectedIcon, { className: checkboxIconCva({
|
|
17
34
|
...props,
|
|
18
35
|
iconVariant: "selected"
|
|
19
|
-
}) }),
|
|
20
|
-
...props,
|
|
21
|
-
iconVariant: "indeterminate"
|
|
22
|
-
}) })]
|
|
36
|
+
}) }), t5]
|
|
23
37
|
});
|
|
24
38
|
};
|
|
25
39
|
//#endregion
|