@vygruppen/spor-react 10.2.0 → 10.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@10.2.0 build
2
+ > @vygruppen/spor-react@10.4.0 build
3
3
  > tsup src/index.tsx --dts --treeshake --format cjs,esm
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -9,12 +9,12 @@
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  DTS Build start
12
+ CJS dist/index.js 531.29 KB
13
+ CJS ⚡️ Build success in 2167ms
12
14
  ESM dist/index.mjs 2.15 KB
13
- ESM dist/CountryCodeSelect-UFSVRLDY.mjs 1.19 KB
14
- ESM dist/chunk-BPDFFQ3U.mjs 416.17 KB
15
- ESM ⚡️ Build success in 2287ms
16
- CJS dist/index.js 527.91 KB
17
- CJS ⚡️ Build success in 2288ms
18
- DTS ⚡️ Build success in 15575ms
19
- DTS dist/index.d.ts 315.68 KB
20
- DTS dist/index.d.mts 315.68 KB
15
+ ESM dist/chunk-T4CLCBB5.mjs 419.22 KB
16
+ ESM dist/CountryCodeSelect-XMQTDWRD.mjs 1.22 KB
17
+ ESM ⚡️ Build success in 2167ms
18
+ DTS ⚡️ Build success in 15490ms
19
+ DTS dist/index.d.ts 335.33 KB
20
+ DTS dist/index.d.mts 335.33 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 10.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5c24b42: Add variants to all form components
8
+
9
+ Components: Input, Textarea, PasswordInput, PhoneNumberInput, Textarea, NativeSelect, InfoSelect, Combobox
10
+
11
+ ### Patch Changes
12
+
13
+ - 80669c3: Switch: Update accessibility
14
+
15
+ ## 10.3.0
16
+
17
+ ### Minor Changes
18
+
19
+ - d3cd54d: Added input field ariaLabelContext to NummericStepper to improve functionality with screen readers.
20
+
3
21
  ## 10.2.0
4
22
 
5
23
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- import { createTexts, useTranslation, InfoSelect, Item } from './chunk-BPDFFQ3U.mjs';
1
+ import { createTexts, useTranslation, InfoSelect, Item } from './chunk-T4CLCBB5.mjs';
2
2
  import React from 'react';
3
3
  import { getSupportedCallingCodes } from 'awesome-phonenumber';
4
4
 
@@ -22,6 +22,7 @@ var CountryCodeSelect = (props) => {
22
22
  label: t(texts.countryCode),
23
23
  isLabelSrOnly: true,
24
24
  items: callingCodes,
25
+ variant: props.variant,
25
26
  ...props
26
27
  },
27
28
  (item) => /* @__PURE__ */ React.createElement(Item, { key: item.key }, item.key)
