@janbox/storefront-ui 1.0.0 → 1.0.2
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/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/use-controllable-state.js +2 -2
- package/dist/hooks/use-countdown-timer.js +1 -1
- package/dist/hooks/use-first-mount-state/index.d.ts +2 -0
- package/dist/hooks/use-first-mount-state/index.d.ts.map +1 -0
- package/dist/hooks/use-first-mount-state/index.js +12 -0
- package/dist/hooks/use-update-effect/index.d.ts +3 -0
- package/dist/hooks/use-update-effect/index.d.ts.map +1 -0
- package/dist/hooks/use-update-effect/index.js +13 -0
- package/dist/lib/accordion/accordion/accordion.d.ts +2 -1
- package/dist/lib/accordion/accordion/accordion.d.ts.map +1 -1
- package/dist/lib/accordion/accordion/accordion.js +15 -6
- package/dist/lib/accordion/accordion/types.d.ts +2 -2
- package/dist/lib/accordion/accordion/types.d.ts.map +1 -1
- package/dist/lib/date-picker/date-picker.d.ts.map +1 -1
- package/dist/lib/date-picker/date-picker.js +1 -2
- package/dist/lib/input-range/index.d.ts +1 -0
- package/dist/lib/input-range/index.d.ts.map +1 -1
- package/dist/lib/input-range/types.d.ts +3 -4
- package/dist/lib/input-range/types.d.ts.map +1 -1
- package/dist/node_modules/.pnpm/react-use@17.6.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-use/esm/misc/isDeepEqual.js +5 -0
- package/dist/node_modules/.pnpm/react-use@17.6.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-use/esm/useCustomCompareEffect.js +25 -0
- package/dist/node_modules/.pnpm/react-use@17.6.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-use/esm/useDeepCompareEffect.js +19 -0
- package/dist/node_modules/.pnpm/react-use@17.6.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-use/esm/useFirstMountState.js +12 -0
- package/dist/node_modules/.pnpm/react-use@17.6.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-use/esm/useUpdateEffect.js +13 -0
- package/dist/style.css +579 -0
- package/package.json +1 -14
- package/dist/HOCs/index.cjs +0 -4
- package/dist/HOCs/with-query-fallback.cjs +0 -16
- package/dist/assets/json/countries.json.cjs +0 -1159
- package/dist/assets/svg/arrow-down.svg.cjs +0 -3
- package/dist/assets/svg/arrow-forward.svg.cjs +0 -3
- package/dist/assets/svg/arrow-left.svg.cjs +0 -3
- package/dist/assets/svg/arrow-right.svg.cjs +0 -3
- package/dist/assets/svg/calendar.svg.cjs +0 -3
- package/dist/assets/svg/check.svg.cjs +0 -3
- package/dist/assets/svg/clock-time.svg.cjs +0 -3
- package/dist/assets/svg/done-check.svg.cjs +0 -3
- package/dist/assets/svg/earth-home-world.svg.cjs +0 -3
- package/dist/assets/svg/eye-hidden.svg.cjs +0 -3
- package/dist/assets/svg/eye-show-visible.svg.cjs +0 -3
- package/dist/assets/svg/image-placeholder.svg.cjs +0 -3
- package/dist/assets/svg/loading-waiting.svg.cjs +0 -3
- package/dist/assets/svg/long-arrow-right.svg.cjs +0 -3
- package/dist/assets/svg/minus.svg.cjs +0 -3
- package/dist/assets/svg/plus.svg.cjs +0 -3
- package/dist/assets/svg/search-add-plus-middle.svg.cjs +0 -3
- package/dist/assets/svg/search-minus.svg.cjs +0 -3
- package/dist/assets/svg/times-close-delete.svg.cjs +0 -3
- package/dist/components/index.cjs +0 -8
- package/dist/components/scroll-view.cjs +0 -19
- package/dist/components/svg-loader.cjs +0 -14
- package/dist/components/virtualized-list.cjs +0 -43
- package/dist/constants/index.cjs +0 -32
- package/dist/hooks/index.cjs +0 -14
- package/dist/hooks/use-controllable-state.cjs +0 -39
- package/dist/hooks/use-countdown-timer.cjs +0 -85
- package/dist/hooks/use-hover-line-effect/index.cjs +0 -24
- package/dist/hooks/use-hover-line-effect/use-hover-line-effect.module.scss.cjs +0 -8
- package/dist/hooks/use-query-params.cjs +0 -53
- package/dist/hooks/use-ripple-effect/index.cjs +0 -69
- package/dist/hooks/use-ripple-effect/use-ripple-effect.module.scss.cjs +0 -11
- package/dist/hooks/use-window-screen/index.cjs +0 -52
- package/dist/index.cjs +0 -305
- package/dist/lib/accordion/accordion/accordion.cjs +0 -109
- package/dist/lib/accordion/accordion/helpers.cjs +0 -21
- package/dist/lib/accordion/accordion/types.cjs +0 -7
- package/dist/lib/accordion/accordion-content/accordion-content.cjs +0 -41
- package/dist/lib/accordion/accordion-content/helpers.cjs +0 -8
- package/dist/lib/accordion/accordion-group/accordion-group.cjs +0 -56
- package/dist/lib/accordion/accordion-group/helpers.cjs +0 -20
- package/dist/lib/accordion/accordion-group/types.cjs +0 -7
- package/dist/lib/accordion/accordion-summary/accordion-summary.cjs +0 -64
- package/dist/lib/accordion/accordion-summary/helpers.cjs +0 -15
- package/dist/lib/accordion/accordion-summary/types.cjs +0 -8
- package/dist/lib/badge/badge.cjs +0 -42
- package/dist/lib/badge/helpers.cjs +0 -8
- package/dist/lib/box/box.cjs +0 -55
- package/dist/lib/box/helpers.cjs +0 -8
- package/dist/lib/breadcrumbs/breadcrumb-item/breadcrumb-item.cjs +0 -28
- package/dist/lib/breadcrumbs/breadcrumbs/breadcrumbs.cjs +0 -44
- package/dist/lib/button/button.cjs +0 -235
- package/dist/lib/button/helpers.cjs +0 -74
- package/dist/lib/cascader/cascader.cjs +0 -497
- package/dist/lib/cascader/helpers.cjs +0 -28
- package/dist/lib/checkbox/checkbox.cjs +0 -52
- package/dist/lib/checkbox/checkbox.module.scss.cjs +0 -23
- package/dist/lib/chip/chip.cjs +0 -60
- package/dist/lib/chip/helpers.cjs +0 -14
- package/dist/lib/collapse/collapse.cjs +0 -50
- package/dist/lib/container/container.cjs +0 -101
- package/dist/lib/container/helpers.cjs +0 -12
- package/dist/lib/count-up/count-up.cjs +0 -38
- package/dist/lib/countdown-timer/countdown-timer.cjs +0 -9
- package/dist/lib/date-picker/date-picker.cjs +0 -169
- package/dist/lib/date-picker/helpers.cjs +0 -12
- package/dist/lib/dialog/dialog/dialog.cjs +0 -93
- package/dist/lib/dialog/dialog/helpers.cjs +0 -27
- package/dist/lib/dialog/dialog-body/dialog-body.cjs +0 -32
- package/dist/lib/dialog/dialog-close/dialog-close.cjs +0 -5
- package/dist/lib/dialog/dialog-footer/dialog-footer.cjs +0 -31
- package/dist/lib/dialog/dialog-header/dialog-header.cjs +0 -73
- package/dist/lib/drawer/drawer/drawer.cjs +0 -100
- package/dist/lib/drawer/drawer/helpers.cjs +0 -7
- package/dist/lib/drawer/drawer-close/drawer-close.cjs +0 -5
- package/dist/lib/filter-panel/checkbox-filter-panel.cjs +0 -107
- package/dist/lib/filter-panel/filter-panel.cjs +0 -37
- package/dist/lib/filter-panel/input-range-filter-panel.cjs +0 -78
- package/dist/lib/filter-panel/input-text-filter-panel.cjs +0 -57
- package/dist/lib/filter-panel/radio-filter-panel.cjs +0 -95
- package/dist/lib/flag/flag.cjs +0 -20
- package/dist/lib/flag/helpers.cjs +0 -16
- package/dist/lib/flexbox/flex-item/flex-item.cjs +0 -22
- package/dist/lib/flexbox/flex-item/helpers.cjs +0 -10
- package/dist/lib/flexbox/flexbox/flexbox.cjs +0 -46
- package/dist/lib/flexbox/flexbox/helpers.cjs +0 -16
- package/dist/lib/floating/floating/floating.cjs +0 -97
- package/dist/lib/floating/floating/helpers.cjs +0 -9
- package/dist/lib/floating/floating-close/floating-close.cjs +0 -32
- package/dist/lib/floating/floating-content/floating-content.cjs +0 -57
- package/dist/lib/floating/floating-trigger/floating-trigger.cjs +0 -35
- package/dist/lib/form-helper-text/form-helper-text.cjs +0 -35
- package/dist/lib/form-label/form-label.cjs +0 -28
- package/dist/lib/generic-element/generic-element.cjs +0 -15
- package/dist/lib/grid/cell/cell.cjs +0 -28
- package/dist/lib/grid/cell/helpers.cjs +0 -8
- package/dist/lib/grid/grid/grid.cjs +0 -53
- package/dist/lib/grid/grid/helpers.cjs +0 -12
- package/dist/lib/highlight-words/highlight-words.cjs +0 -18
- package/dist/lib/icon/helpers.cjs +0 -12
- package/dist/lib/icon/icon.cjs +0 -38
- package/dist/lib/icon-button/helpers.cjs +0 -42
- package/dist/lib/icon-button/icon-button.cjs +0 -146
- package/dist/lib/image/helpers.cjs +0 -15
- package/dist/lib/image/image.cjs +0 -36
- package/dist/lib/input/helpers.cjs +0 -38
- package/dist/lib/input/input.cjs +0 -205
- package/dist/lib/input/input.module.scss.cjs +0 -17
- package/dist/lib/input-mask/helpers.cjs +0 -12
- package/dist/lib/input-mask/input-mask.cjs +0 -120
- package/dist/lib/input-number/input-number.cjs +0 -132
- package/dist/lib/input-number/input-number.module.scss.cjs +0 -8
- package/dist/lib/input-range/helpers.cjs +0 -12
- package/dist/lib/input-range/input-range.cjs +0 -179
- package/dist/lib/input-range/input-range.module.scss.cjs +0 -8
- package/dist/lib/lightbox/lightbox.cjs +0 -199
- package/dist/lib/linear-progress/helpers.cjs +0 -13
- package/dist/lib/linear-progress/linear-progress.cjs +0 -75
- package/dist/lib/link/helpers.cjs +0 -8
- package/dist/lib/link/link.cjs +0 -63
- package/dist/lib/loading/block-skeleton/block-skeleton.cjs +0 -21
- package/dist/lib/loading/image-skeleton/image-skeleton.cjs +0 -43
- package/dist/lib/loading/loading-overlay/loading-overlay.cjs +0 -60
- package/dist/lib/loading/text-skeleton/text-skeleton.cjs +0 -16
- package/dist/lib/marquee/marquee/helpers.cjs +0 -15
- package/dist/lib/marquee/marquee/marquee.cjs +0 -99
- package/dist/lib/marquee/marquee/types.cjs +0 -7
- package/dist/lib/marquee/marquee-item/marquee-item.cjs +0 -16
- package/dist/lib/menu/menu/menu.cjs +0 -38
- package/dist/lib/menu/menu-item/helpers.cjs +0 -16
- package/dist/lib/menu/menu-item/menu-item.cjs +0 -34
- package/dist/lib/menu/menu-list/menu-list.cjs +0 -34
- package/dist/lib/menu/menu-list/types.cjs +0 -7
- package/dist/lib/menu/menu-trigger/menu-trigger.cjs +0 -8
- package/dist/lib/multiple-select/helpers.cjs +0 -12
- package/dist/lib/multiple-select/multiple-select.cjs +0 -348
- package/dist/lib/nav-link/nav-link.cjs +0 -40
- package/dist/lib/notifications/helpers.cjs +0 -39
- package/dist/lib/notifications/notifications.cjs +0 -167
- package/dist/lib/otp-input/otp-input.cjs +0 -132
- package/dist/lib/pagination/helpers.cjs +0 -57
- package/dist/lib/pagination/pagination.cjs +0 -163
- package/dist/lib/phone-input/phone-input.cjs +0 -182
- package/dist/lib/popover/popover/helpers.cjs +0 -7
- package/dist/lib/popover/popover/popover.cjs +0 -31
- package/dist/lib/popover/popover-close/popover-close.cjs +0 -5
- package/dist/lib/popover/popover-content/popover-content.cjs +0 -29
- package/dist/lib/popover/popover-trigger/popover-trigger.cjs +0 -8
- package/dist/lib/primitive/primitive.cjs +0 -30
- package/dist/lib/progress/progress.cjs +0 -50
- package/dist/lib/radio-button/helpers.cjs +0 -8
- package/dist/lib/radio-button/radio-button.cjs +0 -33
- package/dist/lib/radio-button/radio-button.module.scss.cjs +0 -17
- package/dist/lib/select/helpers.cjs +0 -12
- package/dist/lib/select/select.cjs +0 -317
- package/dist/lib/star-rating/star-rating.cjs +0 -39
- package/dist/lib/stepper/step.cjs +0 -69
- package/dist/lib/stepper/stepper.cjs +0 -86
- package/dist/lib/stepper/types.cjs +0 -8
- package/dist/lib/swiper/swiper/helpers.cjs +0 -16
- package/dist/lib/swiper/swiper/swiper.cjs +0 -113
- package/dist/lib/swiper/swiper-dots-paging/swiper-dots-paging.cjs +0 -77
- package/dist/lib/swiper/swiper-slide/swiper-slide.cjs +0 -31
- package/dist/lib/switch/switch.cjs +0 -19
- package/dist/lib/switch/switch.module.scss.cjs +0 -14
- package/dist/lib/table/table/table.cjs +0 -26
- package/dist/lib/table/table-body/table-body.cjs +0 -34
- package/dist/lib/table/table-cell/table-cell.cjs +0 -12
- package/dist/lib/table/table-footer/table-footer.cjs +0 -7
- package/dist/lib/table/table-head/table-head.cjs +0 -33
- package/dist/lib/table/table-row/table-row.cjs +0 -7
- package/dist/lib/tabs/tab/helpers.cjs +0 -9
- package/dist/lib/tabs/tab/tab.cjs +0 -26
- package/dist/lib/tabs/tab-content/tab-content.cjs +0 -22
- package/dist/lib/tabs/tab-indicator/tab-indicator.cjs +0 -92
- package/dist/lib/tabs/tab-list/helpers.cjs +0 -8
- package/dist/lib/tabs/tab-list/tab-list.cjs +0 -40
- package/dist/lib/tabs/tab-panel/helpers.cjs +0 -8
- package/dist/lib/tabs/tab-panel/tab-panel.cjs +0 -21
- package/dist/lib/tabs/tabs/helpers.cjs +0 -36
- package/dist/lib/tabs/tabs/tabs.cjs +0 -62
- package/dist/lib/text/helpers.cjs +0 -140
- package/dist/lib/text/text.cjs +0 -41
- package/dist/lib/textarea/helpers.cjs +0 -12
- package/dist/lib/textarea/textarea.cjs +0 -122
- package/dist/lib/textarea/textarea.module.scss.cjs +0 -14
- package/dist/lib/time-picker/time-picker.cjs +0 -305
- package/dist/lib/tooltip/tooltip.cjs +0 -124
- package/dist/lib/trans-html/trans-html.cjs +0 -26
- package/dist/lib/unordered-list/list-item/helpers.cjs +0 -14
- package/dist/lib/unordered-list/list-item/list-item.cjs +0 -36
- package/dist/lib/unordered-list/unordered-list/helpers.cjs +0 -14
- package/dist/lib/unordered-list/unordered-list/unordered-list.cjs +0 -27
- package/dist/lib/video/helpers.cjs +0 -10
- package/dist/lib/video/video.cjs +0 -24
- package/dist/theme/index.cjs +0 -22
- package/dist/theme/palette.cjs +0 -287
- package/dist/theme/provider.cjs +0 -303
- package/dist/theme/screens.cjs +0 -24
- package/dist/theme/typography.cjs +0 -29
- package/dist/types/index.cjs +0 -1
- package/dist/utils/common.cjs +0 -139
- package/dist/utils/emotion-helpers.cjs +0 -145
- package/dist/utils/index.cjs +0 -233
- package/dist/utils/query-params.cjs +0 -130
- package/dist/utils/stylesheet.cjs +0 -5
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
const react = require("react");
|
|
5
|
-
const react$1 = require("motion/react");
|
|
6
|
-
const theme_index = require("../../../theme/index.cjs");
|
|
7
|
-
const floating = require("../../floating/floating/floating.cjs");
|
|
8
|
-
const floatingContent = require("../../floating/floating-content/floating-content.cjs");
|
|
9
|
-
const Drawer = ({ children, placement = "left", ...props }) => {
|
|
10
|
-
const initial = react.useMemo(() => {
|
|
11
|
-
switch (placement) {
|
|
12
|
-
case "left":
|
|
13
|
-
return { x: "-100%" };
|
|
14
|
-
case "right":
|
|
15
|
-
return { x: "100%" };
|
|
16
|
-
case "top":
|
|
17
|
-
return { y: "-100%" };
|
|
18
|
-
case "bottom":
|
|
19
|
-
return { y: "100%" };
|
|
20
|
-
}
|
|
21
|
-
}, [placement]);
|
|
22
|
-
const animate = react.useMemo(() => {
|
|
23
|
-
switch (placement) {
|
|
24
|
-
case "left":
|
|
25
|
-
case "right":
|
|
26
|
-
return { x: 0 };
|
|
27
|
-
case "top":
|
|
28
|
-
case "bottom":
|
|
29
|
-
return { y: 0 };
|
|
30
|
-
}
|
|
31
|
-
}, [placement]);
|
|
32
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33
|
-
floating.Floating,
|
|
34
|
-
{
|
|
35
|
-
dismissProps: {
|
|
36
|
-
enabled: true
|
|
37
|
-
},
|
|
38
|
-
...props,
|
|
39
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
40
|
-
floatingContent.FloatingContent,
|
|
41
|
-
{
|
|
42
|
-
floatingOverlayProps: {
|
|
43
|
-
disabled: false,
|
|
44
|
-
lockScroll: true,
|
|
45
|
-
style: {
|
|
46
|
-
zIndex: theme_index.FLOATING_Z_INDEX
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
css: {
|
|
50
|
-
maxHeight: "100%",
|
|
51
|
-
maxWidth: "100%",
|
|
52
|
-
overflow: "hidden",
|
|
53
|
-
display: "flex",
|
|
54
|
-
flexDirection: "column"
|
|
55
|
-
},
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
58
|
-
"div",
|
|
59
|
-
{
|
|
60
|
-
css: {
|
|
61
|
-
position: "fixed",
|
|
62
|
-
top: 0,
|
|
63
|
-
right: 0,
|
|
64
|
-
bottom: 0,
|
|
65
|
-
left: 0,
|
|
66
|
-
backgroundColor: "rgba(0, 0, 0, 0.4)",
|
|
67
|
-
pointerEvents: "none"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
),
|
|
71
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
72
|
-
react$1.motion.div,
|
|
73
|
-
{
|
|
74
|
-
initial,
|
|
75
|
-
animate,
|
|
76
|
-
exit: initial,
|
|
77
|
-
transition: {
|
|
78
|
-
duration: 0.2,
|
|
79
|
-
ease: "easeInOut"
|
|
80
|
-
},
|
|
81
|
-
css: [
|
|
82
|
-
{
|
|
83
|
-
position: "fixed",
|
|
84
|
-
backgroundColor: "white"
|
|
85
|
-
},
|
|
86
|
-
placement === "left" && { top: 0, bottom: 0, left: 0 },
|
|
87
|
-
placement === "right" && { top: 0, bottom: 0, right: 0 },
|
|
88
|
-
placement === "top" && { left: 0, right: 0, top: 0 },
|
|
89
|
-
placement === "bottom" && { left: 0, right: 0, bottom: 0 }
|
|
90
|
-
],
|
|
91
|
-
children
|
|
92
|
-
}
|
|
93
|
-
)
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
};
|
|
100
|
-
exports.Drawer = Drawer;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const helpers = require("../../floating/floating/helpers.cjs");
|
|
4
|
-
const useDrawerContext = () => {
|
|
5
|
-
return helpers.useFloatingContext();
|
|
6
|
-
};
|
|
7
|
-
exports.useDrawerContext = useDrawerContext;
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
const react = require("react");
|
|
5
|
-
const lodashEs = require("lodash-es");
|
|
6
|
-
const virtualizedList = require("../../components/virtualized-list.cjs");
|
|
7
|
-
const useQueryParams = require("../../hooks/use-query-params.cjs");
|
|
8
|
-
require("clsx");
|
|
9
|
-
require("../../theme/palette.cjs");
|
|
10
|
-
const common = require("../../utils/common.cjs");
|
|
11
|
-
const queryParams = require("../../utils/query-params.cjs");
|
|
12
|
-
const checkbox = require("../checkbox/checkbox.cjs");
|
|
13
|
-
const input = require("../input/input.cjs");
|
|
14
|
-
const ROW_HEIGHT = 32;
|
|
15
|
-
const DISPLAY_ROW_COUNT = 5;
|
|
16
|
-
const CheckboxFilterPanel = ({
|
|
17
|
-
value,
|
|
18
|
-
options,
|
|
19
|
-
inputSearchProps: _inputSearchProps,
|
|
20
|
-
onChange,
|
|
21
|
-
queryParam,
|
|
22
|
-
name,
|
|
23
|
-
listProps
|
|
24
|
-
}) => {
|
|
25
|
-
const { enabled: searchEnabled = false, ...inputSearchProps } = _inputSearchProps ?? {};
|
|
26
|
-
const [inputValue, setInputValue] = react.useState("");
|
|
27
|
-
const { queryParams: queryParams$1, setQueryParams } = useQueryParams.useQueryParams(
|
|
28
|
-
queryParam ? {
|
|
29
|
-
[queryParam.key]: {
|
|
30
|
-
parser(value2) {
|
|
31
|
-
return new queryParams.ArrayParamParser(value2).parse();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
} : {}
|
|
35
|
-
);
|
|
36
|
-
const valueSet = react.useMemo(() => {
|
|
37
|
-
const queryParamKey = queryParam == null ? void 0 : queryParam.key;
|
|
38
|
-
const valueByQueryParam = queryParamKey ? queryParams$1[queryParamKey] : void 0;
|
|
39
|
-
return new Set(value ?? valueByQueryParam ?? []);
|
|
40
|
-
}, [queryParam == null ? void 0 : queryParam.key, queryParams$1, value]);
|
|
41
|
-
const onSearchChange = (e) => {
|
|
42
|
-
var _a;
|
|
43
|
-
e.target.value = lodashEs.trimStart(e.target.value);
|
|
44
|
-
setInputValue(e.target.value);
|
|
45
|
-
(_a = inputSearchProps.onChange) == null ? void 0 : _a.call(inputSearchProps, e);
|
|
46
|
-
};
|
|
47
|
-
const displayOptions = react.useMemo(() => {
|
|
48
|
-
if (!inputValue) {
|
|
49
|
-
return options;
|
|
50
|
-
}
|
|
51
|
-
return options.filter((option) => common.matchSearch(option.searchLabel ?? String(option.label), inputValue));
|
|
52
|
-
}, [inputValue, options]);
|
|
53
|
-
const RowComponent = ({ row }) => {
|
|
54
|
-
const rowData = displayOptions.at(row.index);
|
|
55
|
-
const onCheckboxChange = (e) => {
|
|
56
|
-
if (queryParam) {
|
|
57
|
-
const currentList = queryParams$1[queryParam.key] ?? [];
|
|
58
|
-
const targetValue = e.currentTarget.value;
|
|
59
|
-
const nextList = e.target.checked ? [...currentList, targetValue] : currentList.filter((value2) => value2 !== targetValue);
|
|
60
|
-
setQueryParams(
|
|
61
|
-
{
|
|
62
|
-
[queryParam.key]: nextList.length ? nextList : void 0
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
preventScrollReset: true
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
onChange == null ? void 0 : onChange(e);
|
|
70
|
-
};
|
|
71
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { css: { paddingTop: 4, paddingBottom: 4 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
72
|
-
checkbox.Checkbox,
|
|
73
|
-
{
|
|
74
|
-
containerProps: {
|
|
75
|
-
style: {
|
|
76
|
-
width: "100%"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
name,
|
|
80
|
-
checked: rowData ? rowData.isChecked ?? valueSet.has(rowData.value) : false,
|
|
81
|
-
value: rowData == null ? void 0 : rowData.value,
|
|
82
|
-
onChange: onCheckboxChange,
|
|
83
|
-
children: rowData == null ? void 0 : rowData.label
|
|
84
|
-
}
|
|
85
|
-
) });
|
|
86
|
-
};
|
|
87
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
88
|
-
searchEnabled && /* @__PURE__ */ jsxRuntime.jsx("div", { css: { marginBottom: 8 }, children: /* @__PURE__ */ jsxRuntime.jsx(input.Input, { xs: { ...inputSearchProps.xs }, value: inputValue, ...inputSearchProps, onChange: onSearchChange }) }),
|
|
89
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
90
|
-
virtualizedList.VirtualizedList,
|
|
91
|
-
{
|
|
92
|
-
options: {
|
|
93
|
-
count: displayOptions.length,
|
|
94
|
-
estimateSize: () => ROW_HEIGHT
|
|
95
|
-
},
|
|
96
|
-
RowComponent,
|
|
97
|
-
style: {
|
|
98
|
-
maxHeight: ROW_HEIGHT * DISPLAY_ROW_COUNT,
|
|
99
|
-
...listProps == null ? void 0 : listProps.style
|
|
100
|
-
},
|
|
101
|
-
css: { paddingLeft: 8, paddingRight: 8 },
|
|
102
|
-
...listProps
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
] });
|
|
106
|
-
};
|
|
107
|
-
exports.CheckboxFilterPanel = CheckboxFilterPanel;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
const react = require("react");
|
|
5
|
-
const usehooksTs = require("usehooks-ts");
|
|
6
|
-
const checkboxFilterPanel = require("./checkbox-filter-panel.cjs");
|
|
7
|
-
const inputRangeFilterPanel = require("./input-range-filter-panel.cjs");
|
|
8
|
-
const inputTextFilterPanel = require("./input-text-filter-panel.cjs");
|
|
9
|
-
const radioFilterPanel = require("./radio-filter-panel.cjs");
|
|
10
|
-
const arrowDown = require("../../assets/svg/arrow-down.svg.cjs");
|
|
11
|
-
const collapse = require("../collapse/collapse.cjs");
|
|
12
|
-
const icon = require("../icon/icon.cjs");
|
|
13
|
-
const FilterPanel = ({ label, defaultOpen = true, className, ...props }) => {
|
|
14
|
-
const [open, toggle] = usehooksTs.useToggle(defaultOpen);
|
|
15
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { css: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
16
|
-
/* @__PURE__ */ jsxRuntime.jsxs("button", { css: { display: "flex", alignItems: "center", gap: 8, textAlign: "left" }, onClick: toggle, children: [
|
|
17
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { css: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", fontWeight: 500 }, children: react.isValidElement(label) ? label : /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }) }),
|
|
18
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19
|
-
icon.Icon,
|
|
20
|
-
{
|
|
21
|
-
css: {
|
|
22
|
-
transition: "transform 150ms",
|
|
23
|
-
...open ? { transform: "rotate(-180deg)" } : {}
|
|
24
|
-
},
|
|
25
|
-
source: arrowDown
|
|
26
|
-
}
|
|
27
|
-
)
|
|
28
|
-
] }),
|
|
29
|
-
/* @__PURE__ */ jsxRuntime.jsx(collapse.Collapse, { open, children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30
|
-
props.fieldType === "checkbox" && /* @__PURE__ */ jsxRuntime.jsx(checkboxFilterPanel.CheckboxFilterPanel, { ...props }),
|
|
31
|
-
props.fieldType === "radio" && /* @__PURE__ */ jsxRuntime.jsx(radioFilterPanel.RadioFilterPanel, { ...props }),
|
|
32
|
-
props.fieldType === "input-range" && /* @__PURE__ */ jsxRuntime.jsx(inputRangeFilterPanel.InputRangeFilterPanel, { ...props }),
|
|
33
|
-
props.fieldType === "input-text" && /* @__PURE__ */ jsxRuntime.jsx(inputTextFilterPanel.InputTextFilterPanel, { ...props })
|
|
34
|
-
] }) })
|
|
35
|
-
] });
|
|
36
|
-
};
|
|
37
|
-
exports.FilterPanel = FilterPanel;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
const constants_index = require("../../constants/index.cjs");
|
|
5
|
-
const useQueryParams = require("../../hooks/use-query-params.cjs");
|
|
6
|
-
require("react");
|
|
7
|
-
require("clsx");
|
|
8
|
-
require("lodash-es");
|
|
9
|
-
require("../../theme/palette.cjs");
|
|
10
|
-
const queryParams = require("../../utils/query-params.cjs");
|
|
11
|
-
const inputRange = require("../input-range/input-range.cjs");
|
|
12
|
-
const InputRangeFilterPanel = ({ value, queryParam, placeholder, onChange }) => {
|
|
13
|
-
var _a, _b, _c, _d;
|
|
14
|
-
const { queryParams: queryParams$1, setQueryParams } = useQueryParams.useQueryParams({
|
|
15
|
-
...((_a = queryParam == null ? void 0 : queryParam.from) == null ? void 0 : _a.key) ? {
|
|
16
|
-
[queryParam.from.key]: {
|
|
17
|
-
parser(value2) {
|
|
18
|
-
return new queryParams.NumberParamParser(value2).parse();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
} : {},
|
|
22
|
-
...((_b = queryParam == null ? void 0 : queryParam.to) == null ? void 0 : _b.key) ? {
|
|
23
|
-
[queryParam.to.key]: {
|
|
24
|
-
parser(value2) {
|
|
25
|
-
return new queryParams.NumberParamParser(value2).parse();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
} : {}
|
|
29
|
-
});
|
|
30
|
-
const finalValue = {
|
|
31
|
-
from: (value == null ? void 0 : value.from) ?? (((_c = queryParam == null ? void 0 : queryParam.from) == null ? void 0 : _c.key) ? queryParams$1[queryParam.from.key] : void 0),
|
|
32
|
-
to: (value == null ? void 0 : value.to) ?? (((_d = queryParam == null ? void 0 : queryParam.to) == null ? void 0 : _d.key) ? queryParams$1[queryParam.to.key] : void 0)
|
|
33
|
-
};
|
|
34
|
-
const onInputRangeChange = (event, edge) => {
|
|
35
|
-
var _a2, _b2;
|
|
36
|
-
const valueAsNumber = event.target.valueAsNumber;
|
|
37
|
-
if (edge === "from" && ((_a2 = queryParam == null ? void 0 : queryParam.from) == null ? void 0 : _a2.key)) {
|
|
38
|
-
setQueryParams(
|
|
39
|
-
{
|
|
40
|
-
[queryParam.from.key]: isNaN(valueAsNumber) ? void 0 : valueAsNumber
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
preventScrollReset: true
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
if (edge === "to" && ((_b2 = queryParam == null ? void 0 : queryParam.to) == null ? void 0 : _b2.key)) {
|
|
48
|
-
setQueryParams(
|
|
49
|
-
{
|
|
50
|
-
[queryParam.to.key]: isNaN(valueAsNumber) ? void 0 : valueAsNumber
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
preventScrollReset: true
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
onChange == null ? void 0 : onChange(event, edge);
|
|
58
|
-
};
|
|
59
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
-
inputRange.InputRange,
|
|
61
|
-
{
|
|
62
|
-
onChange: onInputRangeChange,
|
|
63
|
-
inputs: [
|
|
64
|
-
{
|
|
65
|
-
debounce: constants_index.TYPING_DEBOUNCE,
|
|
66
|
-
value: finalValue.from ?? "",
|
|
67
|
-
placeholder: placeholder == null ? void 0 : placeholder.from
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
debounce: constants_index.TYPING_DEBOUNCE,
|
|
71
|
-
value: finalValue.to ?? "",
|
|
72
|
-
placeholder: placeholder == null ? void 0 : placeholder.to
|
|
73
|
-
}
|
|
74
|
-
]
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
};
|
|
78
|
-
exports.InputRangeFilterPanel = InputRangeFilterPanel;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
const lodashEs = require("lodash-es");
|
|
5
|
-
const useQueryParams = require("../../hooks/use-query-params.cjs");
|
|
6
|
-
require("react");
|
|
7
|
-
require("clsx");
|
|
8
|
-
require("../../theme/palette.cjs");
|
|
9
|
-
const stylesheet = require("../../utils/stylesheet.cjs");
|
|
10
|
-
const queryParams = require("../../utils/query-params.cjs");
|
|
11
|
-
const input = require("../input/input.cjs");
|
|
12
|
-
const InputTextFilterPanel = ({ queryParam, fieldType, ...props }) => {
|
|
13
|
-
const queryParamKey = queryParam == null ? void 0 : queryParam.key;
|
|
14
|
-
const { queryParams: queryParams$1, setQueryParams } = useQueryParams.useQueryParams(
|
|
15
|
-
queryParamKey ? {
|
|
16
|
-
[queryParamKey]: {
|
|
17
|
-
parser(value) {
|
|
18
|
-
return new queryParams.StringParamParser(value).parse();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
} : {}
|
|
22
|
-
);
|
|
23
|
-
const finalValue = (() => {
|
|
24
|
-
if (lodashEs.isString(props.value)) {
|
|
25
|
-
return props.value;
|
|
26
|
-
}
|
|
27
|
-
if (queryParamKey) {
|
|
28
|
-
return queryParams$1[queryParamKey] ?? "";
|
|
29
|
-
}
|
|
30
|
-
return "";
|
|
31
|
-
})();
|
|
32
|
-
const onChange = (e) => {
|
|
33
|
-
var _a;
|
|
34
|
-
(_a = props.onChange) == null ? void 0 : _a.call(props, e);
|
|
35
|
-
if (queryParamKey) {
|
|
36
|
-
setQueryParams(
|
|
37
|
-
{
|
|
38
|
-
[queryParamKey]: e.target.value
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
preventScrollReset: true
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
47
|
-
input.Input,
|
|
48
|
-
{
|
|
49
|
-
name: queryParamKey,
|
|
50
|
-
...props,
|
|
51
|
-
value: finalValue,
|
|
52
|
-
onChange,
|
|
53
|
-
className: stylesheet.cn(fieldType, props.className)
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
exports.InputTextFilterPanel = InputTextFilterPanel;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
const react = require("react");
|
|
5
|
-
const lodashEs = require("lodash-es");
|
|
6
|
-
const virtualizedList = require("../../components/virtualized-list.cjs");
|
|
7
|
-
const useQueryParams = require("../../hooks/use-query-params.cjs");
|
|
8
|
-
require("clsx");
|
|
9
|
-
require("../../theme/palette.cjs");
|
|
10
|
-
const common = require("../../utils/common.cjs");
|
|
11
|
-
const queryParams = require("../../utils/query-params.cjs");
|
|
12
|
-
const radioButton = require("../radio-button/radio-button.cjs");
|
|
13
|
-
const input = require("../input/input.cjs");
|
|
14
|
-
const ROW_HEIGHT = 32;
|
|
15
|
-
const DISPLAY_ROW_COUNT = 5;
|
|
16
|
-
const RadioFilterPanel = ({
|
|
17
|
-
options,
|
|
18
|
-
inputSearchProps: _inputSearchProps,
|
|
19
|
-
value,
|
|
20
|
-
onChange,
|
|
21
|
-
queryParam,
|
|
22
|
-
fallbackValue
|
|
23
|
-
}) => {
|
|
24
|
-
const { enabled: searchEnabled = false, ...inputSearchProps } = _inputSearchProps ?? {};
|
|
25
|
-
const uniqueId = react.useId();
|
|
26
|
-
const [inputValue, setInputValue] = react.useState("");
|
|
27
|
-
const { queryParams: queryParams$1, setQueryParams } = useQueryParams.useQueryParams(
|
|
28
|
-
queryParam ? {
|
|
29
|
-
[queryParam.key]: {
|
|
30
|
-
parser(value2) {
|
|
31
|
-
return new queryParams.StringParamParser(value2).parse();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
} : {}
|
|
35
|
-
);
|
|
36
|
-
const valueByQueryParam = queryParam ? queryParams$1[queryParam.key] : void 0;
|
|
37
|
-
const finalValue = value ?? valueByQueryParam ?? fallbackValue;
|
|
38
|
-
const onInputChange = (e) => {
|
|
39
|
-
var _a;
|
|
40
|
-
e.target.value = lodashEs.trimStart(e.target.value);
|
|
41
|
-
setInputValue(e.target.value);
|
|
42
|
-
(_a = inputSearchProps.onChange) == null ? void 0 : _a.call(inputSearchProps, e);
|
|
43
|
-
};
|
|
44
|
-
const displayOptions = react.useMemo(() => {
|
|
45
|
-
if (!inputValue) {
|
|
46
|
-
return options;
|
|
47
|
-
}
|
|
48
|
-
return options.filter((option) => common.matchSearch(option.searchLabel ?? String(option.label), inputValue));
|
|
49
|
-
}, [inputValue, options]);
|
|
50
|
-
const RowComponent = ({ row }) => {
|
|
51
|
-
const rowData = displayOptions.at(row.index);
|
|
52
|
-
const onRadioChange = (e) => {
|
|
53
|
-
if (lodashEs.isNil(rowData)) return;
|
|
54
|
-
if (queryParam) {
|
|
55
|
-
setQueryParams(
|
|
56
|
-
{
|
|
57
|
-
[queryParam.key]: queryParam.transform ? queryParam.transform(rowData.value) : rowData.value
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
preventScrollReset: true
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
onChange == null ? void 0 : onChange(e);
|
|
65
|
-
};
|
|
66
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { css: { paddingTop: "0.25rem", paddingBottom: "0.25rem" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
67
|
-
radioButton.RadioButton,
|
|
68
|
-
{
|
|
69
|
-
name: uniqueId,
|
|
70
|
-
checked: (rowData == null ? void 0 : rowData.isChecked) ?? finalValue === (rowData == null ? void 0 : rowData.value),
|
|
71
|
-
value: rowData == null ? void 0 : rowData.value,
|
|
72
|
-
onChange: onRadioChange,
|
|
73
|
-
children: rowData == null ? void 0 : rowData.label
|
|
74
|
-
}
|
|
75
|
-
) });
|
|
76
|
-
};
|
|
77
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
78
|
-
searchEnabled && /* @__PURE__ */ jsxRuntime.jsx("div", { css: { marginBottom: "0.5rem" }, children: /* @__PURE__ */ jsxRuntime.jsx(input.Input, { xs: { ...inputSearchProps.xs }, value: inputValue, ...inputSearchProps, onChange: onInputChange }) }),
|
|
79
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
80
|
-
virtualizedList.VirtualizedList,
|
|
81
|
-
{
|
|
82
|
-
css: { paddingLeft: "0.5rem", paddingRight: "0.5rem" },
|
|
83
|
-
options: {
|
|
84
|
-
count: displayOptions.length,
|
|
85
|
-
estimateSize: () => ROW_HEIGHT
|
|
86
|
-
},
|
|
87
|
-
RowComponent,
|
|
88
|
-
style: {
|
|
89
|
-
maxHeight: ROW_HEIGHT * DISPLAY_ROW_COUNT
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
)
|
|
93
|
-
] });
|
|
94
|
-
};
|
|
95
|
-
exports.RadioFilterPanel = RadioFilterPanel;
|
package/dist/lib/flag/flag.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
const helpers = require("./helpers.cjs");
|
|
5
|
-
const earthHomeWorld = require("../../assets/svg/earth-home-world.svg.cjs");
|
|
6
|
-
const image = require("../image/image.cjs");
|
|
7
|
-
const Flag = ({ ref, ..._props }) => {
|
|
8
|
-
const { countryCode, fallback = earthHomeWorld, ...props } = helpers.getFlagProps(_props);
|
|
9
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
image.Image,
|
|
11
|
-
{
|
|
12
|
-
src: countryCode ? `https://flagcdn.com/${countryCode.toLowerCase()}.svg` : void 0,
|
|
13
|
-
alt: "VN",
|
|
14
|
-
fallback,
|
|
15
|
-
ref,
|
|
16
|
-
...props
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
exports.Flag = Flag;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const utils_index = require("../../utils/index.cjs");
|
|
4
|
-
const defaultProps = {
|
|
5
|
-
xs: {
|
|
6
|
-
css: {
|
|
7
|
-
width: 24,
|
|
8
|
-
aspectRatio: "4 / 3",
|
|
9
|
-
objectFit: "contain"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
const getFlagProps = (extended) => {
|
|
14
|
-
return utils_index.mergeComponentProps(defaultProps, extended);
|
|
15
|
-
};
|
|
16
|
-
exports.getFlagProps = getFlagProps;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
const helpers = require("./helpers.cjs");
|
|
5
|
-
const theme_screens = require("../../../theme/screens.cjs");
|
|
6
|
-
require("../../../theme/palette.cjs");
|
|
7
|
-
const FlexItem = ({ children, ref, ...rest }) => {
|
|
8
|
-
const { xs, sm, md, lg, ...props } = helpers.getFlexItemProps(rest);
|
|
9
|
-
const css = [
|
|
10
|
-
{
|
|
11
|
-
maxWidth: "100%"
|
|
12
|
-
},
|
|
13
|
-
xs == null ? void 0 : xs.css,
|
|
14
|
-
{
|
|
15
|
-
[theme_screens.mediaQuery("sm")]: sm == null ? void 0 : sm.css,
|
|
16
|
-
[theme_screens.mediaQuery("md")]: md == null ? void 0 : md.css,
|
|
17
|
-
[theme_screens.mediaQuery("lg")]: lg == null ? void 0 : lg.css
|
|
18
|
-
}
|
|
19
|
-
];
|
|
20
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { css, ...props, ref, children });
|
|
21
|
-
};
|
|
22
|
-
exports.FlexItem = FlexItem;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const utils_index = require("../../../utils/index.cjs");
|
|
4
|
-
const defaultProps = {
|
|
5
|
-
xs: {}
|
|
6
|
-
};
|
|
7
|
-
const getFlexItemProps = (extended) => {
|
|
8
|
-
return utils_index.mergeComponentProps(defaultProps, extended);
|
|
9
|
-
};
|
|
10
|
-
exports.getFlexItemProps = getFlexItemProps;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
const helpers = require("./helpers.cjs");
|
|
5
|
-
require("react");
|
|
6
|
-
require("clsx");
|
|
7
|
-
require("lodash-es");
|
|
8
|
-
const theme_screens = require("../../../theme/screens.cjs");
|
|
9
|
-
require("../../../theme/palette.cjs");
|
|
10
|
-
const stylesheet = require("../../../utils/stylesheet.cjs");
|
|
11
|
-
const Flexbox = ({ children, container, ref, ..._props }) => {
|
|
12
|
-
const { xs, sm, md, lg, className, ...rest } = helpers.getFlexboxProps(_props);
|
|
13
|
-
const css = [
|
|
14
|
-
createStyle(xs),
|
|
15
|
-
{
|
|
16
|
-
[theme_screens.mediaQuery("sm")]: createStyle(sm),
|
|
17
|
-
[theme_screens.mediaQuery("md")]: createStyle(md),
|
|
18
|
-
[theme_screens.mediaQuery("lg")]: createStyle(lg)
|
|
19
|
-
}
|
|
20
|
-
];
|
|
21
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22
|
-
"div",
|
|
23
|
-
{
|
|
24
|
-
css,
|
|
25
|
-
className: stylesheet.cn(
|
|
26
|
-
{
|
|
27
|
-
container
|
|
28
|
-
},
|
|
29
|
-
className
|
|
30
|
-
),
|
|
31
|
-
...rest,
|
|
32
|
-
ref,
|
|
33
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { css: { display: "flex", width: "100%", height: "100%" }, children })
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
const createStyle = ({ css: { width, height, ...css } = {} } = {}) => {
|
|
38
|
-
return [
|
|
39
|
-
{
|
|
40
|
-
width,
|
|
41
|
-
height,
|
|
42
|
-
"& > *": css
|
|
43
|
-
}
|
|
44
|
-
];
|
|
45
|
-
};
|
|
46
|
-
exports.Flexbox = Flexbox;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const utils_index = require("../../../utils/index.cjs");
|
|
4
|
-
const defaultProps = {
|
|
5
|
-
xs: {
|
|
6
|
-
css: {
|
|
7
|
-
flexDirection: "row",
|
|
8
|
-
alignItems: "flex-start",
|
|
9
|
-
justifyContent: "flex-start"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
const getFlexboxProps = (extended) => {
|
|
14
|
-
return utils_index.mergeComponentProps(defaultProps, extended);
|
|
15
|
-
};
|
|
16
|
-
exports.getFlexboxProps = getFlexboxProps;
|