bitboss-ui 0.2.76 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +4 -0
- package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +10 -3
- package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +4 -1
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +10 -4
- package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +9 -0
- package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +4 -0
- package/dist/components/BaseRadio/BaseRadio.vue.d.ts +4 -0
- package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +10 -3
- package/dist/components/BaseRating/BaseRating.vue.d.ts +5 -1
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +4 -0
- package/dist/components/BaseSlider/BaseSlider.vue.d.ts +48 -11
- package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +6 -3
- package/dist/components/BaseTag/BaseTag.vue.d.ts +4 -0
- package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +10 -6
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +4 -0
- package/dist/components/BbButton/BbButton.vue.d.ts +12 -0
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +35 -27
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +38 -24
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +15 -3
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +33 -25
- package/dist/components/BbRadio/BbRadio.vue.d.ts +33 -25
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +38 -24
- package/dist/components/BbRating/BbRating.vue.d.ts +9 -1
- package/dist/components/BbSelect/BbSelect.vue.d.ts +18 -4
- package/dist/components/BbSlider/BbSlider.vue.d.ts +44 -11
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +9 -3
- package/dist/components/BbTag/BbTag.vue.d.ts +11 -3
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +33 -25
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +9 -1
- package/dist/composables/useQueue.d.ts +58 -0
- package/dist/index.js +186 -185
- package/dist/index.js.map +1 -1
- package/dist/index10.js +65 -1
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +227 -1
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +1 -437
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +437 -1
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +1 -94
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +103 -1
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +1 -88
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +97 -1
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +1 -89
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +98 -1
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +1 -29
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +1 -131
- package/dist/index11.js.map +1 -1
- package/dist/index110.js +29 -1
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +1 -151
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +151 -1
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +1 -122
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +122 -1
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +1 -46
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +40 -33
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +32 -39
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +39 -42
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +43 -39
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +128 -1
- package/dist/index12.js.map +1 -1
- package/dist/index120.js +43 -2
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +2 -21
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +21 -2
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +2 -224
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +224 -2
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -18
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +16 -10
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +12 -24
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +24 -5
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +5 -9
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +1 -159
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +8 -5
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +5 -69
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +70 -3
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +2 -2
- package/dist/index134.js +2 -2
- package/dist/index135.js +2 -2
- package/dist/index136.js +2 -2
- package/dist/index137.js +2 -2
- package/dist/index138.js +2 -2
- package/dist/index139.js +2 -2
- package/dist/index14.js +161 -1
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +2 -2
- package/dist/index141.js +2 -2
- package/dist/index142.js +2 -2
- package/dist/index143.js +2 -2
- package/dist/index144.js +2 -2
- package/dist/index145.js +2 -2
- package/dist/index146.js +2 -2
- package/dist/index147.js +2 -2
- package/dist/index148.js +2 -2
- package/dist/index149.js +2 -2
- package/dist/index15.js +1 -457
- package/dist/index15.js.map +1 -1
- package/dist/index150.js +2 -2
- package/dist/index151.js +2 -2
- package/dist/index152.js +2 -2
- package/dist/index153.js +2 -2
- package/dist/index154.js +2 -2
- package/dist/index155.js +2 -2
- package/dist/index156.js +2 -2
- package/dist/index157.js +2 -2
- package/dist/index158.js +5 -1
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +1 -5
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +514 -1
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +5 -1
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +1 -5
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +2 -2
- package/dist/index163.js +2 -2
- package/dist/index164.js +2 -2
- package/dist/index165.js +2 -2
- package/dist/index166.js +2 -2
- package/dist/index167.js +3 -2
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +2 -3
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +5 -1
- package/dist/index169.js.map +1 -1
- package/dist/index17.js +1 -211
- package/dist/index17.js.map +1 -1
- package/dist/index170.js +1 -4
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +2 -3
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +2 -2
- package/dist/index173.js +2 -2
- package/dist/index174.js +2 -2
- package/dist/index175.js +2 -2
- package/dist/index176.js +2 -2
- package/dist/index177.js +2 -2
- package/dist/index178.js +2 -2
- package/dist/index179.js +2 -2
- package/dist/index18.js +220 -1
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +2 -2
- package/dist/index181.js +2 -2
- package/dist/index182.js +2 -2
- package/dist/index183.js +5 -1
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +1 -5
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +5 -1
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +1 -5
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +2 -2
- package/dist/index188.js +2 -2
- package/dist/index189.js +2 -2
- package/dist/index19.js +1 -239
- package/dist/index19.js.map +1 -1
- package/dist/index190.js +2 -2
- package/dist/index191.js +2 -2
- package/dist/index192.js +2 -2
- package/dist/index193.js +2 -2
- package/dist/index194.js +2 -2
- package/dist/index195.js +2 -2
- package/dist/index196.js +3 -10
- package/dist/index196.js.map +1 -1
- package/dist/index198.js +2 -3
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +4 -3
- package/dist/index199.js.map +1 -1
- package/dist/index2.js +1 -42
- package/dist/index2.js.map +1 -1
- package/dist/index20.js +239 -1
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +5 -368
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +13 -131
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +16 -5
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +3 -3
- package/dist/index204.js +20 -2
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +29 -2
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +8 -174
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +2 -23
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +111 -363
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +131 -13
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +1 -115
- package/dist/index21.js.map +1 -1
- package/dist/index210.js +2 -16
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +35 -20
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +172 -27
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +6 -8
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +346 -213
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +373 -3
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +3 -35
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +3 -6
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +235 -2
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +3 -2
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +131 -1
- package/dist/index22.js.map +1 -1
- package/dist/index220.js +2 -4
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +8 -119
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +2 -2
- package/dist/index222.js.map +1 -1
- package/dist/index224.js +23 -6
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +4 -17
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +294 -78
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +6 -2
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +2 -160
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +4 -1
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +1 -115
- package/dist/index23.js.map +1 -1
- package/dist/index230.js +2 -5
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +2 -69
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +2 -224
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +2 -258
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +78 -5
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +6 -2
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +17 -295
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +2 -2
- package/dist/index238.js +106 -2
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +428 -110
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +119 -1
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +218 -100
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +255 -12
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +117 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +200 -2
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +2 -2
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +69 -2
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +5 -435
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +163 -88
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +1 -202
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +2 -4
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +1 -92
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +89 -2
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +15 -4
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +4 -4
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +4 -61
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +61 -2
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +2 -3
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +3 -2
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +5 -0
- package/dist/index257.js.map +1 -0
- package/dist/index26.js +94 -1
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +1 -157
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +160 -1
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +1 -124
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +38 -76
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +126 -1
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +1 -691
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +693 -1
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +1 -145
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +302 -1
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +1 -118
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +120 -1
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +1 -154
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +156 -1
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +1 -83
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +78 -62
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +87 -1
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +1 -61
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +64 -1
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +1 -65
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +65 -1
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +1 -96
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +96 -1
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +1 -61
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +61 -1
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +1 -49
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +60 -38
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +49 -1
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +1 -62
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +62 -1
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +1 -45
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +69 -1
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +1 -89
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +98 -1
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +1 -120
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +129 -1
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +1 -85
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +37 -171
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +85 -1
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +1 -88
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +98 -1
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +1 -59
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +59 -1
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +1 -313
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +313 -1
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +1 -129
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +129 -1
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +1 -225
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +172 -18
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +225 -1
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +1 -24
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +19 -41
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +37 -86
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +104 -1
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +1 -227
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +227 -1
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +1 -143
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +165 -1
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +1 -213
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +18 -192
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +213 -1
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +1 -35
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +35 -1
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +1 -83
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +92 -1
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +1 -120
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +129 -1
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +1 -83
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +92 -1
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +1 -30
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +192 -61
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +30 -1
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +1 -157
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +166 -1
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +1 -86
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +112 -1
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +1 -89
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +98 -1
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +1 -119
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +129 -1
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +1 -227
- package/dist/index99.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/utilities/functions/last.d.ts +1 -1
- package/package.json +1 -1
package/dist/index66.js
CHANGED
|
@@ -1,2 +1,314 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineComponent as Y, computed as M, ref as v, openBlock as D, createElementBlock as H, mergeProps as S, createElementVNode as h, renderSlot as y, normalizeProps as Z, guardReactiveProps as ee, unref as c, createBlock as te, Teleport as oe, normalizeClass as ne, normalizeStyle as z, Fragment as N, renderList as ae, createVNode as le, withCtx as se, createCommentVNode as ie } from "vue";
|
|
2
|
+
import { findRightIndex as I } from "./index223.js";
|
|
3
|
+
import { useFloating as re, arrow as ue } from "./index208.js";
|
|
4
|
+
import { useId as de } from "./index8.js";
|
|
5
|
+
import { wait as U } from "./index123.js";
|
|
6
|
+
import ce from "./index10.js";
|
|
7
|
+
import "./index11.js";
|
|
8
|
+
import V from "./index224.js";
|
|
9
|
+
import { autoUpdate as fe, flip as pe, shift as be } from "./index214.js";
|
|
10
|
+
import { offset as me } from "./index215.js";
|
|
11
|
+
const ve = ["id", "aria-labelledby"], we = { class: "bb-dropdown__items-container" }, Me = /* @__PURE__ */ Y({
|
|
12
|
+
__name: "BbDropdown",
|
|
13
|
+
props: {
|
|
14
|
+
arrowPadding: { default: 10 },
|
|
15
|
+
block: { type: Boolean },
|
|
16
|
+
disabled: { type: Boolean },
|
|
17
|
+
eager: { type: Boolean },
|
|
18
|
+
id: {},
|
|
19
|
+
offset: { default: 3 },
|
|
20
|
+
padding: { default: 6 },
|
|
21
|
+
placement: { default: "bottom" },
|
|
22
|
+
theme: { default: "default" },
|
|
23
|
+
transitionDuration: { default: 150 },
|
|
24
|
+
items: {},
|
|
25
|
+
width: { default: 200 }
|
|
26
|
+
},
|
|
27
|
+
setup(j) {
|
|
28
|
+
const a = j, b = a.id ?? `bb_${de().id.value}`, w = M(() => {
|
|
29
|
+
let e = a.items.findIndex((t) => !t.disabled), n = I(
|
|
30
|
+
a.items,
|
|
31
|
+
(t) => !t.disabled
|
|
32
|
+
);
|
|
33
|
+
return a.items.map((t, o) => {
|
|
34
|
+
const d = `${b}-item-${t.key}`, { onClick: O, ...P } = t, W = async () => {
|
|
35
|
+
await _();
|
|
36
|
+
const s = document.querySelector(`#${b}`);
|
|
37
|
+
if (s)
|
|
38
|
+
s instanceof HTMLElement && s.focus();
|
|
39
|
+
else
|
|
40
|
+
return;
|
|
41
|
+
O && O();
|
|
42
|
+
}, X = (s) => {
|
|
43
|
+
if (s.target instanceof HTMLElement && s.target.dataset.dropdownItem) {
|
|
44
|
+
if (!l.value)
|
|
45
|
+
return;
|
|
46
|
+
if (s.key === "ArrowDown") {
|
|
47
|
+
if (s.preventDefault(), l.value && o !== n) {
|
|
48
|
+
const p = l.value.querySelector(
|
|
49
|
+
V.map((k) => `#${d} ~ ${k}`).join(",")
|
|
50
|
+
);
|
|
51
|
+
p && p instanceof HTMLElement && p.focus();
|
|
52
|
+
}
|
|
53
|
+
} else if (s.key === "ArrowUp") {
|
|
54
|
+
if (s.preventDefault(), l.value && o !== e) {
|
|
55
|
+
const p = I(a.items, ($, T) => T < o && !$.disabled), E = Array.from(
|
|
56
|
+
l.value.querySelectorAll(".bb-dropdown__item")
|
|
57
|
+
)[p];
|
|
58
|
+
E && E instanceof HTMLElement && E.focus();
|
|
59
|
+
}
|
|
60
|
+
} else if (s.key === "Tab") {
|
|
61
|
+
if (o === n && !s.shiftKey) {
|
|
62
|
+
const p = V.join(","), k = Array.from(
|
|
63
|
+
document.querySelectorAll(p)
|
|
64
|
+
), E = k.findIndex(
|
|
65
|
+
(T) => T.id === b
|
|
66
|
+
), $ = k[E + 1];
|
|
67
|
+
if ($)
|
|
68
|
+
$ instanceof HTMLElement && (s.preventDefault(), _(), $.focus());
|
|
69
|
+
else
|
|
70
|
+
return;
|
|
71
|
+
} else if (o === e && s.shiftKey) {
|
|
72
|
+
const p = document.querySelector(`#${b}`);
|
|
73
|
+
if (p)
|
|
74
|
+
p instanceof HTMLElement && (s.preventDefault(), p.focus());
|
|
75
|
+
else
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
return {
|
|
82
|
+
...P,
|
|
83
|
+
disabled: P.disabled || a.disabled,
|
|
84
|
+
id: d,
|
|
85
|
+
onClick: W,
|
|
86
|
+
onKeydown: X
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
}), g = v(), l = v(), F = v(), { floatingStyles: R, placement: m, middlewareData: q } = re(
|
|
90
|
+
g,
|
|
91
|
+
l,
|
|
92
|
+
{
|
|
93
|
+
placement: a.placement,
|
|
94
|
+
whileElementsMounted: fe,
|
|
95
|
+
middleware: [
|
|
96
|
+
pe(),
|
|
97
|
+
me(a.offset),
|
|
98
|
+
be({ padding: a.padding }),
|
|
99
|
+
ue({
|
|
100
|
+
element: F,
|
|
101
|
+
padding: a.arrowPadding
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
), i = v(!1), r = v(!1), u = v(!1), f = v(!0), x = M(() => {
|
|
106
|
+
if (q.value.arrow) {
|
|
107
|
+
const { x: e, y: n } = q.value.arrow;
|
|
108
|
+
return {
|
|
109
|
+
style: {
|
|
110
|
+
left: `${e}px`,
|
|
111
|
+
top: `${n}px`
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}), G = () => {
|
|
116
|
+
i.value || u.value || (r.value ? _() : L());
|
|
117
|
+
}, J = async (e) => {
|
|
118
|
+
let n = a.items.findIndex((o) => !o.disabled), t = I(
|
|
119
|
+
a.items,
|
|
120
|
+
(o) => !o.disabled
|
|
121
|
+
);
|
|
122
|
+
if (e.key === "ArrowDown") {
|
|
123
|
+
if (e.preventDefault(), u.value || i.value)
|
|
124
|
+
return;
|
|
125
|
+
if (f.value && await L(), l.value && w.value.length && n !== -1) {
|
|
126
|
+
const o = w.value[n].id, d = l.value.querySelector(`#${o}`);
|
|
127
|
+
d && d instanceof HTMLElement && d.focus();
|
|
128
|
+
}
|
|
129
|
+
} else if (e.key === "ArrowUp") {
|
|
130
|
+
if (e.preventDefault(), u.value || i.value)
|
|
131
|
+
return;
|
|
132
|
+
if (f.value && await L(), l.value && w.value.length && t !== -1) {
|
|
133
|
+
const o = w.value[t].id, d = l.value.querySelector(`#${o}`);
|
|
134
|
+
d && d instanceof HTMLElement && d.focus();
|
|
135
|
+
}
|
|
136
|
+
} else if (e.key === "Tab" && r.value && !e.shiftKey && (e.preventDefault(), l.value && w.value.length && n !== -1)) {
|
|
137
|
+
const o = w.value[n].id, d = l.value.querySelector(`#${o}`);
|
|
138
|
+
d && d instanceof HTMLElement && d.focus();
|
|
139
|
+
}
|
|
140
|
+
}, A = (e) => {
|
|
141
|
+
const n = e.target;
|
|
142
|
+
if (n && n instanceof HTMLElement) {
|
|
143
|
+
let t = !0;
|
|
144
|
+
g.value && g.value.contains(n) && (t = !1), l.value && l.value.contains(n) && (t = !1), t && _();
|
|
145
|
+
}
|
|
146
|
+
}, C = (e) => {
|
|
147
|
+
const n = e.target;
|
|
148
|
+
if (n && n instanceof HTMLElement) {
|
|
149
|
+
let t = !0;
|
|
150
|
+
g.value && g.value.contains(n) && (t = !1), l.value && l.value.contains(n) && (t = !1), t && _();
|
|
151
|
+
}
|
|
152
|
+
}, B = (e) => {
|
|
153
|
+
var n;
|
|
154
|
+
if (r.value && e.key === "Escape") {
|
|
155
|
+
if (((n = document.activeElement) == null ? void 0 : n.id) !== b) {
|
|
156
|
+
const t = document.querySelector(`#${b}`);
|
|
157
|
+
t instanceof HTMLElement && t.focus();
|
|
158
|
+
}
|
|
159
|
+
_();
|
|
160
|
+
}
|
|
161
|
+
}, K = v(!1), L = async () => {
|
|
162
|
+
K.value = !0, f.value = !1, u.value = !1, i.value = !0, await U(50), r.value = !0, i.value = !1, document.addEventListener("click", A, { passive: !0 }), document.addEventListener("focusin", C, { passive: !0 }), document.addEventListener("keydown", B, { passive: !0 });
|
|
163
|
+
}, _ = async () => {
|
|
164
|
+
r.value = !1, i.value = !1, u.value = !0, await U(a.transitionDuration), u.value = !1, f.value = !0, document.removeEventListener("click", A), document.removeEventListener("focusin", C), document.removeEventListener("keydown", B);
|
|
165
|
+
}, Q = M(() => ({
|
|
166
|
+
class: {
|
|
167
|
+
"bb-dropdown--block": a.block,
|
|
168
|
+
[`bb-dropdown--theme-${a.theme}`]: a.theme
|
|
169
|
+
}
|
|
170
|
+
}));
|
|
171
|
+
return (e, n) => (D(), H("span", S({ class: "bb-dropdown" }, Q.value), [
|
|
172
|
+
h("span", {
|
|
173
|
+
ref_key: "wrapper",
|
|
174
|
+
ref: g,
|
|
175
|
+
class: "bb-dropdown__wrapper"
|
|
176
|
+
}, [
|
|
177
|
+
y(e.$slots, "activator", Z(ee({
|
|
178
|
+
props: {
|
|
179
|
+
"aria-expanded": r.value,
|
|
180
|
+
"aria-controls": `menu_${c(b)}`,
|
|
181
|
+
id: c(b),
|
|
182
|
+
onClick: G,
|
|
183
|
+
onKeydown: J,
|
|
184
|
+
disabled: e.disabled
|
|
185
|
+
},
|
|
186
|
+
closed: f.value,
|
|
187
|
+
closing: u.value,
|
|
188
|
+
disabled: e.disabled,
|
|
189
|
+
open: r.value,
|
|
190
|
+
opening: i.value,
|
|
191
|
+
placement: c(m)
|
|
192
|
+
})))
|
|
193
|
+
], 512),
|
|
194
|
+
K.value || e.eager ? (D(), te(oe, {
|
|
195
|
+
key: 0,
|
|
196
|
+
to: "body"
|
|
197
|
+
}, [
|
|
198
|
+
h("span", {
|
|
199
|
+
id: `menu_${c(b)}`,
|
|
200
|
+
ref_key: "content",
|
|
201
|
+
ref: l,
|
|
202
|
+
"aria-labelledby": c(b),
|
|
203
|
+
"aria-role": "menu",
|
|
204
|
+
class: ne(["bb-dropdown__bubble-container", {
|
|
205
|
+
[`bb-dropdown__bubble-container--${c(m)}`]: !0,
|
|
206
|
+
[`bb-dropdown__bubble-container--${e.theme}`]: e.theme,
|
|
207
|
+
"bb-dropdown__bubble-container--hidden": f.value,
|
|
208
|
+
"bb-dropdown__bubble-container--closing": u.value,
|
|
209
|
+
"bb-dropdown__bubble-container--opening": i.value,
|
|
210
|
+
"bb-dropdown__bubble-container--open": r.value
|
|
211
|
+
}]),
|
|
212
|
+
style: z({
|
|
213
|
+
...c(R),
|
|
214
|
+
transitionDuration: `${a.transitionDuration}ms`
|
|
215
|
+
})
|
|
216
|
+
}, [
|
|
217
|
+
h("span", S({
|
|
218
|
+
ref_key: "bubblearrow",
|
|
219
|
+
ref: F,
|
|
220
|
+
class: "bb-dropdown__arrow"
|
|
221
|
+
}, x.value), null, 16),
|
|
222
|
+
h("span", {
|
|
223
|
+
class: "bb-dropdown__bubble",
|
|
224
|
+
style: z({ width: `${e.width}px` })
|
|
225
|
+
}, [
|
|
226
|
+
y(e.$slots, "prepend", {
|
|
227
|
+
closed: f.value,
|
|
228
|
+
closing: u.value,
|
|
229
|
+
disabled: e.disabled,
|
|
230
|
+
open: r.value,
|
|
231
|
+
opening: i.value,
|
|
232
|
+
placement: c(m)
|
|
233
|
+
}),
|
|
234
|
+
h("span", we, [
|
|
235
|
+
(D(!0), H(N, null, ae(w.value, (t, o) => (D(), H(N, {
|
|
236
|
+
key: t.key
|
|
237
|
+
}, [
|
|
238
|
+
y(e.$slots, "item:prepend", {
|
|
239
|
+
closed: f.value,
|
|
240
|
+
closing: u.value,
|
|
241
|
+
disabled: t.disabled,
|
|
242
|
+
index: o,
|
|
243
|
+
item: e.items[o],
|
|
244
|
+
open: r.value,
|
|
245
|
+
opening: i.value,
|
|
246
|
+
placement: c(m),
|
|
247
|
+
text: t.text
|
|
248
|
+
}),
|
|
249
|
+
le(ce, S({
|
|
250
|
+
"aria-role": "menuitem",
|
|
251
|
+
class: ["bb-dropdown__item", {
|
|
252
|
+
"bb-dropdown__item--first": o === 0,
|
|
253
|
+
"bb-dropdown__item--last": o === e.items.length - 1
|
|
254
|
+
}],
|
|
255
|
+
"data-dropdown-item": !0
|
|
256
|
+
}, t), {
|
|
257
|
+
default: se(() => [
|
|
258
|
+
y(e.$slots, t.key, {
|
|
259
|
+
closed: f.value,
|
|
260
|
+
closing: u.value,
|
|
261
|
+
disabled: t.disabled,
|
|
262
|
+
index: o,
|
|
263
|
+
item: t,
|
|
264
|
+
open: r.value,
|
|
265
|
+
opening: i.value,
|
|
266
|
+
placement: c(m),
|
|
267
|
+
text: t.text
|
|
268
|
+
}, () => [
|
|
269
|
+
y(e.$slots, "item", {
|
|
270
|
+
closed: f.value,
|
|
271
|
+
closing: u.value,
|
|
272
|
+
disabled: t.disabled,
|
|
273
|
+
index: o,
|
|
274
|
+
item: t,
|
|
275
|
+
open: r.value,
|
|
276
|
+
opening: i.value,
|
|
277
|
+
placement: c(m),
|
|
278
|
+
text: t.text
|
|
279
|
+
})
|
|
280
|
+
])
|
|
281
|
+
]),
|
|
282
|
+
_: 2
|
|
283
|
+
}, 1040, ["class"]),
|
|
284
|
+
y(e.$slots, "item:append", {
|
|
285
|
+
closed: f.value,
|
|
286
|
+
closing: u.value,
|
|
287
|
+
disabled: t.disabled,
|
|
288
|
+
index: o,
|
|
289
|
+
item: e.items[o],
|
|
290
|
+
open: r.value,
|
|
291
|
+
opening: i.value,
|
|
292
|
+
placement: c(m),
|
|
293
|
+
text: t.text
|
|
294
|
+
})
|
|
295
|
+
], 64))), 128))
|
|
296
|
+
]),
|
|
297
|
+
y(e.$slots, "append", {
|
|
298
|
+
closed: f.value,
|
|
299
|
+
closing: u.value,
|
|
300
|
+
disabled: e.disabled,
|
|
301
|
+
open: r.value,
|
|
302
|
+
opening: i.value,
|
|
303
|
+
placement: c(m)
|
|
304
|
+
})
|
|
305
|
+
], 4)
|
|
306
|
+
], 14, ve)
|
|
307
|
+
])) : ie("", !0)
|
|
308
|
+
], 16));
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
export {
|
|
312
|
+
Me as default
|
|
313
|
+
};
|
|
2
314
|
//# sourceMappingURL=index66.js.map
|
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":["../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\treturn undefined;\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,GACjB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AAAA,IAAA,GAGxCK,IAAarD,EAAS,OAKpB;AAAA,MACN,OALe;AAAA,QACf,sBAAsBL,EAAM;AAAA,QAC5B,CAAC,sBAAsBA,EAAM,KAAK,EAAE,GAAGA,EAAM;AAAA,MAAA;AAAA,IAGtC,EAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index67.js
CHANGED
|
@@ -1,130 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import g from "./index9.js";
|
|
3
|
-
import "./index10.js";
|
|
4
|
-
import L from "./index65.js";
|
|
5
|
-
import "./index66.js";
|
|
6
|
-
const S = { class: "bb-dropdown-button__dropdown-label" }, _ = /* @__PURE__ */ m("svg", {
|
|
7
|
-
class: "bb-dropdown-button__dropdown-chevron",
|
|
8
|
-
viewBox: "0 0 24 24",
|
|
9
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
10
|
-
}, [
|
|
11
|
-
/* @__PURE__ */ m("path", {
|
|
12
|
-
d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6l1.41 1.41Z",
|
|
13
|
-
fill: "currentColor"
|
|
14
|
-
})
|
|
15
|
-
], -1), R = /* @__PURE__ */ c({
|
|
16
|
-
__name: "BbDropdownButton",
|
|
17
|
-
props: {
|
|
18
|
-
arrowPadding: {},
|
|
19
|
-
block: { type: Boolean },
|
|
20
|
-
disabled: { type: Boolean },
|
|
21
|
-
eager: { type: Boolean },
|
|
22
|
-
id: {},
|
|
23
|
-
items: {},
|
|
24
|
-
offset: {},
|
|
25
|
-
padding: {},
|
|
26
|
-
placement: {},
|
|
27
|
-
theme: { default: "default" },
|
|
28
|
-
transitionDuration: {},
|
|
29
|
-
width: {}
|
|
30
|
-
},
|
|
31
|
-
setup($) {
|
|
32
|
-
const s = $, i = v(() => {
|
|
33
|
-
const e = { ...s.items[0] };
|
|
34
|
-
return e.disabled = e.disabled || s.disabled, e;
|
|
35
|
-
});
|
|
36
|
-
return (e, z) => (B(), k("span", {
|
|
37
|
-
class: y(["bb-dropdown-button", {
|
|
38
|
-
"bb-dropdown-button--block": e.block,
|
|
39
|
-
[`bb-dropdown-button--theme-${s.theme}`]: s.theme
|
|
40
|
-
}])
|
|
41
|
-
}, [
|
|
42
|
-
l(g, h(i.value, { class: "bb-dropdown-button__main-btn" }), {
|
|
43
|
-
default: o(() => [
|
|
44
|
-
d(e.$slots, "left-btn", {
|
|
45
|
-
disabled: i.value.disabled,
|
|
46
|
-
text: i.value.text
|
|
47
|
-
})
|
|
48
|
-
]),
|
|
49
|
-
_: 3
|
|
50
|
-
}, 16),
|
|
51
|
-
l(L, {
|
|
52
|
-
id: e.id,
|
|
53
|
-
"arrow-padding": e.arrowPadding,
|
|
54
|
-
disabled: e.disabled,
|
|
55
|
-
eager: e.eager,
|
|
56
|
-
items: e.items,
|
|
57
|
-
offset: e.offset,
|
|
58
|
-
padding: e.padding,
|
|
59
|
-
placement: e.placement,
|
|
60
|
-
theme: e.theme,
|
|
61
|
-
"transition-duration": e.transitionDuration,
|
|
62
|
-
width: e.width
|
|
63
|
-
}, C({
|
|
64
|
-
activator: o(({
|
|
65
|
-
props: t,
|
|
66
|
-
opening: r,
|
|
67
|
-
open: p,
|
|
68
|
-
closed: b,
|
|
69
|
-
closing: u,
|
|
70
|
-
disabled: w,
|
|
71
|
-
placement: f
|
|
72
|
-
}) => [
|
|
73
|
-
d(e.$slots, "activator", {
|
|
74
|
-
closed: b,
|
|
75
|
-
closing: u,
|
|
76
|
-
disabled: w,
|
|
77
|
-
open: p,
|
|
78
|
-
opening: r,
|
|
79
|
-
placement: f,
|
|
80
|
-
props: t
|
|
81
|
-
}, () => [
|
|
82
|
-
l(g, h(t, { class: "bb-dropdown-button__dropdown-btn" }), {
|
|
83
|
-
default: o(() => [
|
|
84
|
-
m("span", S, P(p || r ? "Chiudi" : "Apri") + " il menu", 1),
|
|
85
|
-
d(e.$slots, "right-btn", {
|
|
86
|
-
closed: b,
|
|
87
|
-
closing: u,
|
|
88
|
-
disabled: w,
|
|
89
|
-
open: p,
|
|
90
|
-
opening: r,
|
|
91
|
-
placement: f
|
|
92
|
-
}, () => [
|
|
93
|
-
_
|
|
94
|
-
])
|
|
95
|
-
]),
|
|
96
|
-
_: 2
|
|
97
|
-
}, 1040)
|
|
98
|
-
])
|
|
99
|
-
]),
|
|
100
|
-
prepend: o((t) => [
|
|
101
|
-
d(e.$slots, "prepend", n(a(t)))
|
|
102
|
-
]),
|
|
103
|
-
"item:prepend": o((t) => [
|
|
104
|
-
d(e.$slots, "item:prepend", n(a(t)))
|
|
105
|
-
]),
|
|
106
|
-
item: o((t) => [
|
|
107
|
-
d(e.$slots, "item", n(a(t)))
|
|
108
|
-
]),
|
|
109
|
-
"item:append": o((t) => [
|
|
110
|
-
d(e.$slots, "item:append", n(a(t)))
|
|
111
|
-
]),
|
|
112
|
-
append: o((t) => [
|
|
113
|
-
d(e.$slots, "append", n(a(t)))
|
|
114
|
-
]),
|
|
115
|
-
_: 2
|
|
116
|
-
}, [
|
|
117
|
-
D(e.items, (t) => ({
|
|
118
|
-
name: t.key,
|
|
119
|
-
fn: o((r) => [
|
|
120
|
-
d(e.$slots, t.key, n(a(r)))
|
|
121
|
-
])
|
|
122
|
-
}))
|
|
123
|
-
]), 1032, ["id", "arrow-padding", "disabled", "eager", "items", "offset", "padding", "placement", "theme", "transition-duration", "width"])
|
|
124
|
-
], 2));
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
export {
|
|
128
|
-
R as default
|
|
129
|
-
};
|
|
1
|
+
|
|
130
2
|
//# sourceMappingURL=index67.js.map
|
package/dist/index67.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index67.js","sources":[
|
|
1
|
+
{"version":3,"file":"index67.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index68.js
CHANGED
|
@@ -1,2 +1,130 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineComponent as c, computed as v, openBlock as B, createElementBlock as k, normalizeClass as y, createVNode as l, mergeProps as h, withCtx as o, renderSlot as d, createSlots as C, createElementVNode as m, toDisplayString as P, normalizeProps as n, guardReactiveProps as a, renderList as D } from "vue";
|
|
2
|
+
import g from "./index10.js";
|
|
3
|
+
import "./index11.js";
|
|
4
|
+
import L from "./index66.js";
|
|
5
|
+
import "./index67.js";
|
|
6
|
+
const S = { class: "bb-dropdown-button__dropdown-label" }, _ = /* @__PURE__ */ m("svg", {
|
|
7
|
+
class: "bb-dropdown-button__dropdown-chevron",
|
|
8
|
+
viewBox: "0 0 24 24",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10
|
+
}, [
|
|
11
|
+
/* @__PURE__ */ m("path", {
|
|
12
|
+
d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6l1.41 1.41Z",
|
|
13
|
+
fill: "currentColor"
|
|
14
|
+
})
|
|
15
|
+
], -1), R = /* @__PURE__ */ c({
|
|
16
|
+
__name: "BbDropdownButton",
|
|
17
|
+
props: {
|
|
18
|
+
arrowPadding: {},
|
|
19
|
+
block: { type: Boolean },
|
|
20
|
+
disabled: { type: Boolean },
|
|
21
|
+
eager: { type: Boolean },
|
|
22
|
+
id: {},
|
|
23
|
+
items: {},
|
|
24
|
+
offset: {},
|
|
25
|
+
padding: {},
|
|
26
|
+
placement: {},
|
|
27
|
+
theme: { default: "default" },
|
|
28
|
+
transitionDuration: {},
|
|
29
|
+
width: {}
|
|
30
|
+
},
|
|
31
|
+
setup($) {
|
|
32
|
+
const s = $, i = v(() => {
|
|
33
|
+
const e = { ...s.items[0] };
|
|
34
|
+
return e.disabled = e.disabled || s.disabled, e;
|
|
35
|
+
});
|
|
36
|
+
return (e, z) => (B(), k("span", {
|
|
37
|
+
class: y(["bb-dropdown-button", {
|
|
38
|
+
"bb-dropdown-button--block": e.block,
|
|
39
|
+
[`bb-dropdown-button--theme-${s.theme}`]: s.theme
|
|
40
|
+
}])
|
|
41
|
+
}, [
|
|
42
|
+
l(g, h(i.value, { class: "bb-dropdown-button__main-btn" }), {
|
|
43
|
+
default: o(() => [
|
|
44
|
+
d(e.$slots, "left-btn", {
|
|
45
|
+
disabled: i.value.disabled,
|
|
46
|
+
text: i.value.text
|
|
47
|
+
})
|
|
48
|
+
]),
|
|
49
|
+
_: 3
|
|
50
|
+
}, 16),
|
|
51
|
+
l(L, {
|
|
52
|
+
id: e.id,
|
|
53
|
+
"arrow-padding": e.arrowPadding,
|
|
54
|
+
disabled: e.disabled,
|
|
55
|
+
eager: e.eager,
|
|
56
|
+
items: e.items,
|
|
57
|
+
offset: e.offset,
|
|
58
|
+
padding: e.padding,
|
|
59
|
+
placement: e.placement,
|
|
60
|
+
theme: e.theme,
|
|
61
|
+
"transition-duration": e.transitionDuration,
|
|
62
|
+
width: e.width
|
|
63
|
+
}, C({
|
|
64
|
+
activator: o(({
|
|
65
|
+
props: t,
|
|
66
|
+
opening: r,
|
|
67
|
+
open: p,
|
|
68
|
+
closed: b,
|
|
69
|
+
closing: u,
|
|
70
|
+
disabled: w,
|
|
71
|
+
placement: f
|
|
72
|
+
}) => [
|
|
73
|
+
d(e.$slots, "activator", {
|
|
74
|
+
closed: b,
|
|
75
|
+
closing: u,
|
|
76
|
+
disabled: w,
|
|
77
|
+
open: p,
|
|
78
|
+
opening: r,
|
|
79
|
+
placement: f,
|
|
80
|
+
props: t
|
|
81
|
+
}, () => [
|
|
82
|
+
l(g, h(t, { class: "bb-dropdown-button__dropdown-btn" }), {
|
|
83
|
+
default: o(() => [
|
|
84
|
+
m("span", S, P(p || r ? "Chiudi" : "Apri") + " il menu", 1),
|
|
85
|
+
d(e.$slots, "right-btn", {
|
|
86
|
+
closed: b,
|
|
87
|
+
closing: u,
|
|
88
|
+
disabled: w,
|
|
89
|
+
open: p,
|
|
90
|
+
opening: r,
|
|
91
|
+
placement: f
|
|
92
|
+
}, () => [
|
|
93
|
+
_
|
|
94
|
+
])
|
|
95
|
+
]),
|
|
96
|
+
_: 2
|
|
97
|
+
}, 1040)
|
|
98
|
+
])
|
|
99
|
+
]),
|
|
100
|
+
prepend: o((t) => [
|
|
101
|
+
d(e.$slots, "prepend", n(a(t)))
|
|
102
|
+
]),
|
|
103
|
+
"item:prepend": o((t) => [
|
|
104
|
+
d(e.$slots, "item:prepend", n(a(t)))
|
|
105
|
+
]),
|
|
106
|
+
item: o((t) => [
|
|
107
|
+
d(e.$slots, "item", n(a(t)))
|
|
108
|
+
]),
|
|
109
|
+
"item:append": o((t) => [
|
|
110
|
+
d(e.$slots, "item:append", n(a(t)))
|
|
111
|
+
]),
|
|
112
|
+
append: o((t) => [
|
|
113
|
+
d(e.$slots, "append", n(a(t)))
|
|
114
|
+
]),
|
|
115
|
+
_: 2
|
|
116
|
+
}, [
|
|
117
|
+
D(e.items, (t) => ({
|
|
118
|
+
name: t.key,
|
|
119
|
+
fn: o((r) => [
|
|
120
|
+
d(e.$slots, t.key, n(a(r)))
|
|
121
|
+
])
|
|
122
|
+
}))
|
|
123
|
+
]), 1032, ["id", "arrow-padding", "disabled", "eager", "items", "offset", "padding", "placement", "theme", "transition-duration", "width"])
|
|
124
|
+
], 2));
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
export {
|
|
128
|
+
R as default
|
|
129
|
+
};
|
|
2
130
|
//# sourceMappingURL=index68.js.map
|