@bethinkpl/design-system 26.16.0 → 27.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/dist/RadioButton-BWi6jLxx.js +63 -0
- package/dist/RadioButton-BWi6jLxx.js.map +1 -0
- package/dist/RadioButton-DSmKwvPr.js +63 -0
- package/dist/RadioButton-DSmKwvPr.js.map +1 -0
- package/dist/design-system.js +266 -0
- package/dist/design-system.js.map +1 -0
- package/dist/design-system.umd.cjs +18 -18
- package/dist/design-system.umd.cjs.map +1 -1
- package/dist/index-BzPDEKft.js +24356 -0
- package/dist/index-BzPDEKft.js.map +1 -0
- package/dist/index-Oq81NaeJ.js +1388 -0
- package/dist/index-Oq81NaeJ.js.map +1 -0
- package/dist/index-UMXgzRbZ.js +24356 -0
- package/dist/index-UMXgzRbZ.js.map +1 -0
- package/dist/lib/js/components/Banner/Banner.consts.d.ts +4 -4
- package/dist/lib/js/components/Banner/Banner.vue.d.ts +49 -1824
- package/dist/lib/js/components/Buttons/Button/Button.vue.d.ts +41 -443
- package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +77 -427
- package/dist/lib/js/components/Cards/Card/Card.consts.d.ts +5 -0
- package/dist/lib/js/components/Cards/Card/Card.vue.d.ts +52 -175
- package/dist/lib/js/components/Cards/Card/index.d.ts +1 -0
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +116 -154
- package/dist/lib/js/components/Chip/Chip.vue.d.ts +77 -427
- package/dist/lib/js/components/DatePickers/DateBox/DateBox.vue.d.ts +1 -0
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.vue.d.ts +2 -0
- package/dist/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue.d.ts +1 -0
- package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue.d.ts +507 -1557
- package/dist/lib/js/components/Drawer/DrawerListItem/DrawerListItem.vue.d.ts +1 -0
- package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +77 -426
- package/dist/lib/js/components/Drawer/DrawerTile/DrawerTile.vue.d.ts +1 -0
- package/dist/lib/js/components/Form/Checkbox/Checkbox.vue.d.ts +1 -0
- package/dist/lib/js/components/Form/InputField/InputField.types.d.ts +1 -0
- package/dist/lib/js/components/Form/InputField/InputField.vue.d.ts +6 -0
- package/dist/lib/js/components/Form/InputField/useInputFieldWithinForm.d.ts +8 -0
- package/dist/lib/js/components/Form/PasswordField/PasswordField.vue.d.ts +6 -0
- package/dist/lib/js/components/Form/RadioButton/RadioButton.vue.d.ts +1 -0
- package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +77 -426
- package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +76 -426
- package/dist/lib/js/components/Icons/FeatureIcon/FeatureIcon.consts.d.ts +17 -11
- package/dist/lib/js/components/Icons/FeatureIcon/FeatureIcon.vue.d.ts +22 -138
- package/dist/lib/js/components/Icons/Icon/Icon.consts.d.ts +1 -0
- package/dist/lib/js/components/Modal/Modal.vue.d.ts +1 -0
- package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +266 -1079
- package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +270 -1082
- package/dist/lib/js/components/Outline/OutlineItem/OutlineItem.vue.d.ts +1 -0
- package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +78 -426
- package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +2 -1
- package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +1 -0
- package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +6 -4
- package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +4 -2
- package/dist/lib/js/components/SelectList/SelectListItem/SelectListItem.vue.d.ts +1 -0
- package/dist/lib/js/components/SelectList/SelectListItemTile/SelectListItemTile.vue.d.ts +1 -0
- package/dist/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.vue.d.ts +1 -0
- package/dist/lib/js/components/SelectionTile/SelectionTile.vue.d.ts +3 -0
- package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.vue.d.ts +1 -0
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.vue.d.ts +1 -0
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.vue.d.ts +262 -1002
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +268 -1008
- package/dist/lib/js/components/Switch/Switch.vue.d.ts +1 -0
- package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +104 -1806
- package/dist/lib/js/components/Tile/Tile.vue.d.ts +1 -0
- package/dist/lib/js/components/Toast/Toast.vue.d.ts +188 -579
- package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +1 -0
- package/dist/lib/js/icons/fontawesome.d.ts +1 -0
- package/dist/lib/js/index.d.ts +3 -1
- package/dist/lib/js/tests/helpers.d.ts +1 -0
- package/dist/pl-C3BEVRTZ.js +91 -0
- package/dist/pl-C3BEVRTZ.js.map +1 -0
- package/docs/assets/{AccessStatus-DW-L4l_0.js → AccessStatus-DGd8XBwr.js} +1 -1
- package/docs/assets/{AccessStatus.stories-DwCxxAOP.js → AccessStatus.stories-BUpfD_Uw.js} +1 -1
- package/docs/assets/{Avatar-CRVC-fPA.js → Avatar-DJEZDpOI.js} +1 -1
- package/docs/assets/{Avatar.stories-D7i8UwP9.js → Avatar.stories-D40fYcFF.js} +1 -1
- package/docs/assets/{Badge-h4Z2ZKD4.js → Badge-B8eFbzRx.js} +1 -1
- package/docs/assets/{Badge.stories-Bl04pHS_.js → Badge.stories-DxdwaS-k.js} +3 -3
- package/docs/assets/{BadgeScore-CuteYyZb.js → BadgeScore-ByouU1Eu.js} +1 -1
- package/docs/assets/{BadgeScore.stories-BvHEI0pW.js → BadgeScore.stories-DsodV82W.js} +1 -1
- package/docs/assets/Banner-D5riYdGJ.js +1 -0
- package/docs/assets/Banner.stories-Ch0_NPk4.js +64 -0
- package/docs/assets/{BasicRichListItem-C93Qb4K6.js → BasicRichListItem-NMNh0Xfo.js} +1 -1
- package/docs/assets/{BasicRichListItem.stories-B2smX5s7.js → BasicRichListItem.stories-Gu9n5wvW.js} +2 -2
- package/docs/assets/{BlockadeStatus-B0FY65_h.js → BlockadeStatus-Dqr_LSfC.js} +1 -1
- package/docs/assets/{BlockedeStatus.stories-DZ1mfq2q.js → BlockedeStatus.stories-BKblKF33.js} +1 -1
- package/docs/assets/Button-XuK8IxnR.js +1 -0
- package/docs/assets/{Button.stories-BOpQOZ6x.js → Button.stories-UiGEsaro.js} +5 -3
- package/docs/assets/Card-BhK1CiCP.js +1 -0
- package/docs/assets/Card.stories-BfWbSV_u.js +33 -0
- package/docs/assets/{CardExpandable-BMUVeR31.js → CardExpandable-CPuSx_lW.js} +1 -1
- package/docs/assets/{CardExpandable.stories-CPAZ4mof.js → CardExpandable.stories-mHnNt6zg.js} +1 -1
- package/docs/assets/{Checkbox-CIfSektM.js → Checkbox-g1Bvy8z-.js} +1 -1
- package/docs/assets/{Checkbox.stories-Dt5C89R2.js → Checkbox.stories-DdJRLzJy.js} +1 -1
- package/docs/assets/{Chip-Bi-iKYH0.js → Chip-CGm2pLPD.js} +1 -1
- package/docs/assets/{Chip.stories-BukfI_wY.js → Chip.stories-CnHjkDSI.js} +1 -1
- package/docs/assets/Color-ERTF36HU-8BveRk6J.js +1 -0
- package/docs/assets/{Colors.stories-yICh_E96.js → Colors.stories-BtNgjWxi.js} +1 -1
- package/docs/assets/{ColorsThemes.stories-CKiphr3E.js → ColorsThemes.stories-Ct0Ai41o.js} +1 -1
- package/docs/assets/{ColorsTokensLms.stories-C_hRq1fa.js → ColorsTokensLms.stories-BP-WMJrS.js} +1 -1
- package/docs/assets/{ColorsTokensPrimaryBodywork.stories-TzJMcnGg.js → ColorsTokensPrimaryBodywork.stories-zdX-tf4x.js} +1 -1
- package/docs/assets/{ColorsTokensPrimaryWnl.stories-CCArJaTw.js → ColorsTokensPrimaryWnl.stories-DFVUj_99.js} +1 -1
- package/docs/assets/{CounterToggle-D3jTLdlU.js → CounterToggle-B9hjjWpv.js} +1 -1
- package/docs/assets/{CounterToggle.stories-BZAgprZf.js → CounterToggle.stories-BtS63BEz.js} +1 -1
- package/docs/assets/{DateBox.stories-CNTaIflE.js → DateBox.stories-B7PTVLxc.js} +1 -1
- package/docs/assets/{DatePicker-aMS5YOMW.js → DatePicker-70Dj0lsn.js} +1 -1
- package/docs/assets/{DatePicker.stories-DnojtGGT.js → DatePicker.stories-DZN51CwX.js} +1 -1
- package/docs/assets/{DateRangePicker-B25oMOoU.js → DateRangePicker-D5bqKMMk.js} +1 -1
- package/docs/assets/{DateRangePicker.stories-CaIkM98h.js → DateRangePicker.stories-WhCXoUeh.js} +1 -1
- package/docs/assets/{Divider-BNN8PhWF.js → Divider-NOTDPuJ1.js} +1 -1
- package/docs/assets/{Divider.stories-DQGq5WIM.js → Divider.stories-Cjyx7utt.js} +1 -1
- package/docs/assets/{DocsRenderer-CFRXHY34-DsMNfqFA.js → DocsRenderer-CFRXHY34-BThTLMHt.js} +72 -72
- package/docs/assets/{Drawer-CgEP8-bU.js → Drawer-CrAn35Yo.js} +1 -1
- package/docs/assets/{Drawer.stories-CetCbwOV.js → Drawer.stories-iInS0JV5.js} +1 -1
- package/docs/assets/{DrawerContent-Dna0k_5V.js → DrawerContent-DAIzyQNz.js} +1 -1
- package/docs/assets/{DrawerContent.stories-BqJ3zitz.js → DrawerContent.stories-CBpbbVk_.js} +1 -1
- package/docs/assets/{DrawerDivider-BjBlvEOJ.js → DrawerDivider-CKRXkKRz.js} +1 -1
- package/docs/assets/{DrawerDivider.stories-BN_G8JML.js → DrawerDivider.stories-iQ2J_ExP.js} +1 -1
- package/docs/assets/DrawerHeader-DPBlervR.js +1 -0
- package/docs/assets/{DrawerHeader.stories-CsM4PkKY.js → DrawerHeader.stories-ugFv_siA.js} +1 -1
- package/docs/assets/{DrawerListItem-BOEqjnvB.js → DrawerListItem-ClOcwiVc.js} +1 -1
- package/docs/assets/{DrawerListItem.stories-Br_BBZTl.js → DrawerListItem.stories-BMZ35_qS.js} +1 -1
- package/docs/assets/{DrawerListItemGroup-qG_7CJ2Z.js → DrawerListItemGroup-SEWltKLJ.js} +1 -1
- package/docs/assets/{DrawerListItemGroup.stories-Dj7XnOfZ.js → DrawerListItemGroup.stories-Bn2TyQLH.js} +1 -1
- package/docs/assets/DrawerSection-ByJjEPPu.js +1 -0
- package/docs/assets/{DrawerSection.stories-bac3ulNN.js → DrawerSection.stories-DuLphbcs.js} +1 -1
- package/docs/assets/{DrawerTile-3UrW0AGT.js → DrawerTile-BGQvQQSp.js} +1 -1
- package/docs/assets/DrawerTile.stories-DCe2L4Tv.js +10 -0
- package/docs/assets/{Dropdown-vkyblifO.js → Dropdown-Bdrd2ZIh.js} +1 -1
- package/docs/assets/{Dropdown.stories-Bvkxpx3n.js → Dropdown.stories-DnkREwa1.js} +2 -2
- package/docs/assets/FeatureIcon-DY5WvpPf.js +1 -0
- package/docs/assets/{FeatureIcon.stories-D1igtEZB.js → FeatureIcon.stories-BqYqiSzM.js} +1 -1
- package/docs/assets/FormField-BjLFip7T.js +1 -0
- package/docs/assets/{FormField.stories-DXTo4Z_Y.js → FormField.stories-DY8Mz4YE.js} +1 -1
- package/docs/assets/{FormField.stories.shared-D4ktxakv.js → FormField.stories.shared-3_36NKi_.js} +1 -1
- package/docs/assets/{FormFieldMessage-JNi0OUbH.js → FormFieldMessage-B4Oy2QBT.js} +1 -1
- package/docs/assets/{FormFieldMessage.stories-lK_yWKrc.js → FormFieldMessage.stories-BD7JfJNj.js} +1 -1
- package/docs/assets/{GroupRichListItem-D8nu5Fv9.js → GroupRichListItem-CHiSrcou.js} +1 -1
- package/docs/assets/{GroupRichListItem.stories-DKL_YGxk.js → GroupRichListItem.stories-C3EubvlY.js} +1 -1
- package/docs/assets/HelpButton-BStTtLsz.js +1 -0
- package/docs/assets/{HelpButton.stories-D4-sk1wV.js → HelpButton.stories-C3-CU20F.js} +1 -1
- package/docs/assets/Icon-DUeXRUm6.js +761 -0
- package/docs/assets/{Icon.stories-DaFYO7BK.js → Icon.stories-ClzUno-E.js} +1 -1
- package/docs/assets/IconButton-Cn83Zk5-.js +1 -0
- package/docs/assets/{IconButton.stories-BB9x50r9.js → IconButton.stories-CwZts8kF.js} +6 -6
- package/docs/assets/{IconText-Bl-DK5dv.js → IconText-Colreg4i.js} +1 -1
- package/docs/assets/{IconText.stories-BbDEYbhY.js → IconText.stories-DSZffl3k.js} +1 -1
- package/docs/assets/{Image-DXVGtCU-.js → Image-B7PRENWe.js} +1 -1
- package/docs/assets/{Image.stories-CmX0xWLp.js → Image.stories-DkYrm30P.js} +1 -1
- package/docs/assets/InputField-CplPTgjC.js +5 -0
- package/docs/assets/{InputField.stories-B6VUcIZA.js → InputField.stories-K675XZL5.js} +1 -1
- package/docs/assets/{ItemsList-BT-ch5Ki.js → ItemsList-nTRSgJDP.js} +1 -1
- package/docs/assets/{LoadingBar-CoXHVlvM.js → LoadingBar-DGNrwKu4.js} +1 -1
- package/docs/assets/{LoadingBar.stories-B_l4HaQT.js → LoadingBar.stories-owR_6Oqy.js} +1 -1
- package/docs/assets/{Modal-xuXnp0B3.js → Modal-ByQBkOMU.js} +1 -1
- package/docs/assets/{Modal.stories-BSYz4NUn.js → Modal.stories-DlxDxfN1.js} +1 -1
- package/docs/assets/{ModalDialog-D6jipNV9.js → ModalDialog-Cr21J58H.js} +1 -1
- package/docs/assets/{ModalDialog.stories-y0DTZLJ9.js → ModalDialog.stories-DP4FjijI.js} +1 -1
- package/docs/assets/{NumberInCircle-iJQYZsfG.js → NumberInCircle-CE28_Nsz.js} +1 -1
- package/docs/assets/{NumberInCircle.stories-BL7R6Ey9.js → NumberInCircle.stories-DFdUVSKM.js} +1 -1
- package/docs/assets/{OutlineDivider-DpgF_2B_.js → OutlineDivider-DJ9pnpJN.js} +1 -1
- package/docs/assets/{OutlineDivider.stories-CoI8u05k.js → OutlineDivider.stories-Dzpei9KR.js} +1 -1
- package/docs/assets/{OutlineItem-COSzRi1t.js → OutlineItem-CApzlES7.js} +1 -1
- package/docs/assets/{OutlineItem.stories-DPbUVNt7.js → OutlineItem.stories-DtEAJjzy.js} +1 -1
- package/docs/assets/{OutlineSectionHeader-C7vAvTfl.js → OutlineSectionHeader-CSNr7XVB.js} +1 -1
- package/docs/assets/{OutlineSectionHeader.stories-DTI32viO.js → OutlineSectionHeader.stories-CuJwkOKg.js} +1 -1
- package/docs/assets/OverlayHeader-B5ajrI4B.js +1 -0
- package/docs/assets/{OverlayHeader.stories-Daj1gEMT.js → OverlayHeader.stories-Zed9WXER.js} +2 -2
- package/docs/assets/{PageHeader-BKDJxn58.js → PageHeader-Cy-UHuRb.js} +1 -1
- package/docs/assets/{PageHeader.stories-BRdESIfF.js → PageHeader.stories-DlW4dler.js} +1 -1
- package/docs/assets/Pagination-D34dUtsQ.js +1 -0
- package/docs/assets/{Pagination.stories-pk1h1NdC.js → Pagination.stories-IDi5nqa_.js} +2 -2
- package/docs/assets/PasswordField-Bkc6j8ri.js +1 -0
- package/docs/assets/{PasswordField.stories-BMwEm_DO.js → PasswordField.stories-CklmsmJF.js} +1 -1
- package/docs/assets/{PopOver-BjBlXVwF.js → PopOver-DVj1_TNg.js} +1 -1
- package/docs/assets/{PopOver.stories-3QX4Ga4o.js → PopOver.stories-BljOgM3Z.js} +2 -2
- package/docs/assets/{ProgressBar-VrWJHC2p.js → ProgressBar-D2hkMeQ0.js} +1 -1
- package/docs/assets/{ProgressBar.stories-CrZ2zJwI.js → ProgressBar.stories-BDHI6-tO.js} +1 -1
- package/docs/assets/{ProgressDonutChart-CJlokRW-.js → ProgressDonutChart-CBO-vy-E.js} +1 -1
- package/docs/assets/{ProgressDonutChart.stories-BRxY2dWI.js → ProgressDonutChart.stories-CGwlVICI.js} +1 -1
- package/docs/assets/{RadioButton-DO6I2WfN.js → RadioButton-Bd-D-2PY.js} +1 -1
- package/docs/assets/{RadioButton.stories-C80hUDbi.js → RadioButton.stories-BkCwnbIp.js} +1 -1
- package/docs/assets/{RichListItem.stories-_8Hp41y-.js → RichListItem.stories-Bls_aY12.js} +2 -2
- package/docs/assets/SectionHeader-isKXGfjn.js +1 -0
- package/docs/assets/{SectionHeader.stories-BjccJa_1.js → SectionHeader.stories-Bj3scOLc.js} +1 -1
- package/docs/assets/{SectionTitle-DElPh1Y0.js → SectionTitle-wTuJZZVS.js} +1 -1
- package/docs/assets/{SectionTitle.stories-BOEziRr6.js → SectionTitle.stories-Dr3KOvIl.js} +1 -1
- package/docs/assets/{SelectList-IYj9X3z5.js → SelectList-YMQ8rEMc.js} +1 -1
- package/docs/assets/{SelectList.stories-B0jlx1dv.js → SelectList.stories-ETdEOJ81.js} +1 -1
- package/docs/assets/{SelectListItem-DxlYAAqR.js → SelectListItem-BqKhIPSO.js} +1 -1
- package/docs/assets/{SelectListItem.stories-Cbgqd3q6.js → SelectListItem.stories-ClyL-djS.js} +1 -1
- package/docs/assets/{SelectListItemDivider-Bt5LuCh6.js → SelectListItemDivider-CTU7_4OL.js} +1 -1
- package/docs/assets/{SelectListItemDivider.stories-BFdzCK8L.js → SelectListItemDivider.stories-rGpk0Yeg.js} +1 -1
- package/docs/assets/{SelectListItemTile-Ci7UUkBi.js → SelectListItemTile-BhOwBFIO.js} +1 -1
- package/docs/assets/SelectListItemTile.stories-BXFfuX9q.js +19 -0
- package/docs/assets/{SelectListItemToggle-uyZKP9l-.js → SelectListItemToggle-C0lffqeC.js} +1 -1
- package/docs/assets/{SelectListItemToggle.stories-CHKImbbO.js → SelectListItemToggle.stories-D39XrmtN.js} +1 -1
- package/docs/assets/{SelectListSectionTitle-CytprfLI.js → SelectListSectionTitle-B9Dj10G9.js} +1 -1
- package/docs/assets/{SelectListSectionTitle.stories-CHaM0ezF.js → SelectListSectionTitle.stories-DCZ-Sq6v.js} +1 -1
- package/docs/assets/{SelectionControl-D6-Q7FjJ.js → SelectionControl-DIC2vtGo.js} +1 -1
- package/docs/assets/{SelectionTile-BXjJtuZK.js → SelectionTile-D7fhj7-I.js} +2 -2
- package/docs/assets/{SelectionTile.stories-Cdv1DqAb.js → SelectionTile.stories-Cato0iSj.js} +1 -1
- package/docs/assets/{Skeleton-a6juZJ74.js → Skeleton-D5xhZMQa.js} +5 -5
- package/docs/assets/{Skeleton.stories-CU_bwj6g.js → Skeleton.stories-ll-E-sPN.js} +1 -1
- package/docs/assets/{SurveyQuestionOpenEnded-CU362h7V.js → SurveyQuestionOpenEnded-DDdPQe2b.js} +1 -1
- package/docs/assets/{SurveyQuestionOpenEnded.stories-DTfe-q_l.js → SurveyQuestionOpenEnded.stories-mHTUclXK.js} +1 -1
- package/docs/assets/{SurveyQuestionScale-BFW9EZtg.js → SurveyQuestionScale-BKZbW5q7.js} +1 -1
- package/docs/assets/{SurveyQuestionScale.stories-I6PfDZOp.js → SurveyQuestionScale.stories-Cczg5QpY.js} +1 -1
- package/docs/assets/SurveyToggle-Sid2a-IO.js +1 -0
- package/docs/assets/{SurveyToggle.stories-DJz0MG-Y.js → SurveyToggle.stories-Dv7PJARv.js} +1 -1
- package/docs/assets/{Switch-DsNVsFhH.js → Switch-B8xEwHO8.js} +1 -1
- package/docs/assets/{Switch.stories-C1-OEnaq.js → Switch.stories-RbY8wA55.js} +1 -1
- package/docs/assets/{TabItem-KyXcr_5Z.js → TabItem-Ci3vrkRH.js} +1 -1
- package/docs/assets/{TabItem.stories-BfCXfirX.js → TabItem.stories-relncwaI.js} +1 -1
- package/docs/assets/{TextGroup-BGFapzPu.js → TextGroup-dzR19lzs.js} +1 -1
- package/docs/assets/{TextGroup.stories-WgHYdmrz.js → TextGroup.stories-bCLjp0Xb.js} +1 -1
- package/docs/assets/{ThreeColumnLayout-DLj9ww3X.js → ThreeColumnLayout-LVzDOKfj.js} +1 -1
- package/docs/assets/{ThreeColumnLayout.stories-BD0ZEOam.js → ThreeColumnLayout.stories-CkgbTH3p.js} +1 -1
- package/docs/assets/{Tile-CV9qCJCf.js → Tile-ByL6drhn.js} +1 -1
- package/docs/assets/{Tile.sb.shared-CYs-5pZ0.js → Tile.sb.shared-D3LxXPDs.js} +1 -1
- package/docs/assets/Tile.stories-BhXwnkKz.js +12 -0
- package/docs/assets/{Toast-p9LnCPmL.js → Toast-ukLuB2Qi.js} +1 -1
- package/docs/assets/{Toast.stories-zF82pwwv.js → Toast.stories-D3PagUcH.js} +1 -1
- package/docs/assets/{ToggleButton-D_HZ-8jw.js → ToggleButton-YUVnfx-x.js} +1 -1
- package/docs/assets/{ToggleButton.stories-CV-iGLoy.js → ToggleButton.stories-C18YYEsJ.js} +1 -1
- package/docs/assets/{Tooltip-DKqXTPwf.js → Tooltip-BvaJ_K9_.js} +1 -1
- package/docs/assets/{Tooltip.stories-D_SR7U8f.js → Tooltip.stories-o7f8wLv_.js} +4 -4
- package/docs/assets/{TypographyTokensLms.stories-qRJAJdvd.js → TypographyTokensLms.stories-Cm_y52b6.js} +1 -1
- package/docs/assets/{TypographyVariables.stories-B6W3MuIN.js → TypographyVariables.stories-DTHJ_1UO.js} +1 -1
- package/docs/assets/{Well-Di8wsKpw.js → Well-iUOt2HEx.js} +1 -1
- package/docs/assets/{Well.stories-D3CQkZun.js → Well.stories-4VLIlu-l.js} +3 -3
- package/docs/assets/entry-preview-CAn2_StQ.js +1 -0
- package/docs/assets/{entry-preview-docs-Cs1P1b8z.js → entry-preview-docs-Y_6rrjxM.js} +1 -1
- package/docs/assets/{iframe-BH6Q2yq5.js → iframe-D_RvUlhr.js} +11 -11
- package/docs/assets/index-BtMHnMz0.js +1 -0
- package/docs/assets/index-Cpsdq_ip.js +1 -0
- package/docs/assets/preview-B_G3dFbe.js +2 -0
- package/docs/assets/preview-vzvQxRBZ.js +64 -0
- package/docs/assets/string--hkylObx.js +1 -0
- package/docs/assets/vue-popper-m_ujT3wC.js +24 -0
- package/docs/assets/vue.esm-bundler-DcRN7CPI.js +36 -0
- package/docs/iframe.html +1 -1
- package/docs/project.json +1 -1
- package/lib/js/components/Banner/Banner.consts.ts +5 -5
- package/lib/js/components/Banner/Banner.spec.ts +148 -0
- package/lib/js/components/Banner/Banner.stories.ts +13 -8
- package/lib/js/components/Banner/Banner.vue +215 -196
- package/lib/js/components/Buttons/Button/Button.spec.ts +15 -0
- package/lib/js/components/Buttons/Button/Button.stories.ts +6 -0
- package/lib/js/components/Buttons/Button/Button.vue +63 -114
- package/lib/js/components/Cards/Card/Card.consts.ts +7 -0
- package/lib/js/components/Cards/Card/Card.spec.ts +86 -41
- package/lib/js/components/Cards/Card/Card.stories.ts +21 -18
- package/lib/js/components/Cards/Card/Card.vue +128 -88
- package/lib/js/components/Cards/Card/index.ts +1 -0
- package/lib/js/components/Form/InputField/InputField.spec.ts +140 -1
- package/lib/js/components/Form/InputField/InputField.types.ts +1 -0
- package/lib/js/components/Form/InputField/InputField.vue +31 -7
- package/lib/js/components/Form/InputField/useInputFieldWithinForm.ts +54 -0
- package/lib/js/components/Icons/FeatureIcon/FeatureIcon.consts.ts +10 -2
- package/lib/js/components/Icons/FeatureIcon/FeatureIcon.spec.ts +18 -0
- package/lib/js/components/Icons/FeatureIcon/FeatureIcon.stories.ts +1 -1
- package/lib/js/components/Icons/FeatureIcon/FeatureIcon.vue +44 -58
- package/lib/js/components/Modals/Modal/Modal.vue +2 -2
- package/lib/js/components/Modals/ModalDialog/ModalDialog.vue +2 -2
- package/lib/js/icons/fontawesome.ts +2 -0
- package/lib/js/index.ts +4 -1
- package/lib/js/tests/helpers.ts +5 -0
- package/package.json +10 -4
- package/vite.config.ts +2 -7
- package/docs/assets/Banner-sTfmX99M.js +0 -1
- package/docs/assets/Banner.stories-qhUSAG8g.js +0 -62
- package/docs/assets/Button-CRTJWjWJ.js +0 -1
- package/docs/assets/Card-C2-UB9KC.js +0 -1
- package/docs/assets/Card.stories-CI8H4t9g.js +0 -49
- package/docs/assets/Color-ERTF36HU-Cor5XXAu.js +0 -1
- package/docs/assets/DrawerHeader-CYgh5yLP.js +0 -1
- package/docs/assets/DrawerSection-Bk-qjO-U.js +0 -1
- package/docs/assets/DrawerTile.stories-AeySW4m1.js +0 -10
- package/docs/assets/FeatureIcon-DClL1vj4.js +0 -1
- package/docs/assets/FormField-u4PxhF2k.js +0 -1
- package/docs/assets/HelpButton-Lb2k2yp9.js +0 -1
- package/docs/assets/Icon-BxW-ny3A.js +0 -761
- package/docs/assets/IconButton-C0_vxVJn.js +0 -1
- package/docs/assets/InputField-CjqHh5Cm.js +0 -1
- package/docs/assets/OverlayHeader-DYU6A8e-.js +0 -1
- package/docs/assets/Pagination-CruPXU6i.js +0 -1
- package/docs/assets/PasswordField-D2k9x-t0.js +0 -1
- package/docs/assets/SectionHeader-BvZF_uZR.js +0 -1
- package/docs/assets/SelectListItemTile.stories-D53QYgoj.js +0 -19
- package/docs/assets/SurveyToggle-BeOR_ZKx.js +0 -1
- package/docs/assets/Tile.stories-32aU_anv.js +0 -12
- package/docs/assets/_commonjsHelpers-CDR5Xrri.js +0 -1
- package/docs/assets/entry-preview-B1UVjA37.js +0 -1
- package/docs/assets/index-7TY-LtbS.js +0 -1
- package/docs/assets/index-BncE9pY5.js +0 -1
- package/docs/assets/preview-CQnQ4kXS.js +0 -2
- package/docs/assets/preview-RZnfww4F.js +0 -64
- package/docs/assets/string-DZMRm3DC.js +0 -1
- package/docs/assets/vue-popper-CgJSQDC2.js +0 -24
- package/docs/assets/vue.esm-bundler-CC_vsnCp.js +0 -36
|
@@ -1,25 +1,49 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ds-banner">
|
|
3
|
-
<div
|
|
3
|
+
<div
|
|
4
|
+
class="ds-banner__inner"
|
|
5
|
+
:class="[
|
|
6
|
+
colorClass,
|
|
7
|
+
sizeClass,
|
|
8
|
+
{
|
|
9
|
+
'-ds-titleInColor': titleInColor,
|
|
10
|
+
},
|
|
11
|
+
]"
|
|
12
|
+
>
|
|
4
13
|
<div class="ds-banner__content">
|
|
5
14
|
<div class="ds-banner__header">
|
|
6
15
|
<div
|
|
7
|
-
v-if="icon"
|
|
8
|
-
class="ds-
|
|
16
|
+
v-if="icon && size === BANNER_SIZES.MEDIUM"
|
|
17
|
+
class="ds-banner__iconWrapper"
|
|
9
18
|
:class="{ '-ds-hideOnMobile': isIconHiddenOnMobile }"
|
|
10
19
|
>
|
|
11
|
-
|
|
12
|
-
|
|
20
|
+
<feature-icon
|
|
21
|
+
:icon="icon"
|
|
22
|
+
:color="iconColor"
|
|
23
|
+
:size="FEATURE_ICON_SIZES.SMALL"
|
|
24
|
+
/>
|
|
13
25
|
</div>
|
|
14
26
|
|
|
15
27
|
<div class="ds-banner__textWrapper">
|
|
16
28
|
<div class="ds-banner__titleWrapper">
|
|
17
|
-
<div class="ds-banner__title"
|
|
29
|
+
<div class="ds-banner__title">
|
|
30
|
+
<div
|
|
31
|
+
v-if="icon && size === BANNER_SIZES.SMALL"
|
|
32
|
+
class="ds-banner__iconWrapperSmall"
|
|
33
|
+
>
|
|
34
|
+
<feature-icon
|
|
35
|
+
:icon="icon"
|
|
36
|
+
:color="iconColor"
|
|
37
|
+
:size="FEATURE_ICON_SIZES.X_SMALL"
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
{{ title }}
|
|
41
|
+
</div>
|
|
18
42
|
<div v-if="$slots.defaultText" class="ds-banner__defaultText">
|
|
19
43
|
<slot name="defaultText" />
|
|
20
44
|
</div>
|
|
21
45
|
</div>
|
|
22
|
-
<div class="ds-banner__rightWrapper">
|
|
46
|
+
<div v-if="buttonText || $slots.rightSlot" class="ds-banner__rightWrapper">
|
|
23
47
|
<div v-if="buttonText" class="ds-banner__buttonWrapper">
|
|
24
48
|
<ds-button
|
|
25
49
|
class="ds-banner__ctaButton"
|
|
@@ -86,64 +110,78 @@
|
|
|
86
110
|
width: 100%;
|
|
87
111
|
|
|
88
112
|
&__inner {
|
|
113
|
+
--ds-banner-title-color: #{$color-neutral-text-strong};
|
|
114
|
+
|
|
89
115
|
border-radius: $radius-m;
|
|
90
116
|
border-style: solid;
|
|
91
117
|
border-width: 1px;
|
|
92
118
|
display: flex;
|
|
93
119
|
flex-direction: column;
|
|
120
|
+
gap: $space-xs;
|
|
94
121
|
padding: $space-xs;
|
|
95
122
|
|
|
96
123
|
@container (width > 500px) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
#{$self}__rightSlot {
|
|
123
|
-
flex-grow: initial;
|
|
124
|
-
padding: $space-xs 0 $space-xs 0;
|
|
125
|
-
}
|
|
124
|
+
#{$self}__header {
|
|
125
|
+
padding: 0 $space-2xs 0 $space-4xs;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
#{$self}__textWrapper {
|
|
129
|
+
flex-direction: row;
|
|
130
|
+
gap: $space-s;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
#{$self}__rightWrapper {
|
|
134
|
+
padding: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
#{$self}__rightSlot,
|
|
138
|
+
#{$self}__buttonWrapper {
|
|
139
|
+
padding: $space-xs 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
#{$self}__close {
|
|
143
|
+
padding-left: $space-2xs;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
#{$self}__expandedContainer {
|
|
147
|
+
padding: 0;
|
|
126
148
|
}
|
|
127
149
|
}
|
|
128
150
|
|
|
129
151
|
&.-ds-warning {
|
|
130
152
|
background-color: $color-warning-background;
|
|
131
153
|
border-color: $color-warning-border-weak;
|
|
154
|
+
|
|
155
|
+
&.-ds-titleInColor {
|
|
156
|
+
--ds-banner-title-color: #{$color-warning-text};
|
|
157
|
+
}
|
|
132
158
|
}
|
|
133
159
|
|
|
134
160
|
&.-ds-success {
|
|
135
161
|
background-color: $color-success-background;
|
|
136
162
|
border-color: $color-success-border-weak;
|
|
163
|
+
|
|
164
|
+
&.-ds-titleInColor {
|
|
165
|
+
--ds-banner-title-color: #{$color-success-text};
|
|
166
|
+
}
|
|
137
167
|
}
|
|
138
168
|
|
|
139
169
|
&.-ds-info {
|
|
140
170
|
background-color: $color-info-background;
|
|
141
171
|
border-color: $color-info-border-weak;
|
|
172
|
+
|
|
173
|
+
&.-ds-titleInColor {
|
|
174
|
+
--ds-banner-title-color: #{$color-info-text};
|
|
175
|
+
}
|
|
142
176
|
}
|
|
143
177
|
|
|
144
178
|
&.-ds-fail {
|
|
145
179
|
background-color: $color-fail-background;
|
|
146
180
|
border-color: $color-fail-border-weak;
|
|
181
|
+
|
|
182
|
+
&.-ds-titleInColor {
|
|
183
|
+
--ds-banner-title-color: #{$color-fail-text};
|
|
184
|
+
}
|
|
147
185
|
}
|
|
148
186
|
|
|
149
187
|
&.-ds-neutral {
|
|
@@ -159,6 +197,25 @@
|
|
|
159
197
|
&.-ds-danger {
|
|
160
198
|
background-color: $color-danger-background;
|
|
161
199
|
border-color: $color-danger-border-weak;
|
|
200
|
+
|
|
201
|
+
&.-ds-titleInColor {
|
|
202
|
+
--ds-banner-title-color: #{$color-danger-text};
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&.-ds-small {
|
|
207
|
+
#{$self}__header {
|
|
208
|
+
padding: 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
#{$self}__rightSlot,
|
|
212
|
+
#{$self}__buttonWrapper {
|
|
213
|
+
padding: 0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
#{$self}__expander {
|
|
217
|
+
padding: 0 0 0 $space-2xs;
|
|
218
|
+
}
|
|
162
219
|
}
|
|
163
220
|
}
|
|
164
221
|
|
|
@@ -167,22 +224,27 @@
|
|
|
167
224
|
}
|
|
168
225
|
|
|
169
226
|
&__header {
|
|
227
|
+
align-items: flex-start;
|
|
170
228
|
display: flex;
|
|
171
|
-
|
|
229
|
+
flex: 1;
|
|
172
230
|
padding: 0 $space-4xs;
|
|
173
|
-
width: 100%;
|
|
174
231
|
}
|
|
175
232
|
|
|
176
233
|
&__title {
|
|
177
234
|
@include heading-s-default-bold;
|
|
178
235
|
|
|
179
|
-
|
|
236
|
+
align-items: center;
|
|
237
|
+
color: var(--ds-banner-title-color);
|
|
238
|
+
display: flex;
|
|
239
|
+
gap: $space-3xs;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&__iconWrapperSmall {
|
|
243
|
+
align-self: stretch;
|
|
180
244
|
}
|
|
181
245
|
|
|
182
246
|
&__defaultText {
|
|
183
247
|
@include text-m-default-regular;
|
|
184
|
-
|
|
185
|
-
margin-top: $space-4xs;
|
|
186
248
|
}
|
|
187
249
|
|
|
188
250
|
&__textWrapper {
|
|
@@ -196,6 +258,7 @@
|
|
|
196
258
|
display: flex;
|
|
197
259
|
flex-direction: column;
|
|
198
260
|
flex-grow: 1;
|
|
261
|
+
gap: $space-5xs;
|
|
199
262
|
justify-content: center;
|
|
200
263
|
padding: $space-4xs 0;
|
|
201
264
|
}
|
|
@@ -204,25 +267,17 @@
|
|
|
204
267
|
display: flex;
|
|
205
268
|
flex-shrink: 0;
|
|
206
269
|
flex-wrap: nowrap;
|
|
207
|
-
|
|
270
|
+
gap: $space-3xs;
|
|
271
|
+
padding: $space-4xs 0 0;
|
|
208
272
|
}
|
|
209
273
|
|
|
274
|
+
&__rightSlot,
|
|
210
275
|
&__buttonWrapper {
|
|
211
|
-
padding: $space-
|
|
276
|
+
padding: $space-2xs 0 $space-3xs 0;
|
|
212
277
|
}
|
|
213
278
|
|
|
214
|
-
&
|
|
215
|
-
|
|
216
|
-
padding: $space-2xs 0 0 0;
|
|
217
|
-
|
|
218
|
-
&:nth-child(2) {
|
|
219
|
-
margin-left: $space-4xs;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
&__iconContainer {
|
|
224
|
-
margin-right: $space-s;
|
|
225
|
-
padding: $space-4xs 0;
|
|
279
|
+
&__iconWrapper {
|
|
280
|
+
padding: $space-2xs $space-xs $space-2xs 0;
|
|
226
281
|
|
|
227
282
|
&.-ds-hideOnMobile {
|
|
228
283
|
display: none;
|
|
@@ -233,59 +288,17 @@
|
|
|
233
288
|
}
|
|
234
289
|
}
|
|
235
290
|
|
|
236
|
-
&__icon {
|
|
237
|
-
border-radius: 100px;
|
|
238
|
-
padding: $space-2xs;
|
|
239
|
-
|
|
240
|
-
&.-ds-neutral {
|
|
241
|
-
background-color: $color-neutral-background-medium;
|
|
242
|
-
color: $color-neutral-icon;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
&.-ds-default {
|
|
246
|
-
background-color: $color-neutral-background-medium;
|
|
247
|
-
color: $color-neutral-icon;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
&.-ds-warning {
|
|
251
|
-
background-color: $color-warning-background-medium;
|
|
252
|
-
color: $color-warning-icon;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
&.-ds-success {
|
|
256
|
-
background-color: $color-success-background-medium;
|
|
257
|
-
color: $color-success-icon;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
&.-ds-info {
|
|
261
|
-
background-color: $color-info-background-medium;
|
|
262
|
-
color: $color-info-icon;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
&.-ds-fail {
|
|
266
|
-
background-color: $color-fail-background-medium;
|
|
267
|
-
color: $color-fail-icon;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
&.-ds-danger {
|
|
271
|
-
background-color: $color-danger-background-medium;
|
|
272
|
-
color: $color-danger-icon;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
291
|
&__close {
|
|
277
|
-
|
|
292
|
+
padding-left: $space-3xs;
|
|
278
293
|
}
|
|
279
294
|
|
|
280
295
|
&__expander {
|
|
281
|
-
|
|
282
|
-
padding: 0;
|
|
296
|
+
padding: $space-xs $space-4xs $space-xs $space-2xs;
|
|
283
297
|
}
|
|
284
298
|
|
|
285
299
|
&__expandedContainer {
|
|
286
300
|
@include text-m-default-regular;
|
|
287
301
|
|
|
288
|
-
margin-top: $space-xs;
|
|
289
302
|
padding: 0 $space-4xs $space-4xs;
|
|
290
303
|
}
|
|
291
304
|
|
|
@@ -295,7 +308,7 @@
|
|
|
295
308
|
}
|
|
296
309
|
</style>
|
|
297
310
|
|
|
298
|
-
<script lang="ts">
|
|
311
|
+
<script lang="ts" setup>
|
|
299
312
|
import DsButton, {
|
|
300
313
|
BUTTON_COLORS,
|
|
301
314
|
BUTTON_RADIUSES,
|
|
@@ -303,103 +316,109 @@ import DsButton, {
|
|
|
303
316
|
BUTTON_TYPES,
|
|
304
317
|
} from '../Buttons/Button';
|
|
305
318
|
import DsDivider, { DIVIDER_PROMINENCES } from '../Divider';
|
|
306
|
-
import
|
|
319
|
+
import { IconItem, ICONS } from '../Icons/Icon';
|
|
307
320
|
import DsIconButton, { ICON_BUTTON_COLORS, ICON_BUTTON_SIZES } from '../Buttons/IconButton';
|
|
308
|
-
import { BANNER_COLORS,
|
|
309
|
-
import {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
321
|
+
import { BANNER_COLORS, BANNER_SIZES, BannerColor, BannerSize } from './Banner.consts';
|
|
322
|
+
import { computed, ref, watch } from 'vue';
|
|
323
|
+
import FeatureIcon, {
|
|
324
|
+
FEATURE_ICON_COLOR,
|
|
325
|
+
FEATURE_ICON_SIZES,
|
|
326
|
+
FeatureIconColor,
|
|
327
|
+
} from '../Icons/FeatureIcon';
|
|
328
|
+
|
|
329
|
+
const {
|
|
330
|
+
icon = null,
|
|
331
|
+
closable = false,
|
|
332
|
+
color = BANNER_COLORS.DEFAULT,
|
|
333
|
+
isExpanded = false,
|
|
334
|
+
isIconHiddenOnMobile = false,
|
|
335
|
+
size = BANNER_SIZES.MEDIUM,
|
|
336
|
+
titleInColor = false,
|
|
337
|
+
} = defineProps<{
|
|
338
|
+
icon?: IconItem | null;
|
|
339
|
+
buttonText?: string;
|
|
340
|
+
closable?: boolean;
|
|
341
|
+
color?: BannerColor;
|
|
342
|
+
title: string;
|
|
343
|
+
isExpanded?: boolean;
|
|
344
|
+
isIconHiddenOnMobile?: boolean;
|
|
345
|
+
size?: BannerSize;
|
|
346
|
+
titleInColor?: boolean;
|
|
347
|
+
}>();
|
|
348
|
+
|
|
349
|
+
const emit = defineEmits<{
|
|
350
|
+
'button-clicked': [];
|
|
351
|
+
close: [];
|
|
352
|
+
'update:isExpanded': [isExpanded: boolean];
|
|
353
|
+
}>();
|
|
354
|
+
|
|
355
|
+
const { toggleExpandedText, isExpandedInternal } = useExpanded();
|
|
356
|
+
const { sizeClass, colorClass } = useBannerClasses();
|
|
357
|
+
const iconColor = computed(() => {
|
|
358
|
+
const colorMap: Record<BannerColor, FeatureIconColor> = {
|
|
359
|
+
[BANNER_COLORS.DEFAULT]: FEATURE_ICON_COLOR.NEUTRAL,
|
|
360
|
+
[BANNER_COLORS.NEUTRAL]: FEATURE_ICON_COLOR.NEUTRAL,
|
|
361
|
+
[BANNER_COLORS.INFO]: FEATURE_ICON_COLOR.INFO,
|
|
362
|
+
[BANNER_COLORS.SUCCESS]: FEATURE_ICON_COLOR.SUCCESS,
|
|
363
|
+
[BANNER_COLORS.WARNING]: FEATURE_ICON_COLOR.WARNING,
|
|
364
|
+
[BANNER_COLORS.FAIL]: FEATURE_ICON_COLOR.FAIL,
|
|
365
|
+
[BANNER_COLORS.DANGER]: FEATURE_ICON_COLOR.DANGER,
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
return colorMap[color];
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
function useExpanded() {
|
|
372
|
+
const isExpandedInternal = ref(false);
|
|
373
|
+
|
|
374
|
+
watch(
|
|
375
|
+
() => isExpanded,
|
|
376
|
+
(newValue) => {
|
|
377
|
+
if (newValue !== isExpandedInternal.value) {
|
|
378
|
+
isExpandedInternal.value = newValue;
|
|
379
|
+
}
|
|
354
380
|
},
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
381
|
+
{ immediate: true },
|
|
382
|
+
);
|
|
383
|
+
|
|
384
|
+
const toggleExpandedText = () => {
|
|
385
|
+
isExpandedInternal.value = !isExpandedInternal.value;
|
|
386
|
+
emit('update:isExpanded', isExpandedInternal.value);
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
return {
|
|
390
|
+
isExpandedInternal,
|
|
391
|
+
toggleExpandedText,
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
function useBannerClasses() {
|
|
396
|
+
const colorClass = computed(() => {
|
|
397
|
+
const colorMap: Record<BannerColor, string> = {
|
|
398
|
+
[BANNER_COLORS.NEUTRAL]: '-ds-neutral',
|
|
399
|
+
[BANNER_COLORS.DEFAULT]: '-ds-default',
|
|
400
|
+
[BANNER_COLORS.FAIL]: '-ds-fail',
|
|
401
|
+
[BANNER_COLORS.INFO]: '-ds-info',
|
|
402
|
+
[BANNER_COLORS.SUCCESS]: '-ds-success',
|
|
403
|
+
[BANNER_COLORS.WARNING]: '-ds-warning',
|
|
404
|
+
[BANNER_COLORS.DANGER]: '-ds-danger',
|
|
370
405
|
};
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
isExpanded: {
|
|
390
|
-
handler(isExpanded) {
|
|
391
|
-
if (isExpanded !== this.isExpandedInternal) {
|
|
392
|
-
this.isExpandedInternal = isExpanded;
|
|
393
|
-
}
|
|
394
|
-
},
|
|
395
|
-
immediate: true,
|
|
396
|
-
},
|
|
397
|
-
},
|
|
398
|
-
methods: {
|
|
399
|
-
toggleExpandedText() {
|
|
400
|
-
this.isExpandedInternal = !this.isExpandedInternal;
|
|
401
|
-
this.$emit('update:isExpanded', this.isExpandedInternal);
|
|
402
|
-
},
|
|
403
|
-
},
|
|
404
|
-
});
|
|
406
|
+
|
|
407
|
+
return colorMap[color];
|
|
408
|
+
});
|
|
409
|
+
|
|
410
|
+
const sizeClass = computed(() => {
|
|
411
|
+
const sizeMap: Record<BannerSize, string> = {
|
|
412
|
+
[BANNER_SIZES.SMALL]: '-ds-small',
|
|
413
|
+
[BANNER_SIZES.MEDIUM]: '-ds-medium',
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
return sizeMap[size];
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
return {
|
|
420
|
+
colorClass,
|
|
421
|
+
sizeClass,
|
|
422
|
+
};
|
|
423
|
+
}
|
|
405
424
|
</script>
|
|
@@ -71,4 +71,19 @@ describe('Button', () => {
|
|
|
71
71
|
expect(component.find('.ds-button__icon.-ds-left').exists()).toBe(false);
|
|
72
72
|
expect(component.find('.ds-button__content').text()).toBe('Hello');
|
|
73
73
|
});
|
|
74
|
+
|
|
75
|
+
it('renders as span by default', () => {
|
|
76
|
+
const component = createComponent();
|
|
77
|
+
expect(component.element.tagName).toBe('SPAN');
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('renders as button if "as" prop is set to "button"', () => {
|
|
81
|
+
const component = createComponent({ as: 'button' });
|
|
82
|
+
expect(component.element.tagName).toBe('BUTTON');
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it('renders as anchor if "as" prop is set to "a"', () => {
|
|
86
|
+
const component = createComponent({ as: 'a' });
|
|
87
|
+
expect(component.element.tagName).toBe('A');
|
|
88
|
+
});
|
|
74
89
|
});
|
|
@@ -34,6 +34,7 @@ const StoryTemplate: StoryFn<typeof Button> = (args) => ({
|
|
|
34
34
|
:elevation="elevation"
|
|
35
35
|
:icon-left="ICONS[iconLeft]"
|
|
36
36
|
:icon-right="ICONS[iconRight]"
|
|
37
|
+
:as="as"
|
|
37
38
|
>
|
|
38
39
|
{{ slotText }}
|
|
39
40
|
</Button>
|
|
@@ -62,6 +63,7 @@ const args = {
|
|
|
62
63
|
elevation: BUTTON_ELEVATIONS.NONE,
|
|
63
64
|
iconLeft: 'FA_CHEVRON_LEFT',
|
|
64
65
|
iconRight: null,
|
|
66
|
+
as: 'span',
|
|
65
67
|
} as Args;
|
|
66
68
|
|
|
67
69
|
const argTypes = {
|
|
@@ -97,6 +99,10 @@ const argTypes = {
|
|
|
97
99
|
control: 'select',
|
|
98
100
|
options: [null, ...Object.keys(ICONS)],
|
|
99
101
|
},
|
|
102
|
+
as: {
|
|
103
|
+
control: 'select',
|
|
104
|
+
options: ['button', 'a', 'span'],
|
|
105
|
+
},
|
|
100
106
|
} as ArgTypes;
|
|
101
107
|
|
|
102
108
|
Interactive.argTypes = argTypes;
|