@vygruppen/spor-react 12.5.5 → 12.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -11,13 +11,13 @@ var reactAria = require('react-aria');
11
11
  var nextThemes = require('next-themes');
12
12
  var lu = require('react-icons/lu');
13
13
  var reactStately = require('react-stately');
14
- var anatomy = require('@ark-ui/react/anatomy');
15
- var popover = require('@ark-ui/react/popover');
16
14
  var date = require('@internationalized/date');
17
15
  var awesomePhonenumber = require('awesome-phonenumber');
18
16
  var tokens23 = require('@vygruppen/spor-design-tokens');
19
17
  var react$1 = require('@emotion/react');
20
18
  var tokens4 = require('@vygruppen/spor-design-tokens/raw-tokens');
19
+ var anatomy = require('@ark-ui/react/anatomy');
20
+ var popover = require('@ark-ui/react/popover');
21
21
 
22
22
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
23
23
 
@@ -122,7 +122,7 @@ var AccordionItem = react.Accordion.Item;
122
122
  var Expandable = React28.forwardRef(
123
123
  (props, ref) => {
124
124
  const { title, children, headingLevel, startElement, ...rest } = props;
125
- return /* @__PURE__ */ jsxRuntime.jsx(Accordion, { ...props, ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
125
+ return /* @__PURE__ */ jsxRuntime.jsx(Accordion, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
126
126
  ExpandableItem,
127
127
  {
128
128
  title,
@@ -508,61 +508,8 @@ var texts = createTexts({
508
508
  en: `${value}% done`
509
509
  })
510
510
  });
511
- var skeletonRecipe = react.defineRecipe({
512
- className: "chakra-skeleton",
513
- variants: {
514
- loading: {
515
- true: {
516
- borderRadius: "xs",
517
- boxShadow: "none",
518
- backgroundClip: "padding-box",
519
- cursor: "default",
520
- color: "transparent",
521
- pointerEvents: "none",
522
- userSelect: "none",
523
- flexShrink: "0",
524
- "&::before, &::after, *": {
525
- visibility: "hidden"
526
- }
527
- },
528
- false: {
529
- background: "unset",
530
- animation: "fade-in var(--fade-duration, 0.1s) ease-out !important"
531
- }
532
- },
533
- variant: {
534
- pulse: {
535
- background: {
536
- _light: "silver",
537
- _dark: "darkGrey"
538
- },
539
- animation: "pulse",
540
- animationDuration: "var(--duration, 1.2s)"
541
- },
542
- shine: {
543
- "--animate-from": "200%",
544
- "--animate-to": "-200%",
545
- "--start-color": {
546
- _light: "colors.lightGrey",
547
- _dark: "colors.dimGrey"
548
- },
549
- "--end-color": {
550
- _light: "colors.platinum",
551
- _dark: "colors.darkGrey"
552
- },
553
- backgroundImage: "linear-gradient(270deg,var(--start-color),var(--end-color),var(--end-color),var(--start-color))",
554
- backgroundSize: "400% 100%",
555
- animation: "bg-position var(--duration, 5s) ease-in-out infinite"
556
- },
557
- none: {
558
- animation: "none",
559
- background: "steel"
560
- }
561
- }
562
- }
563
- });
564
511
  var SkeletonCircle = React28__namespace.forwardRef(function SkeletonCircle2(props, ref) {
565
- const recipe = react.useRecipe({ recipe: skeletonRecipe });
512
+ const recipe = react.useRecipe({ key: "skeleton" });
566
513
  const [recipeProps, restProps] = recipe.splitVariantProps({
567
514
  loading: true,
568
515
  variant: "pulse",
@@ -573,7 +520,7 @@ var SkeletonCircle = React28__namespace.forwardRef(function SkeletonCircle2(prop
573
520
  });
574
521
  var SkeletonText = React28.forwardRef(
575
522
  function SkeletonText2(props, ref) {
576
- const recipe = react.useRecipe({ recipe: skeletonRecipe });
523
+ const recipe = react.useRecipe({ key: "skeleton" });
577
524
  const [recipeProps, restProps] = recipe.splitVariantProps({
578
525
  loading: true,
579
526
  variant: "pulse",
@@ -594,7 +541,7 @@ var SkeletonText = React28.forwardRef(
594
541
  );
595
542
  var Skeleton = React28.forwardRef(
596
543
  function SkeletonText3(props, ref) {
597
- const recipe = react.useRecipe({ recipe: skeletonRecipe });
544
+ const recipe = react.useRecipe({ key: "skeleton" });
598
545
  const [recipeProps, restProps] = recipe.splitVariantProps({
599
546
  loading: true,
600
547
  variant: "pulse",
@@ -855,10 +802,26 @@ var Heading = React28.forwardRef(
855
802
  return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as, textStyle: variant, id, ref, ...rest });
856
803
  }
857
804
  );
805
+ function resolveTextProps({
806
+ variant,
807
+ fontSize,
808
+ lineHeight
809
+ }) {
810
+ if (variant)
811
+ return { textStyle: variant };
812
+ if (!fontSize && !lineHeight)
813
+ return { textStyle: "sm" };
814
+ if (lineHeight && !fontSize)
815
+ return { lineHeight, fontSize: "sm" };
816
+ if (fontSize && !lineHeight)
817
+ return { fontSize };
818
+ return { fontSize, lineHeight };
819
+ }
858
820
  var Text3 = React28.forwardRef(
859
821
  function Text4(props, ref) {
860
- const { variant = "sm", ...rest } = props;
861
- return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { ...rest, textStyle: variant, ref });
822
+ const { variant, lineHeight, fontSize, ...rest } = props;
823
+ const resolvedProps = resolveTextProps({ variant, fontSize, lineHeight });
824
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { ...resolvedProps, ...rest, ref });
862
825
  }
863
826
  );
864
827
  var ClipboardIcon = React28__namespace.forwardRef((props, ref) => {
@@ -1149,7 +1112,7 @@ var Alert = React28.forwardRef((props, ref) => {
1149
1112
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Alert.Root, { ref, ...props, children: [
1150
1113
  /* @__PURE__ */ jsxRuntime.jsxs(react.Alert.Content, { flexDirection: title ? "column" : "row", children: [
1151
1114
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: "1", alignItems: "flex-start", children: [
1152
- showIndicator && /* @__PURE__ */ jsxRuntime.jsx(react.Alert.Indicator, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(AlertIcon, { variant: props.variant, customIcon: icon }) }),
1115
+ showIndicator && /* @__PURE__ */ jsxRuntime.jsx(react.Alert.Indicator, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(AlertIcon, { variant: props.variant ?? "info", customIcon: icon }) }),
1153
1116
  title && /* @__PURE__ */ jsxRuntime.jsx(react.Alert.Title, { paddingRight: closable ? 6 : 0, children: title })
1154
1117
  ] }),
1155
1118
  children && /* @__PURE__ */ jsxRuntime.jsx(
@@ -1484,463 +1447,6 @@ var FieldErrorText = React28__namespace.forwardRef((props, ref) => {
1484
1447
  });
1485
1448
  FieldErrorText.displayName = "FieldErrorText";
1486
1449
  var FieldLabel = react.Field.Label;
1487
- var accordionAnatomy = anatomy.createAnatomy("accordion").parts(
1488
- "root",
1489
- "itemTrigger",
1490
- "item",
1491
- "itemBody",
1492
- "itemContent",
1493
- "itemIndicator"
1494
- );
1495
- var alertAnatomy = anatomy.createAnatomy("alert").parts(
1496
- "root",
1497
- "indicator",
1498
- "title",
1499
- "closeButton",
1500
- "content",
1501
- "description"
1502
- );
1503
- var alertExpandableAnatomy = anatomy.createAnatomy("alert-expandable").parts(
1504
- "root",
1505
- "itemTrigger",
1506
- "itemContent",
1507
- "indicator",
1508
- "title",
1509
- "itemIndicator"
1510
- );
1511
- var alertServiceAnatomy = anatomy.createAnatomy("service-alert").parts(
1512
- "root",
1513
- "itemTrigger",
1514
- "itemTriggerTitle",
1515
- "notificationText",
1516
- "itemContent",
1517
- "itemBody"
1518
- );
1519
- var listAnatomy = anatomy.createAnatomy("list").parts(
1520
- "root",
1521
- "item",
1522
- "icon",
1523
- "indicator"
1524
- );
1525
- var tableAnatomy = anatomy.createAnatomy("table").parts(
1526
- "root",
1527
- "body",
1528
- "row",
1529
- "cell",
1530
- "columnHeader",
1531
- "caption",
1532
- "footer",
1533
- "header"
1534
- );
1535
- var fieldAnatomy = anatomy.createAnatomy("field").parts(
1536
- "root",
1537
- "label",
1538
- "requiredIndicator",
1539
- "helperText",
1540
- "errorText"
1541
- );
1542
- var dialogAnatomy = anatomy.createAnatomy("dialog").parts(
1543
- "header",
1544
- "body",
1545
- "footer",
1546
- "backdrop",
1547
- "positioner",
1548
- "content",
1549
- "title",
1550
- "description",
1551
- "closeTrigger"
1552
- );
1553
- var paginationAnatomy = anatomy.createAnatomy("pagination").parts(
1554
- "list",
1555
- "item"
1556
- );
1557
- var linjetagAnatomy = anatomy.createAnatomy("linjetag").parts(
1558
- "iconContainer",
1559
- "icon",
1560
- "root",
1561
- "title",
1562
- "desc"
1563
- );
1564
- var infoTagAnatomy = anatomy.createAnatomy("info-tag").parts(
1565
- "container",
1566
- "iconContainer",
1567
- "icon",
1568
- "textContainer",
1569
- "title",
1570
- "description",
1571
- "walk"
1572
- );
1573
- var travelTagAnatomy = anatomy.createAnatomy("travel-tag").parts(
1574
- "container",
1575
- "iconContainer",
1576
- "icon",
1577
- "textContainer",
1578
- "title",
1579
- "description",
1580
- "deviationIcon"
1581
- );
1582
- var drawerAnatomy = anatomy.createAnatomy("drawer").parts(
1583
- "header",
1584
- "body",
1585
- "backdrop",
1586
- "positioner",
1587
- "content",
1588
- "footer",
1589
- "title",
1590
- "description",
1591
- "closeTrigger"
1592
- );
1593
- var checkboxAnatomy = anatomy.createAnatomy("checkbox").parts(
1594
- "root",
1595
- "control",
1596
- "label",
1597
- "description",
1598
- "addon",
1599
- "indicator",
1600
- "content"
1601
- );
1602
- var breadcrumbAnatomy = anatomy.createAnatomy("breadcrumb").parts(
1603
- "link",
1604
- "currentLink",
1605
- "list",
1606
- "separator"
1607
- );
1608
- var stepperAnatomy = anatomy.createAnatomy("stepper").parts(
1609
- "root",
1610
- "container",
1611
- "innerContainer",
1612
- "title",
1613
- "stepCounter",
1614
- "stepContainer",
1615
- "stepButton",
1616
- "stepNumber",
1617
- "stepTitle",
1618
- "closeButton",
1619
- "backButton"
1620
- );
1621
- var radioCardAnatomy = anatomy.createAnatomy("radio-card").parts(
1622
- "root",
1623
- "item",
1624
- "label",
1625
- "itemText",
1626
- "itemDescription",
1627
- "itemContent"
1628
- );
1629
- var radioAnatomy = anatomy.createAnatomy("radio").parts(
1630
- "root",
1631
- "item",
1632
- "itemControl",
1633
- "itemText",
1634
- "label"
1635
- );
1636
- var listBoxAnatomy = anatomy.createAnatomy("listbox").parts(
1637
- "root",
1638
- "item",
1639
- "label",
1640
- "description"
1641
- );
1642
- var NativeSelectAnatomy = anatomy.createAnatomy("native-select").parts(
1643
- "root",
1644
- "field",
1645
- "icon"
1646
- );
1647
- var tabsAnatomy = anatomy.createAnatomy("tabs").parts(
1648
- "root",
1649
- "list",
1650
- "trigger",
1651
- "content",
1652
- "indicator"
1653
- );
1654
- var switchAnatomy = anatomy.createAnatomy("switch").parts(
1655
- "root",
1656
- "thumb",
1657
- "control",
1658
- "label"
1659
- );
1660
- var selectAnatomy = anatomy.createAnatomy("select").parts(
1661
- "root",
1662
- "trigger",
1663
- "indicatorGroup",
1664
- "indicator",
1665
- "selectContent",
1666
- "item",
1667
- "control",
1668
- "itemText",
1669
- "itemDescription",
1670
- "itemGroup",
1671
- "itemGroupLabel",
1672
- "label",
1673
- "valueText"
1674
- );
1675
- anatomy.createAnatomy("card-select").parts(
1676
- "trigger",
1677
- "card"
1678
- );
1679
- var numericStepperAnatomy = anatomy.createAnatomy("numeric-stepper").parts(
1680
- "root",
1681
- "container",
1682
- "input",
1683
- "text",
1684
- "button"
1685
- );
1686
- var mediaControllerAnatomy = anatomy.createAnatomy(
1687
- "media-controller-button"
1688
- ).parts("root", "icon");
1689
- var progressBarAnotomy = anatomy.createAnatomy("progress-bar").parts(
1690
- "container",
1691
- "background",
1692
- "progress",
1693
- "description",
1694
- "disabledBackground"
1695
- );
1696
- var toastAnatomy = anatomy.createAnatomy("toast").parts(
1697
- "root",
1698
- "title",
1699
- "description",
1700
- "indicator",
1701
- "closeTrigger",
1702
- "actionTrigger"
1703
- );
1704
- var floatingActionButtonAnatomy = anatomy.createAnatomy(
1705
- "floating-action-button"
1706
- ).parts("root", "icon", "text");
1707
- var popoverAnatomy = popover.popoverAnatomy.extendWith(
1708
- "header",
1709
- "body",
1710
- "footer"
1711
- );
1712
- var datepickerAnatomy = anatomy.createAnatomy("datepicker").parts(
1713
- "wrapper",
1714
- "calendarTriggerButton",
1715
- "arrow",
1716
- "calendarPopover",
1717
- "calendar",
1718
- "weekdays",
1719
- "weekend",
1720
- "dateCell",
1721
- "inputLabel",
1722
- "dateTimeSegment",
1723
- "cell",
1724
- "box",
1725
- "rangeCalendarPopover"
1726
- );
1727
- var checkboxCardAnatomy = anatomy.createAnatomy("checkbox-card", [
1728
- "root",
1729
- "control",
1730
- "label",
1731
- "description",
1732
- "addon",
1733
- "indicator",
1734
- "content"
1735
- ]);
1736
-
1737
- // src/theme/slot-recipes/datepicker.ts
1738
- var datePickerSlotRecipe = react.defineSlotRecipe({
1739
- slots: datepickerAnatomy.keys(),
1740
- className: "spor-datepicker",
1741
- base: {
1742
- wrapper: {
1743
- transitionProperty: "box-shadow",
1744
- transitionDuration: "fast",
1745
- borderRadius: "sm",
1746
- display: "flex",
1747
- flex: 1,
1748
- paddingY: 0.5,
1749
- alignItems: "center",
1750
- _hover: {
1751
- zIndex: "docked"
1752
- },
1753
- _disabled: {
1754
- pointerEvents: "none",
1755
- backgroundColor: "surface.disabled",
1756
- outline: "1px solid",
1757
- outlineColor: "outline.disabled",
1758
- color: "text.disabled"
1759
- },
1760
- _focusWithin: {
1761
- outline: "2px solid",
1762
- outlineColor: "outline.focus"
1763
- }
1764
- },
1765
- inputLabel: {
1766
- fontSize: "mobile.xs",
1767
- margin: 0,
1768
- cursor: "text"
1769
- },
1770
- dateTimeSegment: {
1771
- _focus: {
1772
- backgroundColor: "ghost.surface.active",
1773
- color: "text.default"
1774
- }
1775
- },
1776
- box: {
1777
- width: "100%"
1778
- },
1779
- calendarTriggerButton: {
1780
- position: "relative",
1781
- borderRadius: "xl",
1782
- display: "flex",
1783
- alignItems: "center",
1784
- justifyContent: "center",
1785
- transitionProperty: "box-shadow, background-color",
1786
- right: "0.5rem",
1787
- _hover: {
1788
- backgroundColor: "ghost.surface.hover"
1789
- },
1790
- _active: {
1791
- backgroundColor: "ghost.surface.active"
1792
- },
1793
- _invalid: {
1794
- outline: "2px solid",
1795
- outlineColor: "outline.error"
1796
- }
1797
- },
1798
- arrow: {
1799
- backgroundColor: "surface"
1800
- },
1801
- calendarPopover: {
1802
- color: "core.text",
1803
- outline: "1px solid",
1804
- outlineColor: "floating.outline",
1805
- boxShadow: "md",
1806
- backgroundColor: "floating.surface"
1807
- },
1808
- rangeCalendarPopover: {
1809
- width: "43rem",
1810
- maxWidth: "100vw"
1811
- },
1812
- weekdays: {
1813
- color: "core.text",
1814
- fontWeight: "bold"
1815
- },
1816
- weekend: {
1817
- color: "accent.text",
1818
- fontWeight: "bold"
1819
- },
1820
- cell: {
1821
- '&[aria-selected="true"] + [aria-selected="true"] > button': {
1822
- "&::before": {
1823
- content: '""',
1824
- display: "block",
1825
- height: "100%",
1826
- position: "absolute",
1827
- left: "-50%",
1828
- top: 0,
1829
- bottom: 0,
1830
- zIndex: -1,
1831
- backgroundColor: "brand.surface"
1832
- }
1833
- }
1834
- },
1835
- dateCell: {
1836
- color: "core.text",
1837
- borderRadius: "xl",
1838
- position: "relative",
1839
- transition: ".1s ease-in-out",
1840
- userSelect: "none",
1841
- width: [6, 7],
1842
- height: [6, 7],
1843
- transitionProperty: "common",
1844
- _hover: {
1845
- backgroundColor: "ghost.surface.hover"
1846
- },
1847
- _active: {
1848
- backgroundColor: "ghost.surface.active"
1849
- },
1850
- _disabled: {
1851
- backgroundColor: "surface.disabled",
1852
- color: "text.disabled",
1853
- pointerEvents: "none"
1854
- },
1855
- _selected: {
1856
- backgroundColor: "brand.surface",
1857
- color: "brand.text",
1858
- _active: {
1859
- backgroundColor: "brand.surface.active",
1860
- color: "brand.text"
1861
- }
1862
- },
1863
- "&[data-today]": {
1864
- outline: "1px solid",
1865
- outlineColor: "core.outline"
1866
- },
1867
- "&[data-unavailable]": {
1868
- pointerEvents: "none",
1869
- borderRadius: "xl",
1870
- backgroundColor: "surface.disabled",
1871
- color: "text.disabled"
1872
- }
1873
- }
1874
- },
1875
- variants: {
1876
- variant: {
1877
- core: {
1878
- wrapper: {
1879
- outline: "1px solid",
1880
- outlineColor: "core.outline",
1881
- backgroundColor: "core.surface",
1882
- _hover: {
1883
- outline: "2px solid",
1884
- outlineColor: "core.outline.hover",
1885
- _active: {
1886
- backgroundColor: "ghost.surface.active",
1887
- outline: "1px solid",
1888
- outlineColor: "core.outline"
1889
- }
1890
- },
1891
- _invalid: {
1892
- outline: "2px solid",
1893
- outlineColor: "outline.error"
1894
- }
1895
- }
1896
- },
1897
- floating: {
1898
- wrapper: {
1899
- backgroundColor: {
1900
- _light: "bg",
1901
- _dark: `color-mix(in srgb, white 10%, var(--spor-colors-bg))`
1902
- },
1903
- outline: "1px solid",
1904
- outlineColor: "floating.outline",
1905
- boxShadow: "sm",
1906
- _hover: {
1907
- outline: "1px solid",
1908
- outlineColor: "floating.outline.hover",
1909
- _active: {
1910
- backgroundColor: "ghost.surface.active",
1911
- outline: "1px solid",
1912
- outlineColor: "core.outline"
1913
- }
1914
- },
1915
- _invalid: {
1916
- outline: "2px solid",
1917
- outlineColor: "outline.error"
1918
- }
1919
- }
1920
- },
1921
- ghost: {
1922
- wrapper: {
1923
- _hover: {
1924
- outline: "2px solid",
1925
- outlineColor: "core.outline.hover",
1926
- _active: {
1927
- backgroundColor: "ghost.surface.active",
1928
- outline: "1px solid",
1929
- outlineColor: "core.outline"
1930
- }
1931
- },
1932
- _invalid: {
1933
- outline: "2px solid",
1934
- outlineColor: "outline.error"
1935
- }
1936
- }
1937
- }
1938
- }
1939
- },
1940
- defaultVariants: {
1941
- variant: "core"
1942
- }
1943
- });
1944
1450
  function CalendarCell({
1945
1451
  state,
1946
1452
  date: date$1,
@@ -1958,8 +1464,7 @@ function CalendarCell({
1958
1464
  } = reactAria.useCalendarCell({ date: date$1 }, state, ref);
1959
1465
  const isOutsideMonth = !date.isSameMonth(currentMonth, date$1);
1960
1466
  const recipe = react.useSlotRecipe({
1961
- key: "datePicker",
1962
- recipe: datePickerSlotRecipe
1467
+ key: "datePicker"
1963
1468
  });
1964
1469
  const styles = recipe({ variant });
1965
1470
  const stateProps = {};
@@ -2050,8 +1555,7 @@ function CalendarGrid({
2050
1555
  const weeksInMonth = date.getWeeksInMonth(state.visibleRange.start, locale);
2051
1556
  const weeksInMonthRange = Array.from({ length: weeksInMonth }).fill(0).map((_, i) => i);
2052
1557
  const recipe = react.useSlotRecipe({
2053
- key: "datePicker",
2054
- recipe: datePickerSlotRecipe
1558
+ key: "datePicker"
2055
1559
  });
2056
1560
  const styles = recipe({ variant });
2057
1561
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "table", ...gridProps, css: styles.box, children: [
@@ -2227,8 +1731,7 @@ function Calendar({
2227
1731
  createCalendar: date.createCalendar
2228
1732
  });
2229
1733
  const recipe = react.useSlotRecipe({
2230
- key: "datePicker",
2231
- recipe: datePickerSlotRecipe
1734
+ key: "datePicker"
2232
1735
  });
2233
1736
  const styles = recipe({ variant });
2234
1737
  const { calendarProps } = reactAria.useCalendar(props, state);
@@ -2250,8 +1753,7 @@ var texts8 = createTexts({
2250
1753
  var CalendarTriggerButton = React28.forwardRef(({ variant, disabled, ariaLabelledby, ...buttonProps }, ref) => {
2251
1754
  const { t } = useTranslation();
2252
1755
  const recipe = react.useSlotRecipe({
2253
- key: "datePicker",
2254
- recipe: datePickerSlotRecipe
1756
+ key: "datePicker"
2255
1757
  });
2256
1758
  const styles = recipe({ variant });
2257
1759
  return /* @__PURE__ */ jsxRuntime.jsx(react.PopoverAnchor, { ...buttonProps, ref, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -2285,8 +1787,7 @@ var DateTimeSegment = React28.forwardRef(
2285
1787
  ref
2286
1788
  );
2287
1789
  const recipe = react.useSlotRecipe({
2288
- key: "datePicker",
2289
- recipe: datePickerSlotRecipe
1790
+ key: "datePicker"
2290
1791
  });
2291
1792
  const styles = recipe({
2292
1793
  isPlaceholder: segment.isPlaceholder,
@@ -2330,8 +1831,7 @@ var DateField = React28.forwardRef(
2330
1831
  var _a5;
2331
1832
  const locale = useCurrentLocale();
2332
1833
  const recipe = react.useSlotRecipe({
2333
- key: "datePicker",
2334
- recipe: datePickerSlotRecipe
1834
+ key: "datePicker"
2335
1835
  });
2336
1836
  const styles = recipe({});
2337
1837
  const state = reactStately.useDateFieldState({
@@ -2423,8 +1923,7 @@ var StyledField = React28.forwardRef(
2423
1923
  const { invalid } = react.useFieldContext() ?? {
2424
1924
  };
2425
1925
  const recipe = react.useSlotRecipe({
2426
- key: "datePicker",
2427
- recipe: datePickerSlotRecipe
1926
+ key: "datePicker"
2428
1927
  });
2429
1928
  const styles = recipe({ variant });
2430
1929
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -2472,8 +1971,7 @@ var DatePicker = React28.forwardRef(
2472
1971
  const labelId = `label-${React28.useId()}`;
2473
1972
  const inputGroupId = `input-group-${React28.useId()}`;
2474
1973
  const recipe = react.useSlotRecipe({
2475
- key: "datePicker",
2476
- recipe: datePickerSlotRecipe
1974
+ key: "datePicker"
2477
1975
  });
2478
1976
  const styles = recipe({ variant });
2479
1977
  const locale = useCurrentLocale();
@@ -2557,8 +2055,7 @@ function RangeCalendar(props) {
2557
2055
  createCalendar: date.createCalendar
2558
2056
  });
2559
2057
  const recipe = react.useSlotRecipe({
2560
- key: "datePicker",
2561
- recipe: datePickerSlotRecipe
2058
+ key: "datePicker"
2562
2059
  });
2563
2060
  const styles = recipe({});
2564
2061
  const ref = React28.useRef(null);
@@ -2611,8 +2108,7 @@ function DateRangePicker({
2611
2108
  calendarProps
2612
2109
  } = reactAria.useDateRangePicker(props, state, ref);
2613
2110
  const recipe = react.useSlotRecipe({
2614
- key: "datePicker",
2615
- recipe: datePickerSlotRecipe
2111
+ key: "datePicker"
2616
2112
  });
2617
2113
  const styles = recipe({ variant });
2618
2114
  const locale = useCurrentLocale();
@@ -3533,96 +3029,46 @@ function Option({ item, state }) {
3533
3029
  (event) => {
3534
3030
  event.preventDefault();
3535
3031
  },
3536
- { passive: false, once: true }
3537
- );
3538
- }, []);
3539
- return /* @__PURE__ */ jsxRuntime.jsx(OptionContext.Provider, { value: { labelProps, descriptionProps }, children: /* @__PURE__ */ jsxRuntime.jsx(react.ListItem, { ...optionProps, ...dataFields, ref, css: styles.item, children: item.rendered }) });
3540
- }
3541
- var OptionContext = React28__namespace.default.createContext({
3542
- labelProps: {},
3543
- descriptionProps: {}
3544
- });
3545
- var useOptionContext = () => {
3546
- return React28.useContext(OptionContext);
3547
- };
3548
- function ListBoxSection({ section, state }) {
3549
- var _a5, _b4;
3550
- const { itemProps, headingProps, groupProps } = reactAria.useListBoxSection({
3551
- heading: section.rendered,
3552
- "aria-label": section["aria-label"]
3553
- });
3554
- const isFirstSection = section.key === state.collection.getFirstKey();
3555
- const titleColor = useColorModeValue("darkGrey", "white");
3556
- return /* @__PURE__ */ jsxRuntime.jsx(List, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.ListItem, { ...itemProps, listStyleType: "none", children: [
3557
- section.rendered && /* @__PURE__ */ jsxRuntime.jsx(
3558
- react.Box,
3559
- {
3560
- fontSize: "mobile.xs",
3561
- color: titleColor,
3562
- paddingX: 3,
3563
- paddingTop: 1,
3564
- marginTop: isFirstSection ? 0 : 2,
3565
- textTransform: "uppercase",
3566
- fontWeight: "bold",
3567
- ...headingProps,
3568
- children: section.rendered
3569
- }
3570
- ),
3571
- /* @__PURE__ */ jsxRuntime.jsx(List, { ...groupProps, padding: 0, listStyleType: "none", children: [...((_b4 = (_a5 = state.collection).getChildren) == null ? void 0 : _b4.call(_a5, section.key)) ?? []].map(
3572
- (item) => /* @__PURE__ */ jsxRuntime.jsx(Option, { item, state }, item.key)
3573
- ) })
3574
- ] }) });
3575
- }
3576
- var _a2, _b;
3577
- var nativeSelectSlotRecipe = react.defineSlotRecipe({
3578
- slots: NativeSelectAnatomy.keys(),
3579
- className: "spor-nativeSelect",
3580
- base: {
3581
- root: {
3582
- width: "100%",
3583
- height: "fit-content",
3584
- position: "relative"
3585
- },
3586
- field: {
3587
- ...inputRecipe.base
3588
- },
3589
- icon: {
3590
- width: 5,
3591
- height: 5,
3592
- right: " 0.5rem",
3593
- strokeLinecap: "round",
3594
- position: "absolute",
3595
- display: "inline-flex",
3596
- boxAlign: "center",
3597
- alignItems: "center",
3598
- boxPack: "center",
3599
- justifyContent: "center",
3600
- pointerEvents: "none",
3601
- top: "50%",
3602
- transform: "translateY(-50%)",
3603
- insetEnd: "0.5rem",
3604
- color: "currentColor",
3605
- fontSize: "sm",
3606
- _disabled: {
3607
- color: "text.disabled"
3608
- }
3609
- }
3610
- },
3611
- variants: {
3612
- variant: {
3613
- core: {
3614
- field: {
3615
- ...(_a2 = inputRecipe.variants) == null ? void 0 : _a2.variant.core
3616
- }
3617
- },
3618
- floating: {
3619
- field: {
3620
- ...(_b = inputRecipe.variants) == null ? void 0 : _b.variant.floating
3621
- }
3622
- }
3623
- }
3624
- }
3032
+ { passive: false, once: true }
3033
+ );
3034
+ }, []);
3035
+ return /* @__PURE__ */ jsxRuntime.jsx(OptionContext.Provider, { value: { labelProps, descriptionProps }, children: /* @__PURE__ */ jsxRuntime.jsx(react.ListItem, { ...optionProps, ...dataFields, ref, css: styles.item, children: item.rendered }) });
3036
+ }
3037
+ var OptionContext = React28__namespace.default.createContext({
3038
+ labelProps: {},
3039
+ descriptionProps: {}
3625
3040
  });
3041
+ var useOptionContext = () => {
3042
+ return React28.useContext(OptionContext);
3043
+ };
3044
+ function ListBoxSection({ section, state }) {
3045
+ var _a5, _b4;
3046
+ const { itemProps, headingProps, groupProps } = reactAria.useListBoxSection({
3047
+ heading: section.rendered,
3048
+ "aria-label": section["aria-label"]
3049
+ });
3050
+ const isFirstSection = section.key === state.collection.getFirstKey();
3051
+ const titleColor = useColorModeValue("darkGrey", "white");
3052
+ return /* @__PURE__ */ jsxRuntime.jsx(List, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.ListItem, { ...itemProps, listStyleType: "none", children: [
3053
+ section.rendered && /* @__PURE__ */ jsxRuntime.jsx(
3054
+ react.Box,
3055
+ {
3056
+ fontSize: "mobile.xs",
3057
+ color: titleColor,
3058
+ paddingX: 3,
3059
+ paddingTop: 1,
3060
+ marginTop: isFirstSection ? 0 : 2,
3061
+ textTransform: "uppercase",
3062
+ fontWeight: "bold",
3063
+ ...headingProps,
3064
+ children: section.rendered
3065
+ }
3066
+ ),
3067
+ /* @__PURE__ */ jsxRuntime.jsx(List, { ...groupProps, padding: 0, listStyleType: "none", children: [...((_b4 = (_a5 = state.collection).getChildren) == null ? void 0 : _b4.call(_a5, section.key)) ?? []].map(
3068
+ (item) => /* @__PURE__ */ jsxRuntime.jsx(Option, { item, state }, item.key)
3069
+ ) })
3070
+ ] }) });
3071
+ }
3626
3072
  var NativeSelect = React28__namespace.forwardRef(function NativeSelect2(props, ref) {
3627
3073
  const {
3628
3074
  children,
@@ -3635,7 +3081,7 @@ var NativeSelect = React28__namespace.forwardRef(function NativeSelect2(props, r
3635
3081
  errorText,
3636
3082
  ...rest
3637
3083
  } = props;
3638
- const recipe = react.useSlotRecipe({ recipe: nativeSelectSlotRecipe });
3084
+ const recipe = react.useSlotRecipe({ key: "nativeSelect" });
3639
3085
  const styles = recipe({ variant });
3640
3086
  return /* @__PURE__ */ jsxRuntime.jsx(
3641
3087
  Field3,
@@ -3670,67 +3116,6 @@ var NativeSelect = React28__namespace.forwardRef(function NativeSelect2(props, r
3670
3116
  }
3671
3117
  );
3672
3118
  });
3673
- var numericStepperRecipe = react.defineSlotRecipe({
3674
- slots: numericStepperAnatomy.keys(),
3675
- className: "spor-numeric-stepper",
3676
- base: {
3677
- root: {
3678
- "& > div": {
3679
- display: "flex",
3680
- flexDirection: "row",
3681
- alignItems: "center"
3682
- }
3683
- },
3684
- input: {
3685
- fontSize: "sm",
3686
- fontWeight: "bold",
3687
- marginX: 0.5,
3688
- padding: 0,
3689
- paddingX: 0.5,
3690
- borderRadius: "xs",
3691
- outline: "none",
3692
- height: "auto",
3693
- textAlign: "center",
3694
- transitionProperty: "common",
3695
- transitionDuration: "fast",
3696
- color: "core.text",
3697
- backgroundColor: "transparent",
3698
- _focus: {
3699
- backgroundColor: "surface",
3700
- outline: "2px solid",
3701
- outlineColor: "outline.focus"
3702
- },
3703
- _active: {
3704
- backgroundColor: "accent.surface.active"
3705
- },
3706
- _disabled: {
3707
- pointerEvents: "none",
3708
- opacity: 0.5
3709
- },
3710
- _hover: {
3711
- outline: "1px solid",
3712
- outlineColor: "core.outline"
3713
- }
3714
- },
3715
- text: {
3716
- fontSize: "sm",
3717
- fontWeight: "bold",
3718
- marginX: 1,
3719
- paddingX: 1,
3720
- textAlign: "center",
3721
- width: "4ch",
3722
- color: "core.text"
3723
- },
3724
- button: {
3725
- outlineOffset: "-2px",
3726
- width: "auto",
3727
- _icon: {
3728
- width: "1.2rem",
3729
- height: "1.2rem"
3730
- }
3731
- }
3732
- }
3733
- });
3734
3119
  var NumericStepper = React28__namespace.default.forwardRef((props, ref) => {
3735
3120
  const {
3736
3121
  name: nameProp,
@@ -3749,7 +3134,7 @@ var NumericStepper = React28__namespace.default.forwardRef((props, ref) => {
3749
3134
  } = props;
3750
3135
  const addButtonRef = React28.useRef(null);
3751
3136
  const { t } = useTranslation();
3752
- const recipe = react.useSlotRecipe({ recipe: numericStepperRecipe });
3137
+ const recipe = react.useSlotRecipe({ key: "numericStepper" });
3753
3138
  const styles = recipe();
3754
3139
  const [value, onChange] = react.useControllableState({
3755
3140
  value: valueProp,
@@ -3839,7 +3224,7 @@ var NumericStepper = React28__namespace.default.forwardRef((props, ref) => {
3839
3224
  });
3840
3225
  NumericStepper.displayName = "NumericStepper";
3841
3226
  var VerySmallButton = React28__namespace.default.forwardRef((props, ref) => {
3842
- const recipe = react.useSlotRecipe({ recipe: numericStepperRecipe });
3227
+ const recipe = react.useSlotRecipe({ key: "numericStepper" });
3843
3228
  const styles = recipe({ colorPalette: "default" });
3844
3229
  return /* @__PURE__ */ jsxRuntime.jsx(
3845
3230
  IconButton,
@@ -4469,160 +3854,80 @@ var pressableCardRecipe = react.defineRecipe({
4469
3854
  backgroundColor: "core.surface.active",
4470
3855
  outlineWidth: tokens23__namespace.default.size.stroke.sm
4471
3856
  }
4472
- }
4473
- },
4474
- accent: {
4475
- boxShadow: "0px 1px 3px 0px var(--shadow-color)",
4476
- shadowColor: "surface.disabled",
4477
- background: "alert.success.surface",
4478
- _hover: {
4479
- background: "alert.success.surface.hover",
4480
- boxShadow: "0px 2px 6px 0px var(--shadow-color)",
4481
- _active: {
4482
- background: "alert.success.surface.active",
4483
- boxShadow: "none"
4484
- }
4485
- }
4486
- }
4487
- }
4488
- },
4489
- defaultVariants: {
4490
- variant: "core"
4491
- }
4492
- });
4493
- var PressableCardButton = react.chakra("button", pressableCardRecipe);
4494
- var PressableCard = React28.forwardRef(
4495
- (props, ref) => {
4496
- return /* @__PURE__ */ jsxRuntime.jsx(PressableCardButton, { ...props, ref });
4497
- }
4498
- );
4499
- PressableCard.displayName = "PressableCard";
4500
- var RadioCard = React28.forwardRef(
4501
- (props, ref) => {
4502
- const { inputProps, children, value, ariaLabel } = props;
4503
- return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioCard.Item, { ...props, children: [
4504
- /* @__PURE__ */ jsxRuntime.jsx(
4505
- react.RadioCard.ItemHiddenInput,
4506
- {
4507
- "aria-label": ariaLabel ?? value,
4508
- ref,
4509
- ...inputProps
4510
- }
4511
- ),
4512
- /* @__PURE__ */ jsxRuntime.jsx(react.RadioCard.ItemControl, { children })
4513
- ] });
4514
- }
4515
- );
4516
- RadioCard.displayName = "RadioCard";
4517
- var RadioCardGroup = React28.forwardRef(
4518
- (props, ref) => {
4519
- const {
4520
- children,
4521
- variant,
4522
- gap = 2,
4523
- direction = "column",
4524
- display = "flex",
4525
- ...rest
4526
- } = props;
4527
- const recipe = react.useSlotRecipe({ key: "radio-card" });
4528
- const styles = recipe({ variant });
4529
- return /* @__PURE__ */ jsxRuntime.jsx(
4530
- react.RadioCard.Root,
4531
- {
4532
- ref,
4533
- variant,
4534
- css: styles,
4535
- display,
4536
- gap,
4537
- flexDirection: direction,
4538
- ...rest,
4539
- children
4540
- }
4541
- );
4542
- }
4543
- );
4544
- RadioCardGroup.displayName = "RadioCardGroup";
4545
- var RadioCardLabel = react.RadioCard.Label;
4546
- var separatorRecipe = react.defineRecipe({
4547
- className: "spor-separator",
4548
- base: {
4549
- borderColor: "outline.disabled",
4550
- display: "block",
4551
- borderRadius: "xl"
4552
- },
4553
- variants: {
4554
- variant: {
4555
- solid: {
4556
- borderStyle: "solid"
4557
- },
4558
- dashed: {
4559
- width: "100%",
4560
- borderWidth: "0px"
4561
- }
4562
- },
4563
- size: {
4564
- sm: {
4565
- borderBottomWidth: "1px",
4566
- height: "1px"
4567
- },
4568
- md: {
4569
- borderBottomWidth: "2px",
4570
- height: "2px"
4571
- },
4572
- lg: {
4573
- borderBottomWidth: "3px",
4574
- height: "3px"
4575
- }
4576
- },
4577
- orientation: {
4578
- horizontal: {
4579
- width: "100%"
4580
- },
4581
- vertical: {
4582
- height: "100%",
4583
- borderLeftWidth: "1px"
4584
- }
4585
- }
4586
- },
4587
- compoundVariants: [
4588
- {
4589
- variant: "dashed",
4590
- size: "sm",
4591
- css: {
4592
- background: "linear-gradient(to left, var(--spor-colors-outline-disabled), var(--spor-colors-outline-disabled) 1px, transparent 1px, transparent 4px)",
4593
- backgroundSize: "4px 1px",
4594
- backgroundRepeat: "repeat-x"
4595
- }
4596
- },
4597
- {
4598
- variant: "dashed",
4599
- size: "md",
4600
- css: {
4601
- background: "linear-gradient(to left, var(--spor-colors-outline-disabled), var(--spor-colors-outline-disabled) 3px, transparent 3px, transparent 6px)",
4602
- backgroundSize: "9px 2px",
4603
- backgroundRepeat: "repeat-x"
4604
- }
4605
- },
4606
- {
4607
- variant: "dashed",
4608
- size: "lg",
4609
- css: {
4610
- background: "linear-gradient(to left, var(--spor-colors-outline-disabled), var(--spor-colors-outline-disabled) 3px, transparent 3px, transparent 9px)",
4611
- backgroundSize: "9px 3px",
4612
- backgroundRepeat: "repeat-x"
4613
- }
4614
- },
4615
- {
4616
- variant: "dashed",
4617
- orientation: "vertical",
4618
- css: {
4619
- background: "0",
4620
- width: "0%",
4621
- height: "100%"
3857
+ }
3858
+ },
3859
+ accent: {
3860
+ boxShadow: "0px 1px 3px 0px var(--shadow-color)",
3861
+ shadowColor: "surface.disabled",
3862
+ background: "alert.success.surface",
3863
+ _hover: {
3864
+ background: "alert.success.surface.hover",
3865
+ boxShadow: "0px 2px 6px 0px var(--shadow-color)",
3866
+ _active: {
3867
+ background: "alert.success.surface.active",
3868
+ boxShadow: "none"
3869
+ }
3870
+ }
4622
3871
  }
4623
3872
  }
4624
- ]
3873
+ },
3874
+ defaultVariants: {
3875
+ variant: "core"
3876
+ }
4625
3877
  });
3878
+ var PressableCardButton = react.chakra("button", pressableCardRecipe);
3879
+ var PressableCard = React28.forwardRef(
3880
+ (props, ref) => {
3881
+ return /* @__PURE__ */ jsxRuntime.jsx(PressableCardButton, { ...props, ref });
3882
+ }
3883
+ );
3884
+ PressableCard.displayName = "PressableCard";
3885
+ var RadioCard = React28.forwardRef(
3886
+ (props, ref) => {
3887
+ const { inputProps, children, value, ariaLabel } = props;
3888
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioCard.Item, { ...props, children: [
3889
+ /* @__PURE__ */ jsxRuntime.jsx(
3890
+ react.RadioCard.ItemHiddenInput,
3891
+ {
3892
+ "aria-label": ariaLabel ?? value,
3893
+ ref,
3894
+ ...inputProps
3895
+ }
3896
+ ),
3897
+ /* @__PURE__ */ jsxRuntime.jsx(react.RadioCard.ItemControl, { children })
3898
+ ] });
3899
+ }
3900
+ );
3901
+ RadioCard.displayName = "RadioCard";
3902
+ var RadioCardGroup = React28.forwardRef(
3903
+ (props, ref) => {
3904
+ const {
3905
+ children,
3906
+ variant,
3907
+ gap = 2,
3908
+ direction = "column",
3909
+ display = "flex",
3910
+ ...rest
3911
+ } = props;
3912
+ const recipe = react.useSlotRecipe({ key: "radio-card" });
3913
+ const styles = recipe({ variant });
3914
+ return /* @__PURE__ */ jsxRuntime.jsx(
3915
+ react.RadioCard.Root,
3916
+ {
3917
+ ref,
3918
+ variant,
3919
+ css: styles,
3920
+ display,
3921
+ gap,
3922
+ flexDirection: direction,
3923
+ ...rest,
3924
+ children
3925
+ }
3926
+ );
3927
+ }
3928
+ );
3929
+ RadioCardGroup.displayName = "RadioCardGroup";
3930
+ var RadioCardLabel = react.RadioCard.Label;
4626
3931
  var Separator = React28.forwardRef(
4627
3932
  (props, ref) => {
4628
3933
  const {
@@ -4630,7 +3935,7 @@ var Separator = React28.forwardRef(
4630
3935
  variant = "solid",
4631
3936
  orientation = "horizontal"
4632
3937
  } = props;
4633
- const recipe = react.useRecipe({ recipe: separatorRecipe });
3938
+ const recipe = react.useRecipe({ key: "seperator" });
4634
3939
  const styles = recipe({ size, variant, orientation });
4635
3940
  return /* @__PURE__ */ jsxRuntime.jsx(react.Separator, { css: styles, ...props, ref });
4636
3941
  }
@@ -6167,256 +5472,61 @@ var StepperStep = ({
6167
5472
  const disabled = state !== "active" && disabledOverride || state === "disabled";
6168
5473
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { css: style.stepContainer, children: [
6169
5474
  stepNumber > 1 && /* @__PURE__ */ jsxRuntime.jsx(
6170
- sporIconReact.DropdownRightFill18Icon,
6171
- {
6172
- marginX: 5,
6173
- display: ["none", null, "block"],
6174
- color: iconColor
6175
- }
6176
- ),
6177
- disabled ? /* @__PURE__ */ jsxRuntime.jsx(
6178
- Text3,
6179
- {
6180
- variant: "xs",
6181
- fontSize: "1rem",
6182
- color: disabledTextColor,
6183
- cursor: "default",
6184
- paddingX: 2,
6185
- children
6186
- }
6187
- ) : /* @__PURE__ */ jsxRuntime.jsx(
6188
- Button,
6189
- {
6190
- size: "xs",
6191
- variant: state === "active" ? "primary" : "ghost",
6192
- onClick: state === "completed" ? () => onClick(stepNumber) : void 0,
6193
- pointerEvents: state === "active" ? "none" : "auto",
6194
- tabIndex: state === "active" ? -1 : void 0,
6195
- disabled,
6196
- "aria-current": state === "active" ? "step" : void 0,
6197
- css: state === "active" ? style.stepButton._currentStep : style.stepButton,
6198
- fontWeight: state === "active" ? "bold" : void 0,
6199
- children
6200
- }
6201
- )
6202
- ] });
6203
- };
6204
- var getState = (stepNumber, activeStep) => {
6205
- if (stepNumber < activeStep) {
6206
- return "completed";
6207
- }
6208
- if (stepNumber === activeStep) {
6209
- return "active";
6210
- }
6211
- return "disabled";
6212
- };
6213
- var Tabs = React28.forwardRef((props, ref) => {
6214
- const { variant = "core", size = "sm" } = props;
6215
- return /* @__PURE__ */ jsxRuntime.jsx(react.Tabs.Root, { ...props, ref, variant, size });
6216
- });
6217
- Tabs.displayName = "Tabs";
6218
- var TabsList = react.Tabs.List;
6219
- var TabsTrigger = react.Tabs.Trigger;
6220
- var TabsIndicator = react.Tabs.Indicator;
6221
- var TabsContent = react.Tabs.Content;
6222
- var numericStyles = {
6223
- "&[data-is-numeric=true]": {
6224
- textAlign: "right"
6225
- }
6226
- };
6227
- var tableSlotRecipe = react.defineSlotRecipe({
6228
- className: "spor-table",
6229
- slots: tableAnatomy.keys(),
6230
- base: {
6231
- root: {
6232
- tableLayout: "fixed",
6233
- borderCollapse: "collapse",
6234
- width: "100%",
6235
- minWidth: "36rem",
6236
- overflowX: "auto"
6237
- },
6238
- columnHeader: {
6239
- fontWeight: "bold",
6240
- textAlign: "start",
6241
- ...numericStyles,
6242
- paddingX: 1.5,
6243
- paddingY: 1
6244
- },
6245
- row: {
6246
- ...numericStyles
6247
- },
6248
- cell: {
6249
- ...numericStyles,
6250
- paddingX: 1.5,
6251
- paddingY: 1,
6252
- width: "100%"
6253
- },
6254
- footer: {
6255
- fontWeight: "medium"
6256
- }
6257
- },
6258
- variants: {
6259
- colorPalette: {
6260
- green: {
6261
- root: {
6262
- backgroundColor: "bg"
6263
- },
6264
- header: {
6265
- backgroundColor: "bg.tertiary"
6266
- },
6267
- columnHeader: {
6268
- color: "text.secondary"
6269
- }
6270
- },
6271
- grey: {
6272
- root: {
6273
- backgroundColor: "bg"
6274
- },
6275
- columnHeader: {
6276
- color: "brand.text.inverted",
6277
- backgroundColor: "surface.disabled",
6278
- _hover: {
6279
- backgroundColor: "surface.disabled"
6280
- }
6281
- }
6282
- },
6283
- white: {
6284
- root: {
6285
- backgroundColor: "bg"
6286
- },
6287
- columnHeader: {
6288
- color: "text",
6289
- backgroundColor: "bg"
6290
- }
6291
- }
6292
- },
6293
- variant: {
6294
- ghost: {
6295
- header: {
6296
- backgroundColor: "none"
6297
- },
6298
- columnHeader: {
6299
- borderBottom: "sm",
6300
- borderColor: "outline.disabled",
6301
- backgroundColor: "none",
6302
- color: "text"
6303
- },
6304
- cell: {
6305
- ...numericStyles
6306
- },
6307
- row: {
6308
- borderBottom: "sm",
6309
- borderColor: "outline.disabled",
6310
- ...numericStyles
6311
- }
6312
- },
6313
- core: {
6314
- root: {
6315
- boxShadow: "0 0 0 1px var(--shadow-color)",
6316
- shadowColor: "outline.disabled",
6317
- borderRadius: "sm"
6318
- },
6319
- table: {
6320
- overflow: "hidden"
6321
- },
6322
- cell: {
6323
- ...numericStyles,
6324
- borderRight: "sm",
6325
- borderColor: "outline.disabled",
6326
- _last: {
6327
- borderRight: "none"
6328
- }
6329
- },
6330
- columnHeader: {
6331
- ...numericStyles,
6332
- borderRight: "sm",
6333
- borderColor: "outline.disabled",
6334
- _first: {
6335
- borderTopLeftRadius: "sm"
6336
- },
6337
- _last: {
6338
- borderTopRightRadius: "sm",
6339
- borderRight: "none"
6340
- }
6341
- },
6342
- header: {
6343
- borderBottom: "sm",
6344
- borderColor: "outline.disabled"
6345
- },
6346
- row: {
6347
- ...numericStyles,
6348
- borderBottom: "sm",
6349
- borderColor: "outline.disabled",
6350
- _last: {
6351
- borderBottom: "none"
6352
- }
6353
- }
5475
+ sporIconReact.DropdownRightFill18Icon,
5476
+ {
5477
+ marginX: 5,
5478
+ display: ["none", null, "block"],
5479
+ color: iconColor
6354
5480
  }
6355
- },
6356
- size: {
6357
- sm: {
6358
- table: {
6359
- fontSize: "mobile.sm"
6360
- },
6361
- cell: {
6362
- paddingX: 1,
6363
- paddingY: 0.5,
6364
- fontSize: "mobile.sm"
6365
- },
6366
- columnHeader: {
6367
- paddingX: 1,
6368
- paddingY: 0.5
6369
- },
6370
- caption: {
6371
- paddingX: 1,
6372
- paddingY: 0.5
6373
- }
6374
- },
6375
- md: {
6376
- table: {
6377
- fontSize: "mobile.md"
6378
- },
6379
- cell: {
6380
- paddingX: 1.5,
6381
- paddingY: 1,
6382
- fontSize: "mobile.md"
6383
- },
6384
- columnHeader: {
6385
- paddingX: 1.5,
6386
- paddingY: 1,
6387
- fontSize: "mobile.md"
6388
- },
6389
- caption: {
6390
- paddingX: 1.5,
6391
- paddingY: 1,
6392
- fontSize: "mobile.md"
6393
- }
6394
- },
6395
- lg: {
6396
- table: {
6397
- fontSize: "mobile.md"
6398
- },
6399
- cell: {
6400
- paddingX: 3,
6401
- paddingY: 3,
6402
- fontSize: "mobile.md"
6403
- },
6404
- columnHeader: {
6405
- paddingX: 3,
6406
- paddingY: 2,
6407
- fontSize: "mobile.md"
6408
- },
6409
- caption: {
6410
- paddingX: 3,
6411
- paddingY: 2
6412
- }
5481
+ ),
5482
+ disabled ? /* @__PURE__ */ jsxRuntime.jsx(
5483
+ Text3,
5484
+ {
5485
+ variant: "xs",
5486
+ fontSize: "1rem",
5487
+ color: disabledTextColor,
5488
+ cursor: "default",
5489
+ paddingX: 2,
5490
+ children
6413
5491
  }
6414
- }
5492
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
5493
+ Button,
5494
+ {
5495
+ size: "xs",
5496
+ variant: state === "active" ? "primary" : "ghost",
5497
+ onClick: state === "completed" ? () => onClick(stepNumber) : void 0,
5498
+ pointerEvents: state === "active" ? "none" : "auto",
5499
+ tabIndex: state === "active" ? -1 : void 0,
5500
+ disabled,
5501
+ "aria-current": state === "active" ? "step" : void 0,
5502
+ css: state === "active" ? style.stepButton._currentStep : style.stepButton,
5503
+ fontWeight: state === "active" ? "bold" : void 0,
5504
+ children
5505
+ }
5506
+ )
5507
+ ] });
5508
+ };
5509
+ var getState = (stepNumber, activeStep) => {
5510
+ if (stepNumber < activeStep) {
5511
+ return "completed";
5512
+ }
5513
+ if (stepNumber === activeStep) {
5514
+ return "active";
6415
5515
  }
5516
+ return "disabled";
5517
+ };
5518
+ var Tabs = React28.forwardRef((props, ref) => {
5519
+ const { variant = "core", size = "sm" } = props;
5520
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Tabs.Root, { ...props, ref, variant, size });
6416
5521
  });
5522
+ Tabs.displayName = "Tabs";
5523
+ var TabsList = react.Tabs.List;
5524
+ var TabsTrigger = react.Tabs.Trigger;
5525
+ var TabsIndicator = react.Tabs.Indicator;
5526
+ var TabsContent = react.Tabs.Content;
6417
5527
  var Table = React28.forwardRef((props, ref) => {
6418
5528
  const { variant = "ghost", size, colorPalette = "green", children } = props;
6419
- const recipe = react.useSlotRecipe({ recipe: tableSlotRecipe });
5529
+ const recipe = react.useSlotRecipe({ key: "table" });
6420
5530
  const styles = recipe({ variant, size });
6421
5531
  return /* @__PURE__ */ jsxRuntime.jsx(
6422
5532
  react.Table.Root,
@@ -6672,7 +5782,140 @@ var linkRecipe = react.defineRecipe({
6672
5782
  size: "sm"
6673
5783
  }
6674
5784
  });
6675
- var _a3, _b2;
5785
+ var separatorRecipe = react.defineRecipe({
5786
+ className: "spor-separator",
5787
+ base: {
5788
+ borderColor: "outline.disabled",
5789
+ display: "block",
5790
+ borderRadius: "xl"
5791
+ },
5792
+ variants: {
5793
+ variant: {
5794
+ solid: {
5795
+ borderStyle: "solid"
5796
+ },
5797
+ dashed: {
5798
+ width: "100%",
5799
+ borderWidth: "0px"
5800
+ }
5801
+ },
5802
+ size: {
5803
+ sm: {
5804
+ borderBottomWidth: "1px",
5805
+ height: "1px"
5806
+ },
5807
+ md: {
5808
+ borderBottomWidth: "2px",
5809
+ height: "2px"
5810
+ },
5811
+ lg: {
5812
+ borderBottomWidth: "3px",
5813
+ height: "3px"
5814
+ }
5815
+ },
5816
+ orientation: {
5817
+ horizontal: {
5818
+ width: "100%"
5819
+ },
5820
+ vertical: {
5821
+ height: "100%",
5822
+ borderLeftWidth: "1px"
5823
+ }
5824
+ }
5825
+ },
5826
+ compoundVariants: [
5827
+ {
5828
+ variant: "dashed",
5829
+ size: "sm",
5830
+ css: {
5831
+ background: "linear-gradient(to left, var(--spor-colors-outline-disabled), var(--spor-colors-outline-disabled) 1px, transparent 1px, transparent 4px)",
5832
+ backgroundSize: "4px 1px",
5833
+ backgroundRepeat: "repeat-x"
5834
+ }
5835
+ },
5836
+ {
5837
+ variant: "dashed",
5838
+ size: "md",
5839
+ css: {
5840
+ background: "linear-gradient(to left, var(--spor-colors-outline-disabled), var(--spor-colors-outline-disabled) 3px, transparent 3px, transparent 6px)",
5841
+ backgroundSize: "9px 2px",
5842
+ backgroundRepeat: "repeat-x"
5843
+ }
5844
+ },
5845
+ {
5846
+ variant: "dashed",
5847
+ size: "lg",
5848
+ css: {
5849
+ background: "linear-gradient(to left, var(--spor-colors-outline-disabled), var(--spor-colors-outline-disabled) 3px, transparent 3px, transparent 9px)",
5850
+ backgroundSize: "9px 3px",
5851
+ backgroundRepeat: "repeat-x"
5852
+ }
5853
+ },
5854
+ {
5855
+ variant: "dashed",
5856
+ orientation: "vertical",
5857
+ css: {
5858
+ background: "0",
5859
+ width: "0%",
5860
+ height: "100%"
5861
+ }
5862
+ }
5863
+ ]
5864
+ });
5865
+ var skeletonRecipe = react.defineRecipe({
5866
+ className: "chakra-skeleton",
5867
+ variants: {
5868
+ loading: {
5869
+ true: {
5870
+ borderRadius: "xs",
5871
+ boxShadow: "none",
5872
+ backgroundClip: "padding-box",
5873
+ cursor: "default",
5874
+ color: "transparent",
5875
+ pointerEvents: "none",
5876
+ userSelect: "none",
5877
+ flexShrink: "0",
5878
+ "&::before, &::after, *": {
5879
+ visibility: "hidden"
5880
+ }
5881
+ },
5882
+ false: {
5883
+ background: "unset",
5884
+ animation: "fade-in var(--fade-duration, 0.1s) ease-out !important"
5885
+ }
5886
+ },
5887
+ variant: {
5888
+ pulse: {
5889
+ background: {
5890
+ _light: "silver",
5891
+ _dark: "darkGrey"
5892
+ },
5893
+ animation: "pulse",
5894
+ animationDuration: "var(--duration, 1.2s)"
5895
+ },
5896
+ shine: {
5897
+ "--animate-from": "200%",
5898
+ "--animate-to": "-200%",
5899
+ "--start-color": {
5900
+ _light: "colors.lightGrey",
5901
+ _dark: "colors.dimGrey"
5902
+ },
5903
+ "--end-color": {
5904
+ _light: "colors.platinum",
5905
+ _dark: "colors.darkGrey"
5906
+ },
5907
+ backgroundImage: "linear-gradient(270deg,var(--start-color),var(--end-color),var(--end-color),var(--start-color))",
5908
+ backgroundSize: "400% 100%",
5909
+ animation: "bg-position var(--duration, 5s) ease-in-out infinite"
5910
+ },
5911
+ none: {
5912
+ animation: "none",
5913
+ background: "steel"
5914
+ }
5915
+ }
5916
+ }
5917
+ });
5918
+ var _a2, _b;
6676
5919
  var textareaRecipe = react.defineRecipe({
6677
5920
  className: "spor-textarea",
6678
5921
  base: {
@@ -6689,10 +5932,10 @@ var textareaRecipe = react.defineRecipe({
6689
5932
  variants: {
6690
5933
  variant: {
6691
5934
  core: {
6692
- ...(_a3 = inputRecipe.variants) == null ? void 0 : _a3.variant.core
5935
+ ...(_a2 = inputRecipe.variants) == null ? void 0 : _a2.variant.core
6693
5936
  },
6694
5937
  floating: {
6695
- ...(_b2 = inputRecipe.variants) == null ? void 0 : _b2.variant.floating
5938
+ ...(_b = inputRecipe.variants) == null ? void 0 : _b.variant.floating
6696
5939
  }
6697
5940
  }
6698
5941
  }
@@ -6741,33 +5984,284 @@ var shadows = react.defineSemanticTokens.shadows({
6741
5984
  sm: {
6742
5985
  value: tokens23__namespace.default.depth.shadow.sm.value
6743
5986
  },
6744
- md: {
6745
- value: tokens23__namespace.default.depth.shadow.md.value
5987
+ md: {
5988
+ value: tokens23__namespace.default.depth.shadow.md.value
5989
+ },
5990
+ lg: {
5991
+ value: tokens23__namespace.default.depth.shadow.lg.value
5992
+ }
5993
+ });
5994
+
5995
+ // src/theme/semantic-tokens/index.ts
5996
+ var baseSemanticTokens = {
5997
+ shadows,
5998
+ radii
5999
+ };
6000
+ var semanticTokens = {
6001
+ ["VyUtvikling" /* VyUtvikling */]: {
6002
+ ...baseSemanticTokens,
6003
+ colors: vyUtviklingColors
6004
+ },
6005
+ ["CargoNet" /* CargoNet */]: {
6006
+ ...baseSemanticTokens,
6007
+ colors: cargonetColors
6746
6008
  },
6747
- lg: {
6748
- value: tokens23__namespace.default.depth.shadow.lg.value
6009
+ ["VyDigital" /* VyDigital */]: {
6010
+ ...baseSemanticTokens,
6011
+ colors: vyDigitalColors
6749
6012
  }
6750
- });
6013
+ };
6014
+ var accordionAnatomy = anatomy.createAnatomy("accordion").parts(
6015
+ "root",
6016
+ "itemTrigger",
6017
+ "item",
6018
+ "itemBody",
6019
+ "itemContent",
6020
+ "itemIndicator"
6021
+ );
6022
+ var alertAnatomy = anatomy.createAnatomy("alert").parts(
6023
+ "root",
6024
+ "indicator",
6025
+ "title",
6026
+ "closeButton",
6027
+ "content",
6028
+ "description"
6029
+ );
6030
+ var alertExpandableAnatomy = anatomy.createAnatomy("alert-expandable").parts(
6031
+ "root",
6032
+ "itemTrigger",
6033
+ "itemContent",
6034
+ "indicator",
6035
+ "title",
6036
+ "itemIndicator"
6037
+ );
6038
+ var alertServiceAnatomy = anatomy.createAnatomy("service-alert").parts(
6039
+ "root",
6040
+ "itemTrigger",
6041
+ "itemTriggerTitle",
6042
+ "notificationText",
6043
+ "itemContent",
6044
+ "itemBody"
6045
+ );
6046
+ var listAnatomy = anatomy.createAnatomy("list").parts(
6047
+ "root",
6048
+ "item",
6049
+ "icon",
6050
+ "indicator"
6051
+ );
6052
+ var tableAnatomy = anatomy.createAnatomy("table").parts(
6053
+ "root",
6054
+ "body",
6055
+ "row",
6056
+ "cell",
6057
+ "columnHeader",
6058
+ "caption",
6059
+ "footer",
6060
+ "header"
6061
+ );
6062
+ var fieldAnatomy = anatomy.createAnatomy("field").parts(
6063
+ "root",
6064
+ "label",
6065
+ "requiredIndicator",
6066
+ "helperText",
6067
+ "errorText"
6068
+ );
6069
+ var dialogAnatomy = anatomy.createAnatomy("dialog").parts(
6070
+ "header",
6071
+ "body",
6072
+ "footer",
6073
+ "backdrop",
6074
+ "positioner",
6075
+ "content",
6076
+ "title",
6077
+ "description",
6078
+ "closeTrigger"
6079
+ );
6080
+ var paginationAnatomy = anatomy.createAnatomy("pagination").parts(
6081
+ "list",
6082
+ "item"
6083
+ );
6084
+ var linjetagAnatomy = anatomy.createAnatomy("linjetag").parts(
6085
+ "iconContainer",
6086
+ "icon",
6087
+ "root",
6088
+ "title",
6089
+ "desc"
6090
+ );
6091
+ var infoTagAnatomy = anatomy.createAnatomy("info-tag").parts(
6092
+ "container",
6093
+ "iconContainer",
6094
+ "icon",
6095
+ "textContainer",
6096
+ "title",
6097
+ "description",
6098
+ "walk"
6099
+ );
6100
+ var travelTagAnatomy = anatomy.createAnatomy("travel-tag").parts(
6101
+ "container",
6102
+ "iconContainer",
6103
+ "icon",
6104
+ "textContainer",
6105
+ "title",
6106
+ "description",
6107
+ "deviationIcon"
6108
+ );
6109
+ var drawerAnatomy = anatomy.createAnatomy("drawer").parts(
6110
+ "header",
6111
+ "body",
6112
+ "backdrop",
6113
+ "positioner",
6114
+ "content",
6115
+ "footer",
6116
+ "title",
6117
+ "description",
6118
+ "closeTrigger"
6119
+ );
6120
+ var checkboxAnatomy = anatomy.createAnatomy("checkbox").parts(
6121
+ "root",
6122
+ "control",
6123
+ "label",
6124
+ "description",
6125
+ "addon",
6126
+ "indicator",
6127
+ "content"
6128
+ );
6129
+ var breadcrumbAnatomy = anatomy.createAnatomy("breadcrumb").parts(
6130
+ "link",
6131
+ "currentLink",
6132
+ "list",
6133
+ "separator"
6134
+ );
6135
+ var stepperAnatomy = anatomy.createAnatomy("stepper").parts(
6136
+ "root",
6137
+ "container",
6138
+ "innerContainer",
6139
+ "title",
6140
+ "stepCounter",
6141
+ "stepContainer",
6142
+ "stepButton",
6143
+ "stepNumber",
6144
+ "stepTitle",
6145
+ "closeButton",
6146
+ "backButton"
6147
+ );
6148
+ var radioCardAnatomy = anatomy.createAnatomy("radio-card").parts(
6149
+ "root",
6150
+ "item",
6151
+ "label",
6152
+ "itemText",
6153
+ "itemDescription",
6154
+ "itemContent"
6155
+ );
6156
+ var radioAnatomy = anatomy.createAnatomy("radio").parts(
6157
+ "root",
6158
+ "item",
6159
+ "itemControl",
6160
+ "itemText",
6161
+ "label"
6162
+ );
6163
+ var listBoxAnatomy = anatomy.createAnatomy("listbox").parts(
6164
+ "root",
6165
+ "item",
6166
+ "label",
6167
+ "description"
6168
+ );
6169
+ var NativeSelectAnatomy = anatomy.createAnatomy("native-select").parts(
6170
+ "root",
6171
+ "field",
6172
+ "icon"
6173
+ );
6174
+ var tabsAnatomy = anatomy.createAnatomy("tabs").parts(
6175
+ "root",
6176
+ "list",
6177
+ "trigger",
6178
+ "content",
6179
+ "indicator"
6180
+ );
6181
+ var switchAnatomy = anatomy.createAnatomy("switch").parts(
6182
+ "root",
6183
+ "thumb",
6184
+ "control",
6185
+ "label"
6186
+ );
6187
+ var selectAnatomy = anatomy.createAnatomy("select").parts(
6188
+ "root",
6189
+ "trigger",
6190
+ "indicatorGroup",
6191
+ "indicator",
6192
+ "selectContent",
6193
+ "item",
6194
+ "control",
6195
+ "itemText",
6196
+ "itemDescription",
6197
+ "itemGroup",
6198
+ "itemGroupLabel",
6199
+ "label",
6200
+ "valueText"
6201
+ );
6202
+ anatomy.createAnatomy("card-select").parts(
6203
+ "trigger",
6204
+ "card"
6205
+ );
6206
+ var numericStepperAnatomy = anatomy.createAnatomy("numeric-stepper").parts(
6207
+ "root",
6208
+ "container",
6209
+ "input",
6210
+ "text",
6211
+ "button"
6212
+ );
6213
+ var mediaControllerAnatomy = anatomy.createAnatomy(
6214
+ "media-controller-button"
6215
+ ).parts("root", "icon");
6216
+ var progressBarAnotomy = anatomy.createAnatomy("progress-bar").parts(
6217
+ "container",
6218
+ "background",
6219
+ "progress",
6220
+ "description",
6221
+ "disabledBackground"
6222
+ );
6223
+ var toastAnatomy = anatomy.createAnatomy("toast").parts(
6224
+ "root",
6225
+ "title",
6226
+ "description",
6227
+ "indicator",
6228
+ "closeTrigger",
6229
+ "actionTrigger"
6230
+ );
6231
+ var floatingActionButtonAnatomy = anatomy.createAnatomy(
6232
+ "floating-action-button"
6233
+ ).parts("root", "icon", "text");
6234
+ var popoverAnatomy = popover.popoverAnatomy.extendWith(
6235
+ "header",
6236
+ "body",
6237
+ "footer"
6238
+ );
6239
+ var datepickerAnatomy = anatomy.createAnatomy("datepicker").parts(
6240
+ "wrapper",
6241
+ "calendarTriggerButton",
6242
+ "arrow",
6243
+ "calendarPopover",
6244
+ "calendar",
6245
+ "weekdays",
6246
+ "weekend",
6247
+ "dateCell",
6248
+ "inputLabel",
6249
+ "dateTimeSegment",
6250
+ "cell",
6251
+ "box",
6252
+ "rangeCalendarPopover"
6253
+ );
6254
+ var checkboxCardAnatomy = anatomy.createAnatomy("checkbox-card", [
6255
+ "root",
6256
+ "control",
6257
+ "label",
6258
+ "description",
6259
+ "addon",
6260
+ "indicator",
6261
+ "content"
6262
+ ]);
6751
6263
 
6752
- // src/theme/semantic-tokens/index.ts
6753
- var baseSemanticTokens = {
6754
- shadows,
6755
- radii
6756
- };
6757
- var semanticTokens = {
6758
- ["VyUtvikling" /* VyUtvikling */]: {
6759
- ...baseSemanticTokens,
6760
- colors: vyUtviklingColors
6761
- },
6762
- ["CargoNet" /* CargoNet */]: {
6763
- ...baseSemanticTokens,
6764
- colors: cargonetColors
6765
- },
6766
- ["VyDigital" /* VyDigital */]: {
6767
- ...baseSemanticTokens,
6768
- colors: vyDigitalColors
6769
- }
6770
- };
6264
+ // src/theme/slot-recipes/accordion.ts
6771
6265
  var accordionSlotRecipe = react.defineSlotRecipe({
6772
6266
  className: "spor-accordion",
6773
6267
  slots: accordionAnatomy.keys(),
@@ -7320,139 +6814,345 @@ var choiceChipSlotRecipe = react.defineSlotRecipe({
7320
6814
  }
7321
6815
  }
7322
6816
  },
7323
- _focusVisible: {
7324
- outline: "2px solid",
7325
- outlineColor: "outline.focus",
7326
- outlineOffset: "1px"
6817
+ _focusVisible: {
6818
+ outline: "2px solid",
6819
+ outlineColor: "outline.focus",
6820
+ outlineOffset: "1px"
6821
+ },
6822
+ _disabled: {
6823
+ pointerEvents: "none",
6824
+ boxShadow: "none",
6825
+ backgroundColor: "surface.disabled",
6826
+ color: "text.disabled",
6827
+ outline: "none",
6828
+ _hover: {
6829
+ backgroundColor: "core.surface.disabled",
6830
+ boxShadow: "none",
6831
+ color: "core.text.disabled"
6832
+ },
6833
+ _checked: {
6834
+ cursor: "not-allowed",
6835
+ boxShadow: "none",
6836
+ color: "core.text.disabled",
6837
+ backgroundColor: "core.surface.disabled",
6838
+ _hover: {
6839
+ backgroundColor: "core.surface.disabled",
6840
+ boxShadow: "none",
6841
+ color: "core.text.disabled"
6842
+ }
6843
+ }
6844
+ }
6845
+ },
6846
+ label: {
6847
+ display: "flex",
6848
+ alignItems: "center",
6849
+ fontSize: "xs"
6850
+ }
6851
+ },
6852
+ variants: {
6853
+ size: {
6854
+ xs: {
6855
+ root: {
6856
+ _checked: {
6857
+ borderRadius: "0.563rem"
6858
+ },
6859
+ height: 5,
6860
+ paddingX: 1.5
6861
+ }
6862
+ },
6863
+ sm: {
6864
+ root: {
6865
+ _checked: {
6866
+ borderRadius: "sm"
6867
+ },
6868
+ height: 6,
6869
+ paddingX: 2
6870
+ }
6871
+ },
6872
+ md: {
6873
+ root: {
6874
+ _checked: {
6875
+ borderRadius: "sm"
6876
+ },
6877
+ height: 7,
6878
+ paddingX: 2
6879
+ }
6880
+ },
6881
+ lg: {
6882
+ root: {
6883
+ _checked: {
6884
+ borderRadius: "md"
6885
+ },
6886
+ height: 8,
6887
+ paddingX: 3
6888
+ }
6889
+ }
6890
+ },
6891
+ variant: {
6892
+ core: {
6893
+ root: {
6894
+ color: "core.text",
6895
+ outlineColor: "core.outline",
6896
+ _hover: {
6897
+ outline: "2px solid",
6898
+ outlineColor: "core.outline.hover",
6899
+ _active: {
6900
+ outline: "1px solid",
6901
+ outlineColor: "core.outline",
6902
+ backgroundColor: "core.surface.active"
6903
+ }
6904
+ }
6905
+ }
6906
+ },
6907
+ accent: {
6908
+ root: {
6909
+ backgroundColor: "accent.surface",
6910
+ color: "accent.text",
6911
+ outline: "none",
6912
+ _hover: {
6913
+ backgroundColor: "accent.surface.hover",
6914
+ _active: {
6915
+ backgroundColor: "accent.surface.active"
6916
+ }
6917
+ }
6918
+ }
6919
+ },
6920
+ floating: {
6921
+ root: {
6922
+ backgroundColor: "floating.surface",
6923
+ outline: "1px solid",
6924
+ outlineColor: "floating.outline",
6925
+ color: "floating.text",
6926
+ boxShadow: "sm",
6927
+ _hover: {
6928
+ backgroundColor: "floating.surface.hover",
6929
+ outline: "1px solid",
6930
+ outlineColor: "floating.outline.hover",
6931
+ _active: {
6932
+ backgroundColor: "floating.surface.active",
6933
+ outline: "1px solid",
6934
+ outlineColor: "floating.outline"
6935
+ }
6936
+ }
6937
+ }
6938
+ }
6939
+ },
6940
+ chipType: {
6941
+ icon: {},
6942
+ choice: {},
6943
+ filter: {}
6944
+ }
6945
+ },
6946
+ defaultVariants: {
6947
+ size: "md",
6948
+ variant: "core",
6949
+ chipType: "choice"
6950
+ }
6951
+ });
6952
+ var datePickerSlotRecipe = react.defineSlotRecipe({
6953
+ slots: datepickerAnatomy.keys(),
6954
+ className: "spor-datepicker",
6955
+ base: {
6956
+ wrapper: {
6957
+ transitionProperty: "box-shadow",
6958
+ transitionDuration: "fast",
6959
+ borderRadius: "sm",
6960
+ display: "flex",
6961
+ flex: 1,
6962
+ paddingY: 0.5,
6963
+ alignItems: "center",
6964
+ _hover: {
6965
+ zIndex: "docked"
6966
+ },
6967
+ _disabled: {
6968
+ pointerEvents: "none",
6969
+ backgroundColor: "surface.disabled",
6970
+ outline: "1px solid",
6971
+ outlineColor: "outline.disabled",
6972
+ color: "text.disabled"
6973
+ },
6974
+ _focusWithin: {
6975
+ outline: "2px solid",
6976
+ outlineColor: "outline.focus"
6977
+ }
6978
+ },
6979
+ inputLabel: {
6980
+ fontSize: "mobile.xs",
6981
+ margin: 0,
6982
+ cursor: "text"
6983
+ },
6984
+ dateTimeSegment: {
6985
+ _focus: {
6986
+ backgroundColor: "ghost.surface.active",
6987
+ color: "text.default"
6988
+ }
6989
+ },
6990
+ box: {
6991
+ width: "100%"
6992
+ },
6993
+ calendarTriggerButton: {
6994
+ position: "relative",
6995
+ borderRadius: "xl",
6996
+ display: "flex",
6997
+ alignItems: "center",
6998
+ justifyContent: "center",
6999
+ transitionProperty: "box-shadow, background-color",
7000
+ right: "0.5rem",
7001
+ _hover: {
7002
+ backgroundColor: "ghost.surface.hover"
7003
+ },
7004
+ _active: {
7005
+ backgroundColor: "ghost.surface.active"
7006
+ },
7007
+ _invalid: {
7008
+ outline: "2px solid",
7009
+ outlineColor: "outline.error"
7010
+ }
7011
+ },
7012
+ arrow: {
7013
+ backgroundColor: "surface"
7014
+ },
7015
+ calendarPopover: {
7016
+ color: "core.text",
7017
+ outline: "1px solid",
7018
+ outlineColor: "floating.outline",
7019
+ boxShadow: "md",
7020
+ backgroundColor: "floating.surface"
7021
+ },
7022
+ rangeCalendarPopover: {
7023
+ width: "43rem",
7024
+ maxWidth: "100vw"
7025
+ },
7026
+ weekdays: {
7027
+ color: "core.text",
7028
+ fontWeight: "bold"
7029
+ },
7030
+ weekend: {
7031
+ color: "accent.text",
7032
+ fontWeight: "bold"
7033
+ },
7034
+ cell: {
7035
+ '&[aria-selected="true"] + [aria-selected="true"] > button': {
7036
+ "&::before": {
7037
+ content: '""',
7038
+ display: "block",
7039
+ height: "100%",
7040
+ position: "absolute",
7041
+ left: "-50%",
7042
+ top: 0,
7043
+ bottom: 0,
7044
+ zIndex: -1,
7045
+ backgroundColor: "brand.surface"
7046
+ }
7047
+ }
7048
+ },
7049
+ dateCell: {
7050
+ color: "core.text",
7051
+ borderRadius: "xl",
7052
+ position: "relative",
7053
+ transition: ".1s ease-in-out",
7054
+ userSelect: "none",
7055
+ width: [6, 7],
7056
+ height: [6, 7],
7057
+ transitionProperty: "common",
7058
+ _hover: {
7059
+ backgroundColor: "ghost.surface.hover"
7060
+ },
7061
+ _active: {
7062
+ backgroundColor: "ghost.surface.active"
7327
7063
  },
7328
7064
  _disabled: {
7329
- pointerEvents: "none",
7330
- boxShadow: "none",
7331
7065
  backgroundColor: "surface.disabled",
7332
7066
  color: "text.disabled",
7333
- outline: "none",
7334
- _hover: {
7335
- backgroundColor: "core.surface.disabled",
7336
- boxShadow: "none",
7337
- color: "core.text.disabled"
7338
- },
7339
- _checked: {
7340
- cursor: "not-allowed",
7341
- boxShadow: "none",
7342
- color: "core.text.disabled",
7343
- backgroundColor: "core.surface.disabled",
7344
- _hover: {
7345
- backgroundColor: "core.surface.disabled",
7346
- boxShadow: "none",
7347
- color: "core.text.disabled"
7348
- }
7349
- }
7350
- }
7351
- },
7352
- label: {
7353
- display: "flex",
7354
- alignItems: "center",
7355
- fontSize: "xs"
7356
- }
7357
- },
7358
- variants: {
7359
- size: {
7360
- xs: {
7361
- root: {
7362
- _checked: {
7363
- borderRadius: "0.563rem"
7364
- },
7365
- height: 5,
7366
- paddingX: 1.5
7367
- }
7067
+ pointerEvents: "none"
7368
7068
  },
7369
- sm: {
7370
- root: {
7371
- _checked: {
7372
- borderRadius: "sm"
7373
- },
7374
- height: 6,
7375
- paddingX: 2
7069
+ _selected: {
7070
+ backgroundColor: "brand.surface",
7071
+ color: "brand.text",
7072
+ _active: {
7073
+ backgroundColor: "brand.surface.active",
7074
+ color: "brand.text"
7376
7075
  }
7377
7076
  },
7378
- md: {
7379
- root: {
7380
- _checked: {
7381
- borderRadius: "sm"
7382
- },
7383
- height: 7,
7384
- paddingX: 2
7385
- }
7077
+ "&[data-today]": {
7078
+ outline: "1px solid",
7079
+ outlineColor: "core.outline"
7386
7080
  },
7387
- lg: {
7388
- root: {
7389
- _checked: {
7390
- borderRadius: "md"
7391
- },
7392
- height: 8,
7393
- paddingX: 3
7394
- }
7081
+ "&[data-unavailable]": {
7082
+ pointerEvents: "none",
7083
+ borderRadius: "xl",
7084
+ backgroundColor: "surface.disabled",
7085
+ color: "text.disabled"
7395
7086
  }
7396
- },
7087
+ }
7088
+ },
7089
+ variants: {
7397
7090
  variant: {
7398
7091
  core: {
7399
- root: {
7400
- color: "core.text",
7092
+ wrapper: {
7093
+ outline: "1px solid",
7401
7094
  outlineColor: "core.outline",
7095
+ backgroundColor: "core.surface",
7402
7096
  _hover: {
7403
7097
  outline: "2px solid",
7404
7098
  outlineColor: "core.outline.hover",
7405
7099
  _active: {
7100
+ backgroundColor: "ghost.surface.active",
7406
7101
  outline: "1px solid",
7407
- outlineColor: "core.outline",
7408
- backgroundColor: "core.surface.active"
7409
- }
7410
- }
7411
- }
7412
- },
7413
- accent: {
7414
- root: {
7415
- backgroundColor: "accent.surface",
7416
- color: "accent.text",
7417
- outline: "none",
7418
- _hover: {
7419
- backgroundColor: "accent.surface.hover",
7420
- _active: {
7421
- backgroundColor: "accent.surface.active"
7102
+ outlineColor: "core.outline"
7422
7103
  }
7104
+ },
7105
+ _invalid: {
7106
+ outline: "2px solid",
7107
+ outlineColor: "outline.error"
7423
7108
  }
7424
7109
  }
7425
7110
  },
7426
7111
  floating: {
7427
- root: {
7428
- backgroundColor: "floating.surface",
7112
+ wrapper: {
7113
+ backgroundColor: {
7114
+ _light: "bg",
7115
+ _dark: `color-mix(in srgb, white 10%, var(--spor-colors-bg))`
7116
+ },
7429
7117
  outline: "1px solid",
7430
7118
  outlineColor: "floating.outline",
7431
- color: "floating.text",
7432
7119
  boxShadow: "sm",
7433
7120
  _hover: {
7434
- backgroundColor: "floating.surface.hover",
7435
7121
  outline: "1px solid",
7436
7122
  outlineColor: "floating.outline.hover",
7437
7123
  _active: {
7438
- backgroundColor: "floating.surface.active",
7124
+ backgroundColor: "ghost.surface.active",
7439
7125
  outline: "1px solid",
7440
- outlineColor: "floating.outline"
7126
+ outlineColor: "core.outline"
7127
+ }
7128
+ },
7129
+ _invalid: {
7130
+ outline: "2px solid",
7131
+ outlineColor: "outline.error"
7132
+ }
7133
+ }
7134
+ },
7135
+ ghost: {
7136
+ wrapper: {
7137
+ _hover: {
7138
+ outline: "2px solid",
7139
+ outlineColor: "core.outline.hover",
7140
+ _active: {
7141
+ backgroundColor: "ghost.surface.active",
7142
+ outline: "1px solid",
7143
+ outlineColor: "core.outline"
7441
7144
  }
7145
+ },
7146
+ _invalid: {
7147
+ outline: "2px solid",
7148
+ outlineColor: "outline.error"
7442
7149
  }
7443
7150
  }
7444
7151
  }
7445
- },
7446
- chipType: {
7447
- icon: {},
7448
- choice: {},
7449
- filter: {}
7450
7152
  }
7451
7153
  },
7452
7154
  defaultVariants: {
7453
- size: "md",
7454
- variant: "core",
7455
- chipType: "choice"
7155
+ variant: "core"
7456
7156
  }
7457
7157
  });
7458
7158
  var dialogSlotRecipe = react.defineSlotRecipe({
@@ -8236,7 +7936,7 @@ var travelTagSlotRecipe = react.defineSlotRecipe({
8236
7936
  });
8237
7937
 
8238
7938
  // src/theme/slot-recipes/info-tag.ts
8239
- var _a4, _b3, _c, _d;
7939
+ var _a3, _b2, _c, _d;
8240
7940
  var infoTagSlotRecipe = react.defineSlotRecipe({
8241
7941
  slots: infoTagAnatomy.keys(),
8242
7942
  className: "spor-info-tag",
@@ -8273,9 +7973,9 @@ var infoTagSlotRecipe = react.defineSlotRecipe({
8273
7973
  "local-bus": {}
8274
7974
  },
8275
7975
  size: {
8276
- ...(_a4 = travelTagSlotRecipe.variants) == null ? void 0 : _a4.size,
7976
+ ...(_a3 = travelTagSlotRecipe.variants) == null ? void 0 : _a3.size,
8277
7977
  sm: {
8278
- ...(_b3 = travelTagSlotRecipe.variants) == null ? void 0 : _b3.size.sm,
7978
+ ...(_b2 = travelTagSlotRecipe.variants) == null ? void 0 : _b2.size.sm,
8279
7979
  iconContainer: {
8280
7980
  borderRadius: "0.375rem"
8281
7981
  }
@@ -8648,29 +8348,140 @@ var mediaControllerSlotRecipe = react.defineSlotRecipe({
8648
8348
  }
8649
8349
  }
8650
8350
  },
8651
- {
8652
- variant: "jumpSkip",
8653
- size: "sm",
8654
- css: {
8655
- root: {
8656
- fontSize: 24
8657
- }
8658
- }
8351
+ {
8352
+ variant: "jumpSkip",
8353
+ size: "sm",
8354
+ css: {
8355
+ root: {
8356
+ fontSize: 24
8357
+ }
8358
+ }
8359
+ },
8360
+ {
8361
+ variant: "jumpSkip",
8362
+ size: "lg",
8363
+ css: {
8364
+ root: {
8365
+ fontSize: 38
8366
+ },
8367
+ icon: {
8368
+ margin: 1,
8369
+ transform: "scale(1.4)"
8370
+ }
8371
+ }
8372
+ }
8373
+ ]
8374
+ });
8375
+ var _a4, _b3;
8376
+ var nativeSelectSlotRecipe = react.defineSlotRecipe({
8377
+ slots: NativeSelectAnatomy.keys(),
8378
+ className: "spor-nativeSelect",
8379
+ base: {
8380
+ root: {
8381
+ width: "100%",
8382
+ height: "fit-content",
8383
+ position: "relative"
8384
+ },
8385
+ field: {
8386
+ ...inputRecipe.base
8387
+ },
8388
+ icon: {
8389
+ width: 5,
8390
+ height: 5,
8391
+ right: " 0.5rem",
8392
+ strokeLinecap: "round",
8393
+ position: "absolute",
8394
+ display: "inline-flex",
8395
+ boxAlign: "center",
8396
+ alignItems: "center",
8397
+ boxPack: "center",
8398
+ justifyContent: "center",
8399
+ pointerEvents: "none",
8400
+ top: "50%",
8401
+ transform: "translateY(-50%)",
8402
+ insetEnd: "0.5rem",
8403
+ color: "currentColor",
8404
+ fontSize: "sm",
8405
+ _disabled: {
8406
+ color: "text.disabled"
8407
+ }
8408
+ }
8409
+ },
8410
+ variants: {
8411
+ variant: {
8412
+ core: {
8413
+ field: {
8414
+ ...(_a4 = inputRecipe.variants) == null ? void 0 : _a4.variant.core
8415
+ }
8416
+ },
8417
+ floating: {
8418
+ field: {
8419
+ ...(_b3 = inputRecipe.variants) == null ? void 0 : _b3.variant.floating
8420
+ }
8421
+ }
8422
+ }
8423
+ }
8424
+ });
8425
+ var numericStepperRecipe = react.defineSlotRecipe({
8426
+ slots: numericStepperAnatomy.keys(),
8427
+ className: "spor-numeric-stepper",
8428
+ base: {
8429
+ root: {
8430
+ "& > div": {
8431
+ display: "flex",
8432
+ flexDirection: "row",
8433
+ alignItems: "center"
8434
+ }
8435
+ },
8436
+ input: {
8437
+ fontSize: "sm",
8438
+ fontWeight: "bold",
8439
+ marginX: 0.5,
8440
+ padding: 0,
8441
+ paddingX: 0.5,
8442
+ borderRadius: "xs",
8443
+ outline: "none",
8444
+ height: "auto",
8445
+ textAlign: "center",
8446
+ transitionProperty: "common",
8447
+ transitionDuration: "fast",
8448
+ color: "core.text",
8449
+ backgroundColor: "transparent",
8450
+ _focus: {
8451
+ backgroundColor: "surface",
8452
+ outline: "2px solid",
8453
+ outlineColor: "outline.focus"
8454
+ },
8455
+ _active: {
8456
+ backgroundColor: "accent.surface.active"
8457
+ },
8458
+ _disabled: {
8459
+ pointerEvents: "none",
8460
+ opacity: 0.5
8461
+ },
8462
+ _hover: {
8463
+ outline: "1px solid",
8464
+ outlineColor: "core.outline"
8465
+ }
8466
+ },
8467
+ text: {
8468
+ fontSize: "sm",
8469
+ fontWeight: "bold",
8470
+ marginX: 1,
8471
+ paddingX: 1,
8472
+ textAlign: "center",
8473
+ width: "4ch",
8474
+ color: "core.text"
8659
8475
  },
8660
- {
8661
- variant: "jumpSkip",
8662
- size: "lg",
8663
- css: {
8664
- root: {
8665
- fontSize: 38
8666
- },
8667
- icon: {
8668
- margin: 1,
8669
- transform: "scale(1.4)"
8670
- }
8476
+ button: {
8477
+ outlineOffset: "-2px",
8478
+ width: "auto",
8479
+ _icon: {
8480
+ width: "1.2rem",
8481
+ height: "1.2rem"
8671
8482
  }
8672
8483
  }
8673
- ]
8484
+ }
8674
8485
  });
8675
8486
  var paginationSlotRecipe = react.defineSlotRecipe({
8676
8487
  slots: paginationAnatomy.keys(),
@@ -9474,6 +9285,201 @@ var switchSlotRecipe = react.defineSlotRecipe({
9474
9285
  }
9475
9286
  }
9476
9287
  });
9288
+ var numericStyles = {
9289
+ "&[data-is-numeric=true]": {
9290
+ textAlign: "right"
9291
+ }
9292
+ };
9293
+ var tableSlotRecipe = react.defineSlotRecipe({
9294
+ className: "spor-table",
9295
+ slots: tableAnatomy.keys(),
9296
+ base: {
9297
+ root: {
9298
+ tableLayout: "fixed",
9299
+ borderCollapse: "collapse",
9300
+ width: "100%",
9301
+ minWidth: "36rem",
9302
+ overflowX: "auto"
9303
+ },
9304
+ columnHeader: {
9305
+ fontWeight: "bold",
9306
+ textAlign: "start",
9307
+ ...numericStyles,
9308
+ paddingX: 1.5,
9309
+ paddingY: 1
9310
+ },
9311
+ row: {
9312
+ ...numericStyles
9313
+ },
9314
+ cell: {
9315
+ ...numericStyles,
9316
+ paddingX: 1.5,
9317
+ paddingY: 1,
9318
+ width: "100%"
9319
+ },
9320
+ footer: {
9321
+ fontWeight: "medium"
9322
+ }
9323
+ },
9324
+ variants: {
9325
+ colorPalette: {
9326
+ green: {
9327
+ root: {
9328
+ backgroundColor: "bg"
9329
+ },
9330
+ header: {
9331
+ backgroundColor: "bg.tertiary"
9332
+ },
9333
+ columnHeader: {
9334
+ color: "text.secondary"
9335
+ }
9336
+ },
9337
+ grey: {
9338
+ root: {
9339
+ backgroundColor: "bg"
9340
+ },
9341
+ columnHeader: {
9342
+ color: "brand.text.inverted",
9343
+ backgroundColor: "surface.disabled",
9344
+ _hover: {
9345
+ backgroundColor: "surface.disabled"
9346
+ }
9347
+ }
9348
+ },
9349
+ white: {
9350
+ root: {
9351
+ backgroundColor: "bg"
9352
+ },
9353
+ columnHeader: {
9354
+ color: "text",
9355
+ backgroundColor: "bg"
9356
+ }
9357
+ }
9358
+ },
9359
+ variant: {
9360
+ ghost: {
9361
+ header: {
9362
+ backgroundColor: "none"
9363
+ },
9364
+ columnHeader: {
9365
+ borderBottom: "sm",
9366
+ borderColor: "outline.disabled",
9367
+ backgroundColor: "none",
9368
+ color: "text"
9369
+ },
9370
+ cell: {
9371
+ ...numericStyles
9372
+ },
9373
+ row: {
9374
+ borderBottom: "sm",
9375
+ borderColor: "outline.disabled",
9376
+ ...numericStyles
9377
+ }
9378
+ },
9379
+ core: {
9380
+ root: {
9381
+ boxShadow: "0 0 0 1px var(--shadow-color)",
9382
+ shadowColor: "outline.disabled",
9383
+ borderRadius: "sm"
9384
+ },
9385
+ table: {
9386
+ overflow: "hidden"
9387
+ },
9388
+ cell: {
9389
+ ...numericStyles,
9390
+ borderRight: "sm",
9391
+ borderColor: "outline.disabled",
9392
+ _last: {
9393
+ borderRight: "none"
9394
+ }
9395
+ },
9396
+ columnHeader: {
9397
+ ...numericStyles,
9398
+ borderRight: "sm",
9399
+ borderColor: "outline.disabled",
9400
+ _first: {
9401
+ borderTopLeftRadius: "sm"
9402
+ },
9403
+ _last: {
9404
+ borderTopRightRadius: "sm",
9405
+ borderRight: "none"
9406
+ }
9407
+ },
9408
+ header: {
9409
+ borderBottom: "sm",
9410
+ borderColor: "outline.disabled"
9411
+ },
9412
+ row: {
9413
+ ...numericStyles,
9414
+ borderBottom: "sm",
9415
+ borderColor: "outline.disabled",
9416
+ _last: {
9417
+ borderBottom: "none"
9418
+ }
9419
+ }
9420
+ }
9421
+ },
9422
+ size: {
9423
+ sm: {
9424
+ table: {
9425
+ fontSize: "mobile.sm"
9426
+ },
9427
+ cell: {
9428
+ paddingX: 1,
9429
+ paddingY: 0.5,
9430
+ fontSize: "mobile.sm"
9431
+ },
9432
+ columnHeader: {
9433
+ paddingX: 1,
9434
+ paddingY: 0.5
9435
+ },
9436
+ caption: {
9437
+ paddingX: 1,
9438
+ paddingY: 0.5
9439
+ }
9440
+ },
9441
+ md: {
9442
+ table: {
9443
+ fontSize: "mobile.md"
9444
+ },
9445
+ cell: {
9446
+ paddingX: 1.5,
9447
+ paddingY: 1,
9448
+ fontSize: "mobile.md"
9449
+ },
9450
+ columnHeader: {
9451
+ paddingX: 1.5,
9452
+ paddingY: 1,
9453
+ fontSize: "mobile.md"
9454
+ },
9455
+ caption: {
9456
+ paddingX: 1.5,
9457
+ paddingY: 1,
9458
+ fontSize: "mobile.md"
9459
+ }
9460
+ },
9461
+ lg: {
9462
+ table: {
9463
+ fontSize: "mobile.md"
9464
+ },
9465
+ cell: {
9466
+ paddingX: 3,
9467
+ paddingY: 3,
9468
+ fontSize: "mobile.md"
9469
+ },
9470
+ columnHeader: {
9471
+ paddingX: 3,
9472
+ paddingY: 2,
9473
+ fontSize: "mobile.md"
9474
+ },
9475
+ caption: {
9476
+ paddingX: 3,
9477
+ paddingY: 2
9478
+ }
9479
+ }
9480
+ }
9481
+ }
9482
+ });
9477
9483
  var tabsSlotRecipe = react.defineSlotRecipe({
9478
9484
  slots: tabsAnatomy.keys(),
9479
9485
  className: "spor-tabs",
@@ -10876,6 +10882,7 @@ exports.RadioCard = RadioCard;
10876
10882
  exports.RadioCardGroup = RadioCardGroup;
10877
10883
  exports.RadioCardLabel = RadioCardLabel;
10878
10884
  exports.RadioGroup = RadioGroup;
10885
+ exports.RangeCalendar = RangeCalendar;
10879
10886
  exports.SearchInput = SearchInput;
10880
10887
  exports.Select = Select;
10881
10888
  exports.SelectContent = SelectContent;