@vygruppen/spor-react 12.8.5 → 12.8.7
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 +1 -1
- package/CHANGELOG.md +13 -0
- package/dist/index.cjs +33 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +33 -41
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/datepicker/CalendarTriggerButton.tsx +3 -3
- package/src/datepicker/DateField.tsx +4 -6
- package/src/datepicker/DatePicker.tsx +0 -4
- package/src/datepicker/StyledField.tsx +1 -4
- package/src/datepicker/TimeField.tsx +5 -1
- package/src/link/TextLink.tsx +2 -2
- package/src/theme/recipes/link.ts +14 -23
- package/src/theme/slot-recipes/checkbox.ts +3 -1
package/dist/index.mjs
CHANGED
@@ -1705,7 +1705,7 @@ var texts8 = createTexts({
|
|
1705
1705
|
en: "Calendar"
|
1706
1706
|
}
|
1707
1707
|
});
|
1708
|
-
var CalendarTriggerButton = forwardRef(({ variant, disabled,
|
1708
|
+
var CalendarTriggerButton = forwardRef(({ variant, disabled, onPress: _, ...buttonProps }, ref) => {
|
1709
1709
|
const { t } = useTranslation();
|
1710
1710
|
const recipe = useSlotRecipe({
|
1711
1711
|
key: "datePicker"
|
@@ -1718,8 +1718,7 @@ var CalendarTriggerButton = forwardRef(({ variant, disabled, ariaLabelledby, ...
|
|
1718
1718
|
"aria-label": t(texts9.openCalendar),
|
1719
1719
|
css: styles.calendarTriggerButton,
|
1720
1720
|
variant: "ghost",
|
1721
|
-
disabled
|
1722
|
-
"aria-labelledby": ariaLabelledby
|
1721
|
+
disabled
|
1723
1722
|
}
|
1724
1723
|
) });
|
1725
1724
|
});
|
@@ -1782,7 +1781,7 @@ function createCalendar2(identifier) {
|
|
1782
1781
|
}
|
1783
1782
|
}
|
1784
1783
|
var DateField = forwardRef(
|
1785
|
-
(
|
1784
|
+
(props, externalRef) => {
|
1786
1785
|
var _a5;
|
1787
1786
|
const locale = useCurrentLocale();
|
1788
1787
|
const recipe = useSlotRecipe({
|
@@ -1806,12 +1805,11 @@ var DateField = forwardRef(
|
|
1806
1805
|
props.label && /* @__PURE__ */ jsx(
|
1807
1806
|
Box,
|
1808
1807
|
{
|
1809
|
-
|
1808
|
+
asChild: true,
|
1810
1809
|
css: styles.inputLabel,
|
1811
1810
|
position: "absolute",
|
1812
1811
|
paddingTop: "2px",
|
1813
|
-
|
1814
|
-
children: props.label
|
1812
|
+
children: /* @__PURE__ */ jsx("label", { ...props.labelProps, children: props.label })
|
1815
1813
|
}
|
1816
1814
|
),
|
1817
1815
|
/* @__PURE__ */ jsx(Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5", children: state.segments.map((segment, i) => /* @__PURE__ */ jsx(
|
@@ -1819,7 +1817,6 @@ var DateField = forwardRef(
|
|
1819
1817
|
{
|
1820
1818
|
segment,
|
1821
1819
|
ariaDescription: t(getAriaLabel(segment.type)),
|
1822
|
-
ariaLabel: labelId,
|
1823
1820
|
state
|
1824
1821
|
},
|
1825
1822
|
i
|
@@ -1829,7 +1826,8 @@ var DateField = forwardRef(
|
|
1829
1826
|
{
|
1830
1827
|
type: "hidden",
|
1831
1828
|
value: ((_a5 = state.value) == null ? void 0 : _a5.toString()) ?? "",
|
1832
|
-
name: props.name
|
1829
|
+
name: props.name,
|
1830
|
+
id: props.id
|
1833
1831
|
}
|
1834
1832
|
)
|
1835
1833
|
] });
|
@@ -1874,7 +1872,7 @@ var getAriaLabel = (segmentType) => {
|
|
1874
1872
|
};
|
1875
1873
|
var StyledField = forwardRef(
|
1876
1874
|
function StyledField2(props, ref) {
|
1877
|
-
const { children, variant, isDisabled,
|
1875
|
+
const { children, variant, isDisabled, ...otherProps } = props;
|
1878
1876
|
const { invalid } = useFieldContext() ?? {
|
1879
1877
|
};
|
1880
1878
|
const recipe = useSlotRecipe({
|
@@ -1889,7 +1887,6 @@ var StyledField = forwardRef(
|
|
1889
1887
|
ref,
|
1890
1888
|
"aria-invalid": invalid,
|
1891
1889
|
"aria-disabled": isDisabled,
|
1892
|
-
"aria-labelledby": ariaLabelledby,
|
1893
1890
|
children
|
1894
1891
|
}
|
1895
1892
|
);
|
@@ -1923,7 +1920,6 @@ var DatePicker = forwardRef(
|
|
1923
1920
|
state,
|
1924
1921
|
ref
|
1925
1922
|
);
|
1926
|
-
const labelId = `label-${useId()}`;
|
1927
1923
|
const inputGroupId = `input-group-${useId()}`;
|
1928
1924
|
const recipe = useSlotRecipe({
|
1929
1925
|
key: "datePicker"
|
@@ -1954,7 +1950,6 @@ var DatePicker = forwardRef(
|
|
1954
1950
|
{
|
1955
1951
|
display: "inline-flex",
|
1956
1952
|
id: inputGroupId,
|
1957
|
-
"aria-labelledby": labelId,
|
1958
1953
|
errorText,
|
1959
1954
|
invalid,
|
1960
1955
|
helperText,
|
@@ -1966,7 +1961,6 @@ var DatePicker = forwardRef(
|
|
1966
1961
|
paddingX: 3,
|
1967
1962
|
minHeight,
|
1968
1963
|
isDisabled: props.isDisabled,
|
1969
|
-
ariaLabelledby: labelId,
|
1970
1964
|
children: [
|
1971
1965
|
/* @__PURE__ */ jsx(Popover$1.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
1972
1966
|
CalendarTriggerButton,
|
@@ -1983,7 +1977,6 @@ var DatePicker = forwardRef(
|
|
1983
1977
|
{
|
1984
1978
|
label: props.label,
|
1985
1979
|
labelProps,
|
1986
|
-
labelId,
|
1987
1980
|
name: props.name,
|
1988
1981
|
...fieldProps
|
1989
1982
|
}
|
@@ -2157,7 +2150,14 @@ var TimeField = ({ state, ...props }) => {
|
|
2157
2150
|
children: props.label
|
2158
2151
|
}
|
2159
2152
|
),
|
2160
|
-
/* @__PURE__ */ jsx(Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5", children: state.segments.map((segment) => /* @__PURE__ */ jsx(
|
2153
|
+
/* @__PURE__ */ jsx(Flex, { ...fieldProps, ref, paddingTop: "3", paddingBottom: "0.5", children: state.segments.map((segment) => /* @__PURE__ */ jsx(
|
2154
|
+
DateTimeSegment,
|
2155
|
+
{
|
2156
|
+
segment,
|
2157
|
+
state
|
2158
|
+
},
|
2159
|
+
JSON.stringify(segment)
|
2160
|
+
)) }),
|
2161
2161
|
/* @__PURE__ */ jsx(
|
2162
2162
|
"input",
|
2163
2163
|
{
|
@@ -3929,7 +3929,7 @@ var ExternalIcon = ({
|
|
3929
3929
|
label,
|
3930
3930
|
size
|
3931
3931
|
}) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
3932
|
-
size === "lg" || size === "md" ? /* @__PURE__ */ jsx(LinkOutOutline24Icon, { "aria-hidden": true }) : /* @__PURE__ */ jsx(LinkOutOutline18Icon, { "aria-hidden": true }),
|
3932
|
+
size === "lg" || size === "md" ? /* @__PURE__ */ jsx(LinkOutOutline24Icon, { "aria-hidden": true, display: "inline" }) : /* @__PURE__ */ jsx(LinkOutOutline18Icon, { "aria-hidden": true, display: "inline" }),
|
3933
3933
|
/* @__PURE__ */ jsx(VisuallyHidden, { children: label })
|
3934
3934
|
] });
|
3935
3935
|
var TextLink = forwardRef(
|
@@ -5594,32 +5594,22 @@ var inputRecipe = defineRecipe({
|
|
5594
5594
|
});
|
5595
5595
|
var linkRecipe = defineRecipe({
|
5596
5596
|
base: {
|
5597
|
-
|
5598
|
-
transitionDuration: "fast",
|
5599
|
-
transitionTimingFunction: "ease-out",
|
5600
|
-
cursor: "pointer",
|
5601
|
-
backgroundImage: "linear-gradient(currentColor, currentColor)",
|
5602
|
-
backgroundSize: "100% 1px",
|
5603
|
-
backgroundPosition: "0 100%",
|
5604
|
-
backgroundRepeat: "no-repeat",
|
5605
|
-
borderRadius: "none",
|
5606
|
-
paddingX: "2px",
|
5607
|
-
paddingY: "0",
|
5597
|
+
display: "inline",
|
5608
5598
|
color: "inherit",
|
5609
|
-
|
5610
|
-
|
5611
|
-
|
5612
|
-
|
5613
|
-
|
5614
|
-
|
5615
|
-
"
|
5616
|
-
|
5617
|
-
|
5618
|
-
|
5619
|
-
|
5599
|
+
cursor: "pointer",
|
5600
|
+
textDecorationLine: "underline",
|
5601
|
+
textDecorationSkipInk: "none",
|
5602
|
+
textUnderlineOffset: "auto",
|
5603
|
+
textUnderlinePosition: "from-font",
|
5604
|
+
gap: "0.5",
|
5605
|
+
borderRadius: "xs",
|
5606
|
+
paddingX: "0.5",
|
5607
|
+
whiteSpace: "normal",
|
5608
|
+
wordBreak: "break-word",
|
5609
|
+
_hover: {
|
5610
|
+
textDecoration: "none"
|
5620
5611
|
},
|
5621
5612
|
"& svg": {
|
5622
|
-
display: "inline-block",
|
5623
5613
|
width: "1.125em",
|
5624
5614
|
height: "1.125em",
|
5625
5615
|
position: "relative",
|
@@ -6728,6 +6718,8 @@ var checkboxSlotRecipe = defineSlotRecipe({
|
|
6728
6718
|
slots: checkboxAnatomy.keys(),
|
6729
6719
|
base: {
|
6730
6720
|
root: {
|
6721
|
+
whiteSpace: "normal",
|
6722
|
+
wordBreak: "break-word",
|
6731
6723
|
display: "flex",
|
6732
6724
|
gap: 1.5,
|
6733
6725
|
_hover: {
|
@@ -6754,6 +6746,7 @@ var checkboxSlotRecipe = defineSlotRecipe({
|
|
6754
6746
|
control: {
|
6755
6747
|
width: 4,
|
6756
6748
|
height: 4,
|
6749
|
+
flexShrink: 0,
|
6757
6750
|
transitionProperty: "background, border-color",
|
6758
6751
|
transitionDuration: "moderate",
|
6759
6752
|
border: "2px solid",
|
@@ -6793,7 +6786,6 @@ var checkboxSlotRecipe = defineSlotRecipe({
|
|
6793
6786
|
}
|
6794
6787
|
},
|
6795
6788
|
label: {
|
6796
|
-
userSelect: "none",
|
6797
6789
|
_disabled: { opacity: 0.4 }
|
6798
6790
|
}
|
6799
6791
|
}
|