@bethinkpl/design-system 26.14.5 → 26.14.7

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.
Files changed (176) hide show
  1. package/dist/design-system.umd.cjs +15 -15
  2. package/dist/design-system.umd.cjs.map +1 -1
  3. package/docs/assets/{AccessStatus-DzMA_dRH.js → AccessStatus-CyBzoERh.js} +1 -1
  4. package/docs/assets/{AccessStatus.stories--VEkNiy_.js → AccessStatus.stories-0sPTYvv-.js} +1 -1
  5. package/docs/assets/{Avatar-Ddf_DDf6.js → Avatar-CpVRA8eL.js} +1 -1
  6. package/docs/assets/{Avatar.stories-Bw8TMzwN.js → Avatar.stories-DYYzlAKd.js} +1 -1
  7. package/docs/assets/{Badge-DsHkKLq5.js → Badge-u3iER_tw.js} +1 -1
  8. package/docs/assets/{Badge.stories-1MGIb5Ay.js → Badge.stories-68InXnru.js} +1 -1
  9. package/docs/assets/{BadgeScore-DZ7uKkkn.js → BadgeScore-D9YU0SxW.js} +1 -1
  10. package/docs/assets/{BadgeScore.stories-DyWA-wfY.js → BadgeScore.stories-DXa2SIZi.js} +1 -1
  11. package/docs/assets/{Banner-B73N4KyQ.js → Banner-CzZi1DCQ.js} +1 -1
  12. package/docs/assets/{Banner.stories-DwaPbSL6.js → Banner.stories-B-TmP4Qn.js} +1 -1
  13. package/docs/assets/{BasicRichListItem-DOfqex-T.js → BasicRichListItem-wfUgcNwn.js} +1 -1
  14. package/docs/assets/{BasicRichListItem.stories-CnWdWdmC.js → BasicRichListItem.stories-W9l_aixV.js} +1 -1
  15. package/docs/assets/{BlockadeStatus-BR_7M5Y7.js → BlockadeStatus-PJXAHtcH.js} +1 -1
  16. package/docs/assets/{BlockedeStatus.stories-D2j3DGI7.js → BlockedeStatus.stories-yb8Gx4CW.js} +1 -1
  17. package/docs/assets/{Button-DHfR56t4.js → Button-D3r6zRpz.js} +1 -1
  18. package/docs/assets/{Button.stories-D3Ki6Zf4.js → Button.stories-Dcd8w8jX.js} +1 -1
  19. package/docs/assets/{Card-BzXb8FVb.js → Card-YhM4NzlD.js} +1 -1
  20. package/docs/assets/{Card.stories-DR5-T-9k.js → Card.stories-CyZBsJ2u.js} +1 -1
  21. package/docs/assets/{CardExpandable-OLKQQ6p3.js → CardExpandable-wW2aRczX.js} +1 -1
  22. package/docs/assets/{CardExpandable.stories-CZsP04Bx.js → CardExpandable.stories-emEQ3Bx6.js} +1 -1
  23. package/docs/assets/{Checkbox-Dw7yhq_D.js → Checkbox-BvMvx4PF.js} +1 -1
  24. package/docs/assets/{Checkbox.stories-CPr-TvdU.js → Checkbox.stories-5L9Gq8wk.js} +1 -1
  25. package/docs/assets/Chip-BYE4kNFs.js +1 -0
  26. package/docs/assets/Chip.stories-DOr6xkEZ.js +43 -0
  27. package/docs/assets/{Color-ERTF36HU-BxTduNqG.js → Color-ERTF36HU-f5EO1Xze.js} +1 -1
  28. package/docs/assets/{Colors.stories-DsVCBpMK.js → Colors.stories-C8hIYHsM.js} +1 -1
  29. package/docs/assets/{ColorsThemes.stories-CvuM5Lfh.js → ColorsThemes.stories-g01vwZZd.js} +1 -1
  30. package/docs/assets/{ColorsTokensLms.stories-BLf0d4Ej.js → ColorsTokensLms.stories-cGNfW5nL.js} +1 -1
  31. package/docs/assets/{ColorsTokensPrimaryBodywork.stories-DPROdtqj.js → ColorsTokensPrimaryBodywork.stories-YrgPsIZE.js} +1 -1
  32. package/docs/assets/{ColorsTokensPrimaryWnl.stories-BeDXP0UM.js → ColorsTokensPrimaryWnl.stories-pfaw97Pu.js} +1 -1
  33. package/docs/assets/{CounterToggle-_K-to0yi.js → CounterToggle-B4zpnblt.js} +1 -1
  34. package/docs/assets/{CounterToggle.stories-_CTotmHu.js → CounterToggle.stories-Cgi6C5eJ.js} +1 -1
  35. package/docs/assets/{DateBox.stories-CDMlmmhz.js → DateBox.stories-UUfa4Dts.js} +1 -1
  36. package/docs/assets/{DatePicker-D0XaBW1a.js → DatePicker-DY42cXCh.js} +1 -1
  37. package/docs/assets/{DatePicker.stories-BQG31hVQ.js → DatePicker.stories-QEw34B4K.js} +13 -5
  38. package/docs/assets/DateRangePicker-D2oNTXTe.js +1 -0
  39. package/docs/assets/{DateRangePicker.stories-CEnBjdrE.js → DateRangePicker.stories-CGH40zYh.js} +1 -1
  40. package/docs/assets/{Divider-CeZli6az.js → Divider-C8Drds6C.js} +1 -1
  41. package/docs/assets/{Divider.stories-BGrVq6Gh.js → Divider.stories-jAhp6jPo.js} +1 -1
  42. package/docs/assets/{DocsRenderer-CFRXHY34-TNb7LCKP.js → DocsRenderer-CFRXHY34-DOhVgwyq.js} +5 -5
  43. package/docs/assets/{Drawer-SoovlwOt.js → Drawer-DbgJzgqG.js} +1 -1
  44. package/docs/assets/{Drawer.stories-CEU1F2uA.js → Drawer.stories-C6cSORhx.js} +1 -1
  45. package/docs/assets/{DrawerContent-BC_l9IKr.js → DrawerContent-CaU7wIbB.js} +1 -1
  46. package/docs/assets/{DrawerContent.stories-bd7mDbJc.js → DrawerContent.stories-ChrmYVDB.js} +1 -1
  47. package/docs/assets/{DrawerDivider-DuTuIbLz.js → DrawerDivider-1FPi8JiH.js} +1 -1
  48. package/docs/assets/{DrawerDivider.stories-C6fwM_Vr.js → DrawerDivider.stories-BdIRw3cE.js} +1 -1
  49. package/docs/assets/{DrawerHeader-DKnj6uGf.js → DrawerHeader-hSkqwqnX.js} +1 -1
  50. package/docs/assets/{DrawerHeader.stories-BDuVqv88.js → DrawerHeader.stories-DGBCV6vH.js} +1 -1
  51. package/docs/assets/{DrawerListItem-CTXZN6Bi.js → DrawerListItem-DmA8l7uW.js} +1 -1
  52. package/docs/assets/{DrawerListItem.stories-BEKXtNUK.js → DrawerListItem.stories-CNCj3QWp.js} +1 -1
  53. package/docs/assets/{DrawerListItemGroup-BTfrsZ_p.js → DrawerListItemGroup-DHghqnvr.js} +1 -1
  54. package/docs/assets/{DrawerListItemGroup.stories-COPmhcN6.js → DrawerListItemGroup.stories-sE4_jJ1F.js} +1 -1
  55. package/docs/assets/{DrawerSection-CZ_dBYx4.js → DrawerSection-B5yppbeb.js} +1 -1
  56. package/docs/assets/{DrawerSection.stories-sLxT7vrO.js → DrawerSection.stories-uW3koial.js} +1 -1
  57. package/docs/assets/{DrawerTile-DbrnM1Eh.js → DrawerTile-LBwEy57Y.js} +1 -1
  58. package/docs/assets/{DrawerTile.stories-Dw3ao85n.js → DrawerTile.stories-Bhq7RbK4.js} +1 -1
  59. package/docs/assets/{Dropdown-D0Da3_Op.js → Dropdown-T-DajGjx.js} +1 -1
  60. package/docs/assets/{Dropdown.stories-D5GXGzlY.js → Dropdown.stories-BuGtUidH.js} +1 -1
  61. package/docs/assets/{FeatureIcon-BDPyvlSM.js → FeatureIcon-CX-tLUP-.js} +1 -1
  62. package/docs/assets/{FeatureIcon.stories-BQCkvwda.js → FeatureIcon.stories-DTGhAygI.js} +1 -1
  63. package/docs/assets/{GroupRichListItem-DDOzz7uS.js → GroupRichListItem-DCe6ppc2.js} +1 -1
  64. package/docs/assets/{GroupRichListItem.stories-CyN2evgP.js → GroupRichListItem.stories-C-HPJVJV.js} +1 -1
  65. package/docs/assets/{Icon-D0llnARZ.js → Icon-mlOEH8dY.js} +1 -1
  66. package/docs/assets/{Icon.stories-CTnRL9yQ.js → Icon.stories-C_dap68e.js} +1 -1
  67. package/docs/assets/{IconButton-BJcODvDg.js → IconButton-CZPMfbyF.js} +1 -1
  68. package/docs/assets/{IconButton.stories-BB7ViPXj.js → IconButton.stories-BNvZEFYF.js} +1 -1
  69. package/docs/assets/{IconText-CHD1e6XV.js → IconText-BVEyT_xO.js} +1 -1
  70. package/docs/assets/{IconText.stories-C2BRfPpO.js → IconText.stories-Dos4wpXU.js} +1 -1
  71. package/docs/assets/{Image-B9jnhF_n.js → Image-DBf62AYO.js} +1 -1
  72. package/docs/assets/{Image.stories-DzKTJQnd.js → Image.stories-8CR2Xgh1.js} +1 -1
  73. package/docs/assets/{ItemsList-B6NLHoqB.js → ItemsList-wyz4ig57.js} +1 -1
  74. package/docs/assets/{LoadingBar-C1yAImWt.js → LoadingBar-BrB35t4Q.js} +1 -1
  75. package/docs/assets/{LoadingBar.stories-NffcMV2n.js → LoadingBar.stories-DKbRUeve.js} +1 -1
  76. package/docs/assets/Modal-BBZIcGX3.js +1 -0
  77. package/docs/assets/{Modal.stories-H0HEhSSX.js → Modal.stories-BcsTO1Q0.js} +1 -1
  78. package/docs/assets/{ModalDialog-B1Fx-Up2.js → ModalDialog-WFMRAk1N.js} +1 -1
  79. package/docs/assets/{ModalDialog.stories-BjHBYxwN.js → ModalDialog.stories-MuifsKhJ.js} +1 -1
  80. package/docs/assets/{NumberInCircle-CYZFaZ00.js → NumberInCircle-Bl3O1NY9.js} +1 -1
  81. package/docs/assets/{NumberInCircle.stories-DzdSX4we.js → NumberInCircle.stories-CvQo4d_n.js} +1 -1
  82. package/docs/assets/{OutlineDivider-DItdz99b.js → OutlineDivider-DLeaEHJV.js} +1 -1
  83. package/docs/assets/{OutlineDivider.stories-Cdmgts0G.js → OutlineDivider.stories-kRQwvLLq.js} +1 -1
  84. package/docs/assets/{OutlineItem-zkItoOB5.js → OutlineItem-CTj7r8p5.js} +1 -1
  85. package/docs/assets/{OutlineItem.stories-B0QRpUCr.js → OutlineItem.stories-D5ClHBwk.js} +1 -1
  86. package/docs/assets/{OutlineSectionHeader-CtypBCqR.js → OutlineSectionHeader-D0yWigNU.js} +1 -1
  87. package/docs/assets/{OutlineSectionHeader.stories-CpZUQfTd.js → OutlineSectionHeader.stories-rgGBTWra.js} +1 -1
  88. package/docs/assets/{OverlayHeader-BKF2Jxw2.js → OverlayHeader-DUuFsfnH.js} +1 -1
  89. package/docs/assets/{OverlayHeader.stories-DQMarEn0.js → OverlayHeader.stories-zXHPPbic.js} +1 -1
  90. package/docs/assets/{PageHeader-DLJRiCDS.js → PageHeader-Bm1rvulD.js} +1 -1
  91. package/docs/assets/{PageHeader.stories-BMlnhYYZ.js → PageHeader.stories-BGuwpE2Y.js} +1 -1
  92. package/docs/assets/{Pagination-BP-W1sZd.js → Pagination-0MF4UxvJ.js} +1 -1
  93. package/docs/assets/{Pagination.stories-D8QusEmL.js → Pagination.stories-BCM_Mbew.js} +1 -1
  94. package/docs/assets/{PopOver-BPteMd3J.js → PopOver-B3x4u7_M.js} +1 -1
  95. package/docs/assets/{PopOver.stories-BQ1BTWwk.js → PopOver.stories-BMGWNs0f.js} +1 -1
  96. package/docs/assets/{ProgressBar-CWgk1hV8.js → ProgressBar-CSyKJzJ7.js} +1 -1
  97. package/docs/assets/{ProgressBar.stories-CATIctgi.js → ProgressBar.stories-BzcvqT0X.js} +1 -1
  98. package/docs/assets/{ProgressDonutChart-WC2lEAZ8.js → ProgressDonutChart-CMlfnJIg.js} +1 -1
  99. package/docs/assets/{ProgressDonutChart.stories-DHJbf9Nx.js → ProgressDonutChart.stories-DU3dcYKw.js} +1 -1
  100. package/docs/assets/{RadioButton-DDS7T3bf.js → RadioButton-CZBArMaJ.js} +1 -1
  101. package/docs/assets/{RadioButton.stories-CwIgskB5.js → RadioButton.stories-DxbA75Q-.js} +1 -1
  102. package/docs/assets/{RichListItem.stories-ByYKVXoj.js → RichListItem.stories-DVkAZ8mq.js} +1 -1
  103. package/docs/assets/{SectionHeader-mtDgyTNK.js → SectionHeader-D9YtyaAD.js} +1 -1
  104. package/docs/assets/{SectionHeader.stories-RUYZcEBs.js → SectionHeader.stories-CdOsztQo.js} +1 -1
  105. package/docs/assets/{SectionTitle-_cACyvBA.js → SectionTitle-B_bXkybY.js} +1 -1
  106. package/docs/assets/{SectionTitle.stories-CQMtgSgm.js → SectionTitle.stories-BwEqWW1e.js} +1 -1
  107. package/docs/assets/{SelectList-T6eJOYPv.js → SelectList-D5Bts8VC.js} +1 -1
  108. package/docs/assets/{SelectList.stories-BL3nuotP.js → SelectList.stories-Dq_2i6I2.js} +1 -1
  109. package/docs/assets/{SelectListItem-DorYfEdc.js → SelectListItem-BTuKM0w4.js} +1 -1
  110. package/docs/assets/{SelectListItem.stories-zmIE8Hys.js → SelectListItem.stories-wLkoUQxJ.js} +1 -1
  111. package/docs/assets/{SelectListItemDivider-CTuILyj9.js → SelectListItemDivider-CMQALpY4.js} +1 -1
  112. package/docs/assets/{SelectListItemDivider.stories-CyW1-Pe_.js → SelectListItemDivider.stories-D9qt2vAD.js} +1 -1
  113. package/docs/assets/{SelectListItemTile-DZDC7P_P.js → SelectListItemTile-DjvYvZN2.js} +1 -1
  114. package/docs/assets/{SelectListItemTile.stories-DKJCFIlt.js → SelectListItemTile.stories-BERL6roD.js} +1 -1
  115. package/docs/assets/{SelectListItemToggle-htk1ZR7a.js → SelectListItemToggle-BOlj9KDe.js} +1 -1
  116. package/docs/assets/{SelectListItemToggle.stories-Bcegqjj2.js → SelectListItemToggle.stories-i_Fit9iz.js} +1 -1
  117. package/docs/assets/{SelectListSectionTitle-BOCjrVHo.js → SelectListSectionTitle-DqFzixd5.js} +1 -1
  118. package/docs/assets/{SelectListSectionTitle.stories-8h3E7qrw.js → SelectListSectionTitle.stories-Bff6cW1U.js} +1 -1
  119. package/docs/assets/{SelectionControl-BK_tron5.js → SelectionControl-CPSdtLfn.js} +1 -1
  120. package/docs/assets/{SelectionTile-zJELYQH1.js → SelectionTile-DXITCKt_.js} +2 -2
  121. package/docs/assets/{SelectionTile.stories-DIGebTkW.js → SelectionTile.stories-TMooL-WG.js} +1 -1
  122. package/docs/assets/{Skeleton-DMxKKJ0Z.js → Skeleton-Cpsye1IX.js} +1 -1
  123. package/docs/assets/{Skeleton.stories-BHWr0cDF.js → Skeleton.stories-BcZQO1fR.js} +1 -1
  124. package/docs/assets/{SurveyQuestionOpenEnded-BugWE9n5.js → SurveyQuestionOpenEnded-DWI9C78d.js} +1 -1
  125. package/docs/assets/{SurveyQuestionOpenEnded.stories-DqpiJnRe.js → SurveyQuestionOpenEnded.stories-CYrLDfB9.js} +1 -1
  126. package/docs/assets/{SurveyQuestionScale-YQUf1B6i.js → SurveyQuestionScale-BVMA41EG.js} +1 -1
  127. package/docs/assets/{SurveyQuestionScale.stories-DO5YM6k6.js → SurveyQuestionScale.stories-DPZ-AjFp.js} +1 -1
  128. package/docs/assets/{SurveyToggle-CAt6qXiD.js → SurveyToggle-pbbLpF_K.js} +1 -1
  129. package/docs/assets/{SurveyToggle.stories-A44mClL0.js → SurveyToggle.stories-Da2KtymG.js} +1 -1
  130. package/docs/assets/{Switch-D_N0-PMC.js → Switch-mI22_wqI.js} +1 -1
  131. package/docs/assets/{Switch.stories-DJmkpiSd.js → Switch.stories-DJbgEX5x.js} +1 -1
  132. package/docs/assets/{TabItem-CRrapLva.js → TabItem-4XkUTn2I.js} +1 -1
  133. package/docs/assets/{TabItem.stories-Dtgi3LM8.js → TabItem.stories-CxZNhXoy.js} +1 -1
  134. package/docs/assets/{TextGroup-Bk9VXC2h.js → TextGroup-CYKZ-tOo.js} +1 -1
  135. package/docs/assets/{TextGroup.stories-3wH48Kir.js → TextGroup.stories-cU3ZCXVQ.js} +1 -1
  136. package/docs/assets/{ThreeColumnLayout-CQnFmK7u.js → ThreeColumnLayout-DyxM7a22.js} +1 -1
  137. package/docs/assets/{ThreeColumnLayout.stories-DnqRflqN.js → ThreeColumnLayout.stories-BakzsXzp.js} +1 -1
  138. package/docs/assets/{Tile-CH8oOuWL.js → Tile-0yOu7J1-.js} +1 -1
  139. package/docs/assets/{Tile.sb.shared-CWXeuBol.js → Tile.sb.shared-BIRwKt3g.js} +1 -1
  140. package/docs/assets/{Tile.stories-0cC1E7vK.js → Tile.stories-DTemmawI.js} +1 -1
  141. package/docs/assets/{Toast-DCT_C-Jm.js → Toast-DlXptQwk.js} +1 -1
  142. package/docs/assets/{Toast.stories-DykbV02i.js → Toast.stories-C1j6ZAmy.js} +1 -1
  143. package/docs/assets/{ToggleButton-fcVVisoD.js → ToggleButton-C-1JM2Me.js} +1 -1
  144. package/docs/assets/{ToggleButton.stories-CMC9B5O-.js → ToggleButton.stories-FqBRCElp.js} +1 -1
  145. package/docs/assets/{Tooltip-DB8acOEc.js → Tooltip-Du7SUpMn.js} +1 -1
  146. package/docs/assets/{Tooltip.stories-BWi1adMD.js → Tooltip.stories-CCYTS-Fb.js} +1 -1
  147. package/docs/assets/{TypographyTokensLms.stories-C7HvPtC9.js → TypographyTokensLms.stories-CLfM1Xav.js} +1 -1
  148. package/docs/assets/{TypographyVariables.stories-B1R9WSPD.js → TypographyVariables.stories-DUTx2qnw.js} +1 -1
  149. package/docs/assets/Well-Cey8Z7qW.js +1 -0
  150. package/docs/assets/Well.stories-DAG6cTio.js +15 -0
  151. package/docs/assets/{entry-preview-C1JfRNcy.js → entry-preview-BOTW3a15.js} +1 -1
  152. package/docs/assets/{entry-preview-docs-CLZ3bGGX.js → entry-preview-docs-Cvbf5NiE.js} +1 -1
  153. package/docs/assets/{iframe-BvVXUrhW.js → iframe-BV9pp8nM.js} +8 -8
  154. package/docs/assets/{index-DlcQIzWq.js → index-DixXTKS5.js} +1 -1
  155. package/docs/assets/{index-eqI06LoF.js → index-Mn08sn7H.js} +1 -1
  156. package/docs/assets/{preview-DlI-9236.js → preview-BXmx0WAE.js} +2 -2
  157. package/docs/assets/{preview-CnZUp2W_.js → preview-DKZFXKYW.js} +1 -1
  158. package/docs/assets/string-fni2Tsvs.js +1 -0
  159. package/docs/assets/{vue-popper-DQfdblyw.js → vue-popper-BvR5iCy5.js} +1 -1
  160. package/docs/assets/{vue.esm-bundler-DmkhfO_9.js → vue.esm-bundler-C__e7YM5.js} +1 -1
  161. package/docs/iframe.html +1 -1
  162. package/docs/project.json +1 -1
  163. package/lib/js/components/DatePickers/DatePicker/DatePicker.stories.ts +4 -0
  164. package/lib/js/components/DatePickers/DatePicker/DatePicker.vue +28 -0
  165. package/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue +28 -0
  166. package/lib/js/components/Modal/Modal.spec.ts +5 -0
  167. package/lib/js/components/Modal/Modal.vue +25 -22
  168. package/lib/js/components/Modals/Modal/Modal.vue +97 -95
  169. package/package.json +1 -1
  170. package/docs/assets/Chip-CYE9ciB6.js +0 -1
  171. package/docs/assets/Chip.stories-DvZRPuZX.js +0 -43
  172. package/docs/assets/DateRangePicker-BKwZTPvV.js +0 -1
  173. package/docs/assets/Modal-B4jvsyp2.js +0 -1
  174. package/docs/assets/Well-Chn1RK_x.js +0 -1
  175. package/docs/assets/Well.stories-D3_25hWV.js +0 -6
  176. package/docs/assets/string-Ct9SAoCE.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as _,I as y,b as g}from"./Icon-mlOEH8dY.js";import{d as p,r as I,o as n,b as $,a as s,x as d,c as u,f as i,k as b,g as m,n as C,p as N,T as w}from"./vue.esm-bundler-C__e7YM5.js";import{_ as c}from"./_plugin-vue_export-helper-DlAUqK2U.js";const f=p({name:"Modal",components:{WnlIcon:_},inheritAttrs:!1,props:{showHeader:{type:Boolean,default:!0},animateScrollingContent:{type:Boolean,default:!1}},emits:["close-modal"],data(){return{ICONS:Object.freeze(y),ICON_SIZES:Object.freeze(g)}}}),E={key:0,class:"m-modal__header"},T={key:1,class:"m-modal__footer"};function O(e,a,o,r,t,S){const l=I("wnl-icon");return n(),$(w,{to:"body"},[s("div",N({class:"m-modal"},e.$attrs,{onClick:a[2]||(a[2]=d(h=>e.$emit("close-modal"),["stop"]))}),[s("div",{class:"m-modal__contentWrapper",onClick:a[1]||(a[1]=d(()=>{},["stop"]))},[e.showHeader?(n(),u("div",E,[i(e.$slots,"header",{},void 0,!0),b(l,{touchable:"",icon:e.ICONS.FA_XMARK,class:"m-modal__header__close",size:e.ICON_SIZES.SMALL,onClick:a[0]||(a[0]=d(h=>e.$emit("close-modal"),["stop"]))},null,8,["icon","size"])])):m("",!0),s("div",{class:C(["m-modal__content",{"scrollable-main-container":e.animateScrollingContent}])},[i(e.$slots,"default",{},void 0,!0)],2),a[3]||(a[3]=s("div",{class:"m-modal__content__shadow"},null,-1)),e.$slots.footer?(n(),u("div",T,[i(e.$slots,"footer",{},void 0,!0)])):m("",!0)])],16)])}const Q=c(f,[["render",O],["__scopeId","data-v-a18f33bc"]]);f.__docgenInfo={displayName:"Modal",exportName:"default",description:"",tags:{},props:[{name:"showHeader",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"animateScrollingContent",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"close-modal"}],slots:[{name:"header"},{name:"default"},{name:"footer"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/Modal/Modal.vue"]};const z={DEFAULT:"default",DISABLED:"disabled"},j={ONE:"one",TWO:"two"},v=p({name:"SurveyQuestionTextarea",props:{value:{type:String,required:!0},placeholder:{type:String,default:"Wpisz swoją odpowiedź"},disabled:{type:Boolean,default:!1}},emits:["input"],watch:{value(){this.$refs.textarea.style.height="auto",this.$refs.textarea.style.height=this.$refs.textarea.scrollHeight+"px"}},methods:{onInput(e){this.$emit("input",e.target.value)}}}),k=["disabled","placeholder","value"];function M(e,a,o,r,t,S){return n(),u("textarea",{ref:"textarea",class:"ds-surveyQuestionTextarea",disabled:e.disabled,placeholder:e.placeholder,value:e.value,onInput:a[0]||(a[0]=(...l)=>e.onInput&&e.onInput(...l))},null,40,k)}const L=c(v,[["render",M],["__scopeId","data-v-a0f836ab"]]);v.__docgenInfo={displayName:"SurveyQuestionTextarea",exportName:"default",description:"",tags:{},props:[{name:"value",type:{name:"string"},required:!0},{name:"placeholder",type:{name:"string"},defaultValue:{func:!1,value:"'Wpisz swoją odpowiedź'"}},{name:"disabled",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"input",type:{names:["undefined"]}}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/SurveyQuestions/SurveyQuestionTextarea.vue"]};const U=e=>{for(var a="",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=o.length,t=0;t<e;t++)a+=o.charAt(Math.floor(Math.random()*r));return a};export{Q as M,z as S,j as a,L as b,U as r};
@@ -1,4 +1,4 @@
1
- import{g as G,c as he,a as de}from"./_commonjsHelpers-Chg3vePA.js";import{D as ve}from"./vue.esm-bundler-DmkhfO_9.js";var K={exports:{}};/**!
1
+ import{g as G,c as he,a as de}from"./_commonjsHelpers-Chg3vePA.js";import{D as ve}from"./vue.esm-bundler-C__e7YM5.js";var K={exports:{}};/**!
2
2
  * @fileOverview Kickass library to create and place poppers near their reference elements.
3
3
  * @version 1.16.1
4
4
  * @license
@@ -33,4 +33,4 @@
33
33
  * vue v3.5.12
34
34
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
35
35
  * @license MIT
36
- **/const dc=Object.create(null);function Qu(e,t){if(!Z(e))if(e.nodeType)e=e.innerHTML;else return Pe;const n=lh(e,t),s=dc[n];if(s)return s;if(e[0]==="#"){const l=document.querySelector(e);e=l?l.innerHTML:""}const i=ee({hoistStatic:!0,onError:void 0,onWarn:Pe},t);!i.isCustomElement&&typeof customElements!="undefined"&&(i.isCustomElement=l=>!!customElements.get(l));const{code:r}=Em(e,i),o=new Function("Vue",r)(Ip);return o._rc=!0,dc[n]=o}xo(Qu);const Tm=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:to,BaseTransitionPropsValidators:Vi,Comment:me,DeprecationTypes:Ff,EffectScope:xi,ErrorCodes:Qc,ErrorTypeStrings:Rf,Fragment:Se,KeepAlive:va,ReactiveEffect:wn,Static:Bt,Suspense:hf,Teleport:aa,Text:Nt,TrackOpTypes:Gc,Transition:Hf,TransitionGroup:zf,TriggerOpTypes:Jc,VueElement:ws,assertNumber:Zc,callWithAsyncErrorHandling:Xe,callWithErrorHandling:un,camelize:ue,capitalize:Kt,cloneVNode:at,compatUtils:Df,compile:Qu,computed:Io,createApp:gi,createBlock:cs,createCommentVNode:vf,createElementBlock:yf,createElementVNode:ji,createHydrationRenderer:bo,createPropsRestProxy:ja,createRenderer:yo,createSSRApp:$o,createSlots:xa,createStaticVNode:Sf,createTextVNode:Ki,createVNode:fe,customRef:Qr,defineAsyncComponent:Sa,defineComponent:$i,defineCustomElement:ko,defineEmits:Pa,defineExpose:Ma,defineModel:Da,defineOptions:ka,defineProps:Ra,defineSSRCustomElement:Jf,defineSlots:La,devtools:Pf,effect:xc,effectScope:vc,getCurrentInstance:Qe,getCurrentScope:Wr,getCurrentWatcher:Yc,getTransitionRawChildren:Ss,guardReactiveProps:Ao,h:Oo,handleError:Gt,hasInjectionContext:Ga,hydrate:lu,hydrateOnIdle:ma,hydrateOnInteraction:_a,hydrateOnMediaQuery:ba,hydrateOnVisible:ya,initCustomFormatter:xf,initDirectivesForSSR:fu,inject:Cn,isMemoSame:Ro,isProxy:ys,isReactive:At,isReadonly:xt,isRef:_e,isRuntimeOnly:Af,isShallow:je,isVNode:mt,markRaw:Xr,mergeDefaults:Ha,mergeModels:Ua,mergeProps:wo,nextTick:_s,normalizeClass:Vn,normalizeProps:yc,normalizeStyle:Fn,onActivated:so,onBeforeMount:Hi,onBeforeUnmount:Ts,onBeforeUpdate:ro,onDeactivated:io,onErrorCaptured:ao,onMounted:$n,onRenderTracked:co,onRenderTriggered:lo,onScopeDispose:Ec,onServerPrefetch:oo,onUnmounted:Cs,onUpdated:Es,onWatcherCleanup:zr,openBlock:xn,popScopeId:ia,provide:go,proxyRefs:ki,pushScopeId:sa,queuePostFlushCb:ss,reactive:ms,readonly:Pi,ref:En,registerRuntimeCompiler:xo,render:Vo,renderList:wa,renderSlot:Ia,resolveComponent:Ta,resolveDirective:Na,resolveDynamicComponent:Aa,resolveFilter:Lf,resolveTransitionHooks:rn,setBlockTracking:ai,setDevtoolsHook:Mf,setTransitionHooks:gt,shallowReactive:Yr,shallowReadonly:Bc,shallowRef:Zr,ssrContextKey:So,ssrUtils:kf,stop:Ic,toDisplayString:Kr,toHandlerKey:zt,toHandlers:Oa,toRaw:te,toRef:Wc,toRefs:Kc,toValue:jc,transformVNodeArgs:bf,triggerRef:Uc,unref:bs,useAttrs:$a,useCssModule:Xf,useCssVars:Gf,useHost:Lo,useId:pa,useModel:af,useSSRContext:vo,useShadowRoot:Yf,useSlots:Va,useTemplateRef:ga,useTransitionState:Fi,vModelCheckbox:Wi,vModelDynamic:Fo,vModelRadio:qi,vModelSelect:Do,vModelText:as,vShow:Mo,version:Po,warn:Of,watch:An,watchEffect:lf,watchPostEffect:Eo,watchSyncEffect:To,withAsyncContext:Ka,withCtx:Di,withDefaults:Fa,withDirectives:oa,withKeys:su,withMemo:If,withModifiers:nu,withScopeId:ra},Symbol.toStringTag,{value:"Module"}));export{su as A,oa as B,Na as C,Tm as D,Cs as E,Se as F,Pi as G,Qe as H,$n as I,_s as J,ms as K,Oo as L,Sf as M,gi as N,At as O,ji as a,cs as b,yf as c,$i as d,Di as e,Ia as f,vf as g,xa as h,mt as i,Kr as j,fe as k,Ki as l,wa as m,Vn as n,xn as o,wo as p,Io as q,Ta as r,Fn as s,te as t,bs as u,En as v,An as w,nu as x,Sa as y,Aa as z};
36
+ **/const dc=Object.create(null);function Qu(e,t){if(!Z(e))if(e.nodeType)e=e.innerHTML;else return Pe;const n=lh(e,t),s=dc[n];if(s)return s;if(e[0]==="#"){const l=document.querySelector(e);e=l?l.innerHTML:""}const i=ee({hoistStatic:!0,onError:void 0,onWarn:Pe},t);!i.isCustomElement&&typeof customElements!="undefined"&&(i.isCustomElement=l=>!!customElements.get(l));const{code:r}=Em(e,i),o=new Function("Vue",r)(Ip);return o._rc=!0,dc[n]=o}xo(Qu);const Tm=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:to,BaseTransitionPropsValidators:Vi,Comment:me,DeprecationTypes:Ff,EffectScope:xi,ErrorCodes:Qc,ErrorTypeStrings:Rf,Fragment:Se,KeepAlive:va,ReactiveEffect:wn,Static:Bt,Suspense:hf,Teleport:aa,Text:Nt,TrackOpTypes:Gc,Transition:Hf,TransitionGroup:zf,TriggerOpTypes:Jc,VueElement:ws,assertNumber:Zc,callWithAsyncErrorHandling:Xe,callWithErrorHandling:un,camelize:ue,capitalize:Kt,cloneVNode:at,compatUtils:Df,compile:Qu,computed:Io,createApp:gi,createBlock:cs,createCommentVNode:vf,createElementBlock:yf,createElementVNode:ji,createHydrationRenderer:bo,createPropsRestProxy:ja,createRenderer:yo,createSSRApp:$o,createSlots:xa,createStaticVNode:Sf,createTextVNode:Ki,createVNode:fe,customRef:Qr,defineAsyncComponent:Sa,defineComponent:$i,defineCustomElement:ko,defineEmits:Pa,defineExpose:Ma,defineModel:Da,defineOptions:ka,defineProps:Ra,defineSSRCustomElement:Jf,defineSlots:La,devtools:Pf,effect:xc,effectScope:vc,getCurrentInstance:Qe,getCurrentScope:Wr,getCurrentWatcher:Yc,getTransitionRawChildren:Ss,guardReactiveProps:Ao,h:Oo,handleError:Gt,hasInjectionContext:Ga,hydrate:lu,hydrateOnIdle:ma,hydrateOnInteraction:_a,hydrateOnMediaQuery:ba,hydrateOnVisible:ya,initCustomFormatter:xf,initDirectivesForSSR:fu,inject:Cn,isMemoSame:Ro,isProxy:ys,isReactive:At,isReadonly:xt,isRef:_e,isRuntimeOnly:Af,isShallow:je,isVNode:mt,markRaw:Xr,mergeDefaults:Ha,mergeModels:Ua,mergeProps:wo,nextTick:_s,normalizeClass:Vn,normalizeProps:yc,normalizeStyle:Fn,onActivated:so,onBeforeMount:Hi,onBeforeUnmount:Ts,onBeforeUpdate:ro,onDeactivated:io,onErrorCaptured:ao,onMounted:$n,onRenderTracked:co,onRenderTriggered:lo,onScopeDispose:Ec,onServerPrefetch:oo,onUnmounted:Cs,onUpdated:Es,onWatcherCleanup:zr,openBlock:xn,popScopeId:ia,provide:go,proxyRefs:ki,pushScopeId:sa,queuePostFlushCb:ss,reactive:ms,readonly:Pi,ref:En,registerRuntimeCompiler:xo,render:Vo,renderList:wa,renderSlot:Ia,resolveComponent:Ta,resolveDirective:Na,resolveDynamicComponent:Aa,resolveFilter:Lf,resolveTransitionHooks:rn,setBlockTracking:ai,setDevtoolsHook:Mf,setTransitionHooks:gt,shallowReactive:Yr,shallowReadonly:Bc,shallowRef:Zr,ssrContextKey:So,ssrUtils:kf,stop:Ic,toDisplayString:Kr,toHandlerKey:zt,toHandlers:Oa,toRaw:te,toRef:Wc,toRefs:Kc,toValue:jc,transformVNodeArgs:bf,triggerRef:Uc,unref:bs,useAttrs:$a,useCssModule:Xf,useCssVars:Gf,useHost:Lo,useId:pa,useModel:af,useSSRContext:vo,useShadowRoot:Yf,useSlots:Va,useTemplateRef:ga,useTransitionState:Fi,vModelCheckbox:Wi,vModelDynamic:Fo,vModelRadio:qi,vModelSelect:Do,vModelText:as,vShow:Mo,version:Po,warn:Of,watch:An,watchEffect:lf,watchPostEffect:Eo,watchSyncEffect:To,withAsyncContext:Ka,withCtx:Di,withDefaults:Fa,withDirectives:oa,withKeys:su,withMemo:If,withModifiers:nu,withScopeId:ra},Symbol.toStringTag,{value:"Module"}));export{su as A,oa as B,Na as C,Tm as D,Cs as E,Se as F,Pi as G,Qe as H,$n as I,_s as J,ms as K,Oo as L,Sf as M,gi as N,At as O,aa as T,ji as a,cs as b,yf as c,$i as d,Di as e,Ia as f,vf as g,xa as h,mt as i,Kr as j,fe as k,Ki as l,wa as m,Vn as n,xn as o,wo as p,Io as q,Ta as r,Fn as s,te as t,bs as u,En as v,An as w,nu as x,Sa as y,Aa as z};
package/docs/iframe.html CHANGED
@@ -510,7 +510,7 @@
510
510
  </script>
