@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.
Files changed (84) hide show
  1. package/dist/components/scroll-view.d.ts +3 -2
  2. package/dist/components/scroll-view.js +5 -3
  3. package/dist/components/virtualized-list.d.ts +3 -3
  4. package/dist/lib/accordion/accordion-content/accordion-content.js +1 -1
  5. package/dist/lib/button/button.js +2 -2
  6. package/dist/lib/cascader/cascader-floating-content.d.ts +1 -1
  7. package/dist/lib/cascader/cascader-floating-content.js +52 -73
  8. package/dist/lib/cascader/cascader.d.ts +1 -1
  9. package/dist/lib/cascader/cascader.js +10 -12
  10. package/dist/lib/collapse/collapse.d.ts +1 -1
  11. package/dist/lib/collapse/collapse.js +12 -4
  12. package/dist/lib/collapse/types.d.ts +3 -3
  13. package/dist/lib/count-up/README.md +22 -0
  14. package/dist/lib/count-up/count-up.d.ts +1 -1
  15. package/dist/lib/count-up/count-up.js +22 -5
  16. package/dist/lib/count-up/types.d.ts +9 -3
  17. package/dist/lib/date-picker/date-picker.js +25 -10
  18. package/dist/lib/dialog/dialog/dialog.d.ts +1 -1
  19. package/dist/lib/dialog/dialog/dialog.js +25 -28
  20. package/dist/lib/dialog/dialog-body/dialog-body.d.ts +1 -1
  21. package/dist/lib/dialog/dialog-body/dialog-body.js +10 -11
  22. package/dist/lib/dialog/dialog-body/types.d.ts +2 -3
  23. package/dist/lib/dialog/dialog-close/dialog-close.d.ts +1 -1
  24. package/dist/lib/dialog/dialog-footer/dialog-footer.js +2 -3
  25. package/dist/lib/dialog/dialog-header/dialog-header.d.ts +1 -1
  26. package/dist/lib/dialog/dialog-header/dialog-header.js +24 -27
  27. package/dist/lib/drawer/drawer/drawer.d.ts +1 -1
  28. package/dist/lib/drawer/drawer/drawer.js +39 -26
  29. package/dist/lib/drawer/drawer-close/drawer-close.d.ts +1 -1
  30. package/dist/lib/filter-panel/checkbox-filter-panel.d.ts +1 -1
  31. package/dist/lib/filter-panel/checkbox-filter-panel.js +2 -2
  32. package/dist/lib/filter-panel/filter-panel.d.ts +1 -1
  33. package/dist/lib/filter-panel/filter-panel.js +30 -15
  34. package/dist/lib/filter-panel/radio-filter-panel.d.ts +1 -1
  35. package/dist/lib/filter-panel/radio-filter-panel.js +3 -3
  36. package/dist/lib/floating/floating-close/floating-close.d.ts +1 -1
  37. package/dist/lib/floating/floating-close/floating-close.js +3 -2
  38. package/dist/lib/floating/floating-content/floating-content.d.ts +1 -1
  39. package/dist/lib/floating/floating-content/floating-content.js +8 -6
  40. package/dist/lib/form-label/form-label.d.ts +4 -3
  41. package/dist/lib/form-label/form-label.js +10 -8
  42. package/dist/lib/highlight-words/highlight-words.d.ts +1 -1
  43. package/dist/lib/highlight-words/highlight-words.js +3 -2
  44. package/dist/lib/input/input.js +1 -3
  45. package/dist/lib/lightbox/lightbox.d.ts +1 -1
  46. package/dist/lib/lightbox/lightbox.js +44 -32
  47. package/dist/lib/linear-progress/linear-progress.d.ts +1 -1
  48. package/dist/lib/linear-progress/linear-progress.js +50 -51
  49. package/dist/lib/loading/image-skeleton/image-skeleton.d.ts +1 -1
  50. package/dist/lib/loading/image-skeleton/image-skeleton.js +9 -4
  51. package/dist/lib/loading/loading-overlay/loading-overlay.d.ts +1 -1
  52. package/dist/lib/loading/loading-overlay/loading-overlay.js +2 -2
  53. package/dist/lib/menu/menu-item/menu-item.d.ts +1 -1
  54. package/dist/lib/menu/menu-item/menu-item.js +2 -2
  55. package/dist/lib/multiple-select/multiple-select.d.ts +1 -1
  56. package/dist/lib/multiple-select/multiple-select.js +38 -39
  57. package/dist/lib/notifications/notifications.d.ts +1 -1
  58. package/dist/lib/notifications/notifications.js +7 -7
  59. package/dist/lib/otp-input/otp-input.d.ts +1 -1
  60. package/dist/lib/otp-input/otp-input.js +43 -30
  61. package/dist/lib/pagination/pagination.d.ts +1 -1
  62. package/dist/lib/pagination/pagination.js +60 -54
  63. package/dist/lib/phone-input/phone-input.js +12 -11
  64. package/dist/lib/popover/popover-close/popover-close.d.ts +1 -1
  65. package/dist/lib/progress/progress.d.ts +1 -1
  66. package/dist/lib/progress/progress.js +26 -29
  67. package/dist/lib/progress/types.d.ts +5 -4
  68. package/dist/lib/select/select.js +15 -11
  69. package/dist/lib/star-rating/README.md +11 -3
  70. package/dist/lib/star-rating/star-rating.d.ts +1 -1
  71. package/dist/lib/star-rating/star-rating.js +40 -28
  72. package/dist/lib/star-rating/types.d.ts +3 -4
  73. package/dist/lib/stepper/step.js +8 -6
  74. package/dist/lib/stepper/stepper.d.ts +1 -1
  75. package/dist/lib/stepper/stepper.js +10 -9
  76. package/dist/lib/stepper/types.d.ts +2 -1
  77. package/dist/lib/swiper/swiper/swiper.js +3 -3
  78. package/dist/lib/swiper/swiper-dots-paging/swiper-dots-paging.d.ts +1 -1
  79. package/dist/lib/swiper/swiper-dots-paging/swiper-dots-paging.js +8 -7
  80. package/dist/lib/tabs/tab-indicator/tab-indicator.js +1 -1
  81. package/dist/lib/tabs/tabs/tabs.d.ts +1 -1
  82. package/dist/lib/tabs/tabs/tabs.js +1 -1
  83. package/dist/lib/time-picker/time-picker.js +16 -22
  84. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
