@bethinkpl/design-system 26.15.1 → 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/.eslintrc.cjs +9 -0
- 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/HelpButton/HelpButton.vue.d.ts +40 -0
- package/dist/lib/js/components/Buttons/HelpButton/index.d.ts +3 -0
- 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 +79 -430
- package/dist/lib/js/components/DatePickers/DateBox/DateBox.vue.d.ts +2 -1
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.vue.d.ts +4 -2
- package/dist/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue.d.ts +2 -1
- 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/FormField/FormField.consts.d.ts +9 -0
- package/dist/lib/js/components/Form/FormField/FormField.stories.shared.d.ts +5 -0
- package/dist/lib/js/components/Form/FormField/FormField.types.d.ts +21 -0
- package/dist/lib/js/components/Form/FormField/FormField.utils.d.ts +11 -0
- package/dist/lib/js/components/Form/FormField/FormField.vue.d.ts +20 -0
- package/dist/lib/js/components/Form/FormField/FormFieldMessage/FormFieldMessage.vue.d.ts +30 -0
- package/dist/lib/js/components/Form/FormField/FormFieldMessage/index.d.ts +3 -0
- package/dist/lib/js/components/Form/FormField/index.d.ts +5 -0
- package/dist/lib/js/components/Form/InputField/InputField.types.d.ts +13 -0
- package/dist/lib/js/components/Form/InputField/InputField.vue.d.ts +78 -0
- package/dist/lib/js/components/Form/InputField/index.d.ts +3 -0
- package/dist/lib/js/components/Form/InputField/useInputFieldWithinForm.d.ts +8 -0
- package/dist/lib/js/components/Form/PasswordField/PasswordField.vue.d.ts +76 -0
- package/dist/lib/js/components/Form/PasswordField/index.d.ts +3 -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.consts.d.ts +8 -4
- package/dist/lib/js/components/Modals/Modal/Modal.vue.d.ts +281 -1093
- package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +288 -1100
- 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 +190 -581
- 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 +10 -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-plchnY0B.js → AccessStatus-DGd8XBwr.js} +1 -1
- package/docs/assets/{AccessStatus.stories-DIIoog2Q.js → AccessStatus.stories-BUpfD_Uw.js} +1 -1
- package/docs/assets/Avatar-DJEZDpOI.js +1 -0
- package/docs/assets/{Avatar.stories-9Vth29zT.js → Avatar.stories-D40fYcFF.js} +1 -1
- package/docs/assets/{Badge-BbvNKG41.js → Badge-B8eFbzRx.js} +1 -1
- package/docs/assets/{Badge.stories-CKPGT_pt.js → Badge.stories-DxdwaS-k.js} +3 -3
- package/docs/assets/{BadgeScore-BOOWTi6N.js → BadgeScore-ByouU1Eu.js} +1 -1
- package/docs/assets/{BadgeScore.stories-ERFMPhhE.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-NMNh0Xfo.js +1 -0
- package/docs/assets/{BasicRichListItem.stories-BJZo9YF9.js → BasicRichListItem.stories-Gu9n5wvW.js} +2 -2
- package/docs/assets/{BlockadeStatus-D1j0ZWIW.js → BlockadeStatus-Dqr_LSfC.js} +1 -1
- package/docs/assets/{BlockedeStatus.stories-BKi05Ndl.js → BlockedeStatus.stories-BKblKF33.js} +1 -1
- package/docs/assets/Button-XuK8IxnR.js +1 -0
- package/docs/assets/{Button.stories-Da2LsOLk.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-CPuSx_lW.js +1 -0
- package/docs/assets/{CardExpandable.stories-DtC5egGK.js → CardExpandable.stories-mHnNt6zg.js} +1 -1
- package/docs/assets/Checkbox-g1Bvy8z-.js +1 -0
- package/docs/assets/{Checkbox.stories-BUIzgcCC.js → Checkbox.stories-DdJRLzJy.js} +1 -1
- package/docs/assets/{Chip-BJcjfD8j.js → Chip-CGm2pLPD.js} +1 -1
- package/docs/assets/{Chip.stories-Dgmetn8m.js → Chip.stories-CnHjkDSI.js} +1 -1
- package/docs/assets/Color-ERTF36HU-8BveRk6J.js +1 -0
- package/docs/assets/{Colors.stories-BrNisWwH.js → Colors.stories-BtNgjWxi.js} +1 -1
- package/docs/assets/{ColorsThemes.stories-DvZl0m40.js → ColorsThemes.stories-Ct0Ai41o.js} +1 -1
- package/docs/assets/{ColorsTokensLms.stories-D3nA1ro1.js → ColorsTokensLms.stories-BP-WMJrS.js} +1 -1
- package/docs/assets/{ColorsTokensPrimaryBodywork.stories-w4A7RjpQ.js → ColorsTokensPrimaryBodywork.stories-zdX-tf4x.js} +1 -1
- package/docs/assets/{ColorsTokensPrimaryWnl.stories-CncgXEG5.js → ColorsTokensPrimaryWnl.stories-DFVUj_99.js} +1 -1
- package/docs/assets/{CounterToggle-DKRrZ9t2.js → CounterToggle-B9hjjWpv.js} +1 -1
- package/docs/assets/{CounterToggle.stories-DEP60zRp.js → CounterToggle.stories-BtS63BEz.js} +1 -1
- package/docs/assets/{DateBox.stories-y5_2vs0g.js → DateBox.stories-B7PTVLxc.js} +3 -3
- package/docs/assets/{DatePicker-QHo-i7qh.js → DatePicker-70Dj0lsn.js} +1 -1
- package/docs/assets/{DatePicker.stories-4hPgpb1-.js → DatePicker.stories-DZN51CwX.js} +1 -1
- package/docs/assets/{DateRangePicker-B0NAwdsr.js → DateRangePicker-D5bqKMMk.js} +1 -1
- package/docs/assets/{DateRangePicker.stories-BXQLC6L-.js → DateRangePicker.stories-WhCXoUeh.js} +1 -1
- package/docs/assets/{Divider-9o-i_zKL.js → Divider-NOTDPuJ1.js} +1 -1
- package/docs/assets/{Divider.stories-IQKEznYT.js → Divider.stories-Cjyx7utt.js} +1 -1
- package/docs/assets/{DocsRenderer-CFRXHY34-rC6r6xBG.js → DocsRenderer-CFRXHY34-BThTLMHt.js} +72 -72
- package/docs/assets/{Drawer-ClrSDwUZ.js → Drawer-CrAn35Yo.js} +1 -1
- package/docs/assets/{Drawer.stories-DR-CXra3.js → Drawer.stories-iInS0JV5.js} +1 -1
- package/docs/assets/{DrawerContent-D6Bl5GA-.js → DrawerContent-DAIzyQNz.js} +1 -1
- package/docs/assets/{DrawerContent.stories-BR11egKi.js → DrawerContent.stories-CBpbbVk_.js} +1 -1
- package/docs/assets/{DrawerDivider-DMhjaSPk.js → DrawerDivider-CKRXkKRz.js} +1 -1
- package/docs/assets/{DrawerDivider.stories-DdcVRbtO.js → DrawerDivider.stories-iQ2J_ExP.js} +1 -1
- package/docs/assets/DrawerHeader-DPBlervR.js +1 -0
- package/docs/assets/{DrawerHeader.stories-DnPlkGmI.js → DrawerHeader.stories-ugFv_siA.js} +1 -1
- package/docs/assets/{DrawerListItem-dizQZUbe.js → DrawerListItem-ClOcwiVc.js} +1 -1
- package/docs/assets/{DrawerListItem.stories-pVTEuckG.js → DrawerListItem.stories-BMZ35_qS.js} +1 -1
- package/docs/assets/{DrawerListItemGroup-B5XadRVV.js → DrawerListItemGroup-SEWltKLJ.js} +1 -1
- package/docs/assets/{DrawerListItemGroup.stories-pOGG952w.js → DrawerListItemGroup.stories-Bn2TyQLH.js} +1 -1
- package/docs/assets/DrawerSection-ByJjEPPu.js +1 -0
- package/docs/assets/{DrawerSection.stories-tQT_zWBt.js → DrawerSection.stories-DuLphbcs.js} +1 -1
- package/docs/assets/DrawerTile-BGQvQQSp.js +1 -0
- package/docs/assets/DrawerTile.stories-DCe2L4Tv.js +10 -0
- package/docs/assets/Dropdown-Bdrd2ZIh.js +1 -0
- package/docs/assets/{Dropdown.stories-DLo-4_G3.js → Dropdown.stories-DnkREwa1.js} +2 -2
- package/docs/assets/FeatureIcon-DY5WvpPf.js +1 -0
- package/docs/assets/{FeatureIcon.stories-H_yUD4i4.js → FeatureIcon.stories-BqYqiSzM.js} +1 -1
- package/docs/assets/FormField-BjLFip7T.js +1 -0
- package/docs/assets/FormField.stories-DY8Mz4YE.js +40 -0
- package/docs/assets/FormField.stories.shared-3_36NKi_.js +1 -0
- package/docs/assets/FormFieldMessage-B4Oy2QBT.js +1 -0
- package/docs/assets/FormFieldMessage.stories-BD7JfJNj.js +32 -0
- package/docs/assets/GroupRichListItem-CHiSrcou.js +1 -0
- package/docs/assets/{GroupRichListItem.stories-C25AujXP.js → GroupRichListItem.stories-C3EubvlY.js} +1 -1
- package/docs/assets/HelpButton-BStTtLsz.js +1 -0
- package/docs/assets/HelpButton.stories-C3-CU20F.js +17 -0
- package/docs/assets/Icon-DUeXRUm6.js +761 -0
- package/docs/assets/{Icon.stories-BhnUVRrV.js → Icon.stories-ClzUno-E.js} +1 -1
- package/docs/assets/IconButton-Cn83Zk5-.js +1 -0
- package/docs/assets/{IconButton.stories-B8QjmTyV.js → IconButton.stories-CwZts8kF.js} +6 -6
- package/docs/assets/{IconText-CKJ4jGzm.js → IconText-Colreg4i.js} +1 -1
- package/docs/assets/{IconText.stories-B5zjHqug.js → IconText.stories-DSZffl3k.js} +1 -1
- package/docs/assets/{Image-Dbv2u4ta.js → Image-B7PRENWe.js} +1 -1
- package/docs/assets/{Image.stories-CUWPBT5K.js → Image.stories-DkYrm30P.js} +1 -1
- package/docs/assets/InputField-CplPTgjC.js +5 -0
- package/docs/assets/InputField.stories-K675XZL5.js +44 -0
- package/docs/assets/{ItemsList-CJTCYbgI.js → ItemsList-nTRSgJDP.js} +1 -1
- package/docs/assets/{LoadingBar-Dc_eLNsl.js → LoadingBar-DGNrwKu4.js} +1 -1
- package/docs/assets/{LoadingBar.stories-DWH4VmcD.js → LoadingBar.stories-owR_6Oqy.js} +1 -1
- package/docs/assets/Modal-ByQBkOMU.js +1 -0
- package/docs/assets/{Modal.stories-0zzyLX_Z.js → Modal.stories-DlxDxfN1.js} +1 -1
- package/docs/assets/{ModalDialog-BuO78uuh.js → ModalDialog-Cr21J58H.js} +1 -1
- package/docs/assets/{ModalDialog.stories-lBI09xqp.js → ModalDialog.stories-DP4FjijI.js} +1 -1
- package/docs/assets/{NumberInCircle-DnPE2szs.js → NumberInCircle-CE28_Nsz.js} +1 -1
- package/docs/assets/{NumberInCircle.stories-Tn0v6S_I.js → NumberInCircle.stories-DFdUVSKM.js} +1 -1
- package/docs/assets/OutlineDivider-DJ9pnpJN.js +1 -0
- package/docs/assets/{OutlineDivider.stories-D9Hzkdbe.js → OutlineDivider.stories-Dzpei9KR.js} +1 -1
- package/docs/assets/{OutlineItem-1BOyMbS2.js → OutlineItem-CApzlES7.js} +1 -1
- package/docs/assets/{OutlineItem.stories-DZ_RXCGO.js → OutlineItem.stories-DtEAJjzy.js} +1 -1
- package/docs/assets/{OutlineSectionHeader-LGOAi424.js → OutlineSectionHeader-CSNr7XVB.js} +1 -1
- package/docs/assets/{OutlineSectionHeader.stories-PPIsaHhR.js → OutlineSectionHeader.stories-CuJwkOKg.js} +1 -1
- package/docs/assets/OverlayHeader-B5ajrI4B.js +1 -0
- package/docs/assets/{OverlayHeader.stories-D0TRoa1n.js → OverlayHeader.stories-Zed9WXER.js} +2 -2
- package/docs/assets/{PageHeader-DkHlb7_P.js → PageHeader-Cy-UHuRb.js} +1 -1
- package/docs/assets/{PageHeader.stories-WThxfLse.js → PageHeader.stories-DlW4dler.js} +1 -1
- package/docs/assets/Pagination-D34dUtsQ.js +1 -0
- package/docs/assets/{Pagination.stories-CL9tb6Sx.js → Pagination.stories-IDi5nqa_.js} +2 -2
- package/docs/assets/PasswordField-Bkc6j8ri.js +1 -0
- package/docs/assets/PasswordField.stories-CklmsmJF.js +42 -0
- package/docs/assets/{PopOver-BDVCOkO6.js → PopOver-DVj1_TNg.js} +1 -1
- package/docs/assets/{PopOver.stories-CmDQPumC.js → PopOver.stories-BljOgM3Z.js} +2 -2
- package/docs/assets/{ProgressBar-q_I44DQc.js → ProgressBar-D2hkMeQ0.js} +1 -1
- package/docs/assets/{ProgressBar.stories-Df10tpd-.js → ProgressBar.stories-BDHI6-tO.js} +1 -1
- package/docs/assets/{ProgressDonutChart-DP55sH2Q.js → ProgressDonutChart-CBO-vy-E.js} +1 -1
- package/docs/assets/{ProgressDonutChart.stories-CXJhJ1AH.js → ProgressDonutChart.stories-CGwlVICI.js} +1 -1
- package/docs/assets/RadioButton-Bd-D-2PY.js +1 -0
- package/docs/assets/{RadioButton.stories-NVFxjqN4.js → RadioButton.stories-BkCwnbIp.js} +1 -1
- package/docs/assets/{RichListItem.stories-B3NGpkHT.js → RichListItem.stories-Bls_aY12.js} +2 -2
- package/docs/assets/SectionHeader-isKXGfjn.js +1 -0
- package/docs/assets/{SectionHeader.stories-CTANEOdf.js → SectionHeader.stories-Bj3scOLc.js} +1 -1
- package/docs/assets/{SectionTitle-DLcFKzRH.js → SectionTitle-wTuJZZVS.js} +1 -1
- package/docs/assets/{SectionTitle.stories-Dybq4paM.js → SectionTitle.stories-Dr3KOvIl.js} +1 -1
- package/docs/assets/{SelectList-B323Y2el.js → SelectList-YMQ8rEMc.js} +1 -1
- package/docs/assets/{SelectList.stories-BCS6zdJ9.js → SelectList.stories-ETdEOJ81.js} +1 -1
- package/docs/assets/{SelectListItem-DfLqJR-_.js → SelectListItem-BqKhIPSO.js} +1 -1
- package/docs/assets/{SelectListItem.stories-m8BTHS53.js → SelectListItem.stories-ClyL-djS.js} +1 -1
- package/docs/assets/{SelectListItemDivider-lDLIwtP8.js → SelectListItemDivider-CTU7_4OL.js} +1 -1
- package/docs/assets/{SelectListItemDivider.stories-BZ6_HOBG.js → SelectListItemDivider.stories-rGpk0Yeg.js} +1 -1
- package/docs/assets/{SelectListItemTile-DzAuBa66.js → SelectListItemTile-BhOwBFIO.js} +1 -1
- package/docs/assets/SelectListItemTile.stories-BXFfuX9q.js +19 -0
- package/docs/assets/{SelectListItemToggle-DJ_P6PIB.js → SelectListItemToggle-C0lffqeC.js} +1 -1
- package/docs/assets/{SelectListItemToggle.stories-yej5J6y8.js → SelectListItemToggle.stories-D39XrmtN.js} +1 -2
- package/docs/assets/SelectListSectionTitle-B9Dj10G9.js +1 -0
- package/docs/assets/{SelectListSectionTitle.stories-NKPegok4.js → SelectListSectionTitle.stories-DCZ-Sq6v.js} +1 -1
- package/docs/assets/{SelectionControl-CwdtLuOD.js → SelectionControl-DIC2vtGo.js} +1 -1
- package/docs/assets/{SelectionTile-hjRK7Lwc.js → SelectionTile-D7fhj7-I.js} +2 -2
- package/docs/assets/{SelectionTile.stories-DRdGcDuJ.js → SelectionTile.stories-Cato0iSj.js} +1 -1
- package/docs/assets/{Skeleton-DhyJ4ZKG.js → Skeleton-D5xhZMQa.js} +5 -5
- package/docs/assets/{Skeleton.stories-CsZjBoj1.js → Skeleton.stories-ll-E-sPN.js} +1 -1
- package/docs/assets/SurveyQuestionOpenEnded-DDdPQe2b.js +1 -0
- package/docs/assets/{SurveyQuestionOpenEnded.stories-Is_s49TT.js → SurveyQuestionOpenEnded.stories-mHTUclXK.js} +1 -1
- package/docs/assets/SurveyQuestionScale-BKZbW5q7.js +1 -0
- package/docs/assets/{SurveyQuestionScale.stories-BqOjFThb.js → SurveyQuestionScale.stories-Cczg5QpY.js} +1 -1
- package/docs/assets/SurveyToggle-Sid2a-IO.js +1 -0
- package/docs/assets/{SurveyToggle.stories-DySS4Jzx.js → SurveyToggle.stories-Dv7PJARv.js} +1 -1
- package/docs/assets/Switch-B8xEwHO8.js +1 -0
- package/docs/assets/{Switch.stories-Bq6_6t39.js → Switch.stories-RbY8wA55.js} +1 -1
- package/docs/assets/{TabItem-Bn_qIbPX.js → TabItem-Ci3vrkRH.js} +1 -1
- package/docs/assets/{TabItem.stories-ZPYw1uH1.js → TabItem.stories-relncwaI.js} +1 -1
- package/docs/assets/{TextGroup-AUUBIFJZ.js → TextGroup-dzR19lzs.js} +1 -1
- package/docs/assets/{TextGroup.stories-CqwkdBAO.js → TextGroup.stories-bCLjp0Xb.js} +1 -1
- package/docs/assets/{ThreeColumnLayout-DXA1815_.js → ThreeColumnLayout-LVzDOKfj.js} +1 -1
- package/docs/assets/{ThreeColumnLayout.stories-BA08mTZ7.js → ThreeColumnLayout.stories-CkgbTH3p.js} +1 -1
- package/docs/assets/{Tile-3fvrXM7M.js → Tile-ByL6drhn.js} +1 -1
- package/docs/assets/{Tile.sb.shared-Crj50ugV.js → Tile.sb.shared-D3LxXPDs.js} +1 -1
- package/docs/assets/Tile.stories-BhXwnkKz.js +12 -0
- package/docs/assets/{Toast-CTbKhm1i.js → Toast-ukLuB2Qi.js} +1 -1
- package/docs/assets/{Toast.stories-hUEtnOQn.js → Toast.stories-D3PagUcH.js} +1 -1
- package/docs/assets/{ToggleButton-D-t1sDTL.js → ToggleButton-YUVnfx-x.js} +1 -1
- package/docs/assets/{ToggleButton.stories-CaAweKdC.js → ToggleButton.stories-C18YYEsJ.js} +1 -1
- package/docs/assets/{Tooltip-DZi9yXjr.js → Tooltip-BvaJ_K9_.js} +1 -1
- package/docs/assets/{Tooltip.stories-D-DHfToA.js → Tooltip.stories-o7f8wLv_.js} +4 -4
- package/docs/assets/{TypographyTokensLms.stories-CZpPPUwu.js → TypographyTokensLms.stories-Cm_y52b6.js} +1 -1
- package/docs/assets/{TypographyVariables.stories-B4Lg96R3.js → TypographyVariables.stories-DTHJ_1UO.js} +1 -1
- package/docs/assets/{Well-D1j9q3W3.js → Well-iUOt2HEx.js} +1 -1
- package/docs/assets/{Well.stories-wgg6f6S7.js → Well.stories-4VLIlu-l.js} +3 -3
- package/docs/assets/entry-preview-CAn2_StQ.js +1 -0
- package/docs/assets/{entry-preview-docs-Bz8Se46p.js → entry-preview-docs-Y_6rrjxM.js} +1 -1
- package/docs/assets/{iframe-CKOJ9wC7.js → iframe-D_RvUlhr.js} +18 -15
- 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/index.json +1 -1
- package/docs/project.json +1 -1
- package/lib/js/components/Badge/Badge.vue +6 -5
- 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 +18 -3
- 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/Buttons/HelpButton/HelpButton.spec.ts +87 -0
- package/lib/js/components/Buttons/HelpButton/HelpButton.stories.ts +70 -0
- package/lib/js/components/Buttons/HelpButton/HelpButton.vue +52 -0
- package/lib/js/components/Buttons/HelpButton/index.ts +3 -0
- 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/Chip/Chip.spec.ts +3 -2
- package/lib/js/components/Chip/Chip.vue +0 -1
- package/lib/js/components/DatePickers/DateBox/DateBox.stories.ts +0 -3
- package/lib/js/components/Form/FormField/FormField.consts.ts +10 -0
- package/lib/js/components/Form/FormField/FormField.spec.ts +138 -0
- package/lib/js/components/Form/FormField/FormField.stories.shared.ts +53 -0
- package/lib/js/components/Form/FormField/FormField.stories.ts +81 -0
- package/lib/js/components/Form/FormField/FormField.types.ts +17 -0
- package/lib/js/components/Form/FormField/FormField.utils.ts +24 -0
- package/lib/js/components/Form/FormField/FormField.vue +192 -0
- package/lib/js/components/Form/FormField/FormFieldMessage/FormFieldMessage.spec.ts +53 -0
- package/lib/js/components/Form/FormField/FormFieldMessage/FormFieldMessage.stories.ts +74 -0
- package/lib/js/components/Form/FormField/FormFieldMessage/FormFieldMessage.vue +89 -0
- package/lib/js/components/Form/FormField/FormFieldMessage/index.ts +2 -0
- package/lib/js/components/Form/FormField/index.ts +6 -0
- package/lib/js/components/Form/InputField/InputField.spec.ts +274 -0
- package/lib/js/components/Form/InputField/InputField.stories.ts +98 -0
- package/lib/js/components/Form/InputField/InputField.types.ts +14 -0
- package/lib/js/components/Form/InputField/InputField.vue +175 -0
- package/lib/js/components/Form/InputField/index.ts +3 -0
- package/lib/js/components/Form/InputField/useInputFieldWithinForm.ts +54 -0
- package/lib/js/components/Form/PasswordField/PasswordField.spec.ts +73 -0
- package/lib/js/components/Form/PasswordField/PasswordField.stories.ts +88 -0
- package/lib/js/components/Form/PasswordField/PasswordField.vue +55 -0
- package/lib/js/components/Form/PasswordField/index.ts +3 -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.consts.ts +8 -2
- package/lib/js/components/Modals/Modal/Modal.vue +12 -5
- package/lib/js/components/Modals/ModalDialog/ModalDialog.vue +2 -2
- package/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.stories.ts +0 -1
- package/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue +43 -47
- package/lib/js/components/TabItem/TabItem.spec.ts +0 -1
- package/lib/js/components/Toast/Toast.vue +0 -2
- package/lib/js/icons/fontawesome.ts +2 -0
- package/lib/js/index.ts +11 -1
- package/lib/js/styles/Borders/BorderSizes.stories.ts +1 -1
- package/lib/js/styles/ItemsList.vue +1 -1
- package/lib/js/tests/helpers.ts +5 -0
- package/package.json +13 -7
- package/tsconfig.base.json +1 -2
- package/tsconfig.build.json +8 -0
- package/tsconfig.json +1 -6
- package/vite.config.ts +11 -8
- package/docs/assets/Avatar-CM7iogZ3.js +0 -1
- package/docs/assets/Banner-DXAd9x-3.js +0 -1
- package/docs/assets/Banner.stories-BC2VxrMC.js +0 -62
- package/docs/assets/BasicRichListItem-quALUWxY.js +0 -1
- package/docs/assets/Button-C5dr6u6F.js +0 -1
- package/docs/assets/Card-KSW_Q55y.js +0 -1
- package/docs/assets/Card.stories-Bqmd77lg.js +0 -49
- package/docs/assets/CardExpandable-yMDr4_fF.js +0 -1
- package/docs/assets/Checkbox-DAOkXx1R.js +0 -1
- package/docs/assets/Color-ERTF36HU-DaHgyI5V.js +0 -1
- package/docs/assets/DrawerHeader-AkG6Jq7W.js +0 -1
- package/docs/assets/DrawerSection-HBM59yvF.js +0 -1
- package/docs/assets/DrawerTile-0-CB5w9j.js +0 -1
- package/docs/assets/DrawerTile.stories-6JDnzzyo.js +0 -10
- package/docs/assets/Dropdown-CYFZ3OvV.js +0 -1
- package/docs/assets/FeatureIcon-BoUhuGOr.js +0 -1
- package/docs/assets/GroupRichListItem-C_Gsy7fK.js +0 -1
- package/docs/assets/Icon-I3Cniv10.js +0 -761
- package/docs/assets/IconButton-BPKB5gT7.js +0 -1
- package/docs/assets/Modal-Cy1kzNhG.js +0 -1
- package/docs/assets/OutlineDivider-UaRb6wKt.js +0 -1
- package/docs/assets/OverlayHeader-u9AeOezr.js +0 -1
- package/docs/assets/Pagination-CgO9MoPY.js +0 -1
- package/docs/assets/RadioButton-DISpvFOt.js +0 -1
- package/docs/assets/SectionHeader-ByewlGaG.js +0 -1
- package/docs/assets/SelectListItemTile.stories-n2MJqr9U.js +0 -19
- package/docs/assets/SelectListSectionTitle-BFbrwNgw.js +0 -1
- package/docs/assets/SurveyQuestionOpenEnded-B_HbDRQs.js +0 -1
- package/docs/assets/SurveyQuestionScale-CiKDA0ax.js +0 -1
- package/docs/assets/SurveyToggle-CCF4WE7n.js +0 -1
- package/docs/assets/Switch-Du-uh84v.js +0 -1
- package/docs/assets/Tile.stories-0SQaiGz7.js +0 -12
- package/docs/assets/_commonjsHelpers-CDR5Xrri.js +0 -1
- package/docs/assets/entry-preview-lHccVHf5.js +0 -1
- package/docs/assets/index-0M4xY6Fw.js +0 -1
- package/docs/assets/index-Be4sB5Yj.js +0 -1
- package/docs/assets/preview-BIPjgpxe.js +0 -2
- package/docs/assets/preview-BQvHXGdy.js +0 -64
- package/docs/assets/string-B1AGRR5v.js +0 -1
- package/docs/assets/vue-popper-DoPHnofs.js +0 -24
- package/docs/assets/vue.esm-bundler-DD4BrEtS.js +0 -36
|
@@ -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;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
:class="
|
|
4
|
-
'ds-card'
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
:class="[
|
|
4
|
+
'ds-card',
|
|
5
|
+
borderColorClass,
|
|
6
|
+
borderSizeClass,
|
|
7
|
+
{
|
|
8
|
+
'-ds-top-border': hasTopBoarder,
|
|
9
|
+
'-ds-left-border': hasLeftBoarder,
|
|
10
|
+
'-ds-paddingLarge': paddingSize === CARD_PADDING_SIZES.LARGE,
|
|
11
|
+
'-ds-flat': isFlat,
|
|
12
|
+
},
|
|
13
|
+
]"
|
|
10
14
|
>
|
|
11
15
|
<ds-loading-bar
|
|
12
16
|
v-if="hasLoadingBar"
|
|
@@ -30,7 +34,13 @@
|
|
|
30
34
|
<div v-if="$slots.content" class="ds-card__content">
|
|
31
35
|
<slot name="content" />
|
|
32
36
|
</div>
|
|
33
|
-
<
|
|
37
|
+
<div
|
|
38
|
+
v-if="$slots.footer"
|
|
39
|
+
class="ds-card__footer"
|
|
40
|
+
:class="{ '-ds-withPadding': footerHasPadding }"
|
|
41
|
+
>
|
|
42
|
+
<slot name="footer" />
|
|
43
|
+
</div>
|
|
34
44
|
</div>
|
|
35
45
|
</template>
|
|
36
46
|
|
|
@@ -44,12 +54,15 @@
|
|
|
44
54
|
.ds-card {
|
|
45
55
|
$root: &;
|
|
46
56
|
|
|
47
|
-
background-color: $color-default-background;
|
|
48
|
-
border-radius: $radius-m;
|
|
49
|
-
box-shadow: $shadow-s;
|
|
50
57
|
position: relative;
|
|
51
58
|
width: inherit;
|
|
52
59
|
|
|
60
|
+
&:not(.-ds-flat) {
|
|
61
|
+
background-color: $color-default-background;
|
|
62
|
+
border-radius: $radius-m;
|
|
63
|
+
box-shadow: $shadow-s;
|
|
64
|
+
}
|
|
65
|
+
|
|
53
66
|
&.-ds-top-border {
|
|
54
67
|
border-top: $border-l transparent solid;
|
|
55
68
|
}
|
|
@@ -59,32 +72,50 @@
|
|
|
59
72
|
}
|
|
60
73
|
|
|
61
74
|
&.-ds-border-size-small {
|
|
62
|
-
border-radius: $radius-xs;
|
|
63
75
|
border-top-width: $border-s;
|
|
64
76
|
|
|
77
|
+
#{$root}:not(.-ds-flat) & {
|
|
78
|
+
border-radius: $radius-xs;
|
|
79
|
+
}
|
|
80
|
+
|
|
65
81
|
#{$root}__loadingBar {
|
|
66
|
-
border-radius: $radius-xs $radius-xs 0 0;
|
|
67
82
|
top: -$border-s;
|
|
83
|
+
|
|
84
|
+
#{$root}:not(.-ds-flat) & {
|
|
85
|
+
border-radius: $radius-xs $radius-xs 0 0;
|
|
86
|
+
}
|
|
68
87
|
}
|
|
69
88
|
}
|
|
70
89
|
|
|
71
90
|
&.-ds-border-size-medium {
|
|
72
|
-
border-radius: $radius-s;
|
|
73
91
|
border-top-width: $border-m;
|
|
74
92
|
|
|
93
|
+
#{$root}:not(.-ds-flat) & {
|
|
94
|
+
border-radius: $radius-s;
|
|
95
|
+
}
|
|
96
|
+
|
|
75
97
|
#{$root}__loadingBar {
|
|
76
|
-
border-radius: $radius-s $radius-s 0 0;
|
|
77
98
|
top: -$border-m;
|
|
99
|
+
|
|
100
|
+
#{$root}:not(.-ds-flat) & {
|
|
101
|
+
border-radius: $radius-s $radius-s 0 0;
|
|
102
|
+
}
|
|
78
103
|
}
|
|
79
104
|
}
|
|
80
105
|
|
|
81
106
|
&.-ds-border-size-large {
|
|
82
|
-
border-radius: $radius-m;
|
|
83
107
|
border-top-width: $border-l;
|
|
84
108
|
|
|
109
|
+
#{$root}:not(.-ds-flat) & {
|
|
110
|
+
border-radius: $radius-m;
|
|
111
|
+
}
|
|
112
|
+
|
|
85
113
|
#{$root}__loadingBar {
|
|
86
|
-
border-radius: $radius-m $radius-m 0 0;
|
|
87
114
|
top: -$border-l;
|
|
115
|
+
|
|
116
|
+
#{$root}:not(.-ds-flat) & {
|
|
117
|
+
border-radius: $radius-m $radius-m 0 0;
|
|
118
|
+
}
|
|
88
119
|
}
|
|
89
120
|
}
|
|
90
121
|
|
|
@@ -121,23 +152,45 @@
|
|
|
121
152
|
&__header {
|
|
122
153
|
&.-ds-withPadding {
|
|
123
154
|
padding: $space-s;
|
|
155
|
+
|
|
156
|
+
#{$root}.-ds-paddingLarge & {
|
|
157
|
+
padding: $space-l $space-l $space-s;
|
|
158
|
+
}
|
|
124
159
|
}
|
|
125
160
|
}
|
|
126
161
|
|
|
127
162
|
&__headerDivider {
|
|
128
163
|
&.-ds-withHorizontalMargin {
|
|
129
164
|
margin: 0 $space-s;
|
|
165
|
+
|
|
166
|
+
#{$root}.-ds-paddingLarge & {
|
|
167
|
+
margin: 0 $space-l;
|
|
168
|
+
}
|
|
130
169
|
}
|
|
131
170
|
}
|
|
132
171
|
|
|
133
172
|
&__content {
|
|
134
173
|
padding: $space-s;
|
|
174
|
+
|
|
175
|
+
#{$root}.-ds-paddingLarge & {
|
|
176
|
+
padding: $space-s $space-l;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&__footer {
|
|
181
|
+
&.-ds-withPadding {
|
|
182
|
+
padding: 0 $space-s $space-s;
|
|
183
|
+
|
|
184
|
+
#{$root}.-ds-paddingLarge & {
|
|
185
|
+
padding: 0 $space-l $space-l;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
135
188
|
}
|
|
136
189
|
}
|
|
137
190
|
</style>
|
|
138
191
|
|
|
139
|
-
<script lang="ts">
|
|
140
|
-
import {
|
|
192
|
+
<script lang="ts" setup>
|
|
193
|
+
import { computed } from 'vue';
|
|
141
194
|
|
|
142
195
|
import DsDivider from '../../Divider/Divider.vue';
|
|
143
196
|
import DsLoadingBar, { LOADING_BAR_COLORS, LoadingBarColors } from '../../LoadingBar';
|
|
@@ -145,79 +198,66 @@ import {
|
|
|
145
198
|
CARD_BORDER_COLORS,
|
|
146
199
|
CARD_BORDER_POSITIONS,
|
|
147
200
|
CARD_BORDER_SIZES,
|
|
201
|
+
CARD_PADDING_SIZES,
|
|
148
202
|
CardBorderColors,
|
|
149
203
|
CardBorderPositions,
|
|
150
204
|
CardBorderSizes,
|
|
205
|
+
CardPaddingSize,
|
|
151
206
|
} from './Card.consts';
|
|
152
207
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
);
|
|
208
|
-
},
|
|
209
|
-
borderColorClass() {
|
|
210
|
-
if (this.hasLoadingBar) {
|
|
211
|
-
return '-ds-border-color-transparent';
|
|
212
|
-
}
|
|
213
|
-
return `-ds-border-color-${this.borderColor}`;
|
|
214
|
-
},
|
|
215
|
-
borderSizeClass() {
|
|
216
|
-
if (!this.hasBorder && !this.hasLoadingBar) {
|
|
217
|
-
return '';
|
|
218
|
-
}
|
|
219
|
-
return `-ds-border-size-${this.borderSize}`;
|
|
220
|
-
},
|
|
221
|
-
},
|
|
208
|
+
const {
|
|
209
|
+
headerHasPadding = false,
|
|
210
|
+
footerHasPadding = false,
|
|
211
|
+
paddingSize = CARD_PADDING_SIZES.SMALL,
|
|
212
|
+
dividerUnderHeader = false,
|
|
213
|
+
hasBorder = false,
|
|
214
|
+
borderPosition = CARD_BORDER_POSITIONS.TOP,
|
|
215
|
+
borderSize = CARD_BORDER_SIZES.LARGE,
|
|
216
|
+
borderColor = CARD_BORDER_COLORS.NEUTRAL_HEAVY,
|
|
217
|
+
hasLoadingBar = false,
|
|
218
|
+
loadingBarColor = LOADING_BAR_COLORS.NEUTRAL_HEAVY,
|
|
219
|
+
loadingBarTime = '0',
|
|
220
|
+
isFlat = false,
|
|
221
|
+
} = defineProps<{
|
|
222
|
+
headerHasPadding?: boolean;
|
|
223
|
+
footerHasPadding?: boolean;
|
|
224
|
+
paddingSize?: CardPaddingSize;
|
|
225
|
+
dividerUnderHeader?: boolean;
|
|
226
|
+
hasBorder?: boolean;
|
|
227
|
+
borderPosition?: CardBorderPositions;
|
|
228
|
+
borderSize?: CardBorderSizes;
|
|
229
|
+
borderColor?: CardBorderColors;
|
|
230
|
+
hasLoadingBar?: boolean;
|
|
231
|
+
loadingBarColor?: LoadingBarColors;
|
|
232
|
+
loadingBarTime?: string;
|
|
233
|
+
isFlat?: boolean;
|
|
234
|
+
}>();
|
|
235
|
+
|
|
236
|
+
defineSlots<{
|
|
237
|
+
header?: () => any;
|
|
238
|
+
content?: () => any;
|
|
239
|
+
footer?: () => any;
|
|
240
|
+
}>();
|
|
241
|
+
|
|
242
|
+
const hasLeftBoarder = computed(() => {
|
|
243
|
+
return hasBorder && borderPosition === CARD_BORDER_POSITIONS.LEFT && !hasLoadingBar;
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
const hasTopBoarder = computed(() => {
|
|
247
|
+
return (hasBorder && borderPosition === CARD_BORDER_POSITIONS.TOP) || hasLoadingBar;
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
const borderColorClass = computed(() => {
|
|
251
|
+
if (hasLoadingBar) {
|
|
252
|
+
return '-ds-border-color-transparent';
|
|
253
|
+
}
|
|
254
|
+
return `-ds-border-color-${borderColor}`;
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
const borderSizeClass = computed(() => {
|
|
258
|
+
if (!hasBorder && !hasLoadingBar) {
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
return `-ds-border-size-${borderSize}`;
|
|
222
262
|
});
|
|
223
263
|
</script>
|
|
@@ -5,6 +5,7 @@ import Chip from './Chip.vue';
|
|
|
5
5
|
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
6
6
|
import Icon, { ICONS } from '../Icons/Icon';
|
|
7
7
|
import { CHIP_COLORS, CHIP_SIZES } from './Chip.consts';
|
|
8
|
+
import IconButton from '../Buttons/IconButton';
|
|
8
9
|
|
|
9
10
|
interface createComponentOptions {
|
|
10
11
|
label?: string;
|
|
@@ -70,7 +71,7 @@ describe('Chip', () => {
|
|
|
70
71
|
it('renders remove', () => {
|
|
71
72
|
const component = createComponent({ isRemovable: true });
|
|
72
73
|
|
|
73
|
-
const removeButton = component.findComponent<typeof
|
|
74
|
+
const removeButton = component.findComponent<typeof IconButton>('.ds-chip__remove');
|
|
74
75
|
expect(removeButton.exists()).toBe(true);
|
|
75
76
|
expect(removeButton.props().icon).toBe(ICONS.FA_XMARK);
|
|
76
77
|
|
|
@@ -78,7 +79,7 @@ describe('Chip', () => {
|
|
|
78
79
|
expect(component.emitted('remove')?.length).toBe(1);
|
|
79
80
|
});
|
|
80
81
|
|
|
81
|
-
it("doesn' contain x-small class by default", () => {
|
|
82
|
+
it("doesn't contain x-small class by default", () => {
|
|
82
83
|
const component = createComponent({ size: CHIP_SIZES.SMALL });
|
|
83
84
|
|
|
84
85
|
expect(component.classes()).not.toContain('-x-small');
|
|
@@ -2,7 +2,6 @@ import { Args, ArgTypes, Meta, StoryObj } from '@storybook/vue3';
|
|
|
2
2
|
import { ICONS } from '../../Icons/Icon';
|
|
3
3
|
import { DATE_PICKER_COLORS, DATE_PICKER_STATES } from '../DatePicker';
|
|
4
4
|
import { ComponentProps } from 'vue-component-type-helpers';
|
|
5
|
-
import { useArgs } from '@storybook/preview-api';
|
|
6
5
|
import DateBox from './index';
|
|
7
6
|
|
|
8
7
|
type DateBoxProps = ComponentProps<typeof DateBox>;
|
|
@@ -11,8 +10,6 @@ const meta: Meta<DateBoxProps> = {
|
|
|
11
10
|
title: 'Components/DatePickers/DateBox',
|
|
12
11
|
component: DateBox,
|
|
13
12
|
render: (args) => {
|
|
14
|
-
const [_, updateArgs] = useArgs();
|
|
15
|
-
|
|
16
13
|
return {
|
|
17
14
|
components: { DateBox },
|
|
18
15
|
setup() {
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { mount } from '@vue/test-utils';
|
|
3
|
+
import { h } from 'vue';
|
|
4
|
+
import FormField from './FormField.vue';
|
|
5
|
+
import { ComponentProps, ComponentSlots } from 'vue-component-type-helpers';
|
|
6
|
+
import FormFieldMessage from './FormFieldMessage/FormFieldMessage.vue';
|
|
7
|
+
|
|
8
|
+
const fieldId = 'form-field-v-0';
|
|
9
|
+
const messageId = 'form-field-v-0-message';
|
|
10
|
+
|
|
11
|
+
function setup(
|
|
12
|
+
props: ComponentProps<typeof FormField> = {},
|
|
13
|
+
slots: Partial<ComponentSlots<typeof FormField>> = {},
|
|
14
|
+
) {
|
|
15
|
+
return mount(FormField, {
|
|
16
|
+
props,
|
|
17
|
+
slots: {
|
|
18
|
+
field() {
|
|
19
|
+
return [h('input')];
|
|
20
|
+
},
|
|
21
|
+
...slots,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
describe('FormField', () => {
|
|
27
|
+
it('should render', () => {
|
|
28
|
+
const wrapper = setup(
|
|
29
|
+
{
|
|
30
|
+
label: 'Label',
|
|
31
|
+
labelInfo: 'Label info',
|
|
32
|
+
subLabel: 'Sub Label',
|
|
33
|
+
hasRequiredIndicator: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
labelAside: () => [h('span', 'Label aside')],
|
|
37
|
+
message: () => [
|
|
38
|
+
h(
|
|
39
|
+
FormFieldMessage,
|
|
40
|
+
{
|
|
41
|
+
messageId,
|
|
42
|
+
},
|
|
43
|
+
() => 'Message',
|
|
44
|
+
),
|
|
45
|
+
],
|
|
46
|
+
fieldStatus: () => [h('span', 'Field status')],
|
|
47
|
+
help: () => [h('span', 'Help')],
|
|
48
|
+
},
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
expect(wrapper.exists()).toBe(true);
|
|
52
|
+
expect(wrapper.find('.ds-formField__label').attributes('for')).toBe(fieldId);
|
|
53
|
+
expect(wrapper.find('.ds-formField__labelText').text()).toBe('Label');
|
|
54
|
+
expect(wrapper.find('.ds-formField__labelRequired').text()).toBe('*');
|
|
55
|
+
expect(wrapper.find('.ds-formField__labelInfo').text()).toBe('Label info');
|
|
56
|
+
expect(wrapper.find('.ds-formField__subLabelRow').text()).toBe('Sub Label');
|
|
57
|
+
expect(wrapper.find('.ds-formField__field input').exists()).toBe(true);
|
|
58
|
+
expect(wrapper.find('.ds-formField__labelAside').text()).toBe('Label aside');
|
|
59
|
+
expect(wrapper.find(`#${messageId}`).text()).toBe('Message');
|
|
60
|
+
expect(wrapper.find('.ds-formField__fieldStatus').text()).toBe('Field status');
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it.each([
|
|
64
|
+
{
|
|
65
|
+
name: 'only label',
|
|
66
|
+
props: {
|
|
67
|
+
label: 'Label',
|
|
68
|
+
},
|
|
69
|
+
slots: {},
|
|
70
|
+
expected: true,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'only label aside',
|
|
74
|
+
props: {},
|
|
75
|
+
slots: {
|
|
76
|
+
labelAside: () => [h('span', 'Label aside')],
|
|
77
|
+
},
|
|
78
|
+
expected: true,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'only subLabel',
|
|
82
|
+
props: {
|
|
83
|
+
subLabel: 'Sub Label',
|
|
84
|
+
},
|
|
85
|
+
slots: {},
|
|
86
|
+
expected: true,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'no labels wrapper',
|
|
90
|
+
props: {},
|
|
91
|
+
slots: {},
|
|
92
|
+
expected: false,
|
|
93
|
+
},
|
|
94
|
+
])(`should render labels wrapper: $name`, ({ props, slots, expected }) => {
|
|
95
|
+
const wrapper = setup(props, slots);
|
|
96
|
+
|
|
97
|
+
expect(wrapper.find('.ds-formField__labels').exists()).toBe(expected);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it.each([
|
|
101
|
+
{
|
|
102
|
+
name: 'only message',
|
|
103
|
+
props: {},
|
|
104
|
+
slots: {
|
|
105
|
+
message: () => [h(FormFieldMessage, { messageId }, () => 'Message')],
|
|
106
|
+
},
|
|
107
|
+
expected: true,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'only field status',
|
|
111
|
+
props: {},
|
|
112
|
+
slots: {
|
|
113
|
+
fieldStatus: () => [h('span', 'Field status')],
|
|
114
|
+
},
|
|
115
|
+
expected: true,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'no footer row',
|
|
119
|
+
props: {},
|
|
120
|
+
slots: {},
|
|
121
|
+
expected: false,
|
|
122
|
+
},
|
|
123
|
+
])('should render footer row: $name', ({ props, slots, expected }) => {
|
|
124
|
+
const wrapper = setup(props, slots);
|
|
125
|
+
|
|
126
|
+
expect(wrapper.find('.ds-formField__footerRow').exists()).toBe(expected);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it('should render message', () => {
|
|
130
|
+
const messageText = 'Message text';
|
|
131
|
+
const wrapper = setup({
|
|
132
|
+
messageText,
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
expect(wrapper.find('.ds-formField__message').exists()).toBe(true);
|
|
136
|
+
expect(wrapper.find(`#${messageId}`).text()).toBe(messageText);
|
|
137
|
+
});
|
|
138
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { FORM_FIELD_STATES } from './FormField.consts';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/vue3';
|
|
3
|
+
import FormField from './FormField.vue';
|
|
4
|
+
|
|
5
|
+
export const argTypes: Meta<typeof FormField>['argTypes'] = {
|
|
6
|
+
label: {
|
|
7
|
+
control: 'text',
|
|
8
|
+
},
|
|
9
|
+
state: {
|
|
10
|
+
control: 'select',
|
|
11
|
+
options: Object.values(FORM_FIELD_STATES),
|
|
12
|
+
},
|
|
13
|
+
hasRequiredIndicator: {
|
|
14
|
+
control: 'boolean',
|
|
15
|
+
},
|
|
16
|
+
labelInfo: {
|
|
17
|
+
control: 'text',
|
|
18
|
+
},
|
|
19
|
+
subLabel: {
|
|
20
|
+
control: 'text',
|
|
21
|
+
},
|
|
22
|
+
fieldId: {
|
|
23
|
+
control: 'text',
|
|
24
|
+
},
|
|
25
|
+
labelAside: {
|
|
26
|
+
control: 'text',
|
|
27
|
+
},
|
|
28
|
+
message: {
|
|
29
|
+
control: 'text',
|
|
30
|
+
},
|
|
31
|
+
fieldStatus: {
|
|
32
|
+
control: 'text',
|
|
33
|
+
},
|
|
34
|
+
help: {
|
|
35
|
+
control: 'boolean',
|
|
36
|
+
},
|
|
37
|
+
messageText: {
|
|
38
|
+
control: 'text',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const args: StoryObj<typeof FormField>['args'] = {
|
|
43
|
+
label: 'Label',
|
|
44
|
+
state: FORM_FIELD_STATES.DEFAULT,
|
|
45
|
+
hasRequiredIndicator: false,
|
|
46
|
+
labelInfo: '(opcjonalne)',
|
|
47
|
+
subLabel: 'Sublabel write here',
|
|
48
|
+
labelAside: 'Label aside',
|
|
49
|
+
message: '',
|
|
50
|
+
help: true,
|
|
51
|
+
fieldStatus: 'Field status',
|
|
52
|
+
messageText: '',
|
|
53
|
+
};
|