@vygruppen/spor-react 13.3.2 → 13.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Accordion as Accordion$1, defineRecipe, chakra, Code as Code$1, Clipboard as Clipboard$1, RadioCard as RadioCard$1, defineStyle, Field, Dialog, createContext as createContext$1, Drawer as Drawer$1, List as List$1, Combobox, Fieldset as Fieldset$1, createListCollection, Select as Select$1, Popover as Popover$1, createToaster, Tabs as Tabs$1, defineSemanticTokens, defineSlotRecipe, defineTokens, defineAnimationStyles, defineGlobalStyles, defineTextStyles, createSystem, defaultBaseConfig, Tooltip as Tooltip$1, IconButton as IconButton$1, defineConfig, Center, Box, ClientOnly, VisuallyHidden, useSlotRecipe, Stack, HStack, Progress, Text, useRecipe, Circle, Skeleton as Skeleton$1, Button as Button$1, Group, Badge as Badge$1, useDisclosure, Alert as Alert$1, Span, Flex, Breadcrumb as Breadcrumb$1, Separator as Separator$1, useFieldContext, PopoverAnchor, Portal, useDialogContext, Link, InputElement, Input as Input$1, useFilter, useListCollection, useCombobox, useComboboxContext, usePopoverContext, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CheckboxCard, Tag, ListItem as ListItem$1, Menu as Menu$1, useMenuContext as useMenuContext$1, NativeSelect as NativeSelect$1, useControllableState, RadioGroup as RadioGroup$1, useSelectContext, Switch as Switch$1, Textarea as Textarea$1, PopoverCloseTrigger, Pagination as Pagination$1, usePaginationContext, ChakraProvider, Table as Table$1, Toaster as Toaster$1, Toast } from '@chakra-ui/react';
2
2
  export { AspectRatio, Box, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, ClientOnly, Collapsible, Container, Em, Flex, For, FormatByte, FormatNumber, Grid, GridItem, HStack, Icon, Image, Kbd, LocaleProvider, Portal, Show, SimpleGrid, Spacer, Span, Stack, TableCaption, TableCell, TableColumn, TableColumnGroup, TableFooter, TableHeader, TableRoot, TableRow, VStack, VisuallyHidden, Wrap, createIcon, createListCollection, createSystem, defineConfig, defineRecipe, defineSlotRecipe, defineStyle, mergeConfigs, chakra as spor, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useRecipe, useSlotRecipe, useToken } from '@chakra-ui/react';
3
3
  import * as spor_icon_react_star from '@vygruppen/spor-icon-react';
4
- import { DropdownDownFill24Icon, CloseFill18Icon, CloseFill30Icon, CloseFill24Icon, DropdownDownFill18Icon, ServiceFill24Icon, WarningFill24Icon, DropdownRightFill18Icon, CalendarOutline24Icon, DropdownLeftFill18Icon, ArrowLeftFill24Icon, ErrorFill24Icon, ChangeDirectionOutline24Icon, CheckmarkFill18Icon, CloseOutline24Icon, SearchOutline24Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowRightFill18Icon, DropdownLeftOutline18Icon, DropdownRightOutline18Icon, ArrowUpFill18Icon, ArrowDownFill18Icon, ChangeDirectionFill18Icon, CopyOutline18Icon, LinkOutOutline24Icon, LinkOutOutline18Icon, WalkFill30Icon, WalkFill24Icon, WalkFill18Icon, AltTransportFill30Icon, AltTransportFill24Icon, AltTransportFill18Icon, TramFill30Icon, TramFill24Icon, TramFill18Icon, SubwayFill30Icon, SubwayFill24Icon, SubwayFill18Icon, FerryFill30Icon, FerryFill24Icon, FerryFill18Icon, BusFill30Icon, BusFill24Icon, BusFill18Icon, ExpressBusFill30Icon, ExpressBusFill24Icon, ExpressBusFill18Icon, TrainFill30Icon, TrainFill24Icon, TrainFill18Icon, InformationFill24Icon, InformationFill18Icon, WarningFill18Icon, ErrorFill18Icon, QuestionFill24Icon, ErrorOutline24Icon, SuccessFill24Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon } from '@vygruppen/spor-icon-react';
4
+ import { DropdownDownFill24Icon, CloseFill18Icon, CloseFill30Icon, CloseFill24Icon, DropdownDownFill18Icon, ServiceFill24Icon, WarningFill24Icon, DropdownRightFill18Icon, CalendarOutline24Icon, DropdownLeftFill18Icon, ArrowLeftFill24Icon, ErrorFill24Icon, ChangeDirectionOutline24Icon, CheckmarkFill18Icon, CloseOutline24Icon, CloseOutline18Icon, SearchOutline24Icon, SearchOutline18Icon, Forward15MediaControllerFill30Icon, Backward15MediaControllerFill30Icon, PauseMediaControllerFill24Icon, PlayMediaControllerFill24Icon, NextMediaControllerFill30Icon, PreviousMediaControllerFill30Icon, ArrowRightFill18Icon, DropdownLeftOutline18Icon, DropdownRightOutline18Icon, ArrowUpFill18Icon, ArrowDownFill18Icon, ChangeDirectionFill18Icon, CopyOutline18Icon, LinkOutOutline24Icon, LinkOutOutline18Icon, WalkFill30Icon, WalkFill24Icon, WalkFill18Icon, AltTransportFill30Icon, AltTransportFill24Icon, AltTransportFill18Icon, TramFill30Icon, TramFill24Icon, TramFill18Icon, SubwayFill30Icon, SubwayFill24Icon, SubwayFill18Icon, FerryFill30Icon, FerryFill24Icon, FerryFill18Icon, BusFill30Icon, BusFill24Icon, BusFill18Icon, ExpressBusFill30Icon, ExpressBusFill24Icon, ExpressBusFill18Icon, TrainFill30Icon, TrainFill24Icon, TrainFill18Icon, InformationFill24Icon, InformationFill18Icon, WarningFill18Icon, ErrorFill18Icon, QuestionFill24Icon, ErrorOutline24Icon, SuccessFill24Icon, ArrowLeftOutline24Icon, ArrowRightOutline24Icon } from '@vygruppen/spor-icon-react';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
6
  import * as React14 from 'react';
