@janbox/storefront-ui 1.0.1 → 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/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/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 -168
- 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,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const ArrowDownIcon = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6 9L12 15L18 9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n';
|
|
3
|
-
module.exports = ArrowDownIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const ArrowForwardIcon = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M13.5 16L17.5 12L13.5 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M6.5 17L11.5 12L6.5 7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n';
|
|
3
|
-
module.exports = ArrowForwardIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const ArrowLeftIcon = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M15 6L9 12L15 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n';
|
|
3
|
-
module.exports = ArrowLeftIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const ArrowRightIcon = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9 18L15 12L9 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n';
|
|
3
|
-
module.exports = ArrowRightIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const CalendarIcon = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M16 2V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M8 2V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M3 9H21" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M19 4H5C3.895 4 3 4.895 3 6V19C3 20.105 3.895 21 5 21H19C20.105 21 21 20.105 21 19V6C21 4.895 20.105 4 19 4Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M7.01304 12.729C6.87504 12.729 6.76304 12.841 6.76404 12.979C6.76404 13.117 6.87604 13.229 7.01404 13.229C7.15204 13.229 7.26404 13.117 7.26404 12.979C7.26404 12.841 7.15204 12.729 7.01304 12.729" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12.013 12.729C11.875 12.729 11.763 12.841 11.764 12.979C11.764 13.117 11.876 13.229 12.014 13.229C12.152 13.229 12.264 13.117 12.264 12.979C12.264 12.841 12.152 12.729 12.013 12.729" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M17.013 12.729C16.875 12.729 16.763 12.841 16.764 12.979C16.764 13.117 16.876 13.229 17.014 13.229C17.152 13.229 17.264 13.117 17.264 12.979C17.264 12.841 17.152 12.729 17.013 12.729" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M7.01304 16.729C6.87504 16.729 6.76304 16.841 6.76404 16.979C6.76404 17.117 6.87604 17.229 7.01404 17.229C7.15204 17.229 7.26404 17.117 7.26404 16.979C7.26404 16.841 7.15204 16.729 7.01304 16.729" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12.013 16.729C11.875 16.729 11.763 16.841 11.764 16.979C11.764 17.117 11.876 17.229 12.014 17.229C12.152 17.229 12.264 17.117 12.264 16.979C12.264 16.841 12.152 16.729 12.013 16.729" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n';
|
|
3
|
-
module.exports = CalendarIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const CheckIcon = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g clip-path="url(#clip0_10170_60538)">\n<path d="M9.90004 16.2499C9.71004 16.2499 9.52004 16.1799 9.37004 16.0299L6.57004 13.2299C6.28004 12.9399 6.28004 12.4599 6.57004 12.1699C6.86004 11.8799 7.34004 11.8799 7.63004 12.1699L9.90004 14.4399L16.37 7.96994C16.66 7.67994 17.14 7.67994 17.43 7.96994C17.72 8.25994 17.72 8.73994 17.43 9.02994L10.43 16.0299C10.28 16.1799 10.09 16.2499 9.90004 16.2499Z" fill="currentColor"/>\n</g>\n<defs>\n<clipPath id="clip0_10170_60538">\n<rect width="24" height="24" fill="white"/>\n</clipPath>\n</defs>\n</svg>\n';
|
|
3
|
-
module.exports = CheckIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const ClockIcon = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M5.62537 18.3577C8.50409 21.2441 12.963 21.8361 16.4952 19.801C20.0274 17.7658 21.7514 13.6112 20.698 9.67314C19.6446 5.73504 16.0766 2.99622 12 2.99622" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M3.77789 15.4265C3.77786 15.4541 3.75546 15.4765 3.72785 15.4765C3.70024 15.4765 3.67786 15.4541 3.67785 15.4265C3.67784 15.3989 3.7002 15.3765 3.72781 15.3765C3.7411 15.3764 3.75384 15.3817 3.76324 15.3911C3.77264 15.4005 3.77791 15.4133 3.77789 15.4265" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M3.09637 12C3.09634 12.0276 3.07394 12.05 3.04633 12.05C3.01872 12.05 2.99634 12.0276 2.99633 12C2.99632 11.9724 3.01868 11.95 3.04629 11.9499C3.05958 11.9499 3.07233 11.9552 3.08172 11.9646C3.09112 11.974 3.09639 11.9867 3.09637 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M3.77789 8.57357C3.77789 8.60119 3.75551 8.62358 3.72789 8.62359C3.70027 8.6236 3.67787 8.60123 3.67785 8.57361C3.67783 8.54599 3.70019 8.52358 3.72781 8.52355C3.7411 8.52354 3.75385 8.52881 3.76324 8.53821C3.77264 8.5476 3.77791 8.56035 3.77789 8.57364" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M5.71887 5.66886C5.71883 5.69646 5.69643 5.71882 5.66883 5.71881C5.64122 5.7188 5.61884 5.69642 5.61883 5.66881C5.61881 5.6412 5.64117 5.61881 5.66878 5.61877C5.68207 5.61875 5.69482 5.62402 5.70422 5.63342C5.71362 5.64282 5.71889 5.65557 5.71887 5.66886" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M8.62364 3.72793C8.62361 3.75554 8.60121 3.7779 8.5736 3.77789C8.54599 3.77788 8.52361 3.75549 8.5236 3.72788C8.5236 3.70027 8.54596 3.67788 8.57357 3.67785C8.58686 3.67783 8.59961 3.6831 8.60901 3.6925C8.61841 3.70189 8.62368 3.71464 8.62366 3.72793" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M16.0495 12.6025H11.3975" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M11.3975 12.6025V6.99792" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n';
|
|
3
|
-
module.exports = ClockIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const CheckIcon = '<svg fill="currentColor" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n <path d="M10,18a1,1,0,0,1-.71-.29l-5-5a1,1,0,0,1,1.42-1.42L10,15.59l8.29-8.3a1,1,0,1,1,1.42,1.42l-9,9A1,1,0,0,1,10,18Z"></path>\n</svg>';
|
|
3
|
-
module.exports = CheckIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const EarthIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%203.5C16.982%203.5%2021%207.518%2021%2012.5C21%2017.482%2016.982%2021.5%2012%2021.5'%20stroke='currentColor'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12%2021.5C7.018%2021.5%203%2017.482%203%2012.5C3%207.518%207.018%203.5%2012%203.5'%20stroke='currentColor'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10.168%204.55999C7.27799%209.38499%207.27799%2015.616%2010.168%2020.441C11.014%2021.854%2012.987%2021.854%2013.833%2020.441C16.723%2015.616%2016.723%209.38499%2013.833%204.55999C12.986%203.14699%2011.014%203.14699%2010.168%204.55999Z'%20stroke='currentColor'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.00977%208.35791C8.90177%209.86891%2015.0978%209.86891%2019.9888%208.35791'%20stroke='currentColor'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.9902%2016.642C15.0982%2015.131%208.90223%2015.131%204.01123%2016.642'%20stroke='currentColor'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
3
|
-
module.exports = EarthIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const EyeHidden = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 19.0004C11.158 19.0004 10.315 18.8224 9.496 18.5054" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M20.882 12.4678C18.99 15.9668 15.495 18.9998 12 18.9998" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M19.079 8.9209C19.77 9.7299 20.384 10.6119 20.882 11.5329C21.039 11.8239 21.039 12.1769 20.882 12.4679" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M5 19L19 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M9.77299 14.2271C8.54299 12.9971 8.54299 11.0021 9.77299 9.77211C11.003 8.54211 12.998 8.54211 14.228 9.77211" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M17.044 6.956C15.497 5.759 13.748 5 12 5C8.50499 5 5.00999 8.033 3.11799 11.533C2.96099 11.824 2.96099 12.177 3.11799 12.468C4.06399 14.217 5.40999 15.849 6.95599 17.045" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n';
|
|
3
|
-
module.exports = EyeHidden;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const EyeVisible = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M3.11799 12.467C2.96099 12.176 2.96099 11.823 3.11799 11.532C5.00999 8.033 8.50499 5 12 5C15.495 5 18.99 8.033 20.882 11.533C21.039 11.824 21.039 12.177 20.882 12.468C18.99 15.967 15.495 19 12 19C8.50499 19 5.00999 15.967 3.11799 12.467Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M14.1213 9.87868C15.2929 11.0502 15.2929 12.9497 14.1213 14.1213C12.9497 15.2929 11.0502 15.2929 9.87866 14.1213C8.70709 12.9497 8.70709 11.0502 9.87866 9.87868C11.0502 8.70711 12.9497 8.70711 14.1213 9.87868" stroke="currentColor" stroke-width="1.4286" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n';
|
|
3
|
-
module.exports = EyeVisible;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const IMAGE_PLACEHOLDER = "data:image/svg+xml,%3csvg%20viewBox='0%200%20120%20120'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='120'%20height='120'%20fill='%23EFF1F3'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M33.2503%2038.4816C33.2603%2037.0472%2034.4199%2035.8864%2035.8543%2035.875H83.1463C84.5848%2035.875%2085.7503%2037.0431%2085.7503%2038.4816V80.5184C85.7403%2081.9528%2084.5807%2083.1136%2083.1463%2083.125H35.8543C34.4158%2083.1236%2033.2503%2081.957%2033.2503%2080.5184V38.4816ZM80.5006%2041.1251H38.5006V77.8751L62.8921%2053.4783C63.9172%2052.4536%2065.5788%2052.4536%2066.6039%2053.4783L80.5006%2067.4013V41.1251ZM43.75%2051.6249C43.75%2054.5244%2046.1005%2056.8749%2049%2056.8749C51.8995%2056.8749%2054.25%2054.5244%2054.25%2051.6249C54.25%2048.7254%2051.8995%2046.3749%2049%2046.3749C46.1005%2046.3749%2043.75%2048.7254%2043.75%2051.6249Z'%20fill='%23687787'/%3e%3c/svg%3e";
|
|
3
|
-
module.exports = IMAGE_PLACEHOLDER;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const LoadingIcon = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 17.6201V21.0001" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M8.02001 15.9805L5.64001 18.3605" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M6.38 12H3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M5.64001 5.63965L8.02001 8.01965" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 6V3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M16.77 7.22965L18.36 5.63965" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M21 12H19.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M18.36 18.3597L17.83 17.8297" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n';
|
|
3
|
-
module.exports = LoadingIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const LongArrowRightIcon = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M19 12H5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M14 17L19 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M14 7L19 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n';
|
|
3
|
-
module.exports = LongArrowRightIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const PlusIcon = '<svg width="24" height="24" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12.8002 7.5002H8.5002V3.2002C8.5002 2.9002 8.3002 2.7002 8.0002 2.7002C7.7002 2.7002 7.5002 2.9002 7.5002 3.2002V7.5002H3.2002C2.9002 7.5002 2.7002 7.7002 2.7002 8.0002C2.7002 8.3002 2.9002 8.5002 3.2002 8.5002H7.5002V12.8002C7.5002 13.1002 7.7002 13.3002 8.0002 13.3002C8.3002 13.3002 8.5002 13.1002 8.5002 12.8002V8.5002H12.8002C13.1002 8.5002 13.3002 8.3002 13.3002 8.0002C13.3002 7.7002 13.1002 7.5002 12.8002 7.5002Z" fill="currentColor"/>\n</svg>\n';
|
|
3
|
-
module.exports = PlusIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const ZoomPlusIcon = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M20 20.0004L16.8033 16.8037" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M4 11.5C4 15.6421 7.35786 19 11.5 19C15.6421 19 19 15.6421 19 11.5C19 7.35786 15.6421 4 11.5 4V4C7.35799 4.00031 4.00031 7.35799 4 11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M11.5 9.5V13.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M9.5 11.5H13.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n';
|
|
3
|
-
module.exports = ZoomPlusIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const ZoomMinusIcon = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M20 20.0004L16.8033 16.8037" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M4 11.5C4 15.6421 7.35786 19 11.5 19C15.6421 19 19 15.6421 19 11.5C19 7.35786 15.6421 4 11.5 4V4C7.35799 4.00031 4.00031 7.35799 4 11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M9.49999 11.5H13.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n';
|
|
3
|
-
module.exports = ZoomMinusIcon;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const CloseIcon = ' <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_16378_125816)">\n <path d="M5.80078 5.80005L17.8008 17.8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"\n stroke-linejoin="round" />\n <path d="M17.8008 5.80005L5.80078 17.8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"\n stroke-linejoin="round" />\n </g>\n <defs>\n <clipPath id="clip0_16378_125816">\n <rect width="13.5" height="13.5" fill="white" transform="translate(5 5)" />\n </clipPath>\n </defs>\n </svg>';
|
|
3
|
-
module.exports = CloseIcon;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const svgLoader = require("./svg-loader.cjs");
|
|
4
|
-
const scrollView = require("./scroll-view.cjs");
|
|
5
|
-
const virtualizedList = require("./virtualized-list.cjs");
|
|
6
|
-
exports.SvgLoader = svgLoader.SvgLoader;
|
|
7
|
-
exports.ScrollView = scrollView.ScrollView;
|
|
8
|
-
exports.VirtualizedList = virtualizedList.VirtualizedList;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
const overlayscrollbarsReact = require("overlayscrollbars-react");
|
|
5
|
-
const ScrollView = ({ children, options, ...props }) => {
|
|
6
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7
|
-
overlayscrollbarsReact.OverlayScrollbarsComponent,
|
|
8
|
-
{
|
|
9
|
-
options: options ?? {
|
|
10
|
-
scrollbars: {
|
|
11
|
-
autoHide: "never"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
...props,
|
|
15
|
-
children
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
exports.ScrollView = ScrollView;
|
|
@@ -1,14 +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 common = require("../utils/common.cjs");
|
|
6
|
-
const SvgLoader = react.forwardRef(({ source, ...props }, ref) => {
|
|
7
|
-
const uniqueId = react.useId();
|
|
8
|
-
const jsxSvg = react.useMemo(() => common.parseSvgString(source, uniqueId), [source, uniqueId]);
|
|
9
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!jsxSvg && react.cloneElement(jsxSvg, {
|
|
10
|
-
...props,
|
|
11
|
-
ref
|
|
12
|
-
}) });
|
|
13
|
-
});
|
|
14
|
-
exports.SvgLoader = SvgLoader;
|
|
@@ -1,43 +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("@floating-ui/react");
|
|
6
|
-
const reactVirtual = require("@tanstack/react-virtual");
|
|
7
|
-
const react$2 = require("motion/react");
|
|
8
|
-
const scrollView = require("./scroll-view.cjs");
|
|
9
|
-
const VirtualizedList = ({ RowComponent, options, ref, ...props }) => {
|
|
10
|
-
var _a;
|
|
11
|
-
const scrollRef = react.useRef(null);
|
|
12
|
-
const mergedRefs = react$1.useMergeRefs([scrollRef, ref]);
|
|
13
|
-
const virtualizer = reactVirtual.useVirtualizer({
|
|
14
|
-
...options,
|
|
15
|
-
getScrollElement: () => {
|
|
16
|
-
var _a2, _b;
|
|
17
|
-
const firstElementChild = (_b = (_a2 = scrollRef.current) == null ? void 0 : _a2.getElement()) == null ? void 0 : _b.firstElementChild;
|
|
18
|
-
return firstElementChild instanceof HTMLDivElement ? firstElementChild : null;
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
const items = virtualizer.getVirtualItems();
|
|
22
|
-
const totalSize = virtualizer.getTotalSize();
|
|
23
|
-
return /* @__PURE__ */ jsxRuntime.jsx(scrollView.ScrollView, { ...props, ref: mergedRefs, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
24
|
-
react$2.motion.div,
|
|
25
|
-
{
|
|
26
|
-
initial: { opacity: 0 },
|
|
27
|
-
animate: { opacity: 1 },
|
|
28
|
-
style: {
|
|
29
|
-
height: totalSize
|
|
30
|
-
},
|
|
31
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
style: {
|
|
35
|
-
transform: `translateY(${((_a = items.at(0)) == null ? void 0 : _a.start) ?? 0}px)`
|
|
36
|
-
},
|
|
37
|
-
children: items.map((virtualRow) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-index": virtualRow.index, ref: virtualizer.measureElement, children: /* @__PURE__ */ jsxRuntime.jsx(RowComponent, { row: virtualRow }) }, virtualRow.key))
|
|
38
|
-
}
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
) });
|
|
42
|
-
};
|
|
43
|
-
exports.VirtualizedList = VirtualizedList;
|
package/dist/constants/index.cjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const imagePlaceholder = require("../assets/svg/image-placeholder.svg.cjs");
|
|
4
|
-
const USER_COMPONENT_LOCALE_NAMESPACE = "user-component";
|
|
5
|
-
var HTMLDatasetAttributes = /* @__PURE__ */ ((HTMLDatasetAttributes2) => {
|
|
6
|
-
HTMLDatasetAttributes2["DATA_TEST_ID"] = "data-testid";
|
|
7
|
-
HTMLDatasetAttributes2["ARIA_DISABLED"] = "aria-disabled";
|
|
8
|
-
HTMLDatasetAttributes2["ARIA_READONLY"] = "aria-readonly";
|
|
9
|
-
HTMLDatasetAttributes2["DATA_MENU_ITEM"] = "data-menu-item";
|
|
10
|
-
HTMLDatasetAttributes2["DATA_MENU_LIST"] = "data-menu-list";
|
|
11
|
-
return HTMLDatasetAttributes2;
|
|
12
|
-
})(HTMLDatasetAttributes || {});
|
|
13
|
-
var HTMLClasses = /* @__PURE__ */ ((HTMLClasses2) => {
|
|
14
|
-
HTMLClasses2["MARQUEE_SLIDE"] = "marquee-slide";
|
|
15
|
-
return HTMLClasses2;
|
|
16
|
-
})(HTMLClasses || {});
|
|
17
|
-
const FALLBACK_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" width="24" height="24"></svg>`;
|
|
18
|
-
const TYPING_DEBOUNCE = 400;
|
|
19
|
-
const isSSR = typeof window === "undefined";
|
|
20
|
-
var Booleanish = /* @__PURE__ */ ((Booleanish2) => {
|
|
21
|
-
Booleanish2["True"] = "true";
|
|
22
|
-
Booleanish2["False"] = "false";
|
|
23
|
-
return Booleanish2;
|
|
24
|
-
})(Booleanish || {});
|
|
25
|
-
exports.IMAGE_PLACEHOLDER = imagePlaceholder;
|
|
26
|
-
exports.Booleanish = Booleanish;
|
|
27
|
-
exports.FALLBACK_SVG = FALLBACK_SVG;
|
|
28
|
-
exports.HTMLClasses = HTMLClasses;
|
|
29
|
-
exports.HTMLDatasetAttributes = HTMLDatasetAttributes;
|
|
30
|
-
exports.TYPING_DEBOUNCE = TYPING_DEBOUNCE;
|
|
31
|
-
exports.USER_COMPONENT_LOCALE_NAMESPACE = USER_COMPONENT_LOCALE_NAMESPACE;
|
|
32
|
-
exports.isSSR = isSSR;
|
package/dist/hooks/index.cjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index$2 = require("./use-window-screen/index.cjs");
|
|
4
|
-
const index = require("./use-hover-line-effect/index.cjs");
|
|
5
|
-
const index$1 = require("./use-ripple-effect/index.cjs");
|
|
6
|
-
const useControllableState = require("./use-controllable-state.cjs");
|
|
7
|
-
const useCountdownTimer = require("./use-countdown-timer.cjs");
|
|
8
|
-
const useQueryParams = require("./use-query-params.cjs");
|
|
9
|
-
exports.useWindowScreen = index$2.useWindowScreen;
|
|
10
|
-
exports.useHoverLineEffect = index.useHoverLineEffect;
|
|
11
|
-
exports.useRippleEffect = index$1.useRippleEffect;
|
|
12
|
-
exports.useControllableState = useControllableState.useControllableState;
|
|
13
|
-
exports.useCountdownTimer = useCountdownTimer.useCountdownTimer;
|
|
14
|
-
exports.useQueryParams = useQueryParams.useQueryParams;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const react = require("react");
|
|
4
|
-
const lodashEs = require("lodash-es");
|
|
5
|
-
const reactUse = require("react-use");
|
|
6
|
-
const getIsControlled = (value) => !lodashEs.isUndefined(value);
|
|
7
|
-
const useControllableState = ({
|
|
8
|
-
defaultValue,
|
|
9
|
-
value,
|
|
10
|
-
deepCompare = false
|
|
11
|
-
}) => {
|
|
12
|
-
const lastControlledValue = react.useRef(value);
|
|
13
|
-
const isControlled = getIsControlled(value);
|
|
14
|
-
const [internalValue, setInternalValue] = react.useState(isControlled ? value : defaultValue);
|
|
15
|
-
const currentValue = react.useMemo(() => {
|
|
16
|
-
return getIsControlled(value) ? value : lastControlledValue.current ?? internalValue;
|
|
17
|
-
}, [internalValue, value]);
|
|
18
|
-
const setValue = react.useCallback(
|
|
19
|
-
(nextValue) => {
|
|
20
|
-
if (isControlled) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
setInternalValue(nextValue);
|
|
24
|
-
},
|
|
25
|
-
[isControlled]
|
|
26
|
-
);
|
|
27
|
-
reactUse.useUpdateEffect(() => {
|
|
28
|
-
if (deepCompare && lodashEs.isEqual(value, lastControlledValue.current)) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
const nowControlled = getIsControlled(value);
|
|
32
|
-
if (!nowControlled && !lodashEs.isUndefined(lastControlledValue.current)) {
|
|
33
|
-
setInternalValue(lastControlledValue.current);
|
|
34
|
-
}
|
|
35
|
-
lastControlledValue.current = value;
|
|
36
|
-
}, [deepCompare, value]);
|
|
37
|
-
return [currentValue, setValue];
|
|
38
|
-
};
|
|
39
|
-
exports.useControllableState = useControllableState;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const react = require("react");
|
|
4
|
-
const dayjs = require("dayjs");
|
|
5
|
-
const reactUse = require("react-use");
|
|
6
|
-
const getTimeDiff = (end, omit) => {
|
|
7
|
-
const now = dayjs();
|
|
8
|
-
const target = dayjs(end);
|
|
9
|
-
const totalSeconds = target.diff(now, "second");
|
|
10
|
-
const totalMinutes = target.diff(now, "minute");
|
|
11
|
-
const totalHours = target.diff(now, "hour");
|
|
12
|
-
const totalDays = target.diff(now, "day");
|
|
13
|
-
const totalWeeks = target.diff(now, "week");
|
|
14
|
-
const totalMonths = target.diff(now, "month");
|
|
15
|
-
const totalYears = target.diff(now, "year");
|
|
16
|
-
let temp = now;
|
|
17
|
-
const years = Math.max(target.diff(temp, "year"), 0);
|
|
18
|
-
if (!omit.years) {
|
|
19
|
-
temp = temp.add(years, "year");
|
|
20
|
-
}
|
|
21
|
-
const months = Math.max(target.diff(temp, "month"), 0);
|
|
22
|
-
if (!omit.months) {
|
|
23
|
-
temp = temp.add(months, "month");
|
|
24
|
-
}
|
|
25
|
-
const weeks = Math.max(target.diff(temp, "week"), 0);
|
|
26
|
-
if (!omit.weeks) {
|
|
27
|
-
temp = temp.add(weeks, "week");
|
|
28
|
-
}
|
|
29
|
-
const days = Math.max(target.diff(temp, "day"), 0);
|
|
30
|
-
if (!omit.days) {
|
|
31
|
-
temp = temp.add(days, "day");
|
|
32
|
-
}
|
|
33
|
-
const hours = Math.max(target.diff(temp, "hour"), 0);
|
|
34
|
-
if (!omit.hours) {
|
|
35
|
-
temp = temp.add(hours, "hour");
|
|
36
|
-
}
|
|
37
|
-
const minutes = Math.max(target.diff(temp, "minute"), 0);
|
|
38
|
-
if (!omit.minutes) {
|
|
39
|
-
temp = temp.add(minutes, "minute");
|
|
40
|
-
}
|
|
41
|
-
const seconds = Math.max(target.diff(temp, "second"), 0);
|
|
42
|
-
return {
|
|
43
|
-
years,
|
|
44
|
-
months,
|
|
45
|
-
weeks,
|
|
46
|
-
days,
|
|
47
|
-
hours,
|
|
48
|
-
minutes,
|
|
49
|
-
seconds,
|
|
50
|
-
isFinished: totalSeconds <= 0,
|
|
51
|
-
totalSeconds,
|
|
52
|
-
totalMinutes,
|
|
53
|
-
totalHours,
|
|
54
|
-
totalDays,
|
|
55
|
-
totalWeeks,
|
|
56
|
-
totalMonths,
|
|
57
|
-
totalYears
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
const useCountdownTimer = ({ date = /* @__PURE__ */ new Date(), onFinish, omit = {} }) => {
|
|
61
|
-
const finishFn = react.useRef(onFinish);
|
|
62
|
-
const [timeDiff, setTimeDiff] = react.useState(getTimeDiff(dayjs(date).toDate(), omit));
|
|
63
|
-
finishFn.current = onFinish;
|
|
64
|
-
reactUse.useDeepCompareEffect(() => {
|
|
65
|
-
var _a;
|
|
66
|
-
const diff = getTimeDiff(date, omit);
|
|
67
|
-
setTimeDiff(diff);
|
|
68
|
-
if (diff.isFinished) {
|
|
69
|
-
(_a = finishFn.current) == null ? void 0 : _a.call(finishFn);
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const interval = setInterval(() => {
|
|
73
|
-
var _a2;
|
|
74
|
-
const diff2 = getTimeDiff(date, omit);
|
|
75
|
-
setTimeDiff(diff2);
|
|
76
|
-
if (diff2.isFinished) {
|
|
77
|
-
(_a2 = finishFn.current) == null ? void 0 : _a2.call(finishFn);
|
|
78
|
-
clearInterval(interval);
|
|
79
|
-
}
|
|
80
|
-
}, 1e3);
|
|
81
|
-
return () => clearInterval(interval);
|
|
82
|
-
}, [date, omit]);
|
|
83
|
-
return timeDiff;
|
|
84
|
-
};
|
|
85
|
-
exports.useCountdownTimer = useCountdownTimer;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const react = require("react");
|
|
4
|
-
const lodashEs = require("lodash-es");
|
|
5
|
-
const useHoverLineEffect_module = require("./use-hover-line-effect.module.scss.cjs");
|
|
6
|
-
require("clsx");
|
|
7
|
-
require("../../theme/palette.cjs");
|
|
8
|
-
const stylesheet = require("../../utils/stylesheet.cjs");
|
|
9
|
-
const useHoverLineEffect = (options = {}) => {
|
|
10
|
-
const { color = "currentColor", duration = 300, height = 1, enabled = true } = options;
|
|
11
|
-
return react.useMemo(() => {
|
|
12
|
-
return {
|
|
13
|
-
className: stylesheet.cn({
|
|
14
|
-
[useHoverLineEffect_module.default.hover_line_effect]: enabled
|
|
15
|
-
}),
|
|
16
|
-
style: enabled ? {
|
|
17
|
-
"--hover-line-color": color,
|
|
18
|
-
"--hover-line-duration": `${duration}ms`,
|
|
19
|
-
"--hover-line-height": lodashEs.isNumber(height) ? `${height}px` : height
|
|
20
|
-
} : {}
|
|
21
|
-
};
|
|
22
|
-
}, [color, duration, enabled, height]);
|
|
23
|
-
};
|
|
24
|
-
exports.useHoverLineEffect = useHoverLineEffect;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const hover_line_effect = "_hover_line_effect_dv0bz_1";
|
|
4
|
-
const classes = {
|
|
5
|
-
hover_line_effect
|
|
6
|
-
};
|
|
7
|
-
exports.default = classes;
|
|
8
|
-
exports.hover_line_effect = hover_line_effect;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const react = require("react");
|
|
4
|
-
const lodashEs = require("lodash-es");
|
|
5
|
-
const reactRouter = require("react-router");
|
|
6
|
-
const queryParams = require("../utils/query-params.cjs");
|
|
7
|
-
function useQueryParams(config, defaultNavigateOpts = {}) {
|
|
8
|
-
const [searchParams, setSearchParams] = reactRouter.useSearchParams();
|
|
9
|
-
const defaultNavigateOptsRef = react.useRef(defaultNavigateOpts);
|
|
10
|
-
defaultNavigateOptsRef.current = defaultNavigateOpts;
|
|
11
|
-
const queryParams$1 = react.useMemo(() => {
|
|
12
|
-
const result = {};
|
|
13
|
-
Object.keys(config).forEach((key) => {
|
|
14
|
-
const paramConfig = config[key];
|
|
15
|
-
if (lodashEs.isPlainObject(paramConfig) && "parser" in paramConfig) {
|
|
16
|
-
lodashEs.set(result, key, paramConfig.parser(searchParams.get(key)));
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
lodashEs.set(result, key, paramConfig);
|
|
20
|
-
});
|
|
21
|
-
return result;
|
|
22
|
-
}, [searchParams, config]);
|
|
23
|
-
const setQueryParams = react.useCallback(
|
|
24
|
-
(newParams, navigateOpts = {}) => {
|
|
25
|
-
setSearchParams(
|
|
26
|
-
(prev) => {
|
|
27
|
-
const simplifyParams = queryParams.simplifyQueryParams(newParams);
|
|
28
|
-
Object.keys(newParams).forEach((key) => {
|
|
29
|
-
const value = simplifyParams[key];
|
|
30
|
-
if (lodashEs.isNil(value)) {
|
|
31
|
-
return prev.delete(key);
|
|
32
|
-
}
|
|
33
|
-
return prev.set(key, value);
|
|
34
|
-
});
|
|
35
|
-
return prev;
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
...defaultNavigateOptsRef.current,
|
|
39
|
-
...navigateOpts
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
},
|
|
43
|
-
[setSearchParams]
|
|
44
|
-
);
|
|
45
|
-
return react.useMemo(
|
|
46
|
-
() => ({
|
|
47
|
-
queryParams: queryParams$1,
|
|
48
|
-
setQueryParams
|
|
49
|
-
}),
|
|
50
|
-
[queryParams$1, setQueryParams]
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
exports.useQueryParams = useQueryParams;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const react = require("react");
|
|
4
|
-
const useRippleEffect_module = require("./use-ripple-effect.module.scss.cjs");
|
|
5
|
-
const useRippleEffect = (ref, {
|
|
6
|
-
enabled = true,
|
|
7
|
-
color = "currentColor",
|
|
8
|
-
duration = 400,
|
|
9
|
-
opacity = 0.2,
|
|
10
|
-
sizeMultiplier = 1
|
|
11
|
-
} = {}) => {
|
|
12
|
-
const createRippleCircle = react.useCallback(
|
|
13
|
-
(event) => {
|
|
14
|
-
const { currentTarget, clientX, clientY } = event;
|
|
15
|
-
const { clientHeight, clientWidth } = currentTarget;
|
|
16
|
-
const { left: offsetLeft, top: offsetTop } = currentTarget.getBoundingClientRect();
|
|
17
|
-
const circleLeft = clientX - offsetLeft;
|
|
18
|
-
const circleTop = clientY - offsetTop;
|
|
19
|
-
const circleRight = offsetLeft + clientWidth - clientX;
|
|
20
|
-
const circleBottom = offsetTop + clientHeight - clientY;
|
|
21
|
-
const radius = Math.max(circleLeft, circleTop, circleRight, circleBottom) * sizeMultiplier;
|
|
22
|
-
const circle = document.createElement("div");
|
|
23
|
-
circle.style.width = circle.style.height = `${radius * 2}px`;
|
|
24
|
-
circle.style.left = `${circleLeft - radius}px`;
|
|
25
|
-
circle.style.top = `${circleTop - radius}px`;
|
|
26
|
-
circle.classList.add(useRippleEffect_module.default.ripple_effect__circle);
|
|
27
|
-
circle.style.setProperty("--ripple-color", color);
|
|
28
|
-
circle.style.setProperty("--ripple-duration", `${duration}ms`);
|
|
29
|
-
circle.style.setProperty("--ripple-opacity", opacity.toString());
|
|
30
|
-
return circle;
|
|
31
|
-
},
|
|
32
|
-
[color, duration, opacity, sizeMultiplier]
|
|
33
|
-
);
|
|
34
|
-
const start = react.useCallback(
|
|
35
|
-
(event) => {
|
|
36
|
-
var _a;
|
|
37
|
-
if (!enabled) return;
|
|
38
|
-
const circle = createRippleCircle(event);
|
|
39
|
-
const handleAnimationEnd = (ev) => {
|
|
40
|
-
if (!ev.target) return;
|
|
41
|
-
ev.target.remove();
|
|
42
|
-
};
|
|
43
|
-
circle.addEventListener("animationend", handleAnimationEnd);
|
|
44
|
-
(_a = ref.current) == null ? void 0 : _a.appendChild(circle);
|
|
45
|
-
},
|
|
46
|
-
[createRippleCircle, enabled, ref]
|
|
47
|
-
);
|
|
48
|
-
react.useEffect(() => {
|
|
49
|
-
if (!enabled) return;
|
|
50
|
-
const targetElement = ref.current;
|
|
51
|
-
const handleClick = (e) => {
|
|
52
|
-
start(e);
|
|
53
|
-
};
|
|
54
|
-
targetElement == null ? void 0 : targetElement.addEventListener("click", handleClick);
|
|
55
|
-
return () => {
|
|
56
|
-
targetElement == null ? void 0 : targetElement.removeEventListener("click", handleClick);
|
|
57
|
-
Array.from((targetElement == null ? void 0 : targetElement.getElementsByClassName(useRippleEffect_module.default.ripple_effect__circle)) ?? []).forEach(
|
|
58
|
-
(circle) => circle.remove()
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
}, [start, enabled, ref]);
|
|
62
|
-
return react.useMemo(
|
|
63
|
-
() => ({
|
|
64
|
-
className: useRippleEffect_module.default.ripple_effect
|
|
65
|
-
}),
|
|
66
|
-
[]
|
|
67
|
-
);
|
|
68
|
-
};
|
|
69
|
-
exports.useRippleEffect = useRippleEffect;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const ripple_effect = "_ripple_effect_1jvqm_7";
|
|
4
|
-
const ripple_effect__circle = "_ripple_effect__circle_1jvqm_12";
|
|
5
|
-
const classes = {
|
|
6
|
-
ripple_effect,
|
|
7
|
-
ripple_effect__circle
|
|
8
|
-
};
|
|
9
|
-
exports.default = classes;
|
|
10
|
-
exports.ripple_effect = ripple_effect;
|
|
11
|
-
exports.ripple_effect__circle = ripple_effect__circle;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const react = require("react");
|
|
4
|
-
const lodashEs = require("lodash-es");
|
|
5
|
-
const constants_index = require("../../constants/index.cjs");
|
|
6
|
-
const theme_screens = require("../../theme/screens.cjs");
|
|
7
|
-
require("../../theme/palette.cjs");
|
|
8
|
-
const useWindowScreen = () => {
|
|
9
|
-
const getScreenByWidth = (width) => {
|
|
10
|
-
if (width < theme_screens.breakpoint.sm.minWidth) {
|
|
11
|
-
return "xs";
|
|
12
|
-
}
|
|
13
|
-
if (width < theme_screens.breakpoint.md.minWidth) {
|
|
14
|
-
return "sm";
|
|
15
|
-
}
|
|
16
|
-
if (width < theme_screens.breakpoint.lg.minWidth) {
|
|
17
|
-
return "md";
|
|
18
|
-
}
|
|
19
|
-
return "lg";
|
|
20
|
-
};
|
|
21
|
-
const [currentScreen, setCurrentScreen] = react.useState(
|
|
22
|
-
constants_index.isSSR ? void 0 : window.__isHydrated ? getScreenByWidth(window.innerWidth) : void 0
|
|
23
|
-
);
|
|
24
|
-
react.useEffect(() => {
|
|
25
|
-
const detectScreen = () => {
|
|
26
|
-
const queryScreen = getScreenByWidth(window.innerWidth);
|
|
27
|
-
if (queryScreen === currentScreen) return;
|
|
28
|
-
setCurrentScreen(queryScreen);
|
|
29
|
-
};
|
|
30
|
-
detectScreen();
|
|
31
|
-
window.addEventListener("resize", detectScreen);
|
|
32
|
-
return () => {
|
|
33
|
-
window.removeEventListener("resize", detectScreen);
|
|
34
|
-
};
|
|
35
|
-
}, [currentScreen]);
|
|
36
|
-
return react.useMemo(() => {
|
|
37
|
-
const isSmallerThan = (target) => {
|
|
38
|
-
if (lodashEs.isNil(currentScreen)) return false;
|
|
39
|
-
return theme_screens.screens.indexOf(currentScreen) < theme_screens.screens.indexOf(target);
|
|
40
|
-
};
|
|
41
|
-
const isLargerThan = (target) => {
|
|
42
|
-
if (lodashEs.isNil(currentScreen)) return false;
|
|
43
|
-
return theme_screens.screens.indexOf(currentScreen) > theme_screens.screens.indexOf(target);
|
|
44
|
-
};
|
|
45
|
-
return {
|
|
46
|
-
name: currentScreen,
|
|
47
|
-
isSmallerThan,
|
|
48
|
-
isLargerThan
|
|
49
|
-
};
|
|
50
|
-
}, [currentScreen]);
|
|
51
|
-
};
|
|
52
|
-
exports.useWindowScreen = useWindowScreen;
|