@vygruppen/spor-react 12.24.11 → 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/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,28 +113,42 @@ 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(react.Accordion.ItemTrigger, { ...rest, ref, css: styles.itemTrigger, children: [
123
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { flex: "1", gap: 1, textAlign: "start", width: "full", children: [
124
- startElement && startElement,
125
- children
126
- ] }),
127
- showChevron && /* @__PURE__ */ jsxRuntime.jsx(react.Accordion.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.DropdownDownFill24Icon, {}) })
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 { children, "aria-labelledby": ariaLabelledBy, ...otherProps } = props;
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
148
  return /* @__PURE__ */ jsxRuntime.jsx(
135
149
  react.Accordion.ItemContent,
136
150
  {
137
- css: styles.itemContent,
151
+ css: { ...styles.itemContent, ...css },
138
152
  "aria-labelledby": ariaLabelledBy,
139
153
  children: /* @__PURE__ */ jsxRuntime.jsx(react.Accordion.ItemBody, { ...otherProps, ref, children })
140
154
  }
@@ -344,6 +358,7 @@ var ProgressBar = React20.forwardRef(
344
358
  isActive = true,
345
359
  showValueText = false,
346
360
  height = "0.5rem",
361
+ css,
347
362
  ...rest
348
363
  }, ref) => {
349
364
  const recipe = react.useSlotRecipe({ key: "progressbar" });
@@ -352,21 +367,30 @@ var ProgressBar = React20.forwardRef(
352
367
  label,
353
368
  delay: labelRotationDelay
354
369
  });
355
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Progress.Root, { css: styles.container, ref, value, ...rest, children: [
356
- /* @__PURE__ */ jsxRuntime.jsx(
357
- react.Progress.Track,
358
- {
359
- height,
360
- css: isActive ? styles.background : styles.disabledBackground,
361
- children: /* @__PURE__ */ jsxRuntime.jsx(react.Progress.Range, { css: styles.progress })
362
- }
363
- ),
364
- label && /* @__PURE__ */ jsxRuntime.jsx(react.Progress.Label, { css: styles.description, children: currentLoadingText }),
365
- 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,
366
375
  value,
367
- "%"
368
- ] })
369
- ] });
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
+ );
370
394
  }
371
395
  );
372
396
  ProgressBar.displayName = "ProgressBar";
@@ -1167,24 +1191,40 @@ var Alert = React20.forwardRef((props, ref) => {
1167
1191
  if (!open)
1168
1192
  return null;
1169
1193
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Alert.Root, { ref, ...props, children: [
1170
- /* @__PURE__ */ jsxRuntime.jsxs(react.Alert.Content, { flexDirection: title ? "column" : "row", children: [
1171
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: "1", alignItems: "flex-start", children: [
1172
- showIndicator && /* @__PURE__ */ jsxRuntime.jsx(react.Alert.Indicator, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(AlertIcon, { variant: props.variant ?? "info", customIcon: icon }) }),
1173
- title && /* @__PURE__ */ jsxRuntime.jsx(react.Alert.Title, { paddingRight: closable ? 6 : 0, children: title })
1174
- ] }),
1175
- children && /* @__PURE__ */ jsxRuntime.jsx(
1176
- react.Alert.Description,
1177
- {
1178
- width: "100%",
1179
- paddingLeft: title ? 0.5 : 0,
1180
- paddingRight: closable ? 6 : 0,
1181
- children
1182
- }
1183
- )
1184
- ] }),
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
+ ),
1185
1224
  closable && /* @__PURE__ */ jsxRuntime.jsx(
1186
1225
  CloseButton,
1187
1226
  {
1227
+ "data-part": "close-button",
1188
1228
  size: "xs",
1189
1229
  position: "absolute",
1190
1230
  top: "1.5",
@@ -1352,15 +1392,22 @@ var texts6 = createTexts({
1352
1392
  }
1353
1393
  });
1354
1394
  var Breadcrumb = React20.forwardRef(
1355
- ({ children, ...props }, ref) => {
1395
+ ({ children, css, ...props }, ref) => {
1356
1396
  const validChildren = React20__namespace.default.Children.toArray(children).filter(
1357
1397
  (element) => React20__namespace.default.isValidElement(element)
1358
1398
  );
1359
- 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) => {
1360
1400
  const isLast = index === validChildren.length - 1;
1361
1401
  return /* @__PURE__ */ jsxRuntime.jsxs(React20__namespace.default.Fragment, { children: [
1362
- /* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.Item, { children: child }),
1363
- !isLast && /* @__PURE__ */ jsxRuntime.jsx(react.Breadcrumb.Separator, { "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.DropdownRightFill18Icon, {}) })
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
+ )
1364
1411
  ] }, index);
1365
1412
  }) }) });
