@vygruppen/spor-react 12.13.5 → 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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@12.13.5 build /home/runner/work/spor/spor/packages/spor-react
2
+ > @vygruppen/spor-react@12.14.0 build /home/runner/work/spor/spor/packages/spor-react
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.tsx, src/icons/index.tsx
@@ -11,17 +11,17 @@ CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
13
  DTS Build start
14
- ESM dist/index.mjs 297.20 KB
15
- ESM dist/icons/index.mjs 110.00 B
16
- ESM dist/index.mjs.map 634.99 KB
17
- ESM dist/icons/index.mjs.map 157.00 B
18
- ESM ⚡️ Build success in 2645ms
19
- CJS dist/index.cjs 318.68 KB
14
+ CJS dist/index.cjs 319.89 KB
20
15
  CJS dist/icons/index.cjs 381.00 B
21
- CJS dist/index.cjs.map 634.99 KB
16
+ CJS dist/index.cjs.map 636.92 KB
22
17
  CJS dist/icons/index.cjs.map 157.00 B
23
- CJS ⚡️ Build success in 2645ms
24
- DTS ⚡️ Build success in 18409ms
18
+ CJS ⚡️ Build success in 2691ms
19
+ ESM dist/index.mjs 298.29 KB
20
+ ESM dist/icons/index.mjs 110.00 B
21
+ ESM dist/index.mjs.map 636.92 KB
22
+ ESM dist/icons/index.mjs.map 157.00 B
23
+ ESM ⚡️ Build success in 2692ms
24
+ DTS ⚡️ Build success in 18936ms
25
25
  DTS dist/icons/index.d.ts 44.00 B
26
26
  DTS dist/index.d.ts 157.02 KB
27
27
  DTS dist/icons/index.d.cts 44.00 B
@@ -1,8 +1,8 @@
1
1
 
2
- > @vygruppen/spor-react@12.13.5 postinstall /home/runner/work/spor/spor/packages/spor-react
2
+ > @vygruppen/spor-react@12.14.0 postinstall /home/runner/work/spor/spor/packages/spor-react
3
3
  > chakra typegen src/theme/index.ts
4
4
 
5
- [dotenv@17.2.2] injecting env (0) from .env -- tip: 🔐 prevent building .env in docker: https://dotenvx.com/prebuild
5
+ [dotenv@17.2.2] injecting env (0) from .env -- tip: 📡 version env with Radar: https://dotenvx.com/radar
6
6
  ┌ Chakra CLI ⚡️
7
7
  [?25l│
8
8
  ◒ Generating conditions types...
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 12.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cdb40ce: Add new fontsizes, md-lg and 2xs. Md on desktop adjusts from 24px to 21px.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [cdb40ce]
12
+ - @vygruppen/spor-design-tokens@4.2.0
13
+
3
14
  ## 12.13.5
4
15
 
5
16
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1821,11 +1821,19 @@ var DateField = React27.forwardRef(
1821
1821
  css: styles.inputLabel,
1822
1822
  position: "absolute",
1823
1823
  paddingTop: "2px",
1824
- children: /* @__PURE__ */ jsxRuntime.jsxs(Label, { padding: "0", fontSize: "2xs", ...props.labelProps, children: [
1825
- props.label,
1826
- " ",
1827
- /* @__PURE__ */ jsxRuntime.jsx(react.Field.RequiredIndicator, {})
1828
- ] })
1824
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1825
+ Label,
1826
+ {
1827
+ padding: "0",
1828
+ fontSize: ["mobile.xs", "desktop.xs"],
1829
+ ...props.labelProps,
1830
+ children: [
1831
+ props.label,
1832
+ " ",
1833
+ /* @__PURE__ */ jsxRuntime.jsx(react.Field.RequiredIndicator, {})
1834
+ ]
1835
+ }
1836
+ )
1829
1837
  }
1830
1838
  ),
1831
1839
  /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5", children: state.segments.map((segment, i) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -1914,6 +1922,7 @@ var StyledField = React27.forwardRef(
1914
1922
  ref,
1915
1923
  "aria-invalid": invalid,
1916
1924
  "aria-disabled": isDisabled,
1925
+ fontSize: ["mobile.md", "desktop.md"],
1917
1926
  children
1918
1927
  }
1919
1928
  );
@@ -2166,29 +2175,41 @@ function DateRangePicker({
2166
2175
  ] })
2167
2176
  ] }) });
2168
2177
  }