511
511
  <link rel="stylesheet" href="./preview.css">
512
512
 
513
- <script type="module" crossorigin src="./assets/iframe-BvVXUrhW.js"></script>
513
+ <script type="module" crossorigin src="./assets/iframe-BV9pp8nM.js"></script>
514
514
  </head>
515
515
 
516
516
  <body>
package/docs/project.json CHANGED
@@ -1 +1 @@
1
- {"generatedAt":1747988135977,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@types/jest":"29.5.13","@vue/vue3-jest":"29.2.2","jest":"29.7.0","jest-environment-jsdom":"29.7.0","ts-jest":"29.0.5"},"packageManager":{"type":"yarn","version":"1.22.22"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/vue3-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/vue3","portableStoriesFileCount":2,"storybookVersion":"8.3.4","storybookVersionSpecifier":"^8.3.4","language":"typescript","storybookPackages":{"@storybook/vue3":{"version":"8.3.4"},"@storybook/vue3-vite":{"version":"8.3.4"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"8.3.4"}},"addons":{"@storybook/addon-actions":{"version":"8.3.4"},"@storybook/addon-designs":{"version":"8.0.3"},"@storybook/addon-docs":{"version":"8.3.4"},"@storybook/addon-controls":{"version":"8.3.4"},"@storybook/addon-storysource":{"version":"8.3.4"},"@storybook/addon-viewport":{"version":"8.3.4"}}}
1
+ {"generatedAt":1748524962106,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@types/jest":"29.5.13","@vue/vue3-jest":"29.2.2","jest":"29.7.0","jest-environment-jsdom":"29.7.0","ts-jest":"29.0.5"},"packageManager":{"type":"yarn","version":"1.22.22"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/vue3-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/vue3","portableStoriesFileCount":2,"storybookVersion":"8.3.4","storybookVersionSpecifier":"^8.3.4","language":"typescript","storybookPackages":{"@storybook/vue3":{"version":"8.3.4"},"@storybook/vue3-vite":{"version":"8.3.4"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"8.3.4"}},"addons":{"@storybook/addon-actions":{"version":"8.3.4"},"@storybook/addon-designs":{"version":"8.0.3"},"@storybook/addon-docs":{"version":"8.3.4"},"@storybook/addon-controls":{"version":"8.3.4"},"@storybook/addon-storysource":{"version":"8.3.4"},"@storybook/addon-viewport":{"version":"8.3.4"}}}
@@ -34,6 +34,10 @@ const StoryTemplate: StoryFn<typeof DatePicker> = (args) => {
34
34
  updateArgs({
35
35
  date: `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`,
36
36
  });
37
+ } else {
38
+ updateArgs({
39
+ date: null,
40
+ });
37
41
  }
