@vygruppen/spor-react 12.13.5 → 12.14.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.d.cts CHANGED
@@ -2132,6 +2132,9 @@ declare const lineIconSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon" |
2132
2132
  iconContainer: {
2133
2133
  backgroundColor: "linjetag.altTransport";
2134
2134
  };
2135
+ icon: {
2136
+ color: "darkGrey";
2137
+ };
2135
2138
  };
2136
2139
  walk: {
2137
2140
  title: {
package/dist/index.d.ts CHANGED
@@ -2132,6 +2132,9 @@ declare const lineIconSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon" |
2132
2132
  iconContainer: {
2133
2133
  backgroundColor: "linjetag.altTransport";
2134
2134
  };
2135
+ icon: {
2136
+ color: "darkGrey";
2137
+ };
2135
2138
  };
2136
2139
  walk: {
2137
2140
  title: {
package/dist/index.mjs CHANGED
@@ -1208,15 +1208,7 @@ var ServiceAlert = forwardRef(
1208
1208
  ]
1209
1209
  }
1210
1210
  ) }),
1211
- /* @__PURE__ */ jsx(Accordion$1.ItemContent, { asChild: true, children: /* @__PURE__ */ jsx(Stack, { flexDirection: "row", width: "100%", children: /* @__PURE__ */ jsx(
1212
- Accordion$1.ItemBody,
1213
- {
1214
- as: Stack,
1215
- width: contentWidth,
1216
- css: styles.itemBody,
1217
- children
1218
- }
1219
- ) }) })
1211
+ /* @__PURE__ */ jsx(Accordion$1.ItemContent, { css: styles.itemContent, children: /* @__PURE__ */ jsx(Accordion$1.ItemBody, { maxWidth: contentWidth, css: styles.itemBody, children }) })
1220
1212
  ] })
1221
1213
  }
1222
1214
  );
@@ -1384,7 +1376,7 @@ var Field3 = React27.forwardRef(
1384
1376
  ]
1385
1377
  }
1386
1378
  ),
1387
- helperText && /* @__PURE__ */ jsx(Text3, { fontSize: "sm", color: "text.tertiary", children: helperText })
1379
+ helperText && /* @__PURE__ */ jsx(Text3, { variant: "sm", color: "text.tertiary", children: helperText })
1388
1380
  ] });
1389
1381
  }
1390
1382
  );
@@ -1617,10 +1609,10 @@ var CalendarNavigator = ({
1617
1609
  }
1618
1610
  ),
