bitboss-ui 0.2.32 → 0.2.33
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/components/BaseButton/BaseButton.vue.d.ts +2 -2
- package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +7 -7
- package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +1 -1
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +2 -2
- package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +7 -7
- package/dist/components/BaseRating/BaseRating.vue.d.ts +1 -1
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +20 -13
- package/dist/components/BaseSlider/BaseSlider.vue.d.ts +2 -2
- package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +6 -6
- package/dist/components/BaseTag/BaseTag.vue.d.ts +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
- package/dist/components/BbAlert/BbAlert.vue.d.ts +1 -1
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -1
- package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +1 -1
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +7 -7
- package/dist/components/BbChip/BbChip.vue.d.ts +1 -1
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -1
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +2 -2
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbIcon/BbIcon.vue.d.ts +1 -1
- package/dist/components/BbIntersection/BbIntersection.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +2 -2
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +7 -7
- package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
- package/dist/components/BbRatio/BbRatio.vue.d.ts +1 -1
- package/dist/components/BbSelect/BbSelect.vue.d.ts +20 -13
- package/dist/components/BbSlider/BbSlider.vue.d.ts +2 -2
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +3 -3
- package/dist/components/BbSpinner/BbSpinner.vue.d.ts +1 -1
- package/dist/components/BbStep/BbStep.vue.d.ts +143 -0
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +6 -6
- package/dist/components/BbTab/BbTab.vue.d.ts +6 -6
- package/dist/components/BbTable/BbTable.vue.d.ts +1 -1
- package/dist/components/BbTable/types.d.ts +1 -1
- package/dist/components/BbTag/BbTag.vue.d.ts +1 -1
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +2 -2
- package/dist/components/HDAddressSelect.vue.d.ts +89 -0
- package/dist/composables/useConfirm.d.ts +1 -1
- package/dist/composables/useOptions.d.ts +1 -1
- package/dist/composables/useToast.d.ts +1 -1
- package/dist/composables/useWizard.d.ts +32 -20
- package/package.json +1 -1
- package/dist/index.js +0 -188
- package/dist/index.js.map +0 -1
- package/dist/index10.js +0 -5
- package/dist/index10.js.map +0 -1
- package/dist/index100.js +0 -5
- package/dist/index100.js.map +0 -1
- package/dist/index101.js +0 -438
- package/dist/index101.js.map +0 -1
- package/dist/index102.js +0 -5
- package/dist/index102.js.map +0 -1
- package/dist/index103.js +0 -95
- package/dist/index103.js.map +0 -1
- package/dist/index104.js +0 -5
- package/dist/index104.js.map +0 -1
- package/dist/index105.js +0 -89
- package/dist/index105.js.map +0 -1
- package/dist/index106.js +0 -5
- package/dist/index106.js.map +0 -1
- package/dist/index107.js +0 -90
- package/dist/index107.js.map +0 -1
- package/dist/index108.js +0 -5
- package/dist/index108.js.map +0 -1
- package/dist/index109.js +0 -30
- package/dist/index109.js.map +0 -1
- package/dist/index11.js +0 -132
- package/dist/index11.js.map +0 -1
- package/dist/index110.js +0 -5
- package/dist/index110.js.map +0 -1
- package/dist/index111.js +0 -152
- package/dist/index111.js.map +0 -1
- package/dist/index112.js +0 -5
- package/dist/index112.js.map +0 -1
- package/dist/index113.js +0 -123
- package/dist/index113.js.map +0 -1
- package/dist/index114.js +0 -5
- package/dist/index114.js.map +0 -1
- package/dist/index115.js +0 -47
- package/dist/index115.js.map +0 -1
- package/dist/index116.js +0 -41
- package/dist/index116.js.map +0 -1
- package/dist/index117.js +0 -47
- package/dist/index117.js.map +0 -1
- package/dist/index118.js +0 -50
- package/dist/index118.js.map +0 -1
- package/dist/index119.js +0 -46
- package/dist/index119.js.map +0 -1
- package/dist/index12.js +0 -5
- package/dist/index12.js.map +0 -1
- package/dist/index120.js +0 -5
- package/dist/index120.js.map +0 -1
- package/dist/index121.js +0 -24
- package/dist/index121.js.map +0 -1
- package/dist/index122.js +0 -5
- package/dist/index122.js.map +0 -1
- package/dist/index123.js +0 -227
- package/dist/index123.js.map +0 -1
- package/dist/index124.js +0 -5
- package/dist/index124.js.map +0 -1
- package/dist/index125.js +0 -21
- package/dist/index125.js.map +0 -1
- package/dist/index126.js +0 -15
- package/dist/index126.js.map +0 -1
- package/dist/index127.js +0 -27
- package/dist/index127.js.map +0 -1
- package/dist/index128.js +0 -8
- package/dist/index128.js.map +0 -1
- package/dist/index129.js +0 -12
- package/dist/index129.js.map +0 -1
- package/dist/index13.js +0 -152
- package/dist/index13.js.map +0 -1
- package/dist/index130.js +0 -9
- package/dist/index130.js.map +0 -1
- package/dist/index131.js +0 -73
- package/dist/index131.js.map +0 -1
- package/dist/index132.js +0 -6
- package/dist/index132.js.map +0 -1
- package/dist/index133.js +0 -6
- package/dist/index133.js.map +0 -1
- package/dist/index134.js +0 -6
- package/dist/index134.js.map +0 -1
- package/dist/index135.js +0 -6
- package/dist/index135.js.map +0 -1
- package/dist/index136.js +0 -6
- package/dist/index136.js.map +0 -1
- package/dist/index137.js +0 -6
- package/dist/index137.js.map +0 -1
- package/dist/index138.js +0 -6
- package/dist/index138.js.map +0 -1
- package/dist/index139.js +0 -6
- package/dist/index139.js.map +0 -1
- package/dist/index14.js +0 -5
- package/dist/index14.js.map +0 -1
- package/dist/index140.js +0 -6
- package/dist/index140.js.map +0 -1
- package/dist/index141.js +0 -6
- package/dist/index141.js.map +0 -1
- package/dist/index142.js +0 -6
- package/dist/index142.js.map +0 -1
- package/dist/index143.js +0 -6
- package/dist/index143.js.map +0 -1
- package/dist/index144.js +0 -6
- package/dist/index144.js.map +0 -1
- package/dist/index145.js +0 -6
- package/dist/index145.js.map +0 -1
- package/dist/index146.js +0 -6
- package/dist/index146.js.map +0 -1
- package/dist/index147.js +0 -6
- package/dist/index147.js.map +0 -1
- package/dist/index148.js +0 -6
- package/dist/index148.js.map +0 -1
- package/dist/index149.js +0 -6
- package/dist/index149.js.map +0 -1
- package/dist/index15.js +0 -458
- package/dist/index15.js.map +0 -1
- package/dist/index150.js +0 -6
- package/dist/index150.js.map +0 -1
- package/dist/index151.js +0 -6
- package/dist/index151.js.map +0 -1
- package/dist/index152.js +0 -6
- package/dist/index152.js.map +0 -1
- package/dist/index153.js +0 -6
- package/dist/index153.js.map +0 -1
- package/dist/index154.js +0 -6
- package/dist/index154.js.map +0 -1
- package/dist/index155.js +0 -6
- package/dist/index155.js.map +0 -1
- package/dist/index156.js +0 -6
- package/dist/index156.js.map +0 -1
- package/dist/index157.js +0 -6
- package/dist/index157.js.map +0 -1
- package/dist/index158.js +0 -5
- package/dist/index158.js.map +0 -1
- package/dist/index159.js +0 -6
- package/dist/index159.js.map +0 -1
- package/dist/index16.js +0 -5
- package/dist/index16.js.map +0 -1
- package/dist/index160.js +0 -5
- package/dist/index160.js.map +0 -1
- package/dist/index161.js +0 -6
- package/dist/index161.js.map +0 -1
- package/dist/index162.js +0 -6
- package/dist/index162.js.map +0 -1
- package/dist/index163.js +0 -6
- package/dist/index163.js.map +0 -1
- package/dist/index164.js +0 -6
- package/dist/index164.js.map +0 -1
- package/dist/index165.js +0 -6
- package/dist/index165.js.map +0 -1
- package/dist/index166.js +0 -6
- package/dist/index166.js.map +0 -1
- package/dist/index167.js +0 -5
- package/dist/index167.js.map +0 -1
- package/dist/index168.js +0 -6
- package/dist/index168.js.map +0 -1
- package/dist/index169.js +0 -5
- package/dist/index169.js.map +0 -1
- package/dist/index17.js +0 -212
- package/dist/index17.js.map +0 -1
- package/dist/index170.js +0 -5
- package/dist/index170.js.map +0 -1
- package/dist/index171.js +0 -6
- package/dist/index171.js.map +0 -1
- package/dist/index172.js +0 -6
- package/dist/index172.js.map +0 -1
- package/dist/index173.js +0 -6
- package/dist/index173.js.map +0 -1
- package/dist/index174.js +0 -6
- package/dist/index174.js.map +0 -1
- package/dist/index175.js +0 -6
- package/dist/index175.js.map +0 -1
- package/dist/index176.js +0 -6
- package/dist/index176.js.map +0 -1
- package/dist/index177.js +0 -6
- package/dist/index177.js.map +0 -1
- package/dist/index178.js +0 -6
- package/dist/index178.js.map +0 -1
- package/dist/index179.js +0 -6
- package/dist/index179.js.map +0 -1
- package/dist/index18.js +0 -5
- package/dist/index18.js.map +0 -1
- package/dist/index180.js +0 -6
- package/dist/index180.js.map +0 -1
- package/dist/index181.js +0 -6
- package/dist/index181.js.map +0 -1
- package/dist/index182.js +0 -6
- package/dist/index182.js.map +0 -1
- package/dist/index183.js +0 -5
- package/dist/index183.js.map +0 -1
- package/dist/index184.js +0 -6
- package/dist/index184.js.map +0 -1
- package/dist/index185.js +0 -5
- package/dist/index185.js.map +0 -1
- package/dist/index186.js +0 -6
- package/dist/index186.js.map +0 -1
- package/dist/index187.js +0 -6
- package/dist/index187.js.map +0 -1
- package/dist/index188.js +0 -6
- package/dist/index188.js.map +0 -1
- package/dist/index189.js +0 -6
- package/dist/index189.js.map +0 -1
- package/dist/index19.js +0 -240
- package/dist/index19.js.map +0 -1
- package/dist/index190.js +0 -6
- package/dist/index190.js.map +0 -1
- package/dist/index191.js +0 -6
- package/dist/index191.js.map +0 -1
- package/dist/index192.js +0 -6
- package/dist/index192.js.map +0 -1
- package/dist/index193.js +0 -6
- package/dist/index193.js.map +0 -1
- package/dist/index194.js +0 -6
- package/dist/index194.js.map +0 -1
- package/dist/index195.js +0 -6
- package/dist/index195.js.map +0 -1
- package/dist/index196.js +0 -5
- package/dist/index196.js.map +0 -1
- package/dist/index197.js +0 -5
- package/dist/index197.js.map +0 -1
- package/dist/index198.js +0 -7
- package/dist/index198.js.map +0 -1
- package/dist/index199.js +0 -298
- package/dist/index199.js.map +0 -1
- package/dist/index2.js +0 -43
- package/dist/index2.js.map +0 -1
- package/dist/index20.js +0 -5
- package/dist/index20.js.map +0 -1
- package/dist/index200.js +0 -19
- package/dist/index200.js.map +0 -1
- package/dist/index201.js +0 -19
- package/dist/index201.js.map +0 -1
- package/dist/index202.js +0 -22
- package/dist/index202.js.map +0 -1
- package/dist/index203.js +0 -23
- package/dist/index203.js.map +0 -1
- package/dist/index204.js +0 -32
- package/dist/index204.js.map +0 -1
- package/dist/index205.js +0 -11
- package/dist/index205.js.map +0 -1
- package/dist/index206.js +0 -5
- package/dist/index206.js.map +0 -1
- package/dist/index207.js +0 -238
- package/dist/index207.js.map +0 -1
- package/dist/index208.js +0 -6
- package/dist/index208.js.map +0 -1
- package/dist/index209.js +0 -38
- package/dist/index209.js.map +0 -1
- package/dist/index21.js +0 -116
- package/dist/index21.js.map +0 -1
- package/dist/index210.js +0 -9
- package/dist/index210.js.map +0 -1
- package/dist/index211.js +0 -13
- package/dist/index211.js.map +0 -1
- package/dist/index212.js +0 -381
- package/dist/index212.js.map +0 -1
- package/dist/index213.js +0 -137
- package/dist/index213.js.map +0 -1
- package/dist/index214.js +0 -5
- package/dist/index214.js.map +0 -1
- package/dist/index215.js +0 -177
- package/dist/index215.js.map +0 -1
- package/dist/index216.js +0 -26
- package/dist/index216.js.map +0 -1
- package/dist/index217.js +0 -376
- package/dist/index217.js.map +0 -1
- package/dist/index218.js +0 -6
- package/dist/index218.js.map +0 -1
- package/dist/index219.js +0 -6
- package/dist/index219.js.map +0 -1
- package/dist/index22.js +0 -5
- package/dist/index22.js.map +0 -1
- package/dist/index220.js +0 -5
- package/dist/index220.js.map +0 -1
- package/dist/index221.js +0 -31
- package/dist/index221.js.map +0 -1
- package/dist/index222.js +0 -20
- package/dist/index222.js.map +0 -1
- package/dist/index223.js +0 -5
- package/dist/index223.js.map +0 -1
- package/dist/index224.js +0 -12
- package/dist/index224.js.map +0 -1
- package/dist/index225.js +0 -124
- package/dist/index225.js.map +0 -1
- package/dist/index226.js +0 -82
- package/dist/index226.js.map +0 -1
- package/dist/index227.js +0 -7
- package/dist/index227.js.map +0 -1
- package/dist/index228.js +0 -5
- package/dist/index228.js.map +0 -1
- package/dist/index229.js +0 -9
- package/dist/index229.js.map +0 -1
- package/dist/index23.js +0 -116
- package/dist/index23.js.map +0 -1
- package/dist/index230.js +0 -5
- package/dist/index230.js.map +0 -1
- package/dist/index231.js +0 -5
- package/dist/index231.js.map +0 -1
- package/dist/index232.js +0 -5
- package/dist/index232.js.map +0 -1
- package/dist/index233.js +0 -5
- package/dist/index233.js.map +0 -1
- package/dist/index234.js +0 -5
- package/dist/index234.js.map +0 -1
- package/dist/index235.js +0 -5
- package/dist/index235.js.map +0 -1
- package/dist/index236.js +0 -438
- package/dist/index236.js.map +0 -1
- package/dist/index237.js +0 -92
- package/dist/index237.js.map +0 -1
- package/dist/index238.js +0 -203
- package/dist/index238.js.map +0 -1
- package/dist/index239.js +0 -227
- package/dist/index239.js.map +0 -1
- package/dist/index24.js +0 -5
- package/dist/index24.js.map +0 -1
- package/dist/index240.js +0 -261
- package/dist/index240.js.map +0 -1
- package/dist/index241.js +0 -5
- package/dist/index241.js.map +0 -1
- package/dist/index242.js +0 -120
- package/dist/index242.js.map +0 -1
- package/dist/index243.js +0 -109
- package/dist/index243.js.map +0 -1
- package/dist/index244.js +0 -163
- package/dist/index244.js.map +0 -1
- package/dist/index245.js +0 -5
- package/dist/index245.js.map +0 -1
- package/dist/index246.js +0 -72
- package/dist/index246.js.map +0 -1
- package/dist/index247.js +0 -8
- package/dist/index247.js.map +0 -1
- package/dist/index248.js +0 -5
- package/dist/index248.js.map +0 -1
- package/dist/index249.js +0 -41
- package/dist/index249.js.map +0 -1
- package/dist/index25.js +0 -93
- package/dist/index25.js.map +0 -1
- package/dist/index250.js +0 -5
- package/dist/index250.js.map +0 -1
- package/dist/index251.js +0 -5
- package/dist/index251.js.map +0 -1
- package/dist/index252.js +0 -18
- package/dist/index252.js.map +0 -1
- package/dist/index253.js +0 -6
- package/dist/index253.js.map +0 -1
- package/dist/index254.js +0 -5
- package/dist/index254.js.map +0 -1
- package/dist/index255.js +0 -5
- package/dist/index255.js.map +0 -1
- package/dist/index26.js +0 -5
- package/dist/index26.js.map +0 -1
- package/dist/index27.js +0 -150
- package/dist/index27.js.map +0 -1
- package/dist/index28.js +0 -5
- package/dist/index28.js.map +0 -1
- package/dist/index29.js +0 -125
- package/dist/index29.js.map +0 -1
- package/dist/index3.js +0 -81
- package/dist/index3.js.map +0 -1
- package/dist/index30.js +0 -5
- package/dist/index30.js.map +0 -1
- package/dist/index31.js +0 -692
- package/dist/index31.js.map +0 -1
- package/dist/index32.js +0 -5
- package/dist/index32.js.map +0 -1
- package/dist/index33.js +0 -146
- package/dist/index33.js.map +0 -1
- package/dist/index34.js +0 -5
- package/dist/index34.js.map +0 -1
- package/dist/index35.js +0 -119
- package/dist/index35.js.map +0 -1
- package/dist/index36.js +0 -5
- package/dist/index36.js.map +0 -1
- package/dist/index37.js +0 -155
- package/dist/index37.js.map +0 -1
- package/dist/index38.js +0 -5
- package/dist/index38.js.map +0 -1
- package/dist/index39.js +0 -84
- package/dist/index39.js.map +0 -1
- package/dist/index4.js +0 -65
- package/dist/index4.js.map +0 -1
- package/dist/index40.js +0 -5
- package/dist/index40.js.map +0 -1
- package/dist/index41.js +0 -62
- package/dist/index41.js.map +0 -1
- package/dist/index42.js +0 -5
- package/dist/index42.js.map +0 -1
- package/dist/index43.js +0 -66
- package/dist/index43.js.map +0 -1
- package/dist/index44.js +0 -5
- package/dist/index44.js.map +0 -1
- package/dist/index45.js +0 -97
- package/dist/index45.js.map +0 -1
- package/dist/index46.js +0 -5
- package/dist/index46.js.map +0 -1
- package/dist/index47.js +0 -62
- package/dist/index47.js.map +0 -1
- package/dist/index48.js +0 -5
- package/dist/index48.js.map +0 -1
- package/dist/index49.js +0 -50
- package/dist/index49.js.map +0 -1
- package/dist/index5.js +0 -43
- package/dist/index5.js.map +0 -1
- package/dist/index50.js +0 -5
- package/dist/index50.js.map +0 -1
- package/dist/index51.js +0 -63
- package/dist/index51.js.map +0 -1
- package/dist/index52.js +0 -5
- package/dist/index52.js.map +0 -1
- package/dist/index53.js +0 -46
- package/dist/index53.js.map +0 -1
- package/dist/index54.js +0 -5
- package/dist/index54.js.map +0 -1
- package/dist/index55.js +0 -90
- package/dist/index55.js.map +0 -1
- package/dist/index56.js +0 -5
- package/dist/index56.js.map +0 -1
- package/dist/index57.js +0 -121
- package/dist/index57.js.map +0 -1
- package/dist/index58.js +0 -5
- package/dist/index58.js.map +0 -1
- package/dist/index59.js +0 -86
- package/dist/index59.js.map +0 -1
- package/dist/index6.js +0 -177
- package/dist/index6.js.map +0 -1
- package/dist/index60.js +0 -5
- package/dist/index60.js.map +0 -1
- package/dist/index61.js +0 -89
- package/dist/index61.js.map +0 -1
- package/dist/index62.js +0 -5
- package/dist/index62.js.map +0 -1
- package/dist/index63.js +0 -60
- package/dist/index63.js.map +0 -1
- package/dist/index64.js +0 -5
- package/dist/index64.js.map +0 -1
- package/dist/index65.js +0 -314
- package/dist/index65.js.map +0 -1
- package/dist/index66.js +0 -5
- package/dist/index66.js.map +0 -1
- package/dist/index67.js +0 -130
- package/dist/index67.js.map +0 -1
- package/dist/index68.js +0 -5
- package/dist/index68.js.map +0 -1
- package/dist/index69.js +0 -226
- package/dist/index69.js.map +0 -1
- package/dist/index7.js +0 -22
- package/dist/index7.js.map +0 -1
- package/dist/index70.js +0 -5
- package/dist/index70.js.map +0 -1
- package/dist/index71.js +0 -25
- package/dist/index71.js.map +0 -1
- package/dist/index72.js +0 -47
- package/dist/index72.js.map +0 -1
- package/dist/index73.js +0 -96
- package/dist/index73.js.map +0 -1
- package/dist/index74.js +0 -5
- package/dist/index74.js.map +0 -1
- package/dist/index75.js +0 -228
- package/dist/index75.js.map +0 -1
- package/dist/index76.js +0 -5
- package/dist/index76.js.map +0 -1
- package/dist/index77.js +0 -142
- package/dist/index77.js.map +0 -1
- package/dist/index78.js +0 -5
- package/dist/index78.js.map +0 -1
- package/dist/index79.js +0 -214
- package/dist/index79.js.map +0 -1
- package/dist/index8.js +0 -197
- package/dist/index8.js.map +0 -1
- package/dist/index80.js +0 -5
- package/dist/index80.js.map +0 -1
- package/dist/index81.js +0 -36
- package/dist/index81.js.map +0 -1
- package/dist/index82.js +0 -5
- package/dist/index82.js.map +0 -1
- package/dist/index83.js +0 -84
- package/dist/index83.js.map +0 -1
- package/dist/index84.js +0 -5
- package/dist/index84.js.map +0 -1
- package/dist/index85.js +0 -121
- package/dist/index85.js.map +0 -1
- package/dist/index86.js +0 -5
- package/dist/index86.js.map +0 -1
- package/dist/index87.js +0 -84
- package/dist/index87.js.map +0 -1
- package/dist/index88.js +0 -5
- package/dist/index88.js.map +0 -1
- package/dist/index89.js +0 -31
- package/dist/index89.js.map +0 -1
- package/dist/index9.js +0 -66
- package/dist/index9.js.map +0 -1
- package/dist/index90.js +0 -5
- package/dist/index90.js.map +0 -1
- package/dist/index91.js +0 -158
- package/dist/index91.js.map +0 -1
- package/dist/index92.js +0 -5
- package/dist/index92.js.map +0 -1
- package/dist/index93.js +0 -87
- package/dist/index93.js.map +0 -1
- package/dist/index94.js +0 -5
- package/dist/index94.js.map +0 -1
- package/dist/index95.js +0 -90
- package/dist/index95.js.map +0 -1
- package/dist/index96.js +0 -5
- package/dist/index96.js.map +0 -1
- package/dist/index97.js +0 -120
- package/dist/index97.js.map +0 -1
- package/dist/index98.js +0 -5
- package/dist/index98.js.map +0 -1
- package/dist/index99.js +0 -209
- package/dist/index99.js.map +0 -1
- package/dist/style.css +0 -1
package/dist/index79.js
DELETED
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import { defineComponent as V, ref as a, computed as _, openBlock as p, createElementBlock as h, mergeProps as B, createElementVNode as d, renderSlot as P, normalizeProps as I, guardReactiveProps as R, unref as g, createBlock as D, Teleport as U, normalizeClass as W, normalizeStyle as j, createCommentVNode as y, withCtx as G, nextTick as J } from "vue";
|
|
2
|
-
import { useFloating as K, arrow as Q } from "./index225.js";
|
|
3
|
-
import { useFocusTrap as X } from "./index209.js";
|
|
4
|
-
import { useId as Y } from "./index7.js";
|
|
5
|
-
import { wait as E } from "./index122.js";
|
|
6
|
-
import Z from "./index9.js";
|
|
7
|
-
import "./index10.js";
|
|
8
|
-
import { autoUpdate as ee, flip as oe, shift as te } from "./index212.js";
|
|
9
|
-
import { offset as ae } from "./index217.js";
|
|
10
|
-
const re = ["id"], ne = {
|
|
11
|
-
key: 1,
|
|
12
|
-
class: "bb-popover__bubble"
|
|
13
|
-
}, se = /* @__PURE__ */ d("span", { class: "bb-popover__close-label" }, "Chiudi", -1), le = /* @__PURE__ */ d("svg", {
|
|
14
|
-
fill: "none",
|
|
15
|
-
viewBox: "0 0 24 24",
|
|
16
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
17
|
-
}, [
|
|
18
|
-
/* @__PURE__ */ d("path", {
|
|
19
|
-
d: "M23 23L1 1M23 1L1 23",
|
|
20
|
-
stroke: "currentColor",
|
|
21
|
-
"stroke-linecap": "round",
|
|
22
|
-
"stroke-width": "2"
|
|
23
|
-
})
|
|
24
|
-
], -1), we = /* @__PURE__ */ V({
|
|
25
|
-
__name: "BbPopover",
|
|
26
|
-
props: {
|
|
27
|
-
arrowPadding: { default: 10 },
|
|
28
|
-
block: { type: Boolean },
|
|
29
|
-
disabled: { type: Boolean },
|
|
30
|
-
eager: { type: Boolean },
|
|
31
|
-
offset: { default: 3 },
|
|
32
|
-
padding: { default: 10 },
|
|
33
|
-
placement: { default: "bottom" },
|
|
34
|
-
showClose: { type: Boolean, default: !0 },
|
|
35
|
-
theme: { default: "default" },
|
|
36
|
-
transitionDuration: { default: 150 },
|
|
37
|
-
focusTarget: {},
|
|
38
|
-
width: {}
|
|
39
|
-
},
|
|
40
|
-
emits: ["shown", "hidden"],
|
|
41
|
-
setup(M, { emit: N }) {
|
|
42
|
-
const o = M, i = N, { id: S } = Y(), b = `bbp_${S.value}`, s = a(), u = a(), k = a(), { activate: L, deactivate: O } = X(u, {
|
|
43
|
-
/**
|
|
44
|
-
* This traps all clicks outside so we are pressing
|
|
45
|
-
* the trigger we just allow and process that in its
|
|
46
|
-
* own click handler.
|
|
47
|
-
* If we are pressing anything random on the page
|
|
48
|
-
* close the popover and be done
|
|
49
|
-
*/
|
|
50
|
-
clickOutsideDeactivates: (e) => {
|
|
51
|
-
var T;
|
|
52
|
-
const t = e.target;
|
|
53
|
-
return t instanceof HTMLElement && (T = s.value) != null && T.contains(t) || (f(), i("hidden")), !0;
|
|
54
|
-
},
|
|
55
|
-
escapeDeactivates: () => (J(async () => {
|
|
56
|
-
await f(), w(), i("hidden");
|
|
57
|
-
}), !0),
|
|
58
|
-
/* We don't return focus so that when
|
|
59
|
-
* we press a button on tyhe page we can focus
|
|
60
|
-
* THAT button and not the current trigger
|
|
61
|
-
*/
|
|
62
|
-
returnFocusOnDeactivate: !1
|
|
63
|
-
}), { floatingStyles: z, placement: v, middlewareData: $ } = K(
|
|
64
|
-
s,
|
|
65
|
-
u,
|
|
66
|
-
{
|
|
67
|
-
placement: o.placement,
|
|
68
|
-
whileElementsMounted: ee,
|
|
69
|
-
middleware: [
|
|
70
|
-
oe(),
|
|
71
|
-
ae(o.offset),
|
|
72
|
-
te({ padding: o.padding }),
|
|
73
|
-
Q({
|
|
74
|
-
element: k,
|
|
75
|
-
padding: o.arrowPadding
|
|
76
|
-
})
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
), F = _(() => ({
|
|
80
|
-
class: {
|
|
81
|
-
"bb-popover--block": o.block,
|
|
82
|
-
[`bb-popover--theme-${o.theme}`]: o.theme
|
|
83
|
-
}
|
|
84
|
-
})), r = a(!1), n = a(!1), l = a(!1), c = a(!0), H = _(() => {
|
|
85
|
-
if ($.value.arrow) {
|
|
86
|
-
const { x: e, y: t } = $.value.arrow;
|
|
87
|
-
return {
|
|
88
|
-
style: {
|
|
89
|
-
left: `${e}px`,
|
|
90
|
-
top: `${t}px`
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
}), q = _(() => {
|
|
95
|
-
const e = {
|
|
96
|
-
...z.value,
|
|
97
|
-
transitionDuration: `${o.transitionDuration}ms`
|
|
98
|
-
};
|
|
99
|
-
if (o.width) {
|
|
100
|
-
let t;
|
|
101
|
-
if (typeof o.width == "string" && Number.isNaN(Number(o.width)))
|
|
102
|
-
if (o.width.includes("%")) {
|
|
103
|
-
if (!s.value)
|
|
104
|
-
return;
|
|
105
|
-
t = `${s.value.clientWidth * (+o.width.replace("%", "") / 100)}px`;
|
|
106
|
-
} else
|
|
107
|
-
t = o.width;
|
|
108
|
-
else
|
|
109
|
-
t = `${o.width}px`;
|
|
110
|
-
e.width = t;
|
|
111
|
-
}
|
|
112
|
-
return e;
|
|
113
|
-
}), x = async () => {
|
|
114
|
-
c.value = !1, l.value = !1, r.value = !0, await E(50), n.value = !0, r.value = !1;
|
|
115
|
-
}, f = async () => {
|
|
116
|
-
n.value = !1, r.value = !1, l.value = !0, await E(o.transitionDuration), l.value = !1, c.value = !0;
|
|
117
|
-
}, m = a(!1), A = async () => {
|
|
118
|
-
if (n.value) {
|
|
119
|
-
await f(), w(), i("hidden");
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
if (r.value || o.disabled)
|
|
123
|
-
return;
|
|
124
|
-
m.value = !0, await x();
|
|
125
|
-
let e = o.focusTarget ?? ".bb-popover__close";
|
|
126
|
-
L({
|
|
127
|
-
onPostActivate: () => {
|
|
128
|
-
if (u.value) {
|
|
129
|
-
const t = u.value.querySelector(e);
|
|
130
|
-
t instanceof HTMLElement && (t.focus(), i("shown"));
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
}, w = () => {
|
|
135
|
-
var t;
|
|
136
|
-
const e = (t = s.value) == null ? void 0 : t.querySelector(`[aria-controls=popover_${b}]`);
|
|
137
|
-
e instanceof HTMLElement && e.focus();
|
|
138
|
-
}, C = async () => {
|
|
139
|
-
O(), await f(), w(), i("hidden");
|
|
140
|
-
};
|
|
141
|
-
return (e, t) => (p(), h("span", B({ class: "bb-popover" }, F.value), [
|
|
142
|
-
d("span", {
|
|
143
|
-
ref_key: "wrapper",
|
|
144
|
-
ref: s,
|
|
145
|
-
class: "bb-popover__wrapper"
|
|
146
|
-
}, [
|
|
147
|
-
P(e.$slots, "activator", I(R({
|
|
148
|
-
props: {
|
|
149
|
-
"aria-controls": `popover_${b}`,
|
|
150
|
-
"aria-expanded": n.value,
|
|
151
|
-
onClick: A,
|
|
152
|
-
id: b,
|
|
153
|
-
disabled: !!e.disabled
|
|
154
|
-
},
|
|
155
|
-
closed: c.value,
|
|
156
|
-
closing: l.value,
|
|
157
|
-
disabled: !!e.disabled,
|
|
158
|
-
open: n.value,
|
|
159
|
-
opening: r.value,
|
|
160
|
-
placement: g(v)
|
|
161
|
-
})))
|
|
162
|
-
], 512),
|
|
163
|
-
(p(), D(U, { to: "body" }, [
|
|
164
|
-
d("span", {
|
|
165
|
-
id: `popover_${b}`,
|
|
166
|
-
ref_key: "content",
|
|
167
|
-
ref: u,
|
|
168
|
-
class: W(["bb-popover__bubble-container", {
|
|
169
|
-
[`bb-popover__bubble-container--${g(v)}`]: !0,
|
|
170
|
-
[`bb-popover__bubble-container--${e.theme}`]: e.theme,
|
|
171
|
-
"bb-popover__bubble-container--hidden": c.value,
|
|
172
|
-
"bb-popover__bubble-container--closing": l.value,
|
|
173
|
-
"bb-popover__bubble-container--opening": r.value,
|
|
174
|
-
"bb-popover__bubble-container--open": n.value
|
|
175
|
-
}]),
|
|
176
|
-
style: j(q.value)
|
|
177
|
-
}, [
|
|
178
|
-
m.value || e.eager ? (p(), h("span", B({
|
|
179
|
-
key: 0,
|
|
180
|
-
ref_key: "bubblearrow",
|
|
181
|
-
ref: k,
|
|
182
|
-
class: "bb-popover__arrow"
|
|
183
|
-
}, H.value), null, 16)) : y("", !0),
|
|
184
|
-
m.value || e.eager ? (p(), h("span", ne, [
|
|
185
|
-
e.showClose ? (p(), D(Z, {
|
|
186
|
-
key: 0,
|
|
187
|
-
class: "bb-popover__close",
|
|
188
|
-
onClick: C
|
|
189
|
-
}, {
|
|
190
|
-
default: G(() => [
|
|
191
|
-
se,
|
|
192
|
-
le
|
|
193
|
-
]),
|
|
194
|
-
_: 1
|
|
195
|
-
})) : y("", !0),
|
|
196
|
-
P(e.$slots, "default", {
|
|
197
|
-
close: C,
|
|
198
|
-
closed: c.value,
|
|
199
|
-
closing: l.value,
|
|
200
|
-
disabled: !!e.disabled,
|
|
201
|
-
open: n.value,
|
|
202
|
-
opening: r.value,
|
|
203
|
-
placement: g(v)
|
|
204
|
-
})
|
|
205
|
-
])) : y("", !0)
|
|
206
|
-
], 14, re)
|
|
207
|
-
]))
|
|
208
|
-
], 16));
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
export {
|
|
212
|
-
we as default
|
|
213
|
-
};
|
|
214
|
-
//# sourceMappingURL=index79.js.map
|
package/dist/index79.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index79.js","sources":["../src/components/BbPopover/BbPopover.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, createElementVNode as _createElementVNode, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, withCtx as _withCtx, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, Teleport as _Teleport } from \"vue\"\n\nconst _hoisted_1 = [\"id\"]\nconst _hoisted_2 = {\n key: 1,\n class: \"bb-popover__bubble\"\n}\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"bb-popover__close-label\" }, \"Chiudi\", -1)\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"svg\", {\n fill: \"none\",\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M23 23L1 1M23 1L1 23\",\n stroke: \"currentColor\",\n \"stroke-linecap\": \"round\",\n \"stroke-width\": \"2\"\n })\n], -1)\n\nimport { computed, nextTick, ref } from 'vue';\nimport {\n\tuseFloating,\n\tautoUpdate,\n\tflip,\n\tshift,\n\toffset,\n\tarrow,\n} from '@floating-ui/vue';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\nimport type { Placement } from '@floating-ui/vue';\n\nexport type BbPopoverProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'showClose'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Elements that obtains focus immediately after opening the popover.\n\t * By default it's the first tabbable item.\n\t */\n\tfocusTarget?: string;\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number | string;\n};\n\nexport type BbPopoverEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbPopover',\n props: {\n arrowPadding: { default: 10 },\n block: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n offset: { default: 3 },\n padding: { default: 10 },\n placement: { default: 'bottom' },\n showClose: { type: Boolean, default: true },\n theme: { default: 'default' },\n transitionDuration: { default: 150 },\n focusTarget: {},\n width: {}\n },\n emits: [\"shown\", \"hidden\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst { id: _id } = useId();\nconst id = `bbp_${_id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\n\nconst { activate, deactivate } = useFocusTrap(content, {\n\t/**\n\t * This traps all clicks outside so we are pressing\n\t * the trigger we just allow and process that in its\n\t * own click handler.\n\t * If we are pressing anything random on the page\n\t * close the popover and be done\n\t */\n\tclickOutsideDeactivates: (event) => {\n\t\tconst target = event.target;\n\t\tif (target instanceof HTMLElement) {\n\t\t\tif (wrapper.value?.contains(target)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tclosePopover();\n\t\temit('hidden');\n\t\treturn true;\n\t},\n\tescapeDeactivates: () => {\n\t\tnextTick(async () => {\n\t\t\tawait closePopover();\n\t\t\tfocusTrigger();\n\t\t\temit('hidden');\n\t\t});\n\t\treturn true;\n\t},\n\t/* We don't return focus so that when\n\t * we press a button on tyhe page we can focus\n\t * THAT button and not the current trigger\n\t */\n\treturnFocusOnDeactivate: false,\n});\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n\twrapper,\n\tcontent,\n\t{\n\t\tplacement: props.placement,\n\t\twhileElementsMounted: autoUpdate,\n\t\tmiddleware: [\n\t\t\tflip(),\n\t\t\toffset(props.offset),\n\t\t\tshift({ padding: props.padding }),\n\t\t\tarrow({\n\t\t\t\telement: bubblearrow,\n\t\t\t\tpadding: props.arrowPadding,\n\t\t\t}),\n\t\t],\n\t}\n);\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-popover--block': props.block,\n\t\t[`bb-popover--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n\tif (middlewareData.value.arrow) {\n\t\tconst { x, y } = middlewareData.value.arrow;\n\t\treturn {\n\t\t\tstyle: {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t},\n\t\t};\n\t}\n});\n\nconst containerStyle = computed(() => {\n\tconst base: Record<string, any> = {\n\t\t...floatingStyles.value,\n\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t};\n\tif (props.width) {\n\t\tlet width: string;\n\t\t// If the width is a css unit string use it, if it is a number or number string add px\n\t\tif (typeof props.width === 'string' && Number.isNaN(Number(props.width))) {\n\t\t\tif (props.width.includes('%')) {\n\t\t\t\tif (!wrapper.value) return;\n\t\t\t\twidth = `${\n\t\t\t\t\twrapper.value.clientWidth * (+props.width.replace('%', '') / 100)\n\t\t\t\t}px`;\n\t\t\t} else {\n\t\t\t\twidth = props.width;\n\t\t\t}\n\t\t} else {\n\t\t\twidth = `${props.width}px`;\n\t\t}\n\t\tbase.width = width;\n\t}\n\treturn base;\n});\n\nconst openPopover = async () => {\n\tclosed.value = false;\n\tclosing.value = false;\n\topening.value = true;\n\tawait wait(50);\n\topen.value = true;\n\topening.value = false;\n};\n\nconst closePopover = async () => {\n\topen.value = false;\n\topening.value = false;\n\tclosing.value = true;\n\tawait wait(props.transitionDuration);\n\tclosing.value = false;\n\tclosed.value = true;\n};\nconst hasOpenedOnce = ref(false);\nconst onTriggerClick = async () => {\n\tif (open.value) {\n\t\tawait closePopover();\n\t\tfocusTrigger();\n\t\temit('hidden');\n\t\treturn;\n\t}\n\tif (opening.value || props.disabled) return;\n\thasOpenedOnce.value = true;\n\tawait openPopover();\n\tlet focusTarget = props.focusTarget ?? '.bb-popover__close';\n\n\tactivate({\n\t\tonPostActivate: () => {\n\t\t\tif (content.value) {\n\t\t\t\tconst target = content.value.querySelector(focusTarget);\n\t\t\t\tif (target instanceof HTMLElement) {\n\t\t\t\t\ttarget.focus();\n\t\t\t\t\temit('shown');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t});\n};\n\nconst focusTrigger = () => {\n\tconst trigger = wrapper.value?.querySelector(`[aria-controls=popover_${id}]`);\n\tif (trigger instanceof HTMLElement) {\n\t\ttrigger.focus();\n\t}\n};\n\nconst onClickClose = async () => {\n\tdeactivate();\n\tawait closePopover();\n\tfocusTrigger();\n\temit('hidden');\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-popover\" }, attributes.value), [\n _createElementVNode(\"span\", {\n ref_key: \"wrapper\",\n ref: wrapper,\n class: \"bb-popover__wrapper\"\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-controls': `popover_${id}`,\n\t\t\t\t\t\t'aria-expanded': open.value,\n\t\t\t\t\t\tonClick: onTriggerClick,\n\t\t\t\t\t\tid: id,\n\t\t\t\t\t\tdisabled: !!_ctx.disabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed.value,\n\t\t\t\t\tclosing: closing.value,\n\t\t\t\t\tdisabled: !!_ctx.disabled,\n\t\t\t\t\topen: open.value,\n\t\t\t\t\topening: opening.value,\n\t\t\t\t\tplacement: _unref(placement),\n\t\t\t\t})))\n ], 512),\n (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createElementVNode(\"span\", {\n id: `popover_${id}`,\n ref_key: \"content\",\n ref: content,\n class: _normalizeClass([\"bb-popover__bubble-container\", {\n\t\t\t\t\t[`bb-popover__bubble-container--${_unref(placement)}`]: true,\n\t\t\t\t\t[`bb-popover__bubble-container--${_ctx.theme}`]: _ctx.theme,\n\t\t\t\t\t'bb-popover__bubble-container--hidden': closed.value,\n\t\t\t\t\t'bb-popover__bubble-container--closing': closing.value,\n\t\t\t\t\t'bb-popover__bubble-container--opening': opening.value,\n\t\t\t\t\t'bb-popover__bubble-container--open': open.value,\n\t\t\t\t}]),\n style: _normalizeStyle(containerStyle.value)\n }, [\n (hasOpenedOnce.value || _ctx.eager)\n ? (_openBlock(), _createElementBlock(\"span\", _mergeProps({\n key: 0,\n ref_key: \"bubblearrow\",\n ref: bubblearrow,\n class: \"bb-popover__arrow\"\n }, arrowAttributes.value), null, 16))\n : _createCommentVNode(\"\", true),\n (hasOpenedOnce.value || _ctx.eager)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n (_ctx.showClose)\n ? (_openBlock(), _createBlock(BaseButton, {\n key: 0,\n class: \"bb-popover__close\",\n onClick: onClickClose\n }, {\n default: _withCtx(() => [\n _hoisted_3,\n _hoisted_4\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"default\", {\n close: onClickClose,\n closed: closed.value,\n closing: closing.value,\n disabled: !!_ctx.disabled,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement)\n })\n ]))\n : _createCommentVNode(\"\", true)\n ], 14, _hoisted_1)\n ]))\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_sfc_main","_defineComponent","__props","__emit","props","emit","_id","useId","id","wrapper","ref","content","bubblearrow","activate","deactivate","useFocusTrap","event","target","_a","closePopover","nextTick","focusTrigger","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","offset","shift","arrow","attributes","computed","opening","open","closing","closed","arrowAttributes","x","y","containerStyle","base","width","openPopover","wait","hasOpenedOnce","onTriggerClick","focusTarget","trigger","onClickClose","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_unref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ACDyC,EAAoB,IAAI,EAAI;AAAA,QAAA,GAC/B,IAAIpE,EAAU;AAAA,MAAA,CAClB;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
|
package/dist/index8.js
DELETED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { copy as D } from "./index127.js";
|
|
2
|
-
import { reactive as G, watch as v, toValue as H, computed as g, provide as Q } from "vue";
|
|
3
|
-
import { isNotNil as a } from "./index124.js";
|
|
4
|
-
import { mapValues as X } from "./index128.js";
|
|
5
|
-
import { useRoute as Z } from "./index129.js";
|
|
6
|
-
import { useRouter as _ } from "./index130.js";
|
|
7
|
-
import { useStepper as ee } from "./index131.js";
|
|
8
|
-
const te = Symbol(), x = /((step\/)(?<step>[\s\S]+?)(?=[/?]))|((step\/)(?<step2>[\s\S]+))/, O = (i) => {
|
|
9
|
-
var r, u;
|
|
10
|
-
const e = i.match(x);
|
|
11
|
-
return ((r = e == null ? void 0 : e.groups) == null ? void 0 : r.step) ?? ((u = e == null ? void 0 : e.groups) == null ? void 0 : u.step2) ?? null;
|
|
12
|
-
}, le = (i) => {
|
|
13
|
-
if (!i.name)
|
|
14
|
-
throw new Error(
|
|
15
|
-
"You need to provide a unique name for the current wizard instance to be used to save data"
|
|
16
|
-
);
|
|
17
|
-
const e = Z(), r = _(), u = i.useNavigation ?? !0, h = i.navigationMode ?? "query", V = i.persist ?? !0;
|
|
18
|
-
if (u && (!e.value || !r))
|
|
19
|
-
throw new Error(
|
|
20
|
-
"Navigation is enabled but could not retrieve the router instance in useWizard."
|
|
21
|
-
);
|
|
22
|
-
const q = D(i.initialState), l = G(
|
|
23
|
-
V && sessionStorage.getItem(i.name) ? {
|
|
24
|
-
...q,
|
|
25
|
-
...JSON.parse(sessionStorage.getItem(i.name))
|
|
26
|
-
} : q
|
|
27
|
-
);
|
|
28
|
-
V && v(l, () => {
|
|
29
|
-
sessionStorage.setItem(i.name, JSON.stringify(l));
|
|
30
|
-
});
|
|
31
|
-
const w = H(i.steps), o = g(
|
|
32
|
-
() => Object.entries(w).reduce(
|
|
33
|
-
(t, [s, n]) => (n.condition && !n.condition(l) || (t[s] = { ...n, key: s }), t),
|
|
34
|
-
{}
|
|
35
|
-
)
|
|
36
|
-
), m = g(
|
|
37
|
-
() => X(
|
|
38
|
-
o.value,
|
|
39
|
-
(t) => typeof t.isValid == "function" ? {
|
|
40
|
-
...t,
|
|
41
|
-
isValid: t.isValid(l)
|
|
42
|
-
} : {
|
|
43
|
-
...t,
|
|
44
|
-
isValid: t.isValid ?? !0
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
);
|
|
48
|
-
let p = null;
|
|
49
|
-
if (u && a(e.value)) {
|
|
50
|
-
let t = null;
|
|
51
|
-
if (h === "query")
|
|
52
|
-
e.value.query.step && (t = e.value.query.step);
|
|
53
|
-
else {
|
|
54
|
-
const s = O(e.value.fullPath);
|
|
55
|
-
s && (t = s);
|
|
56
|
-
}
|
|
57
|
-
p = t;
|
|
58
|
-
}
|
|
59
|
-
if (p)
|
|
60
|
-
for (const t in o.value) {
|
|
61
|
-
if (t === p)
|
|
62
|
-
break;
|
|
63
|
-
const s = m.value[t];
|
|
64
|
-
if (!s || !s.isValid) {
|
|
65
|
-
p = null;
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
const {
|
|
70
|
-
steps: b,
|
|
71
|
-
current: P,
|
|
72
|
-
goToNext: j,
|
|
73
|
-
goToPrevious: A,
|
|
74
|
-
goTo: d,
|
|
75
|
-
index: K,
|
|
76
|
-
at: z,
|
|
77
|
-
get: F,
|
|
78
|
-
goBackTo: I,
|
|
79
|
-
isAfter: M,
|
|
80
|
-
isBefore: U,
|
|
81
|
-
isCurrent: B,
|
|
82
|
-
isFirst: C,
|
|
83
|
-
isLast: E,
|
|
84
|
-
isNext: J,
|
|
85
|
-
isPrevious: R,
|
|
86
|
-
next: W,
|
|
87
|
-
previous: $,
|
|
88
|
-
stepNames: L
|
|
89
|
-
} = ee(
|
|
90
|
-
m,
|
|
91
|
-
p || Object.values(o.value)[0].key
|
|
92
|
-
), c = g(() => Object.keys(o.value)[K.value]), T = {
|
|
93
|
-
at: z,
|
|
94
|
-
current: P,
|
|
95
|
-
data: l,
|
|
96
|
-
get: F,
|
|
97
|
-
goBackTo: I,
|
|
98
|
-
goTo: d,
|
|
99
|
-
goToNext: j,
|
|
100
|
-
goToPrevious: A,
|
|
101
|
-
isAfter: M,
|
|
102
|
-
isBefore: U,
|
|
103
|
-
isCurrent: B,
|
|
104
|
-
isFirst: C,
|
|
105
|
-
isLast: E,
|
|
106
|
-
isNext: J,
|
|
107
|
-
isPrevious: R,
|
|
108
|
-
key: c,
|
|
109
|
-
next: W,
|
|
110
|
-
previous: $,
|
|
111
|
-
stepNames: L,
|
|
112
|
-
steps: b
|
|
113
|
-
};
|
|
114
|
-
if (Q(te, T), u)
|
|
115
|
-
if (h === "query")
|
|
116
|
-
v(
|
|
117
|
-
c,
|
|
118
|
-
() => {
|
|
119
|
-
a(r) && a(e.value) && r.push({
|
|
120
|
-
...e,
|
|
121
|
-
query: { ...e.value.query, step: c.value ?? null }
|
|
122
|
-
});
|
|
123
|
-
},
|
|
124
|
-
{ immediate: !0 }
|
|
125
|
-
), v(
|
|
126
|
-
() => {
|
|
127
|
-
var t;
|
|
128
|
-
return (t = e.value) == null ? void 0 : t.query.step;
|
|
129
|
-
},
|
|
130
|
-
(t) => {
|
|
131
|
-
if (t) {
|
|
132
|
-
const s = t;
|
|
133
|
-
if (s in o.value) {
|
|
134
|
-
const n = s, f = Object.keys(o.value);
|
|
135
|
-
f.slice(
|
|
136
|
-
0,
|
|
137
|
-
f.indexOf(n)
|
|
138
|
-
).every(
|
|
139
|
-
(N) => {
|
|
140
|
-
var y;
|
|
141
|
-
return (y = m.value[N]) == null ? void 0 : y.isValid;
|
|
142
|
-
}
|
|
143
|
-
) && d(n);
|
|
144
|
-
}
|
|
145
|
-
} else {
|
|
146
|
-
const s = Object.keys(b)[0];
|
|
147
|
-
d(s);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
);
|
|
151
|
-
else {
|
|
152
|
-
const t = g(() => {
|
|
153
|
-
if (a(e.value))
|
|
154
|
-
return O(e.value.fullPath);
|
|
155
|
-
});
|
|
156
|
-
v(
|
|
157
|
-
c,
|
|
158
|
-
(s) => {
|
|
159
|
-
a(e.value) && a(r) && (e.value.path.includes("step") ? r.push({
|
|
160
|
-
query: e.value.query,
|
|
161
|
-
path: e.value.path.replace(x, `step/${s}`)
|
|
162
|
-
}) : r.push({
|
|
163
|
-
query: e.value.query,
|
|
164
|
-
// Normalizes paths with / and without
|
|
165
|
-
path: (e.value.path + `/step/${s}`).replace("//", "/"),
|
|
166
|
-
replace: !0
|
|
167
|
-
}));
|
|
168
|
-
},
|
|
169
|
-
{ immediate: !0, flush: "post" }
|
|
170
|
-
), v(
|
|
171
|
-
() => t.value,
|
|
172
|
-
(s) => {
|
|
173
|
-
if (s && s !== c.value) {
|
|
174
|
-
const n = s;
|
|
175
|
-
if (n in o.value) {
|
|
176
|
-
const f = n, S = Object.keys(o.value);
|
|
177
|
-
S.slice(
|
|
178
|
-
0,
|
|
179
|
-
S.indexOf(f)
|
|
180
|
-
).every(
|
|
181
|
-
(y) => {
|
|
182
|
-
var k;
|
|
183
|
-
return (k = o.value[y]) == null ? void 0 : k.isValid;
|
|
184
|
-
}
|
|
185
|
-
) && d(f);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
return T;
|
|
192
|
-
};
|
|
193
|
-
export {
|
|
194
|
-
le as useWizard,
|
|
195
|
-
te as wizardInjectionKey
|
|
196
|
-
};
|
|
197
|
-
//# sourceMappingURL=index8.js.map
|
package/dist/index8.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index8.js","sources":["../src/composables/useWizard.ts"],"sourcesContent":["import { cloneDeep } from '@/utilities/functions/cloneDeep';\nimport { computed, provide, reactive, watch, toValue } from 'vue';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { mapValues } from '@/utilities/functions/mapValues';\nimport { useRoute } from './useRoute';\nimport { useRouter } from './useRouter';\nimport { useStepper } from '@vueuse/core';\nimport type { ComputedRef, MaybeRef } from 'vue';\n\nexport const wizardInjectionKey = Symbol();\nexport type Step<U> = {\n\t/**\n\t * Function that accepts a state object and returns a boolean.\n\t * When step are accessed at the end of the pipeline the result\n\t * is provided so you don't have to run the function yourself.\n\t * It determines if the validation has passed for the step.\n\t */\n\tisValid?: (state: U) => boolean | boolean;\n\t/**\n\t * Function that accepts a state object and returns a boolean.\n\t * When step are accessed at the end of the pipeline the result\n\t * is provided so you don't have to run the function yourself.\n\t * Steps that do not pass the condition are removed.\n\t */\n\tcondition?: (state: U) => boolean;\n\t[key: string]: any;\n};\nexport type WizardState<T extends Record<string, any>> = ReturnType<\n\ttypeof useWizard<T>\n>;\n\nconst regexMatchStep =\n\t/((step\\/)(?<step>[\\s\\S]+?)(?=[/?]))|((step\\/)(?<step2>[\\s\\S]+))/;\n/**\n * With a url that follows the rule xyz.com/anything/step/:nameofthestep[/?query]\n * will match the :nameofthestep substring\n */\nconst extractStepFromUrl = (url: string) => {\n\tconst match = url.match(regexMatchStep);\n\treturn match?.groups?.step ?? match?.groups?.step2 ?? null;\n};\nexport const useWizard = <T extends object>(params: {\n\t/**\n\t * The steps definition for the wizard\n\t */\n\tsteps: MaybeRef<Record<string, Step<T>>>;\n\t/**\n\t * Name of the wizard used to persist state\n\t */\n\tname: string;\n\t/**\n\t * Initial set of data to be made available throughout\n\t */\n\tinitialState: T;\n\t/**\n\t * When navogation is enabled, to whether use the query parameters or an entire substring of the URL like xyz/steps/....\n\t * The latter useful with nuxt so you can leverage the automatic import of components based on the URL.\n\t */\n\tnavigationMode?: 'query' | 'route';\n\t/**\n\t * Whether to use navigation at all. When disabled no query or URL is changed.\n\t */\n\tuseNavigation?: boolean;\n\t/**\n\t *\n\t */\n\tpersist?: boolean;\n}) => {\n\tif (!params.name) {\n\t\tthrow new Error(\n\t\t\t'You need to provide a unique name for the current wizard instance to be used to save data'\n\t\t);\n\t}\n\tconst route = useRoute();\n\tconst router = useRouter();\n\n\tconst useNavigation = params.useNavigation ?? true;\n\tconst navigationMode = params.navigationMode ?? 'query';\n\tconst persist = params.persist ?? true;\n\n\tif (useNavigation && (!route.value || !router)) {\n\t\tthrow new Error(\n\t\t\t'Navigation is enabled but could not retrieve the router instance in useWizard.'\n\t\t);\n\t}\n\n\tconst initialStateCopy = cloneDeep(params.initialState);\n\t/**\n\t * Initial state is either read from session storage or the one provided\n\t */\n\tconst innerState = reactive<typeof params.initialState>(\n\t\tpersist && sessionStorage.getItem(params.name)\n\t\t\t? {\n\t\t\t\t\t...initialStateCopy,\n\t\t\t\t\t...JSON.parse(sessionStorage.getItem(params.name)!),\n\t\t\t\t}\n\t\t\t: initialStateCopy\n\t);\n\n\tif (persist) {\n\t\t/**\n\t\t * Every time the state changes save it to sessionStorage\n\t\t */\n\t\twatch(innerState, () => {\n\t\t\tsessionStorage.setItem(params.name, JSON.stringify(innerState));\n\t\t});\n\t}\n\n\t/**\n\t * Steps can be passed as ref so we need to unwrap them\n\t */\n\tconst unwrappedSteps = toValue(params.steps);\n\tconst filteredSteps = computed(() =>\n\t\tObject.entries(unwrappedSteps).reduce(\n\t\t\t(acc: typeof unwrappedSteps, [key, step]) => {\n\t\t\t\tif (step.condition) {\n\t\t\t\t\tif (!step.condition(innerState as T)) {\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tacc[key] = { ...step, key };\n\t\t\t\treturn acc;\n\t\t\t},\n\t\t\t{}\n\t\t)\n\t);\n\n\t/**\n\t * Steps can have a isValid function that receives the current state\n\t * but we don't want to have to call it every single time so we call it once here\n\t */\n\tconst mappedSteps = computed(() =>\n\t\tmapValues(\n\t\t\tfilteredSteps.value,\n\t\t\t(step): Omit<Step<T>, 'isValid'> & { isValid: boolean } => {\n\t\t\t\tif (typeof step.isValid === 'function') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...step,\n\t\t\t\t\t\tisValid: step.isValid(innerState as T),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\t...step,\n\t\t\t\t\tisValid: step.isValid ?? true,\n\t\t\t\t};\n\t\t\t}\n\t\t)\n\t);\n\n\t/**\n\t * Get the initial step from the query.\n\t * If it exists check that every step before it is also valid\n\t * so user cannot manually jump by changing the URL\n\t */\n\tlet initialStep = null;\n\tif (useNavigation && isNotNil(route.value)) {\n\t\tlet step: string | null = null;\n\t\tif (navigationMode === 'query') {\n\t\t\tif (route.value.query.step) {\n\t\t\t\tstep = route.value.query.step as string;\n\t\t\t}\n\t\t} else {\n\t\t\tconst stepFromUrl = extractStepFromUrl(route.value.fullPath);\n\t\t\tif (stepFromUrl) {\n\t\t\t\tstep = stepFromUrl;\n\t\t\t}\n\t\t}\n\t\tinitialStep = step;\n\t}\n\n\tif (initialStep) {\n\t\tfor (const stepName in filteredSteps.value) {\n\t\t\tif (stepName === initialStep) break;\n\t\t\tconst current = mappedSteps.value[stepName];\n\t\t\tif (!current || !current.isValid) {\n\t\t\t\tinitialStep = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Define the state of the wizard\n\t * A few data come from useStepper\n\t */\n\tconst {\n\t\tsteps,\n\t\tcurrent,\n\t\tgoToNext,\n\t\tgoToPrevious,\n\t\tgoTo,\n\t\tindex,\n\t\tat,\n\t\tget,\n\t\tgoBackTo,\n\t\tisAfter,\n\t\tisBefore,\n\t\tisCurrent,\n\t\tisFirst,\n\t\tisLast,\n\t\tisNext,\n\t\tisPrevious,\n\t\tnext,\n\t\tprevious,\n\t\tstepNames,\n\t} = useStepper(\n\t\tmappedSteps,\n\t\tinitialStep || Object.values(filteredSteps.value)[0].key\n\t);\n\n\tconst key = computed(() => Object.keys(filteredSteps.value)[index.value]);\n\n\t/**\n\t * Complete state object\n\t */\n\tconst state = {\n\t\tat,\n\t\tcurrent: current as ComputedRef<Step<T> & { isValid: boolean }>,\n\t\tdata: innerState,\n\t\tget,\n\t\tgoBackTo,\n\t\tgoTo,\n\t\tgoToNext,\n\t\tgoToPrevious,\n\t\tisAfter,\n\t\tisBefore,\n\t\tisCurrent,\n\t\tisFirst,\n\t\tisLast,\n\t\tisNext,\n\t\tisPrevious,\n\t\tkey,\n\t\tnext,\n\t\tprevious,\n\t\tstepNames,\n\t\tsteps,\n\t};\n\n\tprovide(wizardInjectionKey, state);\n\n\tif (useNavigation) {\n\t\tif (navigationMode === 'query') {\n\t\t\t/**\n\t\t\t * Every time the current step changes update route\n\t\t\t */\n\t\t\twatch(\n\t\t\t\tkey,\n\t\t\t\t() => {\n\t\t\t\t\tif (isNotNil(router) && isNotNil(route.value)) {\n\t\t\t\t\t\trouter.push({\n\t\t\t\t\t\t\t...route,\n\t\t\t\t\t\t\tquery: { ...route.value.query, step: key.value ?? null },\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ immediate: true }\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Every time the route changes align the current step to the route\n\t\t\t */\n\t\t\twatch(\n\t\t\t\t() => route.value?.query.step,\n\t\t\t\t(value) => {\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\tconst stepAsString = value as string;\n\t\t\t\t\t\tif (stepAsString in filteredSteps.value) {\n\t\t\t\t\t\t\tconst stepAsKey = stepAsString;\n\t\t\t\t\t\t\tconst stepKeys = Object.keys(filteredSteps.value);\n\t\t\t\t\t\t\tconst stepsPriorToTarget = stepKeys.slice(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tstepKeys.indexOf(stepAsKey)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst allValid = stepsPriorToTarget.every(\n\t\t\t\t\t\t\t\t(key) => mappedSteps.value[key]?.isValid\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (allValid) {\n\t\t\t\t\t\t\t\tgoTo(stepAsKey);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst key = Object.keys(steps)[0];\n\t\t\t\t\t\tgoTo(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tconst stepFromUrl = computed(() => {\n\t\t\t\tif (isNotNil(route.value)) {\n\t\t\t\t\treturn extractStepFromUrl(route.value.fullPath);\n\t\t\t\t}\n\t\t\t\treturn undefined;\n\t\t\t});\n\n\t\t\t/**\n\t\t\t * Every time the current step changes update route\n\t\t\t */\n\t\t\twatch(\n\t\t\t\tkey,\n\t\t\t\t(value) => {\n\t\t\t\t\tif (isNotNil(route.value) && isNotNil(router)) {\n\t\t\t\t\t\tif (route.value.path.includes('step')) {\n\t\t\t\t\t\t\trouter.push({\n\t\t\t\t\t\t\t\tquery: route.value.query,\n\t\t\t\t\t\t\t\tpath: route.value.path.replace(regexMatchStep, `step/${value}`),\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trouter.push({\n\t\t\t\t\t\t\t\tquery: route.value.query,\n\t\t\t\t\t\t\t\t// Normalizes paths with / and without\n\t\t\t\t\t\t\t\tpath: (route.value.path + `/step/${value}`).replace('//', '/'),\n\t\t\t\t\t\t\t\treplace: true,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ immediate: true, flush: 'post' }\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Every time the route changes align the current step to the route\n\t\t\t */\n\t\t\twatch(\n\t\t\t\t() => stepFromUrl.value,\n\t\t\t\t(value) => {\n\t\t\t\t\tif (value && value !== key.value) {\n\t\t\t\t\t\tconst stepAsString = value as string;\n\t\t\t\t\t\tif (stepAsString in filteredSteps.value) {\n\t\t\t\t\t\t\tconst stepAsKey = stepAsString;\n\t\t\t\t\t\t\tconst stepKeys = Object.keys(filteredSteps.value);\n\t\t\t\t\t\t\tconst stepsPriorToTarget = stepKeys.slice(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tstepKeys.indexOf(stepAsKey)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst allValid = stepsPriorToTarget.every(\n\t\t\t\t\t\t\t\t(key) => filteredSteps.value[key]?.isValid\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (allValid) {\n\t\t\t\t\t\t\t\tgoTo(stepAsKey);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\treturn state;\n};\n"],"names":["wizardInjectionKey","regexMatchStep","extractStepFromUrl","url","match","_a","_b","useWizard","params","route","useRoute","router","useRouter","useNavigation","navigationMode","persist","initialStateCopy","cloneDeep","innerState","reactive","watch","unwrappedSteps","toValue","filteredSteps","computed","acc","key","step","mappedSteps","mapValues","initialStep","isNotNil","stepFromUrl","stepName","current","steps","goToNext","goToPrevious","goTo","index","at","get","goBackTo","isAfter","isBefore","isCurrent","isFirst","isLast","isNext","isPrevious","next","previous","stepNames","useStepper","state","provide","value","stepAsString","stepAsKey","stepKeys"],"mappings":";;;;;;;AASO,MAAMA,KAAqB,OAAO,GAsBnCC,IACL,mEAKKC,IAAqB,CAACC,MAAgB;;AACrC,QAAAC,IAAQD,EAAI,MAAMF,CAAc;AACtC,WAAOI,IAAAD,KAAA,gBAAAA,EAAO,WAAP,gBAAAC,EAAe,WAAQC,IAAAF,KAAA,gBAAAA,EAAO,WAAP,gBAAAE,EAAe,UAAS;AACvD,GACaC,KAAY,CAAmBC,MA0BtC;AACD,MAAA,CAACA,EAAO;AACX,UAAM,IAAI;AAAA,MACT;AAAA,IAAA;AAGF,QAAMC,IAAQC,KACRC,IAASC,KAETC,IAAgBL,EAAO,iBAAiB,IACxCM,IAAiBN,E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M,IACnCE,EAAO,KAAK;AAAA,YACX,OAAOF,EAAM,MAAM;AAAA,YACnB,MAAMA,EAAM,MAAM,KAAK,QAAQR,GAAgB,QAAQuD,CAAK,EAAE;AAAA,UAAA,CAC9D,IAED7C,EAAO,KAAK;AAAA,YACX,OAAOF,EAAM,MAAM;AAAA;AAAA,YAEnB,OAAOA,EAAM,MAAM,OAAO,SAAS+C,CAAK,IAAI,QAAQ,MAAM,GAAG;AAAA,YAC7D,SAAS;AAAA,UAAA,CACT;AAAA,QAGJ;AAAA,QACA,EAAE,WAAW,IAAM,OAAO,OAAO;AAAA,MAAA,GAMlCpC;AAAA,QACC,MAAMY,EAAY;AAAA,QAClB,CAACwB,MAAU;AACN,cAAAA,KAASA,MAAU9B,EAAI,OAAO;AACjC,kBAAM+B,IAAeD;AACjB,gBAAAC,KAAgBlC,EAAc,OAAO;AACxC,oBAAMmC,IAAYD,GACZE,IAAW,OAAO,KAAKpC,EAAc,KAAK;AAQhD,cAP2BoC,EAAS;AAAA,gBACnC;AAAA,gBACAA,EAAS,QAAQD,CAAS;AAAA,cAAA,EAES;AAAA,gBACnC,CAAChC,MAAAA;;AAAQ,0BAAArB,IAAAkB,EAAc,MAAMG,CAAG,MAAvB,gBAAArB,EAA0B;AAAA;AAAA,cAAA,KAGnCiC,EAAKoB,CAAS;AAAA,YAEhB;AAAA,UACD;AAAA,QACD;AAAA,MAAA;AAAA,IAEF;AAGM,SAAAJ;AACR;"}
|
package/dist/index80.js
DELETED
package/dist/index80.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index80.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index81.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { defineComponent as a, computed as l, openBlock as s, createElementBlock as n, normalizeClass as m, createElementVNode as i, normalizeStyle as c } from "vue";
|
|
2
|
-
import { clamp as p } from "./index196.js";
|
|
3
|
-
import { getAsPercentageBetween as d } from "./index121.js";
|
|
4
|
-
const v = /* @__PURE__ */ a({
|
|
5
|
-
__name: "BbProgress",
|
|
6
|
-
props: {
|
|
7
|
-
modelValue: { default: 0 },
|
|
8
|
-
min: { default: 0 },
|
|
9
|
-
max: { default: 100 },
|
|
10
|
-
vertical: { type: Boolean }
|
|
11
|
-
},
|
|
12
|
-
setup(t) {
|
|
13
|
-
const e = t, o = l(
|
|
14
|
-
() => p(
|
|
15
|
-
d(e.modelValue || e.min, e.min, e.max),
|
|
16
|
-
0,
|
|
17
|
-
100
|
|
18
|
-
)
|
|
19
|
-
);
|
|
20
|
-
return (r, u) => (s(), n("div", {
|
|
21
|
-
class: m(["bb-progress", {
|
|
22
|
-
"bb-progress--vertical": r.vertical,
|
|
23
|
-
"bb-progress--horizontal": !r.vertical
|
|
24
|
-
}])
|
|
25
|
-
}, [
|
|
26
|
-
i("div", {
|
|
27
|
-
class: "bb-progress-bar",
|
|
28
|
-
style: c({ [r.vertical ? "height" : "width"]: o.value + "%" })
|
|
29
|
-
}, null, 4)
|
|
30
|
-
], 2));
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
export {
|
|
34
|
-
v as default
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=index81.js.map
|
package/dist/index81.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index81.js","sources":["../src/components/BbProgress/BbProgress.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { clamp } from '@/utilities/functions/clamp';\nimport { getAsPercentageBetween } from '@/utilities/functions/percentage';\nimport { computed } from 'vue';\n\nexport type BbProgressProps = {\n\t/**\n\t * Used by v-model. It'a number contained between `min` and `max` that corresponds to the current value.\n\t */\n\tmodelValue?: number | null;\n\t/**\n\t * Minimum value. Lower cap.\n\t */\n\tmin?: number;\n\t/**\n\t * Maximum value. Upper cap.\n\t */\n\tmax?: number;\n\t/**\n\t * Displays the component as vertical.\n\t */\n\tvertical?: boolean;\n};\n\n/**\n * You can get percentage between 250 and 370 and have it compute it automatically\n */\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbProgress',\n props: {\n modelValue: { default: 0 },\n min: { default: 0 },\n max: { default: 100 },\n vertical: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props;\n\nconst width = computed(() =>\n\tclamp(\n\t\tgetAsPercentageBetween(props.modelValue || props.min, props.min, props.max),\n\t\t0,\n\t\t100\n\t)\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"bb-progress\", {\n\t\t\t'bb-progress--vertical': _ctx.vertical,\n\t\t\t'bb-progress--horizontal': !_ctx.vertical,\n\t\t}])\n }, [\n _createElementVNode(\"div\", {\n class: \"bb-progress-bar\",\n style: _normalizeStyle({ [_ctx.vertical ? 'height' : 'width']: width.value + '%' })\n }, null, 4)\n ], 2))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","props","width","computed","clamp","getAsPercentageBetween","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_normalizeStyle"],"mappings":";;;AA8BA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,YAAY,EAAE,SAAS,EAAE;AAAA,IACzB,KAAK,EAAE,SAAS,EAAE;AAAA,IAClB,KAAK,EAAE,SAAS,IAAI;AAAA,IACpB,UAAU,EAAE,MAAM,QAAQ;AAAA,EAC5B;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAERE,IAAQC;AAAA,MAAS,MACtBC;AAAA,QACCC,EAAuBJ,EAAM,cAAcA,EAAM,KAAKA,EAAM,KAAKA,EAAM,GAAG;AAAA,QAC1E;AAAA,QACA;AAAA,MACD;AAAA,IAAA;AAGM,WAAA,CAACK,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAO;AAAA,MAC/C,OAAOC,EAAgB,CAAC,eAAe;AAAA,QACxC,yBAAyBJ,EAAK;AAAA,QAC9B,2BAA2B,CAACA,EAAK;AAAA,MAAA,CACjC,CAAC;AAAA,IAAA,GACC;AAAA,MACDK,EAAoB,OAAO;AAAA,QACzB,OAAO;AAAA,QACP,OAAOC,EAAgB,EAAE,CAACN,EAAK,WAAW,WAAW,OAAO,GAAGJ,EAAM,QAAQ,KAAK;AAAA,MAAA,GACjF,MAAM,CAAC;AAAA,OACT,CAAC;AAAA,EAEN;AAEA,CAAC;"}
|
package/dist/index82.js
DELETED
package/dist/index82.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index82.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index83.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, openBlock as m, createBlock as c, withCtx as l, renderSlot as r, normalizeProps as b, guardReactiveProps as h, createVNode as f, mergeProps as n } from "vue";
|
|
2
|
-
import v from "./index21.js";
|
|
3
|
-
import "./index22.js";
|
|
4
|
-
import k from "./index25.js";
|
|
5
|
-
import "./index26.js";
|
|
6
|
-
const $ = /* @__PURE__ */ p({
|
|
7
|
-
__name: "BbRadio",
|
|
8
|
-
props: {
|
|
9
|
-
autofocus: {},
|
|
10
|
-
checked: {},
|
|
11
|
-
color: {},
|
|
12
|
-
disabled: { type: Boolean },
|
|
13
|
-
hasErrors: { type: Boolean },
|
|
14
|
-
id: {},
|
|
15
|
-
modelValue: {},
|
|
16
|
-
name: {},
|
|
17
|
-
readonly: {},
|
|
18
|
-
value: {},
|
|
19
|
-
direction: { default: "auto" },
|
|
20
|
-
errors: {},
|
|
21
|
-
hideLabel: { type: Boolean },
|
|
22
|
-
inputPosition: {},
|
|
23
|
-
label: {},
|
|
24
|
-
labelPosition: {},
|
|
25
|
-
reverse: { type: Boolean, default: !0 }
|
|
26
|
-
},
|
|
27
|
-
emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
|
|
28
|
-
setup(y, { emit: s }) {
|
|
29
|
-
const o = s, i = {
|
|
30
|
-
onBlur: (e) => o("blur", e),
|
|
31
|
-
onChange: (e) => o("change", e),
|
|
32
|
-
onClick: (e) => o("click", e),
|
|
33
|
-
onFocus: (e) => o("focus", e),
|
|
34
|
-
onInput: (e) => o("input", e),
|
|
35
|
-
onKeydown: (e) => o("keydown", e),
|
|
36
|
-
onMousedown: (e) => o("mousedown", e),
|
|
37
|
-
onMouseup: (e) => o("mouseup", e),
|
|
38
|
-
"onUpdate:modelValue": (e) => o("update:modelValue", e)
|
|
39
|
-
};
|
|
40
|
-
return (e, B) => (m(), c(v, {
|
|
41
|
-
id: e.id,
|
|
42
|
-
class: "bb-radio",
|
|
43
|
-
direction: e.direction,
|
|
44
|
-
errors: e.errors,
|
|
45
|
-
"has-errors": e.hasErrors,
|
|
46
|
-
"hide-label": e.hideLabel,
|
|
47
|
-
"input-position": e.inputPosition,
|
|
48
|
-
label: e.label,
|
|
49
|
-
"label-position": e.labelPosition,
|
|
50
|
-
"label-tag": "span",
|
|
51
|
-
name: e.name,
|
|
52
|
-
reverse: e.reverse,
|
|
53
|
-
tag: "label"
|
|
54
|
-
}, {
|
|
55
|
-
label: l((a) => [
|
|
56
|
-
r(e.$slots, "label", b(h(a)))
|
|
57
|
-
]),
|
|
58
|
-
input: l(({ id: a, name: d, hasErrors: u }) => [
|
|
59
|
-
f(k, n({
|
|
60
|
-
id: a,
|
|
61
|
-
autofocus: e.autofocus,
|
|
62
|
-
checked: e.checked,
|
|
63
|
-
color: e.color,
|
|
64
|
-
disabled: e.disabled,
|
|
65
|
-
"has-errors": u,
|
|
66
|
-
"model-value": e.modelValue,
|
|
67
|
-
name: d,
|
|
68
|
-
readonly: e.readonly,
|
|
69
|
-
value: e.value
|
|
70
|
-
}, i), {
|
|
71
|
-
icon: l((t) => [
|
|
72
|
-
r(e.$slots, "icon", n(t, { text: e.label }))
|
|
73
|
-
]),
|
|
74
|
-
_: 2
|
|
75
|
-
}, 1040, ["id", "autofocus", "checked", "color", "disabled", "has-errors", "model-value", "name", "readonly", "value"])
|
|
76
|
-
]),
|
|
77
|
-
_: 3
|
|
78
|
-
}, 8, ["id", "direction", "errors", "has-errors", "hide-label", "input-position", "label", "label-position", "name", "reverse"]));
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
export {
|
|
82
|
-
$ as default
|
|
83
|
-
};
|
|
84
|
-
//# sourceMappingURL=index83.js.map
|
package/dist/index83.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index83.js","sources":["../src/components/BbRadio/BbRadio.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseRadio from '../BaseRadio/BaseRadio.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type {\n\tSlotAttributes,\n\tBaseRadioEvents,\n} from '../BaseRadio/BaseRadio.vue';\n\nexport type BbRadioProps = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Defines the input as checked\n\t */\n\tchecked?: InputHTMLAttributes['checked'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname: InputHTMLAttributes['name'];\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Defines the value of the radio input.\n\t * It can be any serializable value.\n\t */\n\tvalue: any;\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n};\n\nexport type BbRadioEvents = BaseRadioEvents;\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbRadio',\n props: {\n autofocus: {},\n checked: {},\n color: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n modelValue: {},\n name: {},\n readonly: {},\n value: {},\n direction: { default: 'auto' },\n errors: {},\n hideLabel: { type: Boolean },\n inputPosition: {},\n label: {},\n labelPosition: {},\n reverse: { type: Boolean, default: true }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit;\n\n\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (value: any) => emit('update:modelValue', value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n id: _ctx.id,\n class: \"bb-radio\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n \"has-errors\": _ctx.hasErrors,\n \"hide-label\": _ctx.hideLabel,\n \"input-position\": _ctx.inputPosition,\n label: _ctx.label,\n \"label-position\": _ctx.labelPosition,\n \"label-tag\": 'span',\n name: _ctx.name,\n reverse: _ctx.reverse,\n tag: 'label'\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseRadio, _mergeProps({\n id: id,\n autofocus: _ctx.autofocus,\n checked: _ctx.checked,\n color: _ctx.color,\n disabled: _ctx.disabled,\n \"has-errors\": hasErrors,\n \"model-value\": _ctx.modelValue,\n name: name,\n readonly: _ctx.readonly,\n value: _ctx.value\n }, eventListeners), {\n icon: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"icon\", _mergeProps(data, { text: _ctx.label }))\n ]),\n _: 2\n }, 1040, [\"id\", \"autofocus\", \"checked\", \"color\", \"disabled\", \"has-errors\", \"model-value\", \"name\", \"readonly\", \"value\"])\n ]),\n _: 3\n }, 8, [\"id\", \"direction\", \"errors\", \"has-errors\", \"hide-label\", \"input-position\", \"label\", \"label-position\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__emit","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseRadio","_mergeProps"],"mappings":";;;;;AAyGA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAAA,IACZ,SAAS,CAAC;AAAA,IACV,OAAO,CAAC;AAAA,IACR,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,IACP,UAAU,CAAC;AAAA,IACX,OAAO,CAAC;AAAA,IACR,WAAW,EAAE,SAAS,OAAO;AAAA,IAC7B,QAAQ,CAAC;AAAA,IACT,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,eAAe,CAAC;AAAA,IAChB,OAAO,CAAC;AAAA,IACR,eAAe,CAAC;AAAA,IAChB,SAAS,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,EAC1C;AAAA,EACA,OAAO,CAAC,QAAQ,UAAU,SAAS,SAAS,SAAS,WAAW,aAAa,WAAW,mBAAmB;AAAA,EAC3G,MAAMC,GAAc,EAAE,MAAMC,KAAU;AAIxC,UAAMC,IAAOD,GAIPE,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsBF,EAAK,QAAQE,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBF,EAAK,UAAUE,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBF,EAAK,SAASE,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsBF,EAAK,SAASE,CAAK;AAAA,MACnD,SAAS,CAACA,MAAiBF,EAAK,SAASE,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBF,EAAK,WAAWE,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBF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