@bethinkpl/design-system 15.2.1 → 16.0.0
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/.eslintrc.js +4 -0
- package/.storybook/main.js +16 -8
- package/dist/demo.html +1 -8
- package/dist/design-system.umd.js +18210 -16610
- package/dist/design-system.umd.js.map +1 -1
- package/dist/lib/js/components/Badges/Badge/Badge.stories.d.ts +4 -39
- package/dist/lib/js/components/Badges/BadgeScore/BadgeScore.stories.d.ts +3 -108
- package/dist/lib/js/components/Badges/BadgeScore/BadgeScore.vue.d.ts +3 -46
- package/dist/lib/js/components/Banner/Banner.stories.d.ts +4 -2785
- package/dist/lib/js/components/Banner/Banner.vue.d.ts +10 -1121
- package/dist/lib/js/components/Buttons/Button/Button.stories.d.ts +4 -701
- package/dist/lib/js/components/Buttons/Button/Button.vue.d.ts +8 -51
- package/dist/lib/js/components/Buttons/IconButton/IconButton.stories.d.ts +9 -4838
- package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +7 -399
- package/dist/lib/js/components/Cards/Card/Card.stories.d.ts +4 -89
- package/dist/lib/js/components/Cards/Card/Card.vue.d.ts +2 -29
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.stories.d.ts +4 -647
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +7 -92
- package/dist/lib/js/components/Divider/Divider.stories.d.ts +4 -59
- package/dist/lib/js/components/Drawer/Drawer.stories.d.ts +4 -43
- package/dist/lib/js/components/Dropdown/Dropdown.stories.d.ts +4 -113
- package/dist/lib/js/components/IconText/IconText.stories.d.ts +4 -223
- package/dist/lib/js/components/IconText/IconText.vue.d.ts +2 -44
- package/dist/lib/js/components/Icons/FeatureIcon/FeatureIcon.stories.d.ts +4 -181
- package/dist/lib/js/components/Icons/FeatureIcon/FeatureIcon.vue.d.ts +3 -46
- package/dist/lib/js/components/Icons/Icon/Icon.consts.d.ts +4 -3
- package/dist/lib/js/components/Icons/Icon/Icon.stories.d.ts +5 -133
- package/dist/lib/js/components/Icons/Icon/Icon.vue.d.ts +2 -3
- package/dist/lib/js/components/Modal/Modal.vue.d.ts +5 -47
- package/dist/lib/js/components/Modals/Modal/Modal.stories.d.ts +7 -7231
- package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +12 -1140
- package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.stories.d.ts +6 -6029
- package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +5 -1450
- package/dist/lib/js/components/NumberInCircle/NumberInCircle.stories.d.ts +3 -3
- package/dist/lib/js/components/OverlayHeader/OverlayHeader.stories.d.ts +4 -2055
- package/dist/lib/js/components/OverlayHeader/OverlayHeader.vue.d.ts +7 -779
- package/dist/lib/js/components/Pagination/Pagination.stories.d.ts +4 -1869
- package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +5 -694
- package/dist/lib/js/components/Pill/Pill.stories.d.ts +4 -1985
- package/dist/lib/js/components/Pill/Pill.vue.d.ts +7 -740
- package/dist/lib/js/components/PopOver/PopOver.stories.d.ts +4 -4
- package/dist/lib/js/components/ProgressBar/ProgressBar.stories.d.ts +8 -1886
- package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +5 -47
- package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.stories.d.ts +4 -534
- package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +5 -47
- package/dist/lib/js/components/Ripple/Ripple.stories.d.ts +4 -59
- package/dist/lib/js/components/Ripple/Ripple.vue.d.ts +1 -1
- package/dist/lib/js/components/SectionHeader/SectionHeader.stories.d.ts +4 -555
- package/dist/lib/js/components/SectionHeader/SectionHeader.vue.d.ts +5 -48
- package/dist/lib/js/components/SelectList/SelectList.stories.d.ts +2 -4
- package/dist/lib/js/components/SelectList/SelectList.vue.d.ts +3 -4
- package/dist/lib/js/components/SelectList/SelectListItem/SelectListItem.stories.d.ts +4 -563
- package/dist/lib/js/components/SelectList/SelectListItem/SelectListItem.vue.d.ts +3 -282
- package/dist/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.stories.d.ts +4 -69
- package/dist/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.vue.d.ts +3 -35
- package/dist/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.stories.d.ts +4 -669
- package/dist/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.vue.d.ts +3 -336
- package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.stories.d.ts +4 -497
- package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +5 -47
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +5 -47
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockedeStatus.stories.d.ts +4 -497
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.stories.d.ts +4 -3179
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +10 -1358
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.stories.d.ts +6 -6945
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +11 -1478
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionTextarea.vue.d.ts +1 -0
- package/dist/lib/js/components/SurveyToggle/SurveyToggle.stories.d.ts +4 -237
- package/dist/lib/js/components/SurveyToggle/SurveyToggle.vue.d.ts +3 -48
- package/dist/lib/js/components/TabItem/TabItem.stories.d.ts +4 -153
- package/dist/lib/js/components/TabItem/TabItem.vue.d.ts +3 -46
- package/dist/lib/js/components/Tile/Tile.stories.d.ts +5 -994
- package/dist/lib/js/components/Tile/Tile.vue.d.ts +8 -79
- package/dist/lib/js/components/Toggles/CounterToggle/CounterToggle.stories.d.ts +4 -185
- package/dist/lib/js/components/Toggles/CounterToggle/CounterToggle.vue.d.ts +4 -47
- package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.stories.d.ts +4 -239
- package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +3 -29
- package/dist/lib/js/components/Well/Well.stories.d.ts +3 -3
- package/dist/lib/js/styles/Colors/Colors.stories.d.ts +3 -3
- package/dist/lib/js/styles/ColorsThemes/ColorsThemes.stories.d.ts +3 -3
- package/dist/lib/js/styles/ColorsTokensLms/ColorsTokensLms.stories.d.ts +3 -3
- package/dist/lib/js/styles/ColorsTokensPrimaryBodywork/ColorsTokensPrimaryBodywork.stories.d.ts +3 -3
- package/dist/lib/js/styles/ColorsTokensPrimaryWnl/ColorsTokensPrimaryWnl.stories.d.ts +3 -3
- package/dist/lib/js/styles/Spacings/Spacings.stories.d.ts +1 -1
- package/dist/lib/js/styles/TypographyTokensLms/TypographyTokensLms.stories.d.ts +3 -3
- package/dist/lib/js/styles/TypographyVariables/TypographyVariables.stories.d.ts +3 -3
- package/docs/117.1156a7c503a067ad8241.manager.bundle.js +2 -0
- package/docs/247.6eaf240e.iframe.bundle.js +1 -0
- package/docs/255.721b3744029f102ac772.manager.bundle.js +2 -0
- package/docs/286.23828fb3.iframe.bundle.js +2 -0
- package/docs/295.4e52f65e605e88f7b915.manager.bundle.js +1 -0
- package/docs/317.bb9fa3422a439c11ef07.manager.bundle.js +1 -0
- package/docs/363.5eecfb3735eae61195ab.manager.bundle.js +586 -0
- package/docs/363.5eecfb3735eae61195ab.manager.bundle.js.LICENSE.txt +23 -0
- package/docs/39.bfc720d8.iframe.bundle.js +2 -0
- package/docs/407.e7bfe1ea814fec553911.manager.bundle.js +2 -0
- package/docs/594.bb1a9f64.iframe.bundle.js +2 -0
- package/docs/600.5586e4df861d64de85f8.manager.bundle.js +1 -0
- package/docs/636.6664115b472db0c0d56f.manager.bundle.js +2 -0
- package/docs/{vendors~main.247e7a9b46e986df3069.manager.bundle.js.LICENSE.txt → 636.6664115b472db0c0d56f.manager.bundle.js.LICENSE.txt} +0 -10
- package/docs/651.3a01b956.iframe.bundle.js +1 -0
- package/docs/690.46a1e07a.iframe.bundle.js +1 -0
- package/docs/701.691b9947.iframe.bundle.js +1 -0
- package/docs/765.a2b66c95.iframe.bundle.js +2 -0
- package/docs/{vendors~main.d572ee99.iframe.bundle.js.LICENSE.txt → 765.a2b66c95.iframe.bundle.js.LICENSE.txt} +0 -16
- package/docs/935.19d3d944.iframe.bundle.js +2 -0
- package/docs/962.ec348c19.iframe.bundle.js +2 -0
- package/docs/977.a265714880f883237672.manager.bundle.js +1 -0
- package/docs/iframe.html +1 -1
- package/docs/index.html +1 -1
- package/docs/main.aca4e1b49e5b812b2501.manager.bundle.js +1 -0
- package/docs/main.f449ad1d.iframe.bundle.js +1 -0
- package/docs/project.json +1 -1
- package/docs/runtime~main.8a21756dfcf63c109f1d.manager.bundle.js +1 -0
- package/docs/runtime~main.b2826aa6.iframe.bundle.js +1 -0
- package/jest.config.js +3 -6
- package/lib/js/components/Badges/Badge/Badge.spec.ts +3 -8
- package/lib/js/components/Badges/Badge/Badge.stories.ts +5 -3
- package/lib/js/components/Badges/BadgeScore/BadgeScore.spec.ts +3 -7
- package/lib/js/components/Badges/BadgeScore/BadgeScore.stories.ts +9 -5
- package/lib/js/components/Badges/BadgeScore/BadgeScore.vue +4 -3
- package/lib/js/components/Banner/Banner.stories.ts +25 -22
- package/lib/js/components/Banner/Banner.vue +11 -28
- package/lib/js/components/Buttons/Button/Button.spec.ts +10 -6
- package/lib/js/components/Buttons/Button/Button.stories.ts +23 -17
- package/lib/js/components/Buttons/Button/Button.vue +5 -7
- package/lib/js/components/Buttons/IconButton/IconButton.stories.ts +28 -13
- package/lib/js/components/Buttons/IconButton/IconButton.vue +8 -6
- package/lib/js/components/Cards/Card/Card.spec.ts +5 -10
- package/lib/js/components/Cards/Card/Card.stories.ts +17 -5
- package/lib/js/components/Cards/CardExpandable/CardExpandable.spec.ts +7 -12
- package/lib/js/components/Cards/CardExpandable/CardExpandable.stories.ts +20 -10
- package/lib/js/components/Cards/CardExpandable/CardExpandable.vue +5 -3
- package/lib/js/components/Divider/Divider.stories.ts +9 -4
- package/lib/js/components/Drawer/Drawer.stories.ts +5 -3
- package/lib/js/components/Dropdown/Dropdown.stories.ts +5 -3
- package/lib/js/components/IconText/IconText.stories.ts +14 -12
- package/lib/js/components/IconText/IconText.vue +2 -1
- package/lib/js/components/Icons/FeatureIcon/FeatureIcon.stories.ts +6 -4
- package/lib/js/components/Icons/FeatureIcon/FeatureIcon.vue +3 -3
- package/lib/js/components/Icons/Icon/Icon.stories.ts +12 -5
- package/lib/js/components/Icons/Icon/Icon.vue +3 -3
- package/lib/js/components/Modal/Modal.spec.ts +3 -8
- package/lib/js/components/Modal/Modal.vue +1 -1
- package/lib/js/components/Modals/Modal/Modal.stories.ts +15 -29
- package/lib/js/components/Modals/Modal/Modal.vue +10 -10
- package/lib/js/components/Modals/ModalDialog/ModalDialog.stories.ts +6 -4
- package/lib/js/components/Modals/ModalDialog/ModalDialog.vue +7 -7
- package/lib/js/components/NumberInCircle/NumberInCircle.stories.ts +5 -3
- package/lib/js/components/OverlayHeader/OverlayHeader.stories.ts +19 -17
- package/lib/js/components/OverlayHeader/OverlayHeader.vue +1 -1
- package/lib/js/components/Pagination/Pagination.spec.ts +4 -7
- package/lib/js/components/Pagination/Pagination.stories.ts +8 -6
- package/lib/js/components/Pagination/Pagination.vue +3 -3
- package/lib/js/components/Pill/Pill.spec.ts +7 -5
- package/lib/js/components/Pill/Pill.stories.ts +5 -3
- package/lib/js/components/Pill/Pill.vue +4 -4
- package/lib/js/components/PopOver/PopOver.stories.ts +5 -3
- package/lib/js/components/PopOver/PopOver.vue +5 -5
- package/lib/js/components/ProgressBar/ProgressBar.stories.ts +6 -7
- package/lib/js/components/ProgressBar/ProgressBar.vue +6 -4
- package/lib/js/components/ProgressDonutChart/ProgressDonutChart.spec.ts +4 -6
- package/lib/js/components/ProgressDonutChart/ProgressDonutChart.stories.ts +8 -6
- package/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue +1 -1
- package/lib/js/components/Ripple/Ripple.stories.ts +5 -3
- package/lib/js/components/Ripple/Ripple.vue +10 -10
- package/lib/js/components/SectionHeader/SectionHeader.stories.ts +5 -3
- package/lib/js/components/SectionHeader/SectionHeader.vue +2 -1
- package/lib/js/components/SelectList/SelectList.stories.ts +32 -23
- package/lib/js/components/SelectList/SelectListItem/SelectListItem.stories.ts +14 -12
- package/lib/js/components/SelectList/SelectListItem/SelectListItem.vue +3 -2
- package/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.stories.ts +3 -2
- package/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.stories.ts +16 -14
- package/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.vue +3 -2
- package/lib/js/components/Statuses/AccessStatus/AccessStatus.spec.ts +4 -8
- package/lib/js/components/Statuses/AccessStatus/AccessStatus.stories.ts +5 -3
- package/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.spec.ts +4 -8
- package/lib/js/components/Statuses/BlockadeStatus/BlockedeStatus.stories.ts +5 -3
- package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.stories.ts +5 -5
- package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue +3 -2
- package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.spec.ts +5 -14
- package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.stories.ts +29 -21
- package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue +8 -11
- package/lib/js/components/SurveyQuestions/SurveyQuestionTextarea.vue +1 -0
- package/lib/js/components/SurveyToggle/SurveyToggle.spec.ts +3 -8
- package/lib/js/components/SurveyToggle/SurveyToggle.stories.ts +5 -3
- package/lib/js/components/SurveyToggle/SurveyToggle.vue +6 -9
- package/lib/js/components/TabItem/TabItem.spec.ts +3 -7
- package/lib/js/components/TabItem/TabItem.stories.ts +5 -3
- package/lib/js/components/TabItem/TabItem.vue +4 -10
- package/lib/js/components/Tile/Tile.spec.ts +14 -18
- package/lib/js/components/Tile/Tile.stories.ts +12 -5
- package/lib/js/components/Tile/Tile.vue +5 -5
- package/lib/js/components/Toggles/CounterToggle/CounterToggle.spec.ts +5 -5
- package/lib/js/components/Toggles/CounterToggle/CounterToggle.stories.ts +8 -3
- package/lib/js/components/Toggles/CounterToggle/CounterToggle.vue +5 -7
- package/lib/js/components/Toggles/ToggleButton/ToggleButton.stories.ts +16 -13
- package/lib/js/components/Toggles/ToggleButton/ToggleButton.vue +3 -17
- package/lib/js/components/Well/Well.stories.ts +6 -9
- package/lib/js/styles/Colors/Colors.stories.ts +5 -3
- package/lib/js/styles/ColorsThemes/ColorsThemes.stories.ts +5 -3
- package/lib/js/styles/ColorsTokensLms/ColorsTokensLms.stories.ts +5 -3
- package/lib/js/styles/ColorsTokensPrimaryBodywork/ColorsTokensPrimaryBodywork.stories.ts +5 -3
- package/lib/js/styles/ColorsTokensPrimaryWnl/ColorsTokensPrimaryWnl.stories.ts +5 -3
- package/lib/js/styles/Spacings/Spacings.stories.ts +11 -13
- package/lib/js/styles/TypographyTokensLms/TypographyTokensLms.stories.ts +5 -3
- package/lib/js/styles/TypographyVariables/TypographyVariables.stories.ts +5 -3
- package/lib/js/tests/emptyTransformer.ts +3 -1
- package/lib/js/typings.d.ts +9 -5
- package/package.json +22 -19
- package/stylelint.config.js +6 -2
- package/tsconfig.json +4 -2
- package/vue.config.js +8 -4
- package/docs/0.0bd4fd4436a8d1ef1d30.manager.bundle.js +0 -2
- package/docs/0.330ac560.iframe.bundle.js +0 -3
- package/docs/0.330ac560.iframe.bundle.js.map +0 -1
- package/docs/1.7b1bde44.iframe.bundle.js +0 -3
- package/docs/1.7b1bde44.iframe.bundle.js.map +0 -1
- package/docs/1.b52e4f9c5cc26b3ab941.manager.bundle.js +0 -1
- package/docs/10.65aa234815172050014e.manager.bundle.js +0 -1
- package/docs/10.9f63d710.iframe.bundle.js +0 -1
- package/docs/11.cc4ccf1b.iframe.bundle.js +0 -3
- package/docs/11.cc4ccf1b.iframe.bundle.js.map +0 -1
- package/docs/2.4511ae7e.iframe.bundle.js +0 -3
- package/docs/2.4511ae7e.iframe.bundle.js.map +0 -1
- package/docs/3.be646fdb.iframe.bundle.js +0 -1
- package/docs/4.56a28fc4.iframe.bundle.js +0 -1
- package/docs/5.3df3ab4b52abff899664.manager.bundle.js +0 -2
- package/docs/6.63f5637c3f9a33682852.manager.bundle.js +0 -586
- package/docs/6.63f5637c3f9a33682852.manager.bundle.js.LICENSE.txt +0 -24
- package/docs/7.4282478bb99c2aa1c46e.manager.bundle.js +0 -1
- package/docs/8.000736d9.iframe.bundle.js +0 -3
- package/docs/8.000736d9.iframe.bundle.js.map +0 -1
- package/docs/8.c81223eef5990edfc649.manager.bundle.js +0 -1
- package/docs/9.33f72dc1.iframe.bundle.js +0 -1
- package/docs/9.45659a2e4dd371822c72.manager.bundle.js +0 -2
- package/docs/main.56306661f1672549dbce.manager.bundle.js +0 -1
- package/docs/main.6c57cadf.iframe.bundle.js +0 -1
- package/docs/runtime~main.016fc6b4.iframe.bundle.js +0 -1
- package/docs/runtime~main.a7a714be62d5940f5192.manager.bundle.js +0 -1
- package/docs/vendors~main.247e7a9b46e986df3069.manager.bundle.js +0 -2
- package/docs/vendors~main.d572ee99.iframe.bundle.js +0 -3
- package/docs/vendors~main.d572ee99.iframe.bundle.js.map +0 -1
- /package/docs/{0.0bd4fd4436a8d1ef1d30.manager.bundle.js.LICENSE.txt → 117.1156a7c503a067ad8241.manager.bundle.js.LICENSE.txt} +0 -0
- /package/docs/{11.cc4ccf1b.iframe.bundle.js.LICENSE.txt → 255.721b3744029f102ac772.manager.bundle.js.LICENSE.txt} +0 -0
- /package/docs/{5.3df3ab4b52abff899664.manager.bundle.js.LICENSE.txt → 286.23828fb3.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/docs/{2.4511ae7e.iframe.bundle.js.LICENSE.txt → 39.bfc720d8.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/docs/{8.000736d9.iframe.bundle.js.LICENSE.txt → 407.e7bfe1ea814fec553911.manager.bundle.js.LICENSE.txt} +0 -0
- /package/docs/{9.45659a2e4dd371822c72.manager.bundle.js.LICENSE.txt → 594.bb1a9f64.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/docs/{0.330ac560.iframe.bundle.js.LICENSE.txt → 935.19d3d944.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/docs/{1.7b1bde44.iframe.bundle.js.LICENSE.txt → 962.ec348c19.iframe.bundle.js.LICENSE.txt} +0 -0
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
<script lang="ts">
|
|
26
26
|
import DsModal from '../Modal/Modal.vue';
|
|
27
27
|
import { MODAL_SIZES, MODAL_HEADER_TITLE_SIZES } from '../Modal';
|
|
28
|
-
import { VueConstructor } from 'vue';
|
|
29
28
|
import { ICONS } from '../../Icons/Icon';
|
|
30
29
|
import { FEATURE_ICON_COLOR } from '../../Icons/FeatureIcon';
|
|
30
|
+
import { toRaw } from 'vue';
|
|
31
31
|
|
|
32
32
|
export default {
|
|
33
33
|
name: 'ModalDialog',
|
|
@@ -48,8 +48,8 @@ export default {
|
|
|
48
48
|
headerFeatureIcon: {
|
|
49
49
|
type: Object,
|
|
50
50
|
default: null,
|
|
51
|
-
validator(icon
|
|
52
|
-
return Object.values(ICONS).includes(icon);
|
|
51
|
+
validator(icon) {
|
|
52
|
+
return Object.values(ICONS).includes(toRaw(icon));
|
|
53
53
|
},
|
|
54
54
|
},
|
|
55
55
|
headerFeatureIconColor: {
|
|
@@ -70,8 +70,8 @@ export default {
|
|
|
70
70
|
footerPrimaryButtonIcon: {
|
|
71
71
|
type: Object,
|
|
72
72
|
default: null,
|
|
73
|
-
validator(icon
|
|
74
|
-
return Object.values(ICONS).includes(icon);
|
|
73
|
+
validator(icon) {
|
|
74
|
+
return Object.values(ICONS).includes(toRaw(icon));
|
|
75
75
|
},
|
|
76
76
|
},
|
|
77
77
|
footerSecondaryButtonText: {
|
|
@@ -81,8 +81,8 @@ export default {
|
|
|
81
81
|
footerSecondaryButtonIcon: {
|
|
82
82
|
type: Object,
|
|
83
83
|
default: null,
|
|
84
|
-
validator(icon
|
|
85
|
-
return Object.values(ICONS).includes(icon);
|
|
84
|
+
validator(icon) {
|
|
85
|
+
return Object.values(ICONS).includes(toRaw(icon));
|
|
86
86
|
},
|
|
87
87
|
},
|
|
88
88
|
},
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import NumberInCircle from './NumberInCircle.vue';
|
|
2
2
|
import { NUMBER_IN_CIRCLE_COLORS } from './NumberInCircle.consts';
|
|
3
3
|
|
|
4
|
-
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/
|
|
4
|
+
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: 'Components/NumberInCircle',
|
|
8
8
|
component: NumberInCircle,
|
|
9
9
|
} as Meta<typeof NumberInCircle>;
|
|
10
10
|
|
|
11
|
-
const StoryTemplate: StoryFn<typeof NumberInCircle> = (
|
|
11
|
+
const StoryTemplate: StoryFn<typeof NumberInCircle> = (args) => ({
|
|
12
12
|
components: { NumberInCircle },
|
|
13
|
-
|
|
13
|
+
setup() {
|
|
14
|
+
return { ...args };
|
|
15
|
+
},
|
|
14
16
|
template:
|
|
15
17
|
'<number-in-circle :index="index" :color="color" :medium="medium">{{slotText}}</number-in-circle>',
|
|
16
18
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import OverlayHeader from './OverlayHeader.vue';
|
|
2
2
|
|
|
3
|
-
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/
|
|
3
|
+
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
4
4
|
import { OVERLAY_HEADER_BORDER_COLORS } from './OverlayHeader.consts';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
@@ -8,30 +8,32 @@ export default {
|
|
|
8
8
|
component: OverlayHeader,
|
|
9
9
|
} as Meta<typeof OverlayHeader>;
|
|
10
10
|
|
|
11
|
-
const StoryTemplate: StoryFn<typeof OverlayHeader> = (
|
|
11
|
+
const StoryTemplate: StoryFn<typeof OverlayHeader> = (args) => ({
|
|
12
12
|
components: { OverlayHeader },
|
|
13
|
-
|
|
13
|
+
setup() {
|
|
14
|
+
return { args };
|
|
15
|
+
},
|
|
14
16
|
template: `
|
|
15
17
|
<div style="height: 300px">
|
|
16
|
-
<overlay-header v-bind
|
|
17
|
-
<template v-if="accessorySlot" #accessory>
|
|
18
|
-
<div style="background: var(--raw-gray-300); height: 100%">{{ accessorySlot }}</div>
|
|
18
|
+
<overlay-header v-bind=args>
|
|
19
|
+
<template v-if="args.accessorySlot" #accessory>
|
|
20
|
+
<div style="background: var(--raw-gray-300); height: 100%">{{ args.accessorySlot }}</div>
|
|
19
21
|
</template>
|
|
20
|
-
<template v-if="eyebrowAccessorySlot" #eyebrowAccessory>
|
|
21
|
-
<div style="background: var(--raw-gray-300); font-size: 10px">{{ eyebrowAccessorySlot }}</div>
|
|
22
|
+
<template v-if="args.eyebrowAccessorySlot" #eyebrowAccessory>
|
|
23
|
+
<div style="background: var(--raw-gray-300); font-size: 10px">{{ args.eyebrowAccessorySlot }}</div>
|
|
22
24
|
</template>
|
|
23
|
-
<template v-if="titleLeadingSlot" #titleLeading>
|
|
24
|
-
<div style="background: var(--raw-gray-300);">{{ titleLeadingSlot }}</div>
|
|
25
|
+
<template v-if="args.titleLeadingSlot" #titleLeading>
|
|
26
|
+
<div style="background: var(--raw-gray-300);">{{ args.titleLeadingSlot }}</div>
|
|
25
27
|
</template>
|
|
26
|
-
<template v-if="titleTrailingSlot" #titleTrailing>
|
|
27
|
-
<div style="background: var(--raw-gray-300); white-space: nowrap">{{ titleTrailingSlot }}</div>
|
|
28
|
+
<template v-if="args.titleTrailingSlot" #titleTrailing>
|
|
29
|
+
<div style="background: var(--raw-gray-300); white-space: nowrap">{{ args.titleTrailingSlot }}</div>
|
|
28
30
|
</template>
|
|
29
|
-
<template v-if="actionsSlot" #actions>
|
|
30
|
-
<div style="background: var(--raw-gray-300); height: 100%">{{ actionsSlot }}</div>
|
|
31
|
+
<template v-if="args.actionsSlot" #actions>
|
|
32
|
+
<div style="background: var(--raw-gray-300); height: 100%">{{ args.actionsSlot }}</div>
|
|
31
33
|
</template>
|
|
32
|
-
<template v-if="dropdownSlot" #dropdown="{ close }">
|
|
33
|
-
<div style="background: var(--raw-gray-300);">{{ dropdownSlot }}</div>
|
|
34
|
-
<div style="background: var(--raw-gray-300);">{{ dropdownSlot }}</div>
|
|
34
|
+
<template v-if="args.dropdownSlot" #dropdown="{ close }">
|
|
35
|
+
<div style="background: var(--raw-gray-300);">{{ args.dropdownSlot }}</div>
|
|
36
|
+
<div style="background: var(--raw-gray-300);">{{ args.dropdownSlot }}</div>
|
|
35
37
|
</template>
|
|
36
38
|
</overlay-header>
|
|
37
39
|
</div>`,
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
|
|
3
3
|
import Pagination from './Pagination.vue';
|
|
4
4
|
|
|
5
5
|
describe('Pagination', () => {
|
|
6
6
|
const createComponent = ({ currentPage = 1, itemsTotalAmount = 30 } = {}) => {
|
|
7
|
-
const localVue = createLocalVue();
|
|
8
|
-
|
|
9
7
|
return shallowMount(Pagination, {
|
|
10
|
-
|
|
11
|
-
propsData: {
|
|
8
|
+
props: {
|
|
12
9
|
currentPage,
|
|
13
10
|
itemsTotalAmount,
|
|
14
|
-
},
|
|
11
|
+
} as any,
|
|
15
12
|
});
|
|
16
13
|
};
|
|
17
14
|
|
|
@@ -102,7 +99,7 @@ describe('Pagination', () => {
|
|
|
102
99
|
])('should calculate correct pagination for %o', ({ props, expected }) => {
|
|
103
100
|
const component = createComponent(props);
|
|
104
101
|
const elements: Array<string> = [];
|
|
105
|
-
component.findAll('.ds-pagination__itemWrapper').
|
|
102
|
+
component.findAll('.ds-pagination__itemWrapper').forEach((element) => {
|
|
106
103
|
elements.push(element.text().trim());
|
|
107
104
|
});
|
|
108
105
|
expect(elements).toEqual(expected);
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import Pagination from './Pagination.vue';
|
|
2
2
|
|
|
3
|
-
import { ArgTypes, Meta, StoryFn } from '@storybook/
|
|
3
|
+
import { ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
title: 'Components/Pagination',
|
|
7
7
|
component: Pagination,
|
|
8
8
|
} as Meta<typeof Pagination>;
|
|
9
9
|
|
|
10
|
-
const StoryTemplate: StoryFn<typeof Pagination> = (
|
|
10
|
+
const StoryTemplate: StoryFn<typeof Pagination> = (args, { updateArgs }) => ({
|
|
11
11
|
components: { Pagination },
|
|
12
|
-
|
|
12
|
+
setup() {
|
|
13
|
+
return { args };
|
|
14
|
+
},
|
|
13
15
|
methods: {
|
|
14
16
|
onChangePage(currentPage) {
|
|
15
17
|
updateArgs({ currentPage });
|
|
16
18
|
},
|
|
17
19
|
},
|
|
18
20
|
template: `
|
|
19
|
-
|
|
21
|
+
<Pagination v-bind=args @change-page="onChangePage">
|
|
20
22
|
<template #accessory>
|
|
21
|
-
<div v-if="accessory" v-html="accessory" />
|
|
23
|
+
<div v-if="args.accessory" v-html="args.accessory" />
|
|
22
24
|
</template>
|
|
23
|
-
|
|
25
|
+
</Pagination>`,
|
|
24
26
|
});
|
|
25
27
|
|
|
26
28
|
export const Interactive = StoryTemplate.bind({});
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
{{ navigationItem }}
|
|
28
28
|
</span>
|
|
29
29
|
</div>
|
|
30
|
-
<div v-else :key="index" class="ds-pagination__itemWrapper">
|
|
30
|
+
<div v-else :key="`ellipsis${index}`" class="ds-pagination__itemWrapper">
|
|
31
31
|
<span class="ds-pagination__ellipsis">…</span>
|
|
32
32
|
</div>
|
|
33
33
|
</template>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
? ICON_BUTTON_STATES.DISABLED
|
|
44
44
|
: ICON_BUTTON_STATES.DEFAULT
|
|
45
45
|
"
|
|
46
|
-
@click
|
|
46
|
+
@click="changePage(currentPage - 1)"
|
|
47
47
|
/>
|
|
48
48
|
|
|
49
49
|
<div class="ds-pagination__compactItem">
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
? ICON_BUTTON_STATES.DISABLED
|
|
70
70
|
: ICON_BUTTON_STATES.DEFAULT
|
|
71
71
|
"
|
|
72
|
-
@click
|
|
72
|
+
@click="changePage(currentPage + 1)"
|
|
73
73
|
/>
|
|
74
74
|
</div>
|
|
75
75
|
</div>
|
|
@@ -22,13 +22,13 @@ describe('Pill', () => {
|
|
|
22
22
|
color = PILL_COLORS.NEUTRAL,
|
|
23
23
|
}: createComponentOptions = {}) => {
|
|
24
24
|
return shallowMount(Pill, {
|
|
25
|
-
|
|
25
|
+
props: {
|
|
26
26
|
label,
|
|
27
27
|
leftIcon,
|
|
28
28
|
hasDelete,
|
|
29
29
|
size,
|
|
30
30
|
color,
|
|
31
|
-
},
|
|
31
|
+
} as any,
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -52,10 +52,12 @@ describe('Pill', () => {
|
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
it('renders leftIcon', () => {
|
|
55
|
-
const component = createComponent({ leftIcon: ICONS.FA_TAG });
|
|
55
|
+
const component = createComponent({ leftIcon: Object.freeze(ICONS.FA_TAG) });
|
|
56
56
|
|
|
57
57
|
expect(component.find('.pill__leftIcon').exists()).toBe(true);
|
|
58
|
-
expect(component.
|
|
58
|
+
expect(component.findComponent<typeof Pill>('.pill__leftIcon').props().icon).toEqual(
|
|
59
|
+
ICONS.FA_TAG,
|
|
60
|
+
);
|
|
59
61
|
});
|
|
60
62
|
|
|
61
63
|
it("doesn't render leftIcon by default", () => {
|
|
@@ -67,7 +69,7 @@ describe('Pill', () => {
|
|
|
67
69
|
it('renders delete', () => {
|
|
68
70
|
const component = createComponent({ hasDelete: true });
|
|
69
71
|
|
|
70
|
-
const deleteButton = component.
|
|
72
|
+
const deleteButton = component.findComponent<typeof Pill>('.pill__delete');
|
|
71
73
|
expect(deleteButton.exists()).toBe(true);
|
|
72
74
|
expect(deleteButton.props().icon).toBe(ICONS.FA_XMARK);
|
|
73
75
|
|
|
@@ -2,16 +2,18 @@ import Pill from './Pill.vue';
|
|
|
2
2
|
import { PILL_COLORS, PILL_SIZES, PILL_STATES } from './Pill.consts';
|
|
3
3
|
import { ICONS } from '../Icons/Icon';
|
|
4
4
|
|
|
5
|
-
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/
|
|
5
|
+
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
title: 'Components/Pill',
|
|
9
9
|
component: Pill,
|
|
10
10
|
} as Meta<typeof Pill>;
|
|
11
11
|
|
|
12
|
-
const StoryTemplate: StoryFn<typeof Pill> = (
|
|
12
|
+
const StoryTemplate: StoryFn<typeof Pill> = (args) => ({
|
|
13
13
|
components: { Pill },
|
|
14
|
-
|
|
14
|
+
setup() {
|
|
15
|
+
return { ...args };
|
|
16
|
+
},
|
|
15
17
|
template:
|
|
16
18
|
'<pill :label="label" :left-icon="ICONS[leftIcon]" :has-delete="hasDelete" :size="size" :color="color" :state="state"/>',
|
|
17
19
|
data() {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
:size="ICON_BUTTON_SIZES.XX_SMALL"
|
|
29
29
|
:icon="ICONS.FA_XMARK"
|
|
30
30
|
:elevation="BUTTON_ELEVATIONS.X_SMALL"
|
|
31
|
-
@click
|
|
31
|
+
@click="$emit('delete')"
|
|
32
32
|
/>
|
|
33
33
|
</div>
|
|
34
34
|
</template>
|
|
@@ -199,8 +199,8 @@ import IconButton, {
|
|
|
199
199
|
} from '../Buttons/IconButton';
|
|
200
200
|
import Icon, { ICON_SIZES, ICONS } from '../Icons/Icon';
|
|
201
201
|
import { BUTTON_ELEVATIONS } from '../Buttons/Button';
|
|
202
|
-
import { VueConstructor } from 'vue';
|
|
203
202
|
import { Value } from '../../utils/type.utils';
|
|
203
|
+
import { toRaw } from 'vue';
|
|
204
204
|
|
|
205
205
|
const PILL_ICON_BUTTONS_COLOR_MAP = {
|
|
206
206
|
[PILL_COLORS.INVERTED]: ICON_BUTTON_COLORS.PRIMARY,
|
|
@@ -224,8 +224,8 @@ export default {
|
|
|
224
224
|
leftIcon: {
|
|
225
225
|
type: Object,
|
|
226
226
|
default: null,
|
|
227
|
-
validator(icon
|
|
228
|
-
return Object.values(ICONS).includes(icon);
|
|
227
|
+
validator(icon) {
|
|
228
|
+
return Object.values(ICONS).includes(toRaw(icon));
|
|
229
229
|
},
|
|
230
230
|
},
|
|
231
231
|
size: {
|
|
@@ -6,16 +6,18 @@ import {
|
|
|
6
6
|
POP_OVER_TRIGGER_ACTIONS,
|
|
7
7
|
} from './PopOver.consts';
|
|
8
8
|
|
|
9
|
-
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/
|
|
9
|
+
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
title: 'Components/PopOver',
|
|
13
13
|
component: PopOver,
|
|
14
14
|
} as Meta<typeof PopOver>;
|
|
15
15
|
|
|
16
|
-
const StoryTemplate: StoryFn<typeof PopOver> = (
|
|
16
|
+
const StoryTemplate: StoryFn<typeof PopOver> = (args) => ({
|
|
17
17
|
components: { PopOver },
|
|
18
|
-
|
|
18
|
+
setup() {
|
|
19
|
+
return { ...args };
|
|
20
|
+
},
|
|
19
21
|
template:
|
|
20
22
|
'<div style="display: flex; align-items: center; justify-content: center; height: 800px">' +
|
|
21
23
|
'<pop-over :placement="placement" :color="color" :trigger-action="triggerAction" :title-text="titleText" :subtitle-text="subtitleText" :button-text="buttonText" :force-show="forceShow" :header-image-url="headerImageUrl" :size="size" :max-height="maxHeight" :is-pointer-visible="isPointerVisible">' +
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
flex-direction: column;
|
|
63
63
|
padding: 0;
|
|
64
64
|
|
|
65
|
-
&.-color-neutral
|
|
65
|
+
&.-color-neutral :deep(.popper__arrow) {
|
|
66
66
|
border-color: $color-neutral-background transparent !important;
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
&[x-placement^='bottom'] {
|
|
98
98
|
margin-top: $space-s;
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
:deep(.popper__arrow) {
|
|
101
101
|
border-color: transparent transparent $color-inverted-border transparent;
|
|
102
102
|
border-width: 0 $space-xs $space-s $space-xs;
|
|
103
103
|
left: calc(50% - #{$space-xs});
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
&[x-placement^='top'] {
|
|
111
111
|
margin-bottom: $space-s;
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
:deep(.popper__arrow) {
|
|
114
114
|
border-color: $color-inverted-border transparent transparent transparent;
|
|
115
115
|
border-width: $space-s $space-xs 0 $space-xs;
|
|
116
116
|
bottom: -$space-s;
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
&[x-placement^='right'] {
|
|
124
124
|
margin-left: $space-s;
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
:deep(.popper__arrow) {
|
|
127
127
|
border-color: transparent $color-inverted-border transparent transparent;
|
|
128
128
|
border-width: $space-xs $space-s $space-xs 0;
|
|
129
129
|
left: -$space-s;
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
&[x-placement^='left'] {
|
|
137
137
|
margin-right: $space-s;
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
:deep(.popper__arrow) {
|
|
140
140
|
border-color: transparent transparent transparent $color-inverted-border;
|
|
141
141
|
border-width: $space-xs 0 $space-xs $space-s;
|
|
142
142
|
margin-left: 0;
|
|
@@ -9,21 +9,20 @@ import {
|
|
|
9
9
|
ProgressBarRange,
|
|
10
10
|
} from './ProgressBar.consts';
|
|
11
11
|
|
|
12
|
-
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/
|
|
12
|
+
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
title: 'Components/ProgressBar',
|
|
16
16
|
component: ProgressBar,
|
|
17
17
|
} as Meta<typeof ProgressBar>;
|
|
18
18
|
|
|
19
|
-
const StoryTemplate: StoryFn<typeof ProgressBar> = (
|
|
19
|
+
const StoryTemplate: StoryFn<typeof ProgressBar> = (args) => ({
|
|
20
20
|
components: { ProgressBar },
|
|
21
|
-
|
|
21
|
+
setup() {
|
|
22
|
+
return { args };
|
|
23
|
+
},
|
|
22
24
|
template: `
|
|
23
|
-
<
|
|
24
|
-
v-bind=$props
|
|
25
|
-
:badge-position="(typeof ($props.badgePosition) === 'undefined' || $props.badgePosition === '') ? null : parseInt($props.badgePosition, 10)"
|
|
26
|
-
/>`,
|
|
25
|
+
<progress-bar v-bind=args></progress-bar>`,
|
|
27
26
|
});
|
|
28
27
|
|
|
29
28
|
export const Interactive = StoryTemplate.bind({});
|
|
@@ -66,6 +66,8 @@
|
|
|
66
66
|
</template>
|
|
67
67
|
|
|
68
68
|
<style scoped lang="scss">
|
|
69
|
+
@use 'sass:math';
|
|
70
|
+
|
|
69
71
|
@import '../../../styles/settings/spacings';
|
|
70
72
|
@import '../../../styles/settings/media-queries';
|
|
71
73
|
@import '../../../styles/settings/colors/tokens';
|
|
@@ -287,16 +289,16 @@ $progress-bar-badge-colors: (
|
|
|
287
289
|
display: flex;
|
|
288
290
|
height: $progress-bar-badge-size;
|
|
289
291
|
justify-content: center;
|
|
290
|
-
margin-left: -$progress-bar-badge-size
|
|
291
|
-
margin-top: -$progress-bar-badge-size
|
|
292
|
+
margin-left: math.div(-$progress-bar-badge-size, 2);
|
|
293
|
+
margin-top: math.div(-$progress-bar-badge-size, 2);
|
|
292
294
|
position: absolute;
|
|
293
295
|
top: 50%;
|
|
294
296
|
width: $progress-bar-badge-size;
|
|
295
297
|
|
|
296
298
|
&.-small {
|
|
297
299
|
height: $progress-bar-badge-size-small;
|
|
298
|
-
margin-left: -$progress-bar-badge-size-small
|
|
299
|
-
margin-top: -$progress-bar-badge-size-small
|
|
300
|
+
margin-left: math.div(-$progress-bar-badge-size-small, 2);
|
|
301
|
+
margin-top: math.div(-$progress-bar-badge-size-small, 2);
|
|
300
302
|
width: $progress-bar-badge-size-small;
|
|
301
303
|
}
|
|
302
304
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
|
|
3
3
|
import ProgressDonutChart from './ProgressDonutChart.vue';
|
|
4
4
|
import {
|
|
@@ -8,14 +8,12 @@ import {
|
|
|
8
8
|
ProgressDonutChartState,
|
|
9
9
|
} from './ProgressDonutChart.consts';
|
|
10
10
|
|
|
11
|
-
const localVue = createLocalVue();
|
|
12
11
|
const createComponent = function ({
|
|
13
12
|
label = '',
|
|
14
13
|
state = PROGRESS_DONUT_CHART_STATES.DEFAULT,
|
|
15
14
|
ranges = [],
|
|
16
15
|
}: createComponentOptions) {
|
|
17
16
|
return shallowMount(ProgressDonutChart, {
|
|
18
|
-
localVue,
|
|
19
17
|
propsData: {
|
|
20
18
|
label,
|
|
21
19
|
state,
|
|
@@ -90,8 +88,8 @@ describe('ProgressDonutChart', () => {
|
|
|
90
88
|
});
|
|
91
89
|
const tracks = component.findAll('.progressDonutChart__track');
|
|
92
90
|
expect(tracks.length).toBe(3);
|
|
93
|
-
expect(tracks.at(0)
|
|
94
|
-
expect(tracks.at(1)
|
|
95
|
-
expect(tracks.at(2)
|
|
91
|
+
expect(tracks.at(0)?.attributes('style')).toBe('--length: 30; transform: rotate(90deg);');
|
|
92
|
+
expect(tracks.at(1)?.attributes('style')).toBe('--length: 25; transform: rotate(198deg);');
|
|
93
|
+
expect(tracks.at(2)?.attributes('style')).toBe('--length: 25; transform: rotate(288deg);');
|
|
96
94
|
});
|
|
97
95
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ProgressDonutChart from './ProgressDonutChart.vue';
|
|
2
2
|
|
|
3
|
-
import { ArgTypes, Meta, StoryFn } from '@storybook/
|
|
3
|
+
import { ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
4
4
|
import {
|
|
5
5
|
PROGRESS_DONUT_CHART_RANGE_COLORS,
|
|
6
6
|
PROGRESS_DONUT_CHART_STATES,
|
|
@@ -12,13 +12,15 @@ export default {
|
|
|
12
12
|
component: ProgressDonutChart,
|
|
13
13
|
} as Meta<typeof ProgressDonutChart>;
|
|
14
14
|
|
|
15
|
-
const StoryTemplate: StoryFn<typeof ProgressDonutChart> = (
|
|
15
|
+
const StoryTemplate: StoryFn<typeof ProgressDonutChart> = (args) => ({
|
|
16
16
|
components: { ProgressDonutChart },
|
|
17
|
-
|
|
17
|
+
setup() {
|
|
18
|
+
return { args };
|
|
19
|
+
},
|
|
18
20
|
template: `
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
<ProgressDonutChart
|
|
22
|
+
v-bind=args
|
|
23
|
+
/>`,
|
|
22
24
|
});
|
|
23
25
|
|
|
24
26
|
export const Interactive = StoryTemplate.bind({});
|
|
@@ -154,7 +154,7 @@ $progress-donut-chart-range-colors: (
|
|
|
154
154
|
animation: a-spinAround 2s infinite linear;
|
|
155
155
|
stroke: $color-neutral-background-strong;
|
|
156
156
|
stroke-dasharray: $circle-circumference;
|
|
157
|
-
stroke-dashoffset: #{$circle-circumference - ($circle-circumference *
|
|
157
|
+
stroke-dashoffset: #{$circle-circumference - ($circle-circumference * 0.25)};
|
|
158
158
|
transform: rotate(0deg);
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import Ripple from './Ripple.vue';
|
|
2
2
|
import { RIPPLE_COLORS } from './Ripple.consts';
|
|
3
3
|
|
|
4
|
-
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/
|
|
4
|
+
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: 'Utils/Ripple',
|
|
8
8
|
component: Ripple,
|
|
9
9
|
} as Meta<typeof Ripple>;
|
|
10
10
|
|
|
11
|
-
const StoryTemplate: StoryFn<typeof Ripple> = (
|
|
11
|
+
const StoryTemplate: StoryFn<typeof Ripple> = (args) => ({
|
|
12
12
|
components: { Ripple },
|
|
13
|
-
|
|
13
|
+
setup() {
|
|
14
|
+
return { ...args };
|
|
15
|
+
},
|
|
14
16
|
template:
|
|
15
17
|
'<ripple :color="color" :disable="disable">' +
|
|
16
18
|
'<div style="background-color: #ccc; cursor: pointer; display: flex; align-items: center; justify-content: center; height: 50px; width: 100%;">Click me</div>' +
|
|
@@ -11,43 +11,43 @@
|
|
|
11
11
|
@import '../../../styles/settings/colors/tokens';
|
|
12
12
|
|
|
13
13
|
.rippleWrapper {
|
|
14
|
-
&.-color-accent
|
|
14
|
+
&.-color-accent:deep(.ripple) {
|
|
15
15
|
background-color: $color-accent-ripple !important;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
&.-color-danger
|
|
18
|
+
&.-color-danger:deep(.ripple) {
|
|
19
19
|
background-color: $color-danger-ripple !important;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
&.-color-default
|
|
22
|
+
&.-color-default:deep(.ripple) {
|
|
23
23
|
background-color: $color-default-ripple !important;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
&.-color-fail
|
|
26
|
+
&.-color-fail:deep(.ripple) {
|
|
27
27
|
background-color: $color-fail-ripple !important;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
&.-color-info
|
|
30
|
+
&.-color-info:deep(.ripple) {
|
|
31
31
|
background-color: $color-info-ripple !important;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
&.-color-inverted
|
|
34
|
+
&.-color-inverted:deep(.ripple) {
|
|
35
35
|
background-color: $color-inverted-ripple !important;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
&.-color-neutral
|
|
38
|
+
&.-color-neutral:deep(.ripple) {
|
|
39
39
|
background-color: $color-neutral-ripple !important;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
&.-color-primary
|
|
42
|
+
&.-color-primary:deep(.ripple) {
|
|
43
43
|
background-color: $color-primary-ripple !important;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
&.-color-success
|
|
46
|
+
&.-color-success:deep(.ripple) {
|
|
47
47
|
background-color: $color-success-ripple !important;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
&.-color-warning
|
|
50
|
+
&.-color-warning:deep(.ripple) {
|
|
51
51
|
background-color: $color-warning-ripple !important;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -2,16 +2,18 @@ import SectionHeader from './SectionHeader.vue';
|
|
|
2
2
|
import { SECTION_HEADER_SIZES } from './SectionHeader.consts';
|
|
3
3
|
import { ICONS } from '../Icons/Icon';
|
|
4
4
|
|
|
5
|
-
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/
|
|
5
|
+
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
title: 'Components/SectionHeader',
|
|
9
9
|
component: SectionHeader,
|
|
10
10
|
} as Meta<typeof SectionHeader>;
|
|
11
11
|
|
|
12
|
-
const StoryTemplate: StoryFn<typeof SectionHeader> = (
|
|
12
|
+
const StoryTemplate: StoryFn<typeof SectionHeader> = (args, { updateArgs }) => ({
|
|
13
13
|
components: { SectionHeader },
|
|
14
|
-
|
|
14
|
+
setup() {
|
|
15
|
+
return { ...args };
|
|
16
|
+
},
|
|
15
17
|
data() {
|
|
16
18
|
return {
|
|
17
19
|
ICONS: Object.freeze(ICONS),
|
|
@@ -158,6 +158,7 @@ $icons-and-slot-min-height-l: 50px;
|
|
|
158
158
|
<script lang="ts">
|
|
159
159
|
import { SECTION_HEADER_SIZES } from './SectionHeader.consts';
|
|
160
160
|
import DsIcon, { IconItem, ICONS, ICON_SIZES } from '../Icons/Icon';
|
|
161
|
+
import { toRaw } from 'vue';
|
|
161
162
|
|
|
162
163
|
export default {
|
|
163
164
|
name: 'SectionHeader',
|
|
@@ -177,7 +178,7 @@ export default {
|
|
|
177
178
|
type: Object as () => IconItem,
|
|
178
179
|
default: null,
|
|
179
180
|
validator(iconLeft: IconItem) {
|
|
180
|
-
return Object.values(ICONS).includes(iconLeft);
|
|
181
|
+
return Object.values(ICONS).includes(toRaw(iconLeft));
|
|
181
182
|
},
|
|
182
183
|
},
|
|
183
184
|
isExpanded: {
|