1619
1611
  /* @__PURE__ */ jsx(
1620
- Box,
1612
+ Text3,
1621
1613
  {
1622
1614
  role: "heading",
1623
- fontSize: "sm",
1615
+ variant: "md",
1624
1616
  fontWeight: "bold",
1625
1617
  flex: "1",
1626
1618
  textAlign: "center",
@@ -1801,7 +1793,7 @@ var DateField = forwardRef(
1801
1793
  css: styles.inputLabel,
1802
1794
  position: "absolute",
1803
1795
  paddingTop: "2px",
1804
- children: /* @__PURE__ */ jsxs(Label, { padding: "0", fontSize: "2xs", ...props.labelProps, children: [
1796
+ children: /* @__PURE__ */ jsxs(Label, { padding: "0", ...props.labelProps, children: [
1805
1797
  props.label,
1806
1798
  " ",
1807
1799
  /* @__PURE__ */ jsx(Field.RequiredIndicator, {})
@@ -1894,6 +1886,7 @@ var StyledField = forwardRef(
1894
1886
  ref,
1895
1887
  "aria-invalid": invalid,
1896
1888
  "aria-disabled": isDisabled,
1889
+ fontSize: ["mobile.md", "desktop.md"],
1897
1890
  children
1898
1891
  }
1899
1892
  );
@@ -2146,29 +2139,41 @@ function DateRangePicker({
2146
2139
  ] })
2147
2140
  ] }) });
2148
2141
  }
2142
+
2143
+ // src/util/slugify.tsx
2144
+ function slugify(text, maxLength = 50) {
2145
+ if (!text) {
2146
+ return text;
2147
+ }
2148
+ if (Array.isArray(text)) {
2149
+ text = text.join(" ");
2150
+ }
2151
+ if (maxLength < 1) {
2152
+ throw new Error("The maxLength parameter must be a positive number");
2153
+ }
2154
+ return text.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").replaceAll(/[\u00C6\u00E6]/g, "ae").replaceAll(/[\u00D8\u00F8]/g, "oe").replaceAll(/[\u00C5\u00E5]/g, "aa").toLowerCase().replaceAll(/\s+/g, "-").replaceAll(/[^\w-]+/g, "").replaceAll(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, "").slice(0, Math.max(0, maxLength));
2155
+ }
2149
2156
  var TimeField = ({ state, ...props }) => {
2150
2157
  const ref = useRef(null);
2151
2158
  const { labelProps, fieldProps } = useTimeField(props, state, ref);
2152
2159
  return /* @__PURE__ */ jsxs(Box, { children: [
2153
2160
  /* @__PURE__ */ jsx(
2154
- "label",
2161
+ chakra.label,
2155
2162
  {
2156
2163
  ...labelProps,
2157
2164
  htmlFor: fieldProps.id,
2158
- style: {
2159
- marginBottom: 0,
2160
- fontSize: "mobile.xs",
2161
- top: 0,
2162
- cursor: "text",
2163
- left: "50%",
2164
- transform: "translateX(-50%)",
2165
- position: "absolute",
2166
- paddingTop: "2px",
2167
- whiteSpace: "nowrap",
2168
- overflow: "hidden",
2169
- textOverflow: "ellipsis",
2170
- maxWidth: "80%"
2171
- },
2165
+ marginBottom: 0,
2166
+ fontSize: ["mobile.xs", "desktop.xs"],
2167
+ top: 0,
2168
+ cursor: "text",
2169
+ left: "50%",
2170
+ transform: "translateX(-50%)",
2171
+ position: "absolute",
2172
+ paddingTop: "2px",
2173
+ whiteSpace: "nowrap",
2174
+ overflow: "hidden",
2175
+ textOverflow: "ellipsis",
2176
+ maxWidth: "80%",
2172
2177
  children: props.label
2173
2178
  }
2174
2179
  ),
@@ -2907,7 +2912,15 @@ function ItemDescription({ children }) {
2907
2912
  const { descriptionProps } = useOptionContext();
2908
2913
  const recipe = useSlotRecipe({ key: "listbox" });
2909
2914
  const styles = recipe({});
2910
- return /* @__PURE__ */ jsx(Box, { ...descriptionProps, css: styles, fontSize: "xs", children });
2915
+ return /* @__PURE__ */ jsx(
2916
+ Box,
2917
+ {
2918
+ ...descriptionProps,
2919
+ css: styles,
2920
+ fontSize: ["mobile.xs", "desktop.xs"],
2921
+ children
2922
+ }
2923
+ );
2911
2924
  }
2912
2925
  function Option({ item, state }) {
2913
2926
  const ref = useRef(null);
@@ -2984,7 +2997,7 @@ function ListBoxSection({ section, state }) {
2984
2997
  section.rendered && /* @__PURE__ */ jsx(
2985
2998
  Box,
2986
2999
  {
2987
- fontSize: "mobile.xs",
3000
+ fontSize: ["mobile.sm", "desktop.sm"],
2988
3001
  color: titleColor,
2989
3002
  paddingTop: 1,
2990
3003
  marginTop: isFirstSection ? 0 : 2,
@@ -5387,7 +5400,6 @@ var StepperStep = ({
5387
5400
  Text3,
5388
5401
  {
5389
5402
  variant: "xs",
5390
- fontSize: "1rem",
5391
5403
  color: disabledTextColor,
5392
5404
  cursor: "default",
5393
5405
  paddingX: 2,
@@ -5819,22 +5831,6 @@ var linkRecipe = defineRecipe({
5819
5831
  size: "sm"
5820
5832
  }
5821
5833
  });
5822
-
5823
- // src/util/slugify.tsx
5824
- function slugify(text, maxLength = 50) {
5825
- if (!text) {
5826
- return text;
5827
- }
5828
- if (Array.isArray(text)) {
5829
- text = text.join(" ");
5830
- }
5831
- if (maxLength < 1) {
5832
- throw new Error("The maxLength parameter must be a positive number");
5833
- }
5834
- return text.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").replaceAll(/[\u00C6\u00E6]/g, "ae").replaceAll(/[\u00D8\u00F8]/g, "oe").replaceAll(/[\u00C5\u00E5]/g, "aa").toLowerCase().replaceAll(/\s+/g, "-").replaceAll(/[^\w-]+/g, "").replaceAll(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, "").slice(0, Math.max(0, maxLength));
5835
- }
5836
-
5837
- // src/theme/recipes/pressable-card.ts
5838
5834
  var pressableCardRecipe = defineRecipe({
5839
5835
  base: {
5840
5836
  appearance: "none",
@@ -6442,13 +6438,13 @@ var accordionSlotRecipe = defineSlotRecipe({
6442
6438
  textAlign: "left",
6443
6439
  width: "full",
6444
6440
  alignItems: "center",
6445
- fontSize: ["mobile.sm", null, "desktop.sm"],
6441
+ fontSize: ["mobile.sm", "desktop.sm"],
6446
6442
  fontFamily: "body",
6447
6443
  fontWeight: "bold",
6448
6444
  outlineOffset: "-2px",
6449
- paddingX: [2, null, 3],
6450
- paddingY: [1, null, 1.5],
6451
- minHeight: [6, null, 7],
6445
+ paddingX: [2, 3],
6446
+ paddingY: [1, 1.5],
6447
+ minHeight: [6, 7],
6452
6448
  cursor: "pointer",
6453
6449
  _disabled: {
6454
6450
  pointerEvents: "none",
@@ -6457,7 +6453,7 @@ var accordionSlotRecipe = defineSlotRecipe({
6457
6453
  },
6458
6454
  itemContent: {
6459
6455
  borderBottomRadius: "sm",
6460
- fontSize: ["mobile.sm", null, "desktop.sm"],
6456
+ fontSize: ["mobile.sm", "desktop.sm"],
6461
6457
  color: "text",
6462
6458
  height: "auto",
6463
6459
  overflow: "hidden",
@@ -6472,7 +6468,7 @@ var accordionSlotRecipe = defineSlotRecipe({
6472
6468
  },
6473
6469
  itemBody: {
6474
6470
  paddingY: 2,
6475
- paddingX: [2, null, 3]
6471
+ paddingX: [2, 3]
6476
6472
  },
6477
6473
  itemIndicator: {
6478
6474
  transition: "rotate 0.2s",
@@ -6774,7 +6770,8 @@ var alertServiceSlotRecipe = defineSlotRecipe({
6774
6770
  display: "flex",
6775
6771
  flexDirection: "column",
6776
6772
  justifyContent: "center",
6777
- padding: [2, null, null, 2],
6773
+ padding: ["2", "3"],
6774
+ paddingBottom: "1",
6778
6775
  borderBottomRadius: "md",
6779
6776
  borderTopRadius: "none",
6780
6777
  width: "full",
@@ -6790,27 +6787,37 @@ var alertServiceSlotRecipe = defineSlotRecipe({
6790
6787
  }
6791
6788
  },
6792
6789
  itemTriggerTitle: {
6793
- fontSize: ["xs", null, null, "sm"]
6790
+ fontSize: ["mobile.sm", "desktop.sm"]
6794
6791
  },
6795
6792
  notificationText: {
6796
6793
  fontWeight: "400",
6797
- fontSize: ["2xs", null, null, "xs"],
6798
- textWrap: "nowrap"
6794
+ fontSize: ["mobile.xs", "desktop.xs"],
6795
+ textWrap: "nowrap",
6796
+ color: "alert.service.text.secondary"
6797
+ },
6798
+ itemContent: {
6799
+ paddingX: ["2", "3"],
6800
+ paddingBottom: ["2", "3"],
6801
+ paddingTop: ["1", "2"]
6799
6802
  },
6800
6803
  itemBody: {
6801
6804
  marginX: "auto",
6802
6805
  padding: "0 !important",
6803
- paddingBottom: ["0.5", null, null, "1"],
6804
- color: "text.inverted",
6806
+ color: "alert.service.text.secondary",
6807
+ gap: 0,
6808
+ flexDirection: "column",
6809
+ display: "flex",
6805
6810
  "& > p": {
6806
- gap: 2,
6807
6811
  width: "full",
6808
6812
  borderBottom: "1px dashed",
6809
6813
  borderColor: "outline.inverted",
6810
- paddingBottom: "3",
6811
- paddingTop: "2",
6814
+ paddingY: ["1", "1.5"],
6815
+ _first: {
6816
+ paddingTop: 0
6817
+ },
6812
6818
  _last: {
6813
- borderBottom: "none"
6819
+ borderBottom: "none",
6820
+ paddingBottom: 0
6814
6821
  }
6815
6822
  }
6816
6823
  }
@@ -6955,7 +6962,6 @@ var choiceChipSlotRecipe = defineSlotRecipe({
6955
6962
  display: "inline-flex",
6956
6963
  alignItems: "center",
6957
6964
  boxAlign: "center",
6958
- fontSize: "xs",
6959
6965
  cursor: "pointer",
6960
6966
  transitionProperty: "all",
6961
6967
  borderRadius: "xl",
@@ -7008,8 +7014,7 @@ var choiceChipSlotRecipe = defineSlotRecipe({
7008
7014
  label: {
7009
7015
  display: "flex",
7010
7016
  alignItems: "center",
7011
- gap: "1",
7012
- fontSize: "xs"
7017
+ gap: "1"
7013
7018
  }
7014
7019
  },
7015
7020
  variants: {
@@ -7021,6 +7026,10 @@ var choiceChipSlotRecipe = defineSlotRecipe({
7021
7026
  },
7022
7027
  height: 5,
7023
7028
  paddingX: 1.5
7029
+ },
7030
+ label: {
7031
+ fontSize: { base: "mobile.sm", sm: "desktop.sm" },
7032
+ fontWeight: "medium"
7024
7033
  }
7025
7034
  },
7026
7035
  sm: {
@@ -7030,6 +7039,10 @@ var choiceChipSlotRecipe = defineSlotRecipe({
7030
7039
  },
7031
7040
  height: 6,
7032
7041
  paddingX: 2
7042
+ },
7043
+ label: {
7044
+ fontSize: { base: "mobile.sm", sm: "desktop.sm" },
7045
+ fontWeight: "bold"
7033
7046
  }
7034
7047
  },
7035
7048
  md: {
@@ -7039,6 +7052,10 @@ var choiceChipSlotRecipe = defineSlotRecipe({
7039
7052
  },
7040
7053
  height: 7,
7041
7054
  paddingX: 2
7055
+ },
7056
+ label: {
7057
+ fontSize: { base: "mobile.md", sm: "desktop.md" },
7058
+ fontWeight: "bold"
7042
7059
  }
7043
7060
  },
7044
7061
  lg: {
@@ -7048,6 +7065,10 @@ var choiceChipSlotRecipe = defineSlotRecipe({
7048
7065
  },
7049
7066
  height: 8,
7050
7067
  paddingX: 3
7068
+ },
7069
+ label: {
7070
+ fontSize: { base: "mobile.md", sm: "desktop.md" },
7071
+ fontWeight: "bold"
7051
7072
  }
7052
7073
  }
7053
7074
  },
@@ -7107,7 +7128,7 @@ var choiceChipSlotRecipe = defineSlotRecipe({
7107
7128
  }
7108
7129
  },
7109
7130
  defaultVariants: {
7110
- size: "md",
7131
+ size: "sm",
7111
7132
  variant: "core",
7112
7133
  chipType: "choice"
7113
7134
  }
@@ -7166,7 +7187,7 @@ var datePickerSlotRecipe = defineSlotRecipe({
7166
7187
  }
7167
7188
  },
7168
7189
  inputLabel: {
7169
- fontSize: "mobile.xs",
7190
+ fontSize: ["mobile.xs", "desktop.xs"],
7170
7191
  margin: 0,
7171
7192
  cursor: "text"
7172
7193
  },
@@ -8286,6 +8307,10 @@ var lineIconSlotRecipe = defineSlotRecipe({
8286
8307
  "alt-transport": {
8287
8308
  iconContainer: {
8288
8309
  backgroundColor: "linjetag.altTransport"
8310
+ },
8311
+ icon: {
8312
+ // eslint-disable-next-line spor/use-semantic-tokens
8313
+ color: "darkGrey"
8289
8314
  }
8290
8315
  },
8291
8316
  walk: {
@@ -10072,17 +10097,21 @@ var fontSizes = defineTokens.fontSizes({
10072
10097
  "2xl": { value: tokens23__default.size.font.xl.desktop },
10073
10098
  "3xl": { value: tokens23__default.size.font.xxl.desktop },
10074
10099
  mobile: {
10100
+ "2xs": { value: tokens23__default.size.font["2xs"].mobile },
10075
10101
  xs: { value: tokens23__default.size.font.xs.mobile },
10076
10102
  sm: { value: tokens23__default.size.font.sm.mobile },
10077
10103
  md: { value: tokens23__default.size.font.md.mobile },
10104
+ "md-lg": { value: tokens23__default.size.font["md-lg"].mobile },
10078
10105
  lg: { value: tokens23__default.size.font.lg.mobile },
10079
10106
  xl: { value: tokens23__default.size.font.xl.mobile },
10080
10107
  xxl: { value: tokens23__default.size.font.xxl.mobile }
10081
10108
  },
10082
10109
  desktop: {
10110
+ "2xs": { value: tokens23__default.size.font["2xs"].desktop },
10083
10111
  xs: { value: tokens23__default.size.font.xs.desktop },
10084
10112
  sm: { value: tokens23__default.size.font.sm.desktop },
10085
10113
  md: { value: tokens23__default.size.font.md.desktop },
10114
+ "md-lg": { value: tokens23__default.size.font["md-lg"].desktop },
10086
10115
  lg: { value: tokens23__default.size.font.lg.desktop },
10087
10116
  xl: { value: tokens23__default.size.font.xl.desktop },
10088
10117
  xxl: { value: tokens23__default.size.font.xxl.desktop }
@@ -10652,6 +10681,18 @@ var textStyles = defineTextStyles({
10652
10681
  lineHeight: tokens23__default.font.style.lg["line-height"]
10653
10682
  }
10654
10683
  },
10684
+ "md-lg": {
10685
+ value: {
10686
+ fontSize: [
10687
+ tokens23__default.font.style["md-lg"]["font-size"].mobile,
10688
+ null,
10689
+ null,
10690
+ tokens23__default.font.style["md-lg"]["font-size"].desktop
10691
+ ],
10692
+ fontFamily: tokens23__default.font.style["md-lg"]["font-family"],
10693
+ lineHeight: tokens23__default.font.style["md-lg"]["line-height"]
10694
+ }
10695
+ },
10655
10696
  md: {
10656
10697
  value: {
10657
10698
  fontSize: [
@@ -10687,6 +10728,18 @@ var textStyles = defineTextStyles({
10687
10728
  fontFamily: tokens23__default.font.style.xs["font-family"],
10688
10729
  lineHeight: tokens23__default.font.style.xs["line-height"]
10689
10730
  }
10731
+ },
10732
+ "2xs": {
10733
+ value: {
10734
+ fontSize: [
10735
+ tokens23__default.font.style["2xs"]["font-size"].mobile,
10736
+ null,
10737
+ null,
10738
+ tokens23__default.font.style["2xs"]["font-size"].desktop
10739
+ ],
10740
+ fontFamily: tokens23__default.font.style["2xs"]["font-family"],
10741
+ lineHeight: tokens23__default.font.style["2xs"]["line-height"]
10742
+ }
10690
10743
  }
10691
10744
  });
10692
10745
  var generateTheme = (brand) => {