@vygruppen/spor-react 13.3.2 → 13.4.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.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",
@@ -7270,10 +7278,6 @@ var inputRecipe = defineRecipe({
7270
7278
  transitionDuration: "fast",
7271
7279
  color: "text",
7272
7280
  position: "relative",
7273
- paddingX: 3,
7274
- paddingTop: 3,
7275
- height: 8,
7276
- fontSize: "mobile.md",
7277
7281
  _disabled: {
7278
7282
  backgroundColor: "surface.disabled",
7279
7283
  outline: "1px solid",
@@ -7336,10 +7340,25 @@ var inputRecipe = defineRecipe({
7336
7340
  outlineColor: "outline.focus"
7337
7341
  }
7338
7342
  }
7343
+ },
7344
+ size: {
7345
+ sm: {
7346
+ paddingTop: 2,
7347
+ height: 7,
7348
+ fontSize: "xs",
7349
+ paddingX: 2
7350
+ },
7351
+ md: {
7352
+ paddingX: 3,
7353
+ paddingTop: 3,
7354
+ height: 8,
7355
+ fontSize: "mobile.md"
7356
+ }
7339
7357
  }
7340
7358
  },
7341
7359
  defaultVariants: {
7342
- variant: "core"
7360
+ variant: "core",
7361
+ size: "md"
7343
7362
  }
7344
7363
  });
