@vygruppen/spor-react 12.24.10 → 12.24.12
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/.turbo/turbo-build.log +12 -12
- package/.turbo/turbo-postinstall.log +2 -2
- package/CHANGELOG.md +16 -0
- package/dist/index.cjs +291 -165
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.mjs +291 -165
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/accordion/Accordion.tsx +21 -6
- package/src/alert/Alert.tsx +10 -2
- package/src/breadcrumb/Breadcrumb.tsx +10 -5
- package/src/calendar/Calendar.tsx +11 -2
- package/src/calendar/CalendarCell.tsx +1 -0
- package/src/calendar/CalendarGrid.tsx +2 -1
- package/src/calendar/CalendarHeader.tsx +6 -1
- package/src/datepicker/Calendar.tsx +9 -2
- package/src/datepicker/CalendarCell.tsx +1 -0
- package/src/datepicker/CalendarGrid.tsx +2 -2
- package/src/datepicker/CalendarHeader.tsx +6 -1
- package/src/datepicker/DatePicker.tsx +7 -1
- package/src/input/Autocomplete.tsx +8 -9
- package/src/input/Switch.tsx +2 -0
- package/src/layout/RadioCard.tsx +16 -4
- package/src/loader/ProgressBar.tsx +7 -1
- package/src/progress-indicator/ProgressIndicator.tsx +18 -8
- package/src/stepper/Stepper.tsx +17 -5
- package/src/stepper/StepperStep.tsx +2 -1
package/dist/index.mjs
CHANGED
|
@@ -73,7 +73,7 @@ var warnAboutMismatchingIcon = ({
|
|
|
73
73
|
};
|
|
74
74
|
var Accordion = forwardRef(
|
|
75
75
|
(props, ref) => {
|
|
76
|
-
const { variant = "core", children, gap = 2, ...rest } = props;
|
|
76
|
+
const { variant = "core", children, gap = 2, css, ...rest } = props;
|
|
77
77
|
const recipe = useSlotRecipe({ key: "accordion" });
|
|
78
78
|
const styles = recipe({ variant });
|
|
79
79
|
return /* @__PURE__ */ jsx(
|
|
@@ -81,7 +81,7 @@ var Accordion = forwardRef(
|
|
|
81
81
|
{
|
|
82
82
|
...rest,
|
|
83
83
|
ref,
|
|
84
|
-
css: styles.root,
|
|
84
|
+
css: { ...styles.root, ...css },
|
|
85
85
|
variant,
|
|
86
86
|
children: /* @__PURE__ */ jsx(Stack, { gap, children })
|
|
87
87
|
}
|
|
@@ -93,25 +93,46 @@ var AccordionItemTrigger = forwardRef(function AccordionItemTrigger2(props, ref)
|
|
|
93
93
|
startElement,
|
|
94
94
|
children,
|
|
95
95
|
headingLevel,
|
|
96
|
+
css,
|
|
96
97
|
showChevron = true,
|
|
97
98
|
...rest
|
|
98
99
|
} = props;
|
|
99
100
|
warnAboutMismatchingIcon({ icon: startElement });
|
|
100
101
|
const recipe = useSlotRecipe({ key: "accordion" });
|
|
101
102
|
const styles = recipe();
|
|
102
|
-
return /* @__PURE__ */ jsx(Box, { as: headingLevel, children: /* @__PURE__ */ jsxs(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
return /* @__PURE__ */ jsx(Box, { as: headingLevel, children: /* @__PURE__ */ jsxs(
|
|
104
|
+
Accordion$1.ItemTrigger,
|
|
105
|
+
{
|
|
106
|
+
...rest,
|
|
107
|
+
ref,
|
|
108
|
+
css: { ...styles.itemTrigger, ...css },
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ jsxs(HStack, { flex: "1", gap: 1, textAlign: "start", width: "full", children: [
|
|
111
|
+
startElement && startElement,
|
|
112
|
+
children
|
|
113
|
+
] }),
|
|
114
|
+
showChevron && /* @__PURE__ */ jsx(Accordion$1.ItemIndicator, { children: /* @__PURE__ */ jsx(DropdownDownFill24Icon, {}) })
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
) });
|
|
109
118
|
});
|
|
110
119
|
var AccordionItemContent = forwardRef(function AccordionItemContent2(props, ref) {
|
|
111
|
-
const {
|
|
120
|
+
const {
|
|
121
|
+
children,
|
|
122
|
+
css,
|
|
123
|
+
"aria-labelledby": ariaLabelledBy,
|
|
124
|
+
...otherProps
|
|
125
|
+
} = props;
|
|
112
126
|
const recipe = useSlotRecipe({ key: "accordion" });
|
|
113
127
|
const styles = recipe();
|
|
114
|
-
return /* @__PURE__ */ jsx(
|
|
128
|
+
return /* @__PURE__ */ jsx(
|
|
129
|
+
Accordion$1.ItemContent,
|
|
130
|
+
{
|
|
131
|
+
css: { ...styles.itemContent, ...css },
|
|
132
|
+
"aria-labelledby": ariaLabelledBy,
|
|
133
|
+
children: /* @__PURE__ */ jsx(Accordion$1.ItemBody, { ...otherProps, ref, children })
|
|
134
|
+
}
|
|
135
|
+
);
|
|
115
136
|
});
|
|
116
137
|
Accordion.displayName = "Accordion";
|
|
117
138
|
var AccordionItem = Accordion$1.Item;
|
|
@@ -317,6 +338,7 @@ var ProgressBar = forwardRef(
|
|
|
317
338
|
isActive = true,
|
|
318
339
|
showValueText = false,
|
|
319
340
|
height = "0.5rem",
|
|
341
|
+
css,
|
|
320
342
|
...rest
|
|
321
343
|
}, ref) => {
|
|
322
344
|
const recipe = useSlotRecipe({ key: "progressbar" });
|
|
@@ -325,21 +347,30 @@ var ProgressBar = forwardRef(
|
|
|
325
347
|
label,
|
|
326
348
|
delay: labelRotationDelay
|
|
327
349
|
});
|
|
328
|
-
return /* @__PURE__ */ jsxs(
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
{
|
|
332
|
-
|
|
333
|
-
css: isActive ? styles.background : styles.disabledBackground,
|
|
334
|
-
children: /* @__PURE__ */ jsx(Progress.Range, { css: styles.progress })
|
|
335
|
-
}
|
|
336
|
-
),
|
|
337
|
-
label && /* @__PURE__ */ jsx(Progress.Label, { css: styles.description, children: currentLoadingText }),
|
|
338
|
-
showValueText && /* @__PURE__ */ jsxs(Progress.ValueText, { children: [
|
|
350
|
+
return /* @__PURE__ */ jsxs(
|
|
351
|
+
Progress.Root,
|
|
352
|
+
{
|
|
353
|
+
css: { ...styles.container, ...css },
|
|
354
|
+
ref,
|
|
339
355
|
value,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
356
|
+
...rest,
|
|
357
|
+
children: [
|
|
358
|
+
/* @__PURE__ */ jsx(
|
|
359
|
+
Progress.Track,
|
|
360
|
+
{
|
|
361
|
+
height,
|
|
362
|
+
css: isActive ? styles.background : styles.disabledBackground,
|
|
363
|
+
children: /* @__PURE__ */ jsx(Progress.Range, { css: styles.progress })
|
|
364
|
+
}
|
|
365
|
+
),
|
|
366
|
+
label && /* @__PURE__ */ jsx(Progress.Label, { css: styles.description, children: currentLoadingText }),
|
|
367
|
+
showValueText && /* @__PURE__ */ jsxs(Progress.ValueText, { children: [
|
|
368
|
+
value,
|
|
369
|
+
"%"
|
|
370
|
+
] })
|
|
371
|
+
]
|
|
372
|
+
}
|
|
373
|
+
);
|
|
343
374
|
}
|
|
344
375
|
);
|
|
345
376
|
ProgressBar.displayName = "ProgressBar";
|
|
@@ -1140,24 +1171,40 @@ var Alert = forwardRef((props, ref) => {
|
|
|
1140
1171
|
if (!open)
|
|
1141
1172
|
return null;
|
|
1142
1173
|
return /* @__PURE__ */ jsxs(Alert$1.Root, { ref, ...props, children: [
|
|
1143
|
-
/* @__PURE__ */ jsxs(
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1174
|
+
/* @__PURE__ */ jsxs(
|
|
1175
|
+
Alert$1.Content,
|
|
1176
|
+
{
|
|
1177
|
+
flexDirection: title ? "column" : "row",
|
|
1178
|
+
"data-part": "content",
|
|
1179
|
+
children: [
|
|
1180
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "1", alignItems: "flex-start", children: [
|
|
1181
|
+
showIndicator && /* @__PURE__ */ jsx(Alert$1.Indicator, { asChild: true, children: /* @__PURE__ */ jsx(AlertIcon, { variant: props.variant ?? "info", customIcon: icon }) }),
|
|
1182
|
+
title && /* @__PURE__ */ jsx(
|
|
1183
|
+
Alert$1.Title,
|
|
1184
|
+
{
|
|
1185
|
+
paddingRight: closable ? 6 : 0,
|
|
1186
|
+
"data-part": "title",
|
|
1187
|
+
children: title
|
|
1188
|
+
}
|
|
1189
|
+
)
|
|
1190
|
+
] }),
|
|
1191
|
+
children && /* @__PURE__ */ jsx(
|
|
1192
|
+
Alert$1.Description,
|
|
1193
|
+
{
|
|
1194
|
+
width: "100%",
|
|
1195
|
+
paddingLeft: title ? 0.5 : 0,
|
|
1196
|
+
paddingRight: closable ? 6 : 0,
|
|
1197
|
+
"data-part": "description",
|
|
1198
|
+
children
|
|
1199
|
+
}
|
|
1200
|
+
)
|
|
1201
|
+
]
|
|
1202
|
+
}
|
|
1203
|
+
),
|
|
1158
1204
|
closable && /* @__PURE__ */ jsx(
|
|
1159
1205
|
CloseButton,
|
|
1160
1206
|
{
|
|
1207
|
+
"data-part": "close-button",
|
|
1161
1208
|
size: "xs",
|
|
1162
1209
|
position: "absolute",
|
|
1163
1210
|
top: "1.5",
|
|
@@ -1325,15 +1372,22 @@ var texts6 = createTexts({
|
|
|
1325
1372
|
}
|
|
1326
1373
|
});
|
|
1327
1374
|
var Breadcrumb = forwardRef(
|
|
1328
|
-
({ children, ...props }, ref) => {
|
|
1375
|
+
({ children, css, ...props }, ref) => {
|
|
1329
1376
|
const validChildren = React20__default.Children.toArray(children).filter(
|
|
1330
1377
|
(element) => React20__default.isValidElement(element)
|
|
1331
1378
|
);
|
|
1332
|
-
return /* @__PURE__ */ jsx(Breadcrumb$1.Root, { ref, ...props, children: /* @__PURE__ */ jsx(Breadcrumb$1.List, { children: validChildren.map((child, index) => {
|
|
1379
|
+
return /* @__PURE__ */ jsx(Breadcrumb$1.Root, { ref, ...props, css, children: /* @__PURE__ */ jsx(Breadcrumb$1.List, { "data-part": "list", children: validChildren.map((child, index) => {
|
|
1333
1380
|
const isLast = index === validChildren.length - 1;
|
|
1334
1381
|
return /* @__PURE__ */ jsxs(React20__default.Fragment, { children: [
|
|
1335
|
-
/* @__PURE__ */ jsx(Breadcrumb$1.Item, { children: child }),
|
|
1336
|
-
!isLast && /* @__PURE__ */ jsx(
|
|
1382
|
+
/* @__PURE__ */ jsx(Breadcrumb$1.Item, { "data-part": "item", children: child }),
|
|
1383
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
1384
|
+
Breadcrumb$1.Separator,
|
|
1385
|
+
{
|
|
1386
|
+
"aria-hidden": "true",
|
|
1387
|
+
"data-part": "separator",
|
|
1388
|
+
children: /* @__PURE__ */ jsx(DropdownRightFill18Icon, {})
|
|
1389
|
+
}
|
|
1390
|
+
)
|
|
1337
1391
|
] }, index);
|
|
1338
1392
|
}) }) });
|
|
1339
1393
|
}
|
|
@@ -1504,9 +1558,19 @@ PressableCard.displayName = "PressableCard";
|
|
|
1504
1558
|
var RadioCard = forwardRef(
|
|
1505
1559
|
(props, ref) => {
|
|
1506
1560
|
const { inputProps, children } = props;
|
|
1561
|
+
const uniqueId = useId();
|
|
1562
|
+
const itemControlId = `radio-card-item-control-${uniqueId}`;
|
|
1563
|
+
const inputHasAriaLabel = (inputProps == null ? void 0 : inputProps["aria-labelledby"]) || (inputProps == null ? void 0 : inputProps["aria-label"]);
|
|
1507
1564
|
return /* @__PURE__ */ jsxs(RadioCard$1.Item, { ...props, children: [
|
|
1508
|
-
/* @__PURE__ */ jsx(
|
|
1509
|
-
|
|
1565
|
+
/* @__PURE__ */ jsx(
|
|
1566
|
+
RadioCard$1.ItemHiddenInput,
|
|
1567
|
+
{
|
|
1568
|
+
"aria-labelledby": inputHasAriaLabel ? inputProps == null ? void 0 : inputProps["aria-labelledby"] : itemControlId,
|
|
1569
|
+
ref,
|
|
1570
|
+
...inputProps
|
|
1571
|
+
}
|
|
1572
|
+
),
|
|
1573
|
+
/* @__PURE__ */ jsx(RadioCard$1.ItemControl, { id: itemControlId, "aria-hidden": true, children })
|
|
1510
1574
|
] });
|
|
1511
1575
|
}
|
|
1512
1576
|
);
|
|
@@ -1585,6 +1649,7 @@ function CalendarCell({ date, currentMonth }) {
|
|
|
1585
1649
|
children: /* @__PURE__ */ jsx(
|
|
1586
1650
|
Box,
|
|
1587
1651
|
{
|
|
1652
|
+
"data-part": "calendar-cell",
|
|
1588
1653
|
width: "100%",
|
|
1589
1654
|
height: "100%",
|
|
1590
1655
|
display: "flex",
|
|
@@ -1645,7 +1710,7 @@ function CalendarGrid({ offset = {} }) {
|
|
|
1645
1710
|
state
|
|
1646
1711
|
);
|
|
1647
1712
|
const weeksInMonth = getWeeksInMonth(startDate, locale);
|
|
1648
|
-
return /* @__PURE__ */ jsxs("table", { ...gridProps, cellPadding: "0", children: [
|
|
1713
|
+
return /* @__PURE__ */ jsxs("table", { ...gridProps, cellPadding: "0", "data-part": "calendar-grid", children: [
|
|
1649
1714
|
/* @__PURE__ */ jsx("thead", { ...headerProps, children: /* @__PURE__ */ jsx("tr", { children: weekDays[language].map((day, index) => /* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(
|
|
1650
1715
|
Text3,
|
|
1651
1716
|
{
|
|
@@ -1662,6 +1727,7 @@ function CalendarGrid({ offset = {} }) {
|
|
|
1662
1727
|
paddingTop: 0.5,
|
|
1663
1728
|
textAlign: "center",
|
|
1664
1729
|
fontWeight: "bold",
|
|
1730
|
+
"data-part": "calendar-table-heading",
|
|
1665
1731
|
children: day
|
|
1666
1732
|
},
|
|
1667
1733
|
index
|
|
@@ -1696,63 +1762,72 @@ function CalendarHeader({ dualView }) {
|
|
|
1696
1762
|
function handleNext() {
|
|
1697
1763
|
state.focusNextPage();
|
|
1698
1764
|
}
|
|
1699
|
-
return /* @__PURE__ */ jsxs(
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1765
|
+
return /* @__PURE__ */ jsxs(
|
|
1766
|
+
Flex,
|
|
1767
|
+
{
|
|
1768
|
+
flex: 1,
|
|
1769
|
+
alignItems: "center",
|
|
1770
|
+
paddingBottom: 4,
|
|
1771
|
+
"data-part": "calendar-header",
|
|
1772
|
+
children: [
|
|
1773
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx("h2", { children: calendarProps["aria-label"] }) }),
|
|
1774
|
+
/* @__PURE__ */ jsx(
|
|
1775
|
+
IconButton,
|
|
1776
|
+
{
|
|
1777
|
+
size: "md",
|
|
1778
|
+
onClick: handlePrevious,
|
|
1779
|
+
variant: "ghost",
|
|
1780
|
+
marginLeft: 1,
|
|
1781
|
+
disabled: prevButtonProps.isDisabled,
|
|
1782
|
+
"aria-label": t(texts7.previousMonth),
|
|
1783
|
+
icon: /* @__PURE__ */ jsx(icons_exports.DropdownLeftFill24Icon, {})
|
|
1784
|
+
}
|
|
1785
|
+
),
|
|
1786
|
+
/* @__PURE__ */ jsx(
|
|
1787
|
+
Text3,
|
|
1788
|
+
{
|
|
1789
|
+
"aria-hidden": true,
|
|
1790
|
+
flex: 1,
|
|
1791
|
+
fontWeight: "bold",
|
|
1792
|
+
fontSize: "sm",
|
|
1793
|
+
textAlign: "center",
|
|
1794
|
+
children: capitalizeFirstLetter(
|
|
1795
|
+
monthDateFormatter.format(
|
|
1796
|
+
state.visibleRange.start.toDate(state.timeZone)
|
|
1797
|
+
)
|
|
1798
|
+
)
|
|
1799
|
+
}
|
|
1800
|
+
),
|
|
1801
|
+
dualView && /* @__PURE__ */ jsx(
|
|
1802
|
+
Text3,
|
|
1803
|
+
{
|
|
1804
|
+
"aria-hidden": true,
|
|
1805
|
+
flex: 1,
|
|
1806
|
+
fontWeight: "bold",
|
|
1807
|
+
fontSize: "sm",
|
|
1808
|
+
textAlign: "center",
|
|
1809
|
+
children: capitalizeFirstLetter(
|
|
1810
|
+
monthDateFormatter.format(
|
|
1811
|
+
state.visibleRange.start.add({ months: 1 }).toDate(state.timeZone)
|
|
1812
|
+
)
|
|
1813
|
+
)
|
|
1814
|
+
}
|
|
1815
|
+
),
|
|
1816
|
+
/* @__PURE__ */ jsx(
|
|
1817
|
+
IconButton,
|
|
1818
|
+
{
|
|
1819
|
+
size: "md",
|
|
1820
|
+
onClick: handleNext,
|
|
1821
|
+
marginRight: 1,
|
|
1822
|
+
variant: "ghost",
|
|
1823
|
+
disabled: nextButtonProps.isDisabled,
|
|
1824
|
+
"aria-label": t(texts7.nextMonth),
|
|
1825
|
+
icon: /* @__PURE__ */ jsx(icons_exports.DropdownRightFill24Icon, {})
|
|
1826
|
+
}
|
|
1740
1827
|
)
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
IconButton,
|
|
1745
|
-
{
|
|
1746
|
-
size: "md",
|
|
1747
|
-
onClick: handleNext,
|
|
1748
|
-
marginRight: 1,
|
|
1749
|
-
variant: "ghost",
|
|
1750
|
-
disabled: nextButtonProps.isDisabled,
|
|
1751
|
-
"aria-label": t(texts7.nextMonth),
|
|
1752
|
-
icon: /* @__PURE__ */ jsx(icons_exports.DropdownRightFill24Icon, {})
|
|
1753
|
-
}
|
|
1754
|
-
)
|
|
1755
|
-
] });
|
|
1828
|
+
]
|
|
1829
|
+
}
|
|
1830
|
+
);
|
|
1756
1831
|
}
|
|
1757
1832
|
var texts7 = createTexts({
|
|
1758
1833
|
previousMonth: {
|
|
@@ -1768,22 +1843,32 @@ var texts7 = createTexts({
|
|
|
1768
1843
|
sv: "N\xE4sta m\xE5nad"
|
|
1769
1844
|
}
|
|
1770
1845
|
});
|
|
1771
|
-
function Calendar({ dualView }) {
|
|
1846
|
+
function Calendar({ dualView, css }) {
|
|
1772
1847
|
const { calendarProps, ref } = useCalendar();
|
|
1773
|
-
return /* @__PURE__ */ jsxs(
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1848
|
+
return /* @__PURE__ */ jsxs(
|
|
1849
|
+
Box,
|
|
1850
|
+
{
|
|
1851
|
+
width: "fit-content",
|
|
1852
|
+
ref,
|
|
1853
|
+
...calendarProps,
|
|
1854
|
+
css,
|
|
1855
|
+
"data-part": "root",
|
|
1856
|
+
children: [
|
|
1857
|
+
/* @__PURE__ */ jsx(CalendarHeader, { dualView }),
|
|
1858
|
+
/* @__PURE__ */ jsxs(Flex, { alignItems: "flex-start", children: [
|
|
1859
|
+
/* @__PURE__ */ jsx(Box, { paddingRight: dualView ? 4 : 0, children: /* @__PURE__ */ jsx(CalendarGrid, {}) }),
|
|
1860
|
+
dualView && /* @__PURE__ */ jsx(
|
|
1861
|
+
Box,
|
|
1862
|
+
{
|
|
1863
|
+
paddingLeft: 4,
|
|
1864
|
+
borderLeft: ["1px solid var(--spor-colors-outline-disabled)"],
|
|
1865
|
+
children: /* @__PURE__ */ jsx(CalendarGrid, { offset: { months: 1 } })
|
|
1866
|
+
}
|
|
1867
|
+
)
|
|
1868
|
+
] })
|
|
1869
|
+
]
|
|
1870
|
+
}
|
|
1871
|
+
);
|
|
1787
1872
|
}
|
|
1788
1873
|
function ScrollCalendar(boxProps) {
|
|
1789
1874
|
const { state, calendarProps, ref, startValue } = useCalendar();
|
|
@@ -2062,6 +2147,7 @@ function CalendarCell2({
|
|
|
2062
2147
|
ref,
|
|
2063
2148
|
css: styles.dateCell,
|
|
2064
2149
|
hidden: isOutsideVisibleRange,
|
|
2150
|
+
"data-part": "calendar-cell",
|
|
2065
2151
|
children: date.day
|
|
2066
2152
|
}
|
|
2067
2153
|
) });
|
|
@@ -2094,8 +2180,8 @@ function CalendarGrid2({
|
|
|
2094
2180
|
key: "datePicker"
|
|
2095
2181
|
});
|
|
2096
2182
|
const styles = recipe({ variant });
|
|
2097
|
-
return /* @__PURE__ */ jsxs(Box, { as: "table", ...gridProps, css: styles.box, children: [
|
|
2098
|
-
/* @__PURE__ */ jsx("thead", { ...headerProps, children: /* @__PURE__ */ jsx("tr", { children: weekDays2[language].map((day, index) => {
|
|
2183
|
+
return /* @__PURE__ */ jsxs(Box, { as: "table", ...gridProps, css: styles.box, "data-part": "calendar-grid", children: [
|
|
2184
|
+
/* @__PURE__ */ jsx("thead", { ...headerProps, children: /* @__PURE__ */ jsx("tr", { "data-part": "calendar-table-heading", children: weekDays2[language].map((day, index) => {
|
|
2099
2185
|
return /* @__PURE__ */ jsx(
|
|
2100
2186
|
Text3,
|
|
2101
2187
|
{
|
|
@@ -2160,30 +2246,39 @@ function CalendarHeader2({
|
|
|
2160
2246
|
);
|
|
2161
2247
|
const areAllOtherYearsDisabled = isPreviousYearDisabled && isNextYearDisabled;
|
|
2162
2248
|
const isYearPickerVisible = showYearNavigation && !areAllOtherYearsDisabled;
|
|
2163
|
-
return /* @__PURE__ */ jsxs(
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2249
|
+
return /* @__PURE__ */ jsxs(
|
|
2250
|
+
Flex,
|
|
2251
|
+
{
|
|
2252
|
+
alignItems: "center",
|
|
2253
|
+
paddingBottom: "4",
|
|
2254
|
+
justifyContent: "space-between",
|
|
2255
|
+
"data-part": "calendar-header",
|
|
2256
|
+
children: [
|
|
2257
|
+
/* @__PURE__ */ jsx(
|
|
2258
|
+
CalendarNavigator,
|
|
2259
|
+
{
|
|
2260
|
+
title: title || (isYearPickerVisible ? monthTitle : monthAndYearTitle),
|
|
2261
|
+
unit: "month",
|
|
2262
|
+
onPrevious: () => state.setFocusedDate(state.focusedDate.subtract({ months: 1 })),
|
|
2263
|
+
onNext: () => state.setFocusedDate(state.focusedDate.add({ months: 1 })),
|
|
2264
|
+
isNextDisabled: !state.isPreviousVisibleRangeInvalid,
|
|
2265
|
+
isPreviousDisabled: !state.isNextVisibleRangeInvalid
|
|
2266
|
+
}
|
|
2267
|
+
),
|
|
2268
|
+
isYearPickerVisible && /* @__PURE__ */ jsx(
|
|
2269
|
+
CalendarNavigator,
|
|
2270
|
+
{
|
|
2271
|
+
title: jsDate.getFullYear().toString(),
|
|
2272
|
+
unit: "year",
|
|
2273
|
+
onPrevious: () => state.setFocusedDate(state.focusedDate.subtract({ years: 1 })),
|
|
2274
|
+
onNext: () => state.setFocusedDate(state.focusedDate.add({ years: 1 })),
|
|
2275
|
+
isPreviousDisabled: isPreviousYearDisabled,
|
|
2276
|
+
isNextDisabled: isNextYearDisabled
|
|
2277
|
+
}
|
|
2278
|
+
)
|
|
2279
|
+
]
|
|
2280
|
+
}
|
|
2281
|
+
);
|
|
2187
2282
|
}
|
|
2188
2283
|
var capitalize = (string_ = "") => string_.charAt(0).toUpperCase() + string_.slice(1);
|
|
2189
2284
|
var CalendarNavigator = ({
|
|
@@ -2257,6 +2352,7 @@ var texts8 = createTexts({
|
|
|
2257
2352
|
function Calendar2({
|
|
2258
2353
|
showYearNavigation,
|
|
2259
2354
|
variant,
|
|
2355
|
+
css,
|
|
2260
2356
|
...props
|
|
2261
2357
|
}) {
|
|
2262
2358
|
const { t } = useTranslation();
|
|
@@ -2273,10 +2369,18 @@ function Calendar2({
|
|
|
2273
2369
|
const { calendarProps } = useCalendar$1(props, state);
|
|
2274
2370
|
const calendarAriaLabel = calendarProps["aria-label"];
|
|
2275
2371
|
const ariaLabel = t(texts9.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
|
|
2276
|
-
return /* @__PURE__ */ jsxs(
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2372
|
+
return /* @__PURE__ */ jsxs(
|
|
2373
|
+
Box,
|
|
2374
|
+
{
|
|
2375
|
+
...calendarProps,
|
|
2376
|
+
"aria-label": ariaLabel,
|
|
2377
|
+
css: { ...styles.box, ...css },
|
|
2378
|
+
children: [
|
|
2379
|
+
/* @__PURE__ */ jsx(CalendarHeader2, { state, showYearNavigation }),
|
|
2380
|
+
/* @__PURE__ */ jsx(CalendarGrid2, { variant, state })
|
|
2381
|
+
]
|
|
2382
|
+
}
|
|
2383
|
+
);
|
|
2280
2384
|
}
|
|
2281
2385
|
var texts9 = createTexts({
|
|
2282
2386
|
calendar: {
|
|
@@ -2490,6 +2594,7 @@ var DatePicker = forwardRef(
|
|
|
2490
2594
|
invalid = false,
|
|
2491
2595
|
helperText,
|
|
2492
2596
|
positioning,
|
|
2597
|
+
css,
|
|
2493
2598
|
...props
|
|
2494
2599
|
}, externalRef) => {
|
|
2495
2600
|
const chakraFieldProps = useFieldContext();
|
|
@@ -2527,7 +2632,8 @@ var DatePicker = forwardRef(
|
|
|
2527
2632
|
{
|
|
2528
2633
|
...calendarProps,
|
|
2529
2634
|
variant,
|
|
2530
|
-
showYearNavigation
|
|
2635
|
+
showYearNavigation,
|
|
2636
|
+
css
|
|
2531
2637
|
}
|
|
2532
2638
|
) }) }) });
|
|
2533
2639
|
return /* @__PURE__ */ jsx(I18nProvider, { locale, children: /* @__PURE__ */ jsx(
|
|
@@ -2537,6 +2643,7 @@ var DatePicker = forwardRef(
|
|
|
2537
2643
|
display: "inline-flex",
|
|
2538
2644
|
flexDirection: "column",
|
|
2539
2645
|
width,
|
|
2646
|
+
css,
|
|
2540
2647
|
children: /* @__PURE__ */ jsxs(Popover$1.Root, { ...dialogProps, positioning, children: [
|
|
2541
2648
|
/* @__PURE__ */ jsx(
|
|
2542
2649
|
Field3,
|
|
@@ -3331,7 +3438,7 @@ var Autocomplete = ({
|
|
|
3331
3438
|
);
|
|
3332
3439
|
const combobox = useCombobox({
|
|
3333
3440
|
collection,
|
|
3334
|
-
openOnClick,
|
|
3441
|
+
openOnClick: filteredChildren.length > 0 ? openOnClick : false,
|
|
3335
3442
|
onInputValueChange: (event) => {
|
|
3336
3443
|
if (!filteredExternally) {
|
|
3337
3444
|
filter(event.inputValue);
|
|
@@ -3364,7 +3471,7 @@ var Autocomplete = ({
|
|
|
3364
3471
|
required,
|
|
3365
3472
|
onFocus: (event) => {
|
|
3366
3473
|
onFocus == null ? void 0 : onFocus(event);
|
|
3367
|
-
if (openOnFocus)
|
|
3474
|
+
if (openOnFocus && filteredChildren.length > 0)
|
|
3368
3475
|
combobox.setOpen(true);
|
|
3369
3476
|
}
|
|
3370
3477
|
}
|
|
@@ -3372,8 +3479,8 @@ var Autocomplete = ({
|
|
|
3372
3479
|
/* @__PURE__ */ jsx(Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsx(Combobox.ClearTrigger, { asChild: true, "aria-label": t(texts14.clearValue), children: /* @__PURE__ */ jsx(CloseButton, { size: "xs", tabIndex: 0 }) }) })
|
|
3373
3480
|
] }),
|
|
3374
3481
|
/* @__PURE__ */ jsx(Combobox.Positioner, { children: /* @__PURE__ */ jsxs(Combobox.Content, { children: [
|
|
3375
|
-
/* @__PURE__ */ jsx(Combobox.Empty, { children:
|
|
3376
|
-
loading ? /* @__PURE__ */ jsx(ColorSpinner, { width: "1.5rem", p: "2" }) :
|
|
3482
|
+
!loading && /* @__PURE__ */ jsx(Combobox.Empty, { children: emptyLabel ?? t(texts14.noItemsFound) }),
|
|
3483
|
+
loading ? /* @__PURE__ */ jsx(ColorSpinner, { width: "1.5rem", p: "2" }) : filteredChildren
|
|
3377
3484
|
] }) })
|
|
3378
3485
|
] });
|
|
3379
3486
|
};
|
|
@@ -4596,6 +4703,7 @@ var Switch = forwardRef(
|
|
|
4596
4703
|
invalid,
|
|
4597
4704
|
errorText,
|
|
4598
4705
|
helperText,
|
|
4706
|
+
css,
|
|
4599
4707
|
...rest
|
|
4600
4708
|
} = props;
|
|
4601
4709
|
const recipe = useSlotRecipe({ key: "switch" });
|
|
@@ -4609,6 +4717,7 @@ var Switch = forwardRef(
|
|
|
4609
4717
|
helperText,
|
|
4610
4718
|
required: props.required,
|
|
4611
4719
|
id: rest.id,
|
|
4720
|
+
css,
|
|
4612
4721
|
children: /* @__PURE__ */ jsxs(
|
|
4613
4722
|
Switch$1.Root,
|
|
4614
4723
|
{
|
|
@@ -5946,7 +6055,7 @@ var ProgressDot = ({ isActive }) => {
|
|
|
5946
6055
|
}
|
|
5947
6056
|
);
|
|
5948
6057
|
};
|
|
5949
|
-
var ProgressIndicator = forwardRef(({ numberOfSteps, activeStep }, ref) => {
|
|
6058
|
+
var ProgressIndicator = forwardRef(({ numberOfSteps, activeStep, css }, ref) => {
|
|
5950
6059
|
const { t } = useTranslation();
|
|
5951
6060
|
const recipe = useSlotRecipe({
|
|
5952
6061
|
key: "progressIndicator"
|
|
@@ -5955,18 +6064,24 @@ var ProgressIndicator = forwardRef(({ numberOfSteps, activeStep }, ref) => {
|
|
|
5955
6064
|
return /* @__PURE__ */ jsx(
|
|
5956
6065
|
Box,
|
|
5957
6066
|
{
|
|
5958
|
-
css: styles.root,
|
|
6067
|
+
css: { ...styles.root, ...css },
|
|
5959
6068
|
role: "progressbar",
|
|
5960
6069
|
"aria-valuemin": 1,
|
|
5961
6070
|
"aria-valuemax": numberOfSteps,
|
|
5962
6071
|
"aria-valuenow": activeStep,
|
|
5963
6072
|
"aria-valuetext": t(texts26.stepsOf(activeStep, numberOfSteps)),
|
|
5964
6073
|
ref,
|
|
5965
|
-
children: /* @__PURE__ */ jsx(Box, { css: styles.container, children: Array.from({ length: numberOfSteps }, (_, index) => /* @__PURE__ */ jsx(
|
|
5966
|
-
|
|
6074
|
+
children: /* @__PURE__ */ jsx(Box, { css: { ...styles.container, ...css }, children: Array.from({ length: numberOfSteps }, (_, index) => /* @__PURE__ */ jsx(
|
|
6075
|
+
Box,
|
|
5967
6076
|
{
|
|
5968
|
-
"
|
|
5969
|
-
|
|
6077
|
+
"data-part": activeStep === index + 1 ? "current-step" : "step",
|
|
6078
|
+
children: /* @__PURE__ */ jsx(
|
|
6079
|
+
ProgressDot,
|
|
6080
|
+
{
|
|
6081
|
+
"aria-valuenow": index + 1,
|
|
6082
|
+
isActive: activeStep === index + 1
|
|
6083
|
+
}
|
|
6084
|
+
)
|
|
5970
6085
|
},
|
|
5971
6086
|
index
|
|
5972
6087
|
)) })
|
|
@@ -6125,7 +6240,8 @@ var Stepper = forwardRef(
|
|
|
6125
6240
|
heading,
|
|
6126
6241
|
headingLevel,
|
|
6127
6242
|
variant,
|
|
6128
|
-
disabled
|
|
6243
|
+
disabled,
|
|
6244
|
+
css
|
|
6129
6245
|
} = props;
|
|
6130
6246
|
const recipe = useSlotRecipe({ key: "stepper" });
|
|
6131
6247
|
const style = recipe({ variant });
|
|
@@ -6133,14 +6249,14 @@ var Stepper = forwardRef(
|
|
|
6133
6249
|
const activeStep = Number(activeStepAsStringOrNumber);
|
|
6134
6250
|
const { t } = useTranslation();
|
|
6135
6251
|
const hideBackButtonOnFirstStep = activeStep === 1 && !onBackButtonClick;
|
|
6136
|
-
return /* @__PURE__ */ jsx(Box, { css: style.root, ref, children: /* @__PURE__ */ jsx(
|
|
6252
|
+
return /* @__PURE__ */ jsx(Box, { css: { ...style.root, ...css }, ref, children: /* @__PURE__ */ jsx(
|
|
6137
6253
|
StepperProvider,
|
|
6138
6254
|
{
|
|
6139
6255
|
onClick,
|
|
6140
6256
|
activeStep,
|
|
6141
6257
|
variant,
|
|
6142
6258
|
numberOfSteps,
|
|
6143
|
-
children: /* @__PURE__ */ jsxs(Box, { css: style.container, children: [
|
|
6259
|
+
children: /* @__PURE__ */ jsxs(Box, { css: style.container, "data-part": "root", children: [
|
|
6144
6260
|
/* @__PURE__ */ jsx(Box, { css: style.innerContainer, children: /* @__PURE__ */ jsxs(
|
|
6145
6261
|
Flex,
|
|
6146
6262
|
{
|
|
@@ -6166,8 +6282,17 @@ var Stepper = forwardRef(
|
|
|
6166
6282
|
}
|
|
6167
6283
|
}
|
|
6168
6284
|
),
|
|
6169
|
-
heading && /* @__PURE__ */ jsx(
|
|
6170
|
-
|
|
6285
|
+
heading && /* @__PURE__ */ jsx(
|
|
6286
|
+
Text3,
|
|
6287
|
+
{
|
|
6288
|
+
variant: "sm",
|
|
6289
|
+
as: headingLevel,
|
|
6290
|
+
css: style.title,
|
|
6291
|
+
"data-part": "title",
|
|
6292
|
+
children: heading
|
|
6293
|
+
}
|
|
6294
|
+
),
|
|
6295
|
+
/* @__PURE__ */ jsx(Box, { css: style.stepCounter, "data-part": "step-counter", children: t(texts27.stepsOf(activeStep, numberOfSteps)) })
|
|
6171
6296
|
]
|
|
6172
6297
|
}
|
|
6173
6298
|
) }),
|
|
@@ -6217,7 +6342,7 @@ var StepperStep = ({
|
|
|
6217
6342
|
_dark: "whiteAlpha.200"
|
|
6218
6343
|
};
|
|
6219
6344
|
const disabled = state !== "active" && disabledOverride || state === "disabled";
|
|
6220
|
-
return /* @__PURE__ */ jsxs(Box, { css: style.stepContainer, children: [
|
|
6345
|
+
return /* @__PURE__ */ jsxs(Box, { css: style.stepContainer, "data-part": "step-container", children: [
|
|
6221
6346
|
stepNumber > 1 && /* @__PURE__ */ jsx(
|
|
6222
6347
|
DropdownRightFill18Icon,
|
|
6223
6348
|
{
|
|
@@ -6247,6 +6372,7 @@ var StepperStep = ({
|
|
|
6247
6372
|
"aria-current": state === "active" ? "step" : void 0,
|
|
6248
6373
|
css: state === "active" ? style.stepButton._currentStep : style.stepButton,
|
|
6249
6374
|
fontWeight: state === "active" ? "bold" : void 0,
|
|
6375
|
+
"data-part": "step-button",
|
|
6250
6376
|
children
|
|
6251
6377
|
}
|
|
6252
6378
|
)
|