cja-phoenix 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cja-phoenix.es.js +3816 -4306
- package/dist/style.css +1 -0
- package/dist/types/components/composite/CheckoutCrossSell.vue.d.ts +29 -0
- package/dist/types/components/composite/CheckoutLayout.vue.d.ts +23 -0
- package/dist/types/components/composite/CheckoutMilestones.vue.d.ts +16 -0
- package/dist/types/components/composite/CjaFooter.vue.d.ts +34 -0
- package/dist/types/components/composite/CjaMenuBar.vue.d.ts +52 -0
- package/dist/types/components/composite/FunnelLayout.vue.d.ts +35 -0
- package/dist/types/components/composite/FunnelSubmit.vue.d.ts +26 -0
- package/dist/types/components/composite/FunnelSummary.vue.d.ts +77 -0
- package/dist/types/components/composite/FunnelTitle.vue.d.ts +19 -0
- package/dist/types/components/composite/InfoShowcase.vue.d.ts +25 -0
- package/dist/types/components/composite/JourneyMacroSteps.vue.d.ts +16 -0
- package/dist/types/components/composite/ResultsSidebar.vue.d.ts +9 -0
- package/dist/types/components/forms/CheckboxInput.vue.d.ts +41 -0
- package/dist/types/components/forms/CurrencyInput.vue.d.ts +65 -0
- package/dist/types/components/forms/FileInput.vue.d.ts +89 -0
- package/dist/types/components/forms/NumberInput.vue.d.ts +58 -0
- package/dist/types/components/forms/PhoneInput.vue.d.ts +69 -0
- package/dist/types/components/forms/RadioInput.vue.d.ts +43 -0
- package/dist/types/components/forms/RadioInputList.vue.d.ts +65 -0
- package/dist/types/components/forms/SelectInput.vue.d.ts +80 -0
- package/dist/types/components/forms/SelectionTiles.vue.d.ts +51 -0
- package/dist/types/components/forms/TextInput.vue.d.ts +76 -0
- package/dist/types/components/forms/TileCheckboxInput.vue.d.ts +23 -0
- package/dist/types/components/forms/ToggleInput.vue.d.ts +51 -0
- package/dist/types/components/forms/structure/InputContainer.vue.d.ts +22 -0
- package/dist/types/components/forms/structure/InputError.vue.d.ts +15 -0
- package/dist/types/components/forms/structure/InputTitle.vue.d.ts +21 -0
- package/dist/types/components/structural/CjaButton.vue.d.ts +59 -0
- package/dist/types/components/structural/CollapseContainer.vue.d.ts +51 -0
- package/dist/{components → types/components}/structural/ContentTabs.vue.d.ts +17 -20
- package/dist/types/components/structural/FixedContainer.vue.d.ts +68 -0
- package/dist/types/components/structural/GridContainer.vue.d.ts +36 -0
- package/dist/types/components/structural/GridItem.vue.d.ts +26 -0
- package/dist/types/components/structural/InfoMessage.vue.d.ts +30 -0
- package/dist/types/components/structural/LoadingSpinner.vue.d.ts +17 -0
- package/dist/types/components/structural/Modal.vue.d.ts +65 -0
- package/dist/types/components/structural/Scaffold.vue.d.ts +9 -0
- package/dist/types/index.d.ts +16 -7
- package/dist/types/stories/CjaButton.story.vue.d.ts +2 -0
- package/dist/types/stories/ContentTabs.story.vue.d.ts +2 -0
- package/dist/types/stories/Modal.story.vue.d.ts +2 -0
- package/dist/types/stories/RadioInputList.story.vue.d.ts +2 -0
- package/dist/types/{Router.d.ts → types/Router.d.ts} +1 -0
- package/dist/types/types/index.d.ts +7 -0
- package/dist/{utils → types/utils}/formValidations.d.ts +3 -0
- package/package.json +21 -30
- package/src/assets/backdrop.scss +10 -0
- package/src/assets/breakpoints.scss +12 -0
- package/src/assets/fonts.scss +1 -0
- package/src/assets/forms.scss +97 -0
- package/src/assets/grid.scss +14 -0
- package/src/assets/iconia/Read Me.txt +7 -0
- package/src/assets/iconia/demo-files/demo.css +155 -0
- package/src/assets/iconia/demo-files/demo.js +30 -0
- package/src/assets/iconia/demo.html +7055 -0
- package/src/assets/iconia/fonts/CGG-icomoon.eot +0 -0
- package/src/assets/iconia/fonts/CGG-icomoon.svg +513 -0
- package/src/assets/iconia/fonts/CGG-icomoon.ttf +0 -0
- package/src/assets/iconia/fonts/CGG-icomoon.woff +0 -0
- package/src/assets/iconia/selection.json +1 -0
- package/src/assets/iconia/style.css +1547 -0
- package/src/assets/iconia/style.scss +2556 -0
- package/src/assets/iconia/variables.scss +507 -0
- package/src/assets/main.scss +30 -0
- package/src/assets/radioOld.scss +52 -0
- package/src/assets/shadows.scss +3 -0
- package/src/assets/tippy.scss +45 -0
- package/src/assets/vars/development.scss +4 -0
- package/src/assets/vars/production.scss +4 -0
- package/src/components/composite/CheckoutCrossSell.vue +478 -0
- package/src/components/composite/CheckoutLayout.vue +59 -0
- package/src/components/composite/CheckoutMilestones.vue +161 -0
- package/src/components/composite/CjaFooter.vue +223 -0
- package/src/components/composite/CjaMenuBar.vue +543 -0
- package/src/components/composite/FunnelLayout.vue +197 -0
- package/src/components/composite/FunnelSubmit.vue +53 -0
- package/src/components/composite/FunnelSummary.vue +198 -0
- package/src/components/composite/FunnelTitle.vue +59 -0
- package/src/components/composite/InfoShowcase.vue +87 -0
- package/src/components/composite/JourneyMacroSteps.vue +104 -0
- package/src/components/composite/ProductDetails.vue +149 -0
- package/src/components/composite/ResultsLayout.vue +156 -0
- package/src/components/composite/ResultsSidebar.vue +74 -0
- package/src/components/forms/CheckboxInput.vue +103 -0
- package/src/components/forms/CurrencyInput.vue +126 -0
- package/src/components/forms/FileInput.vue +250 -0
- package/src/components/forms/NumberInput.vue +165 -0
- package/src/components/forms/PhoneInput.vue +122 -0
- package/src/components/forms/RadioInput.vue +98 -0
- package/src/components/forms/RadioInputList.vue +156 -0
- package/src/components/forms/SelectInput.vue +392 -0
- package/src/components/forms/SelectionTiles.vue +196 -0
- package/src/components/forms/TextInput.vue +144 -0
- package/src/components/forms/TileCheckboxInput.vue +96 -0
- package/src/components/forms/ToggleInput.vue +88 -0
- package/src/components/forms/structure/InputContainer.vue +28 -0
- package/src/components/forms/structure/InputError.vue +26 -0
- package/src/components/forms/structure/InputTitle.vue +52 -0
- package/src/components/index.ts +73 -0
- package/src/components/structural/CjaButton.vue +332 -0
- package/src/components/structural/CollapseContainer.vue +141 -0
- package/src/components/structural/ContentTabs.vue +105 -0
- package/src/components/structural/FixedContainer.vue +107 -0
- package/src/components/structural/GridContainer.vue +70 -0
- package/src/components/structural/GridItem.vue +47 -0
- package/src/components/structural/InfoMessage.vue +105 -0
- package/src/components/structural/LoadingSpinner.vue +39 -0
- package/src/components/structural/Modal.vue +209 -0
- package/src/components/structural/Scaffold.vue +3 -0
- package/src/constants/MyConstants.ts +1 -0
- package/src/constants/index.ts +5 -0
- package/src/env.d.ts +11 -0
- package/src/index.ts +31 -0
- package/src/stories/CjaButton.story.vue +192 -0
- package/src/stories/ContentTabs.story.vue +59 -0
- package/src/stories/Modal.story.vue +127 -0
- package/src/stories/RadioInputList.story.vue +61 -0
- package/src/types/CheckoutMilestone.ts +5 -0
- package/src/types/Footer.ts +17 -0
- package/src/types/Menu.ts +19 -0
- package/src/types/RadioOption.ts +7 -0
- package/src/types/Router.ts +19 -0
- package/src/types/SelectOption.ts +6 -0
- package/src/types/StoreDataValue.ts +12 -0
- package/src/types/Storyblok.ts +10 -0
- package/src/types/TileOption.ts +8 -0
- package/src/types/index.ts +19 -0
- package/src/utils/cjaRouter.ts +74 -0
- package/src/utils/cjaStore.ts +43 -0
- package/src/utils/findScrollAncestor.ts +16 -0
- package/src/utils/formValidations.ts +192 -0
- package/src/utils/generateRoutes.ts +36 -0
- package/src/utils/getFromUrl.ts +25 -0
- package/src/utils/getMessages.ts +23 -0
- package/src/utils/gtm.ts +158 -0
- package/src/utils/index.ts +31 -0
- package/src/utils/jsonReviver.ts +20 -0
- package/src/utils/storyblokLink.ts +4 -0
- package/src/utils/updateForm.ts +40 -0
- package/src/utils/uploadFile.ts +25 -0
- package/src/utils/useGlobalProperties.ts +11 -0
- package/src/utils/useViewportDetector.ts +35 -0
- package/dist/cja-phoenix.cjs.js +0 -44
- package/dist/cja-phoenix.d.ts +0 -3
- package/dist/cja-phoenix.umd.js +0 -45
- package/dist/components/composite/CheckoutCrossSell.vue.d.ts +0 -36
- package/dist/components/composite/CheckoutLayout.vue.d.ts +0 -20
- package/dist/components/composite/CheckoutMilestones.vue.d.ts +0 -13
- package/dist/components/composite/CjaFooter.vue.d.ts +0 -29
- package/dist/components/composite/CjaMenuBar.vue.d.ts +0 -53
- package/dist/components/composite/FunnelLayout.vue.d.ts +0 -38
- package/dist/components/composite/FunnelSubmit.vue.d.ts +0 -25
- package/dist/components/composite/FunnelSummary.vue.d.ts +0 -76
- package/dist/components/composite/FunnelTitle.vue.d.ts +0 -24
- package/dist/components/composite/InfoShowcase.vue.d.ts +0 -28
- package/dist/components/composite/JourneyMacroSteps.vue.d.ts +0 -13
- package/dist/components/forms/CheckboxInput.vue.d.ts +0 -38
- package/dist/components/forms/CurrencyInput.vue.d.ts +0 -92
- package/dist/components/forms/FileInput.vue.d.ts +0 -118
- package/dist/components/forms/NumberInput.vue.d.ts +0 -73
- package/dist/components/forms/PhoneInput.vue.d.ts +0 -104
- package/dist/components/forms/RadioInputList.vue.d.ts +0 -96
- package/dist/components/forms/SelectInput.vue.d.ts +0 -121
- package/dist/components/forms/SelectionTiles.vue.d.ts +0 -64
- package/dist/components/forms/TextInput.vue.d.ts +0 -127
- package/dist/components/forms/TileCheckboxInput.vue.d.ts +0 -34
- package/dist/components/forms/ToggleInput.vue.d.ts +0 -70
- package/dist/components/forms/structure/InputContainer.vue.d.ts +0 -17
- package/dist/components/forms/structure/InputError.vue.d.ts +0 -12
- package/dist/components/forms/structure/InputTitle.vue.d.ts +0 -30
- package/dist/components/structural/CjaButton.vue.d.ts +0 -66
- package/dist/components/structural/CollapseContainer.vue.d.ts +0 -40
- package/dist/components/structural/FixedContainer.vue.d.ts +0 -69
- package/dist/components/structural/GridContainer.vue.d.ts +0 -21
- package/dist/components/structural/GridItem.vue.d.ts +0 -29
- package/dist/components/structural/InfoMessage.vue.d.ts +0 -39
- package/dist/components/structural/LoadingSpinner.vue.d.ts +0 -16
- package/dist/components/structural/Modal.vue.d.ts +0 -50
- package/dist/components/structural/Scaffold.vue.d.ts +0 -3
- package/dist/components/structural/Scaffold.vue.d.ts.map +0 -1
- package/dist/index.d.ts +0 -14
- package/dist/src/components/composite/CheckoutCrossSell.vue.d.ts +0 -5
- package/dist/src/components/composite/CheckoutCrossSell.vue.d.ts.map +0 -1
- package/dist/src/components/composite/CheckoutLayout.vue.d.ts +0 -5
- package/dist/src/components/composite/CheckoutLayout.vue.d.ts.map +0 -1
- package/dist/src/components/composite/CheckoutMilestones.vue.d.ts +0 -5
- package/dist/src/components/composite/CheckoutMilestones.vue.d.ts.map +0 -1
- package/dist/src/components/composite/CjaFooter.vue.d.ts +0 -5
- package/dist/src/components/composite/CjaFooter.vue.d.ts.map +0 -1
- package/dist/src/components/composite/CjaMenuBar.vue.d.ts +0 -5
- package/dist/src/components/composite/CjaMenuBar.vue.d.ts.map +0 -1
- package/dist/src/components/composite/FunnelLayout.vue.d.ts +0 -5
- package/dist/src/components/composite/FunnelLayout.vue.d.ts.map +0 -1
- package/dist/src/components/composite/FunnelSubmit.vue.d.ts +0 -5
- package/dist/src/components/composite/FunnelSubmit.vue.d.ts.map +0 -1
- package/dist/src/components/composite/FunnelSummary.vue.d.ts +0 -5
- package/dist/src/components/composite/FunnelSummary.vue.d.ts.map +0 -1
- package/dist/src/components/composite/FunnelTitle.vue.d.ts +0 -5
- package/dist/src/components/composite/FunnelTitle.vue.d.ts.map +0 -1
- package/dist/src/components/composite/InfoShowcase.vue.d.ts +0 -5
- package/dist/src/components/composite/InfoShowcase.vue.d.ts.map +0 -1
- package/dist/src/components/composite/JourneyMacroSteps.vue.d.ts +0 -5
- package/dist/src/components/composite/JourneyMacroSteps.vue.d.ts.map +0 -1
- package/dist/src/components/composite/ProductDetails.vue.d.ts +0 -5
- package/dist/src/components/composite/ProductDetails.vue.d.ts.map +0 -1
- package/dist/src/components/composite/ResultsLayout.vue.d.ts +0 -5
- package/dist/src/components/composite/ResultsLayout.vue.d.ts.map +0 -1
- package/dist/src/components/forms/CheckboxInput.vue.d.ts +0 -5
- package/dist/src/components/forms/CheckboxInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/CurrencyInput.vue.d.ts +0 -5
- package/dist/src/components/forms/CurrencyInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/FileInput.vue.d.ts +0 -5
- package/dist/src/components/forms/FileInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/NumberInput.vue.d.ts +0 -5
- package/dist/src/components/forms/NumberInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/PhoneInput.vue.d.ts +0 -5
- package/dist/src/components/forms/PhoneInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/RadioInputList.vue.d.ts +0 -5
- package/dist/src/components/forms/RadioInputList.vue.d.ts.map +0 -1
- package/dist/src/components/forms/SelectInput.vue.d.ts +0 -5
- package/dist/src/components/forms/SelectInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/SelectionTiles.vue.d.ts +0 -5
- package/dist/src/components/forms/SelectionTiles.vue.d.ts.map +0 -1
- package/dist/src/components/forms/TextInput.vue.d.ts +0 -5
- package/dist/src/components/forms/TextInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/TileCheckboxInput.vue.d.ts +0 -5
- package/dist/src/components/forms/TileCheckboxInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/ToggleInput.vue.d.ts +0 -5
- package/dist/src/components/forms/ToggleInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/structure/InputContainer.vue.d.ts +0 -5
- package/dist/src/components/forms/structure/InputContainer.vue.d.ts.map +0 -1
- package/dist/src/components/forms/structure/InputError.vue.d.ts +0 -5
- package/dist/src/components/forms/structure/InputError.vue.d.ts.map +0 -1
- package/dist/src/components/forms/structure/InputTitle.vue.d.ts +0 -5
- package/dist/src/components/forms/structure/InputTitle.vue.d.ts.map +0 -1
- package/dist/src/components/structural/CjaButton.vue.d.ts +0 -5
- package/dist/src/components/structural/CjaButton.vue.d.ts.map +0 -1
- package/dist/src/components/structural/CollapseContainer.vue.d.ts +0 -5
- package/dist/src/components/structural/CollapseContainer.vue.d.ts.map +0 -1
- package/dist/src/components/structural/ContentTabs.vue.d.ts +0 -5
- package/dist/src/components/structural/ContentTabs.vue.d.ts.map +0 -1
- package/dist/src/components/structural/FixedContainer.vue.d.ts +0 -5
- package/dist/src/components/structural/FixedContainer.vue.d.ts.map +0 -1
- package/dist/src/components/structural/GridContainer.vue.d.ts +0 -5
- package/dist/src/components/structural/GridContainer.vue.d.ts.map +0 -1
- package/dist/src/components/structural/GridItem.vue.d.ts +0 -5
- package/dist/src/components/structural/GridItem.vue.d.ts.map +0 -1
- package/dist/src/components/structural/InfoMessage.vue.d.ts +0 -5
- package/dist/src/components/structural/InfoMessage.vue.d.ts.map +0 -1
- package/dist/src/components/structural/LoadingSpinner.vue.d.ts +0 -5
- package/dist/src/components/structural/LoadingSpinner.vue.d.ts.map +0 -1
- package/dist/src/components/structural/Modal.vue.d.ts +0 -5
- package/dist/src/components/structural/Modal.vue.d.ts.map +0 -1
- package/dist/styles.css +0 -1
- /package/dist/{components → types/components}/composite/ProductDetails.vue.d.ts +0 -0
- /package/dist/{components → types/components}/composite/ResultsLayout.vue.d.ts +0 -0
- /package/dist/{components → types/components}/index.d.ts +0 -0
- /package/dist/{constants → types/constants}/MyConstants.d.ts +0 -0
- /package/dist/{constants → types/constants}/index.d.ts +0 -0
- /package/dist/types/{CheckoutMilestone.d.ts → types/CheckoutMilestone.d.ts} +0 -0
- /package/dist/types/{Footer.d.ts → types/Footer.d.ts} +0 -0
- /package/dist/types/{Menu.d.ts → types/Menu.d.ts} +0 -0
- /package/dist/types/{RadioOption.d.ts → types/RadioOption.d.ts} +0 -0
- /package/dist/types/{SelectOption.d.ts → types/SelectOption.d.ts} +0 -0
- /package/dist/types/{StoreDataValue.d.ts → types/StoreDataValue.d.ts} +0 -0
- /package/dist/types/{Storyblok.d.ts → types/Storyblok.d.ts} +0 -0
- /package/dist/types/{TileOption.d.ts → types/TileOption.d.ts} +0 -0
- /package/dist/{utils → types/utils}/cjaRouter.d.ts +0 -0
- /package/dist/{utils → types/utils}/cjaStore.d.ts +0 -0
- /package/dist/{utils → types/utils}/findScrollAncestor.d.ts +0 -0
- /package/dist/{utils → types/utils}/generateRoutes.d.ts +0 -0
- /package/dist/{utils → types/utils}/getFromUrl.d.ts +0 -0
- /package/dist/{utils → types/utils}/getMessages.d.ts +0 -0
- /package/dist/{utils → types/utils}/gtm.d.ts +0 -0
- /package/dist/{utils → types/utils}/index.d.ts +0 -0
- /package/dist/{utils → types/utils}/jsonReviver.d.ts +0 -0
- /package/dist/{utils → types/utils}/storyblokLink.d.ts +0 -0
- /package/dist/{utils → types/utils}/updateForm.d.ts +0 -0
- /package/dist/{utils → types/utils}/uploadFile.d.ts +0 -0
- /package/dist/{utils → types/utils}/useGlobalProperties.d.ts +0 -0
- /package/dist/{utils → types/utils}/useViewportDetector.d.ts +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="[`grid-container-${size}`]">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
withDefaults(
|
|
9
|
+
defineProps<{
|
|
10
|
+
size?: 1 | 2 | 3;
|
|
11
|
+
}>(),
|
|
12
|
+
{
|
|
13
|
+
size: 1,
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<style lang="scss" scoped>
|
|
19
|
+
@import "../../assets/breakpoints.scss";
|
|
20
|
+
@import "../../assets/grid.scss";
|
|
21
|
+
|
|
22
|
+
.grid-container-1,
|
|
23
|
+
.grid-container-2,
|
|
24
|
+
.grid-container-3 {
|
|
25
|
+
display: grid;
|
|
26
|
+
column-gap: $grid-column-gap-sm;
|
|
27
|
+
padding-left: $grid-side-padding-sm;
|
|
28
|
+
padding-right: $grid-side-padding-sm;
|
|
29
|
+
|
|
30
|
+
@media screen and (min-width: $break-md-min) and (max-width: $break-md-max) {
|
|
31
|
+
grid-template-columns: $grid-columns-md;
|
|
32
|
+
column-gap: $grid-column-gap-md;
|
|
33
|
+
padding-left: $grid-side-padding-md;
|
|
34
|
+
padding-right: $grid-side-padding-md;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media screen and (min-width: 1024px) {
|
|
38
|
+
grid-template-columns: $grid-columns-lg;
|
|
39
|
+
column-gap: $grid-column-gap-lg;
|
|
40
|
+
padding-left: $grid-side-padding-lg;
|
|
41
|
+
padding-right: $grid-side-padding-lg;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media screen and (min-width: 1200px) {
|
|
45
|
+
padding-left: $grid-side-padding-xl;
|
|
46
|
+
padding-right: $grid-side-padding-xl;
|
|
47
|
+
max-width: 1440px;
|
|
48
|
+
margin-left: auto;
|
|
49
|
+
margin-right: auto;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.grid-container-1 {
|
|
54
|
+
@media screen and (max-width: 767px) {
|
|
55
|
+
grid-template-columns: $grid-columns-sm-1;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.grid-container-2 {
|
|
60
|
+
@media screen and (max-width: 767px) {
|
|
61
|
+
grid-template-columns: $grid-columns-sm-2;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.grid-container-3 {
|
|
66
|
+
@media screen and (max-width: 767px) {
|
|
67
|
+
grid-template-columns: $grid-columns-sm-3;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="{
|
|
4
|
+
[`grid-item-sm-${sizeSm}`]: sizeSm,
|
|
5
|
+
[`grid-item-md-${sizeMd}`]: sizeMd,
|
|
6
|
+
[`grid-item-lg-${sizeLg}`]: sizeLg,
|
|
7
|
+
}"
|
|
8
|
+
>
|
|
9
|
+
<slot></slot>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script lang="ts" setup>
|
|
14
|
+
defineProps<{
|
|
15
|
+
sizeSm?: 1 | 2 | 3 | 4;
|
|
16
|
+
sizeMd?: 1 | 2 | 3 | 4;
|
|
17
|
+
sizeLg?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
18
|
+
}>();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
@import "../../assets/breakpoints.scss";
|
|
23
|
+
|
|
24
|
+
@for $i from 0 to 4 {
|
|
25
|
+
.grid-item-sm-#{$i + 1} {
|
|
26
|
+
@media screen and (max-width: 767px) {
|
|
27
|
+
grid-column: span #{$i + 1};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@for $i from 0 to 4 {
|
|
33
|
+
.grid-item-md-#{$i + 1} {
|
|
34
|
+
@media screen and (min-width: $break-md-min) and (max-width: $break-md-max) {
|
|
35
|
+
grid-column: span #{$i + 1};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@for $i from 0 to 12 {
|
|
41
|
+
.grid-item-lg-#{$i + 1} {
|
|
42
|
+
@media screen and (min-width: 1024px) {
|
|
43
|
+
grid-column: span #{$i + 1};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="info-message"
|
|
4
|
+
:class="[
|
|
5
|
+
`color-${color}`,
|
|
6
|
+
{ 'has-icon': $slots.icon, 'has-toggle': toggle },
|
|
7
|
+
]"
|
|
8
|
+
>
|
|
9
|
+
<slot name="icon"></slot>
|
|
10
|
+
<div class="text-container">
|
|
11
|
+
<h4 v-if="title">{{ title }}</h4>
|
|
12
|
+
<p v-if="description" v-html="description"></p>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="btn-container" v-if="toggle">
|
|
15
|
+
<button class="m-cgg-icon--cross2" @click="$emit('btn:close')"></button>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script lang="ts" setup>
|
|
21
|
+
import { useViewportDetector } from "../../utils";
|
|
22
|
+
|
|
23
|
+
defineProps<{
|
|
24
|
+
title?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
toggle?: boolean;
|
|
27
|
+
color: "blue" | "green";
|
|
28
|
+
}>();
|
|
29
|
+
|
|
30
|
+
const { activeViewport } = useViewportDetector();
|
|
31
|
+
|
|
32
|
+
defineEmits(["btn:close"]);
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<style lang="scss" scoped>
|
|
36
|
+
@import "../../assets/breakpoints.scss";
|
|
37
|
+
|
|
38
|
+
.info-message {
|
|
39
|
+
display: grid;
|
|
40
|
+
grid-template-columns: 1fr;
|
|
41
|
+
gap: 16px;
|
|
42
|
+
padding: 8px 16px;
|
|
43
|
+
border: 2px solid #000;
|
|
44
|
+
border-radius: 16px;
|
|
45
|
+
|
|
46
|
+
@media screen and (min-width: $break-md-min) {
|
|
47
|
+
padding: 16px 24px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.has-icon {
|
|
51
|
+
grid-template-columns: auto 1fr;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.has-toggle {
|
|
55
|
+
grid-template-columns: 1fr 18px;
|
|
56
|
+
|
|
57
|
+
&.has-icon {
|
|
58
|
+
grid-template-columns: auto 1fr 18px;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.color-green {
|
|
63
|
+
background-color: #f8faf5;
|
|
64
|
+
border-color: #c4dab1;
|
|
65
|
+
color: #56924b;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.color-blue {
|
|
69
|
+
background-color: #f4f9fc;
|
|
70
|
+
border-color: #076b9c;
|
|
71
|
+
color: #076b9c;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.text-container {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
gap: 16px;
|
|
78
|
+
|
|
79
|
+
h4 {
|
|
80
|
+
font-weight: 700;
|
|
81
|
+
font-size: 16px;
|
|
82
|
+
line-height: 20px;
|
|
83
|
+
margin: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
p {
|
|
87
|
+
font-size: 13px;
|
|
88
|
+
line-height: 17px;
|
|
89
|
+
margin: 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.btn-container {
|
|
94
|
+
button {
|
|
95
|
+
padding: 0;
|
|
96
|
+
border: none;
|
|
97
|
+
font-size: 18px;
|
|
98
|
+
line-height: 18px;
|
|
99
|
+
color: inherit;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
background: none;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="spinner"
|
|
4
|
+
:style="{
|
|
5
|
+
width: `${size}px`,
|
|
6
|
+
height: `${size}px`,
|
|
7
|
+
borderWidth: `${border}px`,
|
|
8
|
+
}"
|
|
9
|
+
></div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts" setup>
|
|
13
|
+
defineProps<{
|
|
14
|
+
size?: number;
|
|
15
|
+
border?: number;
|
|
16
|
+
}>();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<style lang="scss" scoped>
|
|
20
|
+
.spinner {
|
|
21
|
+
width: 80px;
|
|
22
|
+
height: 80px;
|
|
23
|
+
border: 7px solid #b5e187;
|
|
24
|
+
border-top: 7px solid rgba(255, 255, 255, 0.2);
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
animation: spin 1s infinite;
|
|
27
|
+
animation-timing-function: linear;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@keyframes spin {
|
|
31
|
+
from {
|
|
32
|
+
transform: rotate(0deg);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
to {
|
|
36
|
+
transform: rotate(360deg);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Teleport to="body">
|
|
3
|
+
<Transition name="fade">
|
|
4
|
+
<div v-show="active" class="modal-backdrop" :style="{ ...cssVars }">
|
|
5
|
+
<div class="modal-overlay" @click.self="closeModal">
|
|
6
|
+
<div class="modal-container" ref="modalContainer">
|
|
7
|
+
<div class="modal-header" :class="{ 'has-title': $slots.header }">
|
|
8
|
+
<div class="modal-header-wrapper">
|
|
9
|
+
<slot name="header"></slot>
|
|
10
|
+
</div>
|
|
11
|
+
<button
|
|
12
|
+
type="button"
|
|
13
|
+
class="btn-close m-cgg-icon--cross"
|
|
14
|
+
aria-label="Close"
|
|
15
|
+
@click="closeModal"
|
|
16
|
+
></button>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="modal-body">
|
|
19
|
+
<slot name="body"></slot>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="modal-footer" v-if="$slots.footer">
|
|
22
|
+
<slot name="footer"></slot>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</Transition>
|
|
28
|
+
</Teleport>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script lang="ts" setup>
|
|
32
|
+
import { ref, watch, computed } from "vue";
|
|
33
|
+
|
|
34
|
+
const props = withDefaults(
|
|
35
|
+
defineProps<{
|
|
36
|
+
maxWidth?: {
|
|
37
|
+
md?: string;
|
|
38
|
+
lg?: string;
|
|
39
|
+
xl?: string;
|
|
40
|
+
};
|
|
41
|
+
}>(),
|
|
42
|
+
{
|
|
43
|
+
maxWidth: () => ({
|
|
44
|
+
md: "min(calc(100% - 48px), 768px)",
|
|
45
|
+
lg: "min(calc(100% - 48px), 1024px)",
|
|
46
|
+
xl: "1024px",
|
|
47
|
+
}),
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const active = ref(false);
|
|
52
|
+
const modalContainer = ref();
|
|
53
|
+
|
|
54
|
+
const cssVars = computed(() => ({
|
|
55
|
+
"--md-max-width": props.maxWidth.md,
|
|
56
|
+
"--lg-max-width": props.maxWidth.lg,
|
|
57
|
+
"--xl-max-width": props.maxWidth.xl,
|
|
58
|
+
}));
|
|
59
|
+
|
|
60
|
+
const emit = defineEmits(["close"]);
|
|
61
|
+
|
|
62
|
+
watch(
|
|
63
|
+
() => active.value,
|
|
64
|
+
(active) => {
|
|
65
|
+
document.querySelectorAll("html, body").forEach((el) => {
|
|
66
|
+
(el as HTMLElement).style.overflow = active ? "hidden" : "";
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
const openModal = () => {
|
|
72
|
+
active.value = true;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const closeModal = () => {
|
|
76
|
+
active.value = false;
|
|
77
|
+
emit("close");
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const toggleModal = () => {
|
|
81
|
+
active.value = !active.value;
|
|
82
|
+
|
|
83
|
+
if (!active.value) {
|
|
84
|
+
emit("close");
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
defineExpose({ active, openModal, closeModal, toggleModal });
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
<style lang="scss" scoped>
|
|
92
|
+
@import "../../assets/breakpoints.scss";
|
|
93
|
+
@import "../../assets/backdrop.scss";
|
|
94
|
+
|
|
95
|
+
.modal-backdrop {
|
|
96
|
+
@include backdrop;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.modal-overlay {
|
|
100
|
+
position: fixed;
|
|
101
|
+
top: 0;
|
|
102
|
+
left: 0;
|
|
103
|
+
width: 100%;
|
|
104
|
+
height: 100%;
|
|
105
|
+
z-index: 13;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.modal-container {
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: 0;
|
|
111
|
+
left: 0;
|
|
112
|
+
height: 100%;
|
|
113
|
+
background: #ffffff;
|
|
114
|
+
padding: 20px;
|
|
115
|
+
width: 100%;
|
|
116
|
+
box-sizing: border-box;
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
gap: 16px;
|
|
120
|
+
|
|
121
|
+
@media screen and (min-width: $break-md-min) {
|
|
122
|
+
top: 50%;
|
|
123
|
+
left: 50%;
|
|
124
|
+
transform: translateY(-50%) translateX(-50%);
|
|
125
|
+
max-width: var(--md-max-width);
|
|
126
|
+
max-height: calc(100% - 48px);
|
|
127
|
+
border-radius: 8px;
|
|
128
|
+
padding: 20px 40px;
|
|
129
|
+
height: auto;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@media screen and (min-width: $break-lg-min) {
|
|
133
|
+
max-width: var(--lg-max-width);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media screen and (min-width: $break-xl-min) {
|
|
137
|
+
max-width: var(--xl-max-width);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.modal-header {
|
|
141
|
+
display: grid;
|
|
142
|
+
grid-template-columns: 1fr 20px;
|
|
143
|
+
padding: 0;
|
|
144
|
+
|
|
145
|
+
&:before,
|
|
146
|
+
&:after {
|
|
147
|
+
content: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&.has-title {
|
|
151
|
+
padding: 0 0 8px 0;
|
|
152
|
+
border-bottom: 1px solid #dedede;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.modal-header-wrapper {
|
|
156
|
+
font-size: 16px;
|
|
157
|
+
line-height: 20px;
|
|
158
|
+
font-weight: 700;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.btn-close {
|
|
162
|
+
background: none;
|
|
163
|
+
border: none;
|
|
164
|
+
padding: 0;
|
|
165
|
+
outline: 0;
|
|
166
|
+
height: 20px;
|
|
167
|
+
width: 20px;
|
|
168
|
+
cursor: pointer;
|
|
169
|
+
z-index: 2;
|
|
170
|
+
font-size: 16px;
|
|
171
|
+
line-height: 20px;
|
|
172
|
+
|
|
173
|
+
&:focus {
|
|
174
|
+
outline: 0;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.modal-body {
|
|
180
|
+
font-size: 14px;
|
|
181
|
+
line-height: 18px;
|
|
182
|
+
overflow-y: auto;
|
|
183
|
+
flex-grow: 1;
|
|
184
|
+
height: auto;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.modal-footer {
|
|
188
|
+
border-top: 1px solid #dedede;
|
|
189
|
+
padding: 8px 0 0;
|
|
190
|
+
|
|
191
|
+
:deep(.button-container) {
|
|
192
|
+
display: flex;
|
|
193
|
+
flex-direction: row;
|
|
194
|
+
justify-content: flex-end;
|
|
195
|
+
gap: 8px;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.fade-enter-from,
|
|
201
|
+
.fade-leave-to {
|
|
202
|
+
opacity: 0;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.fade-enter-to,
|
|
206
|
+
.fade-leave-from {
|
|
207
|
+
opacity: 1;
|
|
208
|
+
}
|
|
209
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const MAGIC_NUM = 100
|
package/src/env.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
/// <reference types="@histoire/plugin-vue/components" />
|
|
3
|
+
|
|
4
|
+
export {};
|
|
5
|
+
|
|
6
|
+
declare module "*.vue" {
|
|
7
|
+
import { DefineComponent } from "vue";
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
9
|
+
const component: DefineComponent<{}, {}, any>;
|
|
10
|
+
export default component;
|
|
11
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { App } from "vue";
|
|
2
|
+
import * as components from "./components";
|
|
3
|
+
import VueTippy from "vue-tippy";
|
|
4
|
+
import "./assets/main.scss";
|
|
5
|
+
import "./assets/iconia/style.scss";
|
|
6
|
+
|
|
7
|
+
type Options = {
|
|
8
|
+
apiURL: string;
|
|
9
|
+
imageURL: string;
|
|
10
|
+
providerImageURL: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const install = (app: App, options: Options) => {
|
|
14
|
+
app.config.globalProperties.apiURL = options.apiURL;
|
|
15
|
+
app.config.globalProperties.imageURL = options.imageURL;
|
|
16
|
+
app.config.globalProperties.providerImageURL = options.providerImageURL;
|
|
17
|
+
|
|
18
|
+
for (const key in components) {
|
|
19
|
+
app.component(key, components[key]);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
app.use(VueTippy, {
|
|
23
|
+
defaultProps: { theme: "light-border", allowHTML: true },
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default { install };
|
|
28
|
+
export * from "./types";
|
|
29
|
+
export * from "./components";
|
|
30
|
+
export * from "./constants";
|
|
31
|
+
export * from "./utils";
|