@janbox/storefront-ui 4.0.7 → 4.0.9

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 (87) 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/index.js +2 -0
  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/helpers.d.ts +2 -0
  17. package/dist/lib/count-up/helpers.js +12 -0
  18. package/dist/lib/count-up/index.d.ts +3 -2
  19. package/dist/lib/count-up/types.d.ts +9 -3
  20. package/dist/lib/date-picker/date-picker.d.ts +1 -1
  21. package/dist/lib/date-picker/date-picker.js +26 -12
  22. package/dist/lib/date-picker/types.d.ts +2 -1
  23. package/dist/lib/dialog/dialog/dialog.d.ts +1 -1
  24. package/dist/lib/dialog/dialog/dialog.js +25 -28
  25. package/dist/lib/dialog/dialog-body/dialog-body.d.ts +1 -1
  26. package/dist/lib/dialog/dialog-body/dialog-body.js +10 -11
  27. package/dist/lib/dialog/dialog-body/types.d.ts +2 -3
  28. package/dist/lib/dialog/dialog-close/dialog-close.d.ts +1 -1
  29. package/dist/lib/dialog/dialog-footer/dialog-footer.js +2 -3
  30. package/dist/lib/dialog/dialog-header/dialog-header.d.ts +1 -1
  31. package/dist/lib/dialog/dialog-header/dialog-header.js +24 -27
  32. package/dist/lib/drawer/drawer/drawer.d.ts +1 -1
  33. package/dist/lib/drawer/drawer/drawer.js +39 -26
  34. package/dist/lib/drawer/drawer-close/drawer-close.d.ts +1 -1
  35. package/dist/lib/filter-panel/checkbox-filter-panel.d.ts +1 -1
  36. package/dist/lib/filter-panel/checkbox-filter-panel.js +2 -2
  37. package/dist/lib/filter-panel/filter-panel.d.ts +1 -1
  38. package/dist/lib/filter-panel/filter-panel.js +30 -15
  39. package/dist/lib/filter-panel/radio-filter-panel.d.ts +1 -1
  40. package/dist/lib/filter-panel/radio-filter-panel.js +3 -3
  41. package/dist/lib/floating/floating-close/floating-close.d.ts +1 -1
  42. package/dist/lib/floating/floating-close/floating-close.js +3 -2
  43. package/dist/lib/floating/floating-content/floating-content.d.ts +1 -1
  44. package/dist/lib/floating/floating-content/floating-content.js +8 -6
  45. package/dist/lib/form-label/form-label.d.ts +4 -3
  46. package/dist/lib/form-label/form-label.js +10 -8
  47. package/dist/lib/highlight-words/highlight-words.d.ts +1 -1
  48. package/dist/lib/highlight-words/highlight-words.js +3 -2
  49. package/dist/lib/input/input.js +1 -3
  50. package/dist/lib/lightbox/lightbox.d.ts +1 -1
  51. package/dist/lib/lightbox/lightbox.js +44 -32
  52. package/dist/lib/linear-progress/linear-progress.d.ts +1 -1
  53. package/dist/lib/linear-progress/linear-progress.js +50 -51
  54. package/dist/lib/loading/image-skeleton/image-skeleton.d.ts +1 -1
  55. package/dist/lib/loading/image-skeleton/image-skeleton.js +9 -4
  56. package/dist/lib/loading/loading-overlay/loading-overlay.d.ts +1 -1
  57. package/dist/lib/loading/loading-overlay/loading-overlay.js +2 -2
  58. package/dist/lib/menu/menu-item/menu-item.d.ts +1 -1
  59. package/dist/lib/menu/menu-item/menu-item.js +2 -2
  60. package/dist/lib/multiple-select/multiple-select.d.ts +1 -1
  61. package/dist/lib/multiple-select/multiple-select.js +38 -39
  62. package/dist/lib/notifications/notifications.d.ts +1 -1
  63. package/dist/lib/notifications/notifications.js +7 -7
  64. package/dist/lib/otp-input/otp-input.d.ts +1 -1
  65. package/dist/lib/otp-input/otp-input.js +43 -30
  66. package/dist/lib/pagination/pagination.d.ts +1 -1
  67. package/dist/lib/pagination/pagination.js +60 -54
  68. package/dist/lib/phone-input/phone-input.js +12 -11
  69. package/dist/lib/popover/popover-close/popover-close.d.ts +1 -1
  70. package/dist/lib/progress/progress.d.ts +1 -1
  71. package/dist/lib/progress/progress.js +26 -29
  72. package/dist/lib/progress/types.d.ts +5 -4
  73. package/dist/lib/select/select.js +15 -11
  74. package/dist/lib/star-rating/README.md +11 -3
  75. package/dist/lib/star-rating/star-rating.d.ts +1 -1
  76. package/dist/lib/star-rating/star-rating.js +40 -28
  77. package/dist/lib/star-rating/types.d.ts +3 -4
  78. package/dist/lib/stepper/step.js +8 -6
  79. package/dist/lib/stepper/stepper.d.ts +1 -1
  80. package/dist/lib/stepper/stepper.js +10 -9
  81. package/dist/lib/stepper/types.d.ts +2 -1
  82. package/dist/lib/swiper/swiper-dots-paging/swiper-dots-paging.d.ts +1 -1
  83. package/dist/lib/swiper/swiper-dots-paging/swiper-dots-paging.js +8 -7
  84. package/dist/lib/tabs/tabs/tabs.d.ts +1 -1
  85. package/dist/lib/tabs/tabs/tabs.js +1 -1
  86. package/dist/lib/time-picker/time-picker.js +16 -22
  87. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { JSX } from 'react';