2178
+
2179
+ // src/util/slugify.tsx
2180
+ function slugify(text, maxLength = 50) {
2181
+ if (!text) {
2182
+ return text;
2183
+ }
2184
+ if (Array.isArray(text)) {
2185
+ text = text.join(" ");
2186
+ }
2187
+ if (maxLength < 1) {
2188
+ throw new Error("The maxLength parameter must be a positive number");
2189
+ }
2190
+ 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));
2191
+ }
2169
2192
  var TimeField = ({ state, ...props }) => {
2170
2193
  const ref = React27.useRef(null);
2171
2194
  const { labelProps, fieldProps } = reactAria.useTimeField(props, state, ref);
2172
2195
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
2173
2196
  /* @__PURE__ */ jsxRuntime.jsx(
2174
- "label",
2197
+ react.chakra.label,
2175
2198
  {
2176
2199
  ...labelProps,
2177
2200
  htmlFor: fieldProps.id,
2178
- style: {
2179
- marginBottom: 0,
2180
- fontSize: "mobile.xs",
2181
- top: 0,
2182
- cursor: "text",
2183
- left: "50%",
2184
- transform: "translateX(-50%)",
2185
- position: "absolute",
2186
- paddingTop: "2px",
2187
- whiteSpace: "nowrap",
2188
- overflow: "hidden",
2189
- textOverflow: "ellipsis",
2190
- maxWidth: "80%"
2191
- },
2201
+ marginBottom: 0,
2202
+ fontSize: ["mobile.xs", "desktop.xs"],
2203
+ top: 0,
2204
+ cursor: "text",
2205
+ left: "50%",
2206
+ transform: "translateX(-50%)",
2207
+ position: "absolute",
2208
+ paddingTop: "2px",
2209
+ whiteSpace: "nowrap",
2210
+ overflow: "hidden",
2211
+ textOverflow: "ellipsis",
2212
+ maxWidth: "80%",
2192
2213
  children: props.label
2193
2214
  }
2194
2215
  ),
@@ -5839,22 +5860,6 @@ var linkRecipe = react.defineRecipe({
5839
5860
  size: "sm"
5840
5861
  }
5841
5862
  });
5842
-
5843
- // src/util/slugify.tsx
5844
- function slugify(text, maxLength = 50) {
5845
- if (!text) {
5846
- return text;
5847
- }
5848
- if (Array.isArray(text)) {
5849
- text = text.join(" ");
5850
- }
5851
- if (maxLength < 1) {
5852
- throw new Error("The maxLength parameter must be a positive number");
5853
- }
5854
- 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));
5855
- }
5856
-
5857
- // src/theme/recipes/pressable-card.ts
5858
5863
  var pressableCardRecipe = react.defineRecipe({
5859
5864
  base: {
5860
5865
  appearance: "none",
@@ -10092,17 +10097,21 @@ var fontSizes = react.defineTokens.fontSizes({
10092
10097
  "2xl": { value: tokens23__namespace.default.size.font.xl.desktop },
10093
10098
  "3xl": { value: tokens23__namespace.default.size.font.xxl.desktop },
10094
10099
  mobile: {
10100
+ "2xs": { value: tokens23__namespace.default.size.font["2xs"].mobile },
10095
10101
  xs: { value: tokens23__namespace.default.size.font.xs.mobile },
10096
10102
  sm: { value: tokens23__namespace.default.size.font.sm.mobile },
10097
10103
  md: { value: tokens23__namespace.default.size.font.md.mobile },
10104
+ "md-lg": { value: tokens23__namespace.default.size.font["md-lg"].mobile },
10098
10105
  lg: { value: tokens23__namespace.default.size.font.lg.mobile },
10099
10106
  xl: { value: tokens23__namespace.default.size.font.xl.mobile },
10100
10107
  xxl: { value: tokens23__namespace.default.size.font.xxl.mobile }
10101
10108
  },
10102
10109
  desktop: {
10110
+ "2xs": { value: tokens23__namespace.default.size.font["2xs"].desktop },
10103
10111
  xs: { value: tokens23__namespace.default.size.font.xs.desktop },
10104
10112
  sm: { value: tokens23__namespace.default.size.font.sm.desktop },
10105
10113
  md: { value: tokens23__namespace.default.size.font.md.desktop },
10114
+ "md-lg": { value: tokens23__namespace.default.size.font["md-lg"].desktop },
10106
10115
  lg: { value: tokens23__namespace.default.size.font.lg.desktop },
10107
10116
  xl: { value: tokens23__namespace.default.size.font.xl.desktop },
10108
10117
  xxl: { value: tokens23__namespace.default.size.font.xxl.desktop }
@@ -10672,6 +10681,18 @@ var textStyles = react.defineTextStyles({
10672
10681
  lineHeight: tokens23__namespace.default.font.style.lg["line-height"]
10673
10682
  }
10674
10683
  },
10684
+ "md-lg": {
10685
+ value: {
10686
+ fontSize: [
10687
+ tokens23__namespace.default.font.style["md-lg"]["font-size"].mobile,
10688
+ null,
10689
+ null,
10690
+ tokens23__namespace.default.font.style["md-lg"]["font-size"].desktop
10691
+ ],
10692
+ fontFamily: tokens23__namespace.default.font.style["md-lg"]["font-family"],
10693
+ lineHeight: tokens23__namespace.default.font.style["md-lg"]["line-height"]
10694
+ }
10695
+ },
10675
10696
  md: {
10676
10697
  value: {
10677
10698
  fontSize: [
@@ -10707,6 +10728,18 @@ var textStyles = react.defineTextStyles({
10707
10728
  fontFamily: tokens23__namespace.default.font.style.xs["font-family"],
10708
10729
  lineHeight: tokens23__namespace.default.font.style.xs["line-height"]
10709
10730
  }
10731
+ },
10732
+ "2xs": {
10733
+ value: {
10734
+ fontSize: [
10735
+ tokens23__namespace.default.font.style["2xs"]["font-size"].mobile,
10736
+ null,
10737
+ null,
10738
+ tokens23__namespace.default.font.style["2xs"]["font-size"].desktop
10739
+ ],
10740
+ fontFamily: tokens23__namespace.default.font.style["2xs"]["font-family"],
10741
+ lineHeight: tokens23__namespace.default.font.style["2xs"]["line-height"]
10742
+ }
10710
10743
  }
10711
10744
  });
10712
10745
  var generateTheme = (brand) => {