@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.cjs
CHANGED
|
@@ -93,7 +93,7 @@ var warnAboutMismatchingIcon = ({
|
|
|
93
93
|
};
|
|
94
94
|
var Accordion = React20.forwardRef(
|
|
95
95
|
(props, ref) => {
|
|
96
|
-
const { variant = "core", children, gap = 2, ...rest } = props;
|
|
96
|
+
const { variant = "core", children, gap = 2, css, ...rest } = props;
|
|
97
97
|
const recipe = react.useSlotRecipe({ key: "accordion" });
|
|
98
98
|
const styles = recipe({ variant });
|
|
99
99
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -101,7 +101,7 @@ var Accordion = React20.forwardRef(
|
|
|
101
101
|
{
|
|
102
102
|
...rest,
|
|
103
103
|
ref,
|
|
104
|
-
css: styles.root,
|
|
104
|
+
css: { ...styles.root, ...css },
|
|
105
105
|
variant,
|
|
106
106
|
children: /* @__PURE__ */ jsxRuntime.jsx(react.Stack, { gap, children })
|
|
107
107
|
}
|
|
@@ -113,25 +113,46 @@ var AccordionItemTrigger = React20.forwardRef(function AccordionItemTrigger2(pro
|
|
|
113
113
|
startElement,
|
|
114
114
|
children,
|
|
115
115
|
headingLevel,
|
|
116
|
+
css,
|
|
116
117
|
showChevron = true,
|
|
117
118
|
...rest
|
|
118
119
|
} = props;
|
|
119
120
|
warnAboutMismatchingIcon({ icon: startElement });
|
|
120
121
|
const recipe = react.useSlotRecipe({ key: "accordion" });
|
|
121
122
|
const styles = recipe();
|
|
122
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: headingLevel, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: headingLevel, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
124
|
+
react.Accordion.ItemTrigger,
|
|
125
|
+
{
|
|
126
|
+
...rest,
|
|
127
|
+
ref,
|
|
128
|
+
css: { ...styles.itemTrigger, ...css },
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { flex: "1", gap: 1, textAlign: "start", width: "full", children: [
|
|
131
|
+
startElement && startElement,
|
|
132
|
+
children
|
|
133
|
+
] }),
|
|
134
|
+
showChevron && /* @__PURE__ */ jsxRuntime.jsx(react.Accordion.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.DropdownDownFill24Icon, {}) })
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
) });
|
|
129
138
|
});
|
|
130
139
|
var AccordionItemContent = React20.forwardRef(function AccordionItemContent2(props, ref) {
|
|
131
|
-
const {
|
|
140
|
+
const {
|
|
141
|
+
children,
|
|
142
|
+
css,
|
|
143
|
+
"aria-labelledby": ariaLabelledBy,
|
|
144
|
+
...otherProps
|
|
145
|
+
} = props;
|
|
132
146
|
const recipe = react.useSlotRecipe({ key: "accordion" });
|
|
133
147
|
const styles = recipe();
|
|
134
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
148
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
149
|
+
react.Accordion.ItemContent,
|
|
150
|
+
{
|
|
151
|
+
css: { ...styles.itemContent, ...css },
|
|
152
|
+
"aria-labelledby": ariaLabelledBy,
|
|
153
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.Accordion.ItemBody, { ...otherProps, ref, children })
|
|
154
|
+
}
|
|
155
|
+
);
|
|
135
156
|
});
|
|
136
157
|
Accordion.displayName = "Accordion";
|
|
137
158
|
var AccordionItem = react.Accordion.Item;
|
|
@@ -337,6 +358,7 @@ var ProgressBar = React20.forwardRef(
|
|
|
337
358
|
isActive = true,
|
|
338
359
|
showValueText = false,
|
|
339
360
|
height = "0.5rem",
|
|
361
|
+
css,
|
|
340
362
|
...rest
|
|
341
363
|
}, ref) => {
|
|
342
364
|
const recipe = react.useSlotRecipe({ key: "progressbar" });
|
|
@@ -345,21 +367,30 @@ var ProgressBar = React20.forwardRef(
|
|
|
345
367
|
label,
|
|
346
368
|
delay: labelRotationDelay
|
|
347
369
|
});
|
|
348
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
{
|
|
352
|
-
|
|
353
|
-
css: isActive ? styles.background : styles.disabledBackground,
|
|
354
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react.Progress.Range, { css: styles.progress })
|
|
355
|
-
}
|
|
356
|
-
),
|
|
357
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(react.Progress.Label, { css: styles.description, children: currentLoadingText }),
|
|
358
|
-
showValueText && /* @__PURE__ */ jsxRuntime.jsxs(react.Progress.ValueText, { children: [
|
|
370
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
371
|
+
react.Progress.Root,
|
|
372
|
+
{
|
|
373
|
+
css: { ...styles.container, ...css },
|
|
374
|
+
ref,
|
|
359
375
|
value,
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
376
|
+
...rest,
|
|
377
|
+
children: [
|
|
378
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
379
|
+
react.Progress.Track,
|
|
380
|
+
{
|
|
381
|
+
height,
|
|
382
|
+
css: isActive ? styles.background : styles.disabledBackground,
|
|
383
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.Progress.Range, { css: styles.progress })
|
|
384
|
+
}
|
|
385
|
+
),
|
|
386
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(react.Progress.Label, { css: styles.description, children: currentLoadingText }),
|
|
387
|
+
showValueText && /* @__PURE__ */ jsxRuntime.jsxs(react.Progress.ValueText, { children: [
|
|
388
|
+
value,
|
|
389
|
+
"%"
|
|
390
|
+
] })
|
|
391
|
+
]
|
|
392
|
+
}
|
|
393
|
+
);
|
|
363
394
|
}
|
|
364
395
|
);
|
|
365
396
|
ProgressBar.displayName = "ProgressBar";
|
|
@@ -1160,24 +1191,40 @@ var Alert = React20.forwardRef((props, ref) => {
|
|
|
1160
1191
|
if (!open)
|
|
1161
1192
|
return null;
|
|
1162
1193
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Alert.Root, { ref, ...props, children: [
|
|
1163
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1194
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1195
|
+
react.Alert.Content,
|
|
1196
|
+
{
|
|
1197
|
+
flexDirection: title ? "column" : "row",
|
|
1198
|
+
"data-part": "content",
|
|
1199
|
+
children: [
|
|
1200
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: "1", alignItems: "flex-start", children: [
|
|
1201
|
+
showIndicator && /* @__PURE__ */ jsxRuntime.jsx(react.Alert.Indicator, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(AlertIcon, { variant: props.variant ?? "info", customIcon: icon }) }),
|
|
1202
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1203
|
+
react.Alert.Title,
|
|
1204
|
+
{
|
|
1205
|
+
paddingRight: closable ? 6 : 0,
|
|
1206
|
+
"data-part": "title",
|
|
1207
|
+
children: title
|
|
1208
|
+
}
|
|
1209
|
+
)
|
|
1210
|
+
] }),
|
|
1211
|
+
children && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1212
|
+
react.Alert.Description,
|
|
1213
|
+
{
|
|
1214
|
+
width: "100%",
|
|
1215
|
+
paddingLeft: title ? 0.5 : 0,
|
|
1216
|
+
paddingRight: closable ? 6 : 0,
|
|
1217
|
+
"data-part": "description",
|
|
1218
|
+
children
|
|
1219
|
+
}
|
|
1220
|
+
)
|
|
1221
|
+
]
|
|
1222
|
+
}
|
|
1223
|
+
),
|
|
1178
1224
|
closable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1179
1225
|
CloseButton,
|
|
1180
1226
|
{
|
|
1227
|
+
"data-part": "close-button",
|
|
1181
1228
|
size: "xs",
|
|
1182
1229
|
position: "absolute",
|
|
1183
1230
|
top: "1.5",
|
|
@@ -1345,15 +1392,22 @@ var texts6 = createTexts({
|
|
|
1345
1392
|
}
|
|
1346
1393
|
});
|
|
1347
1394
|
var Breadcrumb = React20.forwardRef(
|
|
1348
|
-
({ children, ...props }, ref) => {
|
|
1395
|
+
({ children, css, ...props }, ref) => {
|
|
1349
1396
|
const validChildren = React20__namespace.default.Children.toArray(children).filter(
|
|
1350
1397
|
(element) => React20__namespace.default.isValidElement(element)
|
|
1351
1398
|
);
|
|
1352
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.Root, { ref, ...props, children: /* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.List, { children: validChildren.map((child, index) => {
|
|
1399
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.Root, { ref, ...props, css, children: /* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.List, { "data-part": "list", children: validChildren.map((child, index) => {
|
|
1353
1400
|
const isLast = index === validChildren.length - 1;
|
|
1354
1401
|
return /* @__PURE__ */ jsxRuntime.jsxs(React20__namespace.default.Fragment, { children: [
|
|
1355
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.Item, { children: child }),
|
|
1356
|
-
!isLast && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1402
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.Item, { "data-part": "item", children: child }),
|
|
1403
|
+
!isLast && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1404
|
+
react.Breadcrumb.Separator,
|
|
1405
|
+
{
|
|
1406
|
+
"aria-hidden": "true",
|
|
1407
|
+
"data-part": "separator",
|
|
1408
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.DropdownRightFill18Icon, {})
|
|
1409
|
+
}
|
|
1410
|
+
)
|
|
1357
1411
|
] }, index);
|
|
1358
1412
|
}) }) });
|
|
1359
1413
|
}
|
|
@@ -1524,9 +1578,19 @@ PressableCard.displayName = "PressableCard";
|
|
|
1524
1578
|
var RadioCard = React20.forwardRef(
|
|
1525
1579
|
(props, ref) => {
|
|
1526
1580
|
const { inputProps, children } = props;
|
|
1581
|
+
const uniqueId = React20.useId();
|
|
1582
|
+
const itemControlId = `radio-card-item-control-${uniqueId}`;
|
|
1583
|
+
const inputHasAriaLabel = (inputProps == null ? void 0 : inputProps["aria-labelledby"]) || (inputProps == null ? void 0 : inputProps["aria-label"]);
|
|
1527
1584
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioCard.Item, { ...props, children: [
|
|
1528
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1529
|
-
|
|
1585
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1586
|
+
react.RadioCard.ItemHiddenInput,
|
|
1587
|
+
{
|
|
1588
|
+
"aria-labelledby": inputHasAriaLabel ? inputProps == null ? void 0 : inputProps["aria-labelledby"] : itemControlId,
|
|
1589
|
+
ref,
|
|
1590
|
+
...inputProps
|
|
1591
|
+
}
|
|
1592
|
+
),
|
|
1593
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.RadioCard.ItemControl, { id: itemControlId, "aria-hidden": true, children })
|
|
1530
1594
|
] });
|
|
1531
1595
|
}
|
|
1532
1596
|
);
|
|
@@ -1605,6 +1669,7 @@ function CalendarCell({ date: date$1, currentMonth }) {
|
|
|
1605
1669
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1606
1670
|
react.Box,
|
|
1607
1671
|
{
|
|
1672
|
+
"data-part": "calendar-cell",
|
|
1608
1673
|
width: "100%",
|
|
1609
1674
|
height: "100%",
|
|
1610
1675
|
display: "flex",
|
|
@@ -1665,7 +1730,7 @@ function CalendarGrid({ offset = {} }) {
|
|
|
1665
1730
|
state
|
|
1666
1731
|
);
|
|
1667
1732
|
const weeksInMonth = date.getWeeksInMonth(startDate, locale);
|
|
1668
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("table", { ...gridProps, cellPadding: "0", children: [
|
|
1733
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("table", { ...gridProps, cellPadding: "0", "data-part": "calendar-grid", children: [
|
|
1669
1734
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { ...headerProps, children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: weekDays[language].map((day, index) => /* @__PURE__ */ jsxRuntime.jsx("th", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1670
1735
|
Text3,
|
|
1671
1736
|
{
|
|
@@ -1682,6 +1747,7 @@ function CalendarGrid({ offset = {} }) {
|
|
|
1682
1747
|
paddingTop: 0.5,
|
|
1683
1748
|
textAlign: "center",
|
|
1684
1749
|
fontWeight: "bold",
|
|
1750
|
+
"data-part": "calendar-table-heading",
|
|
1685
1751
|
children: day
|
|
1686
1752
|
},
|
|
1687
1753
|
index
|
|
@@ -1716,63 +1782,72 @@ function CalendarHeader({ dualView }) {
|
|
|
1716
1782
|
function handleNext() {
|
|
1717
1783
|
state.focusNextPage();
|
|
1718
1784
|
}
|
|
1719
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1785
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1786
|
+
react.Flex,
|
|
1787
|
+
{
|
|
1788
|
+
flex: 1,
|
|
1789
|
+
alignItems: "center",
|
|
1790
|
+
paddingBottom: 4,
|
|
1791
|
+
"data-part": "calendar-header",
|
|
1792
|
+
children: [
|
|
1793
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactAria.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx("h2", { children: calendarProps["aria-label"] }) }),
|
|
1794
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1795
|
+
IconButton,
|
|
1796
|
+
{
|
|
1797
|
+
size: "md",
|
|
1798
|
+
onClick: handlePrevious,
|
|
1799
|
+
variant: "ghost",
|
|
1800
|
+
marginLeft: 1,
|
|
1801
|
+
disabled: prevButtonProps.isDisabled,
|
|
1802
|
+
"aria-label": t(texts7.previousMonth),
|
|
1803
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.DropdownLeftFill24Icon, {})
|
|
1804
|
+
}
|
|
1805
|
+
),
|
|
1806
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1807
|
+
Text3,
|
|
1808
|
+
{
|
|
1809
|
+
"aria-hidden": true,
|
|
1810
|
+
flex: 1,
|
|
1811
|
+
fontWeight: "bold",
|
|
1812
|
+
fontSize: "sm",
|
|
1813
|
+
textAlign: "center",
|
|
1814
|
+
children: capitalizeFirstLetter(
|
|
1815
|
+
monthDateFormatter.format(
|
|
1816
|
+
state.visibleRange.start.toDate(state.timeZone)
|
|
1817
|
+
)
|
|
1818
|
+
)
|
|
1819
|
+
}
|
|
1820
|
+
),
|
|
1821
|
+
dualView && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1822
|
+
Text3,
|
|
1823
|
+
{
|
|
1824
|
+
"aria-hidden": true,
|
|
1825
|
+
flex: 1,
|
|
1826
|
+
fontWeight: "bold",
|
|
1827
|
+
fontSize: "sm",
|
|
1828
|
+
textAlign: "center",
|
|
1829
|
+
children: capitalizeFirstLetter(
|
|
1830
|
+
monthDateFormatter.format(
|
|
1831
|
+
state.visibleRange.start.add({ months: 1 }).toDate(state.timeZone)
|
|
1832
|
+
)
|
|
1833
|
+
)
|
|
1834
|
+
}
|
|
1835
|
+
),
|
|
1836
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1837
|
+
IconButton,
|
|
1838
|
+
{
|
|
1839
|
+
size: "md",
|
|
1840
|
+
onClick: handleNext,
|
|
1841
|
+
marginRight: 1,
|
|
1842
|
+
variant: "ghost",
|
|
1843
|
+
disabled: nextButtonProps.isDisabled,
|
|
1844
|
+
"aria-label": t(texts7.nextMonth),
|
|
1845
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.DropdownRightFill24Icon, {})
|
|
1846
|
+
}
|
|
1760
1847
|
)
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
IconButton,
|
|
1765
|
-
{
|
|
1766
|
-
size: "md",
|
|
1767
|
-
onClick: handleNext,
|
|
1768
|
-
marginRight: 1,
|
|
1769
|
-
variant: "ghost",
|
|
1770
|
-
disabled: nextButtonProps.isDisabled,
|
|
1771
|
-
"aria-label": t(texts7.nextMonth),
|
|
1772
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.DropdownRightFill24Icon, {})
|
|
1773
|
-
}
|
|
1774
|
-
)
|
|
1775
|
-
] });
|
|
1848
|
+
]
|
|
1849
|
+
}
|
|
1850
|
+
);
|
|
1776
1851
|
}
|
|
1777
1852
|
var texts7 = createTexts({
|
|
1778
1853
|
previousMonth: {
|
|
@@ -1788,22 +1863,32 @@ var texts7 = createTexts({
|
|
|
1788
1863
|
sv: "N\xE4sta m\xE5nad"
|
|
1789
1864
|
}
|
|
1790
1865
|
});
|
|
1791
|
-
function Calendar({ dualView }) {
|
|
1866
|
+
function Calendar({ dualView, css }) {
|
|
1792
1867
|
const { calendarProps, ref } = useCalendar();
|
|
1793
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1868
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1869
|
+
react.Box,
|
|
1870
|
+
{
|
|
1871
|
+
width: "fit-content",
|
|
1872
|
+
ref,
|
|
1873
|
+
...calendarProps,
|
|
1874
|
+
css,
|
|
1875
|
+
"data-part": "root",
|
|
1876
|
+
children: [
|
|
1877
|
+
/* @__PURE__ */ jsxRuntime.jsx(CalendarHeader, { dualView }),
|
|
1878
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { alignItems: "flex-start", children: [
|
|
1879
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { paddingRight: dualView ? 4 : 0, children: /* @__PURE__ */ jsxRuntime.jsx(CalendarGrid, {}) }),
|
|
1880
|
+
dualView && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1881
|
+
react.Box,
|
|
1882
|
+
{
|
|
1883
|
+
paddingLeft: 4,
|
|
1884
|
+
borderLeft: ["1px solid var(--spor-colors-outline-disabled)"],
|
|
1885
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CalendarGrid, { offset: { months: 1 } })
|
|
1886
|
+
}
|
|
1887
|
+
)
|
|
1888
|
+
] })
|
|
1889
|
+
]
|
|
1890
|
+
}
|
|
1891
|
+
);
|
|
1807
1892
|
}
|
|
1808
1893
|
function ScrollCalendar(boxProps) {
|
|
1809
1894
|
const { state, calendarProps, ref, startValue } = useCalendar();
|
|
@@ -2082,6 +2167,7 @@ function CalendarCell2({
|
|
|
2082
2167
|
ref,
|
|
2083
2168
|
css: styles.dateCell,
|
|
2084
2169
|
hidden: isOutsideVisibleRange,
|
|
2170
|
+
"data-part": "calendar-cell",
|
|
2085
2171
|
children: date$1.day
|
|
2086
2172
|
}
|
|
2087
2173
|
) });
|
|
@@ -2114,8 +2200,8 @@ function CalendarGrid2({
|
|
|
2114
2200
|
key: "datePicker"
|
|
2115
2201
|
});
|
|
2116
2202
|
const styles = recipe({ variant });
|
|
2117
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "table", ...gridProps, css: styles.box, children: [
|
|
2118
|
-
/* @__PURE__ */ jsxRuntime.jsx("thead", { ...headerProps, children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: weekDays2[language].map((day, index) => {
|
|
2203
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "table", ...gridProps, css: styles.box, "data-part": "calendar-grid", children: [
|
|
2204
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { ...headerProps, children: /* @__PURE__ */ jsxRuntime.jsx("tr", { "data-part": "calendar-table-heading", children: weekDays2[language].map((day, index) => {
|
|
2119
2205
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2120
2206
|
Text3,
|
|
2121
2207
|
{
|
|
@@ -2180,30 +2266,39 @@ function CalendarHeader2({
|
|
|
2180
2266
|
);
|
|
2181
2267
|
const areAllOtherYearsDisabled = isPreviousYearDisabled && isNextYearDisabled;
|
|
2182
2268
|
const isYearPickerVisible = showYearNavigation && !areAllOtherYearsDisabled;
|
|
2183
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2269
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2270
|
+
react.Flex,
|
|
2271
|
+
{
|
|
2272
|
+
alignItems: "center",
|
|
2273
|
+
paddingBottom: "4",
|
|
2274
|
+
justifyContent: "space-between",
|
|
2275
|
+
"data-part": "calendar-header",
|
|
2276
|
+
children: [
|
|
2277
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2278
|
+
CalendarNavigator,
|
|
2279
|
+
{
|
|
2280
|
+
title: title || (isYearPickerVisible ? monthTitle : monthAndYearTitle),
|
|
2281
|
+
unit: "month",
|
|
2282
|
+
onPrevious: () => state.setFocusedDate(state.focusedDate.subtract({ months: 1 })),
|
|
2283
|
+
onNext: () => state.setFocusedDate(state.focusedDate.add({ months: 1 })),
|
|
2284
|
+
isNextDisabled: !state.isPreviousVisibleRangeInvalid,
|
|
2285
|
+
isPreviousDisabled: !state.isNextVisibleRangeInvalid
|
|
2286
|
+
}
|
|
2287
|
+
),
|
|
2288
|
+
isYearPickerVisible && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2289
|
+
CalendarNavigator,
|
|
2290
|
+
{
|
|
2291
|
+
title: jsDate.getFullYear().toString(),
|
|
2292
|
+
unit: "year",
|
|
2293
|
+
onPrevious: () => state.setFocusedDate(state.focusedDate.subtract({ years: 1 })),
|
|
2294
|
+
onNext: () => state.setFocusedDate(state.focusedDate.add({ years: 1 })),
|
|
2295
|
+
isPreviousDisabled: isPreviousYearDisabled,
|
|
2296
|
+
isNextDisabled: isNextYearDisabled
|
|
2297
|
+
}
|
|
2298
|
+
)
|
|
2299
|
+
]
|
|
2300
|
+
}
|
|
2301
|
+
);
|
|
2207
2302
|
}
|
|
2208
2303
|
var capitalize = (string_ = "") => string_.charAt(0).toUpperCase() + string_.slice(1);
|
|
2209
2304
|
var CalendarNavigator = ({
|
|
@@ -2277,6 +2372,7 @@ var texts8 = createTexts({
|
|
|
2277
2372
|
function Calendar2({
|
|
2278
2373
|
showYearNavigation,
|
|
2279
2374
|
variant,
|
|
2375
|
+
css,
|
|
2280
2376
|
...props
|
|
2281
2377
|
}) {
|
|
2282
2378
|
const { t } = useTranslation();
|
|
@@ -2293,10 +2389,18 @@ function Calendar2({
|
|
|
2293
2389
|
const { calendarProps } = reactAria.useCalendar(props, state);
|
|
2294
2390
|
const calendarAriaLabel = calendarProps["aria-label"];
|
|
2295
2391
|
const ariaLabel = t(texts9.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
|
|
2296
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2392
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2393
|
+
react.Box,
|
|
2394
|
+
{
|
|
2395
|
+
...calendarProps,
|
|
2396
|
+
"aria-label": ariaLabel,
|
|
2397
|
+
css: { ...styles.box, ...css },
|
|
2398
|
+
children: [
|
|
2399
|
+
/* @__PURE__ */ jsxRuntime.jsx(CalendarHeader2, { state, showYearNavigation }),
|
|
2400
|
+
/* @__PURE__ */ jsxRuntime.jsx(CalendarGrid2, { variant, state })
|
|
2401
|
+
]
|
|
2402
|
+
}
|
|
2403
|
+
);
|
|
2300
2404
|
}
|
|
2301
2405
|
var texts9 = createTexts({
|
|
2302
2406
|
calendar: {
|
|
@@ -2510,6 +2614,7 @@ var DatePicker = React20.forwardRef(
|
|
|
2510
2614
|
invalid = false,
|
|
2511
2615
|
helperText,
|
|
2512
2616
|
positioning,
|
|
2617
|
+
css,
|
|
2513
2618
|
...props
|
|
2514
2619
|
}, externalRef) => {
|
|
2515
2620
|
const chakraFieldProps = react.useFieldContext();
|
|
@@ -2547,7 +2652,8 @@ var DatePicker = React20.forwardRef(
|
|
|
2547
2652
|
{
|
|
2548
2653
|
...calendarProps,
|
|
2549
2654
|
variant,
|
|
2550
|
-
showYearNavigation
|
|
2655
|
+
showYearNavigation,
|
|
2656
|
+
css
|
|
2551
2657
|
}
|
|
2552
2658
|
) }) }) });
|
|
2553
2659
|
return /* @__PURE__ */ jsxRuntime.jsx(reactAria.I18nProvider, { locale, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2557,6 +2663,7 @@ var DatePicker = React20.forwardRef(
|
|
|
2557
2663
|
display: "inline-flex",
|
|
2558
2664
|
flexDirection: "column",
|
|
2559
2665
|
width,
|
|
2666
|
+
css,
|
|
2560
2667
|
children: /* @__PURE__ */ jsxRuntime.jsxs(react.Popover.Root, { ...dialogProps, positioning, children: [
|
|
2561
2668
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2562
2669
|
Field3,
|
|
@@ -3351,7 +3458,7 @@ var Autocomplete = ({
|
|
|
3351
3458
|
);
|
|
3352
3459
|
const combobox = react.useCombobox({
|
|
3353
3460
|
collection,
|
|
3354
|
-
openOnClick,
|
|
3461
|
+
openOnClick: filteredChildren.length > 0 ? openOnClick : false,
|
|
3355
3462
|
onInputValueChange: (event) => {
|
|
3356
3463
|
if (!filteredExternally) {
|
|
3357
3464
|
filter(event.inputValue);
|
|
@@ -3384,7 +3491,7 @@ var Autocomplete = ({
|
|
|
3384
3491
|
required,
|
|
3385
3492
|
onFocus: (event) => {
|
|
3386
3493
|
onFocus == null ? void 0 : onFocus(event);
|
|
3387
|
-
if (openOnFocus)
|
|
3494
|
+
if (openOnFocus && filteredChildren.length > 0)
|
|
3388
3495
|
combobox.setOpen(true);
|
|
3389
3496
|
}
|
|
3390
3497
|
}
|
|
@@ -3392,8 +3499,8 @@ var Autocomplete = ({
|
|
|
3392
3499
|
/* @__PURE__ */ jsxRuntime.jsx(react.Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.ClearTrigger, { asChild: true, "aria-label": t(texts14.clearValue), children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "xs", tabIndex: 0 }) }) })
|
|
3393
3500
|
] }),
|
|
3394
3501
|
/* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Combobox.Content, { children: [
|
|
3395
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Empty, { children:
|
|
3396
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx(ColorSpinner, { width: "1.5rem", p: "2" }) :
|
|
3502
|
+
!loading && /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Empty, { children: emptyLabel ?? t(texts14.noItemsFound) }),
|
|
3503
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(ColorSpinner, { width: "1.5rem", p: "2" }) : filteredChildren
|
|
3397
3504
|
] }) })
|
|
3398
3505
|
] });
|
|
3399
3506
|
};
|
|
@@ -4616,6 +4723,7 @@ var Switch = React20.forwardRef(
|
|
|
4616
4723
|
invalid,
|
|
4617
4724
|
errorText,
|
|
4618
4725
|
helperText,
|
|
4726
|
+
css,
|
|
4619
4727
|
...rest
|
|
4620
4728
|
} = props;
|
|
4621
4729
|
const recipe = react.useSlotRecipe({ key: "switch" });
|
|
@@ -4629,6 +4737,7 @@ var Switch = React20.forwardRef(
|
|
|
4629
4737
|
helperText,
|
|
4630
4738
|
required: props.required,
|
|
4631
4739
|
id: rest.id,
|
|
4740
|
+
css,
|
|
4632
4741
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4633
4742
|
react.Switch.Root,
|
|
4634
4743
|
{
|
|
@@ -5966,7 +6075,7 @@ var ProgressDot = ({ isActive }) => {
|
|
|
5966
6075
|
}
|
|
5967
6076
|
);
|
|
5968
6077
|
};
|
|
5969
|
-
var ProgressIndicator = React20.forwardRef(({ numberOfSteps, activeStep }, ref) => {
|
|
6078
|
+
var ProgressIndicator = React20.forwardRef(({ numberOfSteps, activeStep, css }, ref) => {
|
|
5970
6079
|
const { t } = useTranslation();
|
|
5971
6080
|
const recipe = react.useSlotRecipe({
|
|
5972
6081
|
key: "progressIndicator"
|
|
@@ -5975,18 +6084,24 @@ var ProgressIndicator = React20.forwardRef(({ numberOfSteps, activeStep }, ref)
|
|
|
5975
6084
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5976
6085
|
react.Box,
|
|
5977
6086
|
{
|
|
5978
|
-
css: styles.root,
|
|
6087
|
+
css: { ...styles.root, ...css },
|
|
5979
6088
|
role: "progressbar",
|
|
5980
6089
|
"aria-valuemin": 1,
|
|
5981
6090
|
"aria-valuemax": numberOfSteps,
|
|
5982
6091
|
"aria-valuenow": activeStep,
|
|
5983
6092
|
"aria-valuetext": t(texts26.stepsOf(activeStep, numberOfSteps)),
|
|
5984
6093
|
ref,
|
|
5985
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: styles.container, children: Array.from({ length: numberOfSteps }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5986
|
-
|
|
6094
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: { ...styles.container, ...css }, children: Array.from({ length: numberOfSteps }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6095
|
+
react.Box,
|
|
5987
6096
|
{
|
|
5988
|
-
"
|
|
5989
|
-
|
|
6097
|
+
"data-part": activeStep === index + 1 ? "current-step" : "step",
|
|
6098
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6099
|
+
ProgressDot,
|
|
6100
|
+
{
|
|
6101
|
+
"aria-valuenow": index + 1,
|
|
6102
|
+
isActive: activeStep === index + 1
|
|
6103
|
+
}
|
|
6104
|
+
)
|
|
5990
6105
|
},
|
|
5991
6106
|
index
|
|
5992
6107
|
)) })
|
|
@@ -6145,7 +6260,8 @@ var Stepper = React20.forwardRef(
|
|
|
6145
6260
|
heading,
|
|
6146
6261
|
headingLevel,
|
|
6147
6262
|
variant,
|
|
6148
|
-
disabled
|
|
6263
|
+
disabled,
|
|
6264
|
+
css
|
|
6149
6265
|
} = props;
|
|
6150
6266
|
const recipe = react.useSlotRecipe({ key: "stepper" });
|
|
6151
6267
|
const style = recipe({ variant });
|
|
@@ -6153,14 +6269,14 @@ var Stepper = React20.forwardRef(
|
|
|
6153
6269
|
const activeStep = Number(activeStepAsStringOrNumber);
|
|
6154
6270
|
const { t } = useTranslation();
|
|
6155
6271
|
const hideBackButtonOnFirstStep = activeStep === 1 && !onBackButtonClick;
|
|
6156
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: style.root, ref, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6272
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: { ...style.root, ...css }, ref, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6157
6273
|
StepperProvider,
|
|
6158
6274
|
{
|
|
6159
6275
|
onClick,
|
|
6160
6276
|
activeStep,
|
|
6161
6277
|
variant,
|
|
6162
6278
|
numberOfSteps,
|
|
6163
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { css: style.container, children: [
|
|
6279
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { css: style.container, "data-part": "root", children: [
|
|
6164
6280
|
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: style.innerContainer, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6165
6281
|
react.Flex,
|
|
6166
6282
|
{
|
|
@@ -6186,8 +6302,17 @@ var Stepper = React20.forwardRef(
|
|
|
6186
6302
|
}
|
|
6187
6303
|
}
|
|
6188
6304
|
),
|
|
6189
|
-
heading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6190
|
-
|
|
6305
|
+
heading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6306
|
+
Text3,
|
|
6307
|
+
{
|
|
6308
|
+
variant: "sm",
|
|
6309
|
+
as: headingLevel,
|
|
6310
|
+
css: style.title,
|
|
6311
|
+
"data-part": "title",
|
|
6312
|
+
children: heading
|
|
6313
|
+
}
|
|
6314
|
+
),
|
|
6315
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: style.stepCounter, "data-part": "step-counter", children: t(texts27.stepsOf(activeStep, numberOfSteps)) })
|
|
6191
6316
|
]
|
|
6192
6317
|
}
|
|
6193
6318
|
) }),
|
|
@@ -6237,7 +6362,7 @@ var StepperStep = ({
|
|
|
6237
6362
|
_dark: "whiteAlpha.200"
|
|
6238
6363
|
};
|
|
6239
6364
|
const disabled = state !== "active" && disabledOverride || state === "disabled";
|
|
6240
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { css: style.stepContainer, children: [
|
|
6365
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { css: style.stepContainer, "data-part": "step-container", children: [
|
|
6241
6366
|
stepNumber > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6242
6367
|
spor_icon_react_star.DropdownRightFill18Icon,
|
|
6243
6368
|
{
|
|
@@ -6267,6 +6392,7 @@ var StepperStep = ({
|
|
|
6267
6392
|
"aria-current": state === "active" ? "step" : void 0,
|
|
6268
6393
|
css: state === "active" ? style.stepButton._currentStep : style.stepButton,
|
|
6269
6394
|
fontWeight: state === "active" ? "bold" : void 0,
|
|
6395
|
+
"data-part": "step-button",
|
|
6270
6396
|
children
|
|
6271
6397
|
}
|
|
6272
6398
|
)
|