@janbox/storefront-ui 4.0.6 → 4.0.8
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/dist/components/scroll-view.d.ts +3 -2
- package/dist/components/scroll-view.js +5 -3
- package/dist/components/virtualized-list.d.ts +3 -3
- package/dist/lib/accordion/accordion-content/accordion-content.js +1 -1
- package/dist/lib/button/button.js +2 -2
- package/dist/lib/cascader/cascader-floating-content.d.ts +1 -1
- package/dist/lib/cascader/cascader-floating-content.js +52 -73
- package/dist/lib/cascader/cascader.d.ts +1 -1
- package/dist/lib/cascader/cascader.js +10 -12
- package/dist/lib/collapse/collapse.d.ts +1 -1
- package/dist/lib/collapse/collapse.js +12 -4
- package/dist/lib/collapse/types.d.ts +3 -3
- package/dist/lib/count-up/README.md +22 -0
- package/dist/lib/count-up/count-up.d.ts +1 -1
- package/dist/lib/count-up/count-up.js +22 -5
- package/dist/lib/count-up/types.d.ts +9 -3
- package/dist/lib/date-picker/date-picker.js +25 -10
- package/dist/lib/dialog/dialog/dialog.d.ts +1 -1
- package/dist/lib/dialog/dialog/dialog.js +25 -28
- package/dist/lib/dialog/dialog-body/dialog-body.d.ts +1 -1
- package/dist/lib/dialog/dialog-body/dialog-body.js +10 -11
- package/dist/lib/dialog/dialog-body/types.d.ts +2 -3
- package/dist/lib/dialog/dialog-close/dialog-close.d.ts +1 -1
- package/dist/lib/dialog/dialog-footer/dialog-footer.js +2 -3
- package/dist/lib/dialog/dialog-header/dialog-header.d.ts +1 -1
- package/dist/lib/dialog/dialog-header/dialog-header.js +24 -27
- package/dist/lib/drawer/drawer/drawer.d.ts +1 -1
- package/dist/lib/drawer/drawer/drawer.js +39 -26
- package/dist/lib/drawer/drawer-close/drawer-close.d.ts +1 -1
- package/dist/lib/filter-panel/checkbox-filter-panel.d.ts +1 -1
- package/dist/lib/filter-panel/checkbox-filter-panel.js +2 -2
- package/dist/lib/filter-panel/filter-panel.d.ts +1 -1
- package/dist/lib/filter-panel/filter-panel.js +30 -15
- package/dist/lib/filter-panel/radio-filter-panel.d.ts +1 -1
- package/dist/lib/filter-panel/radio-filter-panel.js +3 -3
- package/dist/lib/floating/floating-close/floating-close.d.ts +1 -1
- package/dist/lib/floating/floating-close/floating-close.js +3 -2
- package/dist/lib/floating/floating-content/floating-content.d.ts +1 -1
- package/dist/lib/floating/floating-content/floating-content.js +8 -6
- package/dist/lib/form-label/form-label.d.ts +4 -3
- package/dist/lib/form-label/form-label.js +10 -8
- package/dist/lib/highlight-words/highlight-words.d.ts +1 -1
- package/dist/lib/highlight-words/highlight-words.js +3 -2
- package/dist/lib/input/input.js +1 -3
- package/dist/lib/lightbox/lightbox.d.ts +1 -1
- package/dist/lib/lightbox/lightbox.js +44 -32
- package/dist/lib/linear-progress/linear-progress.d.ts +1 -1
- package/dist/lib/linear-progress/linear-progress.js +50 -51
- package/dist/lib/loading/image-skeleton/image-skeleton.d.ts +1 -1
- package/dist/lib/loading/image-skeleton/image-skeleton.js +9 -4
- package/dist/lib/loading/loading-overlay/loading-overlay.d.ts +1 -1
- package/dist/lib/loading/loading-overlay/loading-overlay.js +2 -2
- package/dist/lib/menu/menu-item/menu-item.d.ts +1 -1
- package/dist/lib/menu/menu-item/menu-item.js +2 -2
- package/dist/lib/multiple-select/multiple-select.d.ts +1 -1
- package/dist/lib/multiple-select/multiple-select.js +38 -39
- package/dist/lib/notifications/notifications.d.ts +1 -1
- package/dist/lib/notifications/notifications.js +7 -7
- package/dist/lib/otp-input/otp-input.d.ts +1 -1
- package/dist/lib/otp-input/otp-input.js +43 -30
- package/dist/lib/pagination/pagination.d.ts +1 -1
- package/dist/lib/pagination/pagination.js +60 -54
- package/dist/lib/phone-input/phone-input.js +12 -11
- package/dist/lib/popover/popover-close/popover-close.d.ts +1 -1
- package/dist/lib/progress/progress.d.ts +1 -1
- package/dist/lib/progress/progress.js +26 -29
- package/dist/lib/progress/types.d.ts +5 -4
- package/dist/lib/select/select.js +15 -11
- package/dist/lib/star-rating/README.md +11 -3
- package/dist/lib/star-rating/star-rating.d.ts +1 -1
- package/dist/lib/star-rating/star-rating.js +40 -28
- package/dist/lib/star-rating/types.d.ts +3 -4
- package/dist/lib/stepper/step.js +8 -6
- package/dist/lib/stepper/stepper.d.ts +1 -1
- package/dist/lib/stepper/stepper.js +10 -9
- package/dist/lib/stepper/types.d.ts +2 -1
- package/dist/lib/swiper/swiper/swiper.js +3 -3
- package/dist/lib/swiper/swiper-dots-paging/swiper-dots-paging.d.ts +1 -1
- package/dist/lib/swiper/swiper-dots-paging/swiper-dots-paging.js +8 -7
- package/dist/lib/tabs/tab-indicator/tab-indicator.js +1 -1
- package/dist/lib/tabs/tabs/tabs.d.ts +1 -1
- package/dist/lib/tabs/tabs/tabs.js +1 -1
- package/dist/lib/time-picker/time-picker.js +16 -22
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { StepperProps } from './types';
|
|
2
|
-
export declare const Stepper:
|
|
2
|
+
export declare const Stepper: ({ ref, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { jsxs, jsx } from "
|
|
2
|
-
import { forwardRef } from "react";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
2
|
import { Step } from "./step.js";
|
|
4
3
|
import { Progress } from "../progress/progress.js";
|
|
5
4
|
import { Primitive } from "../primitive/primitive.js";
|
|
6
5
|
const maxPercent = 100;
|
|
7
|
-
const Stepper =
|
|
6
|
+
const Stepper = ({ ref, ...props }) => {
|
|
8
7
|
const { direction = "horizontal", items, activeIndex = 0, circleSize = 32, ...rest } = props;
|
|
9
8
|
const value = maxPercent / (items.length - 1) * activeIndex;
|
|
10
9
|
const progressBarSize = `${(items.length - 1) / items.length * 100}%`;
|
|
@@ -33,9 +32,10 @@ const Stepper = forwardRef((props, ref) => {
|
|
|
33
32
|
}
|
|
34
33
|
};
|
|
35
34
|
return /* @__PURE__ */ jsxs(
|
|
36
|
-
|
|
35
|
+
Primitive,
|
|
37
36
|
{
|
|
38
|
-
|
|
37
|
+
as: "li",
|
|
38
|
+
sx: {
|
|
39
39
|
flex: 1,
|
|
40
40
|
display: "flex",
|
|
41
41
|
gap: 16,
|
|
@@ -55,7 +55,7 @@ const Stepper = forwardRef((props, ref) => {
|
|
|
55
55
|
Progress,
|
|
56
56
|
{
|
|
57
57
|
ref,
|
|
58
|
-
|
|
58
|
+
sx: {
|
|
59
59
|
position: "absolute",
|
|
60
60
|
zIndex: -1,
|
|
61
61
|
width: "100%",
|
|
@@ -68,9 +68,10 @@ const Stepper = forwardRef((props, ref) => {
|
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
70
|
/* @__PURE__ */ jsx(
|
|
71
|
-
|
|
71
|
+
Primitive,
|
|
72
72
|
{
|
|
73
|
-
|
|
73
|
+
as: "ul",
|
|
74
|
+
sx: {
|
|
74
75
|
display: "flex",
|
|
75
76
|
width: "100%",
|
|
76
77
|
height: "100%",
|
|
@@ -81,7 +82,7 @@ const Stepper = forwardRef((props, ref) => {
|
|
|
81
82
|
}
|
|
82
83
|
)
|
|
83
84
|
] });
|
|
84
|
-
}
|
|
85
|
+
};
|
|
85
86
|
export {
|
|
86
87
|
Stepper
|
|
87
88
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, JSX } from 'react';
|
|
1
|
+
import { ReactNode, JSX, Ref } from 'react';
|
|
2
2
|
import { ProgressDirection } from '../../types';
|
|
3
3
|
export declare const states: {
|
|
4
4
|
done: string;
|
|
@@ -17,4 +17,5 @@ export interface StepperProps {
|
|
|
17
17
|
direction?: ProgressDirection;
|
|
18
18
|
className?: string;
|
|
19
19
|
circleSize?: number;
|
|
20
|
+
ref?: Ref<HTMLDivElement>;
|
|
20
21
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, Suspense, lazy } from "react";
|
|
3
3
|
import { useMergeRefs } from "@floating-ui/react";
|
|
4
|
-
import
|
|
4
|
+
import AutoplayPlugin from "embla-carousel-autoplay";
|
|
5
5
|
import useEmblaCarousel from "embla-carousel-react";
|
|
6
|
-
import
|
|
6
|
+
import WheelGesturesPlugin from "embla-carousel-wheel-gestures";
|
|
7
7
|
import { isNumber } from "lodash-es";
|
|
8
8
|
import { getSwiperProps } from "./helpers.js";
|
|
9
9
|
import { Primitive } from "../../primitive/primitive.js";
|
|
@@ -23,7 +23,7 @@ const Swiper = ({ children, onApi, ref, ..._props }) => {
|
|
|
23
23
|
...options,
|
|
24
24
|
slides: "[data-swiper-slide]"
|
|
25
25
|
},
|
|
26
|
-
[
|
|
26
|
+
[AutoplayPlugin(autoplayOptions), WheelGesturesPlugin()]
|
|
27
27
|
);
|
|
28
28
|
useEffect(() => {
|
|
29
29
|
emblaApi && (onApi == null ? void 0 : onApi(emblaApi));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SwiperDotsPagingProps } from './types';
|
|
2
|
-
export declare const SwiperDotsPaging: ({ api, size, spaceBetween, color, offset, sm, md, lg, }: SwiperDotsPagingProps) => import("
|
|
2
|
+
export declare const SwiperDotsPaging: ({ api, size, spaceBetween, color, offset, sm, md, lg, }: SwiperDotsPagingProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx, Fragment, jsxs } from "
|
|
1
|
+
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
3
|
import { useFloating, autoUpdate, shift, flip, size, FloatingPortal } from "@floating-ui/react";
|
|
4
4
|
import { times, isNumber } from "lodash-es";
|
|
@@ -7,6 +7,7 @@ import { getColorVar } from "../../../theme/palette.js";
|
|
|
7
7
|
import { usePortalContainer } from "../../../theme/provider.js";
|
|
8
8
|
import { useIsHydrated } from "../../../hooks/use-is-hydrated/index.js";
|
|
9
9
|
import { Primitive } from "../../primitive/primitive.js";
|
|
10
|
+
import { Stylesheet } from "../../stylesheet/stylesheet.js";
|
|
10
11
|
const SWIPER_DOTS_SIZE_VAR = "--swiper-dots-size";
|
|
11
12
|
const SWIPER_DOTS_OFFSET_VAR = "--swiper-dots-offset";
|
|
12
13
|
const SWIPER_DOTS_SPACING_VAR = "--swiper-dots-spacing";
|
|
@@ -133,7 +134,7 @@ const SwiperDotsPaging = ({
|
|
|
133
134
|
},
|
|
134
135
|
slideIndex
|
|
135
136
|
)),
|
|
136
|
-
/* @__PURE__ */ jsx(
|
|
137
|
+
/* @__PURE__ */ jsx(Stylesheet, { children: ({ css }) => /* @__PURE__ */ jsx(
|
|
137
138
|
motion.div,
|
|
138
139
|
{
|
|
139
140
|
initial: {
|
|
@@ -144,7 +145,7 @@ const SwiperDotsPaging = ({
|
|
|
144
145
|
width: `calc(${inViewIndexes.length} * var(${SWIPER_DOTS_SIZE_VAR}, 0) + ${inViewIndexes.length - 1} * var(${SWIPER_DOTS_SPACING_VAR}, 0))`,
|
|
145
146
|
left: `calc(${firstInViewIndex} * var(${SWIPER_DOTS_SIZE_VAR}) + ${firstInViewIndex} * var(${SWIPER_DOTS_SPACING_VAR}))`
|
|
146
147
|
},
|
|
147
|
-
|
|
148
|
+
className: css({
|
|
148
149
|
position: "absolute",
|
|
149
150
|
top: 0,
|
|
150
151
|
bottom: 0,
|
|
@@ -153,11 +154,11 @@ const SwiperDotsPaging = ({
|
|
|
153
154
|
borderWidth: 1,
|
|
154
155
|
borderColor: getColorVar(`${color}.600`),
|
|
155
156
|
padding: 1
|
|
156
|
-
},
|
|
157
|
+
}),
|
|
157
158
|
children: /* @__PURE__ */ jsx(
|
|
158
|
-
|
|
159
|
+
Primitive,
|
|
159
160
|
{
|
|
160
|
-
|
|
161
|
+
sx: {
|
|
161
162
|
height: "100%",
|
|
162
163
|
width: "100%",
|
|
163
164
|
borderRadius: 9999,
|
|
@@ -166,7 +167,7 @@ const SwiperDotsPaging = ({
|
|
|
166
167
|
}
|
|
167
168
|
)
|
|
168
169
|
}
|
|
169
|
-
)
|
|
170
|
+
) })
|
|
170
171
|
]
|
|
171
172
|
}
|
|
172
173
|
)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useState, useEffect } from "react";
|
|
3
3
|
import { motion } from "motion/react";
|
|
4
|
-
import { Stylesheet } from "../../stylesheet/stylesheet.js";
|
|
5
4
|
import { useTabsContext } from "../tabs/helpers.js";
|
|
5
|
+
import { Stylesheet } from "../../stylesheet/stylesheet.js";
|
|
6
6
|
const TabIndicator = () => {
|
|
7
7
|
const { activeIndex, tabIndicatorProps } = useTabsContext();
|
|
8
8
|
const indicatorEl = useRef(null);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TabsProps } from './types';
|
|
2
|
-
export declare const Tabs: ({ ref, children, ..._props }: TabsProps) => import("
|
|
2
|
+
export declare const Tabs: ({ ref, children, ..._props }: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useMemo } from "react";
|
|
3
3
|
import { getTabsProps, TabsContext } from "./helpers.js";
|
|
4
4
|
import { useControllableState } from "../../../hooks/use-controllable-state.js";
|
|
@@ -101,11 +101,9 @@ const TimePicker = ({
|
|
|
101
101
|
{
|
|
102
102
|
onClick,
|
|
103
103
|
css: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
paddingBottom: "0.25rem",
|
|
108
|
-
borderRadius: "0.25rem",
|
|
104
|
+
paddingBlock: 4,
|
|
105
|
+
paddingInline: 8,
|
|
106
|
+
borderRadius: 4,
|
|
109
107
|
width: "100%",
|
|
110
108
|
height: "100%",
|
|
111
109
|
"&:hover": { backgroundColor: "var(--ic-light)" },
|
|
@@ -135,11 +133,9 @@ const TimePicker = ({
|
|
|
135
133
|
{
|
|
136
134
|
onClick,
|
|
137
135
|
css: {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
paddingBottom: "0.25rem",
|
|
142
|
-
borderRadius: "0.25rem",
|
|
136
|
+
paddingInline: 8,
|
|
137
|
+
paddingBlock: 4,
|
|
138
|
+
borderRadius: 4,
|
|
143
139
|
width: "100%",
|
|
144
140
|
height: "100%",
|
|
145
141
|
"&:hover": { backgroundColor: "var(--ic-light)" },
|
|
@@ -157,23 +153,21 @@ const TimePicker = ({
|
|
|
157
153
|
);
|
|
158
154
|
};
|
|
159
155
|
const portalContentRenderer = () => /* @__PURE__ */ jsxs(
|
|
160
|
-
|
|
156
|
+
Primitive,
|
|
161
157
|
{
|
|
162
|
-
|
|
158
|
+
sx: {
|
|
163
159
|
display: "flex",
|
|
164
|
-
borderRadius:
|
|
165
|
-
padding:
|
|
166
|
-
backgroundColor: "var(--ic-white-6s)",
|
|
160
|
+
borderRadius: 8,
|
|
161
|
+
padding: 8,
|
|
167
162
|
fontSize: getTypographyVar("sm").fontSize,
|
|
168
163
|
lineHeight: getTypographyVar("sm").lineHeight,
|
|
169
164
|
boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
170
165
|
borderWidth: 1,
|
|
171
166
|
borderStyle: "solid",
|
|
172
|
-
|
|
173
|
-
gap: "0.5rem"
|
|
167
|
+
gap: 8
|
|
174
168
|
},
|
|
175
169
|
children: [
|
|
176
|
-
/* @__PURE__ */ jsx(
|
|
170
|
+
/* @__PURE__ */ jsx(Primitive, { sx: { display: "flex", flexDirection: "column", flex: "1 1 0%" }, children: /* @__PURE__ */ jsx(
|
|
177
171
|
VirtualizedList,
|
|
178
172
|
{
|
|
179
173
|
RowComponent: RowComponentHour,
|
|
@@ -184,7 +178,7 @@ const TimePicker = ({
|
|
|
184
178
|
}
|
|
185
179
|
}
|
|
186
180
|
) }),
|
|
187
|
-
/* @__PURE__ */ jsx(
|
|
181
|
+
/* @__PURE__ */ jsx(Primitive, { sx: { display: "flex", flexDirection: "column", flex: "1 1 0%" }, children: /* @__PURE__ */ jsx(
|
|
188
182
|
VirtualizedList,
|
|
189
183
|
{
|
|
190
184
|
RowComponent: RowComponentMinute,
|
|
@@ -257,11 +251,11 @@ const TimePicker = ({
|
|
|
257
251
|
Primitive,
|
|
258
252
|
{
|
|
259
253
|
sx: {
|
|
260
|
-
paddingTop:
|
|
261
|
-
paddingBottom:
|
|
254
|
+
paddingTop: 8,
|
|
255
|
+
paddingBottom: 8,
|
|
262
256
|
borderWidth: 1,
|
|
263
257
|
borderStyle: "solid",
|
|
264
|
-
borderRadius:
|
|
258
|
+
borderRadius: 8,
|
|
265
259
|
boxShadow: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
|
|
266
260
|
fontSize: getTypographyVar("sm").fontSize,
|
|
267
261
|
lineHeight: getTypographyVar("sm").lineHeight,
|