1366
1413
  }
@@ -1622,6 +1669,7 @@ function CalendarCell({ date: date$1, currentMonth }) {
1622
1669
  children: /* @__PURE__ */ jsxRuntime.jsx(
1623
1670
  react.Box,
1624
1671
  {
1672
+ "data-part": "calendar-cell",
1625
1673
  width: "100%",
1626
1674
  height: "100%",
1627
1675
  display: "flex",
@@ -1682,7 +1730,7 @@ function CalendarGrid({ offset = {} }) {
1682
1730
  state
1683
1731
  );
1684
1732
  const weeksInMonth = date.getWeeksInMonth(startDate, locale);
1685
- return /* @__PURE__ */ jsxRuntime.jsxs("table", { ...gridProps, cellPadding: "0", children: [
1733
+ return /* @__PURE__ */ jsxRuntime.jsxs("table", { ...gridProps, cellPadding: "0", "data-part": "calendar-grid", children: [
1686
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(
1687
1735
  Text3,
1688
1736
  {
@@ -1699,6 +1747,7 @@ function CalendarGrid({ offset = {} }) {
1699
1747
  paddingTop: 0.5,
1700
1748
  textAlign: "center",
1701
1749
  fontWeight: "bold",
1750
+ "data-part": "calendar-table-heading",
1702
1751
  children: day
1703
1752
  },
1704
1753
  index
@@ -1733,63 +1782,72 @@ function CalendarHeader({ dualView }) {
1733
1782
  function handleNext() {
1734
1783
  state.focusNextPage();
1735
1784
  }
1736
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { flex: 1, alignItems: "center", paddingBottom: 4, children: [
1737
- /* @__PURE__ */ jsxRuntime.jsx(reactAria.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx("h2", { children: calendarProps["aria-label"] }) }),
1738
- /* @__PURE__ */ jsxRuntime.jsx(
1739
- IconButton,
1740
- {
1741
- size: "md",
1742
- onClick: handlePrevious,
1743
- variant: "ghost",
1744
- marginLeft: 1,
1745
- disabled: prevButtonProps.isDisabled,
1746
- "aria-label": t(texts7.previousMonth),
1747
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.DropdownLeftFill24Icon, {})
1748
- }
1749
- ),
1750
- /* @__PURE__ */ jsxRuntime.jsx(
1751
- Text3,
1752
- {
1753
- "aria-hidden": true,
1754
- flex: 1,
1755
- fontWeight: "bold",
1756
- fontSize: "sm",
1757
- textAlign: "center",
1758
- children: capitalizeFirstLetter(
1759
- monthDateFormatter.format(
1760
- state.visibleRange.start.toDate(state.timeZone)
1761
- )
1762
- )
1763
- }
1764
- ),
1765
- dualView && /* @__PURE__ */ jsxRuntime.jsx(
1766
- Text3,
1767
- {
1768
- "aria-hidden": true,
1769
- flex: 1,
1770
- fontWeight: "bold",
1771
- fontSize: "sm",
1772
- textAlign: "center",
1773
- children: capitalizeFirstLetter(
1774
- monthDateFormatter.format(
1775
- state.visibleRange.start.add({ months: 1 }).toDate(state.timeZone)
1776
- )
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
+ }
1777
1847
  )
1778
- }
1779
- ),
1780
- /* @__PURE__ */ jsxRuntime.jsx(
1781
- IconButton,
1782
- {
1783
- size: "md",
1784
- onClick: handleNext,
1785
- marginRight: 1,
1786
- variant: "ghost",
1787
- disabled: nextButtonProps.isDisabled,
1788
- "aria-label": t(texts7.nextMonth),
1789
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.DropdownRightFill24Icon, {})
1790
- }
1791
- )
1792
- ] });
1848
+ ]
1849
+ }
1850
+ );
1793
1851
  }
1794
1852
  var texts7 = createTexts({
1795
1853
  previousMonth: {
@@ -1805,22 +1863,32 @@ var texts7 = createTexts({
1805
1863
  sv: "N\xE4sta m\xE5nad"
1806
1864
  }
1807
1865
  });
1808
- function Calendar({ dualView }) {
1866
+ function Calendar({ dualView, css }) {
1809
1867
  const { calendarProps, ref } = useCalendar();
1810
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { width: "fit-content", ref, ...calendarProps, children: [
1811
- /* @__PURE__ */ jsxRuntime.jsx(CalendarHeader, { dualView }),
1812
- /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { alignItems: "flex-start", children: [
1813
- /* @__PURE__ */ jsxRuntime.jsx(react.Box, { paddingRight: dualView ? 4 : 0, children: /* @__PURE__ */ jsxRuntime.jsx(CalendarGrid, {}) }),
1814
- dualView && /* @__PURE__ */ jsxRuntime.jsx(
1815
- react.Box,
1816
- {
1817
- paddingLeft: 4,
1818
- borderLeft: ["1px solid var(--spor-colors-outline-disabled)"],
1819
- children: /* @__PURE__ */ jsxRuntime.jsx(CalendarGrid, { offset: { months: 1 } })
1820
- }
1821
- )
1822
- ] })
1823
- ] });
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
+ );
1824
1892
  }
1825
1893
  function ScrollCalendar(boxProps) {
1826
1894
  const { state, calendarProps, ref, startValue } = useCalendar();
@@ -2099,6 +2167,7 @@ function CalendarCell2({
2099
2167
  ref,
2100
2168
  css: styles.dateCell,
2101
2169
  hidden: isOutsideVisibleRange,
2170
+ "data-part": "calendar-cell",
2102
2171
  children: date$1.day
2103
2172
  }
2104
2173
  ) });
@@ -2131,8 +2200,8 @@ function CalendarGrid2({
2131
2200
  key: "datePicker"
2132
2201
  });
2133
2202
  const styles = recipe({ variant });
2134
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "table", ...gridProps, css: styles.box, children: [
2135
- /* @__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) => {
2136
2205
  return /* @__PURE__ */ jsxRuntime.jsx(
2137
2206
  Text3,
2138
2207
  {
@@ -2197,30 +2266,39 @@ function CalendarHeader2({
2197
2266
  );
2198
2267
  const areAllOtherYearsDisabled = isPreviousYearDisabled && isNextYearDisabled;
2199
2268
  const isYearPickerVisible = showYearNavigation && !areAllOtherYearsDisabled;
2200
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { alignItems: "center", paddingBottom: "4", justifyContent: "space-between", children: [
2201
- /* @__PURE__ */ jsxRuntime.jsx(
2202
- CalendarNavigator,
2203
- {
2204
- title: title || (isYearPickerVisible ? monthTitle : monthAndYearTitle),
2205
- unit: "month",
2206
- onPrevious: () => state.setFocusedDate(state.focusedDate.subtract({ months: 1 })),
2207
- onNext: () => state.setFocusedDate(state.focusedDate.add({ months: 1 })),
2208
- isNextDisabled: !state.isPreviousVisibleRangeInvalid,
2209
- isPreviousDisabled: !state.isNextVisibleRangeInvalid
2210
- }
2211
- ),
2212
- isYearPickerVisible && /* @__PURE__ */ jsxRuntime.jsx(
2213
- CalendarNavigator,
2214
- {
2215
- title: jsDate.getFullYear().toString(),
2216
- unit: "year",
2217
- onPrevious: () => state.setFocusedDate(state.focusedDate.subtract({ years: 1 })),
2218
- onNext: () => state.setFocusedDate(state.focusedDate.add({ years: 1 })),
2219
- isPreviousDisabled: isPreviousYearDisabled,
2220
- isNextDisabled: isNextYearDisabled
2221
- }
2222
- )
2223
- ] });
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
+ );
2224
2302
  }
2225
2303
  var capitalize = (string_ = "") => string_.charAt(0).toUpperCase() + string_.slice(1);
2226
2304
  var CalendarNavigator = ({
@@ -2294,6 +2372,7 @@ var texts8 = createTexts({
2294
2372
  function Calendar2({
2295
2373
  showYearNavigation,
2296
2374
  variant,
2375
+ css,
2297
2376
  ...props
2298
2377
  }) {
2299
2378
  const { t } = useTranslation();
@@ -2310,10 +2389,18 @@ function Calendar2({
2310
2389
  const { calendarProps } = reactAria.useCalendar(props, state);
2311
2390
  const calendarAriaLabel = calendarProps["aria-label"];
2312
2391
  const ariaLabel = t(texts9.calendar) + (calendarAriaLabel ? ` ${calendarAriaLabel}` : "");
2313
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { ...calendarProps, "aria-label": ariaLabel, css: styles.box, children: [
2314
- /* @__PURE__ */ jsxRuntime.jsx(CalendarHeader2, { state, showYearNavigation }),
2315
- /* @__PURE__ */ jsxRuntime.jsx(CalendarGrid2, { variant, state })
2316
- ] });
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
+ );
2317
2404
  }
2318
2405
  var texts9 = createTexts({
2319
2406
  calendar: {
@@ -2527,6 +2614,7 @@ var DatePicker = React20.forwardRef(
2527
2614
  invalid = false,
2528
2615
  helperText,
2529
2616
  positioning,
2617
+ css,
2530
2618
  ...props
2531
2619
  }, externalRef) => {
2532
2620
  const chakraFieldProps = react.useFieldContext();
@@ -2564,7 +2652,8 @@ var DatePicker = React20.forwardRef(
2564
2652
  {
2565
2653
  ...calendarProps,
2566
2654
  variant,
2567
- showYearNavigation
2655
+ showYearNavigation,
2656
+ css
2568
2657
  }
2569
2658
  ) }) }) });
2570
2659
  return /* @__PURE__ */ jsxRuntime.jsx(reactAria.I18nProvider, { locale, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -2574,6 +2663,7 @@ var DatePicker = React20.forwardRef(
2574
2663
  display: "inline-flex",
2575
2664
  flexDirection: "column",
2576
2665
  width,
2666
+ css,
2577
2667
  children: /* @__PURE__ */ jsxRuntime.jsxs(react.Popover.Root, { ...dialogProps, positioning, children: [
2578
2668
  /* @__PURE__ */ jsxRuntime.jsx(
2579
2669
  Field3,
@@ -4633,6 +4723,7 @@ var Switch = React20.forwardRef(
4633
4723
  invalid,
4634
4724
  errorText,
4635
4725
  helperText,
4726
+ css,
4636
4727
  ...rest
4637
4728
  } = props;
4638
4729
  const recipe = react.useSlotRecipe({ key: "switch" });
@@ -4646,6 +4737,7 @@ var Switch = React20.forwardRef(
4646
4737
  helperText,
4647
4738
  required: props.required,
4648
4739
  id: rest.id,
4740
+ css,
4649
4741
  children: /* @__PURE__ */ jsxRuntime.jsxs(
4650
4742
  react.Switch.Root,
4651
4743
  {
@@ -5983,7 +6075,7 @@ var ProgressDot = ({ isActive }) => {
5983
6075
  }
5984
6076
  );
5985
6077
  };
5986
- var ProgressIndicator = React20.forwardRef(({ numberOfSteps, activeStep }, ref) => {
6078
+ var ProgressIndicator = React20.forwardRef(({ numberOfSteps, activeStep, css }, ref) => {
5987
6079
  const { t } = useTranslation();
5988
6080
  const recipe = react.useSlotRecipe({
5989
6081
  key: "progressIndicator"
@@ -5992,18 +6084,24 @@ var ProgressIndicator = React20.forwardRef(({ numberOfSteps, activeStep }, ref)
5992
6084
  return /* @__PURE__ */ jsxRuntime.jsx(
5993
6085
  react.Box,
5994
6086
  {
5995
- css: styles.root,
6087
+ css: { ...styles.root, ...css },
5996
6088
  role: "progressbar",
5997
6089
  "aria-valuemin": 1,
5998
6090
  "aria-valuemax": numberOfSteps,
5999
6091
  "aria-valuenow": activeStep,
6000
6092
  "aria-valuetext": t(texts26.stepsOf(activeStep, numberOfSteps)),
6001
6093
  ref,
6002
- children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: styles.container, children: Array.from({ length: numberOfSteps }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
6003
- ProgressDot,
6094
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: { ...styles.container, ...css }, children: Array.from({ length: numberOfSteps }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
6095
+ react.Box,
6004
6096
  {
6005
- "aria-valuenow": index + 1,
6006
- isActive: activeStep === index + 1
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
+ )
6007
6105
  },
6008
6106
  index
6009
6107
  )) })
@@ -6162,7 +6260,8 @@ var Stepper = React20.forwardRef(
6162
6260
  heading,
6163
6261
  headingLevel,
6164
6262
  variant,
6165
- disabled
6263
+ disabled,
6264
+ css
6166
6265
  } = props;
6167
6266
  const recipe = react.useSlotRecipe({ key: "stepper" });
6168
6267
  const style = recipe({ variant });
@@ -6170,14 +6269,14 @@ var Stepper = React20.forwardRef(
6170
6269
  const activeStep = Number(activeStepAsStringOrNumber);
6171
6270
  const { t } = useTranslation();
6172
6271
  const hideBackButtonOnFirstStep = activeStep === 1 && !onBackButtonClick;
6173
- 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(
6174
6273
  StepperProvider,
6175
6274
  {
6176
6275
  onClick,
6177
6276
  activeStep,
6178
6277
  variant,
6179
6278
  numberOfSteps,
6180
- children: /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { css: style.container, children: [
6279
+ children: /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { css: style.container, "data-part": "root", children: [
6181
6280
  /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: style.innerContainer, children: /* @__PURE__ */ jsxRuntime.jsxs(
6182
6281
  react.Flex,
6183
6282
  {
@@ -6203,8 +6302,17 @@ var Stepper = React20.forwardRef(
6203
6302
  }
6204
6303
  }
6205
6304
  ),
6206
- heading && /* @__PURE__ */ jsxRuntime.jsx(Text3, { variant: "sm", as: headingLevel, css: style.title, children: heading }),
6207
- /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: style.stepCounter, children: t(texts27.stepsOf(activeStep, numberOfSteps)) })
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)) })
6208
6316
  ]
6209
6317
  }
6210
6318
  ) }),
@@ -6254,7 +6362,7 @@ var StepperStep = ({
6254
6362
  _dark: "whiteAlpha.200"
6255
6363
  };
6256
6364
  const disabled = state !== "active" && disabledOverride || state === "disabled";
6257
- 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: [
6258
6366
  stepNumber > 1 && /* @__PURE__ */ jsxRuntime.jsx(
6259
6367
  spor_icon_react_star.DropdownRightFill18Icon,
6260
6368
  {
@@ -6284,6 +6392,7 @@ var StepperStep = ({
6284
6392
  "aria-current": state === "active" ? "step" : void 0,
6285
6393
  css: state === "active" ? style.stepButton._currentStep : style.stepButton,
6286
6394
  fontWeight: state === "active" ? "bold" : void 0,
6395
+ "data-part": "step-button",
6287
6396
  children
6288
6397
  }
6289
6398
  )