@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,24 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<component
|
|
3
|
+
:is="as"
|
|
3
4
|
class="ds-button"
|
|
4
5
|
:class="{
|
|
5
6
|
'-ds-outlined': type === BUTTON_TYPES.OUTLINED,
|
|
6
7
|
'-ds-text': type === BUTTON_TYPES.TEXT,
|
|
7
8
|
|
|
8
|
-
'-ds-small': size ===
|
|
9
|
-
'-ds-large': size ===
|
|
9
|
+
'-ds-small': size === BUTTON_SIZES.SMALL,
|
|
10
|
+
'-ds-large': size === BUTTON_SIZES.LARGE,
|
|
10
11
|
|
|
11
|
-
'-ds-rounded': type !== BUTTON_TYPES.TEXT && radius ===
|
|
12
|
+
'-ds-rounded': type !== BUTTON_TYPES.TEXT && radius === BUTTON_RADIUSES.ROUNDED,
|
|
12
13
|
|
|
13
|
-
'-ds-hovered': state ===
|
|
14
|
-
'-ds-focused': state ===
|
|
15
|
-
'-ds-loading': state ===
|
|
16
|
-
'-ds-disabled': state ===
|
|
14
|
+
'-ds-hovered': state === BUTTON_STATES.HOVERED,
|
|
15
|
+
'-ds-focused': state === BUTTON_STATES.FOCUSED,
|
|
16
|
+
'-ds-loading': state === BUTTON_STATES.LOADING,
|
|
17
|
+
'-ds-disabled': state === BUTTON_STATES.DISABLED,
|
|
17
18
|
|
|
18
19
|
[colorClassName]: true,
|
|
19
20
|
|
|
20
|
-
'-ds-elevation-x-small': elevation ===
|
|
21
|
-
'-ds-elevation-small': elevation ===
|
|
21
|
+
'-ds-elevation-x-small': elevation === BUTTON_ELEVATIONS.X_SMALL,
|
|
22
|
+
'-ds-elevation-small': elevation === BUTTON_ELEVATIONS.SMALL,
|
|
22
23
|
}"
|
|
23
24
|
>
|
|
24
25
|
<span class="ds-button__content">
|
|
@@ -37,20 +38,18 @@
|
|
|
37
38
|
/>
|
|
38
39
|
</span>
|
|
39
40
|
<wnl-icon
|
|
40
|
-
v-if="state ===
|
|
41
|
+
v-if="state === BUTTON_STATES.LOADING"
|
|
41
42
|
class="ds-button__loadingIcon"
|
|
42
43
|
:icon="ICONS.FAD_SPINNER_THIRD"
|
|
43
44
|
:size="loadingIconSize"
|
|
44
45
|
/>
|
|
45
|
-
</
|
|
46
|
+
</component>
|
|
46
47
|
</template>
|
|
47
48
|
|
|
48
49
|
<!-- Looking for styles? These are defined in the global styles file: design-system.scss > _buttons.scss -->
|
|
49
50
|
|
|
50
|
-
<script lang="ts">
|
|
51
|
-
import {
|
|
52
|
-
|
|
53
|
-
import WnlIcon, { ICON_SIZES, ICONS } from '../../Icons/Icon';
|
|
51
|
+
<script lang="ts" setup>
|
|
52
|
+
import WnlIcon, { ICON_SIZES, IconItem, ICONS, IconSize } from '../../Icons/Icon';
|
|
54
53
|
import {
|
|
55
54
|
BUTTON_COLORS,
|
|
56
55
|
BUTTON_ELEVATIONS,
|
|
@@ -58,108 +57,58 @@ import {
|
|
|
58
57
|
BUTTON_SIZES,
|
|
59
58
|
BUTTON_STATES,
|
|
60
59
|
BUTTON_TYPES,
|
|
60
|
+
ButtonColor,
|
|
61
|
+
ButtonRadius,
|
|
62
|
+
ButtonSize,
|
|
63
|
+
ButtonState,
|
|
64
|
+
ButtonType,
|
|
65
|
+
ButtonElevation,
|
|
61
66
|
} from './Button.consts';
|
|
67
|
+
import { computed } from 'vue';
|
|
68
|
+
|
|
69
|
+
const {
|
|
70
|
+
size = BUTTON_SIZES.MEDIUM,
|
|
71
|
+
type = BUTTON_TYPES.FILLED,
|
|
72
|
+
color = BUTTON_COLORS.PRIMARY,
|
|
73
|
+
radius = BUTTON_RADIUSES.CAPSULE,
|
|
74
|
+
state = BUTTON_STATES.DEFAULT,
|
|
75
|
+
iconLeft = null,
|
|
76
|
+
iconRight = null,
|
|
77
|
+
elevation = BUTTON_ELEVATIONS.NONE,
|
|
78
|
+
as = 'span',
|
|
79
|
+
} = defineProps<{
|
|
80
|
+
// Fixme - remove `string` from types - it is used only to avoid breaking changes for now
|
|
81
|
+
size?: ButtonSize | string;
|
|
82
|
+
type?: ButtonType | string;
|
|
83
|
+
color?: ButtonColor | null | string;
|
|
84
|
+
radius?: ButtonRadius | string;
|
|
85
|
+
state?: ButtonState | string;
|
|
86
|
+
iconLeft?: IconItem | null;
|
|
87
|
+
iconRight?: IconItem | null;
|
|
88
|
+
elevation?: ButtonElevation | string;
|
|
89
|
+
as?: 'button' | 'a' | 'span';
|
|
90
|
+
}>();
|
|
62
91
|
|
|
63
|
-
|
|
64
|
-
|
|
92
|
+
const iconSize = computed((): IconSize => {
|
|
93
|
+
if (size === BUTTON_SIZES.SMALL || size === BUTTON_SIZES.MEDIUM) {
|
|
94
|
+
return ICON_SIZES.XX_SMALL;
|
|
95
|
+
}
|
|
96
|
+
return ICON_SIZES.X_SMALL;
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const colorClassName = computed((): string => {
|
|
100
|
+
return `-ds-color-${color}`;
|
|
101
|
+
});
|
|
65
102
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
WnlIcon,
|
|
71
|
-
},
|
|
72
|
-
props: {
|
|
73
|
-
size: {
|
|
74
|
-
type: String,
|
|
75
|
-
default: BUTTON_SIZES.MEDIUM,
|
|
76
|
-
validator(value: Value<typeof BUTTON_SIZES>) {
|
|
77
|
-
return Object.values(BUTTON_SIZES).includes(value);
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
type: {
|
|
81
|
-
type: String,
|
|
82
|
-
default: BUTTON_TYPES.FILLED,
|
|
83
|
-
validator(value: Value<typeof BUTTON_TYPES>) {
|
|
84
|
-
return Object.values(BUTTON_TYPES).includes(value);
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
color: {
|
|
88
|
-
type: [String, null],
|
|
89
|
-
default: BUTTON_COLORS.PRIMARY,
|
|
90
|
-
validator(value: Value<typeof ICON_BUTTON_COLORS>) {
|
|
91
|
-
return Object.values(ICON_BUTTON_COLORS).includes(value);
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
radius: {
|
|
95
|
-
type: String,
|
|
96
|
-
default: BUTTON_RADIUSES.CAPSULE,
|
|
97
|
-
validator(value: Value<typeof BUTTON_RADIUSES>) {
|
|
98
|
-
return Object.values(BUTTON_RADIUSES).includes(value);
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
state: {
|
|
102
|
-
type: String,
|
|
103
|
-
default: BUTTON_STATES.DEFAULT,
|
|
104
|
-
validator(value: Value<typeof BUTTON_STATES>) {
|
|
105
|
-
return Object.values(BUTTON_STATES).includes(value);
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
iconLeft: {
|
|
109
|
-
type: Object,
|
|
110
|
-
default: null,
|
|
111
|
-
validator(icon) {
|
|
112
|
-
return Object.values(ICONS).includes(toRaw(icon));
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
iconRight: {
|
|
116
|
-
type: Object,
|
|
117
|
-
default: null,
|
|
118
|
-
validator(icon) {
|
|
119
|
-
return Object.values(ICONS).includes(toRaw(icon));
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
elevation: {
|
|
123
|
-
type: String,
|
|
124
|
-
default: BUTTON_ELEVATIONS.NONE,
|
|
125
|
-
validator(value: Value<typeof BUTTON_ELEVATIONS>) {
|
|
126
|
-
return Object.values(BUTTON_ELEVATIONS).includes(value);
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
data() {
|
|
131
|
-
return {
|
|
132
|
-
ICONS: Object.freeze(ICONS),
|
|
133
|
-
ICON_SIZES: Object.freeze(ICON_SIZES),
|
|
134
|
-
BUTTON_TYPES: Object.freeze(BUTTON_TYPES),
|
|
135
|
-
COLORS: Object.freeze(BUTTON_COLORS),
|
|
136
|
-
RADIUSES: Object.freeze(BUTTON_RADIUSES),
|
|
137
|
-
SIZES: Object.freeze(BUTTON_SIZES),
|
|
138
|
-
STATES: Object.freeze(BUTTON_STATES),
|
|
139
|
-
ELEVATIONS: Object.freeze(BUTTON_ELEVATIONS),
|
|
140
|
-
};
|
|
141
|
-
},
|
|
142
|
-
computed: {
|
|
143
|
-
iconSize(): string {
|
|
144
|
-
if (this.size === this.SIZES.SMALL || this.size === this.SIZES.MEDIUM) {
|
|
145
|
-
return ICON_SIZES.XX_SMALL;
|
|
146
|
-
}
|
|
147
|
-
return ICON_SIZES.X_SMALL;
|
|
148
|
-
},
|
|
149
|
-
colorClassName(): string {
|
|
150
|
-
return `-ds-color-${this.color}`;
|
|
151
|
-
},
|
|
152
|
-
loadingIconSize(): string {
|
|
153
|
-
if (this.size === BUTTON_SIZES.LARGE) {
|
|
154
|
-
return ICON_SIZES.MEDIUM;
|
|
155
|
-
}
|
|
103
|
+
const loadingIconSize = computed((): IconSize => {
|
|
104
|
+
if (size === BUTTON_SIZES.LARGE) {
|
|
105
|
+
return ICON_SIZES.MEDIUM;
|
|
106
|
+
}
|
|
156
107
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
108
|
+
if (size === BUTTON_SIZES.SMALL) {
|
|
109
|
+
return ICON_SIZES.X_SMALL;
|
|
110
|
+
}
|
|
160
111
|
|
|
161
|
-
|
|
162
|
-
},
|
|
163
|
-
},
|
|
112
|
+
return ICON_SIZES.SMALL;
|
|
164
113
|
});
|
|
165
114
|
</script>
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { Value } from '../../../utils/type.utils';
|
|
2
2
|
|
|
3
|
+
export const CARD_PADDING_SIZES = {
|
|
4
|
+
SMALL: 'small',
|
|
5
|
+
LARGE: 'large',
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type CardPaddingSize = Value<typeof CARD_PADDING_SIZES>;
|
|
9
|
+
|
|
3
10
|
export const CARD_BORDER_COLORS = {
|
|
4
11
|
NEUTRAL_HEAVY: 'neutralHeavy',
|
|
5
12
|
NEUTRAL_STRONG: 'neutralStrong',
|
|
@@ -1,36 +1,13 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentMountingOptions, mount } from '@vue/test-utils';
|
|
3
|
+
import { h } from 'vue';
|
|
3
4
|
|
|
4
5
|
import Card from './Card.vue';
|
|
5
|
-
import {
|
|
6
|
-
import { LOADING_BAR_COLORS } from '../../LoadingBar';
|
|
6
|
+
import { CARD_PADDING_SIZES } from './Card.consts';
|
|
7
7
|
|
|
8
8
|
describe('Card', () => {
|
|
9
|
-
const createComponent = ({
|
|
10
|
-
|
|
11
|
-
contentSlot = '',
|
|
12
|
-
footerSlot = '',
|
|
13
|
-
headerHasPadding = false,
|
|
14
|
-
dividerUnderHeader = false,
|
|
15
|
-
} = {}) => {
|
|
16
|
-
return shallowMount(Card, {
|
|
17
|
-
props: {
|
|
18
|
-
headerHasPadding,
|
|
19
|
-
dividerUnderHeader,
|
|
20
|
-
hasBorder: false,
|
|
21
|
-
borderSize: CARD_BORDER_SIZES.MEDIUM,
|
|
22
|
-
borderColor: CARD_BORDER_COLORS.NEUTRAL_HEAVY,
|
|
23
|
-
borderPosition: CARD_BORDER_POSITIONS.TOP,
|
|
24
|
-
hasLoadingBar: false,
|
|
25
|
-
loadingBarColor: LOADING_BAR_COLORS.NEUTRAL_HEAVY,
|
|
26
|
-
loadingBarTime: '0',
|
|
27
|
-
},
|
|
28
|
-
slots: {
|
|
29
|
-
...(headerSlot !== '' && { header: headerSlot }),
|
|
30
|
-
...(contentSlot !== '' && { content: contentSlot }),
|
|
31
|
-
...(footerSlot !== '' && { footer: footerSlot }),
|
|
32
|
-
},
|
|
33
|
-
});
|
|
9
|
+
const createComponent = (options: ComponentMountingOptions<typeof Card> = {}) => {
|
|
10
|
+
return mount(Card, options);
|
|
34
11
|
};
|
|
35
12
|
|
|
36
13
|
it('should create', () => {
|
|
@@ -47,51 +24,85 @@ describe('Card', () => {
|
|
|
47
24
|
|
|
48
25
|
it('should render content slot', () => {
|
|
49
26
|
const content = 'Wpłynąlem na suchego przestwór oceanu';
|
|
50
|
-
const component = createComponent({
|
|
27
|
+
const component = createComponent({
|
|
28
|
+
slots: {
|
|
29
|
+
content: () => [h('span', content)],
|
|
30
|
+
},
|
|
31
|
+
});
|
|
51
32
|
|
|
52
33
|
expect(component.find('.ds-card__content').text()).toContain(content);
|
|
53
34
|
});
|
|
54
35
|
|
|
55
36
|
it('should render header slot', () => {
|
|
56
37
|
const header = 'Wpłynąlem na suchego przestwór oceanu';
|
|
57
|
-
const component = createComponent({
|
|
38
|
+
const component = createComponent({
|
|
39
|
+
slots: {
|
|
40
|
+
header: () => [h('span', header)],
|
|
41
|
+
},
|
|
42
|
+
});
|
|
58
43
|
|
|
59
44
|
expect(component.text()).toContain(header);
|
|
60
45
|
});
|
|
61
46
|
|
|
62
47
|
it('should render footer slot', () => {
|
|
63
48
|
const footer = 'Wpłynąlem na suchego przestwór oceanu';
|
|
64
|
-
const component = createComponent({
|
|
49
|
+
const component = createComponent({
|
|
50
|
+
slots: {
|
|
51
|
+
footer: () => [h('span', footer)],
|
|
52
|
+
},
|
|
53
|
+
});
|
|
65
54
|
|
|
66
55
|
expect(component.text()).toContain(footer);
|
|
67
56
|
});
|
|
68
57
|
|
|
69
58
|
it('should render header slot with padding', () => {
|
|
70
59
|
const header = 'Wpłynąlem na suchego przestwór oceanu';
|
|
71
|
-
const component = createComponent({
|
|
60
|
+
const component = createComponent({
|
|
61
|
+
props: { headerHasPadding: true },
|
|
62
|
+
slots: { header: () => [h('span', header)] },
|
|
63
|
+
});
|
|
72
64
|
|
|
73
65
|
expect(component.find('.ds-card__header').classes()).toContain('-ds-withPadding');
|
|
74
66
|
});
|
|
75
67
|
|
|
68
|
+
it('should render footer slot with padding', () => {
|
|
69
|
+
const footer = 'Wpłynąlem na suchego przestwór oceanu';
|
|
70
|
+
const component = createComponent({
|
|
71
|
+
props: { footerHasPadding: true },
|
|
72
|
+
slots: {
|
|
73
|
+
footer: () => [h('span', footer)],
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
expect(component.find('.ds-card__footer').classes()).toContain('-ds-withPadding');
|
|
78
|
+
});
|
|
79
|
+
|
|
76
80
|
it('should render divider', () => {
|
|
77
81
|
const header = 'Wpłynąlem na suchego przestwór oceanu';
|
|
78
82
|
const component = createComponent({
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
props: {
|
|
84
|
+
dividerUnderHeader: true,
|
|
85
|
+
},
|
|
86
|
+
slots: {
|
|
87
|
+
header: () => [h('span', header)],
|
|
88
|
+
content: () => [h('span', 'asd')],
|
|
89
|
+
},
|
|
82
90
|
});
|
|
83
91
|
|
|
84
92
|
expect(component.find('.ds-card__headerDivider').exists()).toBe(true);
|
|
85
93
|
});
|
|
86
94
|
|
|
87
95
|
it("doesn't render divider when no header", () => {
|
|
88
|
-
const component = createComponent({ dividerUnderHeader: true });
|
|
96
|
+
const component = createComponent({ props: { dividerUnderHeader: true } });
|
|
89
97
|
|
|
90
98
|
expect(component.find('.ds-card__headerDivider').exists()).toBe(false);
|
|
91
99
|
});
|
|
92
100
|
|
|
93
101
|
it("doesn't render divider when no content", () => {
|
|
94
|
-
const component = createComponent({
|
|
102
|
+
const component = createComponent({
|
|
103
|
+
props: { dividerUnderHeader: true },
|
|
104
|
+
slots: { header: () => [h('span', 'test')] },
|
|
105
|
+
});
|
|
95
106
|
|
|
96
107
|
expect(component.find('.ds-card__headerDivider').exists()).toBe(false);
|
|
97
108
|
});
|
|
@@ -99,14 +110,48 @@ describe('Card', () => {
|
|
|
99
110
|
it('should render divider with margin if headerHasPadding', () => {
|
|
100
111
|
const header = 'Wpłynąlem na suchego przestwór oceanu';
|
|
101
112
|
const component = createComponent({
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
113
|
+
props: {
|
|
114
|
+
dividerUnderHeader: true,
|
|
115
|
+
headerHasPadding: true,
|
|
116
|
+
},
|
|
117
|
+
slots: {
|
|
118
|
+
header: () => [h('span', header)],
|
|
119
|
+
content: () => [h('span', 'asd')],
|
|
120
|
+
},
|
|
106
121
|
});
|
|
107
122
|
|
|
108
123
|
expect(component.find('.ds-card__headerDivider').classes()).toContain(
|
|
109
124
|
'-ds-withHorizontalMargin',
|
|
110
125
|
);
|
|
111
126
|
});
|
|
127
|
+
|
|
128
|
+
it('should set large padding class', () => {
|
|
129
|
+
const component = createComponent({
|
|
130
|
+
props: { paddingSize: CARD_PADDING_SIZES.LARGE },
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
expect(component.find('.ds-card').classes()).toContain('-ds-paddingLarge');
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
it('should not set large padding class', () => {
|
|
137
|
+
const component = createComponent({
|
|
138
|
+
props: { paddingSize: CARD_PADDING_SIZES.SMALL },
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
expect(component.find('.ds-card').classes()).not.toContain('-ds-paddingLarge');
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
it('should not set flat class by default', () => {
|
|
145
|
+
const component = createComponent();
|
|
146
|
+
|
|
147
|
+
expect(component.find('.ds-card').classes()).not.toContain('-ds-flat');
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it('should set flat class', () => {
|
|
151
|
+
const component = createComponent({
|
|
152
|
+
props: { isFlat: true },
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
expect(component.find('.ds-card').classes()).toContain('-ds-flat');
|
|
156
|
+
});
|
|
112
157
|
});
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import Card from './Card.vue';
|
|
2
2
|
|
|
3
3
|
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
CARD_BORDER_COLORS,
|
|
6
|
+
CARD_BORDER_POSITIONS,
|
|
7
|
+
CARD_BORDER_SIZES,
|
|
8
|
+
CARD_PADDING_SIZES,
|
|
9
|
+
} from './Card.consts';
|
|
5
10
|
import { LOADING_BAR_COLORS } from '../../LoadingBar';
|
|
6
11
|
|
|
7
12
|
export default {
|
|
@@ -12,27 +17,18 @@ export default {
|
|
|
12
17
|
const StoryTemplate: StoryFn<typeof Card> = (args) => ({
|
|
13
18
|
components: { Card },
|
|
14
19
|
setup() {
|
|
15
|
-
return args;
|
|
20
|
+
return { args };
|
|
16
21
|
},
|
|
17
22
|
template: `
|
|
18
|
-
<card
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
:border-position="borderPosition"
|
|
22
|
-
:border-size="borderSize"
|
|
23
|
-
:border-color="borderColor"
|
|
24
|
-
:has-loading-bar="hasLoadingBar"
|
|
25
|
-
:loading-bar-color="loadingBarColor"
|
|
26
|
-
:loading-bar-time="loadingBarTime"
|
|
27
|
-
>
|
|
28
|
-
<template v-if="header" #header>
|
|
29
|
-
<div v-html="header" />
|
|
23
|
+
<card v-bind="args">
|
|
24
|
+
<template v-if="args.header" #header>
|
|
25
|
+
<div v-html="args.header" />
|
|
30
26
|
</template>
|
|
31
|
-
<template v-if="content" #content>
|
|
32
|
-
<div v-html="content" />
|
|
27
|
+
<template v-if="args.content" #content>
|
|
28
|
+
<div v-html="args.content" />
|
|
33
29
|
</template>
|
|
34
|
-
<template v-if="footer" #footer>
|
|
35
|
-
<div v-html="footer" />
|
|
30
|
+
<template v-if="args.footer" #footer>
|
|
31
|
+
<div v-html="args.footer" />
|
|
36
32
|
</template>
|
|
37
33
|
</card>`,
|
|
38
34
|
});
|
|
@@ -44,6 +40,8 @@ const args = {
|
|
|
44
40
|
content: 'content slot that supports <b>HTML markup</b>',
|
|
45
41
|
footer: 'footer slot',
|
|
46
42
|
headerHasPadding: false,
|
|
43
|
+
footerHasPadding: false,
|
|
44
|
+
paddingSize: CARD_PADDING_SIZES.SMALL,
|
|
47
45
|
dividerUnderHeader: false,
|
|
48
46
|
hasBorder: false,
|
|
49
47
|
borderPosition: CARD_BORDER_POSITIONS.TOP,
|
|
@@ -52,6 +50,7 @@ const args = {
|
|
|
52
50
|
hasLoadingBar: false,
|
|
53
51
|
loadingBarColor: LOADING_BAR_COLORS.NEUTRAL_HEAVY,
|
|
54
52
|
loadingBarTime: '0',
|
|
53
|
+
isFlat: false,
|
|
55
54
|
} as Args;
|
|
56
55
|
|
|
57
56
|
const argTypes = {
|
|
@@ -76,6 +75,10 @@ const argTypes = {
|
|
|
76
75
|
control: 'select',
|
|
77
76
|
options: Object.values(LOADING_BAR_COLORS),
|
|
78
77
|
},
|
|
78
|
+
paddingSize: {
|
|
79
|
+
control: 'select',
|
|
80
|
+
options: Object.values(CARD_PADDING_SIZES),
|
|
81
|
+
},
|
|
79
82
|
} as ArgTypes;
|
|
80
83
|
|
|
81
84
|
Interactive.argTypes = argTypes;
|