hasting-swatchcart-module 0.0.2 → 0.0.3
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/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/index.js +7 -0
- package/dist/_virtual/index2.js +7 -0
- package/dist/_virtual/index3.js +4 -0
- package/dist/_virtual/use-sync-external-store-with-selector.development.js +4 -0
- package/dist/_virtual/use-sync-external-store-with-selector.production.js +4 -0
- package/dist/_virtual/utilities.js +4 -0
- package/dist/_virtual/with-selector.js +5 -0
- package/dist/_virtual/with-selector2.js +4 -0
- package/dist/assets/src/shared/ui/CustomSidebar/CustomSidebar.module.css +1 -0
- package/dist/assets/src/shared/ui/Markdown/MDWithAccordion.module.css +1 -0
- package/dist/assets/src/shared/ui/PopoverTooltip/PopoverTooltip.module.css +0 -0
- package/dist/components/SwatchesModule.js +22 -38896
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +527 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +402 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +208 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +130 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +251 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +68 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +256 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +13 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +231 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +219 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +8 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +27 -0
- package/dist/node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.js +877 -0
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +35 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +497 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +62 -0
- package/dist/node_modules/@ungap/structured-clone/esm/index.js +11 -0
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +106 -0
- package/dist/node_modules/@ungap/structured-clone/esm/types.js +13 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
- package/dist/node_modules/bail/index.js +7 -0
- package/dist/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/comma-separated-tokens/index.js +20 -0
- package/dist/node_modules/decode-named-character-reference/index.dom.js +14 -0
- package/dist/node_modules/devlop/lib/default.js +8 -0
- package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +7 -0
- package/dist/node_modules/extend/index.js +43 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +7 -0
- package/dist/node_modules/hast-util-from-parse5/lib/index.js +145 -0
- package/dist/node_modules/hast-util-parse-selector/lib/index.js +20 -0
- package/dist/node_modules/hast-util-raw/lib/index.js +217 -0
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +302 -0
- package/dist/node_modules/hast-util-to-parse5/lib/index.js +118 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.js +12 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.js +61 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.js +33 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.js +368 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.js +6 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.js +566 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.js +7 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.js +6 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.js +22 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.js +27 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.js +23 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.js +11 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.js +17 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.js +14 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.js +19 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.js +11 -0
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.js +11 -0
- package/dist/node_modules/hast-util-whitespace/lib/index.js +10 -0
- package/dist/node_modules/hastscript/lib/create-h.js +112 -0
- package/dist/node_modules/hastscript/lib/index.js +8 -0
- package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +44 -0
- package/dist/node_modules/html-url-attributes/lib/index.js +26 -0
- package/dist/node_modules/html-void-elements/index.js +25 -0
- package/dist/node_modules/immer/dist/immer.js +467 -0
- package/dist/node_modules/inline-style-parser/index.js +93 -0
- package/dist/node_modules/is-plain-obj/index.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +40 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +12 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +19 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js +581 -0
- package/dist/node_modules/mdast-util-to-hast/lib/footer.js +90 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +8 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +15 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +28 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +9 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +58 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +19 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +15 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +42 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +21 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +7 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +21 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +32 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +8 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/index.js +10 -0
- package/dist/node_modules/mdast-util-to-hast/lib/revert.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/state.js +104 -0
- package/dist/node_modules/mdast-util-to-string/lib/index.js +29 -0
- package/dist/node_modules/micromark/lib/constructs.js +85 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js +223 -0
- package/dist/node_modules/micromark/lib/initialize/content.js +37 -0
- package/dist/node_modules/micromark/lib/initialize/document.js +126 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js +33 -0
- package/dist/node_modules/micromark/lib/initialize/text.js +95 -0
- package/dist/node_modules/micromark/lib/parse.js +32 -0
- package/dist/node_modules/micromark/lib/postprocess.js +9 -0
- package/dist/node_modules/micromark/lib/preprocess.js +39 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js +83 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +43 -0
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +18 -0
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +42 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +17 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +30 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +94 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +43 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +45 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js +50 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js +80 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +17 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +46 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +144 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +102 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +152 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +22 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +19 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +14 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js +90 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +57 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +25 -0
- package/dist/node_modules/micromark-factory-destination/index.js +31 -0
- package/dist/node_modules/micromark-factory-label/index.js +28 -0
- package/dist/node_modules/micromark-factory-space/index.js +15 -0
- package/dist/node_modules/micromark-factory-title/index.js +26 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js +12 -0
- package/dist/node_modules/micromark-util-character/index.js +39 -0
- package/dist/node_modules/micromark-util-chunked/index.js +16 -0
- package/dist/node_modules/micromark-util-classify-character/index.js +10 -0
- package/dist/node_modules/micromark-util-combine-extensions/index.js +36 -0
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +16 -0
- package/dist/node_modules/micromark-util-decode-string/index.js +18 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js +68 -0
- package/dist/node_modules/micromark-util-normalize-identifier/index.js +6 -0
- package/dist/node_modules/micromark-util-resolve-all/index.js +12 -0
- package/dist/node_modules/micromark-util-sanitize-uri/index.js +23 -0
- package/dist/node_modules/micromark-util-subtokenize/index.js +55 -0
- package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +175 -0
- package/dist/node_modules/parse5/dist/common/doctype.js +98 -0
- package/dist/node_modules/parse5/dist/common/error-codes.js +7 -0
- package/dist/node_modules/parse5/dist/common/foreign-content.js +210 -0
- package/dist/node_modules/parse5/dist/common/html.js +250 -0
- package/dist/node_modules/parse5/dist/common/token.js +14 -0
- package/dist/node_modules/parse5/dist/common/unicode.js +73 -0
- package/dist/node_modules/parse5/dist/parser/formatting-element-list.js +84 -0
- package/dist/node_modules/parse5/dist/parser/index.js +2271 -0
- package/dist/node_modules/parse5/dist/parser/open-element-stack.js +240 -0
- package/dist/node_modules/parse5/dist/serializer/index.js +2 -0
- package/dist/node_modules/parse5/dist/tokenizer/index.js +1940 -0
- package/dist/node_modules/parse5/dist/tokenizer/preprocessor.js +88 -0
- package/dist/node_modules/parse5/dist/tree-adapters/default.js +162 -0
- package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js +38 -0
- package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode.js +245 -0
- package/dist/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js +7 -0
- package/dist/node_modules/property-information/index.js +12 -0
- package/dist/node_modules/property-information/lib/aria.js +61 -0
- package/dist/node_modules/property-information/lib/find.js +33 -0
- package/dist/node_modules/property-information/lib/hast-to-react.js +22 -0
- package/dist/node_modules/property-information/lib/html.js +368 -0
- package/dist/node_modules/property-information/lib/normalize.js +6 -0
- package/dist/node_modules/property-information/lib/svg.js +566 -0
- package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +7 -0
- package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +6 -0
- package/dist/node_modules/property-information/lib/util/create.js +19 -0
- package/dist/node_modules/property-information/lib/util/defined-info.js +36 -0
- package/dist/node_modules/property-information/lib/util/info.js +28 -0
- package/dist/node_modules/property-information/lib/util/merge.js +10 -0
- package/dist/node_modules/property-information/lib/util/schema.js +21 -0
- package/dist/node_modules/property-information/lib/util/types.js +14 -0
- package/dist/node_modules/property-information/lib/xlink.js +19 -0
- package/dist/node_modules/property-information/lib/xml.js +11 -0
- package/dist/node_modules/property-information/lib/xmlns.js +11 -0
- package/dist/node_modules/react-markdown/lib/index.js +102 -0
- package/dist/node_modules/react-redux/dist/react-redux.js +135 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +112 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +68 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +71 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +30 -0
- package/dist/node_modules/redux/dist/redux.js +258 -0
- package/dist/node_modules/redux-thunk/dist/redux-thunk.js +8 -0
- package/dist/node_modules/rehype-raw/lib/index.js +12 -0
- package/dist/node_modules/remark-parse/lib/index.js +19 -0
- package/dist/node_modules/remark-rehype/lib/index.js +18 -0
- package/dist/node_modules/reselect/dist/reselect.js +244 -0
- package/dist/node_modules/space-separated-tokens/index.js +11 -0
- package/dist/node_modules/style-to-js/cjs/index.js +20 -0
- package/dist/node_modules/style-to-js/cjs/utilities.js +19 -0
- package/dist/node_modules/style-to-object/cjs/index.js +28 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2731 -0
- package/dist/node_modules/trim-lines/index.js +28 -0
- package/dist/node_modules/trough/lib/index.js +60 -0
- package/dist/node_modules/tslib/tslib.es6.js +27 -0
- package/dist/node_modules/unified/lib/callable-instance.js +25 -0
- package/dist/node_modules/unified/lib/index.js +529 -0
- package/dist/node_modules/unist-util-is/lib/index.js +84 -0
- package/dist/node_modules/unist-util-position/lib/index.js +23 -0
- package/dist/node_modules/unist-util-stringify-position/lib/index.js +15 -0
- package/dist/node_modules/unist-util-visit/lib/index.js +16 -0
- package/dist/node_modules/unist-util-visit-parents/lib/color.js +6 -0
- package/dist/node_modules/unist-util-visit-parents/lib/index.js +56 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +25 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +67 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +66 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +65 -0
- package/dist/node_modules/use-sync-external-store/with-selector.js +10 -0
- package/dist/node_modules/vfile/lib/index.js +406 -0
- package/dist/node_modules/vfile/lib/minpath.browser.js +112 -0
- package/dist/node_modules/vfile/lib/minproc.browser.js +7 -0
- package/dist/node_modules/vfile/lib/minurl.browser.js +41 -0
- package/dist/node_modules/vfile/lib/minurl.shared.js +7 -0
- package/dist/node_modules/vfile-location/lib/index.js +42 -0
- package/dist/node_modules/vfile-message/lib/index.js +91 -0
- package/dist/node_modules/web-namespaces/index.js +11 -0
- package/dist/node_modules/zwitch/index.js +18 -0
- package/dist/src/app/assets/images/product_thumb.png.js +4 -0
- package/dist/src/app/assets/svg/ArrowIconSVG.js +25 -0
- package/dist/src/app/assets/svg/CheckMarkIconSVG.js +25 -0
- package/dist/src/app/assets/svg/CloseIconSVG.js +25 -0
- package/dist/src/app/assets/svg/MinusIconSVG.js +24 -0
- package/dist/src/app/assets/svg/PlusIconSVG.js +24 -0
- package/dist/src/app/assets/svg/SearchIconSVG.js +37 -0
- package/dist/src/app/assets/svg/TrashIconSVG.js +24 -0
- package/dist/src/app/store/rootReducer.js +12 -0
- package/dist/src/app/store/store.js +14 -0
- package/dist/src/features/Cart/lib/CartCervices.js +8 -0
- package/dist/src/features/Cart/model/cartSlice.js +58 -0
- package/dist/src/features/Cart/model/selectors.js +18 -0
- package/dist/src/features/Cart/ui/CartHeader/CartHeader.js +53 -0
- package/dist/src/features/Cart/ui/CartList/CartList.js +29 -0
- package/dist/src/features/Cart/ui/CartListItem/CartListItem.js +41 -0
- package/dist/src/features/Cart/ui/CartPrice/CartPrice.js +23 -0
- package/dist/src/features/Cart/ui/CartWrapper/CartWrapper.js +38 -0
- package/dist/src/features/Cart/ui/Counter/Counter.js +46 -0
- package/dist/src/features/DataAdapter/lib/DataAdapterServices.js +102 -0
- package/dist/src/features/DataAdapter/utils/types.js +8 -0
- package/dist/src/features/MultiProduct/lib/MultiProductCartServices.js +34 -0
- package/dist/src/features/MultiProduct/model/API/api.js +18 -0
- package/dist/src/features/MultiProduct/model/multiProductCartSlice.js +83 -0
- package/dist/src/features/MultiProduct/model/selectors.js +7 -0
- package/dist/src/features/MultiProduct/ui/CartSelectedProductList/CartSelectedProductList.js +21 -0
- package/dist/src/features/MultiProduct/ui/CustomModal/CustomModal.js +28 -0
- package/dist/src/features/MultiProduct/ui/FiltersSelectedProductItem/FiltersSelectedProductItem.js +27 -0
- package/dist/src/features/MultiProduct/ui/MultiProductCartHeader/MultiProductCartHeader.js +60 -0
- package/dist/src/features/MultiProduct/ui/MultiProductItemCart/MultiProductItemCart.js +71 -0
- package/dist/src/features/MultiProduct/ui/MultiProductWrapper/MultiProductWrapper.js +19 -0
- package/dist/src/features/MultiProduct/ui/ProductList/ProductList.js +138 -0
- package/dist/src/features/MultiProduct/ui/ProductListItem/ProductListItem.js +51 -0
- package/dist/src/features/MultiProduct/ui/SelectedProductItem/SelectedProductItem.js +55 -0
- package/dist/src/features/MultiProduct/ui/SwatchContentContainer/SwatchContentContainer.js +46 -0
- package/dist/src/features/MultiProduct/utils/constants.js +16 -0
- package/dist/src/features/MultiProduct/utils/randomList.js +41 -0
- package/dist/src/features/swatches/lib/AttributeHelper.js +21 -0
- package/dist/src/features/swatches/lib/SwatchesServices.js +54 -0
- package/dist/src/features/swatches/model/selectors.js +12 -0
- package/dist/src/features/swatches/model/swatchesSlice.js +108 -0
- package/dist/src/features/swatches/model/thunks.js +22 -0
- package/dist/src/features/swatches/model/types.js +6 -0
- package/dist/src/features/swatches/ui/Filters/ColorsFilter.js +45 -0
- package/dist/src/features/swatches/ui/Filters/LooksFilter.js +45 -0
- package/dist/src/features/swatches/ui/Filters/MaterialsFilter.js +47 -0
- package/dist/src/features/swatches/ui/Filters/index.js +12 -0
- package/dist/src/features/swatches/ui/HexGridZoom/HexGridZoom.js +50 -0
- package/dist/src/features/swatches/ui/ImageGridZoom/ImageGridZoom.js +45 -0
- package/dist/src/features/swatches/ui/MaterialList/index.js +39 -0
- package/dist/src/features/swatches/ui/MaterialListItem/MaterialListItem.js +51 -0
- package/dist/src/features/swatches/ui/ProductElement/index.js +65 -0
- package/dist/src/features/swatches/ui/SwatchWrapper/SwatchWrapper.js +62 -0
- package/dist/src/features/swatches/ui/Swatches.js +51 -0
- package/dist/src/features/swatches/ui/SwatchesList/SwatchesList.js +67 -0
- package/dist/src/features/swatches/utils/constants.js +8 -0
- package/dist/src/shared/constants/props.js +13337 -0
- package/dist/src/shared/constants/selectedMaterials.js +4 -0
- package/dist/src/shared/types/activeTab.js +7 -0
- package/dist/src/shared/ui/Checkbox/Checkbox.js +31 -0
- package/dist/src/shared/ui/CustomButton/CustomButton.js +16 -0
- package/dist/src/shared/ui/CustomSidebar/CustomSidebar.js +59 -0
- package/dist/src/shared/ui/CustomSidebar/CustomSidebar.module.scss.js +13 -0
- package/dist/src/shared/ui/Dialog/Dialog.js +81 -0
- package/dist/src/shared/ui/Label/Label.js +27 -0
- package/dist/src/shared/ui/Markdown/MDWithAccordion.js +36 -0
- package/dist/src/shared/ui/Markdown/MDWithAccordion.module.scss.js +9 -0
- package/dist/src/shared/ui/MaterialItem/MaterialItem.js +36 -0
- package/dist/src/shared/ui/MultiSelect/MultiSelect.js +150 -0
- package/dist/src/shared/ui/PopoverTooltip/InfoIcon.js +35 -0
- package/dist/src/shared/ui/PopoverTooltip/PopoverTooltip.js +37 -0
- package/dist/src/shared/ui/PopoverTooltip/PopoverTooltip.module.scss.js +4 -0
- package/dist/src/shared/ui/Slider/Slider.js +117 -0
- package/dist/src/shared/utils/cn.js +8 -0
- package/dist/src/shared/utils/uniqueList.js +4 -0
- package/package.json +12 -2
- package/dist/assets/SwatchesModule.css +0 -1
- /package/dist/{lib/components → components}/SwatchesModule.d.ts +0 -0
- /package/dist/{lib/main.d.ts → main.d.ts} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Checkbox as t, CheckboxIndicator as a } from "../../../../node_modules/@radix-ui/react-checkbox/dist/index.js";
|
|
3
|
+
import { cn as o } from "../../utils/cn.js";
|
|
4
|
+
import c from "../../../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
5
|
+
function l({
|
|
6
|
+
className: r,
|
|
7
|
+
...i
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ e(
|
|
10
|
+
t,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "checkbox",
|
|
13
|
+
className: o(
|
|
14
|
+
"bg-white peer border-input dark:bg-input/30 data-[state=checked]:bg-black data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-black data-[state=checked]:border-black focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
+
r
|
|
16
|
+
),
|
|
17
|
+
...i,
|
|
18
|
+
children: /* @__PURE__ */ e(
|
|
19
|
+
a,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "checkbox-indicator",
|
|
22
|
+
className: "flex items-center justify-center text-current transition-none",
|
|
23
|
+
children: /* @__PURE__ */ e(c, { className: "size-5" })
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
l as Checkbox
|
|
31
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
const c = ({
|
|
3
|
+
children: t,
|
|
4
|
+
disabled: o,
|
|
5
|
+
...e
|
|
6
|
+
}) => /* @__PURE__ */ s(
|
|
7
|
+
"button",
|
|
8
|
+
{
|
|
9
|
+
className: `w-full bg-[var(--main-accent-color)] text-white py-3 rounded-full font-bold transition-colors duration-300 ${o ? "bg-gray-400 text-gray-200 cursor-not-allowed opacity-70" : "cursor-pointer hover:opacity-90"}`,
|
|
10
|
+
...e,
|
|
11
|
+
children: t
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
export {
|
|
15
|
+
c as CustomButton
|
|
16
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as u, useLayoutEffect as v, useEffect as l } from "react";
|
|
3
|
+
import { createPortal as y } from "react-dom";
|
|
4
|
+
import { clsx as w } from "../../../../node_modules/clsx/dist/clsx.js";
|
|
5
|
+
import r from "./CustomSidebar.module.scss.js";
|
|
6
|
+
import { cn as b } from "../../utils/cn.js";
|
|
7
|
+
const k = ({
|
|
8
|
+
children: d,
|
|
9
|
+
isOpen: e,
|
|
10
|
+
setIsOpen: a
|
|
11
|
+
}) => {
|
|
12
|
+
const c = u(null), f = u(null), n = () => a(!1);
|
|
13
|
+
return v(() => {
|
|
14
|
+
e && typeof document < "u" && (f.current = document.activeElement);
|
|
15
|
+
}, [e]), l(() => {
|
|
16
|
+
e ? c.current?.focus() : f.current?.focus?.();
|
|
17
|
+
}, [e]), l(() => {
|
|
18
|
+
if (!e) return;
|
|
19
|
+
const o = (t) => {
|
|
20
|
+
t.key === "Escape" && n();
|
|
21
|
+
};
|
|
22
|
+
return window.addEventListener("keydown", o), () => window.removeEventListener("keydown", o);
|
|
23
|
+
}, [e]), l(() => {
|
|
24
|
+
if (!e) return;
|
|
25
|
+
const o = document.documentElement, t = document.body, m = o.style.overflow, i = t.style.overflow;
|
|
26
|
+
return o.style.overflow = "hidden", t.style.overflow = "hidden", () => {
|
|
27
|
+
o.style.overflow = m, t.style.overflow = i;
|
|
28
|
+
};
|
|
29
|
+
}, [e]), e ? y(
|
|
30
|
+
/* @__PURE__ */ s(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: w(r.overlay),
|
|
34
|
+
onMouseDown: n,
|
|
35
|
+
onTouchStart: n,
|
|
36
|
+
children: /* @__PURE__ */ s(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
ref: c,
|
|
40
|
+
tabIndex: -1,
|
|
41
|
+
className: b(
|
|
42
|
+
r.panel,
|
|
43
|
+
r.right,
|
|
44
|
+
e ? r.enter : r.exit,
|
|
45
|
+
"bg-[var(--sidebar-bg)]"
|
|
46
|
+
),
|
|
47
|
+
onMouseDown: (o) => o.stopPropagation(),
|
|
48
|
+
onTouchStart: (o) => o.stopPropagation(),
|
|
49
|
+
children: d
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
document.body
|
|
55
|
+
) : null;
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
k as default
|
|
59
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as o, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { Root as f, Portal as g, Content as r, Close as u, Title as d, Overlay as c, Description as m } from "../../../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
4
|
+
import { cn as s } from "../../utils/cn.js";
|
|
5
|
+
import y from "../../../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
6
|
+
const k = f, N = g, p = l.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ o(
|
|
7
|
+
c,
|
|
8
|
+
{
|
|
9
|
+
ref: t,
|
|
10
|
+
className: s(
|
|
11
|
+
"fixed inset-0 z-10000 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
12
|
+
a
|
|
13
|
+
),
|
|
14
|
+
...e,
|
|
15
|
+
onClick: (i) => i.stopPropagation()
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
p.displayName = c.displayName;
|
|
19
|
+
const x = l.forwardRef(({ className: a, children: e, ...t }, i) => /* @__PURE__ */ n(N, { container: document.querySelector(".root-app"), children: [
|
|
20
|
+
/* @__PURE__ */ o(p, {}),
|
|
21
|
+
/* @__PURE__ */ n(
|
|
22
|
+
r,
|
|
23
|
+
{
|
|
24
|
+
ref: i,
|
|
25
|
+
className: s(
|
|
26
|
+
"z-10001 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] w-full max-w-[calc(100%-2rem)] max-h-[80vh] translate-x-[-50%] translate-y-[-50%] duration-200 overflow-y-auto",
|
|
27
|
+
a
|
|
28
|
+
),
|
|
29
|
+
...t,
|
|
30
|
+
children: [
|
|
31
|
+
e,
|
|
32
|
+
/* @__PURE__ */ n(u, { className: "absolute right-4 top-4 cursor-pointer rounded-full bg-gray-200 transition-background hover:bg-gray-300 disabled:pointer-events-none duration-200 p-2", children: [
|
|
33
|
+
/* @__PURE__ */ o(y, { className: "h-8 w-8" }),
|
|
34
|
+
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
35
|
+
] })
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] }));
|
|
40
|
+
x.displayName = r.displayName;
|
|
41
|
+
const h = ({
|
|
42
|
+
className: a,
|
|
43
|
+
...e
|
|
44
|
+
}) => /* @__PURE__ */ o(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: s("flex flex-col space-y-1.5 text-left", a),
|
|
48
|
+
...e
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
h.displayName = "DialogHeader";
|
|
52
|
+
const D = l.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ o(
|
|
53
|
+
d,
|
|
54
|
+
{
|
|
55
|
+
ref: t,
|
|
56
|
+
className: s(
|
|
57
|
+
"text-3xl font-semibold leading-none tracking-tight",
|
|
58
|
+
a
|
|
59
|
+
),
|
|
60
|
+
...e
|
|
61
|
+
}
|
|
62
|
+
));
|
|
63
|
+
D.displayName = d.displayName;
|
|
64
|
+
const b = l.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ o(
|
|
65
|
+
m,
|
|
66
|
+
{
|
|
67
|
+
ref: t,
|
|
68
|
+
className: s("text-muted-foreground", a),
|
|
69
|
+
...e
|
|
70
|
+
}
|
|
71
|
+
));
|
|
72
|
+
b.displayName = m.displayName;
|
|
73
|
+
export {
|
|
74
|
+
k as Dialog,
|
|
75
|
+
x as DialogContent,
|
|
76
|
+
b as DialogDescription,
|
|
77
|
+
h as DialogHeader,
|
|
78
|
+
p as DialogOverlay,
|
|
79
|
+
N as DialogPortal,
|
|
80
|
+
D as DialogTitle
|
|
81
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
const s = ({ text: o, isActive: r = !1, onClick: n }) => {
|
|
3
|
+
const t = () => {
|
|
4
|
+
n && n();
|
|
5
|
+
};
|
|
6
|
+
return /* @__PURE__ */ a(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
role: "button",
|
|
10
|
+
tabIndex: 0,
|
|
11
|
+
onClick: t,
|
|
12
|
+
onKeyDown: (e) => {
|
|
13
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
|
|
14
|
+
},
|
|
15
|
+
className: `
|
|
16
|
+
flex justify-center items-center max-w-max px-4 py-2 capitalize rounded-full
|
|
17
|
+
font-medium text-sm cursor-pointer transition-all duration-[400ms] ease-in-out
|
|
18
|
+
outline-none focus:ring-2 focus:ring-[var(--main-accent-color)] focus:ring-offset-2
|
|
19
|
+
${r ? "bg-[var(--main-accent-color)] text-white hover:brightness-90" : "bg-[var(--label-bg)] hover:brightness-95"}
|
|
20
|
+
`,
|
|
21
|
+
children: o
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
s as Label
|
|
27
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import n from "./MDWithAccordion.module.scss.js";
|
|
3
|
+
import { Markdown as p } from "../../../../node_modules/react-markdown/lib/index.js";
|
|
4
|
+
import l from "../../../../node_modules/rehype-raw/lib/index.js";
|
|
5
|
+
function d(r, { openFirst: o = !1 } = {}) {
|
|
6
|
+
if (!r) return "";
|
|
7
|
+
const s = /~H~~([\s\S]*?)~~\s*~M~~([\s\S]*?)~~/g;
|
|
8
|
+
let t = 0;
|
|
9
|
+
return r.replace(s, (e, c, a) => {
|
|
10
|
+
const m = o && t === 0 ? " open" : "";
|
|
11
|
+
return t += 1, `
|
|
12
|
+
<details class="${n.mdAccordion}"${m}>
|
|
13
|
+
<summary>${String(c).trim()}</summary>
|
|
14
|
+
<div class="p-4">
|
|
15
|
+
${String(a).trim()}
|
|
16
|
+
</div>
|
|
17
|
+
</details>`;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function A({
|
|
21
|
+
children: r,
|
|
22
|
+
className: o = "",
|
|
23
|
+
openFirst: s = !1
|
|
24
|
+
}) {
|
|
25
|
+
const e = d(typeof r == "string" ? r : "", { openFirst: s });
|
|
26
|
+
return /* @__PURE__ */ i(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: ["prose", n.prose, o].filter(Boolean).join(" "),
|
|
30
|
+
children: /* @__PURE__ */ i(p, { rehypePlugins: [l], children: e })
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
A as default
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { AttributeHelper as m } from "../../../features/swatches/lib/AttributeHelper.js";
|
|
3
|
+
import { ImageGridZoom as n } from "../../../features/swatches/ui/ImageGridZoom/ImageGridZoom.js";
|
|
4
|
+
import { CloseIconSVG as d } from "../../../app/assets/svg/CloseIconSVG.js";
|
|
5
|
+
import { HexGridZoom as a } from "../../../features/swatches/ui/HexGridZoom/HexGridZoom.js";
|
|
6
|
+
const b = "w-16 h-16 bg-[var(--sidebar-b)] border border-solid border-[var(--border)] rounded-sm aspect-square overflow-hidden transition", g = ({
|
|
7
|
+
val: e,
|
|
8
|
+
className: o,
|
|
9
|
+
isShowDeleteIcon: i = !1,
|
|
10
|
+
handleSelect: t
|
|
11
|
+
}) => /* @__PURE__ */ s(
|
|
12
|
+
"button",
|
|
13
|
+
{
|
|
14
|
+
onClick: () => {
|
|
15
|
+
t && t(e);
|
|
16
|
+
},
|
|
17
|
+
className: `relative ${o || b}`,
|
|
18
|
+
"aria-label": `Selected swatch ${e.name ?? e.assetId}`,
|
|
19
|
+
title: "Click to remove",
|
|
20
|
+
children: [
|
|
21
|
+
m.getImage(e) ? /* @__PURE__ */ r(n, { item: e }) : /* @__PURE__ */ r(a, { item: e }),
|
|
22
|
+
i ? /* @__PURE__ */ r(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: `absolute top-0 right-0 m-2 w-[16px] h-[16px] flex justify-center items-center\r
|
|
26
|
+
bg-[var(--background-grey)] rounded-2xl border-none pointer-events-none`,
|
|
27
|
+
children: /* @__PURE__ */ r(d, { className: "w-2 h-2 stroke-[var(--svg-dark)]" })
|
|
28
|
+
}
|
|
29
|
+
) : null
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
e.assetId
|
|
33
|
+
);
|
|
34
|
+
export {
|
|
35
|
+
g as MaterialItem
|
|
36
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { Root as S, Trigger as j, Content as L } from "../../../../node_modules/@radix-ui/react-popover/dist/index.js";
|
|
4
|
+
import { PopoverTooltip as O } from "../PopoverTooltip/PopoverTooltip.js";
|
|
5
|
+
import { cn as f } from "../../utils/cn.js";
|
|
6
|
+
import { Checkbox as R } from "../Checkbox/Checkbox.js";
|
|
7
|
+
import D from "../../../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
8
|
+
import z from "../../../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
9
|
+
const P = i.forwardRef(
|
|
10
|
+
({
|
|
11
|
+
options: u,
|
|
12
|
+
values: a,
|
|
13
|
+
onValueChange: c,
|
|
14
|
+
placeholder: d = "Select options...",
|
|
15
|
+
className: y,
|
|
16
|
+
dropdownWidth: h,
|
|
17
|
+
align: N = "start",
|
|
18
|
+
getTooltipByMaterialAndSection: x,
|
|
19
|
+
sectionName: w
|
|
20
|
+
}, C) => {
|
|
21
|
+
const [l, m] = i.useState(!1), v = i.useRef(null);
|
|
22
|
+
i.useEffect(() => {
|
|
23
|
+
if (!l) return;
|
|
24
|
+
const e = (r) => {
|
|
25
|
+
const b = r.target, p = v.current;
|
|
26
|
+
p && (p.contains(b) || b === p) || m(!1);
|
|
27
|
+
}, n = (r) => {
|
|
28
|
+
r.key === "Escape" && m(!1);
|
|
29
|
+
};
|
|
30
|
+
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), document.addEventListener("keydown", n), () => {
|
|
31
|
+
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e), document.removeEventListener("keydown", n);
|
|
32
|
+
};
|
|
33
|
+
}, [l]);
|
|
34
|
+
const g = (e, n) => {
|
|
35
|
+
c(n ? [...a, e] : a.filter((r) => r !== e));
|
|
36
|
+
}, k = () => {
|
|
37
|
+
c([]);
|
|
38
|
+
}, s = a.length, E = s === 0 ? d : s === 1 ? u.find((e) => e.value === a[0])?.label || `${d} selected` : /* @__PURE__ */ o("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
39
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: d }),
|
|
40
|
+
/* @__PURE__ */ t("span", { className: "text-[0.8rem] text-white bg-[var(--main-accent-color)] px-1.5 py-0.5 ml-2 rounded-full whitespace-nowrap", children: s })
|
|
41
|
+
] });
|
|
42
|
+
return /* @__PURE__ */ o(S, { open: l, onOpenChange: m, children: [
|
|
43
|
+
/* @__PURE__ */ o(
|
|
44
|
+
j,
|
|
45
|
+
{
|
|
46
|
+
ref: C,
|
|
47
|
+
className: f(
|
|
48
|
+
"flex flex-row items-center justify-between rounded-full border px-3 sm:px-5 py-2 bg-white cursor-pointer hover:bg-gray-50 data-[state=open]:border-primary hover:border-primary focus:border-primary",
|
|
49
|
+
y
|
|
50
|
+
),
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ t("div", { className: "w-full text-[0.9rem] truncate text-left", children: E }),
|
|
53
|
+
/* @__PURE__ */ t(
|
|
54
|
+
D,
|
|
55
|
+
{
|
|
56
|
+
className: f(
|
|
57
|
+
"ml-2 h-4 w-4 transition-transform",
|
|
58
|
+
l && "rotate-180"
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ o(
|
|
66
|
+
L,
|
|
67
|
+
{
|
|
68
|
+
ref: v,
|
|
69
|
+
className: f(
|
|
70
|
+
"bg-white border rounded-lg shadow-lg z-50 max-h-80 overflow-y-auto overscroll-behavior-y-contain touch-pan-y p-2",
|
|
71
|
+
h || "w-[var(--radix-popover-trigger-width)]"
|
|
72
|
+
),
|
|
73
|
+
align: N,
|
|
74
|
+
sideOffset: 4,
|
|
75
|
+
style: {
|
|
76
|
+
WebkitOverflowScrolling: "touch",
|
|
77
|
+
overscrollBehavior: "contain"
|
|
78
|
+
},
|
|
79
|
+
onTouchStart: (e) => {
|
|
80
|
+
e.stopPropagation();
|
|
81
|
+
},
|
|
82
|
+
onTouchMove: (e) => {
|
|
83
|
+
e.stopPropagation();
|
|
84
|
+
},
|
|
85
|
+
onWheel: (e) => {
|
|
86
|
+
e.stopPropagation();
|
|
87
|
+
},
|
|
88
|
+
children: [
|
|
89
|
+
s > 0 && /* @__PURE__ */ t("div", { className: "flex flex-row gap-2 items-center justify-between px-2 py-1 mb-2 border-b", children: /* @__PURE__ */ o(
|
|
90
|
+
"button",
|
|
91
|
+
{
|
|
92
|
+
onClick: k,
|
|
93
|
+
className: "text-[1.2rem] text-black hover:text-primary transition-color cursor-pointer duration-200 flex flex-row items-center gap-1",
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ t(z, { className: "h-3 w-3" }),
|
|
96
|
+
"Clear all"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
) }),
|
|
100
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-1", children: u.map((e) => {
|
|
101
|
+
const n = a.includes(e.value);
|
|
102
|
+
return /* @__PURE__ */ o(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
className: "flex flex-row items-start gap-2 px-2 py-1 hover:bg-gray-50 rounded transition-background duration-300 cursor-pointer",
|
|
106
|
+
onClick: () => g(e.value, !n),
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ t(
|
|
109
|
+
R,
|
|
110
|
+
{
|
|
111
|
+
checked: n,
|
|
112
|
+
className: "size-6",
|
|
113
|
+
onCheckedChange: (r) => g(e.value, r)
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
/* @__PURE__ */ o("div", { className: "flex-1 flex flex-row items-start justify-between", children: [
|
|
117
|
+
/* @__PURE__ */ o("div", { className: "flex flex-row items-center gap-2", children: [
|
|
118
|
+
/* @__PURE__ */ t("span", { className: "text-[1.2rem]", children: e.label }),
|
|
119
|
+
(() => {
|
|
120
|
+
if (!x || !w)
|
|
121
|
+
return null;
|
|
122
|
+
const r = x(
|
|
123
|
+
e.value,
|
|
124
|
+
w
|
|
125
|
+
);
|
|
126
|
+
return r && r.Description ? /* @__PURE__ */ t(
|
|
127
|
+
O,
|
|
128
|
+
{
|
|
129
|
+
tooltipData: r?.Description
|
|
130
|
+
}
|
|
131
|
+
) : null;
|
|
132
|
+
})()
|
|
133
|
+
] }),
|
|
134
|
+
e.count !== void 0 && /* @__PURE__ */ t("span", { className: "text-[1rem] text-gray-800 bg-gray-100 px-2 py-0.5 ml-2 rounded-full whitespace-nowrap", children: e.count })
|
|
135
|
+
] })
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
e.value
|
|
139
|
+
);
|
|
140
|
+
}) })
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
] });
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
P.displayName = "MultiSelect";
|
|
148
|
+
export {
|
|
149
|
+
P as MultiSelect
|
|
150
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
function h(e) {
|
|
3
|
+
return /* @__PURE__ */ i(
|
|
4
|
+
"svg",
|
|
5
|
+
{
|
|
6
|
+
width: "12",
|
|
7
|
+
height: "12",
|
|
8
|
+
viewBox: "0 0 12 12",
|
|
9
|
+
fill: "none",
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
+
"aria-hidden": !0,
|
|
12
|
+
className: "size-5",
|
|
13
|
+
...e,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ t(
|
|
16
|
+
"rect",
|
|
17
|
+
{
|
|
18
|
+
x: "0.666667",
|
|
19
|
+
y: "0.666667",
|
|
20
|
+
width: "10.6667",
|
|
21
|
+
height: "10.6667",
|
|
22
|
+
rx: "5.33333",
|
|
23
|
+
stroke: "#B1B1B1",
|
|
24
|
+
strokeWidth: "1.33333"
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ t("circle", { cx: "6.00065", cy: "3.33268", r: "0.666667", fill: "#B1B1B1" }),
|
|
28
|
+
/* @__PURE__ */ t("rect", { x: "5.33398", y: "5.33398", width: "1.33333", height: "4", fill: "#B1B1B1" })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
h as default
|
|
35
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Popover as m, PopoverTrigger as p, PopoverContent as s } from "../../../../node_modules/@radix-ui/react-popover/dist/index.js";
|
|
3
|
+
import a from "../Markdown/MDWithAccordion.js";
|
|
4
|
+
import d from "./InfoIcon.js";
|
|
5
|
+
import e from "./PopoverTooltip.module.scss.js";
|
|
6
|
+
const v = ({
|
|
7
|
+
tooltipData: r,
|
|
8
|
+
openFirst: t = !1,
|
|
9
|
+
trigger: i
|
|
10
|
+
}) => {
|
|
11
|
+
if (!r?.trim()) return null;
|
|
12
|
+
const n = (l) => {
|
|
13
|
+
l.stopPropagation();
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ c(m, { children: [
|
|
16
|
+
/* @__PURE__ */ o(p, { asChild: !0, children: i ?? /* @__PURE__ */ o(
|
|
17
|
+
"button",
|
|
18
|
+
{
|
|
19
|
+
className: e.iconBtn,
|
|
20
|
+
"aria-label": "Open tooltip",
|
|
21
|
+
onClick: n,
|
|
22
|
+
children: /* @__PURE__ */ o(d, { className: e.iconSvg })
|
|
23
|
+
}
|
|
24
|
+
) }),
|
|
25
|
+
/* @__PURE__ */ o(
|
|
26
|
+
s,
|
|
27
|
+
{
|
|
28
|
+
className: "bg-[#000] text-white text-[1.1rem] leading-[1.45] w-auto max-w-[300px]",
|
|
29
|
+
side: "top",
|
|
30
|
+
children: /* @__PURE__ */ o(a, { openFirst: t, children: r })
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] });
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
v as PopoverTooltip
|
|
37
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as k, useState as d, useCallback as x, useEffect as y } from "react";
|
|
3
|
+
import { Label as L } from "../Label/Label.js";
|
|
4
|
+
const R = ({
|
|
5
|
+
items: h,
|
|
6
|
+
activeId: f,
|
|
7
|
+
onSelect: u,
|
|
8
|
+
className: g = "",
|
|
9
|
+
stepRatio: m = 0.8
|
|
10
|
+
}) => {
|
|
11
|
+
const n = k(null), [s, b] = d(!1), [i, p] = d(!1), o = x(() => {
|
|
12
|
+
const e = n.current;
|
|
13
|
+
if (!e) return;
|
|
14
|
+
const { scrollLeft: t, scrollWidth: l, clientWidth: v } = e, w = l - v;
|
|
15
|
+
b(t > 0), p(t < w - 1);
|
|
16
|
+
}, []);
|
|
17
|
+
y(() => {
|
|
18
|
+
const e = n.current;
|
|
19
|
+
if (!e) return;
|
|
20
|
+
o();
|
|
21
|
+
const t = new ResizeObserver(() => o());
|
|
22
|
+
t.observe(e);
|
|
23
|
+
const l = () => o();
|
|
24
|
+
return e.addEventListener("scroll", l, { passive: !0 }), () => {
|
|
25
|
+
t.disconnect(), e.removeEventListener("scroll", l);
|
|
26
|
+
};
|
|
27
|
+
}, [o]);
|
|
28
|
+
const c = (e) => {
|
|
29
|
+
const t = n.current;
|
|
30
|
+
if (!t) return;
|
|
31
|
+
const l = t.clientWidth * m * (e === "left" ? -1 : 1);
|
|
32
|
+
t.scrollBy({ left: l, behavior: "smooth" });
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ a(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
className: `flex items-center gap-2 w-full ${g}`,
|
|
38
|
+
role: "region",
|
|
39
|
+
"aria-label": "Category slider",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ r(
|
|
42
|
+
"button",
|
|
43
|
+
{
|
|
44
|
+
type: "button",
|
|
45
|
+
"aria-label": "Scroll left",
|
|
46
|
+
disabled: !s,
|
|
47
|
+
onClick: () => c("left"),
|
|
48
|
+
className: `flex-shrink-0 h-8 w-8 rounded-full flex items-center justify-center shadow
|
|
49
|
+
${s ? "bg-white hover:bg-gray-100" : "bg-gray-200 opacity-60 cursor-not-allowed"}`,
|
|
50
|
+
children: /* @__PURE__ */ r("svg", { width: "18", height: "18", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ r(
|
|
51
|
+
"path",
|
|
52
|
+
{
|
|
53
|
+
d: "M15 18l-6-6 6-6",
|
|
54
|
+
fill: "none",
|
|
55
|
+
stroke: "currentColor",
|
|
56
|
+
strokeWidth: "2",
|
|
57
|
+
strokeLinecap: "round"
|
|
58
|
+
}
|
|
59
|
+
) })
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ r(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
ref: n,
|
|
66
|
+
className: `\r
|
|
67
|
+
no-scrollbar flex-1 overflow-hidden scroll-smooth\r
|
|
68
|
+
`,
|
|
69
|
+
style: {
|
|
70
|
+
WebkitOverflowScrolling: "touch",
|
|
71
|
+
paddingLeft: "0.5rem",
|
|
72
|
+
paddingRight: "0.5rem"
|
|
73
|
+
},
|
|
74
|
+
children: /* @__PURE__ */ a("div", { className: "flex gap-3 sm:gap-4 py-2 min-w-min", children: [
|
|
75
|
+
h.map((e) => {
|
|
76
|
+
const t = e.productId, l = f === t;
|
|
77
|
+
return /* @__PURE__ */ r("div", { className: "shrink-0", children: /* @__PURE__ */ r(
|
|
78
|
+
L,
|
|
79
|
+
{
|
|
80
|
+
text: e.name,
|
|
81
|
+
isActive: l,
|
|
82
|
+
onClick: () => u(e)
|
|
83
|
+
}
|
|
84
|
+
) }, t);
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ r("div", { "aria-hidden": !0, className: "shrink-0 w-1 sm:w-4" })
|
|
87
|
+
] })
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ r(
|
|
91
|
+
"button",
|
|
92
|
+
{
|
|
93
|
+
type: "button",
|
|
94
|
+
"aria-label": "Scroll right",
|
|
95
|
+
disabled: !i,
|
|
96
|
+
onClick: () => c("right"),
|
|
97
|
+
className: `flex-shrink-0 h-8 w-8 rounded-full flex items-center justify-center shadow
|
|
98
|
+
${i ? "bg-black text-white hover:brightness-110" : "bg-gray-200 text-gray-500 opacity-60 cursor-not-allowed"}`,
|
|
99
|
+
children: /* @__PURE__ */ r("svg", { width: "18", height: "18", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ r(
|
|
100
|
+
"path",
|
|
101
|
+
{
|
|
102
|
+
d: "M9 6l6 6-6 6",
|
|
103
|
+
fill: "none",
|
|
104
|
+
stroke: "currentColor",
|
|
105
|
+
strokeWidth: "2",
|
|
106
|
+
strokeLinecap: "round"
|
|
107
|
+
}
|
|
108
|
+
) })
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
};
|
|
115
|
+
export {
|
|
116
|
+
R as Slider
|
|
117
|
+
};
|