38
42
  },
39
43
  },
@@ -355,6 +355,34 @@ export default defineComponent({
355
355
  return this.color as TileColor;
356
356
  },
357
357
  },
358
+ watch: {
359
+ minDate: {
360
+ immediate: true,
361
+ handler(minDate: Date) {
362
+ if (
363
+ this.date &&
364
+ minDate &&
365
+ new Date(this.date).setHours(0, 0, 0, 0) <
366
+ new Date(minDate).setHours(0, 0, 0, 0)
367
+ ) {
368
+ this.$emit('update:date', null);
369
+ }
370
+ },
371
+ },
372
+ maxDate: {
373
+ immediate: true,
374
+ handler(maxDate: Date) {
375
+ if (
376
+ this.date &&
377
+ maxDate &&
378
+ new Date(this.date).setHours(0, 0, 0, 0) >
379
+ new Date(maxDate).setHours(0, 0, 0, 0)
380
+ ) {
381
+ this.$emit('update:date', null);
382
+ }
383
+ },
384
+ },
385
+ },
358
386
  methods: {
359
387
  async bindFlatpickrInstance() {
360
388
  this.flatpickrInstance = await this.createDatePicker(
@@ -192,6 +192,34 @@ export default defineComponent({
192
192
  DATE_PICKER_TRIGGER_TYPES: Object.freeze(DATE_PICKER_TRIGGER_TYPES),
193
193
  };
194
194
  },
195
+ watch: {
196
+ minDate: {
197
+ immediate: true,
198
+ handler(minDate: Date) {
199
+ if (
200
+ this.startDate &&
201
+ minDate &&
202
+ new Date(this.startDate).setHours(0, 0, 0, 0) <
203
+ new Date(minDate).setHours(0, 0, 0, 0)
204
+ ) {
205
+ this.$emit('update:date', { startDate: null, endDate: null });
206
+ }
207
+ },
208
+ },
209
+ maxDate: {
210
+ immediate: true,
211
+ handler(maxDate: Date) {
212
+ if (
213
+ this.endDate &&
214
+ maxDate &&
215
+ new Date(this.endDate).setHours(0, 0, 0, 0) >
216
+ new Date(maxDate).setHours(0, 0, 0, 0)
217
+ ) {
218
+ this.$emit('update:date', { startDate: null, endDate: null });
219
+ }
220
+ },
221
+ },
222
+ },
195
223
  methods: {
196
224
  async bindFlatpickrInstance() {
197
225
  this.flatpickrInstance = await this.createDatePicker(
@@ -12,6 +12,11 @@ describe('Modal', () => {
12
12
  header: headerSlot,
13
13
  slot,
14
14
  },
15
+ global: {
16
+ stubs: {
17
+ teleport: true,
18
+ },
19
+ },
15
20
  });
16
21
  };
17
22
 
@@ -1,28 +1,30 @@
1
1
  <template>
2
- <div class="m-modal" @click.stop="$emit('close-modal')">
3
- <div class="m-modal__contentWrapper" @click.stop>
4
- <div v-if="showHeader" class="m-modal__header">
5
- <slot name="header" />
6
- <wnl-icon
7
- touchable
8
- :icon="ICONS.FA_XMARK"
9
- class="m-modal__header__close"
10
- :size="ICON_SIZES.SMALL"
11
- @click.stop="$emit('close-modal')"
12
- />
13
- </div>
14
- <div
15
- class="m-modal__content"
16
- :class="{ 'scrollable-main-container': animateScrollingContent }"
17
- >
18
- <slot />
19
- </div>
20
- <div class="m-modal__content__shadow" />
21
- <div v-if="$slots.footer" class="m-modal__footer">
22
- <slot name="footer" />
2
+ <teleport to="body">
3
+ <div class="m-modal" v-bind="$attrs" @click.stop="$emit('close-modal')">
4
+ <div class="m-modal__contentWrapper" @click.stop>
5
+ <div v-if="showHeader" class="m-modal__header">
6
+ <slot name="header" />
7
+ <wnl-icon
8
+ touchable
9
+ :icon="ICONS.FA_XMARK"
10
+ class="m-modal__header__close"
11
+ :size="ICON_SIZES.SMALL"
12
+ @click.stop="$emit('close-modal')"
13
+ />
14
+ </div>
15
+ <div
16
+ class="m-modal__content"
17
+ :class="{ 'scrollable-main-container': animateScrollingContent }"
18
+ >
19
+ <slot />
20
+ </div>
21
+ <div class="m-modal__content__shadow" />
22
+ <div v-if="$slots.footer" class="m-modal__footer">
23
+ <slot name="footer" />
24
+ </div>
23
25
  </div>
24
26
  </div>
25
- </div>
27
+ </teleport>
26
28
  </template>
27
29
 
28
30
  <style lang="scss" scoped>
@@ -111,6 +113,7 @@ import { defineComponent } from 'vue';
111
113
  export default defineComponent({
112
114
  name: 'Modal',
113
115
  components: { WnlIcon },
116
+ inheritAttrs: false,
114
117
  props: {
115
118
  showHeader: {
116
119
  type: Boolean,
@@ -1,110 +1,112 @@
1
1
  <template>
2
- <div class="ds-modal" @click.self="$emit('close-modal')">
3
- <div class="ds-modal__wrapper" :class="{ '-ds-small': size === MODAL_SIZES.SMALL }">
4
- <wnl-icon-button
5
- touchable
6
- :icon="ICONS.FA_XMARK"
7
- class="ds-modal__close"
8
- :size="ICON_SIZES.SMALL"
9
- :elevation="BUTTON_ELEVATIONS.X_SMALL"
10
- :color="ICON_BUTTON_COLORS.NEUTRAL_WEAK"
11
- @click.stop="$emit('close-modal')"
12
- />
13
- <div class="ds-modal__scrollableWrapper">
14
- <img v-if="headerImage" class="ds-modal__image" :src="headerImage" alt="" />
15
- <div class="ds-modal__content" :class="{ '-ds-centered': contentCentered }">
16
- <div v-if="headerTitle" class="ds-modal__header">
17
- <feature-icon
18
- v-if="headerFeatureIcon"
19
- class="ds-modal__headerFeatureIcon"
20
- :color="calcHeaderFeatureIconColor"
21
- :icon="headerFeatureIcon"
22
- :size="FEATURE_ICON_SIZES.X_LARGE"
23
- double-background
24
- />
25
- <h4
26
- class="ds-modal__headerTitle"
27
- :class="{
28
- '-ds-small': headerTitleSize === MODAL_HEADER_TITLE_SIZES.SMALL,
29
- }"
30
- >{{ headerTitle }}</h4
31
- >
32
- <h5 v-if="headerSubtitle" class="ds-modal__headerSubtitle">{{
33
- headerSubtitle
34
- }}</h5>
35
- </div>
36
- <div v-if="$slots.default" class="ds-modal__slotContent">
37
- <slot />
38
- </div>
39
- <div
40
- v-if="displayFooter"
41
- class="ds-modal__footer"
42
- :class="{ '-ds-singleColumn': calcSingleColumn }"
43
- >
44
- <div
45
- v-if="footerTertiaryButtonText || footerCheckboxText"
46
- class="ds-modal__footerCtaSecondary"
47
- >
48
- <div v-if="footerCheckboxText" class="ds-modal__checkbox">
49
- <input
50
- id="ds-modal__checkboxInput"
51
- type="checkbox"
52
- :checked="false"
53
- @change="
54
- $emit(
55
- 'checkbox-change',
56
- ($event.target as HTMLInputElement).checked,
57
- )
58
- "
59
- />
60
- <label
61
- for="ds-modal__checkboxInput"
62
- class="ds-modal__checkboxLabel"
63
- >
64
- {{ footerCheckboxText }}
65
- </label>
66
- </div>
67
- <wnl-button
68
- v-if="footerTertiaryButtonText"
69
- :type="BUTTON_TYPES.TEXT"
70
- :color="BUTTON_COLORS.NEUTRAL"
71
- :icon-left="footerTertiaryButtonIcon"
72
- :state="footerTertiaryButtonState"
73
- class="ds-modal__tertiaryButton"
74
- @click="$emit('tertiary-button-click')"
2
+ <teleport to="body">
3
+ <div class="ds-modal" v-bind="$attrs" @click.self="$emit('close-modal')">
4
+ <div class="ds-modal__wrapper" :class="{ '-ds-small': size === MODAL_SIZES.SMALL }">
5
+ <wnl-icon-button
6
+ touchable
7
+ :icon="ICONS.FA_XMARK"
8
+ class="ds-modal__close"
9
+ :size="ICON_SIZES.SMALL"
10
+ :elevation="BUTTON_ELEVATIONS.X_SMALL"
11
+ :color="ICON_BUTTON_COLORS.NEUTRAL_WEAK"
12
+ @click.stop="$emit('close-modal')"
13
+ />
14
+ <div class="ds-modal__scrollableWrapper">
15
+ <img v-if="headerImage" class="ds-modal__image" :src="headerImage" alt="" />
16
+ <div class="ds-modal__content" :class="{ '-ds-centered': contentCentered }">
17
+ <div v-if="headerTitle" class="ds-modal__header">
18
+ <feature-icon
19
+ v-if="headerFeatureIcon"
20
+ class="ds-modal__headerFeatureIcon"
21
+ :color="calcHeaderFeatureIconColor"
22
+ :icon="headerFeatureIcon"
23
+ :size="FEATURE_ICON_SIZES.X_LARGE"
24
+ double-background
25
+ />
26
+ <h4
27
+ class="ds-modal__headerTitle"
28
+ :class="{
29
+ '-ds-small': headerTitleSize === MODAL_HEADER_TITLE_SIZES.SMALL,
30
+ }"
31
+ >{{ headerTitle }}</h4
75
32
  >
76
- {{ footerTertiaryButtonText }}
77
- </wnl-button>
33
+ <h5 v-if="headerSubtitle" class="ds-modal__headerSubtitle">{{
34
+ headerSubtitle
35
+ }}</h5>
36
+ </div>
37
+ <div v-if="$slots.default" class="ds-modal__slotContent">
38
+ <slot />
78
39
  </div>
79
40
  <div
80
- v-if="footerSecondaryButtonText || footerPrimaryButtonText"
81
- class="ds-modal__footerCtaPrimary"
41
+ v-if="displayFooter"
42
+ class="ds-modal__footer"
43
+ :class="{ '-ds-singleColumn': calcSingleColumn }"
82
44
  >
83
- <wnl-button
84
- v-if="footerSecondaryButtonText"
85
- :type="BUTTON_TYPES.OUTLINED"
86
- :color="calcFooterSecondaryButtonColor"
87
- :icon-right="footerSecondaryButtonIcon"
88
- :state="footerSecondaryButtonState"
89
- @click="$emit('secondary-button-click')"
45
+ <div
46
+ v-if="footerTertiaryButtonText || footerCheckboxText"
47
+ class="ds-modal__footerCtaSecondary"
90
48
  >
91
- {{ footerSecondaryButtonText }}
92
- </wnl-button>
93
- <wnl-button
94
- v-if="footerPrimaryButtonText"
95
- :color="calcFooterPrimaryButtonColor"
96
- :icon-right="footerPrimaryButtonIcon"
97
- :state="footerPrimaryButtonState"
98
- @click="$emit('primary-button-click')"
49
+ <div v-if="footerCheckboxText" class="ds-modal__checkbox">
50
+ <input
51
+ id="ds-modal__checkboxInput"
52
+ type="checkbox"
53
+ :checked="false"
54
+ @change="
55
+ $emit(
56
+ 'checkbox-change',
57
+ ($event.target as HTMLInputElement).checked,
58
+ )
59
+ "
60
+ />
61
+ <label
62
+ for="ds-modal__checkboxInput"
63
+ class="ds-modal__checkboxLabel"
64
+ >
65
+ {{ footerCheckboxText }}
66
+ </label>
67
+ </div>
68
+ <wnl-button
69
+ v-if="footerTertiaryButtonText"
70
+ :type="BUTTON_TYPES.TEXT"
71
+ :color="BUTTON_COLORS.NEUTRAL"
72
+ :icon-left="footerTertiaryButtonIcon"
73
+ :state="footerTertiaryButtonState"
74
+ class="ds-modal__tertiaryButton"
75
+ @click="$emit('tertiary-button-click')"
76
+ >
77
+ {{ footerTertiaryButtonText }}
78
+ </wnl-button>
79
+ </div>
80
+ <div
81
+ v-if="footerSecondaryButtonText || footerPrimaryButtonText"
82
+ class="ds-modal__footerCtaPrimary"
99
83
  >
100
- {{ footerPrimaryButtonText }}
101
- </wnl-button>
84
+ <wnl-button
85
+ v-if="footerSecondaryButtonText"
86
+ :type="BUTTON_TYPES.OUTLINED"
87
+ :color="calcFooterSecondaryButtonColor"
88
+ :icon-right="footerSecondaryButtonIcon"
89
+ :state="footerSecondaryButtonState"
90
+ @click="$emit('secondary-button-click')"
91
+ >
92
+ {{ footerSecondaryButtonText }}
93
+ </wnl-button>
94
+ <wnl-button
95
+ v-if="footerPrimaryButtonText"
96
+ :color="calcFooterPrimaryButtonColor"
97
+ :icon-right="footerPrimaryButtonIcon"
98
+ :state="footerPrimaryButtonState"
99
+ @click="$emit('primary-button-click')"
100
+ >
101
+ {{ footerPrimaryButtonText }}
102
+ </wnl-button>
103
+ </div>
102
104
  </div>
103
105
  </div>
104
106
  </div>
105
107
  </div>
106
108
  </div>
107
- </div>
109
+ </teleport>
108
110
  </template>
109
111
 
110
112
  <style lang="scss" scoped>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bethinkpl/design-system",
3
- "version": "26.14.5",
3
+ "version": "26.14.7",
4
4
  "description": "Bethink universe design-system",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +0,0 @@
1
- import{d as m,t as p,c as o,f as A,g as t,j as C,b as E,n as N,s as O,r as S,o as l,k as T}from"./vue.esm-bundler-DmkhfO_9.js";import{i as a,e as L,h as _,I as R}from"./Button-DHfR56t4.js";import{I as b}from"./IconButton-BJcODvDg.js";import{a as v,I,b as U}from"./Icon-D0llnARZ.js";import{_ as y}from"./_plugin-vue_export-helper-DlAUqK2U.js";const n={X_SMALL:"x-small",SMALL:"small"},s={PRIMARY:"primary",PRIMARY_STRONG:"primaryStrong",NEUTRAL:"neutral",FAIL:"fail",DANGER:"danger",SUCCESS:"success",INVERTED:"inverted",WARNING:"warning",INFO:"info"},r={DEFAULT:"default",DISABLED:"disabled"},i={CAPSULE:"capsule",ROUNDED:"rounded"},P={[s.INVERTED]:a.PRIMARY,[s.NEUTRAL]:a.NEUTRAL,[s.PRIMARY]:a.PRIMARY,[s.PRIMARY_STRONG]:a.PRIMARY,[s.FAIL]:a.FAIL,[s.DANGER]:a.DANGER,[s.WARNING]:a.WARNING,[s.SUCCESS]:a.SUCCESS,[s.INFO]:a.INFO},c=m({name:"Chip",components:{Icon:v,IconButton:b},props:{label:{type:String,default:null},isLabelUppercase:{type:Boolean,default:!1},leftIcon:{type:Object,default:null,validator(e){return Object.values(I).includes(p(e))}},radius:{type:String,default:i.CAPSULE,validator(e){return Object.values(i).includes(e)}},size:{type:String,default:n.SMALL,validator(e){return Object.values(n).includes(e)}},color:{type:String,default:s.NEUTRAL,validator(e){return Object.values(s).includes(e)}},colorHex:{type:String,default:null},state:{type:String,default:r.DEFAULT,validator(e){return Object.values(r).includes(e)}},isRemovable:{type:Boolean,default:!1}},emits:["remove"],data(){return{ICONS:Object.freeze(I),BUTTON_ELEVATIONS:Object.freeze(L),ICON_BUTTON_STATES:Object.freeze(_),ICON_BUTTON_SIZES:Object.freeze(R),ICON_SIZES:Object.freeze(U),CHIP_SIZES:Object.freeze(n),CHIP_STATES:Object.freeze(r),CHIP_RADIUSES:Object.freeze(i)}},computed:{colorClassName(){return this.colorHex?"-ds-color-invertedHex":`-ds-color-${this.color}`},customStyle(){const e={};return this.colorHex&&(e.backgroundColor=this.colorHex),e},iconButtonColor(){return this.colorHex?a.NEUTRAL:P[this.color]||a.PRIMARY}}}),H=["title"],D={key:0,class:"ds-chip__leftIcon"},B={key:1,class:"ds-chip__label"};function g(e,u,M,h,z,j){const d=S("icon"),f=S("icon-button");return l(),o("div",{class:N(["ds-chip",{"-ds-x-small":e.size===e.CHIP_SIZES.X_SMALL,[e.colorClassName]:!0,"-ds-disabled":e.state===e.CHIP_STATES.DISABLED,"-ds-uppercase":e.isLabelUppercase,"-ds-rounded":e.radius===e.CHIP_RADIUSES.ROUNDED,"-ds-removable":e.size!==e.CHIP_SIZES.X_SMALL&&e.isRemovable}]),title:e.label,style:O({backgroundColor:e.colorHex})},[e.$slots.accessory||e.leftIcon?(l(),o("span",D,[A(e.$slots,"accessory",{},()=>[T(d,{icon:e.leftIcon,size:e.size===e.CHIP_SIZES.X_SMALL?e.ICON_SIZES.XXX_SMALL:e.ICON_SIZES.XX_SMALL},null,8,["icon","size"])],!0)])):t("",!0),e.label?(l(),o("span",B,C(e.label),1)):t("",!0),e.size!==e.CHIP_SIZES.X_SMALL&&e.isRemovable?(l(),E(f,{key:2,class:"ds-chip__remove",touchable:!1,state:e.state===e.CHIP_STATES.DISABLED?e.ICON_BUTTON_STATES.DISABLED:e.ICON_BUTTON_STATES.DEFAULT,color:e.iconButtonColor,size:e.ICON_BUTTON_SIZES.XX_SMALL,icon:e.ICONS.FA_XMARK,elevation:e.BUTTON_ELEVATIONS.X_SMALL,onClick:u[0]||(u[0]=V=>e.$emit("remove"))},null,8,["state","color","size","icon","elevation"])):t("",!0)],14,H)}const G=y(c,[["render",g],["__scopeId","data-v-38114956"]]);c.__docgenInfo={displayName:"Chip",exportName:"default",description:"",tags:{},props:[{name:"label",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"isLabelUppercase",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"leftIcon",type:{name:"object"},defaultValue:{func:!1,value:"null"}},{name:"radius",type:{name:"string"},defaultValue:{func:!1,value:"CHIP_RADIUSES.CAPSULE"}},{name:"size",type:{name:"string"},defaultValue:{func:!1,value:"CHIP_SIZES.SMALL"}},{name:"color",type:{name:"string"},defaultValue:{func:!1,value:"CHIP_COLORS.NEUTRAL"}},{name:"colorHex",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"state",type:{name:"string"},defaultValue:{func:!1,value:"CHIP_STATES.DEFAULT"}},{name:"isRemovable",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"remove"}],slots:[{name:"accessory"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/Chip/Chip.vue"]};export{G as C,i as a,n as b,s as c,r as d};
@@ -1,43 +0,0 @@
1
- import{C as o,a as b,b as a,c as g,d as h}from"./Chip-CYE9ciB6.js";import{I as r}from"./Icon-D0llnARZ.js";import{o as C,c as v,a as c}from"./vue.esm-bundler-DmkhfO_9.js";import"./Button-DHfR56t4.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./IconButton-BJcODvDg.js";import"./device-9fgosCm4.js";const O={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 23 23"};function x(s,l){return C(),v("svg",O,l[0]||(l[0]=[c("path",{"fill-rule":"evenodd",d:"M13.47 3.952 3.951 13.47a3.702 3.702 0 0 0 5.235 5.234l9.517-9.517a3.701 3.701 0 1 0-5.235-5.235zM2.207 20.449a6.17 6.17 0 0 0 8.724 0l9.518-9.518a6.17 6.17 0 1 0-8.724-8.724l-9.518 9.518a6.17 6.17 0 0 0 0 8.724","clip-rule":"evenodd"},null,-1),c("path",{d:"M2.207 20.45a6.17 6.17 0 0 0 8.724 0l5.405-5.406L7.612 6.32l-5.405 5.405a6.17 6.17 0 0 0 0 8.724z"},null,-1)]))}const I={render:x},j={title:"Components/Chip",component:o},y=s=>({components:{Chip:o,LogoBadge:I},setup(){return s},template:'<chip :label="label" :is-label-uppercase="isLabelUppercase" :left-icon="ICONS[leftIcon]" :is-removable="isRemovable" :size="size" :color="color" :color-hex="colorHex" :state="state" :radius="radius" />',data(){return{ICONS:Object.freeze(r)}}}),z=s=>({components:{Chip:o,LogoBadge:I},setup(){return s},template:'<chip :label="label" :is-label-uppercase="isLabelUppercase" :left-icon="ICONS[leftIcon]" :is-removable="isRemovable" :size="size" :color="color" :color-hex="colorHex" :state="state" :radius="radius"><template #accessory><logo-badge :style="svgStyle" /></template></chip>',data(){return{ICONS:Object.freeze(r)}},computed:{svgStyle(){return this.size===a.SMALL?{width:"12px",height:"12px"}:{width:"8px",height:"8px"}}}}),e=y.bind({}),t=z.bind({}),S={label:"Chip z labelem",isLabelUppercase:!1,leftIcon:null,radius:b.CAPSULE,size:a.SMALL,color:g.NEUTRAL,colorHex:"",isRemovable:!1,state:h.DEFAULT},f={leftIcon:{control:"select",options:[null,...Object.keys(r)]},size:{control:"select",options:Object.values(a)},color:{control:"select",options:Object.values(g)},state:{control:"select",options:Object.values(h)},radius:{control:"select",options:Object.values(b)}};e.argTypes=f;e.args=S;e.parameters={design:{type:"figma",url:"https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS---Components?node-id=3690%3A69072"}};t.argTypes=f;t.args=S;t.parameters={design:{type:"figma",url:"https://www.figma.com/file/izQdYyiBR1GQgFkaOIfIJI/LMS---DS---Components?node-id=3690%3A69072"}};var i,p,n;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:`args => ({
2
- components: {
3
- Chip,
4
- LogoBadge
5
- },
6
- setup() {
7
- return args;
8
- },
9
- template: '<chip :label="label" :is-label-uppercase="isLabelUppercase" :left-icon="ICONS[leftIcon]" :is-removable="isRemovable" :size="size" :color="color" :color-hex="colorHex" :state="state" :radius="radius" />',
10
- data() {
11
- return {
12
- ICONS: Object.freeze(ICONS)
13
- };
14
- }
15
- })`,...(n=(p=e.parameters)==null?void 0:p.docs)==null?void 0:n.source}}};var m,d,u;t.parameters={...t.parameters,docs:{...(m=t.parameters)==null?void 0:m.docs,source:{originalSource:`args => ({
16
- components: {
17
- Chip,
18
- LogoBadge
19
- },
20
- setup() {
21
- return args;
22
- },
23
- template: '<chip :label="label" :is-label-uppercase="isLabelUppercase" :left-icon="ICONS[leftIcon]" :is-removable="isRemovable" :size="size" :color="color" :color-hex="colorHex" :state="state" :radius="radius">' + '<template #accessory><logo-badge :style="svgStyle" /></template>' + '</chip>',
24
- data() {
25
- return {
26
- ICONS: Object.freeze(ICONS)
27
- };
28
- },
29
- computed: {
30
- svgStyle() {
31
- if (this.size === CHIP_SIZES.SMALL) {
32
- return {
33
- width: '12px',
34
- height: '12px'
35
- };
36
- }
37
- return {
38
- width: '8px',
39
- height: '8px'
40
- };
41
- }
42
- }
43
- })`,...(u=(d=t.parameters)==null?void 0:d.docs)==null?void 0:u.source}}};const B=["Interactive","InteractiveWithAccessory"];export{e as Interactive,t as InteractiveWithAccessory,B as __namedExportsOrder,j as default};
@@ -1 +0,0 @@
1
- import{d as R,t as f,v as s,r as y,o as p,c as D,k,x as T,j as O,g as S,a as C}from"./vue.esm-bundler-DmkhfO_9.js";import{I as a}from"./Icon-D0llnARZ.js";import{D as v,e as m,a as r,b as _,i as b,d as h}from"./DatePicker-D0XaBW1a.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";const I=R({name:"DateRangePicker",components:{DateBox:v},props:{isInteractive:{type:Boolean,default:!1},placeholder:{type:String,default:"Wybierz datę"},startDate:{type:Date,default:null},endDate:{type:Date,default:null},startIcon:{type:[Object,null],default:a.FA_CALENDAR_DAY,validator(e){return e===null||(Object==null?void 0:Object.values(a).includes(f(e)))}},endIcon:{type:[Object,null],default:a.FA_CALENDAR_DAY,validator(e){return e===null||(Object==null?void 0:Object.values(a).includes(f(e)))}},areIconsHiddenOnMobile:{type:Boolean,default:!1},calendarPosition:{type:String,default:m.BOTTOM_LEFT},errorMessage:{type:String,default:""},state:{type:String||null,default:r.DEFAULT},color:{type:String,default:_.NEUTRAL_WEAK},disableDates:{type:Array,default:()=>[]},minDate:{type:Date,default:null},maxDate:{type:Date,default:null},updatePositionBasedOnScrollableSelector:{type:String,default:""}},emits:{"update:date":e=>!0},setup(e,{emit:o}){const t=s(null),i=s(),d=s(),c=l=>{l.length===2&&o("update:date",{startDate:l[0],endDate:l[1]})},n=()=>{u(),t.value=null},{isOpen:E,toggle:g,createDatePicker:A,destroyDatePicker:u,updateDatePicker:P}=b({props:e,onChange:c,onClose:n,defaultDates:[e.startDate,e.endDate],mode:"range"});return{flatpickrInstance:t,dateRangePickerRef:i,flatpickrInputRef:d,isOpen:E,toggleDatePicker:g,createDatePicker:A,destroyDatePicker:u,updateDatePicker:P,DATE_PICKER_CALENDAR_POSITIONS:Object.freeze(m),DATE_PICKER_COLORS:Object.freeze(_),DATE_PICKER_STATES:Object.freeze(r),DATE_PICKER_TRIGGER_TYPES:Object.freeze(h)}},methods:{async bindFlatpickrInstance(){this.flatpickrInstance=await this.createDatePicker(this.flatpickrInputRef,this.dateRangePickerRef,this.updatePositionBasedOnScrollableSelector),this.updateDatePicker()},async toggle(){this.isInteractive&&this.state===r.DEFAULT&&(this.flatpickrInstance||await this.bindFlatpickrInstance(),this.toggleDatePicker())}}}),V={ref:"dateRangePickerRef",class:"ds-dateRangePicker"},L={key:0,class:"ds-dateRangePicker__errorMessage"},F={ref:"flatpickrInputRef",class:"ds-dateRangePicker__hiddenInput"};function K(e,o,t,i,d,c){const n=y("date-box");return p(),D("div",V,[k(n,{"is-interactive":e.isInteractive,placeholder:e.placeholder,"start-date":e.startDate,"end-date":e.endDate,"start-icon":e.startIcon,"end-icon":e.endIcon,"are-icons-hidden-on-mobile":e.areIconsHiddenOnMobile,state:e.state,color:e.color,"is-open":e.isOpen,onClick:T(e.toggle,["stop","prevent"])},null,8,["is-interactive","placeholder","start-date","end-date","start-icon","end-icon","are-icons-hidden-on-mobile","state","color","is-open","onClick"]),e.errorMessage?(p(),D("span",L,O(e.errorMessage),1)):S("",!0),C("input",F,null,512)],512)}const Y=N(I,[["render",K],["__scopeId","data-v-5bd8acf4"]]);I.__docgenInfo={displayName:"DateRangePicker",exportName:"default",description:"",tags:{},props:[{name:"isInteractive",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"placeholder",type:{name:"string"},defaultValue:{func:!1,value:"'Wybierz datę'"}},{name:"startDate",type:{name:"date"},defaultValue:{func:!1,value:"null"}},{name:"endDate",type:{name:"date"},defaultValue:{func:!1,value:"null"}},{name:"startIcon",type:{name:"IconItem | null"},defaultValue:{func:!1,value:"ICONS.FA_CALENDAR_DAY"}},{name:"endIcon",type:{name:"IconItem | null"},defaultValue:{func:!1,value:"ICONS.FA_CALENDAR_DAY"}},{name:"areIconsHiddenOnMobile",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_WEAK"}},{name:"disableDates",type:{name:"Array<Date>"},defaultValue:{func:!0,value:"() => []"}},{name:"minDate",type:{name:"date"},defaultValue:{func:!1,value:"null"}},{name:"maxDate",type:{name:"date"},defaultValue:{func:!1,value:"null"}},{name:"updatePositionBasedOnScrollableSelector",type:{name:"string"},defaultValue:{func:!1,value:"''"}}],events:[{name:"update:date"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/DatePickers/DateRangePicker/DateRangePicker.vue"]};export{Y as D};
@@ -1 +0,0 @@
1
- import{F as v,b as y,a as C}from"./FeatureIcon-BDPyvlSM.js";import{I as d,b as g}from"./Icon-D0llnARZ.js";import{D as L,d as l,b as i,e as k,a as A,i as N}from"./Button-DHfR56t4.js";import{I as U}from"./IconButton-BJcODvDg.js";import{d as M,t as c,c as n,a as u,k as D,x as b,g as a,n as f,b as m,j as s,f as F,e as S,r as p,o as t,l as O}from"./vue.esm-bundler-DmkhfO_9.js";import{_ as R}from"./_plugin-vue_export-helper-DlAUqK2U.js";const E={SMALL:"small",MEDIUM:"medium"},I={SMALL:"small",MEDIUM:"medium"},B=M({name:"Modal",components:{FeatureIcon:v,WnlButton:L,WnlIconButton:U},props:{size:{type:String,default:E.MEDIUM,validator:e=>Object.values(E).includes(e)},danger:{type:Boolean,default:!1},headerTitleSize:{type:String,default:I.MEDIUM,validator:e=>Object.values(I).includes(e)},headerTitle:{type:String,default:null},headerSubtitle:{type:String,default:null},headerFeatureIcon:{type:Object,default:null,validator(e){return Object.values(d).includes(c(e))}},headerFeatureIconColor:{type:String,default:y.NEUTRAL,validator(e){return Object.values(y).includes(e)}},contentCentered:{type:Boolean,default:!1},headerImage:{type:String,default:null},footerPrimaryButtonText:{type:String,default:null},footerPrimaryButtonIcon:{type:Object,default:null,validator(e){return Object.values(d).includes(c(e))}},footerPrimaryButtonState:{type:String,default:l.DEFAULT,validator(e){return Object.values(l).includes(e)}},footerSecondaryButtonText:{type:String,default:null},footerSecondaryButtonIcon:{type:Object,default:null,validator(e){return Object.values(d).includes(c(e))}},footerSecondaryButtonState:{type:String,default:l.DEFAULT,validator(e){return Object.values(l).includes(e)}},footerTertiaryButtonText:{type:String,default:null},footerTertiaryButtonIcon:{type:Object,default:null,validator(e){return Object.values(d).includes(c(e))}},footerTertiaryButtonState:{type:String,default:l.DEFAULT,validator(e){return Object.values(l).includes(e)}},footerCheckboxText:{type:String,default:null}},emits:["tertiary-button-click","checkbox-change","close-modal","secondary-button-click","primary-button-click"],data(){return{BUTTON_COLORS:Object.freeze(i),BUTTON_ELEVATIONS:Object.freeze(k),BUTTON_TYPES:Object.freeze(A),ICONS:Object.freeze(d),ICON_BUTTON_COLORS:Object.freeze(N),ICON_SIZES:Object.freeze(g),MODAL_SIZES:Object.freeze(E),MODAL_HEADER_TITLE_SIZES:Object.freeze(I),FEATURE_ICON_SIZES:Object.freeze(C)}},computed:{calcHeaderFeatureIconColor(){return this.danger?y.DANGER:this.headerFeatureIconColor},calcFooterPrimaryButtonColor(){return this.danger?i.NEUTRAL:i.PRIMARY},calcFooterSecondaryButtonColor(){return this.danger?i.DANGER:i.NEUTRAL},calcSingleColumn(){return!((this.footerTertiaryButtonText||this.footerCheckboxText)&&(this.footerSecondaryButtonText||this.footerPrimaryButtonText))},displayFooter(){return this.footerTertiaryButtonText||this.footerCheckboxText||this.footerSecondaryButtonText||this.footerPrimaryButtonText}}}),j={class:"ds-modal__scrollableWrapper"},V=["src"],P={key:0,class:"ds-modal__header"},z={key:1,class:"ds-modal__headerSubtitle"},$={key:1,class:"ds-modal__slotContent"},Z={key:0,class:"ds-modal__footerCtaSecondary"},w={key:0,class:"ds-modal__checkbox"},H={for:"ds-modal__checkboxInput",class:"ds-modal__checkboxLabel"},Y={key:1,class:"ds-modal__footerCtaPrimary"};function W(e,o,X,G,K,q){const _=p("wnl-icon-button"),h=p("feature-icon"),T=p("wnl-button");return t(),n("div",{class:"ds-modal",onClick:o[5]||(o[5]=b(r=>e.$emit("close-modal"),["self"]))},[u("div",{class:f(["ds-modal__wrapper",{"-ds-small":e.size===e.MODAL_SIZES.SMALL}])},[D(_,{touchable:"",icon:e.ICONS.FA_XMARK,class:"ds-modal__close",size:e.ICON_SIZES.SMALL,elevation:e.BUTTON_ELEVATIONS.X_SMALL,color:e.ICON_BUTTON_COLORS.NEUTRAL_WEAK,onClick:o[0]||(o[0]=b(r=>e.$emit("close-modal"),["stop"]))},null,8,["icon","size","elevation","color"]),u("div",j,[e.headerImage?(t(),n("img",{key:0,class:"ds-modal__image",src:e.headerImage,alt:""},null,8,V)):a("",!0),u("div",{class:f(["ds-modal__content",{"-ds-centered":e.contentCentered}])},[e.headerTitle?(t(),n("div",P,[e.headerFeatureIcon?(t(),m(h,{key:0,class:"ds-modal__headerFeatureIcon",color:e.calcHeaderFeatureIconColor,icon:e.headerFeatureIcon,size:e.FEATURE_ICON_SIZES.X_LARGE,"double-background":""},null,8,["color","icon","size"])):a("",!0),u("h4",{class:f(["ds-modal__headerTitle",{"-ds-small":e.headerTitleSize===e.MODAL_HEADER_TITLE_SIZES.SMALL}])},s(e.headerTitle),3),e.headerSubtitle?(t(),n("h5",z,s(e.headerSubtitle),1)):a("",!0)])):a("",!0),e.$slots.default?(t(),n("div",$,[F(e.$slots,"default",{},void 0,!0)])):a("",!0),e.displayFooter?(t(),n("div",{key:2,class:f(["ds-modal__footer",{"-ds-singleColumn":e.calcSingleColumn}])},[e.footerTertiaryButtonText||e.footerCheckboxText?(t(),n("div",Z,[e.footerCheckboxText?(t(),n("div",w,[u("input",{id:"ds-modal__checkboxInput",type:"checkbox",checked:!1,onChange:o[1]||(o[1]=r=>e.$emit("checkbox-change",r.target.checked))},null,32),u("label",H,s(e.footerCheckboxText),1)])):a("",!0),e.footerTertiaryButtonText?(t(),m(T,{key:1,type:e.BUTTON_TYPES.TEXT,color:e.BUTTON_COLORS.NEUTRAL,"icon-left":e.footerTertiaryButtonIcon,state:e.footerTertiaryButtonState,class:"ds-modal__tertiaryButton",onClick:o[2]||(o[2]=r=>e.$emit("tertiary-button-click"))},{default:S(()=>[O(s(e.footerTertiaryButtonText),1)]),_:1},8,["type","color","icon-left","state"])):a("",!0)])):a("",!0),e.footerSecondaryButtonText||e.footerPrimaryButtonText?(t(),n("div",Y,[e.footerSecondaryButtonText?(t(),m(T,{key:0,type:e.BUTTON_TYPES.OUTLINED,color:e.calcFooterSecondaryButtonColor,"icon-right":e.footerSecondaryButtonIcon,state:e.footerSecondaryButtonState,onClick:o[3]||(o[3]=r=>e.$emit("secondary-button-click"))},{default:S(()=>[O(s(e.footerSecondaryButtonText),1)]),_:1},8,["type","color","icon-right","state"])):a("",!0),e.footerPrimaryButtonText?(t(),m(T,{key:1,color:e.calcFooterPrimaryButtonColor,"icon-right":e.footerPrimaryButtonIcon,state:e.footerPrimaryButtonState,onClick:o[4]||(o[4]=r=>e.$emit("primary-button-click"))},{default:S(()=>[O(s(e.footerPrimaryButtonText),1)]),_:1},8,["color","icon-right","state"])):a("",!0)])):a("",!0)],2)):a("",!0)],2)])],2)])}const ae=R(B,[["render",W],["__scopeId","data-v-c0ab99a5"]]);B.__docgenInfo={displayName:"Modal",exportName:"default",description:"",tags:{},props:[{name:"size",type:{name:"string"},defaultValue:{func:!1,value:"MODAL_SIZES.MEDIUM"}},{name:"danger",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"headerTitleSize",type:{name:"string"},defaultValue:{func:!1,value:"MODAL_HEADER_TITLE_SIZES.MEDIUM"}},{name:"headerTitle",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"headerSubtitle",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"headerFeatureIcon",type:{name:"object"},defaultValue:{func:!1,value:"null"}},{name:"headerFeatureIconColor",type:{name:"string"},defaultValue:{func:!1,value:"FEATURE_ICON_COLOR.NEUTRAL"}},{name:"contentCentered",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"headerImage",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"footerPrimaryButtonText",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"footerPrimaryButtonIcon",type:{name:"object"},defaultValue:{func:!1,value:"null"}},{name:"footerPrimaryButtonState",type:{name:"string"},defaultValue:{func:!1,value:"BUTTON_STATES.DEFAULT"}},{name:"footerSecondaryButtonText",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"footerSecondaryButtonIcon",type:{name:"object"},defaultValue:{func:!1,value:"null"}},{name:"footerSecondaryButtonState",type:{name:"string"},defaultValue:{func:!1,value:"BUTTON_STATES.DEFAULT"}},{name:"footerTertiaryButtonText",type:{name:"string"},defaultValue:{func:!1,value:"null"}},{name:"footerTertiaryButtonIcon",type:{name:"object"},defaultValue:{func:!1,value:"null"}},{name:"footerTertiaryButtonState",type:{name:"string"},defaultValue:{func:!1,value:"BUTTON_STATES.DEFAULT"}},{name:"footerCheckboxText",type:{name:"string"},defaultValue:{func:!1,value:"null"}}],events:[{name:"close-modal"},{name:"checkbox-change"},{name:"tertiary-button-click"},{name:"secondary-button-click"},{name:"primary-button-click"}],slots:[{name:"default"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/Modals/Modal/Modal.vue"]};export{ae as D,E as M,I as a};
@@ -1 +0,0 @@
1
- import{d as n,o as l,c as d,f as t,n as o}from"./vue.esm-bundler-DmkhfO_9.js";import{_ as r}from"./_plugin-vue_export-helper-DlAUqK2U.js";const s={SMALL:"small",MEDIUM:"medium"},a=n({name:"Well",props:{padding:{type:String,default:null,validator(e){return Object.values(s).includes(e)}}},data(){return{WELL_PADDINGS:Object.freeze(s)}}});function i(e,p,m,u,c,f){return l(),d("div",{class:o(["ds-well",{"-ds-medium":e.WELL_PADDINGS.MEDIUM===e.padding,"-ds-small":e.WELL_PADDINGS.SMALL===e.padding}])},[t(e.$slots,"default",{},void 0,!0)],2)}const g=r(a,[["render",i],["__scopeId","data-v-e3187d30"]]);a.__docgenInfo={displayName:"Well",exportName:"default",description:"",tags:{},props:[{name:"padding",type:{name:"string"},defaultValue:{func:!1,value:"null"}}],slots:[{name:"default"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/Well/Well.vue"]};export{g as W,s as a};
@@ -1,6 +0,0 @@
1
- import{W as t,a as n}from"./Well-Chn1RK_x.js";import"./vue.esm-bundler-DmkhfO_9.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const m={title:"Components/Well",component:t,render:r=>({components:{Well:t},setup(){return{args:r}},template:'<well v-bind="args"><div v-html="args.content" /></well>'}),argTypes:{padding:{control:"select",options:[null,...Object.values(n)]},content:{control:"text"}},parameters:{design:{type:"figma",url:"https://www.figma.com/file/oqNhXXGdc4ZnNQ6YNpkLEK/INI-152-Baza-v3---planowanie?node-id=1807-518161&t=sQ5nflpPY2YcPKNc-4"}}},e={args:{padding:null,content:'<h3 style="margin-top: 0">Content</h3>Voluptatem saepe suscipit optio et delectus esse sed velit. Autem maxime soluta aliquam perspiciatis quidem dolor saepe rerum.'}};var s,a,o;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`{
2
- args: {
3
- padding: null,
4
- content: '<h3 style="margin-top: 0">Content</h3>' + 'Voluptatem saepe suscipit optio et delectus esse sed velit. Autem maxime soluta aliquam perspiciatis quidem dolor saepe rerum.'
5
- } as Args
6
- }`,...(o=(a=e.parameters)==null?void 0:a.docs)==null?void 0:o.source}}};const c=["Interactive"];export{e as Interactive,c as __namedExportsOrder,m as default};
@@ -1 +0,0 @@
1
- import{a as h,I as y,b as I}from"./Icon-D0llnARZ.js";import{d as p,r as g,o as s,c as n,a as d,f as i,k as $,x as u,g as m,n as b}from"./vue.esm-bundler-DmkhfO_9.js";import{_ as c}from"./_plugin-vue_export-helper-DlAUqK2U.js";const f=p({name:"Modal",components:{WnlIcon:h},props:{showHeader:{type:Boolean,default:!0},animateScrollingContent:{type:Boolean,default:!1}},emits:["close-modal"],data(){return{ICONS:Object.freeze(y),ICON_SIZES:Object.freeze(I)}}}),C={key:0,class:"m-modal__header"},N={key:1,class:"m-modal__footer"};function w(e,a,o,l,t,S){const r=g("wnl-icon");return s(),n("div",{class:"m-modal",onClick:a[2]||(a[2]=u(_=>e.$emit("close-modal"),["stop"]))},[d("div",{class:"m-modal__contentWrapper",onClick:a[1]||(a[1]=u(()=>{},["stop"]))},[e.showHeader?(s(),n("div",C,[i(e.$slots,"header",{},void 0,!0),$(r,{touchable:"",icon:e.ICONS.FA_XMARK,class:"m-modal__header__close",size:e.ICON_SIZES.SMALL,onClick:a[0]||(a[0]=u(_=>e.$emit("close-modal"),["stop"]))},null,8,["icon","size"])])):m("",!0),d("div",{class:b(["m-modal__content",{"scrollable-main-container":e.animateScrollingContent}])},[i(e.$slots,"default",{},void 0,!0)],2),a[3]||(a[3]=d("div",{class:"m-modal__content__shadow"},null,-1)),e.$slots.footer?(s(),n("div",N,[i(e.$slots,"footer",{},void 0,!0)])):m("",!0)])])}const A=c(f,[["render",w],["__scopeId","data-v-b165f419"]]);f.__docgenInfo={displayName:"Modal",exportName:"default",description:"",tags:{},props:[{name:"showHeader",type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"animateScrollingContent",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"close-modal"}],slots:[{name:"header"},{name:"default"},{name:"footer"}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/Modal/Modal.vue"]};const V={DEFAULT:"default",DISABLED:"disabled"},Q={ONE:"one",TWO:"two"},v=p({name:"SurveyQuestionTextarea",props:{value:{type:String,required:!0},placeholder:{type:String,default:"Wpisz swoją odpowiedź"},disabled:{type:Boolean,default:!1}},emits:["input"],watch:{value(){this.$refs.textarea.style.height="auto",this.$refs.textarea.style.height=this.$refs.textarea.scrollHeight+"px"}},methods:{onInput(e){this.$emit("input",e.target.value)}}}),E=["disabled","placeholder","value"];function O(e,a,o,l,t,S){return s(),n("textarea",{ref:"textarea",class:"ds-surveyQuestionTextarea",disabled:e.disabled,placeholder:e.placeholder,value:e.value,onInput:a[0]||(a[0]=(...r)=>e.onInput&&e.onInput(...r))},null,40,E)}const z=c(v,[["render",O],["__scopeId","data-v-a0f836ab"]]);v.__docgenInfo={displayName:"SurveyQuestionTextarea",exportName:"default",description:"",tags:{},props:[{name:"value",type:{name:"string"},required:!0},{name:"placeholder",type:{name:"string"},defaultValue:{func:!1,value:"'Wpisz swoją odpowiedź'"}},{name:"disabled",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}}],events:[{name:"input",type:{names:["undefined"]}}],sourceFiles:["/home/runner/work/design-system/design-system/lib/js/components/SurveyQuestions/SurveyQuestionTextarea.vue"]};const B=e=>{for(var a="",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",l=o.length,t=0;t<e;t++)a+=o.charAt(Math.floor(Math.random()*l));return a};export{A as M,V as S,Q as a,z as b,B as r};