@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.
- package/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-postinstall.log +2 -2
- package/CHANGELOG.md +11 -0
- package/dist/index.cjs +69 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +69 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/datepicker/DateField.tsx +5 -1
- package/src/datepicker/StyledField.tsx +1 -0
- package/src/datepicker/TimeField.tsx +16 -16
- package/src/theme/tokens/font-sizes.ts +4 -0
- package/src/theme/tokens/text-styles.ts +24 -0
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(
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
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
|
-
|
2177
|
+
chakra.label,
|
2155
2178
|
{
|
2156
2179
|
...labelProps,
|
2157
2180
|
htmlFor: fieldProps.id,
|
2158
|
-
|
2159
|
-
|
2160
|
-
|
2161
|
-
|
2162
|
-
|
2163
|
-
|
2164
|
-
|
2165
|
-
|
2166
|
-
|
2167
|
-
|
2168
|
-
|
2169
|
-
|
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",
|
@@ -10072,17 +10077,21 @@ var fontSizes = defineTokens.fontSizes({
|
|
10072
10077
|
"2xl": { value: tokens23__default.size.font.xl.desktop },
|
10073
10078
|
"3xl": { value: tokens23__default.size.font.xxl.desktop },
|
10074
10079
|
mobile: {
|
10080
|
+
"2xs": { value: tokens23__default.size.font["2xs"].mobile },
|
10075
10081
|
xs: { value: tokens23__default.size.font.xs.mobile },
|
10076
10082
|
sm: { value: tokens23__default.size.font.sm.mobile },
|
10077
10083
|
md: { value: tokens23__default.size.font.md.mobile },
|
10084
|
+
"md-lg": { value: tokens23__default.size.font["md-lg"].mobile },
|
10078
10085
|
lg: { value: tokens23__default.size.font.lg.mobile },
|
10079
10086
|
xl: { value: tokens23__default.size.font.xl.mobile },
|
10080
10087
|
xxl: { value: tokens23__default.size.font.xxl.mobile }
|
10081
10088
|
},
|
10082
10089
|
desktop: {
|
10090
|
+
"2xs": { value: tokens23__default.size.font["2xs"].desktop },
|
10083
10091
|
xs: { value: tokens23__default.size.font.xs.desktop },
|
10084
10092
|
sm: { value: tokens23__default.size.font.sm.desktop },
|
10085
10093
|
md: { value: tokens23__default.size.font.md.desktop },
|
10094
|
+
"md-lg": { value: tokens23__default.size.font["md-lg"].desktop },
|
10086
10095
|
lg: { value: tokens23__default.size.font.lg.desktop },
|
10087
10096
|
xl: { value: tokens23__default.size.font.xl.desktop },
|
10088
10097
|
xxl: { value: tokens23__default.size.font.xxl.desktop }
|
@@ -10652,6 +10661,18 @@ var textStyles = defineTextStyles({
|
|
10652
10661
|
lineHeight: tokens23__default.font.style.lg["line-height"]
|
10653
10662
|
}
|
10654
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
|
+
},
|
10655
10676
|
md: {
|
10656
10677
|
value: {
|
10657
10678
|
fontSize: [
|
@@ -10687,6 +10708,18 @@ var textStyles = defineTextStyles({
|
|
10687
10708
|
fontFamily: tokens23__default.font.style.xs["font-family"],
|
10688
10709
|
lineHeight: tokens23__default.font.style.xs["line-height"]
|
10689
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
|
+
}
|
10690
10723
|
}
|
10691
10724
|
});
|
10692
10725
|
var generateTheme = (brand) => {
|