@janbox/storefront-ui 4.0.4 → 4.0.5

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.
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'react';
2
- import { EmblaCarouselType } from 'embla-carousel';
3
2
  import { AutoplayOptionsType } from 'embla-carousel-autoplay';
4
3
  import { default as useEmblaCarousel } from 'embla-carousel-react';
5
4
  import { ShallowMerge, ToResponsiveProps } from '../../../types';
@@ -7,7 +6,7 @@ import { SwiperDotsPagingProps } from '../swiper-dots-paging';
7
6
  import { SwiperSideArrowsPagingProps } from '../swiper-side-arrows-paging';
8
7
  import { PrimitiveProps } from '../../primitive';
9
8
  export type SwiperOptions = Parameters<typeof useEmblaCarousel>[0];
10
- export type SwiperApi = EmblaCarouselType;
9
+ export type SwiperApi = NonNullable<ReturnType<typeof useEmblaCarousel>[1]>;
11
10
  export type SwiperResponsiveProps = {
12
11
  slidesPerView?: number | 'auto';
13
12
  spaceBetween?: number;
@@ -5,6 +5,7 @@ import { useState, useContext, createContext } from "react";
5
5
  import { getColorVar } from "./palette.js";
6
6
  import { flatten } from "flat";
7
7
  import { flatMap } from "lodash-es";
8
+ import { prefixer } from "stylis";
8
9
  import { getTypographyVar } from "./typography.js";
9
10
  import { LocaleContext, FALLBACK_LOCALE } from "../i18n/index.js";
10
11
  const usePortalContainer = () => {
@@ -20,7 +21,7 @@ const useTheme = () => {
20
21
  const ThemeContext = createContext(null);
21
22
  const PortalContainerContext = createContext(null);
22
23
  const ThemeProvider = ({ theme, children, locale = FALLBACK_LOCALE, root }) => {
23
- const [emotionCache] = useState(() => createCache({ key: "jb", container: root }));
24
+ const [emotionCache] = useState(() => createCache({ key: "jb", container: root, stylisPlugins: [prefixer] }));
24
25
  return /* @__PURE__ */ jsx(CacheProvider, { value: emotionCache, children: /* @__PURE__ */ jsx(ThemeContext.Provider, { value: theme, children: /* @__PURE__ */ jsxs(PortalContainerContext.Provider, { value: root ?? null, children: [
25
26
  /* @__PURE__ */ jsx(Global, { styles: createGlobalStyle(theme) }),
26
27
  /* @__PURE__ */ jsx(LocaleContext.Provider, { value: locale, children })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janbox/storefront-ui",
3
- "version": "4.0.4",
3
+ "version": "4.0.5",
4
4
  "description": "Storefront UI component library for Janbox",
5
5
  "author": "Janbox",
6
6
  "keywords": [
@@ -79,7 +79,8 @@
79
79
  "react-date-range": "^2.0.1",
80
80
  "react-error-boundary": "^6.1.2",
81
81
  "react-player": "^3.3.3",
82
- "react-zoom-pan-pinch": "^3.7.0"
82
+ "react-zoom-pan-pinch": "^3.7.0",
83
+ "stylis": "^4.4.0"
83
84
  },
84
85
  "devDependencies": {
85
86
  "@eslint/js": "^9.24.0",
@@ -91,6 +92,7 @@
91
92
  "@types/react": "^19.1.8",
92
93
  "@types/react-date-range": "^1.4.10",
93
94
  "@types/react-dom": "^19.1.6",
95
+ "@types/stylis": "^4.2.7",
94
96
  "csstype": "^3.1.3",
95
97
  "eslint": "^9.24.0",
96
98
  "eslint-config-prettier": "^10.1.8",