@bethinkpl/design-system 25.0.10 → 26.0.1
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/.github/workflows/build-to-review-on-trigger.yml +17 -0
- package/.github/workflows/storybook.yml +1 -0
- package/.storybook/main.ts +42 -0
- package/.storybook/{manager.js → manager.ts} +1 -1
- package/.storybook/preview-head.html +1 -0
- package/.storybook/preview.scss +3 -0
- package/.storybook/{preview.js → preview.ts} +11 -18
- package/.storybook/scss-preview-styles-plugin.ts +43 -0
- package/{lib/styles → .storybook}/storybook.scss +10 -10
- package/deploy_storybook_to_s3.sh +16 -1
- package/dist/design-system.umd.cjs +1032 -0
- package/dist/design-system.umd.cjs.map +1 -0
- package/dist/lib/js/components/BadgeScore/BadgeScore.vue.d.ts +33 -65
- package/dist/lib/js/components/BadgeScore/index.d.ts +2 -1
- package/dist/lib/js/components/Banner/Banner.vue.d.ts +265 -311
- package/dist/lib/js/components/Banner/index.d.ts +2 -1
- package/dist/lib/js/components/Buttons/Button/Button.vue.d.ts +258 -305
- package/dist/lib/js/components/Buttons/Button/index.d.ts +2 -1
- package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +274 -320
- package/dist/lib/js/components/Buttons/IconButton/index.d.ts +2 -1
- package/dist/lib/js/components/Cards/Card/Card.consts.d.ts +1 -0
- package/dist/lib/js/components/Cards/Card/Card.vue.d.ts +92 -2
- package/dist/lib/js/components/Cards/Card/index.d.ts +2 -1
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +274 -258
- package/dist/lib/js/components/Cards/CardExpandable/index.d.ts +2 -1
- package/dist/lib/js/components/Chip/Chip.vue.d.ts +259 -306
- package/dist/lib/js/components/Chip/index.d.ts +2 -1
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.consts.d.ts +1 -0
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.vue.d.ts +1 -106
- package/dist/lib/js/components/DatePickers/DatePicker/index.d.ts +2 -1
- package/dist/lib/js/components/DatePickers/DatePickerBox/DatePickerBox.vue.d.ts +1 -274
- package/dist/lib/js/components/DatePickers/DatePickerBox/index.d.ts +2 -1
- package/dist/lib/js/components/Divider/Divider.vue.d.ts +40 -26
- package/dist/lib/js/components/Divider/index.d.ts +2 -1
- package/dist/lib/js/components/Drawer/Drawer.vue.d.ts +34 -19
- package/dist/lib/js/components/Drawer/DrawerContent/DrawerContent.vue.d.ts +1 -3
- package/dist/lib/js/components/Drawer/DrawerDivider/DrawerDivider.vue.d.ts +24 -17
- package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue.d.ts +2 -3
- package/dist/lib/js/components/Drawer/DrawerListItem/DrawerListItem.vue.d.ts +226 -3
- package/dist/lib/js/components/Drawer/DrawerListItemGroup/DrawerListItemGroup.vue.d.ts +1 -3
- package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +236 -302
- package/dist/lib/js/components/Drawer/DrawerTile/DrawerTile.vue.d.ts +129 -66
- package/dist/lib/js/components/Drawer/index.d.ts +2 -1
- package/dist/lib/js/components/Dropdown/Dropdown.vue.d.ts +2 -66
- package/dist/lib/js/components/Dropdown/index.d.ts +2 -1
- package/dist/lib/js/components/Form/Checkbox/Checkbox.vue.d.ts +219 -239
- package/dist/lib/js/components/Form/RadioButton/RadioButton.vue.d.ts +219 -239
- package/dist/lib/js/components/Form/SelectionControl/SelectionControl.sb.shared.d.ts +2 -1
- package/dist/lib/js/components/Form/SelectionControl/SelectionControl.vue.d.ts +29 -66
- package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +274 -316
- package/dist/lib/js/components/Headers/OverlayHeader/index.d.ts +2 -1
- package/dist/lib/js/components/Headers/PageHeader/PageHeader.vue.d.ts +12 -32
- package/dist/lib/js/components/Headers/PageHeader/index.d.ts +2 -1
- package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.consts.d.ts +1 -0
- package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +255 -333
- package/dist/lib/js/components/Headers/SectionHeader/index.d.ts +2 -1
- package/dist/lib/js/components/IconText/IconText.vue.d.ts +1 -71
- package/dist/lib/js/components/IconText/index.d.ts +2 -1
- package/dist/lib/js/components/Icons/FeatureIcon/FeatureIcon.vue.d.ts +25 -48
- package/dist/lib/js/components/Icons/FeatureIcon/index.d.ts +2 -1
- package/dist/lib/js/components/Icons/Icon/Icon.consts.d.ts +195 -194
- package/dist/lib/js/components/Icons/Icon/Icon.vue.d.ts +76 -44
- package/dist/lib/js/components/Icons/Icon/index.d.ts +2 -1
- package/dist/lib/js/components/Image/Image.vue.d.ts +3 -11
- package/dist/lib/js/components/Image/index.d.ts +2 -1
- package/dist/lib/js/components/Layouts/ThreeColumnLayout/ThreeColumnLayout.vue.d.ts +16 -46
- package/dist/lib/js/components/Layouts/ThreeColumnLayout/index.d.ts +2 -1
- package/dist/lib/js/components/LoadingBar/LoadingBar.consts.d.ts +1 -0
- package/dist/lib/js/components/LoadingBar/LoadingBar.vue.d.ts +37 -26
- package/dist/lib/js/components/LoadingBar/index.d.ts +2 -1
- package/dist/lib/js/components/Modal/Modal.vue.d.ts +235 -230
- package/dist/lib/js/components/Modal/index.d.ts +2 -1
- package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +275 -362
- package/dist/lib/js/components/Modals/Modal/index.d.ts +2 -1
- package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +20 -74
- package/dist/lib/js/components/Modals/ModalDialog/index.d.ts +2 -1
- package/dist/lib/js/components/NumberInCircle/index.d.ts +2 -1
- package/dist/lib/js/components/Outline/OutlineDivider/OutlineDivider.vue.d.ts +24 -17
- package/dist/lib/js/components/Outline/OutlineDivider/index.d.ts +2 -1
- package/dist/lib/js/components/Outline/OutlineItem/OutlineItem.vue.d.ts +231 -297
- package/dist/lib/js/components/Outline/OutlineItem/index.d.ts +2 -1
- package/dist/lib/js/components/Outline/OutlineSectionHeader/OutlineSectionHeader.vue.d.ts +10 -8
- package/dist/lib/js/components/Outline/OutlineSectionHeader/index.d.ts +2 -1
- package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +259 -288
- package/dist/lib/js/components/Pagination/index.d.ts +2 -1
- package/dist/lib/js/components/PopOver/index.d.ts +2 -1
- package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +1 -301
- package/dist/lib/js/components/ProgressBar/index.d.ts +2 -1
- package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +1 -253
- package/dist/lib/js/components/ProgressDonutChart/index.d.ts +2 -1
- package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +21 -135
- package/dist/lib/js/components/RichList/BasicRichListItem/index.d.ts +2 -1
- package/dist/lib/js/components/RichList/GroupRichListItem/GroupRichListItem.consts.d.ts +1 -0
- package/dist/lib/js/components/RichList/GroupRichListItem/GroupRichListItem.vue.d.ts +51 -30
- package/dist/lib/js/components/RichList/GroupRichListItem/index.d.ts +2 -1
- package/dist/lib/js/components/RichList/RichListItem/RichListItem.consts.d.ts +2 -0
- package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +254 -344
- package/dist/lib/js/components/RichList/RichListItem/index.d.ts +2 -1
- package/dist/lib/js/components/SectionTitle/SectionTitle.vue.d.ts +32 -2
- package/dist/lib/js/components/SelectList/SelectList.vue.d.ts +2 -3
- package/dist/lib/js/components/SelectList/SelectListItem/SelectListItem.vue.d.ts +234 -3
- package/dist/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.vue.d.ts +1 -7
- package/dist/lib/js/components/SelectList/SelectListItemTile/SelectListItemTile.vue.d.ts +127 -65
- package/dist/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.vue.d.ts +21 -56
- package/dist/lib/js/components/SelectList/SelectListSectionTitle/SelectListSectionTitle.vue.d.ts +21 -13
- package/dist/lib/js/components/SelectionTile/SelectionTile.vue.d.ts +197 -197
- package/dist/lib/js/components/SelectionTile/index.d.ts +2 -1
- package/dist/lib/js/components/Skeleton/Skeleton.vue.d.ts +42 -2
- package/dist/lib/js/components/Skeleton/index.d.ts +2 -1
- package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +227 -231
- package/dist/lib/js/components/Statuses/AccessStatus/index.d.ts +2 -1
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +227 -231
- package/dist/lib/js/components/Statuses/BlockadeStatus/index.d.ts +2 -1
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +246 -3
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/index.d.ts +2 -1
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +2 -3
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/index.d.ts +2 -1
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionTextarea.vue.d.ts +31 -21
- package/dist/lib/js/components/SurveyQuestions/index.d.ts +2 -1
- package/dist/lib/js/components/SurveyToggle/SurveyToggle.vue.d.ts +39 -3
- package/dist/lib/js/components/SurveyToggle/index.d.ts +2 -1
- package/dist/lib/js/components/Switch/Switch.consts.d.ts +1 -0
- package/dist/lib/js/components/Switch/Switch.vue.d.ts +246 -296
- package/dist/lib/js/components/Switch/index.d.ts +2 -1
- package/dist/lib/js/components/TabItem/TabItem.vue.d.ts +1 -47
- package/dist/lib/js/components/TabItem/index.d.ts +2 -1
- package/dist/lib/js/components/TextGroup/TextGroup.vue.d.ts +7 -6
- package/dist/lib/js/components/TextGroup/index.d.ts +2 -1
- package/dist/lib/js/components/Tile/Tile.consts.d.ts +1 -0
- package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +195 -194
- package/dist/lib/js/components/Tile/Tile.shared.d.ts +1 -0
- package/dist/lib/js/components/Tile/Tile.vue.d.ts +342 -282
- package/dist/lib/js/components/Tile/index.d.ts +2 -1
- package/dist/lib/js/components/Toast/Toast.consts.d.ts +1 -0
- package/dist/lib/js/components/Toggles/CounterToggle/CounterToggle.vue.d.ts +21 -47
- package/dist/lib/js/components/Toggles/CounterToggle/index.d.ts +2 -1
- package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.consts.d.ts +1 -0
- package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +242 -301
- package/dist/lib/js/components/Toggles/ToggleButton/index.d.ts +2 -1
- package/dist/lib/js/components/Tooltip/Tooltip.vue.d.ts +4 -5
- package/dist/lib/js/components/Tooltip/index.d.ts +2 -1
- package/dist/lib/js/components/Well/index.d.ts +2 -1
- package/dist/lib/js/composables/hover-state.d.ts +11 -0
- package/dist/lib/js/icons/fontawesome.d.ts +195 -195
- package/dist/lib/js/index.d.ts +2 -1
- package/dist/lib/js/styles/TokenTypes.d.ts +1 -0
- package/dist/lib/js/utils/device.d.ts +1 -0
- package/docs/.nojekyll +0 -0
- package/docs/assets/AccessStatus-DVtD0BrS.js +1 -0
- package/docs/assets/AccessStatus.stories-CM9qms_d.js +9 -0
- package/docs/assets/BadgeScore-B0MHArlW.js +1 -0
- package/docs/assets/BadgeScore.stories-BsFc_8XV.js +40 -0
- package/docs/assets/Banner-Dkt_I8P3.js +1 -0
- package/docs/assets/Banner.stories-dLLxP9rS.js +62 -0
- package/docs/assets/BasicRichListItem-CCXQ4iJg.js +1 -0
- package/docs/assets/BasicRichListItem.stories-Bh_UBJkl.js +194 -0
- package/docs/assets/BlockadeStatus-9_pI8WM1.js +1 -0
- package/docs/assets/BlockedeStatus.stories-IunhqK0I.js +9 -0
- package/docs/assets/BorderSizes.stories-COOhe637.js +31 -0
- package/docs/assets/Button-CBZkgukP.js +1 -0
- package/docs/assets/Button.stories-BLj-_0Vw.js +47 -0
- package/docs/assets/Card-B7j8o0GU.js +1 -0
- package/docs/assets/Card.stories-KO99dol6.js +49 -0
- package/docs/assets/CardExpandable-XN3wcRwV.js +1 -0
- package/docs/assets/CardExpandable.stories-B9-JtWRG.js +37 -0
- package/docs/assets/Checkbox-D_geau8n.js +1 -0
- package/docs/assets/Checkbox.stories-DLfdA87Q.js +21 -0
- package/docs/assets/Chip-CBqrZ-va.js +1 -0
- package/docs/assets/Chip.stories-DQLbtbRo.js +43 -0
- package/docs/assets/Color-ERTF36HU-B622yQt4.js +1 -0
- package/docs/assets/Colors.stories-CRIOJbgv.js +11 -0
- package/docs/assets/ColorsThemes.stories-BVtVblv7.js +11 -0
- package/docs/assets/ColorsTokensLms.stories-Ds9sWwL0.js +11 -0
- package/docs/assets/ColorsTokensPrimaryBodywork.stories-D9nLEENe.js +11 -0
- package/docs/assets/ColorsTokensPrimaryWnl.stories-Cuz6HvAj.js +11 -0
- package/docs/assets/CounterToggle-BzxnFqH7.js +1 -0
- package/docs/assets/CounterToggle.stories-DdAjSFMr.js +19 -0
- package/docs/assets/DatePicker-CvT_E45n.js +2 -0
- package/docs/assets/DatePicker.stories-Ub_1x6To.js +91 -0
- package/docs/assets/Divider-D2yDhW46.js +1 -0
- package/docs/assets/Divider.stories-f9QUckyE.js +15 -0
- package/docs/assets/DocsRenderer-CFRXHY34-D5Eulb6H.js +639 -0
- package/docs/assets/Drawer-CH5Qyc5B.js +1 -0
- package/docs/assets/Drawer.stories-jrbLBaPT.js +21 -0
- package/docs/assets/DrawerContent-DGzdUSmd.js +1 -0
- package/docs/assets/DrawerContent.stories-CYzQPPIy.js +17 -0
- package/docs/assets/DrawerDivider-DNbYnPjf.js +1 -0
- package/docs/assets/DrawerDivider.stories-BG6MKk49.js +15 -0
- package/docs/assets/DrawerHeader-DOWojdwp.js +1 -0
- package/docs/assets/DrawerHeader.stories-CwaoQykQ.js +54 -0
- package/docs/assets/DrawerListItem-aepUTcTm.js +1 -0
- package/docs/assets/DrawerListItem.stories-vHXkwtyS.js +13 -0
- package/docs/assets/DrawerListItemGroup-CnH532Dv.js +1 -0
- package/docs/assets/DrawerListItemGroup.stories-D0DeZ6IG.js +20 -0
- package/docs/assets/DrawerSection-pMhA5dsS.js +1 -0
- package/docs/assets/DrawerSection.stories-BF7A4VyW.js +67 -0
- package/docs/assets/DrawerTile-W2mt6fAk.js +1 -0
- package/docs/assets/DrawerTile.stories-CUMznN1H.js +10 -0
- package/docs/assets/Dropdown-BfX0EVaK.js +1 -0
- package/docs/assets/Dropdown.stories-DrILA_TR.js +45 -0
- package/docs/assets/FeatureIcon-n65RPvyA.js +1 -0
- package/docs/assets/FeatureIcon.stories-DSUzxIPB.js +14 -0
- package/docs/assets/GroupRichListItem-DMiaeyaS.js +1 -0
- package/docs/assets/GroupRichListItem.stories-DCEq0Kil.js +137 -0
- package/docs/assets/Icon-BiVaixmr.js +762 -0
- package/docs/assets/Icon.stories-BFJuE2aE.js +27 -0
- package/docs/assets/IconButton-COzU-vlz.js +1 -0
- package/docs/assets/IconButton.stories-DGmn7bfg.js +119 -0
- package/docs/assets/IconText-DDrVXWHS.js +1 -0
- package/docs/assets/IconText.stories-CSt7q9Mf.js +32 -0
- package/docs/assets/Image-Drmyqqsn.js +1 -0
- package/docs/assets/Image.stories-DxQ22AFP.js +21 -0
- package/docs/assets/ItemsList-B-vw083o.js +1 -0
- package/docs/assets/LoadingBar-D0iVLCyJ.js +1 -0
- package/docs/assets/LoadingBar.stories-IJRD91mF.js +9 -0
- package/docs/assets/Modal-CJ0d6Je9.js +1 -0
- package/docs/assets/Modal.stories-q_qdiakg.js +53 -0
- package/docs/assets/ModalDialog-CbDAxfV_.js +1 -0
- package/docs/assets/ModalDialog.stories-CKcR8rIW.js +43 -0
- package/docs/assets/NumberInCircle-DV0Qrx8H.js +1 -0
- package/docs/assets/NumberInCircle.stories-DriLGDDl.js +9 -0
- package/docs/assets/OutlineDivider-Cez9NlcH.js +1 -0
- package/docs/assets/OutlineDivider.stories-D0zYoHBw.js +11 -0
- package/docs/assets/OutlineItem-CUHef8Bo.js +1 -0
- package/docs/assets/OutlineItem.stories-BgFzRhaY.js +41 -0
- package/docs/assets/OutlineSectionHeader-DSJ4uxfr.js +1 -0
- package/docs/assets/OutlineSectionHeader.stories-HOf2NwY-.js +9 -0
- package/docs/assets/OverlayHeader-jylszhPO.js +1 -0
- package/docs/assets/OverlayHeader.stories-bjFfL93l.js +67 -0
- package/docs/assets/PageHeader-CTbdU4IG.js +1 -0
- package/docs/assets/PageHeader.stories-DeNf1zoa.js +9 -0
- package/docs/assets/Pagination-dSOJSh7t.js +1 -0
- package/docs/assets/Pagination.stories-CMg8WaRV.js +31 -0
- package/docs/assets/PopOver-BPD1Ttq1.js +1 -0
- package/docs/assets/PopOver.stories-Cl1k59cl.js +15 -0
- package/docs/assets/ProgressBar-4gBRbr7a.js +1 -0
- package/docs/assets/ProgressBar.stories-9xVTh0RH.js +57 -0
- package/docs/assets/ProgressDonutChart-D5uvUZva.js +1 -0
- package/docs/assets/ProgressDonutChart.stories-DBpwl5Vn.js +17 -0
- package/docs/assets/RadioButton-BwCzYjOu.js +1 -0
- package/docs/assets/RadioButton.stories-CLWvDUrd.js +21 -0
- package/docs/assets/RichListItem.stories-DhkQky0J.js +182 -0
- package/docs/assets/SectionHeader-DVwe52kA.js +1 -0
- package/docs/assets/SectionHeader.stories-Dd3li5ER.js +24 -0
- package/docs/assets/SectionTitle-XTc-98O5.js +1 -0
- package/docs/assets/SectionTitle.stories-BFNagAeb.js +9 -0
- package/docs/assets/SelectList-CTXM5G8Z.js +1 -0
- package/docs/assets/SelectList.stories-B2Pq8auf.js +91 -0
- package/docs/assets/SelectListItem-_c4CA-YM.js +1 -0
- package/docs/assets/SelectListItem.stories-PSDnI18x.js +36 -0
- package/docs/assets/SelectListItemDivider-BOgD7wrO.js +1 -0
- package/docs/assets/SelectListItemDivider.stories-DvANKn2s.js +8 -0
- package/docs/assets/SelectListItemTile-BL3qYL_0.js +1 -0
- package/docs/assets/SelectListItemTile.stories-CVYmG0Ta.js +19 -0
- package/docs/assets/SelectListItemToggle-BjjMPWy0.js +1 -0
- package/docs/assets/SelectListItemToggle.stories-D5QL3Gd2.js +51 -0
- package/docs/assets/SelectListSectionTitle-FihJb1eM.js +1 -0
- package/docs/assets/SelectListSectionTitle.stories-DCyB86A1.js +16 -0
- package/docs/assets/SelectionControl-BxCh7N21.js +1 -0
- package/docs/assets/SelectionControl.sb.shared-BWifjoMU.js +2 -0
- package/docs/assets/SelectionTile-T03MPtEm.js +2 -0
- package/docs/assets/SelectionTile.stories-CEufLR64.js +47 -0
- package/docs/assets/Skeleton-BbafKE6W.js +179 -0
- package/docs/assets/Skeleton.stories-B_4TqUB5.js +15 -0
- package/docs/assets/Spacings.stories-DxxukMX7.js +43 -0
- package/docs/assets/SurveyQuestionOpenEnded-DRFBouQB.js +1 -0
- package/docs/assets/SurveyQuestionOpenEnded.stories-DW7tQU04.js +20 -0
- package/docs/assets/SurveyQuestionScale-nNC7H5k0.js +1 -0
- package/docs/assets/SurveyQuestionScale.stories-DC8qXbl8.js +72 -0
- package/docs/assets/SurveyToggle-DzZyc41b.js +1 -0
- package/docs/assets/SurveyToggle.stories-Yf0fJ_p2.js +14 -0
- package/docs/assets/Switch-BWGPo7tP.js +1 -0
- package/docs/assets/Switch.stories-BzeYFsr2.js +48 -0
- package/docs/assets/TabItem-Cx2nQ_YR.js +1 -0
- package/docs/assets/TabItem.stories-C-gV8JMj.js +15 -0
- package/docs/assets/TextGroup-DQmg5luv.js +1 -0
- package/docs/assets/TextGroup.stories-j5MNzn7U.js +48 -0
- package/docs/assets/ThreeColumnLayout-Lm3LIbid.js +1 -0
- package/docs/assets/ThreeColumnLayout.stories-C5cNwOWv.js +47 -0
- package/docs/assets/Tile-DnH9h0Kq.js +1 -0
- package/docs/assets/Tile.sb.shared-2W1FnncR.js +15 -0
- package/docs/assets/Tile.stories-Bj7yp21N.js +14 -0
- package/docs/assets/Toast.stories-Bad7itWi.js +58 -0
- package/docs/assets/ToggleButton-BZ0tVYFv.js +1 -0
- package/docs/assets/ToggleButton.stories-D0YPR0-y.js +42 -0
- package/docs/assets/Tooltip-BxZlo6cR.js +1 -0
- package/docs/assets/Tooltip.stories-CaTsoTim.js +119 -0
- package/docs/assets/TypographyTokensLms.stories-D-CrlX5A.js +11 -0
- package/docs/assets/TypographyVariables.stories-Bmxi44f1.js +11 -0
- package/docs/assets/Well-vFI2CbIA.js +1 -0
- package/docs/assets/Well.stories-Be73GX2h.js +6 -0
- package/docs/assets/_commonjsHelpers-Chg3vePA.js +1 -0
- package/docs/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
- package/docs/assets/decorator-CSnIf-k5.js +1 -0
- package/docs/assets/device-9fgosCm4.js +1 -0
- package/docs/assets/entry-preview-Dw8qwUcN.js +1 -0
- package/docs/assets/entry-preview-docs-BBVW7MF3.js +16 -0
- package/docs/assets/iframe-BosoHOVU.js +63 -0
- package/docs/assets/index-CBmJdl9t.js +5 -0
- package/docs/assets/index-CgF2Ctku.js +1 -0
- package/docs/assets/index-CqU62QSU.js +1 -0
- package/docs/assets/index-vG0co4wr.js +8 -0
- package/docs/assets/pl-Cy1N1vsP.js +1 -0
- package/docs/assets/preview-16ImHjAt.js +64 -0
- package/docs/assets/preview-B_ruAZiw.js +2 -0
- package/docs/assets/preview-DFmD0pui.js +1 -0
- package/docs/assets/preview-DFphXfmq.js +1 -0
- package/docs/assets/string-CxIy_vwz.js +1 -0
- package/docs/assets/user-DY5hg_iu.js +1 -0
- package/docs/assets/v4-BZawosSj.js +1 -0
- package/docs/assets/vue-popper-BJbr8Gin.js +24 -0
- package/docs/assets/vue.esm-bundler-BSCmGRHc.js +7 -0
- package/docs/favicon.svg +1 -0
- package/docs/iframe.html +332 -56
- package/docs/index.html +157 -51
- package/docs/index.json +1 -0
- package/docs/nunito-sans-bold-italic.woff2 +0 -0
- package/docs/nunito-sans-bold.woff2 +0 -0
- package/docs/nunito-sans-italic.woff2 +0 -0
- package/docs/nunito-sans-regular.woff2 +0 -0
- package/docs/preview.css +2993 -0
- package/docs/project.json +1 -1
- package/docs/sb-addons/actions-1/manager-bundle.js +3 -0
- package/docs/sb-addons/actions-1/manager-bundle.js.LEGAL.txt +0 -0
- package/docs/sb-addons/controls-3/manager-bundle.js +394 -0
- package/docs/sb-addons/controls-3/manager-bundle.js.LEGAL.txt +0 -0
- package/docs/sb-addons/designs-2/register-panel-bundle.js +665 -0
- package/docs/sb-addons/designs-2/register-panel-bundle.js.LEGAL.txt +127 -0
- package/docs/sb-addons/storybook-6/manager-bundle.js +3 -0
- package/docs/sb-addons/storybook-6/manager-bundle.js.LEGAL.txt +0 -0
- package/docs/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
- package/docs/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
- package/docs/sb-addons/storysource-4/manager-bundle.js +3 -0
- package/docs/sb-addons/storysource-4/manager-bundle.js.LEGAL.txt +0 -0
- package/docs/sb-addons/viewport-5/manager-bundle.js +3 -0
- package/docs/sb-addons/viewport-5/manager-bundle.js.LEGAL.txt +0 -0
- package/docs/sb-common-assets/favicon.svg +1 -0
- package/docs/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/docs/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/docs/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/docs/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/docs/sb-manager/globals-module-info.js +1006 -0
- package/docs/sb-manager/globals-runtime.js +54400 -0
- package/docs/sb-manager/globals.js +48 -0
- package/docs/sb-manager/runtime.js +12089 -0
- package/docs/sb-preview/globals.js +33 -0
- package/docs/sb-preview/runtime.js +9498 -0
- package/jest.config.js +14 -11
- package/lib/js/components/BadgeScore/BadgeScore.stories.ts +13 -10
- package/lib/js/components/BadgeScore/BadgeScore.vue +5 -5
- package/lib/js/components/Banner/Banner.stories.ts +58 -55
- package/lib/js/components/Banner/Banner.vue +3 -3
- package/lib/js/components/Buttons/Button/Button.stories.ts +31 -21
- package/lib/js/components/Buttons/Button/Button.vue +4 -6
- package/lib/js/components/Buttons/IconButton/IconButton.stories.ts +37 -34
- package/lib/js/components/Buttons/IconButton/IconButton.vue +14 -7
- package/lib/js/components/Cards/Card/Card.stories.ts +17 -14
- package/lib/js/components/Cards/Card/Card.vue +4 -3
- package/lib/js/components/Cards/CardExpandable/CardExpandable.stories.ts +8 -7
- package/lib/js/components/Cards/CardExpandable/CardExpandable.vue +3 -2
- package/lib/js/components/Chip/Chip.stories.ts +13 -9
- package/lib/js/components/Chip/Chip.vue +3 -3
- package/lib/js/components/DatePickers/DatePicker/DatePicker.stories.ts +67 -64
- package/lib/js/components/DatePickers/DatePicker/DatePicker.vue +3 -3
- package/lib/js/components/DatePickers/DatePickerBox/DatePickerBox.vue +3 -3
- package/lib/js/components/Divider/Divider.stories.ts +5 -5
- package/lib/js/components/Divider/Divider.vue +4 -2
- package/lib/js/components/Drawer/Drawer.stories.ts +3 -3
- package/lib/js/components/Drawer/Drawer.vue +3 -3
- package/lib/js/components/Drawer/DrawerContent/DrawerContent.stories.ts +1 -1
- package/lib/js/components/Drawer/DrawerContent/DrawerContent.vue +4 -2
- package/lib/js/components/Drawer/DrawerDivider/DrawerDivider.stories.ts +5 -5
- package/lib/js/components/Drawer/DrawerDivider/DrawerDivider.vue +4 -2
- package/lib/js/components/Drawer/DrawerHeader/DrawerHeader.stories.ts +16 -16
- package/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue +3 -3
- package/lib/js/components/Drawer/DrawerListItem/DrawerListItem.stories.ts +4 -3
- package/lib/js/components/Drawer/DrawerListItem/DrawerListItem.vue +3 -3
- package/lib/js/components/Drawer/DrawerListItemGroup/DrawerListItemGroup.stories.ts +1 -1
- package/lib/js/components/Drawer/DrawerListItemGroup/DrawerListItemGroup.vue +4 -2
- package/lib/js/components/Drawer/DrawerSection/DrawerSection.stories.ts +60 -57
- package/lib/js/components/Drawer/DrawerSection/DrawerSection.vue +3 -3
- package/lib/js/components/Drawer/DrawerTile/DrawerTile.stories.ts +1 -1
- package/lib/js/components/Drawer/DrawerTile/DrawerTile.vue +4 -2
- package/lib/js/components/Dropdown/Dropdown.stories.ts +9 -9
- package/lib/js/components/Dropdown/Dropdown.vue +4 -2
- package/lib/js/components/Form/Checkbox/Checkbox.stories.ts +21 -14
- package/lib/js/components/Form/Checkbox/Checkbox.vue +3 -3
- package/lib/js/components/Form/RadioButton/RadioButton.stories.ts +21 -14
- package/lib/js/components/Form/RadioButton/RadioButton.vue +3 -3
- package/lib/js/components/Form/SelectionControl/SelectionControl.sb.shared.ts +13 -10
- package/lib/js/components/Form/SelectionControl/SelectionControl.vue +3 -3
- package/lib/js/components/Headers/OverlayHeader/OverlayHeader.stories.ts +9 -9
- package/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue +5 -3
- package/lib/js/components/Headers/PageHeader/PageHeader.stories.ts +11 -13
- package/lib/js/components/Headers/PageHeader/PageHeader.vue +4 -2
- package/lib/js/components/Headers/SectionHeader/SectionHeader.stories.ts +65 -63
- package/lib/js/components/Headers/SectionHeader/SectionHeader.vue +6 -6
- package/lib/js/components/IconText/IconText.stories.ts +6 -5
- package/lib/js/components/IconText/IconText.vue +3 -3
- package/lib/js/components/Icons/FeatureIcon/FeatureIcon.stories.ts +15 -11
- package/lib/js/components/Icons/FeatureIcon/FeatureIcon.vue +3 -3
- package/lib/js/components/Icons/Icon/Icon.stories.ts +10 -8
- package/lib/js/components/Icons/Icon/Icon.vue +3 -3
- package/lib/js/components/Image/Image.stories.ts +5 -5
- package/lib/js/components/Image/Image.vue +0 -11
- package/lib/js/components/Layouts/ThreeColumnLayout/ThreeColumnLayout.stories.ts +8 -8
- package/lib/js/components/Layouts/ThreeColumnLayout/ThreeColumnLayout.vue +3 -3
- package/lib/js/components/LoadingBar/LoadingBar.stories.ts +5 -5
- package/lib/js/components/LoadingBar/LoadingBar.vue +3 -3
- package/lib/js/components/Modal/Modal.vue +4 -2
- package/lib/js/components/Modals/Modal/Modal.stories.ts +31 -31
- package/lib/js/components/Modals/Modal/Modal.vue +3 -3
- package/lib/js/components/Modals/ModalDialog/ModalDialog.stories.ts +20 -20
- package/lib/js/components/Modals/ModalDialog/ModalDialog.vue +3 -3
- package/lib/js/components/NumberInCircle/NumberInCircle.stories.ts +5 -5
- package/lib/js/components/NumberInCircle/NumberInCircle.vue +4 -2
- package/lib/js/components/Outline/OutlineDivider/OutlineDivider.stories.ts +12 -7
- package/lib/js/components/Outline/OutlineDivider/OutlineDivider.vue +4 -2
- package/lib/js/components/Outline/OutlineItem/OutlineItem.stories.ts +40 -29
- package/lib/js/components/Outline/OutlineItem/OutlineItem.vue +4 -4
- package/lib/js/components/Outline/OutlineSectionHeader/OutlineSectionHeader.stories.ts +6 -4
- package/lib/js/components/Outline/OutlineSectionHeader/OutlineSectionHeader.vue +4 -2
- package/lib/js/components/Pagination/Pagination.stories.ts +34 -21
- package/lib/js/components/Pagination/Pagination.vue +3 -2
- package/lib/js/components/PopOver/PopOver.stories.ts +9 -9
- package/lib/js/components/PopOver/PopOver.vue +6 -4
- package/lib/js/components/ProgressBar/ProgressBar.stories.ts +48 -41
- package/lib/js/components/ProgressBar/ProgressBar.vue +3 -3
- package/lib/js/components/ProgressDonutChart/ProgressDonutChart.spec.ts +1 -1
- package/lib/js/components/ProgressDonutChart/ProgressDonutChart.stories.ts +28 -24
- package/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue +4 -3
- package/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.stories.ts +82 -73
- package/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue +3 -3
- package/lib/js/components/RichList/GroupRichListItem/GroupRichListItem.stories.ts +26 -20
- package/lib/js/components/RichList/GroupRichListItem/GroupRichListItem.vue +3 -3
- package/lib/js/components/RichList/RichListItem/RichListItem.consts.ts +5 -7
- package/lib/js/components/RichList/RichListItem/RichListItem.stories.ts +25 -18
- package/lib/js/components/RichList/RichListItem/RichListItem.vue +9 -5
- package/lib/js/components/SectionTitle/SectionTitle.stories.ts +5 -4
- package/lib/js/components/SectionTitle/SectionTitle.vue +3 -2
- package/lib/js/components/SelectList/SelectList.stories.ts +1 -1
- package/lib/js/components/SelectList/SelectList.vue +4 -2
- package/lib/js/components/SelectList/SelectListItem/SelectListItem.stories.ts +9 -5
- package/lib/js/components/SelectList/SelectListItem/SelectListItem.vue +3 -3
- package/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.vue +4 -2
- package/lib/js/components/SelectList/SelectListItemTile/SelectListItemTile.stories.ts +5 -2
- package/lib/js/components/SelectList/SelectListItemTile/SelectListItemTile.vue +4 -2
- package/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.stories.ts +51 -42
- package/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.vue +3 -3
- package/lib/js/components/SelectList/SelectListSectionTitle/SelectListSectionTitle.stories.ts +11 -9
- package/lib/js/components/SelectList/SelectListSectionTitle/SelectListSectionTitle.vue +4 -2
- package/lib/js/components/SelectionTile/SelectionTile.stories.ts +46 -38
- package/lib/js/components/Skeleton/Skeleton.stories.ts +5 -5
- package/lib/js/components/Statuses/AccessStatus/AccessStatus.stories.ts +3 -3
- package/lib/js/components/Statuses/AccessStatus/AccessStatus.vue +3 -2
- package/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue +4 -2
- package/lib/js/components/Statuses/BlockadeStatus/BlockedeStatus.stories.ts +3 -3
- package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.stories.ts +22 -17
- package/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue +4 -2
- package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.stories.ts +73 -55
- package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue +3 -2
- package/lib/js/components/SurveyQuestions/SurveyQuestionTextarea.vue +4 -2
- package/lib/js/components/SurveyToggle/SurveyToggle.stories.ts +19 -12
- package/lib/js/components/SurveyToggle/SurveyToggle.vue +4 -2
- package/lib/js/components/Switch/Switch.stories.ts +16 -14
- package/lib/js/components/Switch/Switch.vue +3 -3
- package/lib/js/components/TabItem/TabItem.stories.ts +12 -11
- package/lib/js/components/TabItem/TabItem.vue +3 -3
- package/lib/js/components/TextGroup/TextGroup.stories.ts +20 -16
- package/lib/js/components/TextGroup/TextGroup.vue +1 -1
- package/lib/js/components/Tile/Tile.sb.shared.ts +9 -8
- package/lib/js/components/Tile/Tile.stories.ts +43 -45
- package/lib/js/components/Tile/Tile.vue +3 -2
- package/lib/js/components/Toast/Toast.stories.ts +10 -12
- package/lib/js/components/Toast/Toast.vue +3 -3
- package/lib/js/components/Toggles/CounterToggle/CounterToggle.stories.ts +10 -10
- package/lib/js/components/Toggles/CounterToggle/CounterToggle.vue +3 -3
- package/lib/js/components/Toggles/ToggleButton/ToggleButton.stories.ts +17 -17
- package/lib/js/components/Toggles/ToggleButton/ToggleButton.vue +3 -3
- package/lib/js/components/Tooltip/Tooltip.stories.ts +9 -9
- package/lib/js/components/Tooltip/Tooltip.vue +2 -10
- package/lib/js/components/Well/Well.stories.ts +36 -29
- package/lib/js/components/Well/Well.vue +4 -2
- package/lib/js/composables/hover-state.ts +39 -0
- package/lib/js/icons/fontawesome.ts +1 -1
- package/lib/js/index.ts +2 -1
- package/lib/js/styles/Colors/Colors.stories.ts +1 -1
- package/lib/js/styles/ColorsThemes/ColorsThemes.stories.ts +1 -1
- package/lib/js/styles/ColorsTokensLms/ColorsTokensLms.stories.ts +1 -1
- package/lib/js/styles/ColorsTokensPrimaryBodywork/ColorsTokensPrimaryBodywork.stories.ts +1 -1
- package/lib/js/styles/ColorsTokensPrimaryWnl/ColorsTokensPrimaryWnl.stories.ts +1 -1
- package/lib/js/styles/ItemsColor.vue +3 -3
- package/lib/js/styles/ItemsList.vue +4 -3
- package/lib/js/styles/ItemsTypography.vue +3 -3
- package/lib/js/styles/TypographyTokensLms/TypographyTokensLms.stories.ts +1 -1
- package/lib/js/styles/TypographyVariables/TypographyVariables.stories.ts +1 -1
- package/lib/js/typings.d.ts +3 -4
- package/lib/js/utils/device.ts +7 -0
- package/package.json +27 -26
- package/tsconfig.json +12 -5
- package/vite.config.ts +38 -0
- package/.storybook/main.js +0 -86
- package/babel.config.json +0 -12
- package/docs/117.1156a7c503a067ad8241.manager.bundle.js +0 -2
- package/docs/117.1156a7c503a067ad8241.manager.bundle.js.LICENSE.txt +0 -8
- package/docs/247.6eaf240e.iframe.bundle.js +0 -1
- package/docs/255.721b3744029f102ac772.manager.bundle.js +0 -2
- package/docs/255.721b3744029f102ac772.manager.bundle.js.LICENSE.txt +0 -12
- package/docs/286.23828fb3.iframe.bundle.js +0 -2
- package/docs/286.23828fb3.iframe.bundle.js.LICENSE.txt +0 -31
- package/docs/295.4e52f65e605e88f7b915.manager.bundle.js +0 -1
- package/docs/315.76786aa14c329ce07ff9.manager.bundle.js +0 -2
- package/docs/315.76786aa14c329ce07ff9.manager.bundle.js.LICENSE.txt +0 -94
- package/docs/317.bb9fa3422a439c11ef07.manager.bundle.js +0 -1
- package/docs/363.5eecfb3735eae61195ab.manager.bundle.js +0 -586
- package/docs/363.5eecfb3735eae61195ab.manager.bundle.js.LICENSE.txt +0 -23
- package/docs/39.0fa13ab1.iframe.bundle.js +0 -2
- package/docs/39.0fa13ab1.iframe.bundle.js.LICENSE.txt +0 -14
- package/docs/407.e7bfe1ea814fec553911.manager.bundle.js +0 -2
- package/docs/407.e7bfe1ea814fec553911.manager.bundle.js.LICENSE.txt +0 -31
- package/docs/594.bb1a9f64.iframe.bundle.js +0 -2
- package/docs/594.bb1a9f64.iframe.bundle.js.LICENSE.txt +0 -12
- package/docs/600.5586e4df861d64de85f8.manager.bundle.js +0 -1
- package/docs/651.3a01b956.iframe.bundle.js +0 -1
- package/docs/690.46a1e07a.iframe.bundle.js +0 -1
- package/docs/701.691b9947.iframe.bundle.js +0 -1
- package/docs/935.19d3d944.iframe.bundle.js +0 -2
- package/docs/935.19d3d944.iframe.bundle.js.LICENSE.txt +0 -17
- package/docs/949.b11a185a.iframe.bundle.js +0 -2
- package/docs/949.b11a185a.iframe.bundle.js.LICENSE.txt +0 -69
- package/docs/962.ec348c19.iframe.bundle.js +0 -2
- package/docs/962.ec348c19.iframe.bundle.js.LICENSE.txt +0 -8
- package/docs/977.a265714880f883237672.manager.bundle.js +0 -1
- package/docs/favicon.ico +0 -0
- package/docs/main.2c610e68.iframe.bundle.js +0 -2
- package/docs/main.2c610e68.iframe.bundle.js.LICENSE.txt +0 -1
- package/docs/main.ec4e5d4f1933fc03f588.manager.bundle.js +0 -1
- package/docs/runtime~main.8a21756dfcf63c109f1d.manager.bundle.js +0 -1
- package/docs/runtime~main.c8f2837a.iframe.bundle.js +0 -1
- package/vue.config.js +0 -67
- /package/{.eslintrc.js → .eslintrc.cjs} +0 -0
- /package/docs/{static/media/lato-ext-300.dd124df8.woff2 → ~design-system/lib/fonts/lato/lato-ext-300.woff2} +0 -0
- /package/docs/{static/media/lato-ext-700.4223b364.woff2 → ~design-system/lib/fonts/lato/lato-ext-700.woff2} +0 -0
- /package/docs/{static/media/lato-ext.b267ec5a.woff2 → ~design-system/lib/fonts/lato/lato-ext.woff2} +0 -0
- /package/docs/{static/media/lato-latin-300.917632e3.woff2 → ~design-system/lib/fonts/lato/lato-latin-300.woff2} +0 -0
- /package/docs/{static/media/lato-latin-700.f1405bd8.woff2 → ~design-system/lib/fonts/lato/lato-latin-700.woff2} +0 -0
- /package/docs/{static/media/lato-latin.65e877e5.woff2 → ~design-system/lib/fonts/lato/lato-latin.woff2} +0 -0
- /package/lib/js/tests/{emptyModule.ts → emptyModule.cjs} +0 -0
- /package/lib/js/tests/{emptyTransformer.ts → emptyTransformer.cjs} +0 -0
- /package/{stylelint.config.js → stylelint.config.cjs} +0 -0
package/jest.config.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
export default {
|
|
2
2
|
verbose: true,
|
|
3
|
-
preset: '
|
|
4
|
-
testEnvironment: 'jsdom',
|
|
3
|
+
preset: 'ts-jest',
|
|
4
|
+
testEnvironment: 'jest-environment-jsdom',
|
|
5
5
|
moduleNameMapper: {
|
|
6
|
-
'^
|
|
7
|
-
'^design-system/styles/(.*)$': '<rootDir>/lib/styles/$1',
|
|
8
|
-
'^design-system/images/(.*)$': '<rootDir>/lib/images/$1',
|
|
9
|
-
'^vue-popperjs/dist/vue-popper.css': '<rootDir>/lib/js/tests/emptyModule.ts',
|
|
6
|
+
'^vue-popperjs/dist/vue-popper.css': '<rootDir>/lib/js/tests/emptyModule.cjs',
|
|
10
7
|
},
|
|
11
8
|
testMatch: ['<rootDir>/lib/js/**/*.spec.ts', '<rootDir>/tools/importers/*.spec.ts'],
|
|
12
9
|
transform: {
|
|
13
10
|
'^.+\\.js$': 'babel-jest',
|
|
14
11
|
'^.+\\.ts$': 'ts-jest',
|
|
15
12
|
'.*\\.(vue)$': '@vue/vue3-jest',
|
|
16
|
-
'^.+\\.scss': '<rootDir>/lib/js/tests/emptyTransformer.
|
|
17
|
-
'^.+\\.svg$': '<rootDir>/lib/js/tests/emptyTransformer.
|
|
13
|
+
'^.+\\.scss': '<rootDir>/lib/js/tests/emptyTransformer.cjs',
|
|
14
|
+
'^.+\\.svg$': '<rootDir>/lib/js/tests/emptyTransformer.cjs',
|
|
18
15
|
},
|
|
19
|
-
moduleFileExtensions: ['js', '
|
|
20
|
-
|
|
16
|
+
moduleFileExtensions: ['js', 'mjs', 'ts', 'json', 'vue'],
|
|
21
17
|
setupFilesAfterEnv: ['<rootDir>/lib/js/typings.d.ts', '<rootDir>/lib/js/tests/globals.ts'],
|
|
22
18
|
testEnvironmentOptions: {
|
|
23
19
|
customExportConditions: ['node', 'node-addons'],
|
|
24
20
|
},
|
|
21
|
+
globals: {
|
|
22
|
+
'vue-jest': {
|
|
23
|
+
compilerOptions: {
|
|
24
|
+
whitespace: 'preserve',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
25
28
|
};
|
|
@@ -20,7 +20,7 @@ const StoryTemplate: StoryFn<{
|
|
|
20
20
|
}> = (args) => ({
|
|
21
21
|
components: { BadgeScore },
|
|
22
22
|
setup() {
|
|
23
|
-
return
|
|
23
|
+
return args;
|
|
24
24
|
},
|
|
25
25
|
template:
|
|
26
26
|
'<badge-score :color="color" :suffix="suffix" :text="text" :size="size" :icon="ICONS[icon]" :fullWidth="fullWidth" />',
|
|
@@ -37,22 +37,25 @@ Interactive.args = {
|
|
|
37
37
|
text: '42',
|
|
38
38
|
suffix: '%',
|
|
39
39
|
fullWidth: false,
|
|
40
|
+
color: BADGE_SCORE_COLORS.SUCCESS,
|
|
41
|
+
icon: 'FA_LIGHTBULB',
|
|
42
|
+
size: BADGE_SCORE_SIZES.MEDIUM,
|
|
40
43
|
};
|
|
41
44
|
|
|
42
45
|
Interactive.argTypes = {
|
|
43
|
-
text: { control:
|
|
44
|
-
suffix: { control:
|
|
46
|
+
text: { control: 'text' },
|
|
47
|
+
suffix: { control: 'text' },
|
|
45
48
|
color: {
|
|
46
|
-
control:
|
|
47
|
-
|
|
49
|
+
control: 'select',
|
|
50
|
+
options: Object.values(BADGE_SCORE_COLORS),
|
|
48
51
|
},
|
|
49
52
|
icon: {
|
|
50
|
-
control:
|
|
51
|
-
|
|
53
|
+
control: 'select',
|
|
54
|
+
options: [null, ...Object.keys(ICONS)],
|
|
52
55
|
},
|
|
53
56
|
size: {
|
|
54
|
-
control:
|
|
55
|
-
|
|
57
|
+
control: 'select',
|
|
58
|
+
options: Object.values(BADGE_SCORE_SIZES),
|
|
56
59
|
},
|
|
57
60
|
};
|
|
58
61
|
|
|
@@ -67,7 +70,7 @@ Interactive.parameters = {
|
|
|
67
70
|
const StaticStoryTemplate: StoryFn<{}> = (args) => ({
|
|
68
71
|
components: { BadgeScore },
|
|
69
72
|
setup() {
|
|
70
|
-
return
|
|
73
|
+
return args;
|
|
71
74
|
},
|
|
72
75
|
template:
|
|
73
76
|
'<badge-score :color="BADGE_SCORE_COLORS.WARNING" suffix="%" text="1" :full-width="fullWidth" />',
|
|
@@ -160,9 +160,9 @@ $badge-score-colors: (
|
|
|
160
160
|
<script lang="ts">
|
|
161
161
|
import { BADGE_SCORE_COLORS, BADGE_SCORE_SIZES } from './BadgeScore.consts';
|
|
162
162
|
import WnlIcon, { ICON_SIZES, ICONS } from '../Icons/Icon';
|
|
163
|
-
import { toRaw } from 'vue';
|
|
163
|
+
import { defineComponent, toRaw } from 'vue';
|
|
164
164
|
|
|
165
|
-
export default {
|
|
165
|
+
export default defineComponent({
|
|
166
166
|
name: 'BadgeScore',
|
|
167
167
|
components: {
|
|
168
168
|
WnlIcon,
|
|
@@ -180,7 +180,7 @@ export default {
|
|
|
180
180
|
color: {
|
|
181
181
|
type: String,
|
|
182
182
|
required: true,
|
|
183
|
-
validator(color) {
|
|
183
|
+
validator(color: any) {
|
|
184
184
|
return Object.values(BADGE_SCORE_COLORS).includes(color);
|
|
185
185
|
},
|
|
186
186
|
},
|
|
@@ -194,7 +194,7 @@ export default {
|
|
|
194
194
|
size: {
|
|
195
195
|
type: String,
|
|
196
196
|
default: BADGE_SCORE_SIZES.MEDIUM,
|
|
197
|
-
validator(size) {
|
|
197
|
+
validator(size: any) {
|
|
198
198
|
return Object.values(BADGE_SCORE_SIZES).includes(size);
|
|
199
199
|
},
|
|
200
200
|
},
|
|
@@ -222,5 +222,5 @@ export default {
|
|
|
222
222
|
return ICON_SIZES.SMALL;
|
|
223
223
|
},
|
|
224
224
|
},
|
|
225
|
-
};
|
|
225
|
+
});
|
|
226
226
|
</script>
|
|
@@ -3,56 +3,61 @@ import { BANNER_COLORS, BANNER_LAYOUTS } from './Banner.consts';
|
|
|
3
3
|
import { ICONS } from '../Icons/Icon';
|
|
4
4
|
|
|
5
5
|
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
6
|
+
import { useArgs } from '@storybook/preview-api';
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
title: 'Components/Banner',
|
|
9
10
|
component: Banner,
|
|
10
11
|
} as Meta<typeof Banner>;
|
|
11
12
|
|
|
12
|
-
const StoryTemplate: StoryFn<typeof Banner> = (args
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
ICONS: Object.freeze(ICONS),
|
|
20
|
-
};
|
|
21
|
-
},
|
|
22
|
-
methods: {
|
|
23
|
-
onIsExpandedUpdated(isExpanded) {
|
|
24
|
-
updateArgs({
|
|
25
|
-
isExpanded,
|
|
26
|
-
});
|
|
13
|
+
const StoryTemplate: StoryFn<typeof Banner> = (args) => {
|
|
14
|
+
const [_, updateArgs] = useArgs();
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
components: { Banner },
|
|
18
|
+
setup() {
|
|
19
|
+
return args;
|
|
27
20
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
21
|
+
data() {
|
|
22
|
+
return {
|
|
23
|
+
ICONS: Object.freeze(ICONS),
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
methods: {
|
|
27
|
+
onIsExpandedUpdated(isExpanded) {
|
|
28
|
+
updateArgs({
|
|
29
|
+
isExpanded,
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
template: `
|
|
34
|
+
<banner
|
|
35
|
+
:closable="closable"
|
|
36
|
+
:icon="ICONS[icon]"
|
|
37
|
+
:color="color"
|
|
38
|
+
:title="title"
|
|
39
|
+
:buttonText="buttonText"
|
|
40
|
+
:layout="layout"
|
|
41
|
+
:is-expanded="isExpanded"
|
|
42
|
+
:is-icon-hidden-on-mobile="isIconHiddenOnMobile"
|
|
43
|
+
@update:isExpanded="onIsExpandedUpdated"
|
|
44
|
+
>
|
|
45
|
+
<template #defaultText><span v-html="defaultText" /></template>
|
|
46
|
+
<template v-if="expandedText" #expandedText>
|
|
47
|
+
<div v-html="expandedText" />
|
|
48
|
+
</template>
|
|
49
|
+
<template v-if="rightSlot" #rightSlot>
|
|
50
|
+
<div v-html="rightSlot" />
|
|
51
|
+
</template>
|
|
52
|
+
</banner>`,
|
|
53
|
+
};
|
|
54
|
+
};
|
|
50
55
|
|
|
51
56
|
export const Interactive = StoryTemplate.bind({});
|
|
52
57
|
|
|
53
58
|
const args = {
|
|
54
|
-
closable:
|
|
55
|
-
icon:
|
|
59
|
+
closable: false,
|
|
60
|
+
icon: null,
|
|
56
61
|
color: BANNER_COLORS.DEFAULT,
|
|
57
62
|
title: 'Banner Title',
|
|
58
63
|
buttonText: '',
|
|
@@ -66,41 +71,39 @@ const args = {
|
|
|
66
71
|
} as Args;
|
|
67
72
|
|
|
68
73
|
const argTypes = {
|
|
69
|
-
closable: { control:
|
|
74
|
+
closable: { control: 'boolean' },
|
|
70
75
|
icon: {
|
|
71
|
-
control:
|
|
72
|
-
|
|
76
|
+
control: 'select',
|
|
77
|
+
options: [null, ...Object.keys(ICONS)],
|
|
73
78
|
},
|
|
74
79
|
isIconHiddenOnMobile: {
|
|
75
|
-
control:
|
|
76
|
-
defaultValue: false,
|
|
80
|
+
control: 'boolean',
|
|
77
81
|
},
|
|
78
82
|
color: {
|
|
79
|
-
control:
|
|
80
|
-
|
|
83
|
+
control: 'select',
|
|
84
|
+
options: Object.values(BANNER_COLORS),
|
|
81
85
|
},
|
|
82
86
|
title: {
|
|
83
|
-
control:
|
|
87
|
+
control: 'text',
|
|
84
88
|
},
|
|
85
89
|
buttonText: {
|
|
86
|
-
control:
|
|
87
|
-
defaultValue: '',
|
|
90
|
+
control: 'text',
|
|
88
91
|
},
|
|
89
92
|
layout: {
|
|
90
|
-
control:
|
|
91
|
-
|
|
93
|
+
control: 'select',
|
|
94
|
+
options: Object.values(BANNER_LAYOUTS),
|
|
92
95
|
},
|
|
93
96
|
defaultText: {
|
|
94
|
-
control:
|
|
97
|
+
control: 'text',
|
|
95
98
|
},
|
|
96
99
|
expandedText: {
|
|
97
|
-
control:
|
|
100
|
+
control: 'text',
|
|
98
101
|
},
|
|
99
102
|
rightSlot: {
|
|
100
|
-
control:
|
|
103
|
+
control: 'text',
|
|
101
104
|
},
|
|
102
105
|
isExpanded: {
|
|
103
|
-
control:
|
|
106
|
+
control: 'boolean',
|
|
104
107
|
},
|
|
105
108
|
} as ArgTypes;
|
|
106
109
|
|
|
@@ -294,9 +294,9 @@ import DsDivider, { DIVIDER_PROMINENCES } from '../Divider';
|
|
|
294
294
|
import DsIcon, { ICONS } from '../Icons/Icon';
|
|
295
295
|
import DsIconButton, { ICON_BUTTON_COLORS, ICON_BUTTON_SIZES } from '../Buttons/IconButton';
|
|
296
296
|
import { BANNER_COLORS, BANNER_LAYOUTS } from './Banner.consts';
|
|
297
|
-
import { toRaw } from 'vue';
|
|
297
|
+
import { defineComponent, toRaw } from 'vue';
|
|
298
298
|
|
|
299
|
-
export default {
|
|
299
|
+
export default defineComponent({
|
|
300
300
|
name: 'Banner',
|
|
301
301
|
components: {
|
|
302
302
|
DsButton,
|
|
@@ -389,5 +389,5 @@ export default {
|
|
|
389
389
|
this.$emit('update:isExpanded', this.isExpandedInternal);
|
|
390
390
|
},
|
|
391
391
|
},
|
|
392
|
-
};
|
|
392
|
+
});
|
|
393
393
|
</script>
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import Button from './Button.vue';
|
|
2
2
|
import {
|
|
3
|
-
BUTTON_SIZES,
|
|
4
|
-
BUTTON_TYPES,
|
|
5
3
|
BUTTON_COLORS,
|
|
6
|
-
BUTTON_STATES,
|
|
7
|
-
BUTTON_RADIUSES,
|
|
8
4
|
BUTTON_ELEVATIONS,
|
|
5
|
+
BUTTON_RADIUSES,
|
|
6
|
+
BUTTON_SIZES,
|
|
7
|
+
BUTTON_STATES,
|
|
8
|
+
BUTTON_TYPES,
|
|
9
9
|
} from './Button.consts';
|
|
10
10
|
import { ICONS } from '../../Icons/Icon';
|
|
11
11
|
|
|
12
12
|
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
13
|
+
import { withActions } from '@storybook/addon-actions/decorator';
|
|
13
14
|
|
|
14
15
|
export default {
|
|
15
16
|
title: 'Components/Buttons/Button',
|
|
16
17
|
component: Button,
|
|
18
|
+
decorators: [withActions],
|
|
17
19
|
} as Meta<typeof Button>;
|
|
18
20
|
|
|
19
21
|
const StoryTemplate: StoryFn<typeof Button> = (args) => ({
|
|
20
22
|
components: { Button },
|
|
21
23
|
setup() {
|
|
22
|
-
return
|
|
24
|
+
return args;
|
|
23
25
|
},
|
|
24
26
|
template: `
|
|
25
27
|
<div :class="{ contrastBackground: isInverted }">
|
|
@@ -52,40 +54,48 @@ export const Interactive = StoryTemplate.bind({});
|
|
|
52
54
|
|
|
53
55
|
const args = {
|
|
54
56
|
slotText: 'Hello',
|
|
57
|
+
size: BUTTON_SIZES.MEDIUM,
|
|
58
|
+
type: BUTTON_TYPES.FILLED,
|
|
59
|
+
color: BUTTON_COLORS.PRIMARY,
|
|
60
|
+
radius: BUTTON_RADIUSES.CAPSULE,
|
|
61
|
+
state: BUTTON_STATES.DEFAULT,
|
|
62
|
+
elevation: BUTTON_ELEVATIONS.NONE,
|
|
63
|
+
iconLeft: 'FA_CHEVRON_LEFT',
|
|
64
|
+
iconRight: null,
|
|
55
65
|
} as Args;
|
|
56
66
|
|
|
57
67
|
const argTypes = {
|
|
58
68
|
size: {
|
|
59
|
-
control:
|
|
60
|
-
|
|
69
|
+
control: 'select',
|
|
70
|
+
options: Object.values(BUTTON_SIZES),
|
|
61
71
|
},
|
|
62
72
|
type: {
|
|
63
|
-
control:
|
|
64
|
-
|
|
73
|
+
control: 'select',
|
|
74
|
+
options: Object.values(BUTTON_TYPES),
|
|
65
75
|
},
|
|
66
76
|
color: {
|
|
67
|
-
control:
|
|
68
|
-
|
|
77
|
+
control: 'select',
|
|
78
|
+
options: Object.values(BUTTON_COLORS),
|
|
69
79
|
},
|
|
70
80
|
radius: {
|
|
71
|
-
control:
|
|
72
|
-
|
|
81
|
+
control: 'select',
|
|
82
|
+
options: Object.values(BUTTON_RADIUSES),
|
|
73
83
|
},
|
|
74
84
|
state: {
|
|
75
|
-
control:
|
|
76
|
-
|
|
85
|
+
control: 'select',
|
|
86
|
+
options: Object.values(BUTTON_STATES),
|
|
77
87
|
},
|
|
78
88
|
elevation: {
|
|
79
|
-
control:
|
|
80
|
-
|
|
89
|
+
control: 'select',
|
|
90
|
+
options: Object.values(BUTTON_ELEVATIONS),
|
|
81
91
|
},
|
|
82
92
|
iconLeft: {
|
|
83
|
-
control:
|
|
84
|
-
|
|
93
|
+
control: 'select',
|
|
94
|
+
options: [null, ...Object.keys(ICONS)],
|
|
85
95
|
},
|
|
86
96
|
iconRight: {
|
|
87
|
-
control:
|
|
88
|
-
|
|
97
|
+
control: 'select',
|
|
98
|
+
options: [null, ...Object.keys(ICONS)],
|
|
89
99
|
},
|
|
90
100
|
} as ArgTypes;
|
|
91
101
|
|
|
@@ -45,9 +45,7 @@
|
|
|
45
45
|
</span>
|
|
46
46
|
</template>
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
@import '../../../../styles/components/buttons';
|
|
50
|
-
</style>
|
|
48
|
+
<!-- Looking for styles? These are defined in the global styles file: design-system.scss > _buttons.scss -->
|
|
51
49
|
|
|
52
50
|
<script lang="ts">
|
|
53
51
|
import { Value } from '../../../utils/type.utils';
|
|
@@ -63,9 +61,9 @@ import {
|
|
|
63
61
|
} from './Button.consts';
|
|
64
62
|
|
|
65
63
|
import { ICON_BUTTON_COLORS } from '../IconButton/IconButton.consts';
|
|
66
|
-
import { toRaw } from 'vue';
|
|
64
|
+
import { defineComponent, toRaw } from 'vue';
|
|
67
65
|
|
|
68
|
-
export default {
|
|
66
|
+
export default defineComponent({
|
|
69
67
|
// eslint-disable-next-line vue/no-reserved-component-names
|
|
70
68
|
name: 'Button',
|
|
71
69
|
components: {
|
|
@@ -163,5 +161,5 @@ export default {
|
|
|
163
161
|
return ICON_SIZES.SMALL;
|
|
164
162
|
},
|
|
165
163
|
},
|
|
166
|
-
};
|
|
164
|
+
});
|
|
167
165
|
</script>
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import IconButton from './IconButton.vue';
|
|
2
2
|
import {
|
|
3
|
-
ICON_BUTTON_SIZES,
|
|
4
3
|
ICON_BUTTON_COLOR_SCHEMES,
|
|
5
|
-
ICON_BUTTON_TYPES,
|
|
6
4
|
ICON_BUTTON_COLORS,
|
|
5
|
+
ICON_BUTTON_SIZES,
|
|
7
6
|
ICON_BUTTON_STATES,
|
|
7
|
+
ICON_BUTTON_TYPES,
|
|
8
8
|
} from './IconButton.consts';
|
|
9
9
|
import { BUTTON_ELEVATIONS, BUTTON_RADIUSES } from '../Button';
|
|
10
10
|
import { ICONS } from '../../Icons/Icon';
|
|
11
11
|
|
|
12
12
|
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
13
|
+
import { withActions } from '@storybook/addon-actions/decorator';
|
|
13
14
|
|
|
14
15
|
export default {
|
|
15
16
|
title: 'Components/Buttons/IconButton',
|
|
16
17
|
component: IconButton,
|
|
18
|
+
decorators: [withActions],
|
|
17
19
|
} as Meta<typeof IconButton>;
|
|
18
20
|
|
|
19
21
|
const StoryTemplate: StoryFn<typeof IconButton> = (args) => ({
|
|
20
22
|
components: { IconButton },
|
|
21
23
|
setup() {
|
|
22
|
-
return
|
|
24
|
+
return args;
|
|
23
25
|
},
|
|
24
26
|
computed: {
|
|
25
27
|
isInverted() {
|
|
@@ -59,40 +61,41 @@ const args = {
|
|
|
59
61
|
elevation: BUTTON_ELEVATIONS.NONE,
|
|
60
62
|
color: 'primary',
|
|
61
63
|
state: ICON_BUTTON_STATES.DEFAULT,
|
|
64
|
+
icon: 'FA_XMARK',
|
|
62
65
|
} as Args;
|
|
63
66
|
|
|
64
67
|
const argTypes = {
|
|
65
68
|
size: {
|
|
66
|
-
control:
|
|
67
|
-
|
|
69
|
+
control: 'select',
|
|
70
|
+
options: Object.values(ICON_BUTTON_SIZES),
|
|
68
71
|
},
|
|
69
72
|
type: {
|
|
70
|
-
control:
|
|
71
|
-
|
|
73
|
+
control: 'select',
|
|
74
|
+
options: Object.values(ICON_BUTTON_TYPES),
|
|
72
75
|
},
|
|
73
76
|
radius: {
|
|
74
|
-
control:
|
|
75
|
-
|
|
77
|
+
control: 'select',
|
|
78
|
+
options: Object.values(BUTTON_RADIUSES),
|
|
76
79
|
},
|
|
77
80
|
icon: {
|
|
78
|
-
control:
|
|
79
|
-
|
|
81
|
+
control: 'select',
|
|
82
|
+
options: Object.keys(ICONS),
|
|
80
83
|
},
|
|
81
84
|
color: {
|
|
82
|
-
control:
|
|
83
|
-
|
|
85
|
+
control: 'select',
|
|
86
|
+
options: Object.values(ICON_BUTTON_COLORS),
|
|
84
87
|
},
|
|
85
88
|
colorScheme: {
|
|
86
|
-
control:
|
|
87
|
-
|
|
89
|
+
control: 'select',
|
|
90
|
+
options: Object.values(ICON_BUTTON_COLOR_SCHEMES),
|
|
88
91
|
},
|
|
89
92
|
elevation: {
|
|
90
|
-
control:
|
|
91
|
-
|
|
93
|
+
control: 'select',
|
|
94
|
+
options: Object.values(BUTTON_ELEVATIONS),
|
|
92
95
|
},
|
|
93
96
|
state: {
|
|
94
|
-
control:
|
|
95
|
-
|
|
97
|
+
control: 'select',
|
|
98
|
+
options: Object.values(ICON_BUTTON_STATES),
|
|
96
99
|
},
|
|
97
100
|
} as ArgTypes;
|
|
98
101
|
|
|
@@ -111,41 +114,41 @@ Interactive.parameters = {
|
|
|
111
114
|
|
|
112
115
|
const argTypesDisabled = {
|
|
113
116
|
size: {
|
|
114
|
-
|
|
117
|
+
disable: true,
|
|
115
118
|
},
|
|
116
119
|
type: {
|
|
117
|
-
|
|
120
|
+
disable: true,
|
|
118
121
|
},
|
|
119
122
|
radius: {
|
|
120
|
-
|
|
123
|
+
disable: true,
|
|
121
124
|
},
|
|
122
125
|
icon: {
|
|
123
|
-
|
|
126
|
+
disable: true,
|
|
124
127
|
},
|
|
125
128
|
color: {
|
|
126
|
-
|
|
129
|
+
disable: true,
|
|
127
130
|
},
|
|
128
131
|
colorScheme: {
|
|
129
|
-
|
|
132
|
+
disable: true,
|
|
130
133
|
},
|
|
131
134
|
elevation: {
|
|
132
|
-
|
|
135
|
+
disable: true,
|
|
133
136
|
},
|
|
134
137
|
state: {
|
|
135
|
-
|
|
138
|
+
disable: true,
|
|
136
139
|
},
|
|
137
140
|
touchable: {
|
|
138
|
-
|
|
141
|
+
disable: true,
|
|
139
142
|
},
|
|
140
143
|
default: {
|
|
141
|
-
|
|
144
|
+
disable: true,
|
|
142
145
|
},
|
|
143
146
|
} as ArgTypes;
|
|
144
147
|
|
|
145
148
|
const StoryFilledWithLabelTemplate: StoryFn<typeof IconButton> = (args) => ({
|
|
146
149
|
components: { IconButton },
|
|
147
150
|
setup() {
|
|
148
|
-
return
|
|
151
|
+
return args;
|
|
149
152
|
},
|
|
150
153
|
template:
|
|
151
154
|
'<icon-button :icon="ICONS.FA_XMARK" :type="ICON_BUTTON_TYPES.FILLED" >Zamknij</icon-button>',
|
|
@@ -163,7 +166,7 @@ FilledWithLabel.argTypes = argTypesDisabled;
|
|
|
163
166
|
const StoryOutlinedRoundedTemplate: StoryFn<typeof IconButton> = (args) => ({
|
|
164
167
|
components: { IconButton },
|
|
165
168
|
setup() {
|
|
166
|
-
return
|
|
169
|
+
return args;
|
|
167
170
|
},
|
|
168
171
|
template:
|
|
169
172
|
'<icon-button :icon="ICONS.FA_CHEVRON_RIGHT" :type="ICON_BUTTON_TYPES.OUTLINED" :radius="BUTTON_RADIUSES.ROUNDED" />',
|
|
@@ -182,7 +185,7 @@ OutlinedRounded.argTypes = argTypesDisabled;
|
|
|
182
185
|
const StoryFilledPrimaryTemplate: StoryFn<typeof IconButton> = (args) => ({
|
|
183
186
|
components: { IconButton },
|
|
184
187
|
setup() {
|
|
185
|
-
return
|
|
188
|
+
return args;
|
|
186
189
|
},
|
|
187
190
|
template:
|
|
188
191
|
'<icon-button :icon="ICONS.FA_XMARK" :type="ICON_BUTTON_TYPES.FILLED" :color="ICON_BUTTON_COLORS.PRIMARY" :size="ICON_BUTTON_SIZES.X_SMALL" />',
|
|
@@ -202,7 +205,7 @@ FilledPrimary.argTypes = argTypesDisabled;
|
|
|
202
205
|
const StoryIconOnlyInfoTemplate: StoryFn<typeof IconButton> = (args) => ({
|
|
203
206
|
components: { IconButton },
|
|
204
207
|
setup() {
|
|
205
|
-
return
|
|
208
|
+
return args;
|
|
206
209
|
},
|
|
207
210
|
template:
|
|
208
211
|
'<icon-button :icon="ICONS.FA_FLAG" :color="ICON_BUTTON_COLORS.INFO" :size="ICON_BUTTON_SIZES.MEDIUM" />',
|
|
@@ -221,7 +224,7 @@ IconOnlyInfo.argTypes = argTypesDisabled;
|
|
|
221
224
|
const StoryIconOnlyWarningTemplate: StoryFn<typeof IconButton> = (args) => ({
|
|
222
225
|
components: { IconButton },
|
|
223
226
|
setup() {
|
|
224
|
-
return
|
|
227
|
+
return args;
|
|
225
228
|
},
|
|
226
229
|
template:
|
|
227
230
|
'<icon-button :icon="ICONS.HEAD_WITH_QUESTION_MARK" :color="ICON_BUTTON_COLORS.WARNING" :size="ICON_BUTTON_SIZES.MEDIUM" />',
|
|
@@ -17,8 +17,10 @@
|
|
|
17
17
|
'-ds-touchable': touchable,
|
|
18
18
|
}"
|
|
19
19
|
:style="{ color: computedColor }"
|
|
20
|
-
@mouseover="
|
|
21
|
-
@mouseleave="
|
|
20
|
+
@mouseover="mouseOver"
|
|
21
|
+
@mouseleave="mouseLeave"
|
|
22
|
+
@touchstart="touchStart"
|
|
23
|
+
@touchend="touchEnd"
|
|
22
24
|
>
|
|
23
25
|
<div
|
|
24
26
|
v-if="$slots.default && type !== ICON_BUTTON_TYPES.ICON_ONLY"
|
|
@@ -40,7 +42,7 @@
|
|
|
40
42
|
}"
|
|
41
43
|
:radius="radius"
|
|
42
44
|
:type="buttonType"
|
|
43
|
-
:state="
|
|
45
|
+
:state="isHovered ? ICON_BUTTON_STATES.HOVERED : ICON_BUTTON_STATES.DEFAULT"
|
|
44
46
|
:elevation="elevation"
|
|
45
47
|
:color="isButtonColor ? color : null"
|
|
46
48
|
>
|
|
@@ -273,7 +275,8 @@ import {
|
|
|
273
275
|
ICON_BUTTON_TYPES,
|
|
274
276
|
} from './IconButton.consts';
|
|
275
277
|
import { Value } from '../../../utils/type.utils';
|
|
276
|
-
import { toRaw } from 'vue';
|
|
278
|
+
import { defineComponent, toRaw } from 'vue';
|
|
279
|
+
import { useHoverState } from '../../../composables/hover-state';
|
|
277
280
|
|
|
278
281
|
const ICON_ONLY_ICON_SIZES_MAP = {
|
|
279
282
|
[ICON_BUTTON_SIZES.XX_SMALL]: ICON_SIZES.XXX_SMALL,
|
|
@@ -283,7 +286,7 @@ const ICON_ONLY_ICON_SIZES_MAP = {
|
|
|
283
286
|
[ICON_BUTTON_SIZES.LARGE]: ICON_SIZES.MEDIUM,
|
|
284
287
|
} as const;
|
|
285
288
|
|
|
286
|
-
export default {
|
|
289
|
+
export default defineComponent({
|
|
287
290
|
name: 'IconButton',
|
|
288
291
|
components: {
|
|
289
292
|
WnlIcon,
|
|
@@ -351,9 +354,13 @@ export default {
|
|
|
351
354
|
},
|
|
352
355
|
},
|
|
353
356
|
},
|
|
357
|
+
setup() {
|
|
358
|
+
return {
|
|
359
|
+
...useHoverState(),
|
|
360
|
+
};
|
|
361
|
+
},
|
|
354
362
|
data() {
|
|
355
363
|
return {
|
|
356
|
-
hovered: false,
|
|
357
364
|
ICONS: Object.freeze(ICONS),
|
|
358
365
|
ICON_SIZES: Object.freeze(ICON_SIZES),
|
|
359
366
|
ICON_BUTTON_SIZES: Object.freeze(ICON_BUTTON_SIZES),
|
|
@@ -402,5 +409,5 @@ export default {
|
|
|
402
409
|
return `-ds-color-${this.color}`;
|
|
403
410
|
},
|
|
404
411
|
},
|
|
405
|
-
};
|
|
412
|
+
});
|
|
406
413
|
</script>
|