@vygruppen/spor-react 12.13.4 → 12.14.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
@@ -1801,11 +1801,19 @@ var DateField = forwardRef(
1801
1801
  css: styles.inputLabel,
1802
1802
  position: "absolute",
1803
1803
  paddingTop: "2px",
1804
- children: /* @__PURE__ */ jsxs(Label, { padding: "0", fontSize: "2xs", ...props.labelProps, children: [
1805
- props.label,
1806
- " ",
1807
- /* @__PURE__ */ jsx(Field.RequiredIndicator, {})
1808
- ] })
1804
+ children: /* @__PURE__ */ jsxs(
1805
+ Label,
1806
+ {
1807
+ padding: "0",
1808
+ fontSize: ["mobile.xs", "desktop.xs"],
1809
+ ...props.labelProps,
1810
+ children: [
1811
+ props.label,
1812
+ " ",
1813
+ /* @__PURE__ */ jsx(Field.RequiredIndicator, {})
1814
+ ]
1815
+ }
1816
+ )
1809
1817
  }
1810
1818
  ),
1811
1819
  /* @__PURE__ */ jsx(Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5", children: state.segments.map((segment, i) => /* @__PURE__ */ jsx(
@@ -1894,6 +1902,7 @@ var StyledField = forwardRef(
1894
1902
  ref,
1895
1903
  "aria-invalid": invalid,
1896
1904
  "aria-disabled": isDisabled,
1905
+ fontSize: ["mobile.md", "desktop.md"],
1897
1906
  children
1898
1907
  }
1899
1908
  );
@@ -2146,29 +2155,41 @@ function DateRangePicker({
2146
2155
  ] })
2147
2156
  ] }) });
2148
2157
  }
2158
+
2159
+ // src/util/slugify.tsx
2160
+ function slugify(text, maxLength = 50) {
2161
+ if (!text) {
2162
+ return text;
2163
+ }
2164
+ if (Array.isArray(text)) {
2165
+ text = text.join(" ");
2166
+ }
2167
+ if (maxLength < 1) {
2168
+ throw new Error("The maxLength parameter must be a positive number");
2169
+ }
2170
+ 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));
2171
+ }
2149
2172
  var TimeField = ({ state, ...props }) => {
2150
2173
  const ref = useRef(null);
2151
2174
  const { labelProps, fieldProps } = useTimeField(props, state, ref);
2152
2175
  return /* @__PURE__ */ jsxs(Box, { children: [
2153
2176
  /* @__PURE__ */ jsx(
2154
- "label",
2177
+ chakra.label,
2155
2178
  {
2156
2179
  ...labelProps,
2157
2180
  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
- },
2181
+ marginBottom: 0,
2182
+ fontSize: ["mobile.xs", "desktop.xs"],
2183
+ top: 0,
2184
+ cursor: "text",
2185
+ left: "50%",
2186
+ transform: "translateX(-50%)",
2187
+ position: "absolute",
2188
+ paddingTop: "2px",
2189
+ whiteSpace: "nowrap",
2190
+ overflow: "hidden",
2191
+ textOverflow: "ellipsis",
2192
+ maxWidth: "80%",
2172
2193
  children: props.label
2173
2194
  }
2174
2195
  ),
@@ -5819,22 +5840,6 @@ var linkRecipe = defineRecipe({
5819
5840
  size: "sm"
5820
5841
  }
5821
5842
  });
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
5843
  var pressableCardRecipe = defineRecipe({
5839
5844
  base: {
5840
5845
  appearance: "none",
@@ -7459,11 +7464,8 @@ var dialogSlotRecipe = defineSlotRecipe({
7459
7464
  variants: {
7460
7465
  placement: {
7461
7466
  center: {
7462
- positioner: {
7463
- alignItems: "center"
7464
- },
7465
7467
  content: {
7466
- marginX: "auto"
7468
+ margin: "auto"
7467
7469
  }
7468
7470
  },
7469
7471
  top: {
@@ -7539,7 +7541,7 @@ var dialogSlotRecipe = defineSlotRecipe({
7539
7541
  },
7540
7542
  content: {
7541
7543
  width: "100%",
7542
- height: "100%",
7544
+ minHeight: "100%",
7543
7545
  "--dialog-margin": "0",
7544
7546
  margin: "0"
7545
7547
  }
@@ -10075,17 +10077,21 @@ var fontSizes = defineTokens.fontSizes({
10075
10077
  "2xl": { value: tokens23__default.size.font.xl.desktop },
10076
10078
  "3xl": { value: tokens23__default.size.font.xxl.desktop },
10077
10079
  mobile: {
10080
+ "2xs": { value: tokens23__default.size.font["2xs"].mobile },
10078
10081
  xs: { value: tokens23__default.size.font.xs.mobile },
10079
10082
  sm: { value: tokens23__default.size.font.sm.mobile },
10080
10083
  md: { value: tokens23__default.size.font.md.mobile },
10084
+ "md-lg": { value: tokens23__default.size.font["md-lg"].mobile },
10081
10085
  lg: { value: tokens23__default.size.font.lg.mobile },
10082
10086
  xl: { value: tokens23__default.size.font.xl.mobile },
10083
10087
  xxl: { value: tokens23__default.size.font.xxl.mobile }
10084
10088
  },
10085
10089
  desktop: {
10090
+ "2xs": { value: tokens23__default.size.font["2xs"].desktop },
10086
10091
  xs: { value: tokens23__default.size.font.xs.desktop },
10087
10092
  sm: { value: tokens23__default.size.font.sm.desktop },
10088
10093
  md: { value: tokens23__default.size.font.md.desktop },
10094
+ "md-lg": { value: tokens23__default.size.font["md-lg"].desktop },
10089
10095
  lg: { value: tokens23__default.size.font.lg.desktop },
10090
10096
  xl: { value: tokens23__default.size.font.xl.desktop },
10091
10097
  xxl: { value: tokens23__default.size.font.xxl.desktop }
@@ -10655,6 +10661,18 @@ var textStyles = defineTextStyles({
10655
10661
  lineHeight: tokens23__default.font.style.lg["line-height"]
10656
10662
  }
10657
10663
  },
10664
+ "md-lg": {
10665
+ value: {
10666
+ fontSize: [
10667
+ tokens23__default.font.style["md-lg"]["font-size"].mobile,
10668
+ null,
10669
+ null,
10670
+ tokens23__default.font.style["md-lg"]["font-size"].desktop
10671
+ ],
10672
+ fontFamily: tokens23__default.font.style["md-lg"]["font-family"],
10673
+ lineHeight: tokens23__default.font.style["md-lg"]["line-height"]
10674
+ }
10675
+ },
10658
10676
  md: {
10659
10677
  value: {
10660
10678
  fontSize: [
@@ -10690,6 +10708,18 @@ var textStyles = defineTextStyles({
10690
10708
  fontFamily: tokens23__default.font.style.xs["font-family"],
10691
10709
  lineHeight: tokens23__default.font.style.xs["line-height"]
10692
10710
  }
10711
+ },
10712
+ "2xs": {
10713
+ value: {
10714
+ fontSize: [
10715
+ tokens23__default.font.style["2xs"]["font-size"].mobile,
10716
+ null,
10717
+ null,
10718
+ tokens23__default.font.style["2xs"]["font-size"].desktop
10719
+ ],
10720
+ fontFamily: tokens23__default.font.style["2xs"]["font-family"],
10721
+ lineHeight: tokens23__default.font.style["2xs"]["line-height"]
10722
+ }
10693
10723
  }
10694
10724
  });
10695
10725
  var generateTheme = (brand) => {