7
7
  import React14__default, { createContext, useContext, useId, cloneElement, isValidElement, useRef, useEffect, useImperativeHandle, useState, useLayoutEffect, useMemo } from 'react';
@@ -2015,10 +2015,10 @@ var ColorModeButton = function ColorModeButton2({
2015
2015
  };
2016
2016
  var FloatingLabel = ({
2017
2017
  ref,
2018
+ css,
2018
2019
  ...props
2019
- }) => /* @__PURE__ */ jsx(Field.Label, { ref, ...props, css: floatingLabelStyles });
2020
+ }) => /* @__PURE__ */ jsx(Field.Label, { ref, ...props, css: [floatingLabelStyles, css] });
2020
2021
  var floatingLabelStyles = defineStyle({
2021
- paddingX: 3,
2022
2022
  fontWeight: "normal",
2023
2023
  pointerEvents: "none",
2024
2024
  zIndex: "docked",
@@ -2026,22 +2026,13 @@ var floatingLabelStyles = defineStyle({
2026
2026
  opacity: 0.4
2027
2027
  },
2028
2028
  pos: "absolute",
2029
- transition: "top 160ms ease, font-size 160ms ease",
2030
- top: "0.9rem",
2031
- color: "text",
2032
- fontSize: ["mobile.sm", "desktop.sm"],
2033
- "&[data-float]": {
2034
- fontSize: ["mobile.2xs", "desktop.2xs"],
2035
- color: "text",
2036
- top: "0.3rem"
2037
- }
2029
+ transition: "top 160ms ease, font-size 160ms ease"
2038
2030
  });
2039
- var Label = (props) => /* @__PURE__ */ jsx(Field.Label, { ...props, css: labelStyles });
2031
+ var Label = ({ css, ...props }) => /* @__PURE__ */ jsx(Field.Label, { ...props, css: [labelStyles, css] });
2040
2032
  var labelStyles = defineStyle({
2041
2033
  fontWeight: "normal",
2042
2034
  paddingBottom: 1,
2043
2035
  paddingX: 1,
2044
- fontSize: ["mobile.xs", "desktop.xs"],
2045
2036
  color: "text",
2046
2037
  pointerEvents: "none",
2047
2038
  zIndex: "docked",
@@ -2084,10 +2075,11 @@ var Field3 = ({
2084
2075
  shouldFloat,
2085
2076
  labelAsChild,
2086
2077
  gap,
2078
+ size = "md",
2087
2079
  ...rest
2088
2080
  } = props;
2089
2081
  const recipe = useSlotRecipe({ key: "field" });
2090
- const styles = recipe();
2082
+ const styles = recipe({ size });
2091
2083
  return /* @__PURE__ */ jsxs(Stack, { ref, width: "100%", ...rest, children: [
2092
2084
  /* @__PURE__ */ jsxs(
2093
2085
  Field.Root,
@@ -2101,7 +2093,7 @@ var Field3 = ({
2101
2093
  id,
2102
2094
  gap,
2103
2095
  children: [
2104
- label && !floatingLabel && /* @__PURE__ */ jsx(Label, { asChild: labelAsChild, "aria-hidden": true, children: renderLabelWithIndicator(label, labelAsChild) }),
2096
+ label && !floatingLabel && /* @__PURE__ */ jsx(Label, { asChild: labelAsChild, "aria-hidden": true, css: styles.label, children: renderLabelWithIndicator(label, labelAsChild) }),
2105
2097
  children,
2106
2098
  label && floatingLabel && /* @__PURE__ */ jsx(
2107
2099
  FloatingLabel,
@@ -2109,6 +2101,7 @@ var Field3 = ({
2109
2101
  "data-float": shouldFloat ? true : void 0,
2110
2102
  asChild: labelAsChild,
2111
2103
  "aria-hidden": true,
2104
+ css: styles.label,
2112
2105
  children: renderLabelWithIndicator(label, labelAsChild)
2113
2106
  }
2114
2107
  ),
@@ -2116,7 +2109,7 @@ var Field3 = ({
2116
2109
  ]
2117
2110
  }
2118
2111
  ),
2119
- helperText && /* @__PURE__ */ jsx(Text3, { variant: "sm", color: "text.subtle", children: helperText })
2112
+ helperText && /* @__PURE__ */ jsx(Text, { "data-part": "helperText", css: styles.helperText, children: helperText })
2120
2113
  ] });
2121
2114
  };
2122
2115
  var FieldErrorText = ({
@@ -3494,10 +3487,11 @@ var Input = ({
3494
3487
  hidden,
3495
3488
  fontSize,
3496
3489
  labelAsChild,
3490
+ size = "md",
3497
3491
  ...props
3498
3492
  }) => {
3499
3493
  const recipe = useRecipe({ key: "input" });
3500
- const [recipeProps, restProps] = recipe.splitVariantProps(props);
3494
+ const [recipeProps, restProps] = recipe.splitVariantProps({ size, ...props });
3501
3495
  const styles = recipe(recipeProps);
3502
3496
  const labelId = useId();
3503
3497
  const inputRef = useRef(null);
@@ -3510,6 +3504,17 @@ var Input = ({
3510
3504
  onChange: props.onChange,
3511
3505
  inputRef
3512
3506
  });
3507
+ const fontSizeBySize = {
3508
+ sm: "xs",
3509
+ md: "mobile.md"
3510
+ };
3511
+ const elementPaddingBySize = {
3512
+ sm: "2.3rem",
3513
+ md: "2.6rem"
3514
+ };
3515
+ const elementPadding = elementPaddingBySize[size] ?? "2.6rem";
3516
+ const paddingLeft = elementPadding;
3517
+ const paddingRight = elementPadding;
3513
3518
  return /* @__PURE__ */ jsxs(
3514
3519
  Field3,
3515
3520
  {
@@ -3520,21 +3525,28 @@ var Input = ({
3520
3525
  errorText,
3521
3526
  id: props.id,
3522
3527
  labelAsChild,
3523
- label: /* @__PURE__ */ jsxs(Flex, { id: labelId, children: [
3524
- /* @__PURE__ */ jsx(Box, { visibility: "hidden", children: startElement }),
3525
- label
3526
- ] }),
3528
+ label: /* @__PURE__ */ jsxs(
3529
+ Flex,
3530
+ {
3531
+ id: labelId,
3532
+ paddingX: startElement && size === "sm" ? 1 : void 0,
3533
+ children: [
3534
+ /* @__PURE__ */ jsx(Box, { visibility: "hidden", children: startElement }),
3535
+ label
3536
+ ]
3537
+ }
3538
+ ),
3527
3539
  floatingLabel: true,
3528
3540
  shouldFloat,
3541
+ size,
3529
3542
  children: [
3530
3543
  startElement && /* @__PURE__ */ jsx(
3531
3544
  InputElement,
3532
3545
  {
3533
- pointerEvents: "none",
3534
- paddingX: 2,
3535
3546
  "aria-hidden": "true",
3536
- fontSize: fontSize ?? "mobile.md",
3537
3547
  "aria-labelledby": labelId,
3548
+ paddingX: 2,
3549
+ fontSize: fontSize ?? fontSizeBySize[size],
3538
3550
  children: startElement
3539
3551
  }
3540
3552
  ),
@@ -3545,25 +3557,25 @@ var Input = ({
3545
3557
  ref: inputRef,
3546
3558
  focusVisibleRing: "outside",
3547
3559
  overflow: "hidden",
3548
- paddingLeft: startElement ? "2.6rem" : void 0,
3549
- paddingRight: endElement ? "2.6rem" : void 0,
3550
3560
  ...restProps,
3561
+ css: styles,
3562
+ paddingLeft: startElement ? paddingLeft : void 0,
3563
+ paddingRight: endElement ? paddingRight : void 0,
3551
3564
  className: `peer ${props.className || ""}`,
3552
3565
  value: isControlled ? props.value : void 0,
3553
3566
  onFocus: handleFocus,
3554
3567
  onBlur: handleBlur,
3555
3568
  onChange: handleChange,
3556
3569
  placeholder: "",
3557
- css: styles,
3558
- fontSize: fontSize ?? "mobile.md"
3570
+ fontSize
3559
3571
  }
3560
3572
  ),
3561
3573
  endElement && /* @__PURE__ */ jsx(
3562
3574
  InputElement,
3563
3575
  {
3564
- placement: "end",
3565
3576
  paddingX: 2,
3566
- fontSize: fontSize ?? "mobile.md",
3577
+ placement: "end",
3578
+ fontSize: fontSize ?? fontSizeBySize[size],
3567
3579
  children: endElement
3568
3580
  }
3569
3581
  )
@@ -4049,7 +4061,8 @@ var Combobox2 = (props) => {
4049
4061
  }
4050
4062
  ) : rightIcon,
4051
4063
  placeholder: "",
4052
- "data-attachable": true
4064
+ "data-attachable": true,
4065
+ size: "md"
4053
4066
  }
4054
4067
  ),
4055
4068
  /* @__PURE__ */ jsx("span", { "aria-hidden": "true", "data-trigger": "multiselect" }),
@@ -4697,6 +4710,7 @@ var PasswordInput = ({
4697
4710
  onVisibleChange,
4698
4711
  label,
4699
4712
  startElement,
4713
+ size = "md",
4700
4714
  ...rest
4701
4715
  } = props;
4702
4716
  const [visible, setVisible] = useControllableState({
@@ -4725,9 +4739,11 @@ var PasswordInput = ({
4725
4739
  event.preventDefault();
4726
4740
  setVisible(!visible);
4727
4741
  },
4742
+ size,
4728
4743
  children: visible ? t(texts17.hidePassword) : t(texts17.showPassword)
4729
4744
  }
4730
4745
  ),
4746
+ size,
4731
4747
  ...rest
4732
4748
  }
4733
4749
  );
@@ -4742,7 +4758,6 @@ var VisibilityTrigger = ({
4742
4758
  ref,
4743
4759
  type: "button",
4744
4760
  fontWeight: "normal",
4745
- size: "sm",
4746
4761
  borderRadius: "sm",
4747
4762
  marginRight: 1,
4748
4763
  ...props,
@@ -4804,6 +4819,7 @@ var CountryCodeSelect = ({
4804
4819
  lazyMount: true,
4805
4820
  "aria-label": t(texts18.countryCode),
4806
4821
  sideRadiusVariant: "rightSideSquare",
4822
+ size: props.size,
4807
4823
  role: "combobox",
4808
4824
  children: filteredCallingCodes.items.map((code) => /* @__PURE__ */ jsx(SelectItem, { item: code, children: code.label }, code.label))
4809
4825
  }
@@ -4829,7 +4845,8 @@ var PhoneNumberInput = ({
4829
4845
  optional,
4830
4846
  allowedCountryCodes,
4831
4847
  invalid,
4832
- errorText
4848
+ errorText,
4849
+ size = "md"
4833
4850
  } = props;
4834
4851
  const { t } = useTranslation();
4835
4852
  const label = externalLabel ?? (optional ? t(texts19.phoneNumberOptional) : t(texts19.phoneNumber));
@@ -4860,7 +4877,7 @@ var PhoneNumberInput = ({
4860
4877
  variant,
4861
4878
  allowedCountryCodes,
4862
4879
  "data-state": "on",
4863
- invalid
4880
+ size
4864
4881
  }
4865
4882
  ),
4866
4883
  /* @__PURE__ */ jsx(
@@ -4868,6 +4885,7 @@ var PhoneNumberInput = ({
4868
4885
  {
4869
4886
  ref,
4870
4887
  type: "tel",
4888
+ size,
4871
4889
  ...props,
4872
4890
  value: value.nationalNumber,
4873
4891
  invalid,
@@ -4923,7 +4941,7 @@ var SearchInput = ({
4923
4941
  ...props
4924
4942
  }) => {
4925
4943
  const { t } = useTranslation();
4926
- const { variant = "core", onReset, label, value } = props;
4944
+ const { variant = "core", onReset, label, value, size = "md" } = props;
4927
4945
  const clearButton = onReset && value;
4928
4946
  return /* @__PURE__ */ jsx(
4929
4947
  Input,
@@ -4931,8 +4949,9 @@ var SearchInput = ({
4931
4949
  ref,
4932
4950
  type: "search",
4933
4951
  variant,
4952
+ size,
4934
4953
  ...props,
4935
- startElement: /* @__PURE__ */ jsx(SearchOutline24Icon, { color: "icon" }),
4954
+ startElement: size == "md" ? /* @__PURE__ */ jsx(SearchOutline24Icon, { color: "icon" }) : /* @__PURE__ */ jsx(SearchOutline18Icon, { color: "icon" }),
4936
4955
  endElement: clearButton && /* @__PURE__ */ jsx(
4937
4956
  IconButton,
4938
4957
  {
@@ -4940,7 +4959,7 @@ var SearchInput = ({
4940
4959
  type: "button",
4941
4960
  size: "sm",
4942
4961
  "aria-label": t(texts20.reset),
4943
- icon: /* @__PURE__ */ jsx(CloseOutline24Icon, {}),
4962
+ icon: size == "md" ? /* @__PURE__ */ jsx(CloseOutline24Icon, {}) : /* @__PURE__ */ jsx(CloseOutline18Icon, {}),
4944
4963
  onClick: onReset
4945
4964
  }
4946
4965
  ),
@@ -4968,6 +4987,7 @@ var Select = ({
4968
4987
  }) => {
4969
4988
  const {
4970
4989
  variant = "core",
4990
+ size = "md",
4971
4991
  children,
4972
4992
  positioning,
4973
4993
  label,
@@ -4977,8 +4997,6 @@ var Select = ({
4977
4997
  css,
4978
4998
  ...rest
4979
4999
  } = props;
4980
- const recipe = useSlotRecipe({ key: "select" });
4981
- const styles = recipe({ variant });
4982
5000
  return /* @__PURE__ */ jsx(
4983
5001
  Field3,
4984
5002
  {
@@ -4995,12 +5013,12 @@ var Select = ({
4995
5013
  ref,
4996
5014
  positioning: { sameWidth: true, ...positioning },
4997
5015
  variant,
4998
- css: styles.root,
5016
+ size,
4999
5017
  position: "relative",
5000
5018
  children: [
5001
- /* @__PURE__ */ jsx(SelectTrigger, { "data-attachable": true, children: /* @__PURE__ */ jsx(SelectValueText, { withPlaceholder: !!label }) }),
5002
- label && /* @__PURE__ */ jsx(SelectLabel, { css: styles.label, children: label }),
5003
- /* @__PURE__ */ jsx(SelectContent, { css: styles.selectContent, baseStyle: css, children })
5019
+ /* @__PURE__ */ jsx(SelectTrigger, { "data-attachable": true, size, children: /* @__PURE__ */ jsx(SelectValueText, { withPlaceholder: !!label }) }),
5020
+ label && /* @__PURE__ */ jsx(SelectLabel, { children: label }),
5021
+ /* @__PURE__ */ jsx(SelectContent, { baseStyle: css, children })
5004
5022
  ]
5005
5023
  }
5006
5024
  )
@@ -5022,16 +5040,14 @@ var SelectItem = ({
5022
5040
  ...props
5023
5041
  }) => {
5024
5042
  const { item, children, description, ...rest } = props;
5025
- const recipe = useSlotRecipe({ key: "select" });
5026
- const styles = recipe();
5027
5043
  const selectContext = useSelectContext();
5028
5044
  const multiple = selectContext.multiple;
5029
5045
  const isSelected = selectContext.value.includes(item.value);
5030
- return /* @__PURE__ */ jsxs(Select$1.Item, { item, ...rest, ref, css: styles.item, children: [
5046
+ return /* @__PURE__ */ jsxs(Select$1.Item, { item, ...rest, ref, children: [
5031
5047
  multiple && /* @__PURE__ */ jsx(Checkbox$1.Root, { checked: isSelected, pointerEvents: "none", children: /* @__PURE__ */ jsx(Checkbox$1.Control, { children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {}) }) }),
5032
5048
  /* @__PURE__ */ jsxs(Box, { width: "100%", children: [
5033
5049
  /* @__PURE__ */ jsx(Select$1.ItemText, { display: "flex", children }),
5034
- description && /* @__PURE__ */ jsx(Box, { "data-part": "item-description", css: styles.itemDescription, children: description })
5050
+ description && /* @__PURE__ */ jsx(Box, { "data-part": "item-description", children: description })
5035
5051
  ] }),
5036
5052
  !multiple && /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckmarkFill18Icon, {}) })
5037
5053
  ] });
@@ -5049,24 +5065,16 @@ var SelectItemGroup = function SelectItemGroup2({
5049
5065
  };
5050
5066
  var SelectTrigger = function SelectTrigger2({
5051
5067
  ref,
5068
+ size = "md",
5052
5069
  ...props
5053
5070
  }) {
5054
5071
  const { children, clearable, ...rest } = props;
5055
- const recipe = useSlotRecipe({ key: "select" });
5056
- const styles = recipe();
5057
- return /* @__PURE__ */ jsxs(Select$1.Control, { ...rest, css: styles.control, children: [
5058
- /* @__PURE__ */ jsx(Select$1.Trigger, { ref, css: styles.trigger, children }),
5059
- /* @__PURE__ */ jsxs(
5060
- Select$1.IndicatorGroup,
5061
- {
5062
- css: styles.indicatorGroup,
5063
- "data-part": "indicator-group",
5064
- children: [
5065
- clearable && /* @__PURE__ */ jsx(SelectClearTrigger, {}),
5066
- /* @__PURE__ */ jsx(Box, { css: styles.indicator, "data-part": "indicator", children: /* @__PURE__ */ jsx(DropdownDownFill24Icon, {}) })
5067
- ]
5068
- }
5069
- )
5072
+ return /* @__PURE__ */ jsxs(Select$1.Control, { ...rest, children: [
5073
+ /* @__PURE__ */ jsx(Select$1.Trigger, { ref, children }),
5074
+ /* @__PURE__ */ jsxs(Select$1.IndicatorGroup, { "data-part": "indicator-group", children: [
5075
+ clearable && /* @__PURE__ */ jsx(SelectClearTrigger, {}),
5076
+ /* @__PURE__ */ jsx(Box, { "data-part": "indicator", children: size == "md" ? /* @__PURE__ */ jsx(DropdownDownFill24Icon, {}) : /* @__PURE__ */ jsx(DropdownDownFill18Icon, {}) })
5077
+ ] })
5070
5078
  ] });
5071
5079
  };
5072
5080
  var SelectClearTrigger = function SelectClearTrigger2({
@@ -5103,7 +5111,7 @@ var SelectValueText = function SelectValueText2({
5103
5111
  ...rest,
5104
5112
  ref,
5105
5113
  placeholder,
5106
- paddingTop: withPlaceholder ? "4" : "0",
5114
+ "data-with-placeholder": withPlaceholder || void 0,
5107
5115
  children: /* @__PURE__ */ jsx(Select$1.Context, { children: (select) => {
5108
5116
  const items = select.selectedItems;
5109
5117
  if (items.length === 0)
@@ -5111,7 +5119,7 @@ var SelectValueText = function SelectValueText2({
5111
5119
  if (children)
5112
5120
  return children(items);
5113
5121
  if (multiple) {
5114
- return /* @__PURE__ */ jsx(Flex, { gap: 0.5, marginBottom: 1, children: items.map((item) => /* @__PURE__ */ jsx(
5122
+ return /* @__PURE__ */ jsx(Flex, { gap: 0.5, children: items.map((item) => /* @__PURE__ */ jsx(
5115
5123
  Badge,
5116
5124
  {
5117
5125
  size: "sm",
@@ -5381,7 +5389,7 @@ var LineIcon = function LineIcon2({
5381
5389
  borderColor: variant === "walk" ? "outline.core" : "transparent",
5382
5390
  "aria-label": label,
5383
5391
  ref,
5384
- className: clsx_default("light", rest.className),
5392
+ className: variant === "walk" ? void 0 : clsx_default("light", rest.className),
5385
5393
  children: /* @__PURE__ */ jsx(LinjeTagIcon, { size, css: styles.icon, variant: getIconVariant() })
5386
5394
  }
5387
5395
  );
@@ -5391,6 +5399,8 @@ var InfoTag = ({
5391
5399
  size = "md",
5392
5400
  title,
5393
5401
  description,
5402
+ descriptionProps,
5403
+ titleProps,
5394
5404
  ...customProps
5395
5405
  }) => {
5396
5406
  const recipe = useSlotRecipe({ key: "infoTag" });
@@ -5409,9 +5419,9 @@ var InfoTag = ({
5409
5419
  }
5410
5420
  ),
5411
5421
  /* @__PURE__ */ jsxs(Box, { css: styles.textContainer, children: [
5412
- title && /* @__PURE__ */ jsx(Box, { as: "span", css: styles.title, children: title }),
5422
+ title && /* @__PURE__ */ jsx(Box, { as: "span", css: styles.title, ...titleProps, children: title }),
5413
5423
  title && description && " ",
5414
- description && /* @__PURE__ */ jsx(Box, { as: "span", css: styles.description, children: description })
5424
+ description && /* @__PURE__ */ jsx(Box, { as: "span", css: styles.description, ...descriptionProps, children: description })
5415
5425
  ] })
5416
5426
  ] });
5417
5427
  };
@@ -5443,6 +5453,8 @@ var TravelTag = function TravelTag2({
5443
5453
  foregroundColor,
5444
5454
  backgroundColor,
5445
5455
  customIconVariant,
5456
+ descriptionProps,
5457
+ titleProps,
5446
5458
  ...rest
5447
5459
  }) {
5448
5460
  const recipie = useSlotRecipe({ key: "travelTag" });
@@ -5457,7 +5469,6 @@ var TravelTag = function TravelTag2({
5457
5469
  css: styles.container,
5458
5470
  "aria-disabled": disabled,
5459
5471
  ref,
5460
- className: clsx_default("light", rest.className),
5461
5472
  backgroundColor,
5462
5473
  ...rest,
5463
5474
  children: [
@@ -5475,9 +5486,9 @@ var TravelTag = function TravelTag2({
5475
5486
  }
5476
5487
  ),
5477
5488
  /* @__PURE__ */ jsxs(Box, { css: styles.textContainer, children: [
5478
- title && /* @__PURE__ */ jsx(Box, { as: "span", css: styles.title, children: title }),
5489
+ title && /* @__PURE__ */ jsx(Box, { as: "span", css: styles.title, ...titleProps, children: title }),
5479
5490
  title && description && " ",
5480
- description && /* @__PURE__ */ jsx(Box, { as: "span", css: styles.description, children: description })
5491
+ description && /* @__PURE__ */ jsx(Box, { as: "span", css: styles.description, ...descriptionProps, children: description })
5481
5492
  ] }),
5482
5493
  renderDeviationLevelIcon(deviationLevel, size, styles.deviationIcon)
5483
5494
  ]
@@ -7270,10 +7281,6 @@ var inputRecipe = defineRecipe({
7270
7281
  transitionDuration: "fast",
7271
7282
  color: "text",
7272
7283
  position: "relative",
7273
- paddingX: 3,
7274
- paddingTop: 3,
7275
- height: 8,
7276
- fontSize: "mobile.md",
7277
7284
  _disabled: {
7278
7285
  backgroundColor: "surface.disabled",
7279
7286
  outline: "1px solid",
@@ -7336,10 +7343,25 @@ var inputRecipe = defineRecipe({
7336
7343
  outlineColor: "outline.focus"
7337
7344
  }
7338
7345
  }
7346
+ },
7347
+ size: {
7348
+ sm: {
7349
+ paddingTop: 2,
7350
+ height: 7,
7351
+ fontSize: "xs",
7352
+ paddingX: 2
7353
+ },
7354
+ md: {
7355
+ paddingX: 3,
7356
+ paddingTop: 3,
7357
+ height: 8,
7358
+ fontSize: "mobile.md"
7359
+ }
7339
7360
  }
7340
7361
  },
7341
7362
  defaultVariants: {
7342
- variant: "core"
7363
+ variant: "core",
7364
+ size: "md"
7343
7365
  }
7344
7366
  });
7345
7367
  var linkRecipe = defineRecipe({
@@ -7913,12 +7935,10 @@ var selectAnatomy = createAnatomy("select").parts(
7913
7935
  "root",
7914
7936
  "trigger",
7915
7937
  "indicatorGroup",
7916
- "indicator",
7917
- "selectContent",
7938
+ "content",
7918
7939
  "item",
7919
7940
  "control",
7920
7941
  "itemText",
7921
- "itemDescription",
7922
7942
  "itemGroup",
7923
7943
  "itemGroupLabel",
7924
7944
  "label",
@@ -8546,7 +8566,6 @@ var breadcrumbSlotRecipe = defineSlotRecipe({
8546
8566
  },
8547
8567
  link: {
8548
8568
  cursor: "pointer",
8549
- padding: 0.5,
8550
8569
  borderRadius: "xs"
8551
8570
  },
8552
8571
  currentLink: {
@@ -9585,17 +9604,15 @@ var fieldSlotRecipe = defineSlotRecipe({
9585
9604
  },
9586
9605
  requiredIndicator: {
9587
9606
  marginStart: 1,
9588
- // eslint-disable-next-line spor/use-semantic-tokens
9589
- color: "brightRed"
9607
+ color: "outline.error"
9590
9608
  },
9591
9609
  label: {
9592
9610
  display: "flex"
9593
9611
  },
9594
9612
  helperText: {
9595
- marginTop: 2,
9596
9613
  color: "text.subtle",
9597
9614
  lineHeight: "normal",
9598
- fontSize: "sm"
9615
+ fontSize: ["mobile.sm", "desktop.sm"]
9599
9616
  },
9600
9617
  errorText: {
9601
9618
  borderRadius: "xs",
@@ -9622,6 +9639,41 @@ var fieldSlotRecipe = defineSlotRecipe({
9622
9639
  pointerEvents: "none"
9623
9640
  }
9624
9641
  }
9642
+ },
9643
+ variants: {
9644
+ size: {
9645
+ sm: {
9646
+ label: {
9647
+ fontSize: ["mobile.xs", "desktop.xs"],
9648
+ paddingX: 2,
9649
+ "&[data-float]": {
9650
+ fontSize: ["mobile.2xs", "desktop.2xs"],
9651
+ top: 0
9652
+ },
9653
+ top: "0.5rem"
9654
+ },
9655
+ helperText: {
9656
+ color: "text.subtle",
9657
+ lineHeight: "normal",
9658
+ fontSize: ["mobile.xs", "desktop.xs"]
9659
+ }
9660
+ },
9661
+ md: {
9662
+ label: {
9663
+ paddingX: 3,
9664
+ fontSize: ["mobile.sm", "desktop.sm"],
9665
+ "&[data-float]": {
9666
+ fontSize: ["mobile.2xs", "desktop.2xs"],
9667
+ color: "text.subtle",
9668
+ top: "0.3rem"
9669
+ },
9670
+ top: "0.9rem"
9671
+ }
9672
+ }
9673
+ }
9674
+ },
9675
+ defaultVariants: {
9676
+ size: "md"
9625
9677
  }
9626
9678
  });
9627
9679
  var filterChipSlotRecipe = defineSlotRecipe({
@@ -9940,9 +9992,7 @@ var travelTagSlotRecipe = defineSlotRecipe({
9940
9992
  display: "flex",
9941
9993
  alignItems: "center",
9942
9994
  padding: 0.5,
9943
- _disabled: {
9944
- background: "surface.disabled"
9945
- },
9995
+ backgroundColor: "surface.disabled",
9946
9996
  width: "fit-content",
9947
9997
  transitionDuration: "fast",
9948
9998
  transitionProperty: "common",
@@ -10006,62 +10056,21 @@ var travelTagSlotRecipe = defineSlotRecipe({
10006
10056
  none: {}
10007
10057
  },
10008
10058
  variant: {
10009
- "local-train": {
10010
- container: {
10011
- backgroundColor: "linjetag.lokaltogLight"
10012
- }
10013
- },
10014
- "region-train": {
10015
- container: {
10016
- backgroundColor: "linjetag.regiontogLight"
10017
- }
10018
- },
10019
- "region-express-train": {
10020
- container: {
10021
- backgroundColor: "linjetag.regionEkspressLight"
10022
- }
10023
- },
10024
- "long-distance-train": {
10025
- container: {
10026
- backgroundColor: "linjetag.fjerntogLight"
10027
- }
10028
- },
10029
- "airport-express-train": {
10030
- container: {
10031
- backgroundColor: "linjetag.flytogLight"
10032
- }
10033
- },
10034
- "vy-bus": {
10035
- container: {
10036
- backgroundColor: "linjetag.vyBussLight"
10037
- }
10038
- },
10039
- "local-bus": {
10040
- container: {
10041
- backgroundColor: "linjetag.lokalbussLight"
10042
- }
10043
- },
10044
- ferry: {
10045
- container: {
10046
- backgroundColor: "linjetag.fergeLight"
10047
- }
10048
- },
10049
- subway: {
10050
- container: {
10051
- backgroundColor: "linjetag.tbaneLight"
10052
- }
10053
- },
10054
- tram: {
10055
- container: {
10056
- backgroundColor: "linjetag.trikkLight"
10057
- }
10058
- },
10059
- "alt-transport": {
10060
- container: {
10061
- backgroundColor: "linjetag.altTransportLight"
10062
- }
10063
- },
10059
+ "local-train": {},
10060
+ "region-train": {},
10061
+ "region-express-train": {},
10062
+ "long-distance-train": {},
10063
+ "airport-express-train": {},
10064
+ "vy-bus": {},
10065
+ "local-bus": {},
10066
+ ferry: {},
10067
+ subway: {},
10068
+ tram: {},
10069
+ "alt-transport": {},
10064
10070
  walk: {
10071
+ container: {
10072
+ backgroundColor: "none"
10073
+ },
10065
10074
  textContainer: {
10066
10075
  position: "absolute",
10067
10076
  left: "0.875rem",
@@ -10756,7 +10765,7 @@ var menuSlotRecipe = defineSlotRecipe({
10756
10765
  variant: "core"
10757
10766
  }
10758
10767
  });
10759
- var _a5, _b4;
10768
+ var _a5, _b4, _c2, _d2, _e, _f;
10760
10769
  var nativeSelectSlotRecipe = defineSlotRecipe({
10761
10770
  slots: NativeSelectAnatomy.keys(),
10762
10771
  className: "spor-nativeSelect",
@@ -10808,7 +10817,22 @@ var nativeSelectSlotRecipe = defineSlotRecipe({
10808
10817
  ...(_b4 = inputRecipe.variants) == null ? void 0 : _b4.variant.floating
10809
10818
  }
10810
10819
  }
10820
+ },
10821
+ size: {
10822
+ sm: {
10823
+ field: {
10824
+ ...(_d2 = (_c2 = inputRecipe.variants) == null ? void 0 : _c2.size) == null ? void 0 : _d2.sm
10825
+ }
10826
+ },
10827
+ md: {
10828
+ field: {
10829
+ ...(_f = (_e = inputRecipe.variants) == null ? void 0 : _e.size) == null ? void 0 : _f.md
10830
+ }
10831
+ }
10811
10832
  }
10833
+ },
10834
+ defaultVariants: {
10835
+ size: "md"
10812
10836
  }
10813
10837
  });
10814
10838
  var numericStepperRecipe = defineSlotRecipe({
@@ -11238,14 +11262,9 @@ var selectSlotRecipe = defineSlotRecipe({
11238
11262
  label: {
11239
11263
  fontSize: ["mobile.sm", "desktop.sm"],
11240
11264
  top: 0,
11241
- left: 3,
11242
11265
  zIndex: 0,
11243
11266
  position: "absolute",
11244
11267
  color: "text",
11245
- marginY: 2,
11246
- _selected: {
11247
- transform: ["scale(0.825) translateY(-10px)"]
11248
- },
11249
11268
  transitionProperty: "transform",
11250
11269
  transitionDuration: "fast",
11251
11270
  transformOrigin: "top left",
@@ -11256,47 +11275,46 @@ var selectSlotRecipe = defineSlotRecipe({
11256
11275
  display: "flex",
11257
11276
  appearance: "none",
11258
11277
  width: "100%",
11259
- height: 8,
11260
11278
  color: "text",
11261
- paddingY: 1.5,
11262
- paddingX: 3,
11263
11279
  justifyContent: "space-between",
11264
11280
  alignItems: "center",
11265
- fontSize: "mobile.md",
11266
11281
  borderRadius: "sm",
11267
11282
  cursor: "pointer",
11268
11283
  _open: {
11269
11284
  "& + div": {
11270
11285
  transform: "rotate(180deg)"
11271
11286
  }
11287
+ },
11288
+ _active: {
11289
+ backgroundColor: "surface"
11272
11290
  }
11273
11291
  },
11274
11292
  indicatorGroup: {
11275
11293
  display: "flex",
11276
11294
  alignItems: "center",
11277
- gap: "1",
11295
+ gap: "0.5",
11278
11296
  position: "absolute",
11279
11297
  right: "0",
11280
11298
  top: "0",
11281
11299
  bottom: "0",
11282
11300
  paddingX: 2,
11283
- pointerEvents: "none"
11284
- },
11285
- indicator: {
11286
- display: "flex",
11287
- alignItems: "center",
11288
- justifyContent: "center",
11289
- color: {
11290
- base: "text",
11291
- _disabled: "text.disabled",
11292
- _invalid: "text.highlight"
11293
- },
11294
- _icon: {
11295
- width: 3,
11296
- height: 3
11301
+ pointerEvents: "none",
11302
+ "& [data-part='indicator']": {
11303
+ display: "flex",
11304
+ alignItems: "center",
11305
+ justifyContent: "center",
11306
+ color: {
11307
+ base: "text",
11308
+ _disabled: "text.disabled",
11309
+ _invalid: "text.highlight"
11310
+ },
11311
+ _icon: {
11312
+ width: 3,
11313
+ height: 3
11314
+ }
11297
11315
  }
11298
11316
  },
11299
- selectContent: {
11317
+ content: {
11300
11318
  backgroundColor: "surface",
11301
11319
  boxShadow: "sm",
11302
11320
  overflowY: "auto",
@@ -11349,9 +11367,7 @@ var selectSlotRecipe = defineSlotRecipe({
11349
11367
  }
11350
11368
  },
11351
11369
  _hover: {
11352
- backgroundColor: "surface.accent.hover",
11353
- outline: "2px solid core.outline",
11354
- outlineOffset: "2px"
11370
+ backgroundColor: "surface.accent.hover"
11355
11371
  },
11356
11372
  _selected: {
11357
11373
  backgroundColor: "surface.accent"
@@ -11359,6 +11375,10 @@ var selectSlotRecipe = defineSlotRecipe({
11359
11375
  _icon: {
11360
11376
  width: 3,
11361
11377
  height: 3
11378
+ },
11379
+ "& [data-part='item-description']": {
11380
+ fontSize: ["mobile.xs", "desktop.xs"],
11381
+ color: "text.ghost"
11362
11382
  }
11363
11383
  },
11364
11384
  control: {
@@ -11377,7 +11397,8 @@ var selectSlotRecipe = defineSlotRecipe({
11377
11397
  }
11378
11398
  },
11379
11399
  itemText: {
11380
- flex: "1"
11400
+ flex: "1",
11401
+ alignItems: "center"
11381
11402
  },
11382
11403
  itemGroup: {
11383
11404
  _first: { mt: "0" }
@@ -11385,14 +11406,6 @@ var selectSlotRecipe = defineSlotRecipe({
11385
11406
  itemGroupLabel: {
11386
11407
  py: "1",
11387
11408
  fontWeight: "medium"
11388
- },
11389
- valueText: {},
11390
- itemDescription: {
11391
- fontSize: ["mobile.xs", "desktop.xs"],
11392
- color: "text.ghost",
11393
- "[aria-selected='true'] &": {
11394
- color: "text.ghost"
11395
- }
11396
11409
  }
11397
11410
  },
11398
11411
  variants: {
@@ -11413,6 +11426,10 @@ var selectSlotRecipe = defineSlotRecipe({
11413
11426
  color: "text.disabled",
11414
11427
  backgroundColor: "surface.disabled"
11415
11428
  }
11429
+ },
11430
+ content: {
11431
+ outline: "2px solid",
11432
+ outlineColor: "outline.core"
11416
11433
  }
11417
11434
  },
11418
11435
  floating: {
@@ -11457,7 +11474,68 @@ var selectSlotRecipe = defineSlotRecipe({
11457
11474
  }
11458
11475
  }
11459
11476
  }
11477
+ },
11478
+ size: {
11479
+ sm: {
11480
+ trigger: {
11481
+ height: 7,
11482
+ paddingY: 1.5,
11483
+ fontSize: "xs",
11484
+ paddingX: 2
11485
+ },
11486
+ label: {
11487
+ fontSize: ["mobile.xs", "desktop.xs"],
11488
+ left: 2,
11489
+ marginY: 1.5,
11490
+ _selected: {
11491
+ transform: ["scale(0.85) translateY(-9px)"],
11492
+ fontSize: "desktop.2xs",
11493
+ color: "text.subtle"
11494
+ }
11495
+ },
11496
+ item: {
11497
+ paddingX: 2,
11498
+ paddingY: 1,
11499
+ fontSize: "xs",
11500
+ "& [data-part='item-description']": {
11501
+ fontSize: ["mobile.2xs", "desktop.2xs"]
11502
+ }
11503
+ },
11504
+ itemGroupLabel: {
11505
+ py: 0.5,
11506
+ fontSize: "xs"
11507
+ },
11508
+ valueText: {
11509
+ paddingTop: 0,
11510
+ "&[data-with-placeholder]": {
11511
+ paddingTop: "1.5"
11512
+ }
11513
+ }
11514
+ },
11515
+ md: {
11516
+ trigger: {
11517
+ height: 8,
11518
+ paddingY: 1.5,
11519
+ paddingX: 3,
11520
+ fontSize: "sm"
11521
+ },
11522
+ label: {
11523
+ left: 3,
11524
+ marginY: 2,
11525
+ _selected: {
11526
+ transform: ["scale(0.825) translateY(-10px)"]
11527
+ }
11528
+ },
11529
+ valueText: {
11530
+ "&[data-with-placeholder]": {
11531
+ paddingTop: "4"
11532
+ }
11533
+ }
11534
+ }
11460
11535
  }
11536
+ },
11537
+ defaultVariants: {
11538
+ size: "md"
11461
11539
  }
11462
11540
  });
11463
11541
  var stepperSlotRecipe = defineSlotRecipe({