@vygruppen/spor-react 12.10.2 → 12.10.4
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 +12 -12
- package/.turbo/turbo-postinstall.log +1 -1
- package/CHANGELOG.md +15 -0
- package/dist/index.cjs +67 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.mjs +67 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/alert/Alert.tsx +1 -0
- package/src/datepicker/TimeField.tsx +7 -0
- package/src/datepicker/TimePicker.tsx +3 -0
- package/src/dialog/Drawer.tsx +6 -4
- package/src/dialog/types.ts +1 -0
- package/src/layout/RadioCard.tsx +2 -6
- package/src/linjetag/LineIcon.tsx +1 -1
- package/src/link/TextLink.tsx +18 -2
- package/src/theme/slot-recipes/drawer.ts +6 -6
- package/src/theme/slot-recipes/line-icon.ts +6 -0
- package/src/theme/slot-recipes/travel-tag.ts +2 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@12.10.
|
2
|
+
> @vygruppen/spor-react@12.10.4 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,18 +11,18 @@ CLI Cleaning output folder
|
|
11
11
|
ESM Build start
|
12
12
|
CJS Build start
|
13
13
|
DTS Build start
|
14
|
-
|
15
|
-
ESM dist/icons/index.mjs 110.00 B
|
16
|
-
ESM dist/icons/index.mjs.map 157.00 B
|
17
|
-
ESM dist/index.mjs.map 628.47 KB
|
18
|
-
ESM ⚡️ Build success in 2673ms
|
19
|
-
CJS dist/index.cjs 314.43 KB
|
14
|
+
CJS dist/index.cjs 315.17 KB
|
20
15
|
CJS dist/icons/index.cjs 381.00 B
|
21
|
-
CJS dist/index.cjs.map
|
16
|
+
CJS dist/index.cjs.map 629.70 KB
|
22
17
|
CJS dist/icons/index.cjs.map 157.00 B
|
23
|
-
CJS ⚡️ Build success in
|
24
|
-
|
18
|
+
CJS ⚡️ Build success in 2647ms
|
19
|
+
ESM dist/index.mjs 293.78 KB
|
20
|
+
ESM dist/icons/index.mjs 110.00 B
|
21
|
+
ESM dist/index.mjs.map 629.70 KB
|
22
|
+
ESM dist/icons/index.mjs.map 157.00 B
|
23
|
+
ESM ⚡️ Build success in 2649ms
|
24
|
+
DTS ⚡️ Build success in 18639ms
|
25
25
|
DTS dist/icons/index.d.ts 44.00 B
|
26
|
-
DTS dist/index.d.ts 156.
|
26
|
+
DTS dist/index.d.ts 156.18 KB
|
27
27
|
DTS dist/icons/index.d.cts 44.00 B
|
28
|
-
DTS dist/index.d.cts 156.
|
28
|
+
DTS dist/index.d.cts 156.18 KB
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# @vygruppen/spor-react
|
2
2
|
|
3
|
+
## 12.10.4
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 220e413: Update border style for LineIcon and adjust travel tag position
|
8
|
+
|
9
|
+
## 12.10.3
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- 3329fa1: TextLink: Open in a new tab when `external` is true
|
14
|
+
Drawer: Correct close button placement and mobile padding. Add prop to conditionally show closeTrigger on fullscreeen drawer.
|
15
|
+
- 2be55a9: TimePicker: Fix label overlapping buttons and center it
|
16
|
+
RadioCard: Fix value read by screen reader, not content of radio button.
|
17
|
+
|
3
18
|
## 12.10.2
|
4
19
|
|
5
20
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
@@ -1082,6 +1082,7 @@ var Alert = React27.forwardRef((props, ref) => {
|
|
1082
1082
|
children && /* @__PURE__ */ jsxRuntime.jsx(
|
1083
1083
|
react.Alert.Description,
|
1084
1084
|
{
|
1085
|
+
width: "100%",
|
1085
1086
|
paddingLeft: title ? 0.5 : 0,
|
1086
1087
|
paddingRight: closable ? 6 : 0,
|
1087
1088
|
children
|
@@ -2166,9 +2167,16 @@ var TimeField = ({ state, ...props }) => {
|
|
2166
2167
|
style: {
|
2167
2168
|
marginBottom: 0,
|
2168
2169
|
fontSize: "mobile.xs",
|
2170
|
+
top: 0,
|
2169
2171
|
cursor: "text",
|
2172
|
+
left: "50%",
|
2173
|
+
transform: "translateX(-50%)",
|
2170
2174
|
position: "absolute",
|
2171
|
-
paddingTop: "2px"
|
2175
|
+
paddingTop: "2px",
|
2176
|
+
whiteSpace: "nowrap",
|
2177
|
+
overflow: "hidden",
|
2178
|
+
textOverflow: "ellipsis",
|
2179
|
+
maxWidth: "80%"
|
2172
2180
|
},
|
2173
2181
|
children: props.label
|
2174
2182
|
}
|
@@ -2255,6 +2263,7 @@ var TimePicker = ({
|
|
2255
2263
|
"aria-disabled": isDisabled,
|
2256
2264
|
"aria-live": "assertive",
|
2257
2265
|
"aria-label": ariaLabel,
|
2266
|
+
position: "relative",
|
2258
2267
|
...boxProps,
|
2259
2268
|
children: [
|
2260
2269
|
/* @__PURE__ */ jsxRuntime.jsx(
|
@@ -2268,7 +2277,8 @@ var TimePicker = ({
|
|
2268
2277
|
icon: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.DropdownLeftFill18Icon, {}),
|
2269
2278
|
onClick: handleBackwardsClick,
|
2270
2279
|
disabled: isDisabled,
|
2271
|
-
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
2280
|
+
style: isDisabled ? { backgroundColor: "transparent" } : {},
|
2281
|
+
zIndex: 1
|
2272
2282
|
}
|
2273
2283
|
),
|
2274
2284
|
/* @__PURE__ */ jsxRuntime.jsx(TimeField, { label, state, name }),
|
@@ -2283,7 +2293,8 @@ var TimePicker = ({
|
|
2283
2293
|
icon: /* @__PURE__ */ jsxRuntime.jsx(sporIconReact.DropdownRightFill18Icon, {}),
|
2284
2294
|
onClick: handleForwardClick,
|
2285
2295
|
disabled: isDisabled,
|
2286
|
-
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
2296
|
+
style: isDisabled ? { backgroundColor: "transparent" } : {},
|
2297
|
+
zIndex: 1
|
2287
2298
|
}
|
2288
2299
|
)
|
2289
2300
|
]
|
@@ -2402,11 +2413,11 @@ var DrawerBackTrigger = React27.forwardRef((props, ref) => {
|
|
2402
2413
|
});
|
2403
2414
|
DrawerBackTrigger.displayName = "DrawerBackTrigger";
|
2404
2415
|
var DrawerFullScreenHeader = React27.forwardRef((props, ref) => {
|
2405
|
-
const { backTrigger = true, title } = props;
|
2416
|
+
const { backTrigger = true, closeTrigger = true, title } = props;
|
2406
2417
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Drawer.Header, { ...props, ref, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Grid, { templateColumns: "1fr auto 1fr", height: "auto", paddingX: "8", children: [
|
2407
2418
|
/* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { width: "full", alignSelf: "center", children: backTrigger && /* @__PURE__ */ jsxRuntime.jsx(DrawerBackTrigger, {}) }),
|
2408
2419
|
/* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { width: "full", alignSelf: "end", asChild: true, children: title && /* @__PURE__ */ jsxRuntime.jsx(DrawerTitle, { children: title }) }),
|
2409
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { width: "full", alignSelf: "end", children: /* @__PURE__ */ jsxRuntime.jsx(DrawerCloseTrigger, { justifySelf: "end", top: "0" }) })
|
2420
|
+
closeTrigger && /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { width: "full", alignSelf: "end", children: /* @__PURE__ */ jsxRuntime.jsx(DrawerCloseTrigger, { justifySelf: "end", top: "0" }) })
|
2410
2421
|
] }) });
|
2411
2422
|
});
|
2412
2423
|
DrawerFullScreenHeader.displayName = "DrawerFullScreenHeader";
|
@@ -3707,16 +3718,9 @@ var PressableCard = React27.forwardRef(
|
|
3707
3718
|
PressableCard.displayName = "PressableCard";
|
3708
3719
|
var RadioCard = React27.forwardRef(
|
3709
3720
|
(props, ref) => {
|
3710
|
-
const { inputProps, children
|
3721
|
+
const { inputProps, children } = props;
|
3711
3722
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioCard.Item, { ...props, children: [
|
3712
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
3713
|
-
react.RadioCard.ItemHiddenInput,
|
3714
|
-
{
|
3715
|
-
"aria-label": ariaLabel ?? value,
|
3716
|
-
ref,
|
3717
|
-
...inputProps
|
3718
|
-
}
|
3719
|
-
),
|
3723
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.RadioCard.ItemHiddenInput, { ref, ...inputProps }),
|
3720
3724
|
/* @__PURE__ */ jsxRuntime.jsx(react.RadioCard.ItemControl, { children })
|
3721
3725
|
] });
|
3722
3726
|
}
|
@@ -3858,7 +3862,7 @@ var LineIcon = React27.forwardRef(
|
|
3858
3862
|
return target === "travelTag" ? 0.5 : 1;
|
3859
3863
|
};
|
3860
3864
|
const borderContainer = () => {
|
3861
|
-
return variant === "walk" && target === "travelTag" ? 0 :
|
3865
|
+
return variant === "walk" && target === "travelTag" ? 0 : "1px";
|
3862
3866
|
};
|
3863
3867
|
const Icon3 = getCorrectIcon({
|
3864
3868
|
variant: (
|
@@ -4003,18 +4007,42 @@ var TextLink = React27.forwardRef(
|
|
4003
4007
|
const isExternal = external ?? Boolean((href == null ? void 0 : href.startsWith("http://")) || (href == null ? void 0 : href.startsWith("https://")));
|
4004
4008
|
const externalLabel = t ? t(texts18.externalLink) : texts18.externalLink.en;
|
4005
4009
|
if (props.asChild && React27.isValidElement(children)) {
|
4006
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
4007
|
-
|
4008
|
-
|
4009
|
-
|
4010
|
-
|
4011
|
-
|
4012
|
-
|
4010
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
4011
|
+
react.Link,
|
4012
|
+
{
|
4013
|
+
href,
|
4014
|
+
...props,
|
4015
|
+
ref,
|
4016
|
+
...isExternal && {
|
4017
|
+
target: "_blank",
|
4018
|
+
rel: "noopener noreferrer"
|
4019
|
+
},
|
4020
|
+
children: React27.cloneElement(children, {
|
4021
|
+
...children.props,
|
4022
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
4023
|
+
children.props.children,
|
4024
|
+
isExternal && /* @__PURE__ */ jsxRuntime.jsx(ExternalIcon, { label: externalLabel, size: props.size })
|
4025
|
+
] })
|
4026
|
+
})
|
4027
|
+
}
|
4028
|
+
);
|
4013
4029
|
}
|
4014
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
4015
|
-
|
4016
|
-
|
4017
|
-
|
4030
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
4031
|
+
react.Link,
|
4032
|
+
{
|
4033
|
+
href,
|
4034
|
+
...props,
|
4035
|
+
ref,
|
4036
|
+
...isExternal && {
|
4037
|
+
target: "_blank",
|
4038
|
+
rel: "noopener noreferrer"
|
4039
|
+
},
|
4040
|
+
children: [
|
4041
|
+
children,
|
4042
|
+
isExternal && /* @__PURE__ */ jsxRuntime.jsx(ExternalIcon, { label: externalLabel, size: props.size })
|
4043
|
+
]
|
4044
|
+
}
|
4045
|
+
);
|
4018
4046
|
}
|
4019
4047
|
);
|
4020
4048
|
TextLink.displayName = "TextLink";
|
@@ -7505,7 +7533,7 @@ var drawerSlotRecipe = react.defineSlotRecipe({
|
|
7505
7533
|
maxHeight: "100dvh",
|
7506
7534
|
color: "inherit",
|
7507
7535
|
boxShadow: "lg",
|
7508
|
-
minHeight: ["
|
7536
|
+
minHeight: ["10rem", null, null, "auto"],
|
7509
7537
|
_open: {
|
7510
7538
|
animationDuration: "slowest",
|
7511
7539
|
animationTimingFunction: "ease-in-smooth"
|
@@ -7519,16 +7547,16 @@ var drawerSlotRecipe = react.defineSlotRecipe({
|
|
7519
7547
|
display: "flex",
|
7520
7548
|
alignItems: "center",
|
7521
7549
|
justifyContent: "space-between",
|
7522
|
-
paddingX: "5",
|
7550
|
+
paddingX: ["3", null, null, "5"],
|
7523
7551
|
paddingBottom: "1"
|
7524
7552
|
},
|
7525
7553
|
body: {
|
7526
|
-
paddingX: "5",
|
7554
|
+
paddingX: ["3", null, null, "5"],
|
7527
7555
|
paddingY: ["1", null, null, "2"],
|
7528
7556
|
flex: "1",
|
7529
7557
|
overflow: "auto",
|
7530
7558
|
fontSize: ["xs", null, null, "sm"],
|
7531
|
-
minHeight: ["
|
7559
|
+
minHeight: ["2", null, null, "auto"]
|
7532
7560
|
},
|
7533
7561
|
footer: {
|
7534
7562
|
display: "flex",
|
@@ -7545,8 +7573,8 @@ var drawerSlotRecipe = react.defineSlotRecipe({
|
|
7545
7573
|
},
|
7546
7574
|
closeTrigger: {
|
7547
7575
|
position: "absolute",
|
7548
|
-
top: "
|
7549
|
-
|
7576
|
+
top: "0",
|
7577
|
+
right: "0"
|
7550
7578
|
}
|
7551
7579
|
},
|
7552
7580
|
variants: {
|
@@ -7972,7 +8000,7 @@ var travelTagSlotRecipe = react.defineSlotRecipe({
|
|
7972
8000
|
walk: {
|
7973
8001
|
textContainer: {
|
7974
8002
|
position: "absolute",
|
7975
|
-
left: "
|
8003
|
+
left: "0.875rem",
|
7976
8004
|
bottom: 0
|
7977
8005
|
},
|
7978
8006
|
title: {
|
@@ -8170,6 +8198,12 @@ var lineIconSlotRecipe = react.defineSlotRecipe({
|
|
8170
8198
|
walk: {
|
8171
8199
|
title: {
|
8172
8200
|
color: "text"
|
8201
|
+
},
|
8202
|
+
iconContainer: {
|
8203
|
+
backgroundColor: "none"
|
8204
|
+
},
|
8205
|
+
icon: {
|
8206
|
+
color: "text"
|
8173
8207
|
}
|
8174
8208
|
},
|
8175
8209
|
custom: {
|