@ubnt/store.core 9.15.0-alpha.0 → 9.15.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/components/LandingPagePro/LandingPagePro.d.ts +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.js +31 -11
- package/lib/components/LandingPagePro/LandingPagePro.js.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.mjs +32 -12
- package/lib/components/LandingPagePro/LandingPagePro.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.mjs +2 -2
- package/lib/constants/icons/options/colors/black.svg.js +5 -5
- package/lib/constants/icons/options/colors/index.js +3 -3
- package/lib/constants/icons/options/styles/black.svg.js +5 -5
- package/lib/constants/icons/options/styles/index.js +3 -3
- package/lib/constants/optionIcons.js +6 -6
- package/lib/constants/optionIcons.mjs +4 -4
- package/lib/contexts/MenuContext/context.js +11 -51
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +12 -46
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/contexts/MenuContext/mapping.d.ts +9 -45
- package/lib/contexts/MenuContext/mapping.js +41 -1365
- package/lib/contexts/MenuContext/mapping.js.map +1 -1
- package/lib/contexts/MenuContext/mapping.mjs +42 -1353
- package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
- package/lib/contexts/MenuContext/types.d.ts +1 -2
- package/lib/contexts/MenuContext/types.js.map +1 -1
- package/lib/contexts/MenuContext/types.mjs.map +1 -1
- package/lib/contexts/MenuContext/utils.d.ts +1 -3
- package/lib/contexts/MenuContext/utils.js +1 -18
- package/lib/contexts/MenuContext/utils.js.map +1 -1
- package/lib/contexts/MenuContext/utils.mjs +2 -17
- package/lib/contexts/MenuContext/utils.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import './assets/attention.svg.mjs';
|
|
|
10
10
|
import { Card, Header, HeaderHeadingSection, HeadingIcon, HeadingTitle, HeaderActionSection, SubduedInfo, OverlayFilter, NotAvailableNoteWrap, NotAvailableNoteIcon, InputBody, InputSectionSpacing, Footer, FooterContent, FooterNote } from './InputCard.styles.mjs';
|
|
11
11
|
import './InputSections/index.mjs';
|
|
12
12
|
import { CustomImage } from '../../../../CustomImage/CustomImage.mjs';
|
|
13
|
-
import attentionIcon__default from "../../../../../assets/
|
|
13
|
+
import attentionIcon__default from "../../../../../assets/attention.svg";
|
|
14
14
|
import { OptionSelectSection } from './InputSections/OptionSelectSection.mjs';
|
|
15
15
|
import { SliderSection } from './InputSections/SliderSection.mjs';
|
|
16
16
|
import { CounterSection } from './InputSections/CounterSection.mjs';
|
|
@@ -141,7 +141,7 @@ const Footer = styled__default["default"].div`
|
|
|
141
141
|
`;
|
|
142
142
|
const FooterContent = styled__default["default"].div``;
|
|
143
143
|
const FooterNote = styled__default["default"].div`
|
|
144
|
-
padding: 6px
|
|
144
|
+
padding: 6px;
|
|
145
145
|
border-radius: 1px 1px 6px 6px;
|
|
146
146
|
background-color: #fafafa;
|
|
147
147
|
text-align: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputCard.styles.js","sources":["../../../../../../src/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { CustomImage } from \"../../../../CustomImage\";\n\nconst zIndex = {\n overlayFilter: 110,\n notAvailableNote: 120,\n};\n\nexport const Card = styled.div<{\n $disabled: boolean;\n}>`\n border-radius: 8px;\n background-color: ${({ $disabled }) =>\n $disabled ? \"rgba(255, 255, 255, .8)\" : \"rgb(255, 255, 255)\"};\n`;\n\n// #############################################################################\n// Header\n// #############################################################################\nexport const Header = styled.div<{\n $hideCardContent?: boolean;\n}>`\n padding: 8px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 8px;\n border-bottom: ${({ $hideCardContent }) =>\n $hideCardContent ? \"none\" : \"1px solid #f8f8f8\"};\n margin-bottom: ${({ $hideCardContent }) => ($hideCardContent ? \"0\" : \"15px\")};\n`;\n\nexport const HeaderHeadingSection = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const HeadingTitle = styled.h3`\n margin: 0;\n font-size: 15px;\n line-height: 18px;\n font-weight: 700;\n color: #262626;\n`;\n\nexport const HeadingIcon = styled.div<{\n $disabled?: boolean;\n}>`\n filter: ${({ $disabled }) => ($disabled ? \"grayscale(100%)\" : \"none\")};\n opacity: ${({ $disabled }) => ($disabled ? 0.5 : 1)};\n width: 34px;\n height: 34px;\n`;\n\nexport const HeaderActionSection = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const SubduedInfo = styled.div`\n font-size: 12px;\n line-height: 14.5px;\n font-weight: 400;\n color: #c2c6cb;\n`;\n\n// #############################################################################\n// Body\n// #############################################################################\nexport const NotAvailableNoteWrap = styled.div`\n position: absolute;\n z-index: ${zIndex.notAvailableNote};\n width: calc(100% - 16px);\n left: 8px;\n top: -7px;\n display: flex;\n gap: 8px;\n\n span {\n font-size: 10px;\n line-height: 12px;\n color: #969696;\n }\n`;\n\nexport const NotAvailableNoteIcon = styled(CustomImage)`\n align-self: start;\n margin: 0;\n height: 16px;\n width: 16px;\n`;\n\nexport const OverlayFilter = styled.div<{\n $blur?: {\n active: boolean;\n blurPx?: number;\n };\n $overlay?: {\n active: boolean;\n opacity?: number;\n };\n}>`\n background: white;\n position: relative;\n\n ${({ $blur, $overlay }) => {\n const defaultBlurPx = 2;\n const defaultOverlayOpacity = 0.8;\n\n const defaultPsuedoStyles = `\n content: \"\";\n z-index: ${zIndex.overlayFilter};\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n `;\n\n return `\n /* Overlay filter */\n &::before {\n ${defaultPsuedoStyles}\n background: #FFF;\n opacity: ${$overlay?.opacity || defaultOverlayOpacity};\n display: ${$overlay?.active ? \"block\" : \"none\"};\n }\n\n /* Blur filter */\n &::after {\n ${defaultPsuedoStyles}\n backdrop-filter: ${`blur(${$blur?.blurPx || defaultBlurPx}px)`};\n display: ${$blur?.active ? \"block\" : \"none\"};\n }\n `;\n }}\n`;\n\nexport const InputBody = styled.div`\n padding: 0 8px 8px;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n`;\n\nexport const InputSectionSpacing = styled.div<{\n $marginBottom?: number;\n}>`\n display: flex;\n flex-direction: column;\n margin-bottom: ${({ $marginBottom }) => $marginBottom || 0}px;\n`;\n\n// #############################################################################\n// Footer\n// #############################################################################\nexport const Footer = styled.div`\n padding: 8px;\n`;\n\nexport const FooterContent = styled.div``;\n\nexport const FooterNote = styled.div`\n padding: 6px
|
|
1
|
+
{"version":3,"file":"InputCard.styles.js","sources":["../../../../../../src/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { CustomImage } from \"../../../../CustomImage\";\n\nconst zIndex = {\n overlayFilter: 110,\n notAvailableNote: 120,\n};\n\nexport const Card = styled.div<{\n $disabled: boolean;\n}>`\n border-radius: 8px;\n background-color: ${({ $disabled }) =>\n $disabled ? \"rgba(255, 255, 255, .8)\" : \"rgb(255, 255, 255)\"};\n`;\n\n// #############################################################################\n// Header\n// #############################################################################\nexport const Header = styled.div<{\n $hideCardContent?: boolean;\n}>`\n padding: 8px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 8px;\n border-bottom: ${({ $hideCardContent }) =>\n $hideCardContent ? \"none\" : \"1px solid #f8f8f8\"};\n margin-bottom: ${({ $hideCardContent }) => ($hideCardContent ? \"0\" : \"15px\")};\n`;\n\nexport const HeaderHeadingSection = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const HeadingTitle = styled.h3`\n margin: 0;\n font-size: 15px;\n line-height: 18px;\n font-weight: 700;\n color: #262626;\n`;\n\nexport const HeadingIcon = styled.div<{\n $disabled?: boolean;\n}>`\n filter: ${({ $disabled }) => ($disabled ? \"grayscale(100%)\" : \"none\")};\n opacity: ${({ $disabled }) => ($disabled ? 0.5 : 1)};\n width: 34px;\n height: 34px;\n`;\n\nexport const HeaderActionSection = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const SubduedInfo = styled.div`\n font-size: 12px;\n line-height: 14.5px;\n font-weight: 400;\n color: #c2c6cb;\n`;\n\n// #############################################################################\n// Body\n// #############################################################################\nexport const NotAvailableNoteWrap = styled.div`\n position: absolute;\n z-index: ${zIndex.notAvailableNote};\n width: calc(100% - 16px);\n left: 8px;\n top: -7px;\n display: flex;\n gap: 8px;\n\n span {\n font-size: 10px;\n line-height: 12px;\n color: #969696;\n }\n`;\n\nexport const NotAvailableNoteIcon = styled(CustomImage)`\n align-self: start;\n margin: 0;\n height: 16px;\n width: 16px;\n`;\n\nexport const OverlayFilter = styled.div<{\n $blur?: {\n active: boolean;\n blurPx?: number;\n };\n $overlay?: {\n active: boolean;\n opacity?: number;\n };\n}>`\n background: white;\n position: relative;\n\n ${({ $blur, $overlay }) => {\n const defaultBlurPx = 2;\n const defaultOverlayOpacity = 0.8;\n\n const defaultPsuedoStyles = `\n content: \"\";\n z-index: ${zIndex.overlayFilter};\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n `;\n\n return `\n /* Overlay filter */\n &::before {\n ${defaultPsuedoStyles}\n background: #FFF;\n opacity: ${$overlay?.opacity || defaultOverlayOpacity};\n display: ${$overlay?.active ? \"block\" : \"none\"};\n }\n\n /* Blur filter */\n &::after {\n ${defaultPsuedoStyles}\n backdrop-filter: ${`blur(${$blur?.blurPx || defaultBlurPx}px)`};\n display: ${$blur?.active ? \"block\" : \"none\"};\n }\n `;\n }}\n`;\n\nexport const InputBody = styled.div`\n padding: 0 8px 8px;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n`;\n\nexport const InputSectionSpacing = styled.div<{\n $marginBottom?: number;\n}>`\n display: flex;\n flex-direction: column;\n margin-bottom: ${({ $marginBottom }) => $marginBottom || 0}px;\n`;\n\n// #############################################################################\n// Footer\n// #############################################################################\nexport const Footer = styled.div`\n padding: 8px;\n`;\n\nexport const FooterContent = styled.div``;\n\nexport const FooterNote = styled.div`\n padding: 6px;\n border-radius: 1px 1px 6px 6px;\n background-color: #fafafa;\n text-align: center;\n font-size: 12px;\n line-height: 12px;\n color: #969696;\n`;\n"],"names":["zIndex","overlayFilter","notAvailableNote","Card","styled","div","$disabled","Header","$hideCardContent","HeaderHeadingSection","HeadingTitle","h3","HeadingIcon","HeaderActionSection","SubduedInfo","NotAvailableNoteWrap","NotAvailableNoteIcon","CustomImage","OverlayFilter","$blur","$overlay","defaultBlurPx","defaultOverlayOpacity","defaultPsuedoStyles","opacity","active","blurPx","InputBody","InputSectionSpacing","$marginBottom","Footer","FooterContent","FooterNote"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputCard.styles.mjs","sources":["../../../../../../src/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { CustomImage } from \"../../../../CustomImage\";\n\nconst zIndex = {\n overlayFilter: 110,\n notAvailableNote: 120,\n};\n\nexport const Card = styled.div<{\n $disabled: boolean;\n}>`\n border-radius: 8px;\n background-color: ${({ $disabled }) =>\n $disabled ? \"rgba(255, 255, 255, .8)\" : \"rgb(255, 255, 255)\"};\n`;\n\n// #############################################################################\n// Header\n// #############################################################################\nexport const Header = styled.div<{\n $hideCardContent?: boolean;\n}>`\n padding: 8px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 8px;\n border-bottom: ${({ $hideCardContent }) =>\n $hideCardContent ? \"none\" : \"1px solid #f8f8f8\"};\n margin-bottom: ${({ $hideCardContent }) => ($hideCardContent ? \"0\" : \"15px\")};\n`;\n\nexport const HeaderHeadingSection = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const HeadingTitle = styled.h3`\n margin: 0;\n font-size: 15px;\n line-height: 18px;\n font-weight: 700;\n color: #262626;\n`;\n\nexport const HeadingIcon = styled.div<{\n $disabled?: boolean;\n}>`\n filter: ${({ $disabled }) => ($disabled ? \"grayscale(100%)\" : \"none\")};\n opacity: ${({ $disabled }) => ($disabled ? 0.5 : 1)};\n width: 34px;\n height: 34px;\n`;\n\nexport const HeaderActionSection = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const SubduedInfo = styled.div`\n font-size: 12px;\n line-height: 14.5px;\n font-weight: 400;\n color: #c2c6cb;\n`;\n\n// #############################################################################\n// Body\n// #############################################################################\nexport const NotAvailableNoteWrap = styled.div`\n position: absolute;\n z-index: ${zIndex.notAvailableNote};\n width: calc(100% - 16px);\n left: 8px;\n top: -7px;\n display: flex;\n gap: 8px;\n\n span {\n font-size: 10px;\n line-height: 12px;\n color: #969696;\n }\n`;\n\nexport const NotAvailableNoteIcon = styled(CustomImage)`\n align-self: start;\n margin: 0;\n height: 16px;\n width: 16px;\n`;\n\nexport const OverlayFilter = styled.div<{\n $blur?: {\n active: boolean;\n blurPx?: number;\n };\n $overlay?: {\n active: boolean;\n opacity?: number;\n };\n}>`\n background: white;\n position: relative;\n\n ${({ $blur, $overlay }) => {\n const defaultBlurPx = 2;\n const defaultOverlayOpacity = 0.8;\n\n const defaultPsuedoStyles = `\n content: \"\";\n z-index: ${zIndex.overlayFilter};\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n `;\n\n return `\n /* Overlay filter */\n &::before {\n ${defaultPsuedoStyles}\n background: #FFF;\n opacity: ${$overlay?.opacity || defaultOverlayOpacity};\n display: ${$overlay?.active ? \"block\" : \"none\"};\n }\n\n /* Blur filter */\n &::after {\n ${defaultPsuedoStyles}\n backdrop-filter: ${`blur(${$blur?.blurPx || defaultBlurPx}px)`};\n display: ${$blur?.active ? \"block\" : \"none\"};\n }\n `;\n }}\n`;\n\nexport const InputBody = styled.div`\n padding: 0 8px 8px;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n`;\n\nexport const InputSectionSpacing = styled.div<{\n $marginBottom?: number;\n}>`\n display: flex;\n flex-direction: column;\n margin-bottom: ${({ $marginBottom }) => $marginBottom || 0}px;\n`;\n\n// #############################################################################\n// Footer\n// #############################################################################\nexport const Footer = styled.div`\n padding: 8px;\n`;\n\nexport const FooterContent = styled.div``;\n\nexport const FooterNote = styled.div`\n padding: 6px
|
|
1
|
+
{"version":3,"file":"InputCard.styles.mjs","sources":["../../../../../../src/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { CustomImage } from \"../../../../CustomImage\";\n\nconst zIndex = {\n overlayFilter: 110,\n notAvailableNote: 120,\n};\n\nexport const Card = styled.div<{\n $disabled: boolean;\n}>`\n border-radius: 8px;\n background-color: ${({ $disabled }) =>\n $disabled ? \"rgba(255, 255, 255, .8)\" : \"rgb(255, 255, 255)\"};\n`;\n\n// #############################################################################\n// Header\n// #############################################################################\nexport const Header = styled.div<{\n $hideCardContent?: boolean;\n}>`\n padding: 8px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 8px;\n border-bottom: ${({ $hideCardContent }) =>\n $hideCardContent ? \"none\" : \"1px solid #f8f8f8\"};\n margin-bottom: ${({ $hideCardContent }) => ($hideCardContent ? \"0\" : \"15px\")};\n`;\n\nexport const HeaderHeadingSection = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const HeadingTitle = styled.h3`\n margin: 0;\n font-size: 15px;\n line-height: 18px;\n font-weight: 700;\n color: #262626;\n`;\n\nexport const HeadingIcon = styled.div<{\n $disabled?: boolean;\n}>`\n filter: ${({ $disabled }) => ($disabled ? \"grayscale(100%)\" : \"none\")};\n opacity: ${({ $disabled }) => ($disabled ? 0.5 : 1)};\n width: 34px;\n height: 34px;\n`;\n\nexport const HeaderActionSection = styled.div`\n display: flex;\n align-items: center;\n`;\n\nexport const SubduedInfo = styled.div`\n font-size: 12px;\n line-height: 14.5px;\n font-weight: 400;\n color: #c2c6cb;\n`;\n\n// #############################################################################\n// Body\n// #############################################################################\nexport const NotAvailableNoteWrap = styled.div`\n position: absolute;\n z-index: ${zIndex.notAvailableNote};\n width: calc(100% - 16px);\n left: 8px;\n top: -7px;\n display: flex;\n gap: 8px;\n\n span {\n font-size: 10px;\n line-height: 12px;\n color: #969696;\n }\n`;\n\nexport const NotAvailableNoteIcon = styled(CustomImage)`\n align-self: start;\n margin: 0;\n height: 16px;\n width: 16px;\n`;\n\nexport const OverlayFilter = styled.div<{\n $blur?: {\n active: boolean;\n blurPx?: number;\n };\n $overlay?: {\n active: boolean;\n opacity?: number;\n };\n}>`\n background: white;\n position: relative;\n\n ${({ $blur, $overlay }) => {\n const defaultBlurPx = 2;\n const defaultOverlayOpacity = 0.8;\n\n const defaultPsuedoStyles = `\n content: \"\";\n z-index: ${zIndex.overlayFilter};\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n `;\n\n return `\n /* Overlay filter */\n &::before {\n ${defaultPsuedoStyles}\n background: #FFF;\n opacity: ${$overlay?.opacity || defaultOverlayOpacity};\n display: ${$overlay?.active ? \"block\" : \"none\"};\n }\n\n /* Blur filter */\n &::after {\n ${defaultPsuedoStyles}\n backdrop-filter: ${`blur(${$blur?.blurPx || defaultBlurPx}px)`};\n display: ${$blur?.active ? \"block\" : \"none\"};\n }\n `;\n }}\n`;\n\nexport const InputBody = styled.div`\n padding: 0 8px 8px;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n`;\n\nexport const InputSectionSpacing = styled.div<{\n $marginBottom?: number;\n}>`\n display: flex;\n flex-direction: column;\n margin-bottom: ${({ $marginBottom }) => $marginBottom || 0}px;\n`;\n\n// #############################################################################\n// Footer\n// #############################################################################\nexport const Footer = styled.div`\n padding: 8px;\n`;\n\nexport const FooterContent = styled.div``;\n\nexport const FooterNote = styled.div`\n padding: 6px;\n border-radius: 1px 1px 6px 6px;\n background-color: #fafafa;\n text-align: center;\n font-size: 12px;\n line-height: 12px;\n color: #969696;\n`;\n"],"names":["zIndex","overlayFilter","notAvailableNote","Card","styled","div","$disabled","Header","$hideCardContent","HeaderHeadingSection","HeadingTitle","h3","HeadingIcon","HeaderActionSection","SubduedInfo","NotAvailableNoteWrap","NotAvailableNoteIcon","CustomImage","OverlayFilter","$blur","$overlay","defaultBlurPx","defaultOverlayOpacity","defaultPsuedoStyles","opacity","active","blurPx","InputBody","InputSectionSpacing","$marginBottom","Footer","FooterContent","FooterNote"],"mappings":";;;;AAIA,MAAMA,MAAS,GAAA;EACbC,aAAe,EAAA,GAAA;EACfC,gBAAkB,EAAA;AACpB,CAAA;AAEO,MAAMC,OAAOC,MAAO,CAAAC,GAAA;AAAA;AAAA,sBAIL,CAAC;EAAEC;AAAA,CACrB,KAAAA,SAAA,GAAY,4BAA4B,oBAAoB;AAAA,CAAA;AAMzD,MAAMC,SAASH,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAQV,CAAC;EAAEG;AAAA,CAClB,KAAAA,gBAAA,GAAmB,SAAS,mBAAmB;AAAA,mBAChC,CAAC;EAAEA;AAAA,CAAwB,KAAAA,gBAAA,GAAmB,MAAM,MAAO;AAAA,CAAA;AAGvE,MAAMC,uBAAuBL,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAMpC,MAAMK,eAAeN,MAAO,CAAAO,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAQ5B,MAAMC,cAAcR,MAAO,CAAAC,GAAA;AAAA,YAGtB,CAAC;EAAEC;AAAA,CAAiB,KAAAA,SAAA,GAAY,oBAAoB,MAAO;AAAA,aAC1D,CAAC;EAAEA;AAAA,CAAiB,KAAAA,SAAA,GAAY,MAAM,CAAE;AAAA;AAAA;AAAA,CAAA;AAK9C,MAAMO,sBAAsBT,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA,CAAA;AAKnC,MAAMS,cAAcV,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAU3B,MAAMU,uBAAuBX,MAAO,CAAAC,GAAA;AAAA;AAAA,aAE9BL,OAAOE,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAcvB,MAAAc,oBAAA,GAAuBZ,OAAOa,WAAW,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAO/C,MAAMC,gBAAgBd,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,IAahC,CAAC;EAAEc,KAAO;EAAAC;CAAe,KAAA;EACzB,MAAMC,aAAgB,GAAA,CAAA;EACtB,MAAMC,qBAAwB,GAAA,GAAA;EAE9B,MAAMC,mBAAsB,GAAA;AAAA;AAAA,iBAEfvB,OAAOC,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAAA;EAQ1B,OAAA;AAAA;AAAA;AAAA,UAGDsB,mBAAmB;AAAA;AAAA,mBAEVH,QAAA,EAAUI,WAAWF,qBAAqB;AAAA,mBAC1CF,QAAA,EAAUK,MAAS,GAAA,OAAA,GAAU,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,UAK5CF,mBAAmB;AAAA,2BACM,QAAAJ,KAAA,EAAOO,MAAU,IAAAL,aAAkB,KAAA;AAAA,mBACnDF,KAAA,EAAOM,MAAS,GAAA,OAAA,GAAU,MAAM;AAAA;AAAA,KAAA;AAGjD,CAAC;AAAA,CAAA;AAGI,MAAME,YAAYvB,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOzB,MAAMuB,sBAAsBxB,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA,mBAKvB,CAAC;EAAEwB;CAAc,KAAMA,iBAAiB,CAAC;AAAA,CAAA;AAMrD,MAAMC,SAAS1B,MAAO,CAAAC,GAAA;AAAA;AAAA,CAAA;AAItB,MAAM0B,gBAAgB3B,MAAO,CAAAC,GAAA,EAAA;AAE7B,MAAM2B,aAAa5B,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;"}
|
|
@@ -11,7 +11,7 @@ require('../assets/plus.svg.js');
|
|
|
11
11
|
var Layout_styles = require('./Layout.styles.js');
|
|
12
12
|
var CustomImage = require('../../../../../CustomImage/CustomImage.js');
|
|
13
13
|
var StyleableSvgImage = require('../../../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
14
|
-
var MinusIcon = require("../../../../../../assets/
|
|
14
|
+
var MinusIcon = require("../../../../../../assets/minus5.svg");
|
|
15
15
|
var PlusIcon = require("../../../../../../assets/plus6.svg");
|
|
16
16
|
function _interopDefault(e) {
|
|
17
17
|
return e && e.__esModule ? e : {
|
|
@@ -9,7 +9,7 @@ import '../assets/plus.svg.mjs';
|
|
|
9
9
|
import { InputWrapper, Label, InputFlexWrapper } from './Layout.styles.mjs';
|
|
10
10
|
import { CustomImage } from '../../../../../CustomImage/CustomImage.mjs';
|
|
11
11
|
import { StyleableSvgImage } from '../../../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
12
|
-
import MinusIcon__default from "../../../../../../assets/
|
|
12
|
+
import MinusIcon__default from "../../../../../../assets/minus5.svg";
|
|
13
13
|
import PlusIcon__default from "../../../../../../assets/plus6.svg";
|
|
14
14
|
"use strict";
|
|
15
15
|
const CounterSection = ({
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var attentionIcon = require("../../../../../../assets/
|
|
6
|
+
var attentionIcon = require("../../../../../../assets/attention.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/attention.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/attention.svg";
|
|
3
3
|
//# sourceMappingURL=attention.svg.mjs.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var MinusIcon = require("../../../../../../assets/
|
|
6
|
+
var MinusIcon = require("../../../../../../assets/minus5.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/minus5.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/minus5.svg";
|
|
3
3
|
//# sourceMappingURL=minus.svg.mjs.map
|
|
@@ -6,7 +6,7 @@ var asset = require('../../../../../utils/asset.js');
|
|
|
6
6
|
require('./assets/attention.svg.js');
|
|
7
7
|
var Part = require('./Part.js');
|
|
8
8
|
var ProgressBarChart_styles = require('./ProgressBarChart.styles.js');
|
|
9
|
-
var attentionIcon = require("../../../../../assets/
|
|
9
|
+
var attentionIcon = require("../../../../../assets/attention2.svg");
|
|
10
10
|
function _interopDefault(e) {
|
|
11
11
|
return e && e.__esModule ? e : {
|
|
12
12
|
default: e
|
|
@@ -4,7 +4,7 @@ import { imageSrc } from '../../../../../utils/asset.mjs';
|
|
|
4
4
|
import './assets/attention.svg.mjs';
|
|
5
5
|
import { PART_GAP_PX, PART_WIDTH_PX, Part } from './Part.mjs';
|
|
6
6
|
import { ProgressBarChartContainer, ProgressBarChartHeader, ProgressBarChartTitle, ProgressBarWrapper, ProgressBarPartsContainer, ProgressBarAttentionLabel, ProgressBarAttentionLabelIcon } from './ProgressBarChart.styles.mjs';
|
|
7
|
-
import attentionIcon__default from "../../../../../assets/
|
|
7
|
+
import attentionIcon__default from "../../../../../assets/attention2.svg";
|
|
8
8
|
"use strict";
|
|
9
9
|
const ProgressBarChart = ({
|
|
10
10
|
title,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var attentionIcon = require("../../../../../../assets/
|
|
6
|
+
var attentionIcon = require("../../../../../../assets/attention2.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/attention2.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/attention2.svg";
|
|
3
3
|
//# sourceMappingURL=attention.svg.mjs.map
|
|
@@ -19,7 +19,7 @@ var ComputeResourceCalculator_types = require('../../../../ComputeResourceCalcul
|
|
|
19
19
|
var CustomImage = require('../../../../../CustomImage/CustomImage.js');
|
|
20
20
|
var SearchIcon = require("../../../../../../assets/search2.svg");
|
|
21
21
|
var StyleableSvgImage = require('../../../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
22
|
-
var MinusIcon = require("../../../../../../assets/
|
|
22
|
+
var MinusIcon = require("../../../../../../assets/minus4.svg");
|
|
23
23
|
var PlusIcon = require("../../../../../../assets/plus5.svg");
|
|
24
24
|
function _interopDefault(e) {
|
|
25
25
|
return e && e.__esModule ? e : {
|
|
@@ -17,7 +17,7 @@ import { isMessageFormatted } from '../../../../ComputeResourceCalculator/Comput
|
|
|
17
17
|
import { CustomImage } from '../../../../../CustomImage/CustomImage.mjs';
|
|
18
18
|
import SearchIcon__default from "../../../../../../assets/search2.svg";
|
|
19
19
|
import { StyleableSvgImage } from '../../../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
20
|
-
import MinusIcon__default from "../../../../../../assets/
|
|
20
|
+
import MinusIcon__default from "../../../../../../assets/minus4.svg";
|
|
21
21
|
import PlusIcon__default from "../../../../../../assets/plus5.svg";
|
|
22
22
|
"use strict";
|
|
23
23
|
const PoeConsumerSelectModal = ({
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var MinusIcon = require("../../../../../../assets/
|
|
6
|
+
var MinusIcon = require("../../../../../../assets/minus4.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/minus4.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/minus4.svg";
|
|
3
3
|
//# sourceMappingURL=minus.svg.mjs.map
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var
|
|
6
|
+
var _externalAssets_WKvVtlSv = require("../../../../assets/black.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var _externalAssets_WKvVtlSv__default = /*#__PURE__*/_interopDefault(_externalAssets_WKvVtlSv);
|
|
13
13
|
Object.defineProperty(exports, "default", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function () {
|
|
16
|
-
return
|
|
16
|
+
return _externalAssets_WKvVtlSv__default["default"];
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
Object.keys(
|
|
19
|
+
Object.keys(_externalAssets_WKvVtlSv).forEach(function (k) {
|
|
20
20
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function () {
|
|
23
|
-
return
|
|
23
|
+
return _externalAssets_WKvVtlSv[k];
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
});
|
|
@@ -6,7 +6,7 @@ require('./darkGrey.svg.js');
|
|
|
6
6
|
require('./grey.svg.js');
|
|
7
7
|
require('./lightGrey.svg.js');
|
|
8
8
|
require('./white.svg.js');
|
|
9
|
-
var
|
|
9
|
+
var _externalAssets_WKvVtlSv = require("../../../../assets/black.svg");
|
|
10
10
|
var _externalAssets_DTFMFQ51 = require("../../../../assets/blue.svg");
|
|
11
11
|
var _externalAssets_B1Gj17va = require("../../../../assets/darkGrey.svg");
|
|
12
12
|
var _externalAssets_So87DWAv = require("../../../../assets/grey.svg");
|
|
@@ -17,7 +17,7 @@ function _interopDefault(e) {
|
|
|
17
17
|
default: e
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
var
|
|
20
|
+
var _externalAssets_WKvVtlSv__default = /*#__PURE__*/_interopDefault(_externalAssets_WKvVtlSv);
|
|
21
21
|
var _externalAssets_DTFMFQ51__default = /*#__PURE__*/_interopDefault(_externalAssets_DTFMFQ51);
|
|
22
22
|
var _externalAssets_B1Gj17va__default = /*#__PURE__*/_interopDefault(_externalAssets_B1Gj17va);
|
|
23
23
|
var _externalAssets_So87DWAv__default = /*#__PURE__*/_interopDefault(_externalAssets_So87DWAv);
|
|
@@ -27,7 +27,7 @@ var _externalAssets_Dh1AHi98__default = /*#__PURE__*/_interopDefault(_externalAs
|
|
|
27
27
|
Object.defineProperty(exports, "black", {
|
|
28
28
|
enumerable: true,
|
|
29
29
|
get: function () {
|
|
30
|
-
return
|
|
30
|
+
return _externalAssets_WKvVtlSv__default["default"];
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "blue", {
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var
|
|
6
|
+
var _externalAssets_NxsKXHyJ = require("../../../../assets/black.svg");
|
|
7
7
|
function _interopDefault(e) {
|
|
8
8
|
return e && e.__esModule ? e : {
|
|
9
9
|
default: e
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var _externalAssets_NxsKXHyJ__default = /*#__PURE__*/_interopDefault(_externalAssets_NxsKXHyJ);
|
|
13
13
|
Object.defineProperty(exports, "default", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function () {
|
|
16
|
-
return
|
|
16
|
+
return _externalAssets_NxsKXHyJ__default["default"];
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
Object.keys(
|
|
19
|
+
Object.keys(_externalAssets_NxsKXHyJ).forEach(function (k) {
|
|
20
20
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
21
21
|
enumerable: true,
|
|
22
22
|
get: function () {
|
|
23
|
-
return
|
|
23
|
+
return _externalAssets_NxsKXHyJ[k];
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
});
|
|
@@ -6,7 +6,7 @@ require('./camo.png.js');
|
|
|
6
6
|
require('./concrete.png.js');
|
|
7
7
|
require('./marble.png.js');
|
|
8
8
|
require('./wood.png.js');
|
|
9
|
-
var
|
|
9
|
+
var _externalAssets_NxsKXHyJ = require("../../../../assets/black.svg");
|
|
10
10
|
var _externalAssets_DxR_vr6$ = require("../../../../assets/blackFabric.png");
|
|
11
11
|
var _externalAssets_D_2KPJKL = require("../../../../assets/camo.png");
|
|
12
12
|
var _externalAssets_AeQRmq$G = require("../../../../assets/concrete.png");
|
|
@@ -17,7 +17,7 @@ function _interopDefault(e) {
|
|
|
17
17
|
default: e
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
var
|
|
20
|
+
var _externalAssets_NxsKXHyJ__default = /*#__PURE__*/_interopDefault(_externalAssets_NxsKXHyJ);
|
|
21
21
|
var _externalAssets_DxR_vr6$__default = /*#__PURE__*/_interopDefault(_externalAssets_DxR_vr6$);
|
|
22
22
|
var _externalAssets_D_2KPJKL__default = /*#__PURE__*/_interopDefault(_externalAssets_D_2KPJKL);
|
|
23
23
|
var _externalAssets_AeQRmq$G__default = /*#__PURE__*/_interopDefault(_externalAssets_AeQRmq$G);
|
|
@@ -27,7 +27,7 @@ var _externalAssets_kQL$tT0V__default = /*#__PURE__*/_interopDefault(_externalAs
|
|
|
27
27
|
Object.defineProperty(exports, "black", {
|
|
28
28
|
enumerable: true,
|
|
29
29
|
get: function () {
|
|
30
|
-
return
|
|
30
|
+
return _externalAssets_NxsKXHyJ__default["default"];
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "blackFabric", {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./icons/index.js');
|
|
4
|
-
var
|
|
4
|
+
var _externalAssets_NxsKXHyJ = require("../assets/black.svg");
|
|
5
5
|
var _externalAssets_DxR_vr6$ = require("../assets/blackFabric.png");
|
|
6
6
|
var _externalAssets_D_2KPJKL = require("../assets/camo.png");
|
|
7
7
|
var _externalAssets_AeQRmq$G = require("../assets/concrete.png");
|
|
8
8
|
var _externalAssets_CoJwwvt7 = require("../assets/marble.png");
|
|
9
9
|
var _externalAssets_kQL$tT0V = require("../assets/wood.png");
|
|
10
|
-
var
|
|
10
|
+
var _externalAssets_WKvVtlSv = require("../assets/black.svg");
|
|
11
11
|
var _externalAssets_DTFMFQ51 = require("../assets/blue.svg");
|
|
12
12
|
var _externalAssets_Dh1AHi98 = require("../assets/white.svg");
|
|
13
13
|
var _externalAssets_B1Gj17va = require("../assets/darkGrey.svg");
|
|
@@ -18,13 +18,13 @@ function _interopDefault(e) {
|
|
|
18
18
|
default: e
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
var
|
|
21
|
+
var _externalAssets_NxsKXHyJ__default = /*#__PURE__*/_interopDefault(_externalAssets_NxsKXHyJ);
|
|
22
22
|
var _externalAssets_DxR_vr6$__default = /*#__PURE__*/_interopDefault(_externalAssets_DxR_vr6$);
|
|
23
23
|
var _externalAssets_D_2KPJKL__default = /*#__PURE__*/_interopDefault(_externalAssets_D_2KPJKL);
|
|
24
24
|
var _externalAssets_AeQRmq$G__default = /*#__PURE__*/_interopDefault(_externalAssets_AeQRmq$G);
|
|
25
25
|
var _externalAssets_CoJwwvt7__default = /*#__PURE__*/_interopDefault(_externalAssets_CoJwwvt7);
|
|
26
26
|
var _externalAssets_kQL$tT0V__default = /*#__PURE__*/_interopDefault(_externalAssets_kQL$tT0V);
|
|
27
|
-
var
|
|
27
|
+
var _externalAssets_WKvVtlSv__default = /*#__PURE__*/_interopDefault(_externalAssets_WKvVtlSv);
|
|
28
28
|
var _externalAssets_DTFMFQ51__default = /*#__PURE__*/_interopDefault(_externalAssets_DTFMFQ51);
|
|
29
29
|
var _externalAssets_Dh1AHi98__default = /*#__PURE__*/_interopDefault(_externalAssets_Dh1AHi98);
|
|
30
30
|
var _externalAssets_B1Gj17va__default = /*#__PURE__*/_interopDefault(_externalAssets_B1Gj17va);
|
|
@@ -53,7 +53,7 @@ var OptionColors = /* @__PURE__ */(OptionColors2 => {
|
|
|
53
53
|
return OptionColors2;
|
|
54
54
|
})(OptionColors || {});
|
|
55
55
|
const optionStyle = {
|
|
56
|
-
["black" /* black */]:
|
|
56
|
+
["black" /* black */]: _externalAssets_NxsKXHyJ__default["default"],
|
|
57
57
|
["black-fabric" /* blackFabric */]: _externalAssets_DxR_vr6$__default["default"],
|
|
58
58
|
["camo" /* camo */]: _externalAssets_D_2KPJKL__default["default"],
|
|
59
59
|
["concrete" /* concrete */]: _externalAssets_AeQRmq$G__default["default"],
|
|
@@ -62,7 +62,7 @@ const optionStyle = {
|
|
|
62
62
|
};
|
|
63
63
|
const optionColors = {
|
|
64
64
|
// Common
|
|
65
|
-
["black" /* black */]:
|
|
65
|
+
["black" /* black */]: _externalAssets_WKvVtlSv__default["default"],
|
|
66
66
|
["blue" /* blue */]: _externalAssets_DTFMFQ51__default["default"],
|
|
67
67
|
["white" /* white */]: _externalAssets_Dh1AHi98__default["default"],
|
|
68
68
|
// US English
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import './icons/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import _externalAssets_NxsKXHyJ__default from "../assets/black.svg";
|
|
3
3
|
import _externalAssets_DxR_vr6$__default from "../assets/blackFabric.png";
|
|
4
4
|
import _externalAssets_D_2KPJKL__default from "../assets/camo.png";
|
|
5
5
|
import _externalAssets_AeQRmq$G__default from "../assets/concrete.png";
|
|
6
6
|
import _externalAssets_CoJwwvt7__default from "../assets/marble.png";
|
|
7
7
|
import _externalAssets_kQL$tT0V__default from "../assets/wood.png";
|
|
8
|
-
import
|
|
8
|
+
import _externalAssets_WKvVtlSv__default from "../assets/black.svg";
|
|
9
9
|
import _externalAssets_DTFMFQ51__default from "../assets/blue.svg";
|
|
10
10
|
import _externalAssets_Dh1AHi98__default from "../assets/white.svg";
|
|
11
11
|
import _externalAssets_B1Gj17va__default from "../assets/darkGrey.svg";
|
|
@@ -34,7 +34,7 @@ var OptionColors = /* @__PURE__ */(OptionColors2 => {
|
|
|
34
34
|
return OptionColors2;
|
|
35
35
|
})(OptionColors || {});
|
|
36
36
|
const optionStyle = {
|
|
37
|
-
["black" /* black */]:
|
|
37
|
+
["black" /* black */]: _externalAssets_NxsKXHyJ__default,
|
|
38
38
|
["black-fabric" /* blackFabric */]: _externalAssets_DxR_vr6$__default,
|
|
39
39
|
["camo" /* camo */]: _externalAssets_D_2KPJKL__default,
|
|
40
40
|
["concrete" /* concrete */]: _externalAssets_AeQRmq$G__default,
|
|
@@ -43,7 +43,7 @@ const optionStyle = {
|
|
|
43
43
|
};
|
|
44
44
|
const optionColors = {
|
|
45
45
|
// Common
|
|
46
|
-
["black" /* black */]:
|
|
46
|
+
["black" /* black */]: _externalAssets_WKvVtlSv__default,
|
|
47
47
|
["blue" /* blue */]: _externalAssets_DTFMFQ51__default,
|
|
48
48
|
["white" /* white */]: _externalAssets_Dh1AHi98__default,
|
|
49
49
|
// US English
|
|
@@ -3,19 +3,12 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var reactUse = require('react-use');
|
|
6
|
-
var urlJoin = require('url-join');
|
|
7
6
|
var layout = require('../../constants/layout.js');
|
|
8
7
|
var useLockBodyScrollCustom = require('../../hooks/useLockBodyScrollCustom.js');
|
|
9
8
|
var errors = require('../../utils/errors.js');
|
|
10
9
|
var mapping = require('./mapping.js');
|
|
11
10
|
var types = require('./types.js');
|
|
12
11
|
var utils = require('./utils.js');
|
|
13
|
-
function _interopDefault(e) {
|
|
14
|
-
return e && e.__esModule ? e : {
|
|
15
|
-
default: e
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
var urlJoin__default = /*#__PURE__*/_interopDefault(urlJoin);
|
|
19
12
|
"use strict";
|
|
20
13
|
const MenuContext = react.createContext(null);
|
|
21
14
|
const MenuContextProvider = ({
|
|
@@ -130,22 +123,6 @@ const MenuContextProvider = ({
|
|
|
130
123
|
// If there's a hash in the SiteUrl, it should match the current hash for the item to be active
|
|
131
124
|
!url[3] || currentHash.replace(/^#/, "") === url[3]);
|
|
132
125
|
}, [context, currentHash, currentPathname, isMicrositeContext]);
|
|
133
|
-
const isHiddenStoreItem = react.useCallback(subItem => {
|
|
134
|
-
if (context === mapping.SiteId.Store && subItem.micrositeOnly) {
|
|
135
|
-
return false;
|
|
136
|
-
}
|
|
137
|
-
return !(context === mapping.SiteId.Store && "path" in subItem && subItem.path && !utils.getPathname(subItem, storeId) &&
|
|
138
|
-
// Hide only if it is defined to do so
|
|
139
|
-
subItem.hideInStoreIfStorePathNull);
|
|
140
|
-
}, [context, storeId]);
|
|
141
|
-
const isHiddenMicrositeItem = react.useCallback(subItem => {
|
|
142
|
-
return !(isMicrositeContext && subItem.storeOnly === true);
|
|
143
|
-
}, [isMicrositeContext]);
|
|
144
|
-
const getMenuItemPathUrl = react.useCallback(path => {
|
|
145
|
-
const url = new URL(storeBaseUrl);
|
|
146
|
-
url.pathname = urlJoin__default["default"](url.pathname, language, path);
|
|
147
|
-
return url;
|
|
148
|
-
}, [storeBaseUrl, language]);
|
|
149
126
|
const createSiteUrl = react.useCallback(siteUrl => {
|
|
150
127
|
const addSiteConfigReferenceSearchParams = !mapping.GENERIC_SITE_IDS.includes(context);
|
|
151
128
|
const [siteId] = siteUrl;
|
|
@@ -161,10 +138,7 @@ const MenuContextProvider = ({
|
|
|
161
138
|
}, [context, getSiteConfig, storeId, language]);
|
|
162
139
|
const parseSubSubRecursiveItems = react.useCallback(subSubItem => {
|
|
163
140
|
const nestedSubSubItems = "items" in subSubItem && subSubItem.items ? subSubItem.items.map(parseSubSubRecursiveItems).filter(el => !!el) : [];
|
|
164
|
-
const
|
|
165
|
-
const storePathPathname = storePath ? getMenuItemPathUrl(storePath) : null;
|
|
166
|
-
const firstAvailableNestedSubSubItem = nestedSubSubItems.find(item => item.possible);
|
|
167
|
-
const url = isMicrositeContext && subSubItem.url ? createSiteUrl(subSubItem.url) : (storePathPathname && storePathPathname.toString()) ??
|
|
141
|
+
const url = isMicrositeContext && subSubItem.url ? createSiteUrl(subSubItem.url) :
|
|
168
142
|
// TODO: maybe need to improve to get first "available" child not the first form array, not sure if the
|
|
169
143
|
// parseItemsFn filters them already out
|
|
170
144
|
utils.findFirstPossibleDeepNestedItemUrl(nestedSubSubItems) ?? (subSubItem.url && createSiteUrl(subSubItem.url));
|
|
@@ -172,8 +146,6 @@ const MenuContextProvider = ({
|
|
|
172
146
|
return null;
|
|
173
147
|
}
|
|
174
148
|
const active = subSubItem.url && isSiteUrlActive(subSubItem.url) ||
|
|
175
|
-
// Store path is active
|
|
176
|
-
storePathPathname && isPathnameActive(storePathPathname.pathname) ||
|
|
177
149
|
// Any child item is active
|
|
178
150
|
nestedSubSubItems.some(el => el.active);
|
|
179
151
|
return {
|
|
@@ -183,26 +155,19 @@ const MenuContextProvider = ({
|
|
|
183
155
|
icon: subSubItem.icon,
|
|
184
156
|
mobileIcon: subSubItem.mobileIcon,
|
|
185
157
|
active,
|
|
186
|
-
path: firstAvailableNestedSubSubItem?.path || subSubItem.path || null,
|
|
187
158
|
url,
|
|
188
159
|
possible: "items" in subSubItem ? nestedSubSubItems.some(item => item.possible) :
|
|
189
160
|
// If gotten this far fallback to true
|
|
190
161
|
true,
|
|
191
162
|
items: nestedSubSubItems
|
|
192
163
|
};
|
|
193
|
-
}, [
|
|
164
|
+
}, [isMicrositeContext, createSiteUrl, isSiteUrlActive]);
|
|
194
165
|
const parseSubSubMenuItems = react.useCallback(subItem => {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
return subItem.items.filter(isHiddenMicrositeItem).filter(isHiddenStoreItem).map(parseSubSubRecursiveItems).filter(el => !!el);
|
|
199
|
-
}, [isHiddenMicrositeItem, isHiddenStoreItem, parseSubSubRecursiveItems]);
|
|
166
|
+
return ("items" in subItem ? subItem.items : []).map(parseSubSubRecursiveItems).filter(el => !!el);
|
|
167
|
+
}, [parseSubSubRecursiveItems]);
|
|
200
168
|
const parseSubMenuItem = react.useCallback(subItem => {
|
|
201
|
-
const storePath = utils.getSubItemPath(subItem, storeId, isPathnameActive);
|
|
202
169
|
const subItemUrl = utils.getSubItemUrl(subItem, isSiteUrlActive);
|
|
203
|
-
const
|
|
204
|
-
const pathUrl = storePath ? getMenuItemPathUrl(storePath) : null;
|
|
205
|
-
const url = isMicrositeContext ? siteUrl ?? pathUrl : pathUrl ?? siteUrl;
|
|
170
|
+
const url = subItemUrl ? new URL(createSiteUrl(subItemUrl)) : null;
|
|
206
171
|
if (!url) {
|
|
207
172
|
return null;
|
|
208
173
|
}
|
|
@@ -210,8 +175,6 @@ const MenuContextProvider = ({
|
|
|
210
175
|
const subItemActive =
|
|
211
176
|
// Site url is active
|
|
212
177
|
subItem.url && isSiteUrlActive(subItem.url) ||
|
|
213
|
-
// Store path is active
|
|
214
|
-
pathUrl && isPathnameActive(pathUrl.pathname) ||
|
|
215
178
|
// Any child item is active
|
|
216
179
|
subSubItems.some(el => el.active);
|
|
217
180
|
return {
|
|
@@ -223,23 +186,22 @@ const MenuContextProvider = ({
|
|
|
223
186
|
isNew: subItem.isNew,
|
|
224
187
|
icon: subItem.icon,
|
|
225
188
|
mobileIcon: subItem.mobileIcon,
|
|
226
|
-
path: subItem.path,
|
|
227
189
|
invisible: subItem.invisible,
|
|
228
190
|
url: url.toString(),
|
|
229
191
|
active: subItemActive,
|
|
230
192
|
possible: subSubItems.length === 0 || subSubItems.some(item => item.possible),
|
|
231
193
|
items: subSubItems
|
|
232
194
|
};
|
|
233
|
-
}, [
|
|
195
|
+
}, [isSiteUrlActive, createSiteUrl, parseSubSubMenuItems]);
|
|
234
196
|
const parseMenuItem = react.useCallback(item => {
|
|
235
|
-
const subItems = item.items.
|
|
197
|
+
const subItems = item.items.map(parseSubMenuItem).filter(subItem => !!subItem);
|
|
236
198
|
let itemActive = false;
|
|
237
199
|
if (isMicrositeContext &&
|
|
238
200
|
// While SiteId is considered a microsite we don't want url matching for it
|
|
239
201
|
!mapping.GENERIC_SITE_IDS.includes(context) && item.url && item.url[0] === context && item.url[0] !== mapping.SiteId.Store && utils.isPartOfUrlPathname(currentPathname, item.url[1])) {
|
|
240
202
|
itemActive = true;
|
|
241
203
|
}
|
|
242
|
-
const url = isMicrositeContext && item.url ? createSiteUrl(item.url) :
|
|
204
|
+
const url = isMicrositeContext && item.url ? createSiteUrl(item.url) :
|
|
243
205
|
// TODO: maybe need to improve to get first "available" child not the first form array, not sure if the
|
|
244
206
|
// parseItemsFn filters them already out
|
|
245
207
|
utils.findFirstPossibleDeepNestedItemUrl(subItems) ?? (item.url && createSiteUrl(item.url) || item.fallbackUrl && createSiteUrl(item.fallbackUrl) || storeBaseUrl.toString());
|
|
@@ -250,15 +212,13 @@ const MenuContextProvider = ({
|
|
|
250
212
|
active: itemActive || subItems.some(subItem => subItem.active),
|
|
251
213
|
possible: subItems.length === 0 || subItems.some(item2 => item2.possible)
|
|
252
214
|
};
|
|
253
|
-
}, [
|
|
215
|
+
}, [parseSubMenuItem, isMicrositeContext, context, currentPathname, createSiteUrl, storeBaseUrl]);
|
|
254
216
|
const navigation = react.useMemo(() => {
|
|
255
217
|
const parseItemsFn = items => items.map(parseMenuItem);
|
|
256
218
|
const parseSection = sectionType => {
|
|
257
219
|
const section = mapping.NAVIGATION_MAPPING[sectionType];
|
|
258
220
|
const parsedItems = parseItemsFn(section.items ?? []);
|
|
259
|
-
const
|
|
260
|
-
const siteUrl = section.url ? createSiteUrl(section.url) : null;
|
|
261
|
-
const url = isMicrositeContext ? siteUrl ?? pathUrl : pathUrl ?? siteUrl;
|
|
221
|
+
const url = section.url ? createSiteUrl(section.url) : null;
|
|
262
222
|
const finalUrl = url ||
|
|
263
223
|
// TODO: maybe need to improve to get first "available" child not the first form array, not sure if the
|
|
264
224
|
// parseItemsFn filters them already out
|
|
@@ -283,7 +243,7 @@ const MenuContextProvider = ({
|
|
|
283
243
|
primary,
|
|
284
244
|
secondary
|
|
285
245
|
};
|
|
286
|
-
}, [parseMenuItem,
|
|
246
|
+
}, [parseMenuItem, createSiteUrl, storeBaseUrl]);
|
|
287
247
|
const activeNavigationSectionType = react.useMemo(() => {
|
|
288
248
|
if (navigation.primary.active) {
|
|
289
249
|
return "primary";
|