1
+ import { JSX, Ref } from 'react';
2
2
  import { Placement, UseFloatingOptions } from '@floating-ui/react';
3
3
  import { InputRange } from 'react-date-range';
4
4
  import { PropsWithSx, SizeVariant, ToResponsiveProps } from '../../types';
@@ -30,6 +30,7 @@ type DatePickerBaseProps = {
30
30
  error?: boolean;
31
31
  helperText?: string;
32
32
  disabled?: boolean;
33
+ ref?: Ref<HTMLDivElement>;
33
34
  };
34
35
  export type DatePickerProps = PropsWithSx<DatePickerBaseProps & ToResponsiveProps<DateResponsiveProps>>;
35
36
  export {};
@@ -1,2 +1,2 @@
1
1
  import { DialogProps } from './types';
2
- export declare const Dialog: (_props: DialogProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const Dialog: (_props: DialogProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,9 @@
1
- import { jsx, jsxs } from "@emotion/react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { getDialogProps, getDialogSizeInNumber } from "./helpers.js";
3
3
  import { FLOATING_Z_INDEX } from "../../../theme/index.js";
4
4
  import { Floating } from "../../floating/floating/floating.js";
5
5
  import { FloatingContent } from "../../floating/floating-content/floating-content.js";
6
+ import { Primitive } from "../../primitive/primitive.js";
6
7
  import { getColorVar } from "../../../theme/palette.js";
7
8
  import { mediaQuery } from "../../../theme/screens.js";
8
9
  const Dialog = (_props) => {
@@ -31,7 +32,7 @@ const Dialog = (_props) => {
31
32
  zIndex: FLOATING_Z_INDEX
32
33
  }
33
34
  },
34
- css: {
35
+ sx: {
35
36
  maxHeight: "100%",
36
37
  maxWidth: "100%",
37
38
  overflow: "hidden",
@@ -40,9 +41,9 @@ const Dialog = (_props) => {
40
41
  },
41
42
  children: [
42
43
  /* @__PURE__ */ jsx(
43
- "div",
44
+ Primitive,
44
45
  {
45
- css: {
46
+ sx: {
46
47
  backdropFilter: "blur(2px)",
47
48
  position: "fixed",
48
49
  inset: 0,
@@ -52,33 +53,29 @@ const Dialog = (_props) => {
52
53
  }
53
54
  ),
54
55
  /* @__PURE__ */ jsx(
55
- "div",
56
+ Primitive,
56
57
  {
57
- css: [
58
- {
59
- width: getDialogSizeInNumber(size),
60
- backgroundColor: getColorVar("surface.default"),
61
- maxWidth: "100%",
62
- overflow: "hidden",
63
- display: "flex",
64
- flexDirection: "column",
65
- borderRadius: "0.5rem",
66
- paddingTop: "0.5rem",
67
- paddingBottom: "0.5rem",
68
- position: "relative"
58
+ sx: {
59
+ width: getDialogSizeInNumber(size),
60
+ backgroundColor: getColorVar("surface.default"),
61
+ maxWidth: "100%",
62
+ overflow: "hidden",
63
+ display: "flex",
64
+ flexDirection: "column",
65
+ borderRadius: "0.5rem",
66
+ paddingTop: "0.5rem",
67
+ paddingBottom: "0.5rem",
68
+ position: "relative",
69
+ sm: {
70
+ width: getDialogSizeInNumber(sm == null ? void 0 : sm.size)
69
71
  },
70
- {
71
- [mediaQuery("sm")]: {
72
- width: getDialogSizeInNumber(sm == null ? void 0 : sm.size)
73
- },
74
- [mediaQuery("md")]: {
75
- width: getDialogSizeInNumber(md == null ? void 0 : md.size)
76
- },
77
- [mediaQuery("lg")]: {
78
- width: getDialogSizeInNumber(lg == null ? void 0 : lg.size)
79
- }
72
+ md: {
73
+ width: getDialogSizeInNumber(md == null ? void 0 : md.size)
74
+ },
75
+ lg: {
76
+ width: getDialogSizeInNumber(lg == null ? void 0 : lg.size)
80
77
  }
81
- ],
78
+ },
82
79
  children
83
80
  }
84
81
  )
@@ -1,2 +1,2 @@
1
1
  import { DialogBodyProps } from './types';
2
- export declare const DialogBody: (props: DialogBodyProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const DialogBody: (props: DialogBodyProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,22 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { ScrollView } from "../../../components/scroll-view.js";
3
- import { mediaQuery } from "../../../theme/screens.js";
4
- import "../../../theme/palette.js";
5
3
  const DialogBody = (props) => {
4
+ var _a;
6
5
  return /* @__PURE__ */ jsx(
7
6
  ScrollView,
8
7
  {
9
- css: {
8
+ ...props,
9
+ sx: {
10
10
  flex: "1 1 0%",
11
11
  paddingTop: "0.5rem",
12
12
  paddingBottom: "0.5rem",
13
13
  overflow: "auto",
14
- "&:first-of-type": { paddingTop: "0.75rem" },
15
- "&:last-of-type": { paddingBottom: "0.75rem" },
16
- paddingLeft: "1rem",
17
- paddingRight: "1rem",
18
- [mediaQuery("sm")]: { paddingLeft: "1.25rem", paddingRight: "1.25rem" }
19
- },
20
- ...props
14
+ "&:first-of-type": { paddingTop: 12 },
15
+ "&:last-of-type": { paddingBottom: 12 },
16
+ paddingInline: 16,
17
+ ...props.sx,
18
+ md: { paddingInline: 20, ...(_a = props.sx) == null ? void 0 : _a.md }
19
+ }
21
20
  }
22
21
  );
23
22
  };
@@ -1,3 +1,2 @@
1
- import { ScrollViewProps } from '../../../components';
2
- import { ShallowMerge } from '../../../types';
3
- export type DialogBodyProps = ShallowMerge<ScrollViewProps, {}>;
1
+ import { ScrollViewProps } from '../../../components/scroll-view';
2
+ export type DialogBodyProps = ScrollViewProps;
@@ -1 +1 @@
1
- export declare const DialogClose: ({ event, reason, ref, ...props }: import('../../floating').FloatingCloseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
1
+ export declare const DialogClose: ({ event, reason, ref, ...props }: import('../../floating').FloatingCloseProps) => import("react/jsx-runtime").JSX.Element;
@@ -10,11 +10,10 @@ const DialogFooter = ({ sx, ...props }) => {
10
10
  gap: 8,
11
11
  paddingTop: 8,
12
12
  paddingBottom: 8,
13
- paddingLeft: 16,
14
- paddingRight: 16,
13
+ paddingInline: 16,
15
14
  position: "relative",
16
15
  ...sx,
17
- sm: { paddingLeft: 20, paddingRight: 20, ...sx == null ? void 0 : sx.sm }
16
+ md: { paddingInline: 20, gap: 12, ...sx == null ? void 0 : sx.md }
18
17
  },
19
18
  ...props
20
19
  }
@@ -1,2 +1,2 @@
1
1
  import { DialogHeaderProps } from './types';
2
- export declare const DialogHeader: ({ children, closeable, ...props }: DialogHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const DialogHeader: ({ children, closeable, ...props }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,46 +1,43 @@
1
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import CloseIcon from "../../../assets/svg/times-close-delete.svg.js";
3
- import { mediaQuery } from "../../../theme/screens.js";
3
+ import "lodash-es";
4
4
  import "../../../theme/palette.js";
5
5
  import { getTypographyVar } from "../../../theme/typography.js";
6
6
  import { DialogClose } from "../dialog-close/dialog-close.js";
7
+ import { Primitive } from "../../primitive/primitive.js";
7
8
  import { IconButton } from "../../icon-button/icon-button.js";
8
9
  const DialogHeader = ({ children, closeable = true, ...props }) => {
9
10
  return /* @__PURE__ */ jsxs(
10
- "div",
11
+ Primitive,
11
12
  {
12
- css: [
13
- {
14
- paddingTop: "0.5rem",
15
- paddingBottom: "0.5rem",
16
- paddingLeft: "1rem",
17
- paddingRight: "1rem",
18
- gap: "0.5rem",
19
- position: "relative",
20
- fontSize: getTypographyVar("lg").fontSize,
21
- lineHeight: getTypographyVar("lg").lineHeight,
22
- fontWeight: 500,
23
- [mediaQuery("sm")]: {
24
- paddingLeft: "1.25rem",
25
- paddingRight: "1.25rem",
26
- fontSize: getTypographyVar("xl").fontSize,
27
- lineHeight: getTypographyVar("xl").lineHeight
28
- }
29
- },
30
- closeable && { paddingRight: "3rem" }
31
- ],
32
13
  ...props,
14
+ sx: {
15
+ paddingLeft: 16,
16
+ paddingRight: closeable ? 48 : 20,
17
+ paddingBlock: 8,
18
+ gap: 8,
19
+ position: "relative",
20
+ fontSize: getTypographyVar("lg").fontSize,
21
+ lineHeight: getTypographyVar("lg").lineHeight,
22
+ fontWeight: 500,
23
+ md: {
24
+ paddingLeft: 20,
25
+ paddingRight: closeable ? 52 : 20,
26
+ fontSize: getTypographyVar("xl").fontSize,
27
+ lineHeight: getTypographyVar("xl").lineHeight
28
+ }
29
+ },
33
30
  children: [
34
31
  children,
35
32
  closeable && /* @__PURE__ */ jsx(DialogClose, { children: /* @__PURE__ */ jsx(
36
- "div",
33
+ Primitive,
37
34
  {
38
- css: {
35
+ sx: {
39
36
  position: "absolute",
40
- right: "0.5rem",
37
+ right: 8,
41
38
  top: "50%",
42
39
  transform: "translateY(-50%)",
43
- [mediaQuery("sm")]: { right: "0.75rem" }
40
+ md: { right: 12 }
44
41
  },
45
42
  children: /* @__PURE__ */ jsx(
46
43
  IconButton,
@@ -1,2 +1,2 @@
1
1
  import { DrawerProps } from './types';
2
- export declare const Drawer: ({ children, placement, ...props }: DrawerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const Drawer: ({ children, placement, ...props }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,11 @@
1
- import { jsx, jsxs } from "@emotion/react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import { motion } from "motion/react";
4
4
  import { FLOATING_Z_INDEX } from "../../../theme/index.js";
5
+ import { Stylesheet } from "../../stylesheet/stylesheet.js";
5
6
  import { Floating } from "../../floating/floating/floating.js";
6
7
  import { FloatingContent } from "../../floating/floating-content/floating-content.js";
8
+ import { Primitive } from "../../primitive/primitive.js";
7
9
  const Drawer = ({ children, placement = "left", ...props }) => {
8
10
  const initial = useMemo(() => {
9
11
  switch (placement) {
@@ -44,7 +46,7 @@ const Drawer = ({ children, placement = "left", ...props }) => {
44
46
  zIndex: FLOATING_Z_INDEX
45
47
  }
46
48
  },
47
- css: {
49
+ sx: {
48
50
  maxHeight: "100%",
49
51
  maxWidth: "100%",
50
52
  overflow: "hidden",
@@ -53,9 +55,9 @@ const Drawer = ({ children, placement = "left", ...props }) => {
53
55
  },
54
56
  children: [
55
57
  /* @__PURE__ */ jsx(
56
- "div",
58
+ Primitive,
57
59
  {
58
- css: {
60
+ sx: {
59
61
  position: "fixed",
60
62
  top: 0,
61
63
  right: 0,
@@ -66,29 +68,40 @@ const Drawer = ({ children, placement = "left", ...props }) => {
66
68
  }
67
69
  }
68
70
  ),
69
- /* @__PURE__ */ jsx(
70
- motion.div,
71
- {
72
- initial,
73
- animate,
74
- exit: initial,
75
- transition: {
76
- duration: 0.2,
77
- ease: "easeInOut"
78
- },
79
- css: [
80
- {
81
- position: "fixed",
82
- backgroundColor: "white"
71
+ /* @__PURE__ */ jsx(Stylesheet, { children: ({ css }) => {
72
+ const placementStyle = (() => {
73
+ switch (placement) {
74
+ case "left":
75
+ return { top: 0, bottom: 0, left: 0 };
76
+ case "right":
77
+ return { top: 0, bottom: 0, right: 0 };
78
+ case "top":
79
+ return { left: 0, right: 0, top: 0 };
80
+ case "bottom":
81
+ return { left: 0, right: 0, bottom: 0 };
82
+ default:
83
+ return {};
84
+ }
85
+ })();
86
+ return /* @__PURE__ */ jsx(
87
+ motion.div,
88
+ {
89
+ initial,
90
+ animate,
91
+ exit: initial,
92
+ transition: {
93
+ duration: 0.2,
94
+ ease: "easeInOut"
83
95
  },
84
- placement === "left" && { top: 0, bottom: 0, left: 0 },
85
- placement === "right" && { top: 0, bottom: 0, right: 0 },
86
- placement === "top" && { left: 0, right: 0, top: 0 },
87
- placement === "bottom" && { left: 0, right: 0, bottom: 0 }
88
- ],
89
- children
90
- }
91
- )
96
+ className: css({
97
+ position: "fixed",
98
+ backgroundColor: "white",
99
+ ...placementStyle
100
+ }),
101
+ children
102
+ }
103
+ );
104
+ } })
92
105
  ]
93
106
  }
94
107
  )
@@ -1 +1 @@
1
- export declare const DrawerClose: ({ event, reason, ref, ...props }: import('../../floating').FloatingCloseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
1
+ export declare const DrawerClose: ({ event, reason, ref, ...props }: import('../../floating').FloatingCloseProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { CheckboxFilterPanelProps } from './types';
2
- export declare const CheckboxFilterPanel: ({ value, options, inputSearchProps: _inputSearchProps, onChange, queryParam, name, listProps, }: CheckboxFilterPanelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const CheckboxFilterPanel: ({ value, options, inputSearchProps: _inputSearchProps, onChange, queryParam, name, listProps, }: CheckboxFilterPanelProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useState, useMemo } from "react";
3
3
  import { trimStart } from "lodash-es";
4
4
  import { VirtualizedList } from "../../components/virtualized-list.js";
@@ -96,7 +96,7 @@ const CheckboxFilterPanel = ({
96
96
  maxHeight: ROW_HEIGHT * DISPLAY_ROW_COUNT,
97
97
  ...listProps == null ? void 0 : listProps.style
98
98
  },
99
- css: { paddingLeft: 8, paddingRight: 8 },
99
+ sx: { paddingInline: 8 },
100
100
  ...listProps
101
101
  }
102
102
  )
@@ -1,2 +1,2 @@
1
1
  import { FilterPanelProps } from './types';
2
- export declare const FilterPanel: ({ label, defaultOpen, ...props }: FilterPanelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const FilterPanel: ({ label, defaultOpen, ...props }: FilterPanelProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx, Fragment } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { isValidElement } from "react";
3
3
  import { useToggle } from "../../hooks/use-toggle/index.js";
4
4
  import { CheckboxFilterPanel } from "./checkbox-filter-panel.js";
@@ -7,23 +7,38 @@ import { InputTextFilterPanel } from "./input-text-filter-panel.js";
7
7
  import { RadioFilterPanel } from "./radio-filter-panel.js";
8
8
  import ArrowDownIcon from "../../assets/svg/arrow-down.svg.js";
9
9
  import { Collapse } from "../collapse/collapse.js";
10
+ import { Primitive } from "../primitive/primitive.js";
10
11
  import { Icon } from "../icon/icon.js";
11
12
  const FilterPanel = ({ label, defaultOpen = true, ...props }) => {
12
13
  const [open, toggle] = useToggle(defaultOpen);
13
- return /* @__PURE__ */ jsxs("div", { css: { display: "flex", flexDirection: "column", gap: 8 }, children: [
14
- /* @__PURE__ */ jsxs("button", { css: { display: "flex", alignItems: "center", gap: 8, textAlign: "left" }, onClick: toggle, children: [
15
- /* @__PURE__ */ jsx("div", { css: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", fontWeight: 500 }, children: isValidElement(label) ? label : /* @__PURE__ */ jsx("span", { children: label }) }),
16
- /* @__PURE__ */ jsx(
17
- Icon,
18
- {
19
- css: {
20
- transition: "transform 150ms",
21
- ...open ? { transform: "rotate(-180deg)" } : {}
22
- },
23
- source: ArrowDownIcon
24
- }
25
- )
26
- ] }),
14
+ return /* @__PURE__ */ jsxs(Primitive, { sx: { display: "flex", flexDirection: "column", gap: 8 }, children: [
15
+ /* @__PURE__ */ jsxs(
16
+ Primitive,
17
+ {
18
+ role: "button",
19
+ sx: { display: "flex", alignItems: "center", gap: 8, textAlign: "left" },
20
+ onClick: toggle,
21
+ children: [
22
+ /* @__PURE__ */ jsx(
23
+ Primitive,
24
+ {
25
+ sx: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", fontWeight: 500 },
26
+ children: isValidElement(label) ? label : /* @__PURE__ */ jsx("span", { children: label })
27
+ }
28
+ ),
29
+ /* @__PURE__ */ jsx(
30
+ Icon,
31
+ {
32
+ sx: {
33
+ transition: "transform 150ms",
34
+ ...open ? { transform: "rotate(-180deg)" } : {}
35
+ },
36
+ source: ArrowDownIcon
37
+ }
38
+ )
39
+ ]
40
+ }
41
+ ),
27
42
  /* @__PURE__ */ jsx(Collapse, { open, children: /* @__PURE__ */ jsxs(Fragment, { children: [
28
43
  props.fieldType === "checkbox" && /* @__PURE__ */ jsx(CheckboxFilterPanel, { ...props }),
29
44
  props.fieldType === "radio" && /* @__PURE__ */ jsx(RadioFilterPanel, { ...props }),
@@ -1,2 +1,2 @@
1
1
  import { RadioFilterPanelProps } from './types';
2
- export declare const RadioFilterPanel: ({ options, inputSearchProps: _inputSearchProps, value, onChange, queryParam, fallbackValue, }: RadioFilterPanelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const RadioFilterPanel: ({ options, inputSearchProps: _inputSearchProps, value, onChange, queryParam, fallbackValue, }: RadioFilterPanelProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useId, useState, useMemo } from "react";
3
3
  import { trimStart, isNil } from "lodash-es";
4
4
  import { VirtualizedList } from "../../components/virtualized-list.js";
@@ -61,7 +61,7 @@ const RadioFilterPanel = ({
61
61
  }
62
62
  onChange == null ? void 0 : onChange(e);
63
63
  };
64
- return /* @__PURE__ */ jsx("div", { css: { paddingTop: "0.25rem", paddingBottom: "0.25rem" }, children: /* @__PURE__ */ jsx(
64
+ return /* @__PURE__ */ jsx(Primitive, { sx: { paddingBlock: 4 }, children: /* @__PURE__ */ jsx(
65
65
  RadioButton,
66
66
  {
67
67
  name: uniqueId,
@@ -77,7 +77,7 @@ const RadioFilterPanel = ({
77
77
  /* @__PURE__ */ jsx(
78
78
  VirtualizedList,
79
79
  {
80
- css: { paddingLeft: "0.5rem", paddingRight: "0.5rem" },
80
+ sx: { paddingInline: 8 },
81
81
  options: {
82
82
  count: displayOptions.length,
83
83
  estimateSize: () => ROW_HEIGHT
@@ -1,2 +1,2 @@
1
1
  import { FloatingCloseProps } from './types';
2
- export declare const FloatingClose: ({ event, reason, ref, ...props }: FloatingCloseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const FloatingClose: ({ event, reason, ref, ...props }: FloatingCloseProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,8 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { useRef, useEffect } from "react";
3
3
  import { useMergeRefs } from "@floating-ui/react";
4
4
  import { useFloatingContext } from "../floating/helpers.js";
5
+ import { Primitive } from "../../primitive/primitive.js";
5
6
  const FloatingClose = ({ event = "click", reason, ref, ...props }) => {
6
7
  const wrapperRef = useRef(null);
7
8
  const {
@@ -19,7 +20,7 @@ const FloatingClose = ({ event = "click", reason, ref, ...props }) => {
19
20
  wrapperEl.removeEventListener(event, handleEvent);
20
21
  };
21
22
  }, [event, onOpenChange, reason]);
22
- return /* @__PURE__ */ jsx("div", { css: { display: "contents" }, ...props, ref: mergedRefs });
23
+ return /* @__PURE__ */ jsx(Primitive, { sx: { display: "contents" }, ...props, ref: mergedRefs });
23
24
  };
24
25
  export {
25
26
  FloatingClose
@@ -1,2 +1,2 @@
1
1
  import { FloatingContentProps } from './types';
2
- export declare const FloatingContent: ({ style, floatingPortalProps, floatingFocusManagerProps, floatingOverlayProps, sx, ref, ...props }: FloatingContentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const FloatingContent: ({ style, floatingPortalProps, floatingFocusManagerProps, floatingOverlayProps, sx, ref, ...props }: FloatingContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { useMergeRefs, FloatingPortal, FloatingOverlay, FloatingFocusManager } from "@floating-ui/react";
3
3
  import { AnimatePresence, motion } from "motion/react";
4
4
  import { useFloatingContext } from "../floating/helpers.js";
5
5
  import { FLOATING_Z_INDEX } from "../../../theme/index.js";
6
6
  import { useIsHydrated } from "../../../hooks/use-is-hydrated/index.js";
7
- import { createSxInterpolation } from "../../../utils/stylesheet.js";
7
+ import { Stylesheet } from "../../stylesheet/stylesheet.js";
8
8
  import { usePortalContainer } from "../../../theme/provider.js";
9
9
  const FloatingContent = ({
10
10
  style,
@@ -29,7 +29,7 @@ const FloatingContent = ({
29
29
  display: (floatingOverlayProps == null ? void 0 : floatingOverlayProps.disabled) ?? true ? "contents" : void 0,
30
30
  ...floatingOverlayProps == null ? void 0 : floatingOverlayProps.style
31
31
  },
32
- children: /* @__PURE__ */ jsx(FloatingFocusManager, { disabled: true, context, ...floatingFocusManagerProps, children: /* @__PURE__ */ jsx(
32
+ children: /* @__PURE__ */ jsx(FloatingFocusManager, { disabled: true, context, ...floatingFocusManagerProps, children: /* @__PURE__ */ jsx(Stylesheet, { children: ({ cx, css }) => /* @__PURE__ */ jsx(
33
33
  motion.div,
34
34
  {
35
35
  initial: { opacity: 0 },
@@ -40,12 +40,14 @@ const FloatingContent = ({
40
40
  ...style,
41
41
  zIndex: FLOATING_Z_INDEX
42
42
  },
43
- css: createSxInterpolation(sx),
44
- ...getFloatingProps(props),
43
+ ...getFloatingProps({
44
+ ...props,
45
+ className: cx(css(sx), props.className)
46
+ }),
45
47
  ref: mergedRefs,
46
48
  children: props.children
47
49
  }
48
- ) })
50
+ ) }) })
49
51
  }
50
52
  ) }) });
51
53
  };
@@ -1,6 +1,7 @@
1
1
  import { JSX } from 'react';
2
2
  import { ShallowMerge } from '../../types';
3
- export type FormLabelProps = ShallowMerge<JSX.IntrinsicElements['div'], {
3
+ import { PrimitiveProps } from '../primitive';
4
+ export type FormLabelProps = PrimitiveProps<ShallowMerge<JSX.IntrinsicElements['div'], {
4
5
  required?: boolean;
5
- }>;
6
- export declare const FormLabel: ({ required, children, ...props }: FormLabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ }>>;
7
+ export declare const FormLabel: ({ required, children, ...props }: FormLabelProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,22 @@
1
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { isString } from "lodash-es";
3
- import { mediaQuery } from "../../theme/screens.js";
4
3
  import { getColorVar } from "../../theme/palette.js";
4
+ import { Primitive } from "../primitive/primitive.js";
5
5
  const FormLabel = ({ required, children, ...props }) => {
6
+ var _a;
6
7
  return /* @__PURE__ */ jsxs(
7
- "div",
8
+ Primitive,
8
9
  {
9
- css: {
10
- marginBottom: "0.375rem",
10
+ ...props,
11
+ sx: {
12
+ marginBottom: 6,
11
13
  display: "inline-flex",
12
- [mediaQuery("sm")]: { marginBottom: "0.5rem" }
14
+ ...props.sx,
15
+ md: { marginBottom: 8, ...(_a = props.sx) == null ? void 0 : _a.md }
13
16
  },
14
- ...props,
15
17
  children: [
16
18
  isString(children) ? /* @__PURE__ */ jsx("label", { children }) : children,
17
- required && /* @__PURE__ */ jsx("span", { css: { color: getColorVar("red.600") }, children: " *" })
19
+ required && /* @__PURE__ */ jsx(Primitive, { as: "span", sx: { color: getColorVar("red.600") }, children: " *" })
18
20
  ]
19
21
  }
20
22
  );
@@ -1,2 +1,2 @@
1
1
  import { HighlightWordsProps } from './types';
2
- export declare const HighlightWords: ({ highlightClassName, ...props }: HighlightWordsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const HighlightWords: ({ highlightClassName, ...props }: HighlightWordsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,13 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { Fragment } from "react";
3
3
  import { findAll } from "highlight-words-core";
4
+ import { Primitive } from "../primitive/primitive.js";
4
5
  const HighlightWords = ({ highlightClassName, ...props }) => {
5
6
  const chunks = findAll(props);
6
7
  return /* @__PURE__ */ jsx(Fragment, { children: chunks.map((chunk, index) => {
7
8
  const { end, highlight, start } = chunk;
8
9
  const text = props.textToHighlight.substring(start, end);
9
- return /* @__PURE__ */ jsx(Fragment, { children: highlight ? /* @__PURE__ */ jsx("span", { css: { fontWeight: 500 }, className: highlightClassName, children: text }) : text }, index);
10
+ return /* @__PURE__ */ jsx(Fragment, { children: highlight ? /* @__PURE__ */ jsx(Primitive, { as: "span", sx: { fontWeight: 500 }, className: highlightClassName, children: text }) : text }, index);
10
11
  }) });
11
12
  };
12
13
  export {
@@ -194,9 +194,7 @@ const Input = ({ ref, ..._props }) => {
194
194
  ":focus": {
195
195
  outline: "none"
196
196
  },
197
- "::placeholder": {
198
- color: getColorVar("neutral.400")
199
- }
197
+ ...rest.sx
200
198
  }
201
199
  }
202
200
  ),
@@ -1,2 +1,2 @@
1
1
  import { LightboxProps } from './types';
2
- export declare const Lightbox: ({ slides, defaultActiveIndex, ...props }: LightboxProps) => import("@emotion/react/jsx-runtime").JSX.Element;
2
+ export declare const Lightbox: ({ slides, defaultActiveIndex, ...props }: LightboxProps) => import("react/jsx-runtime").JSX.Element;