1
  import { StepperProps } from './types';
2
- export declare const Stepper: import('react').ForwardRefExoticComponent<StepperProps & import('react').RefAttributes<HTMLDivElement>>;
2
+ export declare const Stepper: ({ ref, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,9 @@
1
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
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 = forwardRef((props, ref) => {
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
- "li",
35
+ Primitive,
37
36
  {
38
- css: {
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
- css: {
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
- "ul",
71
+ Primitive,
72
72
  {
73
- css: {
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 Autoplay from "embla-carousel-autoplay";
4
+ import AutoplayPlugin from "embla-carousel-autoplay";
5
5
  import useEmblaCarousel from "embla-carousel-react";
6
- import { WheelGesturesPlugin } from "embla-carousel-wheel-gestures";
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
- [Autoplay(autoplayOptions), WheelGesturesPlugin()]
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("@emotion/react/jsx-runtime").JSX.Element;
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 "@emotion/react/jsx-runtime";
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
- css: {
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
- "div",
159
+ Primitive,
159
160
  {
160
- style: {
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("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const Tabs: ({ ref, children, ..._props }: TabsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
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
- paddingLeft: "0.5rem",
105
- paddingRight: "0.5rem",
106
- paddingTop: "0.25rem",
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
- paddingLeft: "0.5rem",
139
- paddingRight: "0.5rem",
140
- paddingTop: "0.25rem",
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
- "div",
156
+ Primitive,
161
157
  {
162
- css: {
158
+ sx: {
163
159
  display: "flex",
164
- borderRadius: "0.5rem",
165
- padding: "0.5rem",
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
- borderColor: "var(--ic-ink-1s)",
173
- gap: "0.5rem"
167
+ gap: 8
174
168
  },
175
169
  children: [
176
- /* @__PURE__ */ jsx("div", { css: { display: "flex", flexDirection: "column", flex: "1 1 0%" }, children: /* @__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("div", { css: { display: "flex", flexDirection: "column", flex: "1 1 0%" }, children: /* @__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: "0.5rem",
261
- paddingBottom: "0.5rem",
254
+ paddingTop: 8,
255
+ paddingBottom: 8,
262
256
  borderWidth: 1,
263
257
  borderStyle: "solid",
264
- borderRadius: "0.5rem",
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janbox/storefront-ui",
3
- "version": "4.0.6",
3
+ "version": "4.0.8",
4
4
  "description": "Storefront UI component library for Janbox",
5
5
  "author": "Janbox",
6
6
  "keywords": [