@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/dist/index.d.cts
CHANGED
@@ -895,6 +895,7 @@ declare const DrawerCloseTrigger: React$1.ForwardRefExoticComponent<Drawer$1.Clo
|
|
895
895
|
declare const DrawerBackTrigger: React$1.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
896
896
|
declare const DrawerFullScreenHeader: React$1.ForwardRefExoticComponent<Drawer$1.HeaderProps & {
|
897
897
|
backTrigger?: boolean;
|
898
|
+
closeTrigger?: boolean;
|
898
899
|
title?: string;
|
899
900
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
900
901
|
declare const Drawer: (props: DrawerProps) => react_jsx_runtime.JSX.Element;
|
@@ -2114,6 +2115,12 @@ declare const lineIconSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon" |
|
|
2114
2115
|
title: {
|
2115
2116
|
color: "text";
|
2116
2117
|
};
|
2118
|
+
iconContainer: {
|
2119
|
+
backgroundColor: "none";
|
2120
|
+
};
|
2121
|
+
icon: {
|
2122
|
+
color: "text";
|
2123
|
+
};
|
2117
2124
|
};
|
2118
2125
|
custom: {
|
2119
2126
|
iconContainer: {};
|
@@ -2263,7 +2270,7 @@ declare const travelTagSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon"
|
|
2263
2270
|
walk: {
|
2264
2271
|
textContainer: {
|
2265
2272
|
position: "absolute";
|
2266
|
-
left: "
|
2273
|
+
left: "0.875rem";
|
2267
2274
|
bottom: number;
|
2268
2275
|
};
|
2269
2276
|
title: {
|
package/dist/index.d.ts
CHANGED
@@ -895,6 +895,7 @@ declare const DrawerCloseTrigger: React$1.ForwardRefExoticComponent<Drawer$1.Clo
|
|
895
895
|
declare const DrawerBackTrigger: React$1.ForwardRefExoticComponent<Drawer$1.CloseTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
896
896
|
declare const DrawerFullScreenHeader: React$1.ForwardRefExoticComponent<Drawer$1.HeaderProps & {
|
897
897
|
backTrigger?: boolean;
|
898
|
+
closeTrigger?: boolean;
|
898
899
|
title?: string;
|
899
900
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
900
901
|
declare const Drawer: (props: DrawerProps) => react_jsx_runtime.JSX.Element;
|
@@ -2114,6 +2115,12 @@ declare const lineIconSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon" |
|
|
2114
2115
|
title: {
|
2115
2116
|
color: "text";
|
2116
2117
|
};
|
2118
|
+
iconContainer: {
|
2119
|
+
backgroundColor: "none";
|
2120
|
+
};
|
2121
|
+
icon: {
|
2122
|
+
color: "text";
|
2123
|
+
};
|
2117
2124
|
};
|
2118
2125
|
custom: {
|
2119
2126
|
iconContainer: {};
|
@@ -2263,7 +2270,7 @@ declare const travelTagSlotRecipe: _chakra_ui_react.SlotRecipeDefinition<"icon"
|
|
2263
2270
|
walk: {
|
2264
2271
|
textContainer: {
|
2265
2272
|
position: "absolute";
|
2266
|
-
left: "
|
2273
|
+
left: "0.875rem";
|
2267
2274
|
bottom: number;
|
2268
2275
|
};
|
2269
2276
|
title: {
|
package/dist/index.mjs
CHANGED
@@ -1062,6 +1062,7 @@ var Alert = forwardRef((props, ref) => {
|
|
1062
1062
|
children && /* @__PURE__ */ jsx(
|
1063
1063
|
Alert$1.Description,
|
1064
1064
|
{
|
1065
|
+
width: "100%",
|
1065
1066
|
paddingLeft: title ? 0.5 : 0,
|
1066
1067
|
paddingRight: closable ? 6 : 0,
|
1067
1068
|
children
|
@@ -2146,9 +2147,16 @@ var TimeField = ({ state, ...props }) => {
|
|
2146
2147
|
style: {
|
2147
2148
|
marginBottom: 0,
|
2148
2149
|
fontSize: "mobile.xs",
|
2150
|
+
top: 0,
|
2149
2151
|
cursor: "text",
|
2152
|
+
left: "50%",
|
2153
|
+
transform: "translateX(-50%)",
|
2150
2154
|
position: "absolute",
|
2151
|
-
paddingTop: "2px"
|
2155
|
+
paddingTop: "2px",
|
2156
|
+
whiteSpace: "nowrap",
|
2157
|
+
overflow: "hidden",
|
2158
|
+
textOverflow: "ellipsis",
|
2159
|
+
maxWidth: "80%"
|
2152
2160
|
},
|
2153
2161
|
children: props.label
|
2154
2162
|
}
|
@@ -2235,6 +2243,7 @@ var TimePicker = ({
|
|
2235
2243
|
"aria-disabled": isDisabled,
|
2236
2244
|
"aria-live": "assertive",
|
2237
2245
|
"aria-label": ariaLabel,
|
2246
|
+
position: "relative",
|
2238
2247
|
...boxProps,
|
2239
2248
|
children: [
|
2240
2249
|
/* @__PURE__ */ jsx(
|
@@ -2248,7 +2257,8 @@ var TimePicker = ({
|
|
2248
2257
|
icon: /* @__PURE__ */ jsx(DropdownLeftFill18Icon, {}),
|
2249
2258
|
onClick: handleBackwardsClick,
|
2250
2259
|
disabled: isDisabled,
|
2251
|
-
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
2260
|
+
style: isDisabled ? { backgroundColor: "transparent" } : {},
|
2261
|
+
zIndex: 1
|
2252
2262
|
}
|
2253
2263
|
),
|
2254
2264
|
/* @__PURE__ */ jsx(TimeField, { label, state, name }),
|
@@ -2263,7 +2273,8 @@ var TimePicker = ({
|
|
2263
2273
|
icon: /* @__PURE__ */ jsx(DropdownRightFill18Icon, {}),
|
2264
2274
|
onClick: handleForwardClick,
|
2265
2275
|
disabled: isDisabled,
|
2266
|
-
style: isDisabled ? { backgroundColor: "transparent" } : {}
|
2276
|
+
style: isDisabled ? { backgroundColor: "transparent" } : {},
|
2277
|
+
zIndex: 1
|
2267
2278
|
}
|
2268
2279
|
)
|
2269
2280
|
]
|
@@ -2382,11 +2393,11 @@ var DrawerBackTrigger = forwardRef((props, ref) => {
|
|
2382
2393
|
});
|
2383
2394
|
DrawerBackTrigger.displayName = "DrawerBackTrigger";
|
2384
2395
|
var DrawerFullScreenHeader = forwardRef((props, ref) => {
|
2385
|
-
const { backTrigger = true, title } = props;
|
2396
|
+
const { backTrigger = true, closeTrigger = true, title } = props;
|
2386
2397
|
return /* @__PURE__ */ jsx(Drawer$1.Header, { ...props, ref, asChild: true, children: /* @__PURE__ */ jsxs(Grid, { templateColumns: "1fr auto 1fr", height: "auto", paddingX: "8", children: [
|
2387
2398
|
/* @__PURE__ */ jsx(GridItem, { width: "full", alignSelf: "center", children: backTrigger && /* @__PURE__ */ jsx(DrawerBackTrigger, {}) }),
|
2388
2399
|
/* @__PURE__ */ jsx(GridItem, { width: "full", alignSelf: "end", asChild: true, children: title && /* @__PURE__ */ jsx(DrawerTitle, { children: title }) }),
|
2389
|
-
/* @__PURE__ */ jsx(GridItem, { width: "full", alignSelf: "end", children: /* @__PURE__ */ jsx(DrawerCloseTrigger, { justifySelf: "end", top: "0" }) })
|
2400
|
+
closeTrigger && /* @__PURE__ */ jsx(GridItem, { width: "full", alignSelf: "end", children: /* @__PURE__ */ jsx(DrawerCloseTrigger, { justifySelf: "end", top: "0" }) })
|
2390
2401
|
] }) });
|
2391
2402
|
});
|
2392
2403
|
DrawerFullScreenHeader.displayName = "DrawerFullScreenHeader";
|
@@ -3687,16 +3698,9 @@ var PressableCard = forwardRef(
|
|
3687
3698
|
PressableCard.displayName = "PressableCard";
|
3688
3699
|
var RadioCard = forwardRef(
|
3689
3700
|
(props, ref) => {
|
3690
|
-
const { inputProps, children
|
3701
|
+
const { inputProps, children } = props;
|
3691
3702
|
return /* @__PURE__ */ jsxs(RadioCard$1.Item, { ...props, children: [
|
3692
|
-
/* @__PURE__ */ jsx(
|
3693
|
-
RadioCard$1.ItemHiddenInput,
|
3694
|
-
{
|
3695
|
-
"aria-label": ariaLabel ?? value,
|
3696
|
-
ref,
|
3697
|
-
...inputProps
|
3698
|
-
}
|
3699
|
-
),
|
3703
|
+
/* @__PURE__ */ jsx(RadioCard$1.ItemHiddenInput, { ref, ...inputProps }),
|
3700
3704
|
/* @__PURE__ */ jsx(RadioCard$1.ItemControl, { children })
|
3701
3705
|
] });
|
3702
3706
|
}
|
@@ -3838,7 +3842,7 @@ var LineIcon = forwardRef(
|
|
3838
3842
|
return target === "travelTag" ? 0.5 : 1;
|
3839
3843
|
};
|
3840
3844
|
const borderContainer = () => {
|
3841
|
-
return variant === "walk" && target === "travelTag" ? 0 :
|
3845
|
+
return variant === "walk" && target === "travelTag" ? 0 : "1px";
|
3842
3846
|
};
|
3843
3847
|
const Icon3 = getCorrectIcon({
|
3844
3848
|
variant: (
|
@@ -3983,18 +3987,42 @@ var TextLink = forwardRef(
|
|
3983
3987
|
const isExternal = external ?? Boolean((href == null ? void 0 : href.startsWith("http://")) || (href == null ? void 0 : href.startsWith("https://")));
|
3984
3988
|
const externalLabel = t ? t(texts18.externalLink) : texts18.externalLink.en;
|
3985
3989
|
if (props.asChild && isValidElement(children)) {
|
3986
|
-
return /* @__PURE__ */ jsx(
|
3987
|
-
|
3988
|
-
|
3989
|
-
|
3990
|
-
|
3991
|
-
|
3992
|
-
|
3990
|
+
return /* @__PURE__ */ jsx(
|
3991
|
+
Link,
|
3992
|
+
{
|
3993
|
+
href,
|
3994
|
+
...props,
|
3995
|
+
ref,
|
3996
|
+
...isExternal && {
|
3997
|
+
target: "_blank",
|
3998
|
+
rel: "noopener noreferrer"
|
3999
|
+
},
|
4000
|
+
children: cloneElement(children, {
|
4001
|
+
...children.props,
|
4002
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
4003
|
+
children.props.children,
|
4004
|
+
isExternal && /* @__PURE__ */ jsx(ExternalIcon, { label: externalLabel, size: props.size })
|
4005
|
+
] })
|
4006
|
+
})
|
4007
|
+
}
|
4008
|
+
);
|
3993
4009
|
}
|
3994
|
-
return /* @__PURE__ */ jsxs(
|
3995
|
-
|
3996
|
-
|
3997
|
-
|
4010
|
+
return /* @__PURE__ */ jsxs(
|
4011
|
+
Link,
|
4012
|
+
{
|
4013
|
+
href,
|
4014
|
+
...props,
|
4015
|
+
ref,
|
4016
|
+
...isExternal && {
|
4017
|
+
target: "_blank",
|
4018
|
+
rel: "noopener noreferrer"
|
4019
|
+
},
|
4020
|
+
children: [
|
4021
|
+
children,
|
4022
|
+
isExternal && /* @__PURE__ */ jsx(ExternalIcon, { label: externalLabel, size: props.size })
|
4023
|
+
]
|
4024
|
+
}
|
4025
|
+
);
|
3998
4026
|
}
|
3999
4027
|
);
|
4000
4028
|
TextLink.displayName = "TextLink";
|
@@ -7485,7 +7513,7 @@ var drawerSlotRecipe = defineSlotRecipe({
|
|
7485
7513
|
maxHeight: "100dvh",
|
7486
7514
|
color: "inherit",
|
7487
7515
|
boxShadow: "lg",
|
7488
|
-
minHeight: ["
|
7516
|
+
minHeight: ["10rem", null, null, "auto"],
|
7489
7517
|
_open: {
|
7490
7518
|
animationDuration: "slowest",
|
7491
7519
|
animationTimingFunction: "ease-in-smooth"
|
@@ -7499,16 +7527,16 @@ var drawerSlotRecipe = defineSlotRecipe({
|
|
7499
7527
|
display: "flex",
|
7500
7528
|
alignItems: "center",
|
7501
7529
|
justifyContent: "space-between",
|
7502
|
-
paddingX: "5",
|
7530
|
+
paddingX: ["3", null, null, "5"],
|
7503
7531
|
paddingBottom: "1"
|
7504
7532
|
},
|
7505
7533
|
body: {
|
7506
|
-
paddingX: "5",
|
7534
|
+
paddingX: ["3", null, null, "5"],
|
7507
7535
|
paddingY: ["1", null, null, "2"],
|
7508
7536
|
flex: "1",
|
7509
7537
|
overflow: "auto",
|
7510
7538
|
fontSize: ["xs", null, null, "sm"],
|
7511
|
-
minHeight: ["
|
7539
|
+
minHeight: ["2", null, null, "auto"]
|
7512
7540
|
},
|
7513
7541
|
footer: {
|
7514
7542
|
display: "flex",
|
@@ -7525,8 +7553,8 @@ var drawerSlotRecipe = defineSlotRecipe({
|
|
7525
7553
|
},
|
7526
7554
|
closeTrigger: {
|
7527
7555
|
position: "absolute",
|
7528
|
-
top: "
|
7529
|
-
|
7556
|
+
top: "0",
|
7557
|
+
right: "0"
|
7530
7558
|
}
|
7531
7559
|
},
|
7532
7560
|
variants: {
|
@@ -7952,7 +7980,7 @@ var travelTagSlotRecipe = defineSlotRecipe({
|
|
7952
7980
|
walk: {
|
7953
7981
|
textContainer: {
|
7954
7982
|
position: "absolute",
|
7955
|
-
left: "
|
7983
|
+
left: "0.875rem",
|
7956
7984
|
bottom: 0
|
7957
7985
|
},
|
7958
7986
|
title: {
|
@@ -8150,6 +8178,12 @@ var lineIconSlotRecipe = defineSlotRecipe({
|
|
8150
8178
|
walk: {
|
8151
8179
|
title: {
|
8152
8180
|
color: "text"
|
8181
|
+
},
|
8182
|
+
iconContainer: {
|
8183
|
+
backgroundColor: "none"
|
8184
|
+
},
|
8185
|
+
icon: {
|
8186
|
+
color: "text"
|
8153
8187
|
}
|
8154
8188
|
},
|
8155
8189
|
custom: {
|