bitboss-ui 0.2.38 → 0.2.40
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/BbButton/BbButton.vue.d.ts +95 -0
- package/dist/index.d.ts +125 -0
- package/dist/index10.js +1 -4
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +1 -4
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +2 -2
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +1 -4
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +2 -2
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +1 -4
- package/dist/index104.js.map +1 -1
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +1 -4
- package/dist/index106.js.map +1 -1
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +1 -4
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +1 -1
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +2 -2
- package/dist/index11.js.map +1 -1
- package/dist/index110.js +1 -4
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +3 -3
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +1 -4
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +1 -1
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +1 -4
- package/dist/index114.js.map +1 -1
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +1 -1
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +1 -1
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +1 -1
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +1 -1
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +1 -4
- package/dist/index12.js.map +1 -1
- package/dist/index125.js +1 -1
- package/dist/index126.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index13.js.map +1 -1
- package/dist/index131.js +2 -2
- package/dist/index131.js.map +1 -1
- package/dist/index14.js +1 -4
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +8 -8
- package/dist/index15.js.map +1 -1
- package/dist/index158.js +1 -4
- package/dist/index158.js.map +1 -1
- package/dist/index16.js +1 -4
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +1 -4
- package/dist/index160.js.map +1 -1
- package/dist/index169.js +1 -4
- package/dist/index169.js.map +1 -1
- package/dist/index17.js +9 -9
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +1 -4
- package/dist/index18.js.map +1 -1
- package/dist/index183.js +1 -4
- package/dist/index183.js.map +1 -1
- package/dist/index185.js +1 -4
- package/dist/index185.js.map +1 -1
- package/dist/index19.js +3 -3
- package/dist/index19.js.map +1 -1
- package/dist/index197.js +10 -2
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +5 -4
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +16 -235
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +1 -4
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +16 -3
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +19 -35
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +20 -6
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +29 -5
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +8 -16
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +2 -16
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +234 -18
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +3 -20
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +34 -28
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +6 -8
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +2 -2
- package/dist/index21.js.map +1 -1
- package/dist/index210.js +2 -2
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +4 -10
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +368 -3
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +134 -3
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +2 -368
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +170 -130
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +23 -2
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +363 -164
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +2 -23
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +3 -373
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +1 -4
- package/dist/index22.js.map +1 -1
- package/dist/index220.js +3 -2
- package/dist/index220.js.map +1 -1
- package/dist/index223.js +4 -4
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +6 -28
- package/dist/index224.js.map +1 -1
- package/dist/index226.js +2 -2
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +2 -4
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +160 -2
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +1 -437
- package/dist/index229.js.map +1 -1
- package/dist/index23.js.map +1 -1
- package/dist/index230.js +68 -88
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +5 -69
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +294 -159
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +6 -2
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +2 -200
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +2 -5
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +2 -295
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +2 -6
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +2 -2
- package/dist/index24.js +1 -4
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +4 -2
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +15 -2
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +435 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +89 -2
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +200 -2
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +2 -224
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +105 -246
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +106 -2
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +218 -111
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +246 -94
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +2 -2
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +2 -38
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +4 -2
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +4 -2
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +60 -14
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +3 -2
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +2 -3
- package/dist/index255.js.map +1 -1
- package/dist/index26.js +1 -4
- package/dist/index26.js.map +1 -1
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +1 -4
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +2 -2
- package/dist/index29.js.map +1 -1
- package/dist/index30.js +1 -4
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +6 -6
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +1 -4
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +1 -1
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +1 -4
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +2 -2
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +1 -4
- package/dist/index36.js.map +1 -1
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +1 -4
- package/dist/index38.js.map +1 -1
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +1 -4
- package/dist/index40.js.map +1 -1
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +1 -4
- package/dist/index42.js.map +1 -1
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +1 -4
- package/dist/index44.js.map +1 -1
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +1 -4
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +1 -1
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +1 -4
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +1 -1
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +1 -4
- package/dist/index50.js.map +1 -1
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +1 -4
- package/dist/index52.js.map +1 -1
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +1 -4
- package/dist/index54.js.map +1 -1
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +1 -4
- package/dist/index56.js.map +1 -1
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +1 -4
- package/dist/index58.js.map +1 -1
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +1 -4
- package/dist/index60.js.map +1 -1
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +1 -4
- package/dist/index62.js.map +1 -1
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +1 -4
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +3 -3
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +1 -4
- package/dist/index66.js.map +1 -1
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +1 -4
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +12 -12
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +1 -4
- package/dist/index70.js.map +1 -1
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +1 -1
- package/dist/index72.js.map +1 -1
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +1 -4
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +1 -1
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +1 -4
- package/dist/index76.js.map +1 -1
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +1 -4
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +3 -3
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +1 -4
- package/dist/index80.js.map +1 -1
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +1 -4
- package/dist/index82.js.map +1 -1
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +1 -4
- package/dist/index84.js.map +1 -1
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +1 -4
- package/dist/index86.js.map +1 -1
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +1 -4
- package/dist/index88.js.map +1 -1
- package/dist/index89.js.map +1 -1
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +1 -4
- package/dist/index90.js.map +1 -1
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +1 -4
- package/dist/index92.js.map +1 -1
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +1 -4
- package/dist/index94.js.map +1 -1
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +1 -4
- package/dist/index96.js.map +1 -1
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +1 -4
- package/dist/index98.js.map +1 -1
- package/dist/index99.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +35 -37
- package/dist/src/components/BbButton/BbButton.vue.d.ts +0 -22
- package/dist/src/index.d.ts +0 -126
- /package/dist/{src/components → components}/BaseButton/BaseButton.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseCheckbox/BaseCheckbox.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseDatePicker/BaseDatePicker.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseDialog/BaseDialog.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseInputContainer/BaseInputContainer.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseNumberInput/BaseNumberInput.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseRadio/BaseRadio.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseRadioGroup/BaseRadioGroup.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseRating/BaseRating.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseSelect/BaseSelect.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseSlider/BaseSlider.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseSwitch/BaseSwitch.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseTag/BaseTag.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseTextInput/BaseTextInput.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BaseTextarea/BaseTextarea.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbAccordion/BbAccordion.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbAlert/BbAlert.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbAvatar/BbAvatar.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbBadge/BbBadge.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbCheckbox/BbCheckbox.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbChip/BbChip.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbCollapsible/BbCollapsible.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbConfirm/BbConfirm.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbDatePickerInput/BbDatePickerInput.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbDialog/BbDialog.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbDropdown/BbDropdown.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbDropdownButton/BbDropdownButton.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbDropzone/BbDropzone.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbHover/BbHover.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbIcon/BbIcon.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbIntersection/BbIntersection.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbNumberInput/BbNumberInput.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbOffCanvas/BbOffCanvas.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbPagination/BbPagination.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbPopover/BbPopover.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbProgress/BbProgress.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbRadio/BbRadio.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbRadioGroup/BbRadioGroup.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbRating/BbRating.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbRatio/BbRatio.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbSelect/BbSelect.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbSlider/BbSlider.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbSmoothHeight/BbSmoothHeight.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbSpinner/BbSpinner.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbSwitch/BbSwitch.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbSwitchGroup/BbSwitchGroup.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbTab/BbTab.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbTable/BbTable.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbTable/types.d.ts +0 -0
- /package/dist/{src/components → components}/BbTag/BbTag.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbTextInput/BbTextInput.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbTextarea/BbTextarea.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbToast/BbToast.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbToast/BbToastMessage.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbTooltip/BbTooltip.vue.d.ts +0 -0
- /package/dist/{src/components → components}/BbTree/BbTree.vue.d.ts +0 -0
- /package/dist/{src/composables → composables}/useBroadcastChannelInstance.d.ts +0 -0
- /package/dist/{src/composables → composables}/useConfirm.d.ts +0 -0
- /package/dist/{src/composables → composables}/useCountdown.d.ts +0 -0
- /package/dist/{src/composables → composables}/useId.d.ts +0 -0
- /package/dist/{src/composables → composables}/useItemText.d.ts +0 -0
- /package/dist/{src/composables → composables}/useItemValue.d.ts +0 -0
- /package/dist/{src/composables → composables}/useOptions.d.ts +0 -0
- /package/dist/{src/composables → composables}/useRoute.d.ts +0 -0
- /package/dist/{src/composables → composables}/useRouter.d.ts +0 -0
- /package/dist/{src/composables → composables}/useToast.d.ts +0 -0
- /package/dist/{src/composables → composables}/useWizard.d.ts +0 -0
- /package/dist/{src/types → types}/Classes.d.ts +0 -0
- /package/dist/{src/types → types}/CommonProps.d.ts +0 -0
- /package/dist/{src/types → types}/ExtractGenericFromComputedRef.d.ts +0 -0
- /package/dist/{src/types → types}/ExtractGenericFromRef.d.ts +0 -0
- /package/dist/{src/types → types}/NestedKeyOf.d.ts +0 -0
- /package/dist/{src/types → types}/Simplify.d.ts +0 -0
- /package/dist/{src/types → types}/VoidHtmlElements.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/add.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/booleanishToBoolean.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/capitalize.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/clamp.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/cloneDeep.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/curry.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/debounce.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/deburr.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/drop.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/empty.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/findInTree.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/findRight.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/findRightIndex.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/flattenTree.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/flow.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/get.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/groupBy.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/gt.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/head.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/identity.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/includes.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/indexBy.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/initial.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/isCssColor.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/isNil.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/isNotNil.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/last.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/lt.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/makeUrl.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/mapKeys.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/mapValues.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/matchesPropertyInsensitive.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/mean.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/merge.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/millisecondsTo.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/negate.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/noop.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/omit.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/overEvery.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/percentage.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/pick.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/pickBy.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/replace.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/replaceInTree.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/retry.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/roundToTheNearest.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/set.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/snakeCase.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/throttle.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/tryTo.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/wait.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/waitFor.d.ts +0 -0
- /package/dist/{src/utilities → utilities}/functions/when.d.ts +0 -0
package/dist/index59.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index59.js","sources":["../src/components/BbConfirm/BbConfirm.vue
|
|
1
|
+
{"version":3,"file":"index59.js","sources":["../src/components/BbConfirm/BbConfirm.vue"],"sourcesContent":["<template>\n\t<BaseDialog\n\t\t:model-value=\"state.open || state.loading\"\n\t\t:overlay-classes=\"['bb-confirm', `bb-confirm--${state.theme}`]\"\n\t\t:size=\"state.size\"\n\t\t:title=\"state.title\"\n\t\t@update:model-value=\"onModelValueUpdate\"\n\t>\n\t\t<!-- Transparently pass all slots that are not customized -->\n\t\t<template\n\t\t\tv-for=\"name in ['header', 'title', 'close', 'description']\"\n\t\t\t#[name]=\"data\"\n\t\t>\n\t\t\t<slot :name=\"name\" v-bind=\"data\"> </slot>\n\t\t</template>\n\t\t<div v-if=\"!state.loading\" class=\"bb-confirm__content\">\n\t\t\t<div v-if=\"state.text\" class=\"bb-confirm__text\">{{ state.text }}</div>\n\t\t</div>\n\t\t<slot v-else name=\"spinner\">\n\t\t\t<div class=\"bb-confirm__spinner\">\n\t\t\t\t<BbSpinner size=\"60\" />\n\t\t\t</div>\n\t\t</slot>\n\t\t<template v-if=\"!state.loading && state.actions\" #footer=\"data\">\n\t\t\t<slot\n\t\t\t\t:actions=\"state.actions\"\n\t\t\t\t:loading=\"state.loading\"\n\t\t\t\tname=\"footer\"\n\t\t\t\t:no=\"state.no\"\n\t\t\t\t:no-action=\"noAction\"\n\t\t\t\t:yes=\"state.yes\"\n\t\t\t\t:yes-action=\"yesAction\"\n\t\t\t\tv-bind=\"data\"\n\t\t\t>\n\t\t\t\t<BaseButton\n\t\t\t\t\tv-if=\"state.no\"\n\t\t\t\t\tclass=\"bb-confirm__no\"\n\t\t\t\t\t@click=\"noAction.handler\"\n\t\t\t\t>\n\t\t\t\t\t{{ noAction.text }}\n\t\t\t\t</BaseButton>\n\n\t\t\t\t<BaseButton\n\t\t\t\t\tv-if=\"state.yes\"\n\t\t\t\t\tclass=\"bb-confirm__yes\"\n\t\t\t\t\t@click=\"yesAction.handler\"\n\t\t\t\t>\n\t\t\t\t\t{{ yesAction.text }}\n\t\t\t\t</BaseButton>\n\t\t\t</slot>\n\t\t</template>\n\t</BaseDialog>\n</template>\n\n<script setup lang=\"ts\">\nimport { actions, state } from '@/composables/useConfirm';\nimport { computed } from 'vue';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BaseDialog from '../BaseDialog/BaseDialog.vue';\nimport BbSpinner from '../BbSpinner/BbSpinner.vue';\n\nconst noAction = computed(() => actions.value[0]);\nconst yesAction = computed(() => actions.value[1]);\nconst onModelValueUpdate = (value: boolean) => {\n\tif (value) yesAction.value.handler();\n\telse noAction.value.handler();\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbConfirm';\n</style>\n"],"names":["noAction","computed","actions","yesAction","onModelValueUpdate","value"],"mappings":";;;;;;;;;;;;;;;;;AA6DA,UAAMA,IAAWC,EAAS,MAAMC,EAAQ,MAAM,CAAC,CAAC,GAC1CC,IAAYF,EAAS,MAAMC,EAAQ,MAAM,CAAC,CAAC,GAC3CE,IAAqB,CAACC,MAAmB;AAC1C,MAAAA,IAAOF,EAAU,MAAM,YACtBH,EAAS,MAAM;IAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index60.js
CHANGED
package/dist/index60.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index60.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index60.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index61.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index61.js","sources":["../src/components/BbDatePickerInput/BbDatePickerInput.vue
|
|
1
|
+
{"version":3,"file":"index61.js","sources":["../src/components/BbDatePickerInput/BbDatePickerInput.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-date-picker-input\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:model-value=\"modelValue\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors }\">\n\t\t\t<BaseDatePickerInput\n\t\t\t\t:id=\"id\"\n\t\t\t\t:allow-writing=\"allowWriting\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:first-day-of-week=\"firstDayOfWeek\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:max=\"max\"\n\t\t\t\t:min=\"min\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:range=\"range\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:selectable=\"selectable\"\n\t\t\t\t:width=\"width\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template v-for=\"(_, name) in $slots\" #[name]=\"data\">\n\t\t\t\t\t<slot :name=\"name\" v-bind=\"data\" />\n\t\t\t\t</template>\n\t\t\t</BaseDatePickerInput>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseDatePickerInput from '../BaseDatePickerInput/BaseDatePickerInput.vue';\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport type { BaseDatePickerInputEvents } from '../BaseDatePickerInput/BaseDatePickerInput.vue';\nimport type { BaseDatePickerSlots } from '../BaseDatePicker/BaseDatePicker.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type { Locale } from 'dayjs/locale/it';\n\nexport type BbDatePickerInputProps = {\n\t/**\n\t * Allows typing into the input.\n\t */\n\tallowWriting?: boolean;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\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 * Disables the component\n\t */\n\tdisabled?: boolean;\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 * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n\t */\n\tfirstDayOfWeek?: Locale['weekStart'];\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 * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\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 * Maximum selectable date\n\t */\n\tmax?: Date | string | number;\n\n\t/**\n\t * Minimum selectable date\n\t */\n\tmin?: Date | string | number;\n\n\t/**\n\t * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n\t */\n\tmodelValue: string | string[] | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Selects a range of dates between two dates. It selects all of the days between start and end\n\t */\n\trange?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\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\t/**\n\t * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n\t * @param date\n\t */\n\tselectable?: (date: Date) => boolean;\n\n\t/**\n\t * Width of the calendar\n\t */\n\twidth?: number | string;\n};\n\nwithDefaults(defineProps<BbDatePickerInputProps>(), {\n\tallowWriting: true,\n});\n\nexport type BbDatePickerInputEvents = BaseDatePickerInputEvents;\n\nconst emit = defineEmits<BbDatePickerInputEvents>();\n\ndefineSlots<\n\t{\n\t\t'prepend-outer'?: (props: {}) => any;\n\t\tprepend?: (props: {}) => any;\n\t\tappend?: (props: {}) => any;\n\t\t'append-outer'?: (props: {}) => any;\n\t\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\t} & BaseDatePickerSlots\n>();\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonInactive: () => emit('inactive'),\n\tonError: (message: string) => emit('error', message),\n\t'onUpdate:modelValue': (value: BbDatePickerInputProps['modelValue']) =>\n\t\temit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDatePickerInput';\n</style>\n"],"names":["emit","__emit","eventListeners","message","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2KA,UAAMA,IAAOC,GAePC,IAAiB;AAAA,MACtB,YAAY,MAAMF,EAAK,UAAU;AAAA,MACjC,SAAS,CAACG,MAAoBH,EAAK,SAASG,CAAO;AAAA,MACnD,uBAAuB,CAACC,MACvBJ,EAAK,qBAAqBI,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index62.js
CHANGED
package/dist/index62.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index62.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index62.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index63.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index63.js","sources":["../src/components/BbDialog/BbDialog.vue
|
|
1
|
+
{"version":3,"file":"index63.js","sources":["../src/components/BbDialog/BbDialog.vue"],"sourcesContent":["<template>\n\t<!-- Events need to be propagated manually -->\n\t<BaseDialog\n\t\tv-bind=\"$props\"\n\t\t:overlay-classes=\"overlayClasses\"\n\t\t@hidden=\"() => $emit('hidden')\"\n\t\t@shown=\"() => $emit('shown')\"\n\t\t@update:model-value=\"(value: boolean) => $emit('update:modelValue', value)\"\n\t\t><template #close=\"data\"><slot name=\"close\" v-bind=\"data\" /></template\n\t\t><template #default=\"data\"><slot name=\"default\" v-bind=\"data\" /></template\n\t\t><template #description=\"data\"\n\t\t\t><slot name=\"description\" v-bind=\"data\" /></template\n\t\t><template #footer=\"data\"><slot name=\"footer\" v-bind=\"data\" /></template\n\t\t><template #header=\"data\"><slot name=\"header\" v-bind=\"data\" /></template\n\t\t><template #title=\"data\"><slot name=\"title\" v-bind=\"data\" /></template>\n\t</BaseDialog>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport BaseDialog from '../BaseDialog/BaseDialog.vue';\nimport type { Classes } from '@/types/Classes';\nimport type {\n\tBaseDialogProps,\n\tBaseDialogEvents,\n\tBaseDialogSlots,\n} from '../BaseDialog/BaseDialog.vue';\nexport type {\n\tBaseDialogProps as BbDialogProps,\n\tBaseDialogEvents as BbDialogEvents,\n\tSizes,\n} from '../BaseDialog/BaseDialog.vue';\n\nconst props = withDefaults(defineProps<BaseDialogProps>(), {\n\tshowClose: true,\n});\n\ndefineEmits<BaseDialogEvents>();\n\ndefineSlots<BaseDialogSlots>();\n\nconst overlayClasses = computed<Classes>(() => {\n\tlet base: Classes = ['bb-dialog'];\n\tif (props.overlayClasses) {\n\t\tbase = base.concat(props.overlayClasses);\n\t}\n\treturn base;\n});\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BbDialog';\n</style>\n"],"names":["props","__props","overlayClasses","computed","base"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiCA,UAAMA,IAAQC,GAQRC,IAAiBC,EAAkB,MAAM;AAC1C,UAAAC,IAAgB,CAAC,WAAW;AAChC,aAAIJ,EAAM,mBACFI,IAAAA,EAAK,OAAOJ,EAAM,cAAc,IAEjCI;AAAA,IAAA,CACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index64.js
CHANGED
package/dist/index64.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index64.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index64.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index65.js
CHANGED
|
@@ -5,9 +5,9 @@ import { useId as de } from "./index7.js";
|
|
|
5
5
|
import { wait as U } from "./index122.js";
|
|
6
6
|
import ce from "./index9.js";
|
|
7
7
|
import "./index10.js";
|
|
8
|
-
import V from "./
|
|
9
|
-
import { autoUpdate as fe, flip as pe, shift as be } from "./
|
|
10
|
-
import { offset as me } from "./
|
|
8
|
+
import V from "./index216.js";
|
|
9
|
+
import { autoUpdate as fe, flip as pe, shift as be } from "./index212.js";
|
|
10
|
+
import { offset as me } from "./index217.js";
|
|
11
11
|
const ve = ["id", "aria-labelledby"], we = { class: "bb-dropdown__items-container" }, Me = /* @__PURE__ */ Y({
|
|
12
12
|
__name: "BbDropdown",
|
|
13
13
|
props: {
|
package/dist/index65.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index65.js","sources":["../src/components/BbDropdown/BbDropdown.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, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createVNode as _createVNode, normalizeStyle as _normalizeStyle, normalizeClass as _normalizeClass, Teleport as _Teleport, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = [\"id\", \"aria-labelledby\"]\nconst _hoisted_2 = { class: \"bb-dropdown__items-container\" }\n\nimport { computed, ref } from 'vue';\nimport { findRightIndex } from '@/utilities/functions/findRightIndex';\nimport {\n\tuseFloating,\n\tautoUpdate,\n\tflip,\n\tshift,\n\tarrow,\n\toffset,\n} from '@floating-ui/vue';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport selectors from 'focusable-selectors';\nimport type { BaseButtonProps } from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbDropdownProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Array used to render each dropdown button.\n\t * They can act as `button`, as `a`, or as `router-link`\n\t * as they are based on the functionality provided by\n\t * `BaseButton`\n\t */\n\titems: Item[];\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number;\n};\n\nexport type Item = Omit<BaseButtonProps, 'block' | 'tag' | 'type'> & {\n\t/**\n\t * Click handler of the item.\n\t */\n\tonClick?: (...args: any[]) => any;\n\t/**\n\t * Key used to identify the element.\n\t */\n\tkey: string;\n};\n\nexport type MappedItem = Item & {\n\t/**\n\t * Identifier of the element among it's siblings.\n\t */\n\tid: string;\n\t/**\n\t * Keydown event used to handle accessibility.\n\t */\n\tonKeydown: (event: KeyboardEvent) => void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbDropdown',\n props: {\n arrowPadding: { default: 10 },\n block: { type: Boolean },\n disabled: { type: Boolean },\n eager: { type: Boolean },\n id: {},\n offset: { default: 3 },\n padding: { default: 6 },\n placement: { default: 'bottom' },\n theme: { default: 'default' },\n transitionDuration: { default: 150 },\n items: {},\n width: { default: 200 }\n },\n setup(__props: any) {\n\n\n\nconst props = __props;\n\nconst id = props.id ?? `bb_${useId().id.value}`;\n\nconst mappedItems = computed<MappedItem[]>(() => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\n\treturn props.items.map((item, index) => {\n\t\tconst itemid = `${id}-item-${item.key}`;\n\t\tconst { onClick: handler, ...rest } = item;\n\n\t\t/* Id a click handler has been passed close the dropdown\n\t\t * return focus and run the handler\n\t\t */\n\t\tconst onClick = async () => {\n\t\t\tawait closeDropdown();\n\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\tif (!nextElement) return;\n\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\tnextElement.focus();\n\t\t\t}\n\t\t\tif (handler) handler();\n\t\t};\n\n\t\t/**\n\t\t * On keydown\n\t\t * arrow down move to the next focusable element if it's not the last\n\t\t * arrow up move to the previous focusable element if it's not the first\n\t\t * on tab search the next focusable element after the button that opens the dropdown\n\t\t * if an element is found focus on that\n\t\t * (the menu is attached to body so it's not in order)\n\t\t */\n\t\tconst onKeydown = (event: KeyboardEvent) => {\n\t\t\tif (\n\t\t\t\tevent.target instanceof HTMLElement &&\n\t\t\t\tevent.target.dataset['dropdownItem']\n\t\t\t) {\n\t\t\t\tif (!content.value) return;\n\t\t\t\tif (event.key === 'ArrowDown') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== lastFocusableIndex) {\n\t\t\t\t\t\tconst option = content.value.querySelector(\n\t\t\t\t\t\t\tselectors.map((selector) => `#${itemid} ~ ${selector}`).join(',')\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'ArrowUp') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== firstFocusableIndex) {\n\t\t\t\t\t\tconst indexOfPrevious = findRightIndex(props.items, (item, i) => {\n\t\t\t\t\t\t\treturn i < index && !item.disabled;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tconst options = Array.from(\n\t\t\t\t\t\t\tcontent.value.querySelectorAll(`.bb-dropdown__item`)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst option = options[indexOfPrevious];\n\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'Tab') {\n\t\t\t\t\tif (index === lastFocusableIndex && !event.shiftKey) {\n\t\t\t\t\t\tconst selector = selectors.join(',');\n\t\t\t\t\t\tconst focusableElements = Array.from(\n\t\t\t\t\t\t\tdocument.querySelectorAll(selector)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst indexOfButton = focusableElements.findIndex(\n\t\t\t\t\t\t\t(el) => el.id === id\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst nextElement = focusableElements[indexOfButton + 1];\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tcloseDropdown();\n\t\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index === firstFocusableIndex && event.shiftKey) {\n\t\t\t\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tnextElement.focus();\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\n\t\treturn {\n\t\t\t...rest,\n\t\t\tdisabled: rest.disabled || props.disabled,\n\t\t\tid: itemid,\n\t\t\tonClick,\n\t\t\tonKeydown,\n\t\t};\n\t});\n});\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\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 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\n/* On click of the trigger attach elements */\nconst onClick = () => {\n\tif (opening.value || closing.value) return;\n\tif (open.value) {\n\t\tcloseDropdown();\n\t} else {\n\t\topenDropdown();\n\t}\n};\n\nconst onKeydown = async (event: KeyboardEvent) => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\tif (event.key === 'ArrowDown') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tfirstFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'ArrowUp') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tlastFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[lastFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'Tab') {\n\t\tif (open.value && !event.shiftKey) {\n\t\t\tevent.preventDefault();\n\t\t\tif (\n\t\t\t\tcontent.value &&\n\t\t\t\tmappedItems.value.length &&\n\t\t\t\tfirstFocusableIndex !== -1\n\t\t\t) {\n\t\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\toption.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onClickDocument = (event: Event) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onEsc = (event: KeyboardEvent) => {\n\tif (open.value) {\n\t\tif (event.key === 'Escape') {\n\t\t\tif (document.activeElement?.id !== id) {\n\t\t\t\tconst button = document.querySelector(`#${id}`);\n\t\t\t\tif (button instanceof HTMLElement) {\n\t\t\t\t\tbutton.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\nconst hasOpenedOnce = ref(false);\nconst openDropdown = async () => {\n\thasOpenedOnce.value = true;\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\t/* Attach listeners to document so we don't have to track them one by one */\n\tdocument.addEventListener('click', onClickDocument, { passive: true });\n\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\tdocument.addEventListener('keydown', onEsc, { passive: true });\n};\n\nconst closeDropdown = 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\tdocument.removeEventListener('click', onClickDocument);\n\tdocument.removeEventListener('focusin', onDocumentFocus);\n\tdocument.removeEventListener('keydown', onEsc);\n};\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-dropdown--block': props.block,\n\t\t[`bb-dropdown--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _mergeProps({ class: \"bb-dropdown\" }, attributes.value), [\n _createElementVNode(\"span\", {\n ref_key: \"wrapper\",\n ref: wrapper,\n class: \"bb-dropdown__wrapper\"\n }, [\n _renderSlot(_ctx.$slots, \"activator\", _normalizeProps(_guardReactiveProps({\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-expanded': open.value,\n\t\t\t\t\t\t'aria-controls': `menu_${_unref(id)}`,\n\t\t\t\t\t\tid: _unref(id),\n\t\t\t\t\t\tonClick: onClick,\n\t\t\t\t\t\tonKeydown: onKeydown,\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 (hasOpenedOnce.value || _ctx.eager)\n ? (_openBlock(), _createBlock(_Teleport, {\n key: 0,\n to: \"body\"\n }, [\n _createElementVNode(\"span\", {\n id: `menu_${_unref(id)}`,\n ref_key: \"content\",\n ref: content,\n \"aria-labelledby\": _unref(id),\n \"aria-role\": \"menu\",\n class: _normalizeClass([\"bb-dropdown__bubble-container\", {\n\t\t\t\t\t[`bb-dropdown__bubble-container--${_unref(placement)}`]: true,\n\t\t\t\t\t[`bb-dropdown__bubble-container--${_ctx.theme}`]: _ctx.theme,\n\t\t\t\t\t'bb-dropdown__bubble-container--hidden': closed.value,\n\t\t\t\t\t'bb-dropdown__bubble-container--closing': closing.value,\n\t\t\t\t\t'bb-dropdown__bubble-container--opening': opening.value,\n\t\t\t\t\t'bb-dropdown__bubble-container--open': open.value,\n\t\t\t\t}]),\n style: _normalizeStyle({\n\t\t\t\t\t..._unref(floatingStyles),\n\t\t\t\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t\t\t\t})\n }, [\n _createElementVNode(\"span\", _mergeProps({\n ref_key: \"bubblearrow\",\n ref: bubblearrow,\n class: \"bb-dropdown__arrow\"\n }, arrowAttributes.value), null, 16),\n _createElementVNode(\"span\", {\n class: \"bb-dropdown__bubble\",\n style: _normalizeStyle({ width: `${_ctx.width}px` })\n }, [\n _renderSlot(_ctx.$slots, \"prepend\", {\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 _createElementVNode(\"span\", _hoisted_2, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(mappedItems.value, (item, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: item.key\n }, [\n _renderSlot(_ctx.$slots, `item:prepend`, {\n closed: closed.value,\n closing: closing.value,\n disabled: item.disabled,\n index: index,\n item: _ctx.items[index],\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n text: item.text\n }),\n _createVNode(BaseButton, _mergeProps({\n \"aria-role\": 'menuitem',\n class: [\"bb-dropdown__item\", {\n\t\t\t\t\t\t\t\t\t'bb-dropdown__item--first': index === 0,\n\t\t\t\t\t\t\t\t\t'bb-dropdown__item--last': index === _ctx.items.length - 1,\n\t\t\t\t\t\t\t\t}],\n \"data-dropdown-item\": true\n }, item), {\n default: _withCtx(() => [\n _renderSlot(_ctx.$slots, item.key, {\n closed: closed.value,\n closing: closing.value,\n disabled: item.disabled,\n index: index,\n item: item,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n text: item.text\n }, () => [\n _renderSlot(_ctx.$slots, \"item\", {\n closed: closed.value,\n closing: closing.value,\n disabled: item.disabled,\n index: index,\n item: item,\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n text: item.text\n })\n ])\n ]),\n _: 2\n }, 1040, [\"class\"]),\n _renderSlot(_ctx.$slots, `item:append`, {\n closed: closed.value,\n closing: closing.value,\n disabled: item.disabled,\n index: index,\n item: _ctx.items[index],\n open: open.value,\n opening: opening.value,\n placement: _unref(placement),\n text: item.text\n })\n ], 64))\n }), 128))\n ]),\n _renderSlot(_ctx.$slots, \"append\", {\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 ], 4)\n ], 14, _hoisted_1)\n ]))\n : _createCommentVNode(\"\", true)\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","props","id","useId","mappedItems","computed","firstFocusableIndex","el","lastFocusableIndex","findRightIndex","item","index","itemid","handler","rest","onClick","closeDropdown","nextElement","onKeydown","event","content","option","selectors","selector","indexOfPrevious","i","focusableElements","indexOfButton","wrapper","ref","bubblearrow","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","offset","shift","arrow","opening","open","closing","closed","arrowAttributes","x","y","openDropdown","idToFocus","onClickDocument","target","isOutside","onDocumentFocus","onEsc","_a","button","hasOpenedOnce","wait","attributes","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_renderSlot","_normalizeProps","_guardReactiveProps","_unref","_createBlock","_Teleport","_normalizeClass","_normalizeStyle","_Fragment","_renderList","_createVNode","BaseButton","_withCtx","_createCommentVNode"],"mappings":";;;;;;;;;;AAGA,MAAMA,KAAa,CAAC,MAAM,iBAAiB,GACrCC,KAAa,EAAE,OAAO,kCAoEAC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,EAAE,SAAS,GAAG;AAAA,IAC5B,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,IAAI,CAAC;AAAA,IACL,QAAQ,EAAE,SAAS,EAAE;AAAA,IACrB,SAAS,EAAE,SAAS,EAAE;AAAA,IACtB,WAAW,EAAE,SAAS,SAAS;AAAA,IAC/B,OAAO,EAAE,SAAS,UAAU;AAAA,IAC5B,oBAAoB,EAAE,SAAS,IAAI;AAAA,IACnC,OAAO,CAAC;AAAA,IACR,OAAO,EAAE,SAAS,IAAI;AAAA,EACxB;AAAA,EACA,MAAMC,GAAc;AAItB,UAAMC,IAAQD,GAERE,IAAKD,EAAM,MAAM,MAAME,KAAQ,GAAG,KAAK,IAEvCC,IAAcC,EAAuB,MAAM;AAC5C,UAAAC,IAA8BL,EAAM,MAAM,UAAU,CAACM,MAAO,CAACA,EAAG,QAAQ,GACxEC,IAA6BC;AAAA,QAChCR,EAAM;AAAA,QACN,CAACS,MAAS,CAACA,EAAK;AAAA,MAAA;AAGjB,aAAOT,EAAM,MAAM,IAAI,CAACS,GAAMC,MAAU;AACvC,cAAMC,IAAS,GAAGV,CAAE,SAASQ,EAAK,GAAG,IAC/B,EAAE,SAASG,GAAS,GAAGC,MAASJ,GAKhCK,IAAU,YAAY;AAC3B,gBAAMC,EAAc;AACpB,gBAAMC,IAAc,SAAS,cAAc,IAAIf,CAAE,EAAE;AACnD,cA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AC3B,MAAMtB,EAAK;AAAA,sBAAA,CACZ;AAAA,oBAAA,CACF;AAAA,kBAAA,CACF;AAAA,kBACD,GAAG;AAAA,gBAAA,GACF,MAAM,CAAC,OAAO,CAAC;AAAA,gBAClBuD,EAAYN,EAAK,QAAQ,eAAe;AAAA,kBACtC,QAAQhB,EAAO;AAAA,kBACf,SAASD,EAAQ;AAAA,kBACjB,UAAUhC,EAAK;AAAA,kBACf,OAAAC;AAAA,kBACA,MAAMgD,EAAK,MAAMhD,CAAK;AAAA,kBACtB,MAAM8B,EAAK;AAAA,kBACX,SAASD,EAAQ;AAAA,kBACjB,WAAW4B,EAAOpC,CAAS;AAAA,kBAC3B,MAAMtB,EAAK;AAAA,gBAAA,CACZ;AAAA,iBACA,EAAE,EACN,GAAG,GAAG;AAAA,YAAA,CACR;AAAA,YACDuD,EAAYN,EAAK,QAAQ,UAAU;AAAA,cACjC,QAAQhB,EAAO;AAAA,cACf,SAASD,EAAQ;AAAA,cACjB,UAAUiB,EAAK;AAAA,cACf,MAAMlB,EAAK;AAAA,cACX,SAASD,EAAQ;AAAA,cACjB,WAAW4B,EAAOpC,CAAS;AAAA,YAAA,CAC5B;AAAA,aACA,CAAC;AAAA,QAAA,GACH,IAAIpC,EAAU;AAAA,MAAA,CAClB,KACDkF,GAAoB,IAAI,EAAI;AAAA,OAC/B,EAAE;AAAA,EAEP;AAEA,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index65.js","sources":["../src/components/BbDropdown/BbDropdown.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-dropdown\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-dropdown__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-expanded': open,\n\t\t\t\t\t\t'aria-controls': `menu_${id}`,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tonClick,\n\t\t\t\t\t\tonKeydown,\n\t\t\t\t\t\tdisabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\t\t<teleport v-if=\"hasOpenedOnce || eager\" to=\"body\">\n\t\t\t<span\n\t\t\t\t:id=\"`menu_${id}`\"\n\t\t\t\tref=\"content\"\n\t\t\t\t:aria-labelledby=\"id\"\n\t\t\t\taria-role=\"menu\"\n\t\t\t\tclass=\"bb-dropdown__bubble-container\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t[`bb-dropdown__bubble-container--${placement}`]: true,\n\t\t\t\t\t[`bb-dropdown__bubble-container--${theme}`]: theme,\n\t\t\t\t\t'bb-dropdown__bubble-container--hidden': closed,\n\t\t\t\t\t'bb-dropdown__bubble-container--closing': closing,\n\t\t\t\t\t'bb-dropdown__bubble-container--opening': opening,\n\t\t\t\t\t'bb-dropdown__bubble-container--open': open,\n\t\t\t\t}\"\n\t\t\t\t:style=\"{\n\t\t\t\t\t...floatingStyles,\n\t\t\t\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t\t\t\t}\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tref=\"bubblearrow\"\n\t\t\t\t\tclass=\"bb-dropdown__arrow\"\n\t\t\t\t\tv-bind=\"arrowAttributes\"\n\t\t\t\t></span>\n\t\t\t\t<span class=\"bb-dropdown__bubble\" :style=\"{ width: `${width}px` }\">\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\tname=\"prepend\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t></slot>\n\t\t\t\t\t<span class=\"bb-dropdown__items-container\">\n\t\t\t\t\t\t<template v-for=\"(item, index) in mappedItems\" :key=\"item.key\">\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t\t\t:name=\"`item:prepend`\"\n\t\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t\t></slot>\n\t\t\t\t\t\t\t<BaseButton\n\t\t\t\t\t\t\t\t:aria-role=\"'menuitem'\"\n\t\t\t\t\t\t\t\tclass=\"bb-dropdown__item\"\n\t\t\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t\t\t'bb-dropdown__item--first': index === 0,\n\t\t\t\t\t\t\t\t\t'bb-dropdown__item--last': index === items.length - 1,\n\t\t\t\t\t\t\t\t}\"\n\t\t\t\t\t\t\t\t:data-dropdown-item=\"true\"\n\t\t\t\t\t\t\t\tv-bind=\"item\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t\t\t:item=\"item\"\n\t\t\t\t\t\t\t\t\t:name=\"item.key\"\n\t\t\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t\t\t\t:item=\"item\"\n\t\t\t\t\t\t\t\t\t\tname=\"item\"\n\t\t\t\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t\t\t\t></slot>\n\t\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t</BaseButton>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t\t\t:name=\"`item:append`\"\n\t\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t\t></slot>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\tname=\"append\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t></slot>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t</teleport>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport { findRightIndex } from '@/utilities/functions/findRightIndex';\nimport {\n\tuseFloating,\n\tautoUpdate,\n\tflip,\n\tshift,\n\tarrow,\n\toffset,\n} from '@floating-ui/vue';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport selectors from 'focusable-selectors';\nimport type { BaseButtonProps } from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbDropdownProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Array used to render each dropdown button.\n\t * They can act as `button`, as `a`, or as `router-link`\n\t * as they are based on the functionality provided by\n\t * `BaseButton`\n\t */\n\titems: Item[];\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number;\n};\n\ndefineSlots<\n\t{\n\t\tactivator?: (props: {\n\t\t\tprops: {\n\t\t\t\t'aria-expanded': boolean;\n\t\t\t\t'aria-controls': string;\n\t\t\t\tid: string;\n\t\t\t\tonClick: MappedItem['onClick'];\n\t\t\t\tonKeydown: MappedItem['onKeydown'];\n\t\t\t\tdisabled?: BbDropdownProps['disabled'];\n\t\t\t};\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t\tprepend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t\t'item:prepend'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\titem?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\t'item:append'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\tappend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t} & {\n\t\t[key: string]: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t}\n>();\n\nexport type Item = Omit<BaseButtonProps, 'block' | 'tag' | 'type'> & {\n\t/**\n\t * Click handler of the item.\n\t */\n\tonClick?: (...args: any[]) => any;\n\t/**\n\t * Key used to identify the element.\n\t */\n\tkey: string;\n};\n\nexport type MappedItem = Item & {\n\t/**\n\t * Identifier of the element among it's siblings.\n\t */\n\tid: string;\n\t/**\n\t * Keydown event used to handle accessibility.\n\t */\n\tonKeydown: (event: KeyboardEvent) => void;\n};\n\nconst props = withDefaults(defineProps<BbDropdownProps>(), {\n\tarrowPadding: 10,\n\tplacement: 'bottom',\n\ttheme: 'default',\n\ttransitionDuration: 150,\n\twidth: 200,\n\tpadding: 6,\n\toffset: 3,\n});\n\nconst id = props.id ?? `bb_${useId().id.value}`;\n\nconst mappedItems = computed<MappedItem[]>(() => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\n\treturn props.items.map((item, index) => {\n\t\tconst itemid = `${id}-item-${item.key}`;\n\t\tconst { onClick: handler, ...rest } = item;\n\n\t\t/* Id a click handler has been passed close the dropdown\n\t\t * return focus and run the handler\n\t\t */\n\t\tconst onClick = async () => {\n\t\t\tawait closeDropdown();\n\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\tif (!nextElement) return;\n\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\tnextElement.focus();\n\t\t\t}\n\t\t\tif (handler) handler();\n\t\t};\n\n\t\t/**\n\t\t * On keydown\n\t\t * arrow down move to the next focusable element if it's not the last\n\t\t * arrow up move to the previous focusable element if it's not the first\n\t\t * on tab search the next focusable element after the button that opens the dropdown\n\t\t * if an element is found focus on that\n\t\t * (the menu is attached to body so it's not in order)\n\t\t */\n\t\tconst onKeydown = (event: KeyboardEvent) => {\n\t\t\tif (\n\t\t\t\tevent.target instanceof HTMLElement &&\n\t\t\t\tevent.target.dataset['dropdownItem']\n\t\t\t) {\n\t\t\t\tif (!content.value) return;\n\t\t\t\tif (event.key === 'ArrowDown') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== lastFocusableIndex) {\n\t\t\t\t\t\tconst option = content.value.querySelector(\n\t\t\t\t\t\t\tselectors.map((selector) => `#${itemid} ~ ${selector}`).join(',')\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'ArrowUp') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== firstFocusableIndex) {\n\t\t\t\t\t\tconst indexOfPrevious = findRightIndex(props.items, (item, i) => {\n\t\t\t\t\t\t\treturn i < index && !item.disabled;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tconst options = Array.from(\n\t\t\t\t\t\t\tcontent.value.querySelectorAll(`.bb-dropdown__item`)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst option = options[indexOfPrevious];\n\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'Tab') {\n\t\t\t\t\tif (index === lastFocusableIndex && !event.shiftKey) {\n\t\t\t\t\t\tconst selector = selectors.join(',');\n\t\t\t\t\t\tconst focusableElements = Array.from(\n\t\t\t\t\t\t\tdocument.querySelectorAll(selector)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst indexOfButton = focusableElements.findIndex(\n\t\t\t\t\t\t\t(el) => el.id === id\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst nextElement = focusableElements[indexOfButton + 1];\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tcloseDropdown();\n\t\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index === firstFocusableIndex && event.shiftKey) {\n\t\t\t\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tnextElement.focus();\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\n\t\treturn {\n\t\t\t...rest,\n\t\t\tdisabled: rest.disabled || props.disabled,\n\t\t\tid: itemid,\n\t\t\tonClick,\n\t\t\tonKeydown,\n\t\t};\n\t});\n});\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\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 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\n/* On click of the trigger attach elements */\nconst onClick = () => {\n\tif (opening.value || closing.value) return;\n\tif (open.value) {\n\t\tcloseDropdown();\n\t} else {\n\t\topenDropdown();\n\t}\n};\n\nconst onKeydown = async (event: KeyboardEvent) => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\tif (event.key === 'ArrowDown') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tfirstFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'ArrowUp') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tlastFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[lastFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'Tab') {\n\t\tif (open.value && !event.shiftKey) {\n\t\t\tevent.preventDefault();\n\t\t\tif (\n\t\t\t\tcontent.value &&\n\t\t\t\tmappedItems.value.length &&\n\t\t\t\tfirstFocusableIndex !== -1\n\t\t\t) {\n\t\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\toption.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onClickDocument = (event: Event) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onEsc = (event: KeyboardEvent) => {\n\tif (open.value) {\n\t\tif (event.key === 'Escape') {\n\t\t\tif (document.activeElement?.id !== id) {\n\t\t\t\tconst button = document.querySelector(`#${id}`);\n\t\t\t\tif (button instanceof HTMLElement) {\n\t\t\t\t\tbutton.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\nconst hasOpenedOnce = ref(false);\nconst openDropdown = async () => {\n\thasOpenedOnce.value = true;\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\t/* Attach listeners to document so we don't have to track them one by one */\n\tdocument.addEventListener('click', onClickDocument, { passive: true });\n\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\tdocument.addEventListener('keydown', onEsc, { passive: true });\n};\n\nconst closeDropdown = 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\tdocument.removeEventListener('click', onClickDocument);\n\tdocument.removeEventListener('focusin', onDocumentFocus);\n\tdocument.removeEventListener('keydown', onEsc);\n};\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-dropdown--block': props.block,\n\t\t[`bb-dropdown--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDropdown';\n</style>\n"],"names":["props","__props","id","useId","mappedItems","computed","firstFocusableIndex","el","lastFocusableIndex","findRightIndex","item","index","itemid","handler","rest","onClick","closeDropdown","nextElement","onKeydown","event","content","option","selectors","selector","indexOfPrevious","i","focusableElements","indexOfButton","wrapper","ref","bubblearrow","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","offset","shift","arrow","opening","open","closing","closed","arrowAttributes","x","y","openDropdown","idToFocus","onClickDocument","target","isOutside","onDocumentFocus","onEsc","_a","button","hasOpenedOnce","wait","attributes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA6RA,UAAMA,IAAQC,GAURC,IAAKF,EAAM,MAAM,MAAMG,KAAQ,GAAG,KAAK,IAEvCC,IAAcC,EAAuB,MAAM;AAC5C,UAAAC,IAA8BN,EAAM,MAAM,UAAU,CAACO,MAAO,CAACA,EAAG,QAAQ,GACxEC,IAA6BC;AAAA,QAChCT,EAAM;AAAA,QACN,CAACU,MAAS,CAACA,EAAK;AAAA,MAAA;AAGjB,aAAOV,EAAM,MAAM,IAAI,CAACU,GAAMC,MAAU;AACvC,cAAMC,IAAS,GAAGV,CAAE,SAASQ,EAAK,GAAG,IAC/B,EAAE,SAASG,GAAS,GAAGC,MAASJ,GAKhCK,IAAU,YAAY;AAC3B,gBAAMC,EAAc;AACpB,gBAAMC,IAAc,SAAS,cAAc,IAAIf,CAAE,EAAE;AACnD,cAAKe;AAAa,YACTA,aAAuB,eAC/BA,EAAY,MAAM;AAAA;AAFD;AAId,UAAAJ,KAAiBA;QAAA,GAWhBK,IAAY,CAACC,MAAyB;AAC3C,cACCA,EAAM,kBAAkB,eACxBA,EAAM,OAAO,QAAQ,cACpB;AACD,gBAAI,CAACC,EAAQ;AAAO;AAChB,gBAAAD,EAAM,QAAQ;AAEb,kBADJA,EAAM,eAAe,GACjBC,EAAQ,SAAST,MAAUH,GAAoB;AAC5C,sBAAAa,IAASD,EAAQ,MAAM;AAAA,kBAC5BE,EAAU,IA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,QAC5B,CAAC,sBAAsBA,EAAM,KAAK,EAAE,GAAGA,EAAM;AAAA,MAAA;AAAA,IAGtC,EAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index66.js
CHANGED
package/dist/index66.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index66.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index66.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index67.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index67.js","sources":["../src/components/BbDropdownButton/BbDropdownButton.vue
|
|
1
|
+
{"version":3,"file":"index67.js","sources":["../src/components/BbDropdownButton/BbDropdownButton.vue"],"sourcesContent":["<template>\n\t<span\n\t\tclass=\"bb-dropdown-button\"\n\t\t:class=\"{\n\t\t\t'bb-dropdown-button--block': block,\n\t\t\t[`bb-dropdown-button--theme-${props.theme}`]: props.theme,\n\t\t}\"\n\t>\n\t\t<BaseButton v-bind=\"mainBtn\" class=\"bb-dropdown-button__main-btn\">\n\t\t\t<slot\n\t\t\t\t:disabled=\"mainBtn.disabled\"\n\t\t\t\tname=\"left-btn\"\n\t\t\t\t:text=\"mainBtn.text\"\n\t\t\t></slot>\n\t\t</BaseButton>\n\t\t<BbDropdown\n\t\t\t:id=\"id\"\n\t\t\t:arrow-padding=\"arrowPadding\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:eager=\"eager\"\n\t\t\t:items=\"items\"\n\t\t\t:offset=\"offset\"\n\t\t\t:padding=\"padding\"\n\t\t\t:placement=\"placement\"\n\t\t\t:theme=\"theme\"\n\t\t\t:transition-duration=\"transitionDuration\"\n\t\t\t:width=\"width\"\n\t\t>\n\t\t\t<template\n\t\t\t\t#activator=\"{\n\t\t\t\t\tprops,\n\t\t\t\t\topening,\n\t\t\t\t\topen,\n\t\t\t\t\tclosed,\n\t\t\t\t\tclosing,\n\t\t\t\t\tdisabled,\n\t\t\t\t\tplacement,\n\t\t\t\t}\"\n\t\t\t>\n\t\t\t\t<slot\n\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\tname=\"activator\"\n\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t:props=\"props\"\n\t\t\t\t>\n\t\t\t\t\t<BaseButton v-bind=\"props\" class=\"bb-dropdown-button__dropdown-btn\">\n\t\t\t\t\t\t<span class=\"bb-dropdown-button__dropdown-label\"\n\t\t\t\t\t\t\t>{{ open || opening ? 'Chiudi' : 'Apri' }} il menu</span\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\tname=\"right-btn\"\n\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclass=\"bb-dropdown-button__dropdown-chevron\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\td=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6l1.41 1.41Z\"\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t/></svg></slot></BaseButton></slot\n\t\t\t></template>\n\t\t\t<template #prepend=\"data\"><slot name=\"prepend\" v-bind=\"data\" /></template>\n\t\t\t<template #item:prepend=\"data\">\n\t\t\t\t<slot name=\"item:prepend\" v-bind=\"data\" />\n\t\t\t</template>\n\t\t\t<template #item=\"data\"><slot name=\"item\" v-bind=\"data\" /></template>\n\t\t\t<template v-for=\"item in items\" #[item.key]=\"data\">\n\t\t\t\t<slot :name=\"item.key\" v-bind=\"data\" />\n\t\t\t</template>\n\t\t\t<template #item:append=\"data\">\n\t\t\t\t<slot name=\"item:append\" v-bind=\"data\" />\n\t\t\t</template>\n\t\t\t<template #append=\"data\"><slot name=\"append\" v-bind=\"data\" /></template>\n\t\t</BbDropdown>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BbDropdown from '../BbDropdown/BbDropdown.vue';\nimport type { BbDropdownProps, MappedItem } from '../BbDropdown/BbDropdown.vue';\n\nexport type BbDropdownButtonProps = Pick<\n\tBbDropdownProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'items'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'theme'\n\t| 'transitionDuration'\n\t| 'width'\n>;\n\nconst props = withDefaults(defineProps<BbDropdownButtonProps>(), {\n\ttheme: 'default',\n});\n\ndefineSlots<\n\t{\n\t\t'left-btn'?: (props: {\n\t\t\tdisabled?: boolean;\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\tactivator?: (props: {\n\t\t\tprops: {\n\t\t\t\t'aria-expanded': boolean;\n\t\t\t\t'aria-controls': string;\n\t\t\t\tid: string;\n\t\t\t\tonClick: MappedItem['onClick'];\n\t\t\t\tonKeydown: MappedItem['onKeydown'];\n\t\t\t\tdisabled?: BbDropdownButtonProps['disabled'];\n\t\t\t};\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t}) => any;\n\t\tprepend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t}) => any;\n\t\t'item:prepend'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownButtonProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\titem?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownButtonProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\t'item:append'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownButtonProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\tappend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t}) => any;\n\t\t'right-btn'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t}) => any;\n\t} & {\n\t\t[key: string]: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownButtonProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t}\n>();\n\nconst mainBtn = computed(() => {\n\tconst base = { ...props.items[0] };\n\tbase.disabled = base.disabled || props.disabled;\n\treturn base;\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDropdownButton';\n</style>\n"],"names":["props","__props","mainBtn","computed","base"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GA,UAAMA,IAAQC,GAkGRC,IAAUC,EAAS,MAAM;AAC9B,YAAMC,IAAO,EAAE,GAAGJ,EAAM,MAAM,CAAC,EAAE;AAC5B,aAAAI,EAAA,WAAWA,EAAK,YAAYJ,EAAM,UAChCI;AAAA,IAAA,CACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index68.js
CHANGED
package/dist/index68.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index68.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index68.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index69.js
CHANGED
|
@@ -57,7 +57,7 @@ const le = ["accept", "autofocus", "disabled", "multiple"], se = {
|
|
|
57
57
|
if (r.includes("/"))
|
|
58
58
|
e.push(r);
|
|
59
59
|
else {
|
|
60
|
-
b || (b = await import("./index224.js")
|
|
60
|
+
b || (b = await import("./index224.js"));
|
|
61
61
|
const o = b.getType(r);
|
|
62
62
|
if (!o)
|
|
63
63
|
throw new Error(
|
|
@@ -71,18 +71,18 @@ const le = ["accept", "autofocus", "disabled", "multiple"], se = {
|
|
|
71
71
|
},
|
|
72
72
|
{ immediate: !0 }
|
|
73
73
|
);
|
|
74
|
-
const z = t.id || `${re().id.value}`, v = `bb_dz_${z}`,
|
|
74
|
+
const z = t.id || `${re().id.value}`, v = `bb_dz_${z}`, n = g(!1);
|
|
75
75
|
let T;
|
|
76
76
|
const k = m(() => ({
|
|
77
77
|
"bb-dropzone": !0,
|
|
78
78
|
"bb-dropzone--errors": R.value,
|
|
79
|
-
"bb-dropzone--dragging":
|
|
79
|
+
"bb-dropzone--dragging": n.value
|
|
80
80
|
})), q = m(() => ({
|
|
81
|
-
dragging:
|
|
81
|
+
dragging: n.value,
|
|
82
82
|
focused: h.value,
|
|
83
83
|
id: z
|
|
84
84
|
})), $ = (e) => {
|
|
85
|
-
if (
|
|
85
|
+
if (n.value = !1, e.dataTransfer) {
|
|
86
86
|
e.stopImmediatePropagation();
|
|
87
87
|
let a;
|
|
88
88
|
if (a = Array.from(e.dataTransfer.files), a = _(a), t.multiple ? Array.isArray(t.modelValue) && l("update:modelValue", [...t.modelValue, ...a]) : (a = a[0], l("update:modelValue", a)), e.currentTarget instanceof HTMLLabelElement) {
|
|
@@ -103,10 +103,10 @@ const le = ["accept", "autofocus", "disabled", "multiple"], se = {
|
|
|
103
103
|
return l("error", f.maxSize(a)), !1;
|
|
104
104
|
let o = !1;
|
|
105
105
|
return t.modelValue && (Array.isArray(t.modelValue) ? o = t.modelValue.some(
|
|
106
|
-
(
|
|
107
|
-
) : o = S(t.modelValue, a)), o ? (l("error", f.uniqueness(a)), !1) : t.accept && !p.value.some((
|
|
106
|
+
(i) => S(i, a)
|
|
107
|
+
) : o = S(t.modelValue, a)), o ? (l("error", f.uniqueness(a)), !1) : t.accept && !p.value.some((s) => {
|
|
108
108
|
let u = !1;
|
|
109
|
-
return
|
|
109
|
+
return s.includes("*") ? u = u || s.split("/")[0] === a.type.split("/")[0] : u = u || s === a.type, u;
|
|
110
110
|
}) ? (l("error", f.accept(a)), !1) : t.maxFiles && Array.isArray(t.modelValue) && t.modelValue.length + r + 1 > t.maxFiles ? (l(
|
|
111
111
|
"error",
|
|
112
112
|
f.maxFiles(a, t.modelValue.length + r + 1)
|
|
@@ -122,16 +122,16 @@ const le = ["accept", "autofocus", "disabled", "multiple"], se = {
|
|
|
122
122
|
r && (r.id === v ? B() : E());
|
|
123
123
|
}
|
|
124
124
|
}, B = () => {
|
|
125
|
-
clearTimeout(T),
|
|
125
|
+
clearTimeout(T), n.value = !0;
|
|
126
126
|
}, E = () => {
|
|
127
127
|
T = setTimeout(() => {
|
|
128
|
-
|
|
128
|
+
n.value = !1;
|
|
129
129
|
}, 100);
|
|
130
130
|
}, A = (e, a = 2) => {
|
|
131
131
|
if (!e)
|
|
132
132
|
return "0 B";
|
|
133
|
-
const r = 1024, o = a || 0,
|
|
134
|
-
return parseFloat((e / Math.pow(r,
|
|
133
|
+
const r = 1024, o = a || 0, i = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], s = Math.floor(Math.log(e) / Math.log(r));
|
|
134
|
+
return parseFloat((e / Math.pow(r, s)).toFixed(o)) + " " + i[s];
|
|
135
135
|
}, S = (e, a) => !["name", "size", "lastModified", "type"].some((o) => e[o] !== a[o]), f = {
|
|
136
136
|
maxSize: (e) => {
|
|
137
137
|
if (t.maxSize)
|
package/dist/index69.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index69.js","sources":["../src/components/BbDropzone/BbDropzone.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, withModifiers as _withModifiers, unref as _unref, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, withCtx as _withCtx, createVNode as _createVNode, resolveDynamicComponent as _resolveDynamicComponent, normalizeClass as _normalizeClass, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = [\"accept\", \"autofocus\", \"disabled\", \"multiple\"]\nconst _hoisted_2 = {\n \"aria-hidden\": \"true\",\n class: \"bb-dropzone__submittable-label\"\n}\nconst _hoisted_3 = [\"id\", \"disabled\", \"multiple\", \"name\"]\nconst _hoisted_4 = { class: \"bb-dropzone__errors\" }\n\nimport { computed, ref, watch } from 'vue';\nimport { findInTree } from '@/utilities/functions/findInTree';\nimport { useId } from '@/composables/useId';\nimport BbSmoothHeight from '../BbSmoothHeight/BbSmoothHeight.vue';\nimport type { CommonProps, NonVoidElementTag } from '@/types/CommonProps';\n\nexport type DropZoneError = ReturnType<\n\t(typeof createError)[keyof typeof createError]\n>;\n\nexport type BbDropzoneProps = Pick<\n\tCommonProps,\n\t'autofocus' | 'disabled' | 'errors' | 'hasErrors' | 'id' | 'multiple' | 'name'\n> & {\n\t/**\n\t * Array of mime-types or extensions to filter selectable files.\n\t */\n\taccept?: string[];\n\t/**\n\t * Maximum number of acceptable files\n\t */\n\tmaxFiles?: number;\n\t/**\n\t * Max size of the files in bytes.\n\t */\n\tmaxSize?: number;\n\t/**\n\t * Used by v-model.\n\t */\n\tmodelValue: any;\n} & NonVoidElementTag;\n\n// This is the dynamic import for mime\nexport type BbDropzoneEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'error', data: DropZoneError): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'update:modelValue', data: any): void;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbDropzone',\n props: {\n autofocus: {},\n disabled: { type: Boolean },\n errors: {},\n hasErrors: { type: Boolean },\n id: {},\n multiple: { type: Boolean },\n name: {},\n accept: {},\n maxFiles: {},\n maxSize: {},\n modelValue: {},\n tag: { default: 'div' }\n },\n emits: [\"blur\", \"error\", \"focus\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nlet mime: any;\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst submittable = ref<any | null>(null);\n\nif (props.accept) {\n\tif (!Array.isArray(props.accept)) {\n\t\tthrow new Error('Property accept is not an array');\n\t}\n}\nif (props.multiple) {\n\tif (!Array.isArray(props.modelValue)) {\n\t\tthrow new Error(\n\t\t\t'Component is set to multiple but modelValue is not an array'\n\t\t);\n\t}\n}\n\nconst hasFocus = ref(false);\nconst onFocus = (event: FocusEvent) => {\n\thasFocus.value = true;\n\temit('focus', event);\n};\nconst onBlur = (event: FocusEvent) => {\n\thasFocus.value = false;\n\temit('blur', event);\n};\n\n/** Allow dropzone to be submittable (this is flimsy and might break) */\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\tlet container = new DataTransfer();\n\t\tif (Array.isArray(props.modelValue)) {\n\t\t\tif (props.modelValue.length) {\n\t\t\t\tprops.modelValue.forEach((file) => container.items.add(file));\n\t\t\t}\n\t\t} else {\n\t\t\tif (props.modelValue) container.items.add(props.modelValue);\n\t\t}\n\t\tif (submittable.value) {\n\t\t\tif (container.items.length) {\n\t\t\t\tsubmittable.value.files = container.files;\n\t\t\t} else {\n\t\t\t\tsubmittable.value.files = null;\n\t\t\t}\n\t\t}\n\t}\n);\n\nconst acceptedMimeTypes = ref<string[]>([]);\nconst acceptedMimeTypesString = computed(() =>\n\tacceptedMimeTypes.value.join(',')\n);\nwatch(\n\t() => props.accept,\n\tasync () => {\n\t\tif (props.accept) {\n\t\t\tlet accumulated = [];\n\t\t\tfor (let i = 0; i < props.accept.length; i++) {\n\t\t\t\tconst element = props.accept[i];\n\t\t\t\tif (element.includes('/')) accumulated.push(element);\n\t\t\t\telse {\n\t\t\t\t\tif (!mime) mime = await import('mime');\n\t\t\t\t\tconst foundMime = mime.getType(element);\n\t\t\t\t\tif (!foundMime) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`Could not detect the correct mime associated with ${element}`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\taccumulated.push(foundMime);\n\t\t\t\t}\n\t\t\t}\n\t\t\tacceptedMimeTypes.value = accumulated;\n\t\t}\n\t},\n\t{ immediate: true }\n);\n\n/**\n * Component state\n */\nconst id = props.id || `${useId().id.value}`;\nconst containerId = `bb_dz_${id}`;\n\nconst dragging = ref(false);\n// Add a timeout to prevent browser flickering\nlet draggingTimeout: ReturnType<typeof setTimeout>;\n\nconst classes = computed(() => {\n\treturn {\n\t\t'bb-dropzone': true,\n\t\t'bb-dropzone--errors': hasErrors.value,\n\t\t'bb-dropzone--dragging': dragging.value,\n\t};\n});\nconst slotAttributes = computed(() => {\n\treturn {\n\t\tdragging: dragging.value,\n\t\tfocused: hasFocus.value,\n\t\tid: id,\n\t};\n});\n\n/**\n * Component handlers\n */\nconst onDrop = (event: DragEvent) => {\n\tdragging.value = false;\n\n\tif (event.dataTransfer) {\n\t\tevent.stopImmediatePropagation();\n\t\tlet files;\n\t\tfiles = Array.from(event.dataTransfer.files);\n\t\tfiles = parseFiles(files);\n\t\tif (props.multiple) {\n\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\temit('update:modelValue', [...props.modelValue, ...files]);\n\t\t\t}\n\t\t} else {\n\t\t\tfiles = files[0];\n\t\t\temit('update:modelValue', files);\n\t\t}\n\t\tif (event.currentTarget instanceof HTMLLabelElement) {\n\t\t\tconst innerInput = event.currentTarget.querySelector('input[type=file]');\n\t\t\tif (innerInput instanceof HTMLInputElement) {\n\t\t\t\tinnerInput.focus();\n\t\t\t}\n\t\t}\n\t}\n};\nconst onChange = (event: Event) => {\n\tif (event.target instanceof HTMLInputElement) {\n\t\tif (event.target.files) {\n\t\t\tlet files;\n\t\t\tfiles = parseFiles(Array.from(event.target.files));\n\t\t\tif (props.multiple) {\n\t\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\t\temit('update:modelValue', [...props.modelValue, ...files]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfiles = files[0];\n\t\t\t\temit('update:modelValue', files);\n\t\t\t}\n\t\t}\n\t\tevent.target.value = '';\n\t\tevent.target.files = null;\n\t}\n};\n\nconst parseFiles = (files: File[]) => {\n\treturn files.filter((file, index) => {\n\t\t// Sizecheck\n\t\tif (props.maxSize) {\n\t\t\tlet passing = file.size <= props.maxSize;\n\t\t\tif (!passing) {\n\t\t\t\temit('error', createError.maxSize(file));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Uniqueness check\n\t\tlet alreadyExists = false;\n\t\tif (props.modelValue) {\n\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\talreadyExists = props.modelValue.some((current) =>\n\t\t\t\t\tcompareFiles(current, file)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\talreadyExists = compareFiles(props.modelValue, file);\n\t\t\t}\n\t\t}\n\t\tif (alreadyExists) {\n\t\t\temit('error', createError.uniqueness(file));\n\t\t\treturn false;\n\t\t}\n\t\t// Mime type check\n\t\tif (props.accept) {\n\t\t\tconst mimePassed = acceptedMimeTypes.value.some((mime) => {\n\t\t\t\tlet found = false;\n\t\t\t\tif (mime.includes('*'))\n\t\t\t\t\tfound = found || mime.split('/')[0] === file.type.split('/')[0];\n\t\t\t\telse found = found || mime === file.type;\n\t\t\t\treturn found;\n\t\t\t});\n\t\t\tif (!mimePassed) {\n\t\t\t\temit('error', createError.accept(file));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Max files check\n\t\tif (props.maxFiles) {\n\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\tif (props.modelValue.length + index + 1 > props.maxFiles) {\n\t\t\t\t\temit(\n\t\t\t\t\t\t'error',\n\t\t\t\t\t\tcreateError.maxFiles(file, props.modelValue.length + index + 1)\n\t\t\t\t\t);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n};\n\nconst onDragOver = (event: Event) => {\n\t// Find the closest dropzone in case of nested dropzones\n\tconst target = event.target;\n\tif (target instanceof HTMLElement) {\n\t\tconst closestDropzone = findInTree([target], 'parentElement', (el) =>\n\t\t\tel.classList.contains('bb-dropzone')\n\t\t);\n\t\tif (closestDropzone) {\n\t\t\t/* When dragging over this dropzone set as dragging */\n\t\t\tif (closestDropzone.id === containerId) {\n\t\t\t\tsetDragging();\n\t\t\t\t/* When dragging over a nested dropzone do not highlight this dropzone */\n\t\t\t} else {\n\t\t\t\tunsetDragging();\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst setDragging = () => {\n\tclearTimeout(draggingTimeout);\n\tdragging.value = true;\n};\n\nconst unsetDragging = () => {\n\tdraggingTimeout = setTimeout(() => {\n\t\tdragging.value = false;\n\t}, 100);\n};\n\nconst bytesToUnit = (bytes: number, decimals = 2) => {\n\tif (!bytes) return '0 B';\n\tconst k = 1024;\n\tconst dm = decimals || 0;\n\tconst sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\tconst i = Math.floor(Math.log(bytes) / Math.log(k));\n\treturn parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n};\n\n/**\n * Returns true if files are identical by the properties that are accessible\n * @param file The file to check\n * @param otherFile The file to check against\n */\nconst compareFiles = (file: File, otherFile: File) => {\n\tconst properties: (keyof File)[] = ['name', 'size', 'lastModified', 'type'];\n\treturn !properties.some((key) => file[key] !== otherFile[key]);\n};\n\n/**\n * Helper that creates errors based on component properties\n */\nconst createError = {\n\tmaxSize: (file: File) => {\n\t\t// Todo update to isNil\n\t\tif (props.maxSize) {\n\t\t\treturn {\n\t\t\t\ttype: 'maxSize',\n\t\t\t\tfile: file,\n\t\t\t\tformattedMaxSize: bytesToUnit(+props.maxSize),\n\t\t\t\tformattedSize: bytesToUnit(file.size),\n\t\t\t\tfilename: file.name,\n\t\t\t} as const;\n\t\t} else\n\t\t\tthrow new Error(\n\t\t\t\t'Requested to create an error for maxSize without providing a maxSize.'\n\t\t\t);\n\t},\n\tuniqueness: (file: File) => {\n\t\treturn {\n\t\t\ttype: 'uniqueness',\n\t\t\tfile: file,\n\t\t\tfilename: file.name,\n\t\t} as const;\n\t},\n\taccept: (file: File) => {\n\t\treturn {\n\t\t\ttype: 'accept',\n\t\t\tfile: file,\n\t\t\tacceptedMimeTypes: acceptedMimeTypes.value,\n\t\t\tmimeType: file.type,\n\t\t\tfilename: file.name,\n\t\t} as const;\n\t},\n\tmaxFiles: (file: File, totalFiles: number) => {\n\t\treturn {\n\t\t\ttype: 'maxFiles',\n\t\t\tfile: file,\n\t\t\tmaxFiles: props.maxFiles,\n\t\t\ttotalFiles,\n\t\t\tfilename: file.name,\n\t\t} as const;\n\t},\n};\n\nconst computedErrors = computed(() => {\n\treturn props.errors ? ([] as string[]).concat(props.errors) : [];\n});\n\nconst hasErrors = computed(\n\t() => Boolean(computedErrors.value.length) || props.hasErrors\n);\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), {\n id: containerId,\n class: _normalizeClass(classes.value)\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"label\", {\n onDragenter: _withModifiers(setDragging, [\"prevent\"]),\n onDragleave: _withModifiers(unsetDragging, [\"prevent\"]),\n onDragover: _withModifiers(onDragOver, [\"prevent\"]),\n onDrop: _withModifiers(onDrop, [\"prevent\"])\n }, [\n _createElementVNode(\"input\", {\n accept: acceptedMimeTypesString.value,\n autofocus: _ctx.autofocus,\n disabled: _ctx.disabled,\n multiple: _ctx.multiple,\n type: \"file\",\n onBlur: onBlur,\n onChange: onChange,\n onFocus: onFocus\n }, null, 40, _hoisted_1),\n _renderSlot(_ctx.$slots, \"default\", _normalizeProps(_guardReactiveProps(slotAttributes.value)))\n ], 32),\n _createElementVNode(\"label\", _hoisted_2, [\n _createTextVNode(\" Server files \"),\n _createElementVNode(\"input\", {\n id: _unref(id),\n ref_key: \"submittable\",\n ref: submittable,\n class: \"bb-dropzone__submittable-input\",\n disabled: _ctx.disabled,\n multiple: _ctx.multiple,\n name: _ctx.name,\n type: \"file\"\n }, null, 8, _hoisted_3)\n ]),\n _createElementVNode(\"span\", _hoisted_4, [\n _createVNode(BbSmoothHeight, { tag: \"span\" }, {\n default: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(computedErrors.value, (error) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n key: error,\n class: \"bb-dropzone__error\"\n }, _toDisplayString(error), 1))\n }), 128))\n ]),\n _: 1\n })\n ])\n ]),\n _: 3\n }, 8, [\"class\"]))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_sfc_main","_defineComponent","__props","__emit","mime","props","emit","submittable","ref","hasFocus","onFocus","event","onBlur","watch","container","file","acceptedMimeTypes","acceptedMimeTypesString","computed","accumulated","i","element","foundMime","id","useId","containerId","dragging","draggingTimeout","classes","hasErrors","slotAttributes","onDrop","files","parseFiles","innerInput","onChange","index","createError","alreadyExists","current","compareFiles","found","onDragOver","target","closestDropzone","findInTree","el","setDragging","unsetDragging","bytesToUnit","bytes","decimals","k","dm","sizes","otherFile","key","totalFiles","computedErrors","_ctx","_cache","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_withCtx","_createElementVNode","_withModifiers","_renderSlot","_normalizeProps","_guardReactiveProps","_createTextVNode","_unref","_createVNode","BbSmoothHeight","_createElementBlock","_Fragment","_renderList","error","_toDisplayString"],"mappings":";;;;;AAGA,MAAMA,KAAa,CAAC,UAAU,aAAa,YAAY,UAAU,GAC3DC,KAAa;AAAA,EACjB,eAAe;AAAA,EACf,OAAO;AACT,GACMC,KAAa,CAAC,MAAM,YAAY,YAAY,MAAM,GAClDC,KAAa,EAAE,OAAO,yBA0CAC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAA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AU;AAAA,YAC5C,SAAST,EAAS,MAAM;AAAA,eACrBJ,EAAW,EAAI,GAAGc,EAAoBC,GAAW,MAAMC,GAAYnB,EAAe,OAAO,CAACoB,OACjFjB,EAAA,GAAcc,EAAoB,QAAQ;AAAA,gBAChD,KAAKG;AAAA,gBACL,OAAO;AAAA,cACN,GAAAC,GAAiBD,CAAK,GAAG,CAAC,EAC9B,GAAG,GAAG;AAAA,YAAA,CACR;AAAA,YACD,GAAG;AAAA,UAAA,CACJ;AAAA,QAAA,CACF;AAAA,MAAA,CACF;AAAA,MACD,GAAG;AAAA,IAAA,GACF,GAAG,CAAC,OAAO,CAAC;AAAA,EAEjB;AAEA,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index69.js","sources":["../src/components/BbDropzone/BbDropzone.vue"],"sourcesContent":["<template>\n\t<component :is=\"tag\" :id=\"containerId\" :class=\"classes\">\n\t\t<label\n\t\t\t@dragenter.prevent=\"setDragging\"\n\t\t\t@dragleave.prevent=\"unsetDragging\"\n\t\t\t@dragover.prevent=\"onDragOver\"\n\t\t\t@drop.prevent=\"onDrop\"\n\t\t>\n\t\t\t<input\n\t\t\t\t:accept=\"acceptedMimeTypesString\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:multiple=\"multiple\"\n\t\t\t\ttype=\"file\"\n\t\t\t\t@blur=\"onBlur\"\n\t\t\t\t@change=\"onChange\"\n\t\t\t\t@focus=\"onFocus\"\n\t\t\t/>\n\t\t\t<slot v-bind=\"slotAttributes\"></slot>\n\t\t</label>\n\t\t<label aria-hidden=\"true\" class=\"bb-dropzone__submittable-label\">\n\t\t\tServer files\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"submittable\"\n\t\t\t\tclass=\"bb-dropzone__submittable-input\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:multiple=\"multiple\"\n\t\t\t\t:name=\"name\"\n\t\t\t\ttype=\"file\"\n\t\t\t/>\n\t\t</label>\n\n\t\t<span class=\"bb-dropzone__errors\">\n\t\t\t<BbSmoothHeight tag=\"span\">\n\t\t\t\t<span\n\t\t\t\t\tv-for=\"error in computedErrors\"\n\t\t\t\t\t:key=\"error\"\n\t\t\t\t\tclass=\"bb-dropzone__error\"\n\t\t\t\t\t>{{ error }}</span\n\t\t\t\t>\n\t\t\t</BbSmoothHeight>\n\t\t</span>\n\t</component>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport { findInTree } from '@/utilities/functions/findInTree';\nimport { useId } from '@/composables/useId';\nimport BbSmoothHeight from '../BbSmoothHeight/BbSmoothHeight.vue';\nimport type { CommonProps, NonVoidElementTag } from '@/types/CommonProps';\n\nexport type DropZoneError = ReturnType<\n\t(typeof createError)[keyof typeof createError]\n>;\n\nexport type BbDropzoneProps = Pick<\n\tCommonProps,\n\t'autofocus' | 'disabled' | 'errors' | 'hasErrors' | 'id' | 'multiple' | 'name'\n> & {\n\t/**\n\t * Array of mime-types or extensions to filter selectable files.\n\t */\n\taccept?: string[];\n\t/**\n\t * Maximum number of acceptable files\n\t */\n\tmaxFiles?: number;\n\t/**\n\t * Max size of the files in bytes.\n\t */\n\tmaxSize?: number;\n\t/**\n\t * Used by v-model.\n\t */\n\tmodelValue: any;\n} & NonVoidElementTag;\n\n// This is the dynamic import for mime\nlet mime: any;\n\nconst props = withDefaults(defineProps<BbDropzoneProps>(), {\n\ttag: 'div',\n});\n\nexport type BbDropzoneEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'error', data: DropZoneError): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'update:modelValue', data: any): void;\n};\nconst emit = defineEmits<BbDropzoneEvents>();\n\ndefineSlots<{\n\tdefault?: (props: { dragging: boolean; focused: boolean; id: string }) => any;\n}>();\n\nconst submittable = ref<any | null>(null);\n\nif (props.accept) {\n\tif (!Array.isArray(props.accept)) {\n\t\tthrow new Error('Property accept is not an array');\n\t}\n}\nif (props.multiple) {\n\tif (!Array.isArray(props.modelValue)) {\n\t\tthrow new Error(\n\t\t\t'Component is set to multiple but modelValue is not an array'\n\t\t);\n\t}\n}\n\nconst hasFocus = ref(false);\nconst onFocus = (event: FocusEvent) => {\n\thasFocus.value = true;\n\temit('focus', event);\n};\nconst onBlur = (event: FocusEvent) => {\n\thasFocus.value = false;\n\temit('blur', event);\n};\n\n/** Allow dropzone to be submittable (this is flimsy and might break) */\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\tlet container = new DataTransfer();\n\t\tif (Array.isArray(props.modelValue)) {\n\t\t\tif (props.modelValue.length) {\n\t\t\t\tprops.modelValue.forEach((file) => container.items.add(file));\n\t\t\t}\n\t\t} else {\n\t\t\tif (props.modelValue) container.items.add(props.modelValue);\n\t\t}\n\t\tif (submittable.value) {\n\t\t\tif (container.items.length) {\n\t\t\t\tsubmittable.value.files = container.files;\n\t\t\t} else {\n\t\t\t\tsubmittable.value.files = null;\n\t\t\t}\n\t\t}\n\t}\n);\n\nconst acceptedMimeTypes = ref<string[]>([]);\nconst acceptedMimeTypesString = computed(() =>\n\tacceptedMimeTypes.value.join(',')\n);\nwatch(\n\t() => props.accept,\n\tasync () => {\n\t\tif (props.accept) {\n\t\t\tlet accumulated = [];\n\t\t\tfor (let i = 0; i < props.accept.length; i++) {\n\t\t\t\tconst element = props.accept[i];\n\t\t\t\tif (element.includes('/')) accumulated.push(element);\n\t\t\t\telse {\n\t\t\t\t\tif (!mime) mime = await import('mime');\n\t\t\t\t\tconst foundMime = mime.getType(element);\n\t\t\t\t\tif (!foundMime) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`Could not detect the correct mime associated with ${element}`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\taccumulated.push(foundMime);\n\t\t\t\t}\n\t\t\t}\n\t\t\tacceptedMimeTypes.value = accumulated;\n\t\t}\n\t},\n\t{ immediate: true }\n);\n\n/**\n * Component state\n */\nconst id = props.id || `${useId().id.value}`;\nconst containerId = `bb_dz_${id}`;\n\nconst dragging = ref(false);\n// Add a timeout to prevent browser flickering\nlet draggingTimeout: ReturnType<typeof setTimeout>;\n\nconst classes = computed(() => {\n\treturn {\n\t\t'bb-dropzone': true,\n\t\t'bb-dropzone--errors': hasErrors.value,\n\t\t'bb-dropzone--dragging': dragging.value,\n\t};\n});\nconst slotAttributes = computed(() => {\n\treturn {\n\t\tdragging: dragging.value,\n\t\tfocused: hasFocus.value,\n\t\tid: id,\n\t};\n});\n\n/**\n * Component handlers\n */\nconst onDrop = (event: DragEvent) => {\n\tdragging.value = false;\n\n\tif (event.dataTransfer) {\n\t\tevent.stopImmediatePropagation();\n\t\tlet files;\n\t\tfiles = Array.from(event.dataTransfer.files);\n\t\tfiles = parseFiles(files);\n\t\tif (props.multiple) {\n\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\temit('update:modelValue', [...props.modelValue, ...files]);\n\t\t\t}\n\t\t} else {\n\t\t\tfiles = files[0];\n\t\t\temit('update:modelValue', files);\n\t\t}\n\t\tif (event.currentTarget instanceof HTMLLabelElement) {\n\t\t\tconst innerInput = event.currentTarget.querySelector('input[type=file]');\n\t\t\tif (innerInput instanceof HTMLInputElement) {\n\t\t\t\tinnerInput.focus();\n\t\t\t}\n\t\t}\n\t}\n};\nconst onChange = (event: Event) => {\n\tif (event.target instanceof HTMLInputElement) {\n\t\tif (event.target.files) {\n\t\t\tlet files;\n\t\t\tfiles = parseFiles(Array.from(event.target.files));\n\t\t\tif (props.multiple) {\n\t\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\t\temit('update:modelValue', [...props.modelValue, ...files]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfiles = files[0];\n\t\t\t\temit('update:modelValue', files);\n\t\t\t}\n\t\t}\n\t\tevent.target.value = '';\n\t\tevent.target.files = null;\n\t}\n};\n\nconst parseFiles = (files: File[]) => {\n\treturn files.filter((file, index) => {\n\t\t// Sizecheck\n\t\tif (props.maxSize) {\n\t\t\tlet passing = file.size <= props.maxSize;\n\t\t\tif (!passing) {\n\t\t\t\temit('error', createError.maxSize(file));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Uniqueness check\n\t\tlet alreadyExists = false;\n\t\tif (props.modelValue) {\n\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\talreadyExists = props.modelValue.some((current) =>\n\t\t\t\t\tcompareFiles(current, file)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\talreadyExists = compareFiles(props.modelValue, file);\n\t\t\t}\n\t\t}\n\t\tif (alreadyExists) {\n\t\t\temit('error', createError.uniqueness(file));\n\t\t\treturn false;\n\t\t}\n\t\t// Mime type check\n\t\tif (props.accept) {\n\t\t\tconst mimePassed = acceptedMimeTypes.value.some((mime) => {\n\t\t\t\tlet found = false;\n\t\t\t\tif (mime.includes('*'))\n\t\t\t\t\tfound = found || mime.split('/')[0] === file.type.split('/')[0];\n\t\t\t\telse found = found || mime === file.type;\n\t\t\t\treturn found;\n\t\t\t});\n\t\t\tif (!mimePassed) {\n\t\t\t\temit('error', createError.accept(file));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Max files check\n\t\tif (props.maxFiles) {\n\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\tif (props.modelValue.length + index + 1 > props.maxFiles) {\n\t\t\t\t\temit(\n\t\t\t\t\t\t'error',\n\t\t\t\t\t\tcreateError.maxFiles(file, props.modelValue.length + index + 1)\n\t\t\t\t\t);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n};\n\nconst onDragOver = (event: Event) => {\n\t// Find the closest dropzone in case of nested dropzones\n\tconst target = event.target;\n\tif (target instanceof HTMLElement) {\n\t\tconst closestDropzone = findInTree([target], 'parentElement', (el) =>\n\t\t\tel.classList.contains('bb-dropzone')\n\t\t);\n\t\tif (closestDropzone) {\n\t\t\t/* When dragging over this dropzone set as dragging */\n\t\t\tif (closestDropzone.id === containerId) {\n\t\t\t\tsetDragging();\n\t\t\t\t/* When dragging over a nested dropzone do not highlight this dropzone */\n\t\t\t} else {\n\t\t\t\tunsetDragging();\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst setDragging = () => {\n\tclearTimeout(draggingTimeout);\n\tdragging.value = true;\n};\n\nconst unsetDragging = () => {\n\tdraggingTimeout = setTimeout(() => {\n\t\tdragging.value = false;\n\t}, 100);\n};\n\nconst bytesToUnit = (bytes: number, decimals = 2) => {\n\tif (!bytes) return '0 B';\n\tconst k = 1024;\n\tconst dm = decimals || 0;\n\tconst sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\tconst i = Math.floor(Math.log(bytes) / Math.log(k));\n\treturn parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n};\n\n/**\n * Returns true if files are identical by the properties that are accessible\n * @param file The file to check\n * @param otherFile The file to check against\n */\nconst compareFiles = (file: File, otherFile: File) => {\n\tconst properties: (keyof File)[] = ['name', 'size', 'lastModified', 'type'];\n\treturn !properties.some((key) => file[key] !== otherFile[key]);\n};\n\n/**\n * Helper that creates errors based on component properties\n */\nconst createError = {\n\tmaxSize: (file: File) => {\n\t\t// Todo update to isNil\n\t\tif (props.maxSize) {\n\t\t\treturn {\n\t\t\t\ttype: 'maxSize',\n\t\t\t\tfile: file,\n\t\t\t\tformattedMaxSize: bytesToUnit(+props.maxSize),\n\t\t\t\tformattedSize: bytesToUnit(file.size),\n\t\t\t\tfilename: file.name,\n\t\t\t} as const;\n\t\t} else\n\t\t\tthrow new Error(\n\t\t\t\t'Requested to create an error for maxSize without providing a maxSize.'\n\t\t\t);\n\t},\n\tuniqueness: (file: File) => {\n\t\treturn {\n\t\t\ttype: 'uniqueness',\n\t\t\tfile: file,\n\t\t\tfilename: file.name,\n\t\t} as const;\n\t},\n\taccept: (file: File) => {\n\t\treturn {\n\t\t\ttype: 'accept',\n\t\t\tfile: file,\n\t\t\tacceptedMimeTypes: acceptedMimeTypes.value,\n\t\t\tmimeType: file.type,\n\t\t\tfilename: file.name,\n\t\t} as const;\n\t},\n\tmaxFiles: (file: File, totalFiles: number) => {\n\t\treturn {\n\t\t\ttype: 'maxFiles',\n\t\t\tfile: file,\n\t\t\tmaxFiles: props.maxFiles,\n\t\t\ttotalFiles,\n\t\t\tfilename: file.name,\n\t\t} as const;\n\t},\n};\n\nconst computedErrors = computed(() => {\n\treturn props.errors ? ([] as string[]).concat(props.errors) : [];\n});\n\nconst hasErrors = computed(\n\t() => Boolean(computedErrors.value.length) || props.hasErrors\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDropzone';\n</style>\n"],"names":["mime","props","__props","emit","__emit","submittable","ref","hasFocus","onFocus","event","onBlur","watch","container","file","acceptedMimeTypes","acceptedMimeTypesString","computed","accumulated","i","element","foundMime","id","useId","containerId","dragging","draggingTimeout","classes","hasErrors","slotAttributes","onDrop","files","parseFiles","innerInput","onChange","index","createError","alreadyExists","current","compareFiles","found","onDragOver","target","closestDropzone","findInTree","el","setDragging","unsetDragging","bytesToUnit","bytes","decimals","k","dm","sizes","otherFile","key","totalFiles","computedErrors"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgFI,QAAAA;AAEJ,UAAMC,IAAQC,GAURC,IAAOC,GAMPC,IAAcC,EAAgB,IAAI;AAExC,QAAIL,EAAM,UACL,CAAC,MAAM,QAAQA,EAAM,MAAM;AACxB,YAAA,IAAI,MAAM,iCAAiC;AAGnD,QAAIA,EAAM,YACL,CAAC,MAAM,QAAQA,EAAM,UAAU;AAClC,YAAM,IAAI;AAAA,QACT;AAAA,MAAA;AAKG,UAAAM,IAAWD,EAAI,EAAK,GACpBE,IAAU,CAACC,MAAsB;AACtC,MAAAF,EAAS,QAAQ,IACjBJ,EAAK,SAASM,CAAK;AAAA,IAAA,GAEdC,IAAS,CAACD,MAAsB;AACrC,MAAAF,EAAS,QAA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,QACA,mBAAmBC,EAAkB;AAAA,QACrC,UAAUD,EAAK;AAAA,QACf,UAAUA,EAAK;AAAA,MAAA;AAAA,MAGjB,UAAU,CAACA,GAAY0C,OACf;AAAA,QACN,MAAM;AAAA,QACN,MAAA1C;AAAA,QACA,UAAUZ,EAAM;AAAA,QAChB,YAAAsD;AAAA,QACA,UAAU1C,EAAK;AAAA,MAAA;AAAA,IAEjB,GAGK2C,IAAiBxC,EAAS,MACxBf,EAAM,SAAU,CAAC,EAAe,OAAOA,EAAM,MAAM,IAAI,EAC9D,GAEK0B,IAAYX;AAAA,MACjB,MAAM,EAAQwC,EAAe,MAAM,UAAWvD,EAAM;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index70.js
CHANGED
package/dist/index70.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index70.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index70.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index71.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index71.js","sources":["../src/components/BbHover/BbHover.vue
|
|
1
|
+
{"version":3,"file":"index71.js","sources":["../src/components/BbHover/BbHover.vue"],"sourcesContent":["<template>\n\t<slot :is-hovering=\"isHovering\" :props=\"{ onMouseenter }\"></slot>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue';\n\ndefineSlots<{\n\tdefault?: (props: {\n\t\tprops: {\n\t\t\tonMouseenter: typeof onMouseenter;\n\t\t};\n\t\tisHovering: boolean;\n\t}) => any;\n}>();\nconst isHovering = ref(false);\n\nconst onMouseenter = (event: MouseEvent) => {\n\tconst outerTarget = event.target;\n\tif (outerTarget instanceof HTMLElement) {\n\t\tisHovering.value = true;\n\t\tconst onDocumentMouseover = (event: MouseEvent) => {\n\t\t\tconst innerTarget = event.target;\n\t\t\tif (innerTarget instanceof HTMLElement) {\n\t\t\t\tif (!outerTarget.contains(innerTarget)) {\n\t\t\t\t\tisHovering.value = false;\n\t\t\t\t\tdocument.removeEventListener('mouseover', onDocumentMouseover);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tdocument.addEventListener('mouseover', onDocumentMouseover);\n\t}\n};\n</script>\n\n<style scoped></style>\n"],"names":["isHovering","ref","onMouseenter","event","outerTarget","onDocumentMouseover","innerTarget"],"mappings":";;;;AAeM,UAAAA,IAAaC,EAAI,EAAK,GAEtBC,IAAe,CAACC,MAAsB;AAC3C,YAAMC,IAAcD,EAAM;AAC1B,UAAIC,aAAuB,aAAa;AACvC,QAAAJ,EAAW,QAAQ;AACb,cAAAK,IAAsB,CAACF,MAAsB;AAClD,gBAAMG,IAAcH,EAAM;AAC1B,UAAIG,aAAuB,gBACrBF,EAAY,SAASE,CAAW,MACpCN,EAAW,QAAQ,IACV,SAAA,oBAAoB,aAAaK,CAAmB;AAAA,QAE/D;AAEQ,iBAAA,iBAAiB,aAAaA,CAAmB;AAAA,MAC3D;AAAA,IAAA;;;;;;;"}
|
package/dist/index72.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as h, ref as t, onMounted as m, onBeforeUnmount as p, openBlock as g, createBlock as b, resolveDynamicComponent as w, withCtx as _, renderSlot as I } from "vue";
|
|
2
|
-
import { throttle as c } from "./
|
|
2
|
+
import { throttle as c } from "./index207.js";
|
|
3
3
|
const M = /* @__PURE__ */ h({
|
|
4
4
|
__name: "BbIntersection",
|
|
5
5
|
props: {
|