@bethinkpl/design-system 26.1.0 → 26.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/design-system.umd.cjs +18 -18
- package/dist/design-system.umd.cjs.map +1 -1
- package/dist/lib/js/components/Banner/Banner.vue.d.ts +4 -0
- package/dist/lib/js/components/Buttons/Button/Button.vue.d.ts +1 -0
- package/dist/lib/js/components/Buttons/IconButton/IconButton.vue.d.ts +2 -0
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.vue.d.ts +1 -0
- package/dist/lib/js/components/Chip/Chip.vue.d.ts +3 -0
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.composables.d.ts +24 -0
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.consts.d.ts +3 -0
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.vue.d.ts +203 -166
- package/dist/lib/js/components/DatePickers/DatePickerBox/DatePickerBox.vue.d.ts +10 -5
- package/dist/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue.d.ts +402 -0
- package/dist/lib/js/components/DatePickers/DateRangePicker/index.d.ts +3 -0
- package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.vue.d.ts +7 -0
- package/dist/lib/js/components/Drawer/DrawerListItem/DrawerListItem.vue.d.ts +1 -0
- package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.vue.d.ts +4 -0
- 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/RadioButton/RadioButton.vue.d.ts +1 -0
- package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.vue.d.ts +4 -1
- package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.vue.d.ts +3 -0
- 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 +4 -0
- package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.vue.d.ts +4 -0
- package/dist/lib/js/components/Outline/OutlineItem/OutlineItem.vue.d.ts +1 -0
- package/dist/lib/js/components/Pagination/Pagination.vue.d.ts +4 -0
- package/dist/lib/js/components/ProgressBar/ProgressBar.vue.d.ts +1 -0
- package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.vue.d.ts +1 -0
- package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.vue.d.ts +2 -0
- package/dist/lib/js/components/RichList/RichListItem/RichListItem.vue.d.ts +2 -0
- 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 +5 -0
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.vue.d.ts +5 -0
- package/dist/lib/js/components/Switch/Switch.vue.d.ts +1 -0
- package/dist/lib/js/components/Tile/Tile.sb.shared.d.ts +1 -0
- package/dist/lib/js/components/Tile/Tile.vue.d.ts +1 -0
- package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.vue.d.ts +1 -0
- package/dist/lib/js/components/Tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/lib/js/icons/fontawesome.d.ts +1 -0
- package/dist/lib/js/index.d.ts +1 -0
- package/docs/assets/{AccessStatus-CZ2wkKUN.js → AccessStatus-BXan1lEc.js} +1 -1
- package/docs/assets/{AccessStatus.stories-DqLttI6G.js → AccessStatus.stories-DxmB8jeD.js} +1 -1
- package/docs/assets/{BadgeScore-Cb8Vr0p3.js → BadgeScore-CJRAekNi.js} +1 -1
- package/docs/assets/{BadgeScore.stories-VUIYoC0K.js → BadgeScore.stories-kqknHhLd.js} +1 -1
- package/docs/assets/{Banner-C_-ztwHr.js → Banner-DeL_mSKv.js} +1 -1
- package/docs/assets/{Banner.stories-DEpqpjNt.js → Banner.stories-DOdH9jC-.js} +1 -1
- package/docs/assets/{BasicRichListItem-CL431QeF.js → BasicRichListItem-D3mhBGPV.js} +1 -1
- package/docs/assets/{BasicRichListItem.stories-DJhpvSDZ.js → BasicRichListItem.stories-BL_tCw7A.js} +2 -2
- package/docs/assets/{BlockadeStatus-D0rB6KRL.js → BlockadeStatus-COz686Yw.js} +1 -1
- package/docs/assets/{BlockedeStatus.stories--W5rj6m4.js → BlockedeStatus.stories-CF5KGt2v.js} +1 -1
- package/docs/assets/{Button-BfC5uvwA.js → Button-B0thvSZc.js} +1 -1
- package/docs/assets/{Button.stories-CI72rNoF.js → Button.stories-t4KLRczd.js} +1 -1
- package/docs/assets/{Card-BNrHU9qb.js → Card-DQn9130w.js} +1 -1
- package/docs/assets/{Card.stories-Tu0NJeHc.js → Card.stories-Bws-4i9c.js} +1 -1
- package/docs/assets/{CardExpandable-CyaYxO0k.js → CardExpandable-DjcLb6gt.js} +1 -1
- package/docs/assets/{CardExpandable.stories-BnMu24tF.js → CardExpandable.stories-DQgT5zfs.js} +1 -1
- package/docs/assets/{Checkbox-Bqk4dEqh.js → Checkbox-D_2ud6Th.js} +1 -1
- package/docs/assets/{Checkbox.stories-D8ttSHbp.js → Checkbox.stories-DwLSbAE5.js} +1 -1
- package/docs/assets/{Chip-DBH11WGD.js → Chip-LprVecVf.js} +1 -1
- package/docs/assets/{Chip.stories-Dd2KHKo0.js → Chip.stories-8NyJdmpb.js} +1 -1
- package/docs/assets/{Color-ERTF36HU-Dpy8vc_W.js → Color-ERTF36HU-B4VUg7YC.js} +1 -1
- package/docs/assets/{Colors.stories-V9xulpl8.js → Colors.stories-B9f3lzBZ.js} +1 -1
- package/docs/assets/{ColorsThemes.stories-DULXUm6A.js → ColorsThemes.stories-DnjmHl__.js} +1 -1
- package/docs/assets/{ColorsTokensLms.stories-D7S65YJS.js → ColorsTokensLms.stories-BwtJlugM.js} +1 -1
- package/docs/assets/{ColorsTokensPrimaryBodywork.stories-D_vwh3Jq.js → ColorsTokensPrimaryBodywork.stories-C-UIhsfw.js} +1 -1
- package/docs/assets/{ColorsTokensPrimaryWnl.stories-BXkcRNQy.js → ColorsTokensPrimaryWnl.stories-pZHESTNX.js} +1 -1
- package/docs/assets/{CounterToggle-RylBZadb.js → CounterToggle-Bn8GLLo_.js} +1 -1
- package/docs/assets/{CounterToggle.stories-D_-AsS4y.js → CounterToggle.stories-i3F0njw3.js} +1 -1
- package/docs/assets/DatePicker-C2bxBng6.js +2 -0
- package/docs/assets/{DatePicker.stories-D7a156oj.js → DatePicker.stories-CQvgmQCi.js} +1 -1
- package/docs/assets/DateRangePicker-DmfHJ7DC.js +1 -0
- package/docs/assets/DateRangePicker.stories-CC58Ean1.js +37 -0
- package/docs/assets/{Divider-BPqXVinF.js → Divider-ClNbKvxH.js} +1 -1
- package/docs/assets/{Divider.stories-D-I6wDB1.js → Divider.stories-DjiliY9Q.js} +1 -1
- package/docs/assets/{DocsRenderer-CFRXHY34-C1Auldw2.js → DocsRenderer-CFRXHY34-87qXMkT7.js} +5 -5
- package/docs/assets/{Drawer-DbwdfqO9.js → Drawer-CPwHZ_w7.js} +1 -1
- package/docs/assets/{Drawer.stories-CA7ckJHC.js → Drawer.stories-COUOUpGR.js} +1 -1
- package/docs/assets/{DrawerContent-BGc6gxGX.js → DrawerContent-D-JrB94m.js} +1 -1
- package/docs/assets/{DrawerContent.stories-DQul9BkA.js → DrawerContent.stories-C01c08bP.js} +1 -1
- package/docs/assets/{DrawerDivider-CtJq0tq6.js → DrawerDivider-glZ2sb5T.js} +1 -1
- package/docs/assets/{DrawerDivider.stories-DM3Aqadb.js → DrawerDivider.stories-KJO8nE32.js} +1 -1
- package/docs/assets/{DrawerHeader-B5vYU2PL.js → DrawerHeader-rPEO3zyc.js} +1 -1
- package/docs/assets/{DrawerHeader.stories-cpfS-wBt.js → DrawerHeader.stories-BPskZz-V.js} +1 -1
- package/docs/assets/{DrawerListItem-0fUrCEXt.js → DrawerListItem-BtTMrhjG.js} +1 -1
- package/docs/assets/{DrawerListItem.stories-CmJW1Uss.js → DrawerListItem.stories-Kr7hSVJR.js} +1 -1
- package/docs/assets/{DrawerListItemGroup-CLrc_eJs.js → DrawerListItemGroup-BJGU_uck.js} +1 -1
- package/docs/assets/{DrawerListItemGroup.stories-bG34xd5v.js → DrawerListItemGroup.stories-CZ93-7rg.js} +1 -1
- package/docs/assets/{DrawerSection-DFvcNR71.js → DrawerSection-CqBCpJHk.js} +1 -1
- package/docs/assets/{DrawerSection.stories-DVELqRM_.js → DrawerSection.stories-DyDGPp7Y.js} +1 -1
- package/docs/assets/{DrawerTile-BJkMh2fU.js → DrawerTile-CwWntL3-.js} +1 -1
- package/docs/assets/{DrawerTile.stories-B8kWqDLf.js → DrawerTile.stories-DI0oJNxW.js} +1 -1
- package/docs/assets/{Dropdown-Dt2QFB2U.js → Dropdown-BFqYgkV7.js} +1 -1
- package/docs/assets/{Dropdown.stories-CDrmWXHI.js → Dropdown.stories-CmVTDgGH.js} +1 -1
- package/docs/assets/{FeatureIcon-B47w4DBU.js → FeatureIcon-CMzReDfy.js} +1 -1
- package/docs/assets/{FeatureIcon.stories-DfNuwkfR.js → FeatureIcon.stories-CmOZL5K8.js} +1 -1
- package/docs/assets/{GroupRichListItem-DSTlJwlb.js → GroupRichListItem-DJlVMVFf.js} +1 -1
- package/docs/assets/{GroupRichListItem.stories-C82L7KHk.js → GroupRichListItem.stories-B1-_fsF-.js} +1 -1
- package/docs/assets/{Icon-6eu_szpS.js → Icon-Daqcn32A.js} +5 -5
- package/docs/assets/{Icon.stories-D0Y2RyrD.js → Icon.stories-LBp3UCCh.js} +1 -1
- package/docs/assets/{IconButton-BO-CETCB.js → IconButton-ClvgQPZ_.js} +1 -1
- package/docs/assets/{IconButton.stories-C6kjifNZ.js → IconButton.stories-OizIRFpI.js} +1 -1
- package/docs/assets/{IconText-DF43QOY-.js → IconText-BSCjAPyJ.js} +1 -1
- package/docs/assets/{IconText.stories-B7IYW_LU.js → IconText.stories-BcJ7D5BW.js} +1 -1
- package/docs/assets/{Image-DjWPx_Cm.js → Image-SUTRVXoX.js} +1 -1
- package/docs/assets/{Image.stories-Cs6xAQBK.js → Image.stories-08ofVHJB.js} +1 -1
- package/docs/assets/{ItemsList-BRCXeyjX.js → ItemsList-MJRUsJOD.js} +1 -1
- package/docs/assets/{LoadingBar-COnzT5gw.js → LoadingBar-Bo6mXGaA.js} +1 -1
- package/docs/assets/{LoadingBar.stories-Bc3-cddz.js → LoadingBar.stories-DeC3pmh8.js} +1 -1
- package/docs/assets/{Modal-Bw0n_JyW.js → Modal-CnSHaffv.js} +1 -1
- package/docs/assets/{Modal.stories-Ba9D4xGC.js → Modal.stories-8Vq2m2VA.js} +1 -1
- package/docs/assets/{ModalDialog-BXp9X1p5.js → ModalDialog-Br9XyAyb.js} +1 -1
- package/docs/assets/{ModalDialog.stories-DfA5ze67.js → ModalDialog.stories-DY-EEkyy.js} +1 -1
- package/docs/assets/{NumberInCircle-2qc4scqu.js → NumberInCircle-CvJAMxEl.js} +1 -1
- package/docs/assets/{NumberInCircle.stories-DEPoFSIH.js → NumberInCircle.stories-CIPheFEZ.js} +1 -1
- package/docs/assets/{OutlineDivider-Bxh-mzNl.js → OutlineDivider-F421Sb92.js} +1 -1
- package/docs/assets/{OutlineDivider.stories-QIoOaFJB.js → OutlineDivider.stories-DOJmAB4N.js} +1 -1
- package/docs/assets/{OutlineItem-BjXpo06D.js → OutlineItem-B3PapuhG.js} +1 -1
- package/docs/assets/{OutlineItem.stories-BUu6aPfL.js → OutlineItem.stories-DrA_pCnx.js} +1 -1
- package/docs/assets/{OutlineSectionHeader-hAHWOzLF.js → OutlineSectionHeader-BTQYgDGK.js} +1 -1
- package/docs/assets/{OutlineSectionHeader.stories-GdEbBs1U.js → OutlineSectionHeader.stories-DAOIEP47.js} +1 -1
- package/docs/assets/{OverlayHeader-BzKvZZD3.js → OverlayHeader-i5OJFCjw.js} +1 -1
- package/docs/assets/{OverlayHeader.stories-DZaoIDUF.js → OverlayHeader.stories-CIi2o9YM.js} +1 -1
- package/docs/assets/{PageHeader-XjqUaNsz.js → PageHeader-ybo14zma.js} +1 -1
- package/docs/assets/{PageHeader.stories-C8lNq9Gy.js → PageHeader.stories-C84k8UsA.js} +1 -1
- package/docs/assets/{Pagination-_AHUDwwL.js → Pagination-CpkhlxKS.js} +1 -1
- package/docs/assets/{Pagination.stories-CMUAHShC.js → Pagination.stories-9yE1j1AT.js} +1 -1
- package/docs/assets/{PopOver-NPXfFzGB.js → PopOver-Bnhr6jSk.js} +1 -1
- package/docs/assets/{PopOver.stories--WLP9ABS.js → PopOver.stories-yqWxKflh.js} +1 -1
- package/docs/assets/{ProgressBar-BiigfDAt.js → ProgressBar-DLFYBwzz.js} +1 -1
- package/docs/assets/{ProgressBar.stories-CaTLfTca.js → ProgressBar.stories-mHQxWzow.js} +1 -1
- package/docs/assets/{ProgressDonutChart-BmTVWpWh.js → ProgressDonutChart-CO2D6WT2.js} +1 -1
- package/docs/assets/{ProgressDonutChart.stories-D_34I_ER.js → ProgressDonutChart.stories-D3I72JCw.js} +1 -1
- package/docs/assets/{RadioButton-BqvATv1T.js → RadioButton-COJplb0H.js} +1 -1
- package/docs/assets/{RadioButton.stories-BpbTcL59.js → RadioButton.stories-CB-ws-FM.js} +1 -1
- package/docs/assets/{RichListItem.stories-C1DOwiaj.js → RichListItem.stories-DsS5RmDe.js} +2 -2
- package/docs/assets/{SectionHeader-BzbLJwTE.js → SectionHeader-BklZ7w6L.js} +1 -1
- package/docs/assets/{SectionHeader.stories-C3Dk3EQq.js → SectionHeader.stories-C5t1XJ22.js} +1 -1
- package/docs/assets/{SectionTitle-BGj1y63i.js → SectionTitle-Bo_ArbM7.js} +1 -1
- package/docs/assets/{SectionTitle.stories-BdUNgJ8M.js → SectionTitle.stories-DWuWduVl.js} +1 -1
- package/docs/assets/{SelectList-CdwgpCxZ.js → SelectList-DWop0yaP.js} +1 -1
- package/docs/assets/{SelectList.stories-CkENU7xp.js → SelectList.stories-Bfo60S0K.js} +1 -1
- package/docs/assets/{SelectListItem-B6bDi3OI.js → SelectListItem-CSkYz5LV.js} +1 -1
- package/docs/assets/{SelectListItem.stories-QbUrayaQ.js → SelectListItem.stories-hRhkXAhJ.js} +1 -1
- package/docs/assets/{SelectListItemDivider-BSD2eI6K.js → SelectListItemDivider-CU5vX-7p.js} +1 -1
- package/docs/assets/{SelectListItemDivider.stories-IhgBxgAM.js → SelectListItemDivider.stories-DSXQ6aee.js} +1 -1
- package/docs/assets/{SelectListItemTile-C_oqRlGz.js → SelectListItemTile-CWTq7Qbi.js} +1 -1
- package/docs/assets/{SelectListItemTile.stories-Dn8gM40T.js → SelectListItemTile.stories-uD0_0N79.js} +1 -1
- package/docs/assets/{SelectListItemToggle-C2Nyl3Jx.js → SelectListItemToggle-D9fo6iYH.js} +1 -1
- package/docs/assets/{SelectListItemToggle.stories-n17klXWd.js → SelectListItemToggle.stories-DUPLVyV1.js} +1 -1
- package/docs/assets/{SelectListSectionTitle-ntTJtQK2.js → SelectListSectionTitle-DKYayu9U.js} +1 -1
- package/docs/assets/{SelectListSectionTitle.stories-DTi_MtTn.js → SelectListSectionTitle.stories-DM4MR7e2.js} +1 -1
- package/docs/assets/{SelectionControl-aaEuqhMt.js → SelectionControl-C6JexBmQ.js} +1 -1
- package/docs/assets/{SelectionTile-Bl618mwa.js → SelectionTile-BuWPgKvw.js} +2 -2
- package/docs/assets/{SelectionTile.stories-C2OiBoE6.js → SelectionTile.stories-bDvLBQEK.js} +1 -1
- package/docs/assets/{Skeleton-yR2iGt-A.js → Skeleton-CMYm0ueF.js} +1 -1
- package/docs/assets/{Skeleton.stories-D8E42zl1.js → Skeleton.stories-CepOvJUE.js} +1 -1
- package/docs/assets/{SurveyQuestionOpenEnded-DyGKPMyP.js → SurveyQuestionOpenEnded-CT6hRs3h.js} +1 -1
- package/docs/assets/{SurveyQuestionOpenEnded.stories-8WgkwYaH.js → SurveyQuestionOpenEnded.stories-Ck3fI5pW.js} +1 -1
- package/docs/assets/{SurveyQuestionScale-Cx65nLcq.js → SurveyQuestionScale-BpNGyACU.js} +1 -1
- package/docs/assets/{SurveyQuestionScale.stories-BWzL4fMZ.js → SurveyQuestionScale.stories-yMuZDFmZ.js} +1 -1
- package/docs/assets/{SurveyToggle-CISyD5gz.js → SurveyToggle-3gXFb5oH.js} +1 -1
- package/docs/assets/{SurveyToggle.stories-TJijEheH.js → SurveyToggle.stories-DErlBwHj.js} +1 -1
- package/docs/assets/{Switch-DkIgraJz.js → Switch-DdvT2o45.js} +1 -1
- package/docs/assets/{Switch.stories-C8PyEPpm.js → Switch.stories-BzNKJgpI.js} +1 -1
- package/docs/assets/{TabItem-Cc0CSUyr.js → TabItem-IuI5xjz1.js} +1 -1
- package/docs/assets/{TabItem.stories-Bh1XNs3q.js → TabItem.stories-g56H3l-h.js} +1 -1
- package/docs/assets/{TextGroup-DrSbeVN2.js → TextGroup-F6Fc0qPD.js} +1 -1
- package/docs/assets/{TextGroup.stories-BnbOUO2B.js → TextGroup.stories-BZSgsAp8.js} +1 -1
- package/docs/assets/{ThreeColumnLayout-NhAT4cZY.js → ThreeColumnLayout-DLip97ZI.js} +1 -1
- package/docs/assets/{ThreeColumnLayout.stories-EL55MOL9.js → ThreeColumnLayout.stories-pCRL0b7M.js} +1 -1
- package/docs/assets/{Tile-DXVTBx8j.js → Tile-Nqx7KGXe.js} +1 -1
- package/docs/assets/{Tile.sb.shared-DAh00AIu.js → Tile.sb.shared-BcarO9-C.js} +1 -1
- package/docs/assets/{Tile.stories-xIzW0_NG.js → Tile.stories-DpCy0xpQ.js} +1 -1
- package/docs/assets/{Toast.stories-COXItFcC.js → Toast.stories-BcPbImEj.js} +1 -1
- package/docs/assets/{ToggleButton-BCtYIja9.js → ToggleButton-B19B9CsO.js} +1 -1
- package/docs/assets/{ToggleButton.stories-CT0hACpK.js → ToggleButton.stories-MBmynAQa.js} +1 -1
- package/docs/assets/{Tooltip-DrwiSTCm.js → Tooltip-CPu68UXg.js} +1 -1
- package/docs/assets/{Tooltip.stories-CEXpck3_.js → Tooltip.stories-CpUsha-Z.js} +1 -1
- package/docs/assets/{TypographyTokensLms.stories-fssptMKG.js → TypographyTokensLms.stories-CGkGkK-q.js} +1 -1
- package/docs/assets/{TypographyVariables.stories-BhXf4d0y.js → TypographyVariables.stories-BfiRWJuY.js} +1 -1
- package/docs/assets/{Well--SGDk2ZR.js → Well-D7yLLQH0.js} +1 -1
- package/docs/assets/{Well.stories-CASSIsWd.js → Well.stories-e-ci7Apm.js} +1 -1
- package/docs/assets/{entry-preview-DMbhNDVP.js → entry-preview-BJQG7gOd.js} +1 -1
- package/docs/assets/{entry-preview-docs-DJ-4bqb-.js → entry-preview-docs-ivqbfzAL.js} +1 -1
- package/docs/assets/{iframe-D34akK7Z.js → iframe-DDfug5VJ.js} +4 -3
- package/docs/assets/{index-DyXJjdHU.js → index-BYlPqi6W.js} +1 -1
- package/docs/assets/{index-DZvDKoWL.js → index-C-HbmKTM.js} +1 -1
- package/docs/assets/{preview-MRHqGPUO.js → preview-BHcN5tRW.js} +2 -2
- package/docs/assets/preview-NUOMmSqX.js +64 -0
- package/docs/assets/{string-CJTX2pVG.js → string-v47y-kFA.js} +1 -1
- package/docs/assets/{vue-popper-BXSsmyj7.js → vue-popper-D-VHfyeL.js} +1 -1
- package/docs/assets/{vue.esm-bundler-DiF7B9b7.js → vue.esm-bundler-CzUSCRPq.js} +1 -1
- package/docs/iframe.html +1 -1
- package/docs/index.json +1 -1
- package/docs/project.json +1 -1
- package/lib/js/components/DatePickers/DatePicker/DatePicker.composables.ts +122 -0
- package/lib/js/components/DatePickers/DatePicker/DatePicker.consts.ts +9 -0
- package/lib/js/components/DatePickers/DatePicker/DatePicker.vue +75 -114
- package/lib/js/components/DatePickers/DatePickerBox/DatePickerBox.vue +128 -41
- package/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.stories.ts +152 -0
- package/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue +229 -0
- package/lib/js/components/DatePickers/DateRangePicker/index.ts +3 -0
- package/lib/js/icons/fontawesome.ts +2 -0
- package/lib/js/index.ts +1 -0
- package/package.json +1 -1
- package/tools/importers/helpers/dates.ts +21 -0
- package/tsconfig.json +1 -0
- package/docs/assets/DatePicker-5MRZAjkX.js +0 -2
- package/docs/assets/preview-DYKWAT5n.js +0 -64
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import DateRangePicker from './DateRangePicker.vue';
|
|
2
|
+
import { Args, ArgTypes, Meta, StoryObj } from '@storybook/vue3';
|
|
3
|
+
import { ICONS } from '../../Icons/Icon';
|
|
4
|
+
import {
|
|
5
|
+
DATE_PICKER_CALENDAR_POSITIONS,
|
|
6
|
+
DATE_PICKER_COLORS,
|
|
7
|
+
DATE_PICKER_STATES,
|
|
8
|
+
} from '../DatePicker';
|
|
9
|
+
import { ComponentProps } from 'vue-component-type-helpers';
|
|
10
|
+
import { useArgs } from '@storybook/preview-api';
|
|
11
|
+
|
|
12
|
+
type DateRangePickerProps = ComponentProps<typeof DateRangePicker>;
|
|
13
|
+
|
|
14
|
+
const meta: Meta<DateRangePickerProps> = {
|
|
15
|
+
title: 'Components/DatePickers/DateRangePicker',
|
|
16
|
+
component: DateRangePicker,
|
|
17
|
+
render: (args) => {
|
|
18
|
+
const [_, updateArgs] = useArgs();
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
components: { DateRangePicker },
|
|
22
|
+
setup() {
|
|
23
|
+
return args;
|
|
24
|
+
},
|
|
25
|
+
data() {
|
|
26
|
+
return {
|
|
27
|
+
ICONS: Object.freeze(ICONS),
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
methods: {
|
|
31
|
+
updateDate({ startDate, endDate }: { startDate: Date; endDate: Date }) {
|
|
32
|
+
updateArgs({
|
|
33
|
+
startDate: startDate
|
|
34
|
+
? `${startDate.getFullYear()}-${
|
|
35
|
+
startDate.getMonth() + 1
|
|
36
|
+
}-${startDate.getDate()}`
|
|
37
|
+
: null,
|
|
38
|
+
endDate: endDate
|
|
39
|
+
? `${endDate.getFullYear()}-${
|
|
40
|
+
endDate.getMonth() + 1
|
|
41
|
+
}-${endDate.getDate()}`
|
|
42
|
+
: null,
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
computed: {
|
|
47
|
+
formattedStartDate() {
|
|
48
|
+
if (!this.startDate) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return new Date(this.startDate);
|
|
52
|
+
},
|
|
53
|
+
formattedEndDate() {
|
|
54
|
+
if (!this.endDate) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return new Date(this.endDate);
|
|
58
|
+
},
|
|
59
|
+
formattedMinDate() {
|
|
60
|
+
if (!this.minDate) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
return new Date(this.minDate);
|
|
64
|
+
},
|
|
65
|
+
formattedMaxDate() {
|
|
66
|
+
if (!this.maxDate) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return new Date(this.maxDate);
|
|
70
|
+
},
|
|
71
|
+
formattedDisableDates() {
|
|
72
|
+
if (!this.disableDates || !this.disableDates.length) {
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
return this.disableDates.map((date: string) => new Date(date));
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
template: `
|
|
79
|
+
<div style="display: flex">
|
|
80
|
+
<date-range-picker
|
|
81
|
+
:is-interactive="isInteractive"
|
|
82
|
+
:placeholder="placeholder"
|
|
83
|
+
:start-date="formattedStartDate"
|
|
84
|
+
:end-date="formattedEndDate"
|
|
85
|
+
:start-icon="startIcon ? ICONS[startIcon] : null"
|
|
86
|
+
:end-icon="endIcon ? ICONS[endIcon] : null"
|
|
87
|
+
:are-icons-hidden-on-mobile="areIconsHiddenOnMobile"
|
|
88
|
+
:calendar-position="calendarPosition"
|
|
89
|
+
:error-message="errorMessage"
|
|
90
|
+
:state="state"
|
|
91
|
+
:color="color"
|
|
92
|
+
:disable-dates="formattedDisableDates"
|
|
93
|
+
:min-date="formattedMinDate"
|
|
94
|
+
:max-date="formattedMaxDate"
|
|
95
|
+
@update:date="updateDate"
|
|
96
|
+
/>
|
|
97
|
+
</div>`,
|
|
98
|
+
};
|
|
99
|
+
},
|
|
100
|
+
argTypes: {
|
|
101
|
+
startDate: { control: 'text' },
|
|
102
|
+
endDate: { control: 'text' },
|
|
103
|
+
startIcon: { control: 'select', options: [null, ...Object.keys(ICONS)] },
|
|
104
|
+
endIcon: { control: 'select', options: [null, ...Object.keys(ICONS)] },
|
|
105
|
+
calendarPosition: {
|
|
106
|
+
control: 'select',
|
|
107
|
+
options: Object.values(DATE_PICKER_CALENDAR_POSITIONS),
|
|
108
|
+
},
|
|
109
|
+
state: {
|
|
110
|
+
control: 'select',
|
|
111
|
+
options: Object.values(DATE_PICKER_STATES),
|
|
112
|
+
},
|
|
113
|
+
color: {
|
|
114
|
+
control: 'select',
|
|
115
|
+
options: Object.values(DATE_PICKER_COLORS),
|
|
116
|
+
},
|
|
117
|
+
disableDates: {
|
|
118
|
+
control: 'object',
|
|
119
|
+
},
|
|
120
|
+
} as ArgTypes,
|
|
121
|
+
parameters: {
|
|
122
|
+
design: {
|
|
123
|
+
type: 'figma',
|
|
124
|
+
url: 'https://www.figma.com/design/izQdYyiBR1GQgFkaOIfIJI/LMS---DS-Components?node-id=8502-1209&t=mHbWSeRfkspainMZ-4',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export default meta;
|
|
130
|
+
|
|
131
|
+
type Story = StoryObj<DateRangePickerProps>;
|
|
132
|
+
|
|
133
|
+
const now = Date.now();
|
|
134
|
+
const oneDayMili = 86400000;
|
|
135
|
+
export const Interactive: Story = {
|
|
136
|
+
args: {
|
|
137
|
+
isInteractive: true,
|
|
138
|
+
placeholder: 'Ustaw',
|
|
139
|
+
startDate: '',
|
|
140
|
+
endDate: '',
|
|
141
|
+
startIcon: 'FA_CALENDAR_DAY',
|
|
142
|
+
endIcon: 'FA_CALENDAR_DAY',
|
|
143
|
+
areIconsHiddenOnMobile: false,
|
|
144
|
+
calendarPosition: DATE_PICKER_CALENDAR_POSITIONS.BOTTOM,
|
|
145
|
+
errorMessage: '',
|
|
146
|
+
state: DATE_PICKER_STATES.DEFAULT,
|
|
147
|
+
color: DATE_PICKER_COLORS.NEUTRAL,
|
|
148
|
+
disableDates: [new Date(now + oneDayMili * 2).toISOString().slice(0, 10)],
|
|
149
|
+
minDate: new Date(now).toISOString().slice(0, 10),
|
|
150
|
+
maxDate: new Date(now + oneDayMili * 30).toISOString().slice(0, 10),
|
|
151
|
+
} as Args,
|
|
152
|
+
};
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="dateRangePickerRef" class="ds-dateRangePicker">
|
|
3
|
+
<date-picker-box
|
|
4
|
+
:is-interactive="isInteractive"
|
|
5
|
+
:placeholder="placeholder"
|
|
6
|
+
:start-date="startDate"
|
|
7
|
+
:end-date="endDateIfDifferentThanStartDate"
|
|
8
|
+
:start-icon="startIcon"
|
|
9
|
+
:end-icon="endIcon"
|
|
10
|
+
:are-icons-hidden-on-mobile="areIconsHiddenOnMobile"
|
|
11
|
+
:state="state"
|
|
12
|
+
:color="color"
|
|
13
|
+
:start-date-eyebrow-text="eyebrowText"
|
|
14
|
+
:end-date-eyebrow-text="endDateEyebrowText"
|
|
15
|
+
:is-open="isOpen"
|
|
16
|
+
@click="toggle"
|
|
17
|
+
/>
|
|
18
|
+
|
|
19
|
+
<span v-if="errorMessage" class="ds-dateRangePicker__errorMessage">
|
|
20
|
+
{{ errorMessage }}
|
|
21
|
+
</span>
|
|
22
|
+
<input ref="flatpickrInputRef" class="ds-dateRangePicker__hiddenInput" />
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<style lang="scss">
|
|
27
|
+
@import 'flatpickr/dist/flatpickr';
|
|
28
|
+
</style>
|
|
29
|
+
|
|
30
|
+
<style scoped lang="scss">
|
|
31
|
+
@import '../../../../styles/settings/typography/tokens';
|
|
32
|
+
@import '../../../../styles/settings/colors/tokens';
|
|
33
|
+
@import '../../../../styles/settings/spacings';
|
|
34
|
+
|
|
35
|
+
.ds-dateRangePicker {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
row-gap: $space-4xs;
|
|
39
|
+
|
|
40
|
+
&__hiddenInput {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__errorMessage {
|
|
45
|
+
@include info-s-default-regular;
|
|
46
|
+
|
|
47
|
+
color: $color-danger-text;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
</style>
|
|
51
|
+
|
|
52
|
+
<script lang="ts">
|
|
53
|
+
import DatePickerBox from '../DatePickerBox/DatePickerBox.vue';
|
|
54
|
+
import { IconItem, ICONS } from '../../Icons/Icon';
|
|
55
|
+
import { defineComponent, PropType, Ref, ref, toRaw, watch } from 'vue';
|
|
56
|
+
import {
|
|
57
|
+
DATE_PICKER_CALENDAR_POSITIONS,
|
|
58
|
+
DATE_PICKER_COLORS,
|
|
59
|
+
DATE_PICKER_STATES,
|
|
60
|
+
DATE_PICKER_TRIGGER_TYPES,
|
|
61
|
+
DatePickerCalendarPositions,
|
|
62
|
+
DatePickerColors,
|
|
63
|
+
DatePickerStates,
|
|
64
|
+
} from '../DatePicker';
|
|
65
|
+
import { DatePickerComposablesProps, initFlatpickr } from '../DatePicker/DatePicker.composables';
|
|
66
|
+
import { capitalizeFirstLetter } from '../../../../../tools/importers/helpers/modifiers';
|
|
67
|
+
import { localWeekdayName } from '../../../../../tools/importers/helpers/dates';
|
|
68
|
+
|
|
69
|
+
export default defineComponent({
|
|
70
|
+
name: 'DateRangePicker',
|
|
71
|
+
components: {
|
|
72
|
+
DatePickerBox,
|
|
73
|
+
},
|
|
74
|
+
props: {
|
|
75
|
+
isInteractive: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false,
|
|
78
|
+
},
|
|
79
|
+
placeholder: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: 'Wybierz datę',
|
|
82
|
+
},
|
|
83
|
+
startDate: {
|
|
84
|
+
type: Date,
|
|
85
|
+
default: null,
|
|
86
|
+
},
|
|
87
|
+
endDate: {
|
|
88
|
+
type: Date,
|
|
89
|
+
default: null,
|
|
90
|
+
},
|
|
91
|
+
startIcon: {
|
|
92
|
+
type: [Object, null] as PropType<IconItem | null>,
|
|
93
|
+
default: ICONS.FA_CALENDAR_DAY,
|
|
94
|
+
validator(icon) {
|
|
95
|
+
return icon === null || Object?.values(ICONS).includes(toRaw(icon));
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
endIcon: {
|
|
99
|
+
type: [Object, null] as PropType<IconItem | null>,
|
|
100
|
+
default: ICONS.FA_CALENDAR_DAY,
|
|
101
|
+
validator(icon) {
|
|
102
|
+
return icon === null || Object?.values(ICONS).includes(toRaw(icon));
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
areIconsHiddenOnMobile: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: false,
|
|
108
|
+
},
|
|
109
|
+
calendarPosition: {
|
|
110
|
+
type: String as PropType<DatePickerCalendarPositions>,
|
|
111
|
+
default: DATE_PICKER_CALENDAR_POSITIONS.BOTTOM_LEFT,
|
|
112
|
+
},
|
|
113
|
+
errorMessage: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: '',
|
|
116
|
+
},
|
|
117
|
+
state: {
|
|
118
|
+
type: (String as PropType<DatePickerStates>) || null,
|
|
119
|
+
default: DATE_PICKER_STATES.DEFAULT,
|
|
120
|
+
},
|
|
121
|
+
color: {
|
|
122
|
+
type: String as PropType<DatePickerColors>,
|
|
123
|
+
default: DATE_PICKER_COLORS.NEUTRAL,
|
|
124
|
+
},
|
|
125
|
+
disableDates: {
|
|
126
|
+
type: Array as PropType<Array<Date>>,
|
|
127
|
+
default: () => [],
|
|
128
|
+
},
|
|
129
|
+
minDate: {
|
|
130
|
+
type: Date,
|
|
131
|
+
default: null,
|
|
132
|
+
},
|
|
133
|
+
maxDate: {
|
|
134
|
+
type: Date,
|
|
135
|
+
default: null,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
emits: { 'update:date': (value: { startDate: Date; endDate: Date }) => true },
|
|
139
|
+
setup(
|
|
140
|
+
props: DatePickerComposablesProps & {
|
|
141
|
+
startDate: Date;
|
|
142
|
+
endDate: Date;
|
|
143
|
+
isInteractive: boolean;
|
|
144
|
+
state: DatePickerStates;
|
|
145
|
+
},
|
|
146
|
+
{ emit },
|
|
147
|
+
) {
|
|
148
|
+
const dateRangePickerRef = ref() as Ref<HTMLDivElement>;
|
|
149
|
+
const flatpickrInputRef = ref() as Ref<HTMLInputElement>;
|
|
150
|
+
|
|
151
|
+
const onChange = (event: Array<Date>) => {
|
|
152
|
+
if (event.length !== 2) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
emit('update:date', { startDate: event[0], endDate: event[1] });
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const {
|
|
159
|
+
isOpen,
|
|
160
|
+
toggle: toggleDatePicker,
|
|
161
|
+
createDatePicker,
|
|
162
|
+
} = initFlatpickr({
|
|
163
|
+
props,
|
|
164
|
+
onChange,
|
|
165
|
+
defaultDates: [props.startDate, props.endDate],
|
|
166
|
+
mode: 'range',
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
watch(
|
|
170
|
+
[() => props.isInteractive, () => props.state],
|
|
171
|
+
async () => {
|
|
172
|
+
if (props.isInteractive && props.state === DATE_PICKER_STATES.DEFAULT) {
|
|
173
|
+
await createDatePicker(flatpickrInputRef.value, dateRangePickerRef.value);
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{ flush: 'post' },
|
|
177
|
+
);
|
|
178
|
+
|
|
179
|
+
return {
|
|
180
|
+
dateRangePickerRef,
|
|
181
|
+
flatpickrInputRef,
|
|
182
|
+
isOpen,
|
|
183
|
+
toggleDatePicker,
|
|
184
|
+
createDatePicker,
|
|
185
|
+
DATE_PICKER_CALENDAR_POSITIONS: Object.freeze(DATE_PICKER_CALENDAR_POSITIONS),
|
|
186
|
+
DATE_PICKER_COLORS: Object.freeze(DATE_PICKER_COLORS),
|
|
187
|
+
DATE_PICKER_STATES: Object.freeze(DATE_PICKER_STATES),
|
|
188
|
+
DATE_PICKER_TRIGGER_TYPES: Object.freeze(DATE_PICKER_TRIGGER_TYPES),
|
|
189
|
+
};
|
|
190
|
+
},
|
|
191
|
+
computed: {
|
|
192
|
+
endDateEyebrowText() {
|
|
193
|
+
if (!this.endDate || this.state === DATE_PICKER_STATES.LOADING) {
|
|
194
|
+
return '';
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return capitalizeFirstLetter(localWeekdayName(this.endDate));
|
|
198
|
+
},
|
|
199
|
+
|
|
200
|
+
endDateIfDifferentThanStartDate() {
|
|
201
|
+
return this.startDate &&
|
|
202
|
+
this.endDate &&
|
|
203
|
+
this.startDate.getTime() !== this.endDate.getTime()
|
|
204
|
+
? this.endDate
|
|
205
|
+
: null;
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
eyebrowText() {
|
|
209
|
+
if (!this.startDate || this.state === DATE_PICKER_STATES.LOADING) {
|
|
210
|
+
return '';
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
return capitalizeFirstLetter(localWeekdayName(this.startDate));
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
async mounted() {
|
|
217
|
+
if (this.isInteractive && this.state === DATE_PICKER_STATES.DEFAULT) {
|
|
218
|
+
await this.createDatePicker(this.flatpickrInputRef, this.dateRangePickerRef);
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
methods: {
|
|
222
|
+
toggle() {
|
|
223
|
+
if (this.isInteractive && this.state === DATE_PICKER_STATES.DEFAULT) {
|
|
224
|
+
this.toggleDatePicker();
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
});
|
|
229
|
+
</script>
|
|
@@ -177,6 +177,7 @@ import { faInfo as fasInfo } from '@fortawesome/pro-solid-svg-icons/faInfo';
|
|
|
177
177
|
import { faLightbulb as fasLightbulb } from '@fortawesome/pro-solid-svg-icons/faLightbulb';
|
|
178
178
|
import { faMemoCircleInfo as fasMemoCircleInfo } from '@fortawesome/pro-solid-svg-icons/faMemoCircleInfo';
|
|
179
179
|
import { faMessageQuestion as fasMessageQuestion } from '@fortawesome/pro-solid-svg-icons/faMessageQuestion';
|
|
180
|
+
import { faMessageXmark } from '@fortawesome/pro-regular-svg-icons/faMessageXmark';
|
|
180
181
|
import { faSitemap as fasSitemap } from '@fortawesome/pro-solid-svg-icons/faSitemap';
|
|
181
182
|
import { faSquareCheck as fasSquareCheck } from '@fortawesome/pro-solid-svg-icons/faSquareCheck';
|
|
182
183
|
import { faSquareList as fasSquareList } from '@fortawesome/pro-solid-svg-icons/faSquareList';
|
|
@@ -337,6 +338,7 @@ export const FONTAWESOME_ICONS = {
|
|
|
337
338
|
FA_MEMO_CIRCLE_INFO: faMemoCircleInfo,
|
|
338
339
|
FA_MEMO_CIRCLE_INFO_SOLID: fasMemoCircleInfo,
|
|
339
340
|
FA_MESSAGE_QUESTION_SOLID: fasMessageQuestion,
|
|
341
|
+
FA_MESSAGE_XMARK: faMessageXmark,
|
|
340
342
|
FA_MINUS: faMinus,
|
|
341
343
|
FA_MONEY_BILL1: faMoneyBill1,
|
|
342
344
|
FA_MUSIC: faMusic,
|
package/lib/js/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { default as CardExpandable } from './components/Cards/CardExpandable/';
|
|
|
16
16
|
export { default as DsCardExpandable } from './components/Cards/CardExpandable/';
|
|
17
17
|
export { default as DatePicker } from './components/DatePickers/DatePicker';
|
|
18
18
|
export { default as DsDatePicker } from './components/DatePickers/DatePicker';
|
|
19
|
+
export { default as DsDateRangePicker } from './components/DatePickers/DateRangePicker';
|
|
19
20
|
export * from './components/DatePickers/DatePicker';
|
|
20
21
|
export { default as Divider } from './components/Divider';
|
|
21
22
|
export { default as DsDivider } from './components/Divider';
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function localWeekdayName(date: Date): string {
|
|
2
|
+
return date.toLocaleDateString(undefined, {
|
|
3
|
+
dateStyle: undefined,
|
|
4
|
+
timeStyle: undefined,
|
|
5
|
+
weekday: 'long',
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function localFullDateWithShortMonthName(date: Date): string {
|
|
10
|
+
return date.toLocaleDateString(undefined, {
|
|
11
|
+
dateStyle: 'medium',
|
|
12
|
+
timeStyle: undefined,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function localMonthDayWithShortMonthDay(date: Date): string {
|
|
17
|
+
return date.toLocaleDateString(undefined, {
|
|
18
|
+
month: 'short',
|
|
19
|
+
day: '2-digit',
|
|
20
|
+
});
|
|
21
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./pl-Cy1N1vsP.js","./_commonjsHelpers-Chg3vePA.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as E}from"./iframe-D34akK7Z.js";import{d as y,t as I,r as m,o as a,c as i,k as u,h as l,a as c,b as P,n as p,g as h,F as R,f as C}from"./vue.esm-bundler-DiF7B9b7.js";import{b as L}from"./Tile-DXVTBx8j.js";import{a as N,I as r,b as B}from"./Icon-6eu_szpS.js";import{_ as O}from"./_plugin-vue_export-helper-DlAUqK2U.js";const T={NEUTRAL:"neutral",WARNING:"warning"},s={DEFAULT:"default",DISABLED:"disabled",LOADING:"loading"},n={TOP:"top",TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right"},D={BOX:"box",TILE:"tile"},b=y({name:"DatePickerBox",components:{DsIcon:N},props:{isInteractive:{type:Boolean,default:!0},placeholder:{type:String,default:"Ustaw"},date:{type:Date,default:null},icon:{type:Object,default:null,validate:e=>e===null||Object.values(r).includes(I(e))},isIconHiddenOnMobile:{type:Boolean,default:!1},state:{type:String||null,default:s.DEFAULT},color:{type:String,default:T.NEUTRAL},eyebrowText:{type:String,default:""},isOpen:{type:Boolean,default:!1}},data(){return{ICONS:Object.freeze(r),ICON_SIZES:Object.freeze(B),DATE_PICKER_STATES:Object.freeze(s),DATE_PICKER_COLORS:Object.freeze(T)}},computed:{text(){return this.date?this.date.toLocaleDateString(void 0,{month:"short",day:"2-digit"}):this.placeholder}}}),V={key:0,class:"ds-datePickerBox__eyebrow"},w={class:"ds-datePickerBox__dateWrapper"},F={class:"ds-datePickerBox__date"},K={key:1,class:"ds-datePickerBox__loader"};function M(e,t,o,g,A,k){const d=m("ds-icon");return a(),i("div",{class:p(["ds-datePickerBox",{"-ds-disabled":e.state===e.DATE_PICKER_STATES.DISABLED,"-ds-loading":e.state===e.DATE_PICKER_STATES.LOADING,"-ds-interactive":e.isInteractive,"-ds-warning":e.color===e.DATE_PICKER_COLORS.WARNING,"-ds-neutral":e.color===e.DATE_PICKER_COLORS.NEUTRAL,"-ds-isOpen":e.isOpen}])},[e.eyebrowText?(a(),i("span",V,u(e.eyebrowText),1)):l("",!0),c("div",w,[e.icon?(a(),P(d,{key:0,class:p(["ds-datePickerBox__icon",{"-ds-hiddenOnMobile":e.isIconHiddenOnMobile}]),icon:e.icon,size:e.ICON_SIZES.XX_SMALL},null,8,["class","icon","size"])):l("",!0),c("span",F,u(e.text),1)]),e.state===e.DATE_PICKER_STATES.LOADING?(a(),i("div",K,[h(d,{icon:e.ICONS.FAD_SPINNER_THIRD,size:e.ICON_SIZES.X_SMALL,spinning:""},null,8,["icon","size"])])):l("",!0)],2)}const G=O(b,[["render",M],["__scopeId","data-v-56030591"]]);b.__docgenInfo={displayName:"DatePickerBox",exportName:"default",description:"",tags:{},props:[{name:"isInteractive",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"placeholder",type:{name:"string"},defaultValue:{func:!1,value:"'Ustaw'"}},{name:"date",type:{name:"date"},defaultValue:{func:!1,value:"null"}},{name:"icon",type:{name:"object"},defaultValue:{func:!1,value:"null"}},{name:"isIconHiddenOnMobile",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"state",type:{name:"(String as PropType<DatePickerStates>) || null"},defaultValue:{func:!1,value:"DATE_PICKER_STATES.DEFAULT"}},{name:"color",type:{name:"DatePickerColors"},defaultValue:{func:!1,value:"DATE_PICKER_COLORS.NEUTRAL"}},{name:"eyebrowText",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"isOpen",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/DatePickers/DatePickerBox/DatePickerBox.vue"]};const U=e=>e.charAt(0).toUpperCase()+e.slice(1);let f=null;const _={[n.BOTTOM_LEFT]:"below left",[n.BOTTOM_RIGHT]:"below right",[n.BOTTOM]:"below",[n.TOP_LEFT]:"above left",[n.TOP_RIGHT]:"above right",[n.TOP]:"above"},S=y({name:"DatePicker",components:{DatePickerBox:G,DsTile:L},props:{triggerType:{type:String,default:D.TILE},isInteractive:{type:Boolean,default:!0},placeholder:{type:String,default:"Wybierz datę"},date:{type:Date,default:null},label:{type:String,default:""},isLabelUppercase:{type:Boolean,default:!1},icon:{type:[Object,null],default:r.FA_CALENDAR_DAY,validate:e=>e===null||Object.values(r).includes(I(e))},isIconHiddenOnMobile:{type:Boolean,default:!1},calendarPosition:{type:String,default:n.BOTTOM_LEFT},errorMessage:{type:String,default:""},state:{type:String||null,default:s.DEFAULT},color:{type:String,default:T.NEUTRAL},disableDates:{type:Array,default:()=>[]},minDate:{type:Date,default:null},maxDate:{type:Date,default:null}},emits:{"update:date":()=>!0},data(){return{datePicker:null,isOpen:!1,DATE_PICKER_STATES:Object.freeze(s),DATE_PICKER_TRIGGER_TYPES:Object.freeze(D)}},computed:{isDatePickerEnabled(){return this.isInteractive&&this.state===s.DEFAULT},eyebrowText(){return!this.date||this.state===s.LOADING?"":U(this.date.toLocaleDateString(void 0,{dateStyle:void 0,timeStyle:void 0,weekday:"long"}))},text(){return this.state===s.LOADING||!this.date?this.placeholder:this.date.toLocaleDateString(void 0,{dateStyle:"medium",timeStyle:void 0})},tileIcon(){return this.icon?this.isOpen?r.FA_CHEVRON_UP:this.icon:null},flatpickrConfigString(){return[this.maxDate,this.minDate,this.calendarPosition,this.date,...this.disableDates].concat("|")}},watch:{flatpickrConfigString:{handler(){var e;(e=this.datePicker)==null||e.set({position:_[this.calendarPosition],defaultDate:this.date,disable:this.disableDates.filter(t=>t instanceof Date),minDate:this.minDate,maxDate:this.maxDate})},flush:"post"}},async mounted(){if(this.isDatePickerEnabled&&!this.datePicker){if(!f){const{default:t}=await E(async()=>{const{default:o}=await import("./index-CBmJdl9t.js");return{default:o}},[],import.meta.url);f=t}const{Polish:e}=await E(async()=>{const{Polish:t}=await import("./pl-Cy1N1vsP.js").then(o=>o.p);return{Polish:t}},__vite__mapDeps([0,1]),import.meta.url);this.datePicker=f(this.$refs.flatpickrInput,{locale:e,positionElement:this.$el,ignoredFocusElements:[this.$el],appendTo:this.$el,position:_[this.calendarPosition],defaultDate:this.date,disable:this.disableDates.filter(t=>t instanceof Date),minDate:this.minDate,maxDate:this.maxDate,onClose:[()=>{this.isOpen=!1}],onOpen:[()=>{this.isOpen=!0}],onChange:t=>{this.$emit("update:date",t[0])}})}},unmounted(){var e;(e=this.datePicker)==null||e.destroy(),this.datePicker=null},methods:{toggle(){this.isDatePickerEnabled&&this.datePicker&&this.datePicker.toggle()}}}),$={class:"ds-datePicker__labelWrapper"},j={key:2,class:"ds-datePicker__errorMessage"},z={ref:"flatpickrInput",class:"ds-datePicker__hiddenInput"};function H(e,t,o,g,A,k){const d=m("ds-tile"),v=m("date-picker-box");return a(),i("div",{class:p(["ds-datePicker",{"-ds-box":e.triggerType===e.DATE_PICKER_TRIGGER_TYPES.BOX}])},[e.triggerType===e.DATE_PICKER_TRIGGER_TYPES.TILE?(a(),i(R,{key:0},[c("div",$,[e.label?(a(),i("span",{key:0,class:p(["ds-datePicker__label",{"-ds-isUppercase":e.isLabelUppercase,"-ds-disabled":e.state===e.DATE_PICKER_STATES.DISABLED}])},u(e.label),3)):l("",!0),e.$slots.default?C(e.$slots,"default",{key:1},void 0,!0):l("",!0)]),h(d,{class:"ds-datePicker__tile",text:e.text,interactive:e.isInteractive,color:e.color,state:e.state,"icon-right":e.tileIcon,"is-icon-right-hidden-on-mobile":e.isIconHiddenOnMobile,"eyebrow-text":e.eyebrowText,onClick:e.toggle},null,8,["text","interactive","color","state","icon-right","is-icon-right-hidden-on-mobile","eyebrow-text","onClick"])],64)):(a(),P(v,{key:1,"is-interactive":e.isInteractive,placeholder:e.placeholder,date:e.date,icon:e.icon,"is-icon-hidden-on-mobile":e.isIconHiddenOnMobile,state:e.state,color:e.color,"eyebrow-text":e.eyebrowText,"is-open":e.isOpen,onClick:e.toggle},null,8,["is-interactive","placeholder","date","icon","is-icon-hidden-on-mobile","state","color","eyebrow-text","is-open","onClick"])),e.errorMessage?(a(),i("span",j,u(e.errorMessage),1)):l("",!0),c("input",z,null,512)],2)}const J=O(S,[["render",H],["__scopeId","data-v-599f6513"]]);S.__docgenInfo={displayName:"DatePicker",exportName:"default",description:"",tags:{},props:[{name:"triggerType",type:{name:"DatePickerTriggerTypes"},defaultValue:{func:!1,value:"DATE_PICKER_TRIGGER_TYPES.TILE"}},{name:"isInteractive",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"placeholder",type:{name:"string"},defaultValue:{func:!1,value:"'Wybierz datę'"}},{name:"date",type:{name:"date"},defaultValue:{func:!1,value:"null"}},{name:"label",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"isLabelUppercase",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"icon",type:{name:"object|null"},defaultValue:{func:!1,value:"ICONS.FA_CALENDAR_DAY"}},{name:"isIconHiddenOnMobile",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"calendarPosition",type:{name:"DatePickerCalendarPositions"},defaultValue:{func:!1,value:"DATE_PICKER_CALENDAR_POSITIONS.BOTTOM_LEFT"}},{name:"errorMessage",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"state",type:{name:"(String as PropType<DatePickerStates>) || null"},defaultValue:{func:!1,value:"DATE_PICKER_STATES.DEFAULT"}},{name:"color",type:{name:"DatePickerColors"},defaultValue:{func:!1,value:"DATE_PICKER_COLORS.NEUTRAL"}},{name:"disableDates",type:{name:"array"},defaultValue:{func:!1,value:"[]"}},{name:"minDate",type:{name:"date"},defaultValue:{func:!1,value:"null"}},{name:"maxDate",type:{name:"date"},defaultValue:{func:!1,value:"null"}}],events:[{name:"update:date",type:{names:["undefined"]}}],slots:[{name:"default"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/DatePickers/DatePicker/DatePicker.vue"]};export{J as D,D as a,n as b,s as c,T as d};
|