hasting-swatchcart-module 0.0.1 → 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.d.ts +11 -0
- package/dist/components/SwatchesModule.js +31 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +4 -0
- 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/Poppins-Bold-2q5ngAVi.woff2 +0 -0
- package/dist/assets/Poppins-Bold-CQjaT_ws.woff +0 -0
- package/dist/assets/Poppins-Medium-DJwXWGyq.woff2 +0 -0
- package/dist/assets/Poppins-Medium-DOl3WpZ-.woff +0 -0
- package/dist/assets/Poppins-Regular-6u--lpAX.woff +0 -0
- package/dist/assets/Poppins-Regular-F7nXZSOf.woff2 +0 -0
- package/dist/assets/Poppins-SemiBold-CsrPp8BB.woff +0 -0
- package/dist/assets/Poppins-SemiBold-N83vw0ch.woff2 +0 -0
- package/dist/assets/index-CXVHp_is.js +0 -209
- package/dist/assets/index-Ho0sI6LY.css +0 -1
- package/dist/assets/product_thumb-Bn1S8z9K.png +0 -0
- package/dist/index.html +0 -14
- package/dist/vite.svg +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._overlay_18vc6_1{position:fixed;inset:0;background:var(--sidebar-overlay);display:flex;z-index:999;transition:opacity var(--sidebar-transition)}._panel_18vc6_10{position:absolute;top:0;bottom:0;right:0;width:var(--sidebar-width);box-shadow:var(--sidebar-shadow);display:flex;flex-direction:column;transition:transform var(--sidebar-transition);transform:translate(100%)}@media (max-width: 640px){._panel_18vc6_10{width:320px}}._enter_18vc6_28{transform:translate(0)}._exit_18vc6_32{transform:translate(100%)}._title_18vc6_36{margin:0;font-size:16px;line-height:1.6;font-weight:500}._closeBtn_18vc6_43{width:30px;height:30px;background:var(--background-grey);border:none;cursor:pointer;border-radius:100px;-webkit-border-radius:100px;-moz-border-radius:100px;-ms-border-radius:100px;-o-border-radius:100px}._closeBtn_18vc6_43 svg path{stroke:var(--svg-dark)}._content_18vc6_59{flex:1 1 auto;overflow-y:auto}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._prose_1l8lv_1{color:#e5e5e5}._prose_1l8lv_1 h1,._prose_1l8lv_1 h2,._prose_1l8lv_1 h3,._prose_1l8lv_1 h4,._prose_1l8lv_1 h5,._prose_1l8lv_1 h6{color:#fff;font-size:1.1rem;font-weight:600;margin:0 0 .3rem}._mdAccordion_1l8lv_16{border-radius:.8rem;margin:.8rem 0;background:transparent;color:#fff}._mdAccordion_1l8lv_16>summary{cursor:pointer;font-weight:600;padding:.6rem 1rem;border-radius:.8rem;background:#1f1f1f;color:#f5f5f5;transition:background .2s ease}._mdAccordion_1l8lv_16>summary:hover{background:#2d2d2d}._mdAccordion_1l8lv_16>summary::-webkit-details-marker{display:none}._mdAccordion_1l8lv_16[open]>summary{border-radius:.8rem .8rem 0 0;background:#2b2b2b}._mdAccordion_1l8lv_16[open]>*:not(summary){border-radius:0 0 .8rem .8rem;background:#2b2b2b;color:#e5e5e5;line-height:1.45}._prose_1l8lv_1 a{color:#4ea1f3;font-weight:500;text-decoration:none}._prose_1l8lv_1 a:hover{color:#76c0ff;text-decoration:underline}
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EDataInputType } from '../../src/features/DataAdapter/utils/types';
|
|
2
|
+
import { IAttributeAsset } from '../../src/features/swatches/model/types';
|
|
3
|
+
interface ISwatchesModuleProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
uiDataType: EDataInputType;
|
|
6
|
+
data: IAttributeAsset[] | any[];
|
|
7
|
+
onToggleSidebar: () => void;
|
|
8
|
+
onSendData: (data: unknown) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const SwatchModule: ({ isOpen, uiDataType, data, onToggleSidebar, onSendData, }: ISwatchesModuleProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as r, Fragment as e, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { useAppSelector as s } from "../src/app/store/store.js";
|
|
3
|
+
import { EDataInputType as p } from "../src/features/DataAdapter/utils/types.js";
|
|
4
|
+
import { MultiProductWrapper as c } from "../src/features/MultiProduct/ui/MultiProductWrapper/MultiProductWrapper.js";
|
|
5
|
+
import { getIsOpenSidebar as f } from "../src/features/swatches/model/selectors.js";
|
|
6
|
+
import { Swatches as a } from "../src/features/swatches/ui/Swatches.js";
|
|
7
|
+
const O = ({
|
|
8
|
+
isOpen: m,
|
|
9
|
+
uiDataType: o,
|
|
10
|
+
data: l,
|
|
11
|
+
onToggleSidebar: i,
|
|
12
|
+
onSendData: t
|
|
13
|
+
}) => {
|
|
14
|
+
const n = s(f);
|
|
15
|
+
return /* @__PURE__ */ r(e, { children: n ? /* @__PURE__ */ u(e, { children: [
|
|
16
|
+
o === p.DATA_ALL_PRODUCT ? /* @__PURE__ */ r(c, { onSendData: t }) : null,
|
|
17
|
+
o === p.UI ? /* @__PURE__ */ r(
|
|
18
|
+
a,
|
|
19
|
+
{
|
|
20
|
+
isOpen: m,
|
|
21
|
+
uiDataType: "UI",
|
|
22
|
+
data: l,
|
|
23
|
+
onToggleSidebar: i,
|
|
24
|
+
onSendData: t
|
|
25
|
+
}
|
|
26
|
+
) : null
|
|
27
|
+
] }) : null });
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
O as SwatchModule
|
|
31
|
+
};
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SwatchModule } from './components/SwatchesModule';
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import { evaluate as L, getSideAxis as T, getSide as j, clamp as X, getOppositePlacement as ee, getExpandedPlacements as te, getOppositeAxisPlacements as ne, getAlignmentSides as ie, getAlignment as z, min as $, max as W, getPaddingObject as J, rectToClientRect as _, getOppositeAxis as K, getAlignmentAxis as N, sides as se, getAxisLength as Q } from "../../utils/dist/floating-ui.utils.js";
|
|
2
|
+
function I(t, e, d) {
|
|
3
|
+
let {
|
|
4
|
+
reference: a,
|
|
5
|
+
floating: r
|
|
6
|
+
} = t;
|
|
7
|
+
const n = T(e), o = N(e), m = Q(o), u = j(e), h = n === "y", c = a.x + a.width / 2 - r.width / 2, s = a.y + a.height / 2 - r.height / 2, f = a[m] / 2 - r[m] / 2;
|
|
8
|
+
let i;
|
|
9
|
+
switch (u) {
|
|
10
|
+
case "top":
|
|
11
|
+
i = {
|
|
12
|
+
x: c,
|
|
13
|
+
y: a.y - r.height
|
|
14
|
+
};
|
|
15
|
+
break;
|
|
16
|
+
case "bottom":
|
|
17
|
+
i = {
|
|
18
|
+
x: c,
|
|
19
|
+
y: a.y + a.height
|
|
20
|
+
};
|
|
21
|
+
break;
|
|
22
|
+
case "right":
|
|
23
|
+
i = {
|
|
24
|
+
x: a.x + a.width,
|
|
25
|
+
y: s
|
|
26
|
+
};
|
|
27
|
+
break;
|
|
28
|
+
case "left":
|
|
29
|
+
i = {
|
|
30
|
+
x: a.x - r.width,
|
|
31
|
+
y: s
|
|
32
|
+
};
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
i = {
|
|
36
|
+
x: a.x,
|
|
37
|
+
y: a.y
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
switch (z(e)) {
|
|
41
|
+
case "start":
|
|
42
|
+
i[o] -= f * (d && h ? -1 : 1);
|
|
43
|
+
break;
|
|
44
|
+
case "end":
|
|
45
|
+
i[o] += f * (d && h ? -1 : 1);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
return i;
|
|
49
|
+
}
|
|
50
|
+
const ce = async (t, e, d) => {
|
|
51
|
+
const {
|
|
52
|
+
placement: a = "bottom",
|
|
53
|
+
strategy: r = "absolute",
|
|
54
|
+
middleware: n = [],
|
|
55
|
+
platform: o
|
|
56
|
+
} = d, m = n.filter(Boolean), u = await (o.isRTL == null ? void 0 : o.isRTL(e));
|
|
57
|
+
let h = await o.getElementRects({
|
|
58
|
+
reference: t,
|
|
59
|
+
floating: e,
|
|
60
|
+
strategy: r
|
|
61
|
+
}), {
|
|
62
|
+
x: c,
|
|
63
|
+
y: s
|
|
64
|
+
} = I(h, a, u), f = a, i = {}, l = 0;
|
|
65
|
+
for (let g = 0; g < m.length; g++) {
|
|
66
|
+
const {
|
|
67
|
+
name: x,
|
|
68
|
+
fn: y
|
|
69
|
+
} = m[g], {
|
|
70
|
+
x: A,
|
|
71
|
+
y: p,
|
|
72
|
+
data: v,
|
|
73
|
+
reset: w
|
|
74
|
+
} = await y({
|
|
75
|
+
x: c,
|
|
76
|
+
y: s,
|
|
77
|
+
initialPlacement: a,
|
|
78
|
+
placement: f,
|
|
79
|
+
strategy: r,
|
|
80
|
+
middlewareData: i,
|
|
81
|
+
rects: h,
|
|
82
|
+
platform: o,
|
|
83
|
+
elements: {
|
|
84
|
+
reference: t,
|
|
85
|
+
floating: e
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
c = A ?? c, s = p ?? s, i = {
|
|
89
|
+
...i,
|
|
90
|
+
[x]: {
|
|
91
|
+
...i[x],
|
|
92
|
+
...v
|
|
93
|
+
}
|
|
94
|
+
}, w && l <= 50 && (l++, typeof w == "object" && (w.placement && (f = w.placement), w.rects && (h = w.rects === !0 ? await o.getElementRects({
|
|
95
|
+
reference: t,
|
|
96
|
+
floating: e,
|
|
97
|
+
strategy: r
|
|
98
|
+
}) : w.rects), {
|
|
99
|
+
x: c,
|
|
100
|
+
y: s
|
|
101
|
+
} = I(h, f, u)), g = -1);
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
x: c,
|
|
105
|
+
y: s,
|
|
106
|
+
placement: f,
|
|
107
|
+
strategy: r,
|
|
108
|
+
middlewareData: i
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
async function Y(t, e) {
|
|
112
|
+
var d;
|
|
113
|
+
e === void 0 && (e = {});
|
|
114
|
+
const {
|
|
115
|
+
x: a,
|
|
116
|
+
y: r,
|
|
117
|
+
platform: n,
|
|
118
|
+
rects: o,
|
|
119
|
+
elements: m,
|
|
120
|
+
strategy: u
|
|
121
|
+
} = t, {
|
|
122
|
+
boundary: h = "clippingAncestors",
|
|
123
|
+
rootBoundary: c = "viewport",
|
|
124
|
+
elementContext: s = "floating",
|
|
125
|
+
altBoundary: f = !1,
|
|
126
|
+
padding: i = 0
|
|
127
|
+
} = L(e, t), l = J(i), x = m[f ? s === "floating" ? "reference" : "floating" : s], y = _(await n.getClippingRect({
|
|
128
|
+
element: (d = await (n.isElement == null ? void 0 : n.isElement(x))) == null || d ? x : x.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(m.floating)),
|
|
129
|
+
boundary: h,
|
|
130
|
+
rootBoundary: c,
|
|
131
|
+
strategy: u
|
|
132
|
+
})), A = s === "floating" ? {
|
|
133
|
+
x: a,
|
|
134
|
+
y: r,
|
|
135
|
+
width: o.floating.width,
|
|
136
|
+
height: o.floating.height
|
|
137
|
+
} : o.reference, p = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(m.floating)), v = await (n.isElement == null ? void 0 : n.isElement(p)) ? await (n.getScale == null ? void 0 : n.getScale(p)) || {
|
|
138
|
+
x: 1,
|
|
139
|
+
y: 1
|
|
140
|
+
} : {
|
|
141
|
+
x: 1,
|
|
142
|
+
y: 1
|
|
143
|
+
}, w = _(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
144
|
+
elements: m,
|
|
145
|
+
rect: A,
|
|
146
|
+
offsetParent: p,
|
|
147
|
+
strategy: u
|
|
148
|
+
}) : A);
|
|
149
|
+
return {
|
|
150
|
+
top: (y.top - w.top + l.top) / v.y,
|
|
151
|
+
bottom: (w.bottom - y.bottom + l.bottom) / v.y,
|
|
152
|
+
left: (y.left - w.left + l.left) / v.x,
|
|
153
|
+
right: (w.right - y.right + l.right) / v.x
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
const le = (t) => ({
|
|
157
|
+
name: "arrow",
|
|
158
|
+
options: t,
|
|
159
|
+
async fn(e) {
|
|
160
|
+
const {
|
|
161
|
+
x: d,
|
|
162
|
+
y: a,
|
|
163
|
+
placement: r,
|
|
164
|
+
rects: n,
|
|
165
|
+
platform: o,
|
|
166
|
+
elements: m,
|
|
167
|
+
middlewareData: u
|
|
168
|
+
} = e, {
|
|
169
|
+
element: h,
|
|
170
|
+
padding: c = 0
|
|
171
|
+
} = L(t, e) || {};
|
|
172
|
+
if (h == null)
|
|
173
|
+
return {};
|
|
174
|
+
const s = J(c), f = {
|
|
175
|
+
x: d,
|
|
176
|
+
y: a
|
|
177
|
+
}, i = N(r), l = Q(i), g = await o.getDimensions(h), x = i === "y", y = x ? "top" : "left", A = x ? "bottom" : "right", p = x ? "clientHeight" : "clientWidth", v = n.reference[l] + n.reference[i] - f[i] - n.floating[l], w = f[i] - n.reference[i], P = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(h));
|
|
178
|
+
let C = P ? P[p] : 0;
|
|
179
|
+
(!C || !await (o.isElement == null ? void 0 : o.isElement(P))) && (C = m.floating[p] || n.floating[l]);
|
|
180
|
+
const M = v / 2 - w / 2, k = C / 2 - g[l] / 2 - 1, O = $(s[y], k), H = $(s[A], k), D = O, F = C - g[l] - H, b = C / 2 - g[l] / 2 + M, B = X(D, b, F), E = !u.arrow && z(r) != null && b !== B && n.reference[l] / 2 - (b < D ? O : H) - g[l] / 2 < 0, S = E ? b < D ? b - D : b - F : 0;
|
|
181
|
+
return {
|
|
182
|
+
[i]: f[i] + S,
|
|
183
|
+
data: {
|
|
184
|
+
[i]: B,
|
|
185
|
+
centerOffset: b - B - S,
|
|
186
|
+
...E && {
|
|
187
|
+
alignmentOffset: S
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
reset: E
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
}), re = function(t) {
|
|
194
|
+
return t === void 0 && (t = {}), {
|
|
195
|
+
name: "flip",
|
|
196
|
+
options: t,
|
|
197
|
+
async fn(e) {
|
|
198
|
+
var d, a;
|
|
199
|
+
const {
|
|
200
|
+
placement: r,
|
|
201
|
+
middlewareData: n,
|
|
202
|
+
rects: o,
|
|
203
|
+
initialPlacement: m,
|
|
204
|
+
platform: u,
|
|
205
|
+
elements: h
|
|
206
|
+
} = e, {
|
|
207
|
+
mainAxis: c = !0,
|
|
208
|
+
crossAxis: s = !0,
|
|
209
|
+
fallbackPlacements: f,
|
|
210
|
+
fallbackStrategy: i = "bestFit",
|
|
211
|
+
fallbackAxisSideDirection: l = "none",
|
|
212
|
+
flipAlignment: g = !0,
|
|
213
|
+
...x
|
|
214
|
+
} = L(t, e);
|
|
215
|
+
if ((d = n.arrow) != null && d.alignmentOffset)
|
|
216
|
+
return {};
|
|
217
|
+
const y = j(r), A = T(m), p = j(m) === m, v = await (u.isRTL == null ? void 0 : u.isRTL(h.floating)), w = f || (p || !g ? [ee(m)] : te(m)), P = l !== "none";
|
|
218
|
+
!f && P && w.push(...ne(m, g, l, v));
|
|
219
|
+
const C = [m, ...w], M = await Y(e, x), k = [];
|
|
220
|
+
let O = ((a = n.flip) == null ? void 0 : a.overflows) || [];
|
|
221
|
+
if (c && k.push(M[y]), s) {
|
|
222
|
+
const b = ie(r, o, v);
|
|
223
|
+
k.push(M[b[0]], M[b[1]]);
|
|
224
|
+
}
|
|
225
|
+
if (O = [...O, {
|
|
226
|
+
placement: r,
|
|
227
|
+
overflows: k
|
|
228
|
+
}], !k.every((b) => b <= 0)) {
|
|
229
|
+
var H, D;
|
|
230
|
+
const b = (((H = n.flip) == null ? void 0 : H.index) || 0) + 1, B = C[b];
|
|
231
|
+
if (B && (!(s === "alignment" ? A !== T(B) : !1) || // We leave the current main axis only if every placement on that axis
|
|
232
|
+
// overflows the main axis.
|
|
233
|
+
O.every((R) => T(R.placement) === A ? R.overflows[0] > 0 : !0)))
|
|
234
|
+
return {
|
|
235
|
+
data: {
|
|
236
|
+
index: b,
|
|
237
|
+
overflows: O
|
|
238
|
+
},
|
|
239
|
+
reset: {
|
|
240
|
+
placement: B
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
let E = (D = O.filter((S) => S.overflows[0] <= 0).sort((S, R) => S.overflows[1] - R.overflows[1])[0]) == null ? void 0 : D.placement;
|
|
244
|
+
if (!E)
|
|
245
|
+
switch (i) {
|
|
246
|
+
case "bestFit": {
|
|
247
|
+
var F;
|
|
248
|
+
const S = (F = O.filter((R) => {
|
|
249
|
+
if (P) {
|
|
250
|
+
const V = T(R.placement);
|
|
251
|
+
return V === A || // Create a bias to the `y` side axis due to horizontal
|
|
252
|
+
// reading directions favoring greater width.
|
|
253
|
+
V === "y";
|
|
254
|
+
}
|
|
255
|
+
return !0;
|
|
256
|
+
}).map((R) => [R.placement, R.overflows.filter((V) => V > 0).reduce((V, Z) => V + Z, 0)]).sort((R, V) => R[1] - V[1])[0]) == null ? void 0 : F[0];
|
|
257
|
+
S && (E = S);
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
case "initialPlacement":
|
|
261
|
+
E = m;
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
if (r !== E)
|
|
265
|
+
return {
|
|
266
|
+
reset: {
|
|
267
|
+
placement: E
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
return {};
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
function q(t, e) {
|
|
276
|
+
return {
|
|
277
|
+
top: t.top - e.height,
|
|
278
|
+
right: t.right - e.width,
|
|
279
|
+
bottom: t.bottom - e.height,
|
|
280
|
+
left: t.left - e.width
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function G(t) {
|
|
284
|
+
return se.some((e) => t[e] >= 0);
|
|
285
|
+
}
|
|
286
|
+
const fe = function(t) {
|
|
287
|
+
return t === void 0 && (t = {}), {
|
|
288
|
+
name: "hide",
|
|
289
|
+
options: t,
|
|
290
|
+
async fn(e) {
|
|
291
|
+
const {
|
|
292
|
+
rects: d
|
|
293
|
+
} = e, {
|
|
294
|
+
strategy: a = "referenceHidden",
|
|
295
|
+
...r
|
|
296
|
+
} = L(t, e);
|
|
297
|
+
switch (a) {
|
|
298
|
+
case "referenceHidden": {
|
|
299
|
+
const n = await Y(e, {
|
|
300
|
+
...r,
|
|
301
|
+
elementContext: "reference"
|
|
302
|
+
}), o = q(n, d.reference);
|
|
303
|
+
return {
|
|
304
|
+
data: {
|
|
305
|
+
referenceHiddenOffsets: o,
|
|
306
|
+
referenceHidden: G(o)
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
case "escaped": {
|
|
311
|
+
const n = await Y(e, {
|
|
312
|
+
...r,
|
|
313
|
+
altBoundary: !0
|
|
314
|
+
}), o = q(n, d.floating);
|
|
315
|
+
return {
|
|
316
|
+
data: {
|
|
317
|
+
escapedOffsets: o,
|
|
318
|
+
escaped: G(o)
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
default:
|
|
323
|
+
return {};
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
}, U = /* @__PURE__ */ new Set(["left", "top"]);
|
|
328
|
+
async function oe(t, e) {
|
|
329
|
+
const {
|
|
330
|
+
placement: d,
|
|
331
|
+
platform: a,
|
|
332
|
+
elements: r
|
|
333
|
+
} = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = j(d), m = z(d), u = T(d) === "y", h = U.has(o) ? -1 : 1, c = n && u ? -1 : 1, s = L(e, t);
|
|
334
|
+
let {
|
|
335
|
+
mainAxis: f,
|
|
336
|
+
crossAxis: i,
|
|
337
|
+
alignmentAxis: l
|
|
338
|
+
} = typeof s == "number" ? {
|
|
339
|
+
mainAxis: s,
|
|
340
|
+
crossAxis: 0,
|
|
341
|
+
alignmentAxis: null
|
|
342
|
+
} : {
|
|
343
|
+
mainAxis: s.mainAxis || 0,
|
|
344
|
+
crossAxis: s.crossAxis || 0,
|
|
345
|
+
alignmentAxis: s.alignmentAxis
|
|
346
|
+
};
|
|
347
|
+
return m && typeof l == "number" && (i = m === "end" ? l * -1 : l), u ? {
|
|
348
|
+
x: i * c,
|
|
349
|
+
y: f * h
|
|
350
|
+
} : {
|
|
351
|
+
x: f * h,
|
|
352
|
+
y: i * c
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
const me = function(t) {
|
|
356
|
+
return t === void 0 && (t = 0), {
|
|
357
|
+
name: "offset",
|
|
358
|
+
options: t,
|
|
359
|
+
async fn(e) {
|
|
360
|
+
var d, a;
|
|
361
|
+
const {
|
|
362
|
+
x: r,
|
|
363
|
+
y: n,
|
|
364
|
+
placement: o,
|
|
365
|
+
middlewareData: m
|
|
366
|
+
} = e, u = await oe(e, t);
|
|
367
|
+
return o === ((d = m.offset) == null ? void 0 : d.placement) && (a = m.arrow) != null && a.alignmentOffset ? {} : {
|
|
368
|
+
x: r + u.x,
|
|
369
|
+
y: n + u.y,
|
|
370
|
+
data: {
|
|
371
|
+
...u,
|
|
372
|
+
placement: o
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
}, de = function(t) {
|
|
378
|
+
return t === void 0 && (t = {}), {
|
|
379
|
+
name: "shift",
|
|
380
|
+
options: t,
|
|
381
|
+
async fn(e) {
|
|
382
|
+
const {
|
|
383
|
+
x: d,
|
|
384
|
+
y: a,
|
|
385
|
+
placement: r
|
|
386
|
+
} = e, {
|
|
387
|
+
mainAxis: n = !0,
|
|
388
|
+
crossAxis: o = !1,
|
|
389
|
+
limiter: m = {
|
|
390
|
+
fn: (x) => {
|
|
391
|
+
let {
|
|
392
|
+
x: y,
|
|
393
|
+
y: A
|
|
394
|
+
} = x;
|
|
395
|
+
return {
|
|
396
|
+
x: y,
|
|
397
|
+
y: A
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
...u
|
|
402
|
+
} = L(t, e), h = {
|
|
403
|
+
x: d,
|
|
404
|
+
y: a
|
|
405
|
+
}, c = await Y(e, u), s = T(j(r)), f = K(s);
|
|
406
|
+
let i = h[f], l = h[s];
|
|
407
|
+
if (n) {
|
|
408
|
+
const x = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", A = i + c[x], p = i - c[y];
|
|
409
|
+
i = X(A, i, p);
|
|
410
|
+
}
|
|
411
|
+
if (o) {
|
|
412
|
+
const x = s === "y" ? "top" : "left", y = s === "y" ? "bottom" : "right", A = l + c[x], p = l - c[y];
|
|
413
|
+
l = X(A, l, p);
|
|
414
|
+
}
|
|
415
|
+
const g = m.fn({
|
|
416
|
+
...e,
|
|
417
|
+
[f]: i,
|
|
418
|
+
[s]: l
|
|
419
|
+
});
|
|
420
|
+
return {
|
|
421
|
+
...g,
|
|
422
|
+
data: {
|
|
423
|
+
x: g.x - d,
|
|
424
|
+
y: g.y - a,
|
|
425
|
+
enabled: {
|
|
426
|
+
[f]: n,
|
|
427
|
+
[s]: o
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
}, xe = function(t) {
|
|
434
|
+
return t === void 0 && (t = {}), {
|
|
435
|
+
options: t,
|
|
436
|
+
fn(e) {
|
|
437
|
+
const {
|
|
438
|
+
x: d,
|
|
439
|
+
y: a,
|
|
440
|
+
placement: r,
|
|
441
|
+
rects: n,
|
|
442
|
+
middlewareData: o
|
|
443
|
+
} = e, {
|
|
444
|
+
offset: m = 0,
|
|
445
|
+
mainAxis: u = !0,
|
|
446
|
+
crossAxis: h = !0
|
|
447
|
+
} = L(t, e), c = {
|
|
448
|
+
x: d,
|
|
449
|
+
y: a
|
|
450
|
+
}, s = T(r), f = K(s);
|
|
451
|
+
let i = c[f], l = c[s];
|
|
452
|
+
const g = L(m, e), x = typeof g == "number" ? {
|
|
453
|
+
mainAxis: g,
|
|
454
|
+
crossAxis: 0
|
|
455
|
+
} : {
|
|
456
|
+
mainAxis: 0,
|
|
457
|
+
crossAxis: 0,
|
|
458
|
+
...g
|
|
459
|
+
};
|
|
460
|
+
if (u) {
|
|
461
|
+
const p = f === "y" ? "height" : "width", v = n.reference[f] - n.floating[p] + x.mainAxis, w = n.reference[f] + n.reference[p] - x.mainAxis;
|
|
462
|
+
i < v ? i = v : i > w && (i = w);
|
|
463
|
+
}
|
|
464
|
+
if (h) {
|
|
465
|
+
var y, A;
|
|
466
|
+
const p = f === "y" ? "width" : "height", v = U.has(j(r)), w = n.reference[s] - n.floating[p] + (v && ((y = o.offset) == null ? void 0 : y[s]) || 0) + (v ? 0 : x.crossAxis), P = n.reference[s] + n.reference[p] + (v ? 0 : ((A = o.offset) == null ? void 0 : A[s]) || 0) - (v ? x.crossAxis : 0);
|
|
467
|
+
l < w ? l = w : l > P && (l = P);
|
|
468
|
+
}
|
|
469
|
+
return {
|
|
470
|
+
[f]: i,
|
|
471
|
+
[s]: l
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
}, ge = function(t) {
|
|
476
|
+
return t === void 0 && (t = {}), {
|
|
477
|
+
name: "size",
|
|
478
|
+
options: t,
|
|
479
|
+
async fn(e) {
|
|
480
|
+
var d, a;
|
|
481
|
+
const {
|
|
482
|
+
placement: r,
|
|
483
|
+
rects: n,
|
|
484
|
+
platform: o,
|
|
485
|
+
elements: m
|
|
486
|
+
} = e, {
|
|
487
|
+
apply: u = () => {
|
|
488
|
+
},
|
|
489
|
+
...h
|
|
490
|
+
} = L(t, e), c = await Y(e, h), s = j(r), f = z(r), i = T(r) === "y", {
|
|
491
|
+
width: l,
|
|
492
|
+
height: g
|
|
493
|
+
} = n.floating;
|
|
494
|
+
let x, y;
|
|
495
|
+
s === "top" || s === "bottom" ? (x = s, y = f === (await (o.isRTL == null ? void 0 : o.isRTL(m.floating)) ? "start" : "end") ? "left" : "right") : (y = s, x = f === "end" ? "top" : "bottom");
|
|
496
|
+
const A = g - c.top - c.bottom, p = l - c.left - c.right, v = $(g - c[x], A), w = $(l - c[y], p), P = !e.middlewareData.shift;
|
|
497
|
+
let C = v, M = w;
|
|
498
|
+
if ((d = e.middlewareData.shift) != null && d.enabled.x && (M = p), (a = e.middlewareData.shift) != null && a.enabled.y && (C = A), P && !f) {
|
|
499
|
+
const O = W(c.left, 0), H = W(c.right, 0), D = W(c.top, 0), F = W(c.bottom, 0);
|
|
500
|
+
i ? M = l - 2 * (O !== 0 || H !== 0 ? O + H : W(c.left, c.right)) : C = g - 2 * (D !== 0 || F !== 0 ? D + F : W(c.top, c.bottom));
|
|
501
|
+
}
|
|
502
|
+
await u({
|
|
503
|
+
...e,
|
|
504
|
+
availableWidth: M,
|
|
505
|
+
availableHeight: C
|
|
506
|
+
});
|
|
507
|
+
const k = await o.getDimensions(m.floating);
|
|
508
|
+
return l !== k.width || g !== k.height ? {
|
|
509
|
+
reset: {
|
|
510
|
+
rects: !0
|
|
511
|
+
}
|
|
512
|
+
} : {};
|
|
513
|
+
}
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
export {
|
|
517
|
+
le as arrow,
|
|
518
|
+
ce as computePosition,
|
|
519
|
+
Y as detectOverflow,
|
|
520
|
+
re as flip,
|
|
521
|
+
fe as hide,
|
|
522
|
+
xe as limitShift,
|
|
523
|
+
me as offset,
|
|
524
|
+
_ as rectToClientRect,
|
|
525
|
+
de as shift,
|
|
526
|
+
ge as size
|
|
527
|
+
};
|