@@ -1052,6 +1052,7 @@ function Combobox({
1052
1052
  emptyContent,
1053
1053
  inputRef: externalInputRef,
1054
1054
  allowsEmptyCollection,
1055
+ variant,
1055
1056
  ...rest
1056
1057
  }) {
1057
1058
  const { contains: contains2 } = useFilter({ sensitivity: "base" });
@@ -1105,6 +1106,7 @@ function Combobox({
1105
1106
  ref: inputRef,
1106
1107
  role: "combobox",
1107
1108
  label,
1109
+ variant,
1108
1110
  "aria-expanded": state2.isOpen,
1109
1111
  "aria-autocomplete": "list",
1110
1112
  "aria-controls": listboxId,
@@ -1146,7 +1148,8 @@ function Combobox({
1146
1148
  id: listboxId,
1147
1149
  listBoxRef,
1148
1150
  emptyContent,
1149
- maxWidth: inputWidth
1151
+ maxWidth: inputWidth,
1152
+ variant
1150
1153
  },
1151
1154
  rest.children
1152
1155
  )
@@ -1249,10 +1252,11 @@ function ListBox({
1249
1252
  listBoxRef,
1250
1253
  state: state2,
1251
1254
  maxWidth,
1255
+ variant,
1252
1256
  ...props
1253
1257
  }) {
1254
1258
  const { listBoxProps } = useListBox(props, state2, listBoxRef);
1255
- const styles3 = useMultiStyleConfig("ListBox", {});
1259
+ const styles3 = useMultiStyleConfig("ListBox", { variant });
1256
1260
  return /* @__PURE__ */ React84__default.createElement(
1257
1261
  List,
1258
1262
  {
@@ -1260,7 +1264,8 @@ function ListBox({
1260
1264
  ref: listBoxRef,
1261
1265
  sx: styles3.container,
1262
1266
  "aria-busy": isLoading,
1263
- maxWidth
1267
+ maxWidth,
1268
+ variant
1264
1269
  },
1265
1270
  state2.collection.size === 0 && props.emptyContent,
1266
1271
  Array.from(state2.collection).map(
@@ -1372,16 +1377,17 @@ function InfoSelect({
1372
1377
  triggerRef
1373
1378
  );
1374
1379
  const stateStyle = "completed";
1380
+ const hasChosenValue = state2.selectedItem !== null;
1375
1381
  const styles3 = useMultiStyleConfig("InfoSelect", {
1376
1382
  isOpen: state2.isOpen,
1377
1383
  isLabelSrOnly,
1378
1384
  variant,
1379
- stateStyle
1385
+ stateStyle,
1386
+ hasChosenValue
1380
1387
  });
1381
1388
  const { buttonProps } = useButton(triggerProps, triggerRef);
1382
1389
  const { t: t2 } = useTranslation();
1383
1390
  const formControl = useFormControlProps(props);
1384
- const hasChosenValue = state2.selectedItem !== null;
1385
1391
  return /* @__PURE__ */ React84__default.createElement(Box, { sx: styles3.container }, /* @__PURE__ */ React84__default.createElement(
1386
1392
  HiddenSelect,
1387
1393
  {
@@ -1421,7 +1427,7 @@ function InfoSelect({
1421
1427
  ...valueProps,
1422
1428
  h: isLabelSrOnly ? "" : !hasChosenValue ? "0px" : "18px",
1423
1429
  hidden: !hasChosenValue,
1424
- transform: isLabelSrOnly ? "" : "scale(1) translateY(-10px)",
1430
+ transform: isLabelSrOnly ? "" : "scale(1) translateY(-12px)",
1425
1431
  transitionProperty: "var(--spor-transition-property-common)",
1426
1432
  transitionDuration: "var(--spor-transition-duration-normal)"
1427
1433
  },
@@ -1441,7 +1447,8 @@ function InfoSelect({
1441
1447
  ...menuProps,
1442
1448
  state: state2,
1443
1449
  listBoxRef: listboxRef,
1444
- borderBottomRadius: "sm"
1450
+ borderBottomRadius: "sm",
1451
+ variant
1445
1452
  },
1446
1453
  props.children
1447
1454
  )
@@ -1508,8 +1515,10 @@ function NumericStepper({
1508
1515
  withInput = true,
1509
1516
  stepSize = 1,
1510
1517
  showZero = false,
1518
+ ariaLabelContext = { singular: "", plural: "" },
1511
1519
  ...boxProps
1512
1520
  }) {
1521
+ const addButtonRef = useRef(null);
1513
1522
  const { t: t2 } = useTranslation();
1514
1523
  const styles3 = useMultiStyleConfig("NumericStepper", {});
1515
1524
  const [value, onChange] = useControllableState({
@@ -1519,12 +1528,26 @@ function NumericStepper({
1519
1528
  });
1520
1529
  const formControlProps = useFormControl({ id: idProp, isDisabled });
1521
1530
  const clampedStepSize = Math.max(Math.min(stepSize, 10), 1);
1531
+ const focusOnAddButton = () => {
1532
+ var _a6;
1533
+ (_a6 = addButtonRef.current) == null ? void 0 : _a6.focus();
1534
+ };
1522
1535
  return /* @__PURE__ */ React84__default.createElement(Flex, { __css: styles3.container, ...boxProps }, /* @__PURE__ */ React84__default.createElement(
1523
1536
  VerySmallButton,
1524
1537
  {
1525
1538
  icon: /* @__PURE__ */ React84__default.createElement(SubtractIcon, { stepLabel: clampedStepSize }),
1526
- "aria-label": t2(texts2.decrementButtonAriaLabel(clampedStepSize)),
1527
- onClick: () => onChange(Math.max(value - clampedStepSize, minValue)),
1539
+ "aria-label": t2(
1540
+ texts2.decrementButtonAriaLabel(
1541
+ clampedStepSize,
1542
+ stepSize == 1 ? ariaLabelContext.singular : ariaLabelContext.plural
1543
+ )
1544
+ ),
1545
+ onClick: () => {
1546
+ onChange(Math.max(value - clampedStepSize, minValue));
1547
+ if (Math.max(value - clampedStepSize, minValue) <= minValue) {
1548
+ focusOnAddButton();
1549
+ }
1550
+ },
1528
1551
  visibility: value <= minValue ? "hidden" : "visible",
1529
1552
  isDisabled: formControlProps.disabled,
1530
1553
  id: value <= minValue ? void 0 : formControlProps.id
@@ -1543,13 +1566,16 @@ function NumericStepper({
1543
1566
  width: `${Math.max(value.toString().length + 1, 3)}ch`,
1544
1567
  visibility: !showZero && value === 0 ? "hidden" : "visible",
1545
1568
  "aria-live": "assertive",
1546
- "aria-label": value.toString(),
1569
+ "aria-label": ariaLabelContext.plural !== "" ? t2(texts2.currentNumberAriaLabel(ariaLabelContext.plural)) : "",
1547
1570
  onChange: (e) => {
1548
1571
  const numericInput = Number(e.target.value);
1549
1572
  if (Number.isNaN(numericInput)) {
1550
1573
  return;
1551
1574
  }
1552
1575
  onChange(Math.max(Math.min(numericInput, maxValue), minValue));
1576
+ if (!showZero && Math.max(Math.min(numericInput, maxValue), minValue) === 0) {
1577
+ focusOnAddButton();
1578
+ }
1553
1579
  }
1554
1580
  }
1555
1581
  ) : /* @__PURE__ */ React84__default.createElement(
@@ -1557,14 +1583,21 @@ function NumericStepper({
1557
1583
  {
1558
1584
  sx: styles3.text,
1559
1585
  visibility: !showZero && value === 0 ? "hidden" : "visible",
1560
- "aria-label": value.toString()
1586
+ "aria-live": "assertive",
1587
+ "aria-label": ariaLabelContext.plural !== "" ? t2(texts2.currentNumberAriaLabel(ariaLabelContext.plural)) : ""
1561
1588
  },
1562
1589
  value
1563
1590
  ), /* @__PURE__ */ React84__default.createElement(
1564
1591
  VerySmallButton,
1565
1592
  {
1593
+ ref: addButtonRef,
1566
1594
  icon: /* @__PURE__ */ React84__default.createElement(AddIcon, { stepLabel: clampedStepSize }),
1567
- "aria-label": t2(texts2.incrementButtonAriaLabel(clampedStepSize)),
1595
+ "aria-label": t2(
1596
+ texts2.incrementButtonAriaLabel(
1597
+ clampedStepSize,
1598
+ stepSize == 1 ? ariaLabelContext.singular : ariaLabelContext.plural
1599
+ )
1600
+ ),
1568
1601
  onClick: () => onChange(Math.min(value + clampedStepSize, maxValue)),
1569
1602
  visibility: value >= maxValue ? "hidden" : "visible",
1570
1603
  isDisabled: formControlProps.disabled,
@@ -1572,10 +1605,19 @@ function NumericStepper({
1572
1605
  }
1573
1606
  ));
1574
1607
  }
1575
- var VerySmallButton = (props) => {
1608
+ var VerySmallButton = React84__default.forwardRef((props, ref) => {
1576
1609
  const styles3 = useMultiStyleConfig("NumericStepper", {});
1577
- return /* @__PURE__ */ React84__default.createElement(IconButton, { variant: "primary", size: "xs", sx: styles3.button, ...props });
1578
- };
1610
+ return /* @__PURE__ */ React84__default.createElement(
1611
+ IconButton,
1612
+ {
1613
+ variant: "primary",
1614
+ size: "xs",
1615
+ sx: styles3.button,
1616
+ ref,
1617
+ ...props
1618
+ }
1619
+ );
1620
+ });
1579
1621
  var SubtractIcon = ({ stepLabel, ...props }) => /* @__PURE__ */ React84__default.createElement(React84__default.Fragment, null, /* @__PURE__ */ React84__default.createElement(
1580
1622
  Box,
1581
1623
  {
@@ -1632,20 +1674,28 @@ var AddIcon = ({ stepLabel, ...props }) => /* @__PURE__ */ React84__default.crea
1632
1674
  )
1633
1675
  ), stepLabel > 1 && /* @__PURE__ */ React84__default.createElement(chakra.span, { paddingRight: "1" }, stepLabel.toString()));
1634
1676
  var texts2 = createTexts({
1635
- decrementButtonAriaLabel(stepSize) {
1677
+ currentNumberAriaLabel(ariaContext) {
1636
1678
  return {
1637
- nb: `Trekk fra ${stepSize}`,
1638
- en: `Subtract ${stepSize}`,
1639
- nn: `Trekk fr\xE5 ${stepSize}`,
1640
- sv: `Subtrahera ${stepSize}`
1679
+ nb: `Valgt antall ${ariaContext}`,
1680
+ en: `Chosen number of ${ariaContext}`,
1681
+ nn: `Valgt antall ${ariaContext}`,
1682
+ sv: `Valgt antall ${ariaContext}`
1641
1683
  };
1642
1684
  },
1643
- incrementButtonAriaLabel(stepSize) {
1685
+ decrementButtonAriaLabel(stepSize, ariaContext) {
1644
1686
  return {
1645
- nb: `Legg til ${stepSize}`,
1646
- en: `Add ${stepSize}`,
1647
- nn: `Legg til ${stepSize}`,
1648
- sv: `L\xE4gg till ${stepSize}`
1687
+ nb: `Trekk fra ${stepSize} ${ariaContext}`,
1688
+ en: `Subtract ${stepSize} ${ariaContext}`,
1689
+ nn: `Trekk fr\xE5 ${stepSize} ${ariaContext}`,
1690
+ sv: `Subtrahera ${stepSize} ${ariaContext}`
1691
+ };
1692
+ },
1693
+ incrementButtonAriaLabel(stepSize, ariaContext) {
1694
+ return {
1695
+ nb: `Legg til ${stepSize} ${ariaContext}`,
1696
+ en: `Add ${stepSize} ${ariaContext}`,
1697
+ nn: `Legg til ${stepSize} ${ariaContext}`,
1698
+ sv: `L\xE4gg till ${stepSize} ${ariaContext}`
1649
1699
  };
1650
1700
  }
1651
1701
  });
@@ -1704,6 +1754,7 @@ var PhoneNumberInput = forwardRef(
1704
1754
  name,
1705
1755
  value: externalValue,
1706
1756
  onChange: externalOnChange,
1757
+ variant,
1707
1758
  ...boxProps
1708
1759
  }, ref) => {
1709
1760
  const { t: t2 } = useTranslation();
@@ -1726,7 +1777,8 @@ var PhoneNumberInput = forwardRef(
1726
1777
  label: t2(texts4.countryCodeLabel),
1727
1778
  width: "6.25rem",
1728
1779
  height: "100%",
1729
- value: "+47"
1780
+ value: "+47",
1781
+ variant
1730
1782
  },
1731
1783
  /* @__PURE__ */ React84__default.createElement(Item, { key: "+47" }, "+47")
1732
1784
  )
@@ -1741,7 +1793,8 @@ var PhoneNumberInput = forwardRef(
1741
1793
  }),
1742
1794
  name: name ? `${name}-country-code` : "country-code",
1743
1795
  height: "100%",
1744
- width: "6.25rem"
1796
+ width: "6.25rem",
1797
+ variant
1745
1798
  }
1746
1799
  )
1747
1800
  ), /* @__PURE__ */ React84__default.createElement(
@@ -1760,7 +1813,8 @@ var PhoneNumberInput = forwardRef(
1760
1813
  });
1761
1814
  },
1762
1815
  position: "relative",
1763
- left: "1px"
1816
+ left: "1px",
1817
+ variant
1764
1818
  }
1765
1819
  ));
1766
1820
  }
@@ -1779,7 +1833,7 @@ var texts4 = createTexts({
1779
1833
  sv: "Landskod"
1780
1834
  }
1781
1835
  });
1782
- var LazyCountryCodeSelect = React84__default.lazy(() => import('./CountryCodeSelect-UFSVRLDY.mjs'));
1836
+ var LazyCountryCodeSelect = React84__default.lazy(() => import('./CountryCodeSelect-XMQTDWRD.mjs'));
1783
1837
  var Radio = forwardRef((props, ref) => {
1784
1838
  return /* @__PURE__ */ React84__default.createElement(Radio$1, { ...props, ref });
1785
1839
  });
@@ -1841,8 +1895,8 @@ var texts5 = createTexts({
1841
1895
  }
1842
1896
  });
1843
1897
  var Switch = forwardRef(
1844
- ({ size: size2 = "md", ...props }, ref) => {
1845
- return /* @__PURE__ */ React84__default.createElement(Switch$1, { size: size2, ...props, ref });
1898
+ ({ size: size2 = "md", as = "div", ...props }, ref) => {
1899
+ return /* @__PURE__ */ React84__default.createElement(Switch$1, { as, size: size2, ...props, ref });
1846
1900
  }
1847
1901
  );
1848
1902
  var Textarea = forwardRef((props, ref) => {
@@ -12062,6 +12116,7 @@ var config18 = helpers11.defineMultiStyleConfig({
12062
12116
  label: {
12063
12117
  position: "relative",
12064
12118
  fontSize: ["mobile.xs", "desktop.sm"],
12119
+ marginTop: props.hasChosenValue ? 2 : 0,
12065
12120
  ...props.isLabelSrOnly ? srOnly2 : {}
12066
12121
  },
12067
12122
  innerButton: {
@@ -12428,79 +12483,28 @@ var config20 = helpers13.defineMultiStyleConfig({
12428
12483
  }
12429
12484
  });
12430
12485
  var info_tag_default = config20;
12431
- var helpers14 = createMultiStyleConfigHelpers$1(inputAnatomy.keys);
12432
- var config21 = helpers14.defineMultiStyleConfig({
12433
- baseStyle: (props) => ({
12434
- field: {
12435
- appearance: "none",
12436
- width: "100%",
12437
- outline: "none",
12438
- border: 0,
12439
- borderRadius: "sm",
12440
- transitionProperty: "common",
12441
- transitionDuration: "fast",
12442
- position: "relative",
12443
- paddingX: 3,
12444
- height: 8,
12445
- fontSize: "mobile.md",
12446
- _hover: {
12447
- ...baseBorder("hover", props)
12448
- },
12449
- _active: {
12450
- ...baseBackground("active", props),
12451
- ...baseBorder("default", props)
12452
- },
12453
- _focusVisible: {
12454
- ...focusVisibleStyles(props)._focusVisible,
12455
- outlineOffset: 0
12456
- },
12457
- _disabled: {
12458
- ...surface("disabled", props),
12459
- ...baseBorder("disabled", props),
12460
- pointerEvents: "none"
12461
- },
12462
- _invalid: {
12463
- ...baseBorder("invalid", props),
12486
+
12487
+ // src/theme/utils/input-utils.ts
12488
+ function inputVariant(state2, props) {
12489
+ switch (state2) {
12490
+ case "base":
12491
+ return {
12492
+ ...baseBackground("default", props),
12493
+ ...baseBorder("default", props),
12464
12494
  _hover: {
12465
12495
  ...baseBorder("hover", props)
12496
+ },
12497
+ _active: {
12498
+ ...baseBackground("active", props),
12499
+ ...baseBorder("default", props)
12500
+ },
12501
+ _selected: {
12502
+ ...baseBackground("selected", props),
12503
+ ...baseBorder("selected", props)
12466
12504
  }
12467
- },
12468
- " + label": {
12469
- fontSize: ["mobile.sm", "desktop.sm"],
12470
- top: "2px",
12471
- left: props.paddingLeft || props.pl || 3,
12472
- zIndex: 2,
12473
- position: "absolute",
12474
- marginY: 2,
12475
- transition: ".1s ease-out",
12476
- transformOrigin: "top left",
12477
- cursor: "text"
12478
- },
12479
- "&:not(:placeholder-shown)": {
12480
- paddingTop: "1rem",
12481
- "& + label": {
12482
- transform: "scale(0.825) translateY(-10px)"
12483
- }
12484
- }
12485
- },
12486
- element: {
12487
- height: "100%"
12488
- },
12489
- group: {
12490
- ":has(:disabled)": {
12491
- ...baseText("disabled", props)
12492
- }
12493
- }
12494
- }),
12495
- variants: {
12496
- base: (props) => ({
12497
- field: {
12498
- ...baseBackground("default", props),
12499
- ...baseBorder("default", props)
12500
- }
12501
- }),
12502
- floating: (props) => ({
12503
- field: {
12505
+ };
12506
+ case "floating":
12507
+ return {
12504
12508
  boxShadow: "sm",
12505
12509
  ...floatingBackground("default", props),
12506
12510
  ...floatingBorder("default", props),
@@ -12516,6 +12520,97 @@ var config21 = helpers14.defineMultiStyleConfig({
12516
12520
  ...floatingBorder("selected", props),
12517
12521
  ...floatingBackground("selected", props)
12518
12522
  }
12523
+ };
12524
+ case "default":
12525
+ default:
12526
+ return {
12527
+ ...baseBackground("default", props),
12528
+ ...baseBorder("default", props),
12529
+ _hover: {
12530
+ ...baseBorder("hover", props)
12531
+ },
12532
+ _active: {
12533
+ ...baseBackground("active", props),
12534
+ ...baseBorder("default", props)
12535
+ },
12536
+ _selected: {
12537
+ ...baseBackground("selected", props),
12538
+ ...baseBorder("selected", props)
12539
+ }
12540
+ };
12541
+ }
12542
+ }
12543
+ var inputBaseStyle = (props) => ({
12544
+ field: {
12545
+ appearance: "none",
12546
+ width: "100%",
12547
+ outline: "none",
12548
+ border: 0,
12549
+ borderRadius: "sm",
12550
+ transitionProperty: "common",
12551
+ transitionDuration: "fast",
12552
+ position: "relative",
12553
+ paddingX: 3,
12554
+ height: 8,
12555
+ fontSize: "mobile.md",
12556
+ _focusVisible: {
12557
+ ...focusVisibleStyles(props)._focusVisible,
12558
+ outlineOffset: 0
12559
+ },
12560
+ _disabled: {
12561
+ ...surface("disabled", props),
12562
+ ...baseBorder("disabled", props),
12563
+ pointerEvents: "none"
12564
+ },
12565
+ _invalid: {
12566
+ ...baseBorder("invalid", props),
12567
+ _hover: {
12568
+ ...baseBorder("hover", props)
12569
+ }
12570
+ },
12571
+ " + label": {
12572
+ fontSize: ["mobile.sm", "desktop.sm"],
12573
+ top: "2px",
12574
+ left: props.paddingLeft || props.pl || 3,
12575
+ zIndex: 2,
12576
+ position: "absolute",
12577
+ marginY: 2,
12578
+ transition: ".1s ease-out",
12579
+ transformOrigin: "top left",
12580
+ cursor: "text"
12581
+ },
12582
+ "&:not(:placeholder-shown)": {
12583
+ paddingTop: "1rem",
12584
+ "& + label": {
12585
+ transform: "scale(0.825) translateY(-10px)"
12586
+ }
12587
+ }
12588
+ },
12589
+ element: {
12590
+ height: "100%"
12591
+ },
12592
+ group: {
12593
+ ":has(:disabled)": {
12594
+ ...baseText("disabled", props)
12595
+ }
12596
+ }
12597
+ });
12598
+
12599
+ // src/theme/components/input.ts
12600
+ var helpers14 = createMultiStyleConfigHelpers$1(inputAnatomy.keys);
12601
+ var config21 = helpers14.defineMultiStyleConfig({
12602
+ baseStyle: (props) => ({
12603
+ ...inputBaseStyle(props)
12604
+ }),
12605
+ variants: {
12606
+ base: (props) => ({
12607
+ field: {
12608
+ ...inputVariant("base", props)
12609
+ }
12610
+ }),
12611
+ floating: (props) => ({
12612
+ field: {
12613
+ ...inputVariant("floating", props)
12519
12614
  }
12520
12615
  })
12521
12616
  },
@@ -12769,8 +12864,7 @@ var config24 = helpers16.defineMultiStyleConfig({
12769
12864
  maxHeight: "50vh",
12770
12865
  width: "100%",
12771
12866
  listStyle: "none",
12772
- borderBottomRadius: "sm",
12773
- ...baseBorder("default", props)
12867
+ borderBottomRadius: "sm"
12774
12868
  },
12775
12869
  item: {
12776
12870
  paddingX: 2,
@@ -12802,7 +12896,22 @@ var config24 = helpers16.defineMultiStyleConfig({
12802
12896
  ...ghostText("selected", props)
12803
12897
  }
12804
12898
  }
12805
- })
12899
+ }),
12900
+ variants: {
12901
+ base: (props) => ({
12902
+ container: {
12903
+ ...baseBorder("default", props)
12904
+ }
12905
+ }),
12906
+ floating: (props) => ({
12907
+ container: {
12908
+ ...floatingBorder("default", props)
12909
+ }
12910
+ })
12911
+ },
12912
+ defaultProps: {
12913
+ variant: "base"
12914
+ }
12806
12915
  });
12807
12916
  var listbox_default = config24;
12808
12917
  var parts12 = anatomy$1("media-controller-button").parts("container", "icon");
@@ -13422,7 +13531,7 @@ var config34 = helpers26.defineMultiStyleConfig({
13422
13531
  position: "relative",
13423
13532
  "& + label": {
13424
13533
  fontSize: ["mobile.sm", "desktop.sm"],
13425
- top: "2px",
13534
+ top: "0.2rem",
13426
13535
  left: 3,
13427
13536
  zIndex: 2,
13428
13537
  position: "absolute",
@@ -13435,10 +13544,9 @@ var config34 = helpers26.defineMultiStyleConfig({
13435
13544
  }
13436
13545
  },
13437
13546
  field: {
13438
- ...input_default.baseStyle(props).field,
13547
+ ...inputBaseStyle(props).field,
13439
13548
  appearance: "none",
13440
- paddingTop: "1rem",
13441
- "option, optgroup": {}
13549
+ paddingTop: "1rem"
13442
13550
  },
13443
13551
  icon: {
13444
13552
  width: 5,
@@ -13452,7 +13560,22 @@ var config34 = helpers26.defineMultiStyleConfig({
13452
13560
  ...baseText("disabled", props)
13453
13561
  }
13454
13562
  }
13455
- })
13563
+ }),
13564
+ variants: {
13565
+ base: (props) => ({
13566
+ field: {
13567
+ ...inputVariant("base", props)
13568
+ }
13569
+ }),
13570
+ floating: (props) => ({
13571
+ field: {
13572
+ ...inputVariant("floating", props)
13573
+ }
13574
+ })
13575
+ },
13576
+ defaultProps: {
13577
+ variant: "base"
13578
+ }
13456
13579
  });
13457
13580
  var select_default = config34;
13458
13581
  var fade = (startColor, endColor) => keyframes({
@@ -13948,7 +14071,7 @@ var config39 = helpers30.defineMultiStyleConfig({
13948
14071
  var tabs_default = config39;
13949
14072
  var config40 = defineStyleConfig$1({
13950
14073
  baseStyle: (props) => ({
13951
- ...input_default.baseStyle(props).field,
14074
+ ...inputBaseStyle(props).field,
13952
14075
  minHeight: "5rem",
13953
14076
  verticalAlign: "top",
13954
14077
  appearance: "none",
@@ -13961,7 +14084,18 @@ var config40 = defineStyleConfig$1({
13961
14084
  transform: "scale(0.825) translateY(-10px)"
13962
14085
  }
13963
14086
  }
13964
- })
14087
+ }),
14088
+ variants: {
14089
+ base: (props) => ({
14090
+ ...inputVariant("base", props)
14091
+ }),
14092
+ floating: (props) => ({
14093
+ ...inputVariant("floating", props)
14094
+ })
14095
+ },
14096
+ defaultProps: {
14097
+ variant: "base"
14098
+ }
13965
14099
  });
13966
14100
  var textarea_default = config40;
13967
14101
  var config41 = defineStyleConfig$1({