7345
7364
  var linkRecipe = defineRecipe({
@@ -7913,12 +7932,10 @@ var selectAnatomy = createAnatomy("select").parts(
7913
7932
  "root",
7914
7933
  "trigger",
7915
7934
  "indicatorGroup",
7916
- "indicator",
7917
- "selectContent",
7935
+ "content",
7918
7936
  "item",
7919
7937
  "control",
7920
7938
  "itemText",
7921
- "itemDescription",
7922
7939
  "itemGroup",
7923
7940
  "itemGroupLabel",
7924
7941
  "label",
@@ -8546,7 +8563,6 @@ var breadcrumbSlotRecipe = defineSlotRecipe({
8546
8563
  },
8547
8564
  link: {
8548
8565
  cursor: "pointer",
8549
- padding: 0.5,
8550
8566
  borderRadius: "xs"
8551
8567
  },
8552
8568
  currentLink: {
@@ -9585,17 +9601,15 @@ var fieldSlotRecipe = defineSlotRecipe({
9585
9601
  },
9586
9602
  requiredIndicator: {
9587
9603
  marginStart: 1,
9588
- // eslint-disable-next-line spor/use-semantic-tokens
9589
- color: "brightRed"
9604
+ color: "outline.error"
9590
9605
  },
9591
9606
  label: {
9592
9607
  display: "flex"
9593
9608
  },
9594
9609
  helperText: {
9595
- marginTop: 2,
9596
9610
  color: "text.subtle",
9597
9611
  lineHeight: "normal",
9598
- fontSize: "sm"
9612
+ fontSize: ["mobile.sm", "desktop.sm"]
9599
9613
  },
9600
9614
  errorText: {
9601
9615
  borderRadius: "xs",
@@ -9622,6 +9636,41 @@ var fieldSlotRecipe = defineSlotRecipe({
9622
9636
  pointerEvents: "none"
9623
9637
  }
9624
9638
  }
9639
+ },
9640
+ variants: {
9641
+ size: {
9642
+ sm: {
9643
+ label: {
9644
+ fontSize: ["mobile.xs", "desktop.xs"],
9645
+ paddingX: 2,
9646
+ "&[data-float]": {
9647
+ fontSize: ["mobile.2xs", "desktop.2xs"],
9648
+ top: 0
9649
+ },
9650
+ top: "0.5rem"
9651
+ },
9652
+ helperText: {
9653
+ color: "text.subtle",
9654
+ lineHeight: "normal",
9655
+ fontSize: ["mobile.xs", "desktop.xs"]
9656
+ }
9657
+ },
9658
+ md: {
9659
+ label: {
9660
+ paddingX: 3,
9661
+ fontSize: ["mobile.sm", "desktop.sm"],
9662
+ "&[data-float]": {
9663
+ fontSize: ["mobile.2xs", "desktop.2xs"],
9664
+ color: "text.subtle",
9665
+ top: "0.3rem"
9666
+ },
9667
+ top: "0.9rem"
9668
+ }
9669
+ }
9670
+ }
9671
+ },
9672
+ defaultVariants: {
9673
+ size: "md"
9625
9674
  }
9626
9675
  });
9627
9676
  var filterChipSlotRecipe = defineSlotRecipe({
@@ -10756,7 +10805,7 @@ var menuSlotRecipe = defineSlotRecipe({
10756
10805
  variant: "core"
10757
10806
  }
10758
10807
  });
10759
- var _a5, _b4;
10808
+ var _a5, _b4, _c2, _d2, _e, _f;
10760
10809
  var nativeSelectSlotRecipe = defineSlotRecipe({
10761
10810
  slots: NativeSelectAnatomy.keys(),
10762
10811
  className: "spor-nativeSelect",
@@ -10808,7 +10857,22 @@ var nativeSelectSlotRecipe = defineSlotRecipe({
10808
10857
  ...(_b4 = inputRecipe.variants) == null ? void 0 : _b4.variant.floating
10809
10858
  }
10810
10859
  }
10860
+ },
10861
+ size: {
10862
+ sm: {
10863
+ field: {
10864
+ ...(_d2 = (_c2 = inputRecipe.variants) == null ? void 0 : _c2.size) == null ? void 0 : _d2.sm
10865
+ }
10866
+ },
10867
+ md: {
10868
+ field: {
10869
+ ...(_f = (_e = inputRecipe.variants) == null ? void 0 : _e.size) == null ? void 0 : _f.md
10870
+ }
10871
+ }
10811
10872
  }
10873
+ },
10874
+ defaultVariants: {
10875
+ size: "md"
10812
10876
  }
10813
10877
  });
10814
10878
  var numericStepperRecipe = defineSlotRecipe({
@@ -11238,14 +11302,9 @@ var selectSlotRecipe = defineSlotRecipe({
11238
11302
  label: {
11239
11303
  fontSize: ["mobile.sm", "desktop.sm"],
11240
11304
  top: 0,
11241
- left: 3,
11242
11305
  zIndex: 0,
11243
11306
  position: "absolute",
11244
11307
  color: "text",
11245
- marginY: 2,
11246
- _selected: {
11247
- transform: ["scale(0.825) translateY(-10px)"]
11248
- },
11249
11308
  transitionProperty: "transform",
11250
11309
  transitionDuration: "fast",
11251
11310
  transformOrigin: "top left",
@@ -11256,47 +11315,46 @@ var selectSlotRecipe = defineSlotRecipe({
11256
11315
  display: "flex",
11257
11316
  appearance: "none",
11258
11317
  width: "100%",
11259
- height: 8,
11260
11318
  color: "text",
11261
- paddingY: 1.5,
11262
- paddingX: 3,
11263
11319
  justifyContent: "space-between",
11264
11320
  alignItems: "center",
11265
- fontSize: "mobile.md",
11266
11321
  borderRadius: "sm",
11267
11322
  cursor: "pointer",
11268
11323
  _open: {
11269
11324
  "& + div": {
11270
11325
  transform: "rotate(180deg)"
11271
11326
  }
11327
+ },
11328
+ _active: {
11329
+ backgroundColor: "surface"
11272
11330
  }
11273
11331
  },
11274
11332
  indicatorGroup: {
11275
11333
  display: "flex",
11276
11334
  alignItems: "center",
11277
- gap: "1",
11335
+ gap: "0.5",
11278
11336
  position: "absolute",
11279
11337
  right: "0",
11280
11338
  top: "0",
11281
11339
  bottom: "0",
11282
11340
  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
11341
+ pointerEvents: "none",
11342
+ "& [data-part='indicator']": {
11343
+ display: "flex",
11344
+ alignItems: "center",
11345
+ justifyContent: "center",
11346
+ color: {
11347
+ base: "text",
11348
+ _disabled: "text.disabled",
11349
+ _invalid: "text.highlight"
11350
+ },
11351
+ _icon: {
11352
+ width: 3,
11353
+ height: 3
11354
+ }
11297
11355
  }
11298
11356
  },
11299
- selectContent: {
11357
+ content: {
11300
11358
  backgroundColor: "surface",
11301
11359
  boxShadow: "sm",
11302
11360
  overflowY: "auto",
@@ -11349,9 +11407,7 @@ var selectSlotRecipe = defineSlotRecipe({
11349
11407
  }
11350
11408
  },
11351
11409
  _hover: {
11352
- backgroundColor: "surface.accent.hover",
11353
- outline: "2px solid core.outline",
11354
- outlineOffset: "2px"
11410
+ backgroundColor: "surface.accent.hover"
11355
11411
  },
11356
11412
  _selected: {
11357
11413
  backgroundColor: "surface.accent"
@@ -11359,6 +11415,10 @@ var selectSlotRecipe = defineSlotRecipe({
11359
11415
  _icon: {
11360
11416
  width: 3,
11361
11417
  height: 3
11418
+ },
11419
+ "& [data-part='item-description']": {
11420
+ fontSize: ["mobile.xs", "desktop.xs"],
11421
+ color: "text.ghost"
11362
11422
  }
11363
11423
  },
11364
11424
  control: {
@@ -11377,7 +11437,8 @@ var selectSlotRecipe = defineSlotRecipe({
11377
11437
  }
11378
11438
  },
11379
11439
  itemText: {
11380
- flex: "1"
11440
+ flex: "1",
11441
+ alignItems: "center"
11381
11442
  },
11382
11443
  itemGroup: {
11383
11444
  _first: { mt: "0" }
@@ -11385,14 +11446,6 @@ var selectSlotRecipe = defineSlotRecipe({
11385
11446
  itemGroupLabel: {
11386
11447
  py: "1",
11387
11448
  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
11449
  }
11397
11450
  },
11398
11451
  variants: {
@@ -11413,6 +11466,10 @@ var selectSlotRecipe = defineSlotRecipe({
11413
11466
  color: "text.disabled",
11414
11467
  backgroundColor: "surface.disabled"
11415
11468
  }
11469
+ },
11470
+ content: {
11471
+ outline: "2px solid",
11472
+ outlineColor: "outline.core"
11416
11473
  }
11417
11474
  },
11418
11475
  floating: {
@@ -11457,7 +11514,68 @@ var selectSlotRecipe = defineSlotRecipe({
11457
11514
  }
11458
11515
  }
11459
11516
  }
11517
+ },
11518
+ size: {
11519
+ sm: {
11520
+ trigger: {
11521
+ height: 7,
11522
+ paddingY: 1.5,
11523
+ fontSize: "xs",
11524
+ paddingX: 2
11525
+ },
11526
+ label: {
11527
+ fontSize: ["mobile.xs", "desktop.xs"],
11528
+ left: 2,
11529
+ marginY: 1.5,
11530
+ _selected: {
11531
+ transform: ["scale(0.85) translateY(-9px)"],
11532
+ fontSize: "desktop.2xs",
11533
+ color: "text.subtle"
11534
+ }
11535
+ },
11536
+ item: {
11537
+ paddingX: 2,
11538
+ paddingY: 1,
11539
+ fontSize: "xs",
11540
+ "& [data-part='item-description']": {
11541
+ fontSize: ["mobile.2xs", "desktop.2xs"]
11542
+ }
11543
+ },
11544
+ itemGroupLabel: {
11545
+ py: 0.5,
11546
+ fontSize: "xs"
11547
+ },
11548
+ valueText: {
11549
+ paddingTop: 0,
11550
+ "&[data-with-placeholder]": {
11551
+ paddingTop: "1.5"
11552
+ }
11553
+ }
11554
+ },
11555
+ md: {
11556
+ trigger: {
11557
+ height: 8,
11558
+ paddingY: 1.5,
11559
+ paddingX: 3,
11560
+ fontSize: "sm"
11561
+ },
11562
+ label: {
11563
+ left: 3,
11564
+ marginY: 2,
11565
+ _selected: {
11566
+ transform: ["scale(0.825) translateY(-10px)"]
11567
+ }
11568
+ },
11569
+ valueText: {
11570
+ "&[data-with-placeholder]": {
11571
+ paddingTop: "4"
11572
+ }
11573
+ }
11574
+ }
11460
11575
  }
11576
+ },
11577
+ defaultVariants: {
11578
+ size: "md"
11461
11579
  }
11462
11580
  });
11463
11581
  var stepperSlotRecipe = defineSlotRecipe({