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/index32.js
CHANGED
|
@@ -1,2 +1,694 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineComponent as Ie, ref as m, computed as g, watch as Y, openBlock as p, createElementBlock as h, normalizeClass as x, renderSlot as b, createElementVNode as V, Fragment as $, renderList as P, toDisplayString as D, createBlock as ae, withModifiers as B, withCtx as ne, createTextVNode as Z, createCommentVNode as ue, withDirectives as Ne, vModelDynamic as $e, createVNode as oe, mergeProps as De, Teleport as Le, normalizeStyle as Fe, nextTick as ie } from "vue";
|
|
2
|
+
import Ae from "./index116.js";
|
|
3
|
+
import "./index159.js";
|
|
4
|
+
import Me from "./index120.js";
|
|
5
|
+
import "./index186.js";
|
|
6
|
+
import { useFloating as Je } from "./index208.js";
|
|
7
|
+
import { clamp as qe } from "./index197.js";
|
|
8
|
+
import { deepEqual as se } from "./index124.js";
|
|
9
|
+
import { head as G } from "./index220.js";
|
|
10
|
+
import { isNotNil as E } from "./index125.js";
|
|
11
|
+
import { last as ze } from "./index207.js";
|
|
12
|
+
import { useItemText as He } from "./index126.js";
|
|
13
|
+
import { useItemValue as Pe } from "./index127.js";
|
|
14
|
+
import { wait as X } from "./index123.js";
|
|
15
|
+
import { waitFor as je } from "./index213.js";
|
|
16
|
+
import { when as Qe } from "./index199.js";
|
|
17
|
+
import We from "./index117.js";
|
|
18
|
+
import "./index161.js";
|
|
19
|
+
import { autoUpdate as Ue, flip as Ke, shift as Re } from "./index214.js";
|
|
20
|
+
import { offset as Ye } from "./index215.js";
|
|
21
|
+
const Ze = { class: "bb-base-select__input-container" }, Ge = ["aria-describedby", "aria-controls", "aria-expanded", "autocomplete", "autofocus", "disabled", "id", "placeholder", "readonly"], Xe = { class: "bb-base-select__chevron" }, el = /* @__PURE__ */ V("svg", {
|
|
22
|
+
fill: "none",
|
|
23
|
+
viewBox: "0 0 16 8",
|
|
24
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
25
|
+
}, [
|
|
26
|
+
/* @__PURE__ */ V("path", {
|
|
27
|
+
"clip-rule": "evenodd",
|
|
28
|
+
d: "M0.851779 0.225802C0.90403 0.173418 0.966103 0.131858 1.03444 0.1035C1.10278 0.0751431 1.17604 0.0605469 1.25003 0.0605469C1.32402 0.0605469 1.39728 0.0751431 1.46562 0.1035C1.53396 0.131858 1.59603 0.173418 1.64828 0.225802L8.00003 6.57868L14.3518 0.225802C14.4041 0.173503 14.4662 0.132017 14.5345 0.103713C14.6028 0.0754093 14.6761 0.0608414 14.75 0.0608414C14.824 0.0608414 14.8972 0.0754093 14.9656 0.103713C15.0339 0.132017 15.096 0.173503 15.1483 0.225802C15.2006 0.278101 15.2421 0.340189 15.2704 0.408521C15.2987 0.476852 15.3132 0.55009 15.3132 0.624052C15.3132 0.698014 15.2987 0.771252 15.2704 0.839584C15.2421 0.907916 15.2006 0.970003 15.1483 1.0223L8.39828 7.7723C8.34603 7.82469 8.28395 7.86625 8.21562 7.8946C8.14728 7.92296 8.07402 7.93756 8.00003 7.93756C7.92604 7.93756 7.85278 7.92296 7.78444 7.8946C7.7161 7.86625 7.65403 7.82469 7.60178 7.7723L0.851779 1.0223C0.799395 0.970051 0.757835 0.907978 0.729477 0.83964C0.70112 0.771302 0.686523 0.69804 0.686523 0.624052C0.686523 0.550064 0.70112 0.476803 0.729477 0.408464C0.757835 0.340126 0.799395 0.278053 0.851779 0.225802Z",
|
|
29
|
+
fill: "currentColor",
|
|
30
|
+
"fill-rule": "evenodd"
|
|
31
|
+
})
|
|
32
|
+
], -1), ll = ["id"], tl = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "bb-base-select__loading-container"
|
|
35
|
+
}, al = {
|
|
36
|
+
key: 1,
|
|
37
|
+
class: "bb-base-select__no-data-container"
|
|
38
|
+
}, nl = ["id", "aria-selected"], ul = { class: "bb-base-select-option__content" }, ol = { class: "bb-base-select-option__text" }, Tl = /* @__PURE__ */ Ie({
|
|
39
|
+
__name: "BaseSelect",
|
|
40
|
+
props: {
|
|
41
|
+
allowWriting: { type: Boolean, default: !0 },
|
|
42
|
+
ariaDescribedby: {},
|
|
43
|
+
autocomplete: {},
|
|
44
|
+
autofocus: {},
|
|
45
|
+
debug: { type: Boolean },
|
|
46
|
+
dependencies: {},
|
|
47
|
+
depsDebounceTime: { default: 0 },
|
|
48
|
+
disabled: { type: Boolean },
|
|
49
|
+
enforceCoherence: { type: Boolean },
|
|
50
|
+
hasErrors: { type: Boolean },
|
|
51
|
+
id: {},
|
|
52
|
+
loadingText: { default: "Caricamento..." },
|
|
53
|
+
matchStrategy: { default: "string" },
|
|
54
|
+
modelValueDebounceTime: { default: 0 },
|
|
55
|
+
multiple: { type: Boolean },
|
|
56
|
+
name: {},
|
|
57
|
+
noDataText: { default: "Nessun elemento da visualizzare" },
|
|
58
|
+
placeholder: {},
|
|
59
|
+
readonly: {},
|
|
60
|
+
transitionDuration: { default: 150 },
|
|
61
|
+
items: {},
|
|
62
|
+
itemText: {},
|
|
63
|
+
itemValue: {},
|
|
64
|
+
modelValue: {},
|
|
65
|
+
addOptions: { type: Boolean },
|
|
66
|
+
comma: { type: Boolean },
|
|
67
|
+
filterBy: { type: [String, Array, Boolean, Function, null], default: () => [] },
|
|
68
|
+
prefill: { type: [Boolean, String], default: "focus" },
|
|
69
|
+
queryDebounceTime: { default: 500 },
|
|
70
|
+
resetQueryOnOptionSelected: { type: Boolean },
|
|
71
|
+
stash: { type: Boolean },
|
|
72
|
+
updateOnAnimationFrame: { type: Boolean, default: !1 }
|
|
73
|
+
},
|
|
74
|
+
emits: ["blur", "change", "click", "focus", "inactive", "input", "update:modelValue"],
|
|
75
|
+
setup(re, { emit: de }) {
|
|
76
|
+
const l = re, c = de;
|
|
77
|
+
if (l.multiple && !Array.isArray(l.modelValue))
|
|
78
|
+
throw new Error('Multiple is set to "true" but modelValue is not an array.');
|
|
79
|
+
const L = m(null), J = m(null), k = m(null), { floatingStyles: ce } = Je(J, k, {
|
|
80
|
+
placement: "bottom",
|
|
81
|
+
whileElementsMounted: Ue,
|
|
82
|
+
middleware: [Ke(), Ye(5), Re()]
|
|
83
|
+
}), fe = g(() => {
|
|
84
|
+
const e = {
|
|
85
|
+
...ce.value
|
|
86
|
+
};
|
|
87
|
+
return J.value && (e.width = `${J.value.clientWidth}px`), e;
|
|
88
|
+
}), S = m(null), o = m(""), ve = g(() => s.value.length ? "" : l.placeholder), d = m(0), ee = m([]), f = m([]), _ = m([]), { getItemText: me } = He(), { getItemValue: pe } = Pe(), be = g(() => ee.value.map((e, a) => {
|
|
89
|
+
const t = me(e, l.itemText), n = pe(e, l.itemValue);
|
|
90
|
+
if (n === void 0)
|
|
91
|
+
throw new Error(
|
|
92
|
+
'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(e) + " please check itemValue property is correct."
|
|
93
|
+
);
|
|
94
|
+
const u = JSON.stringify(n);
|
|
95
|
+
return {
|
|
96
|
+
disabled: !!e.disabled,
|
|
97
|
+
id: "option_" + u.replace(/\W/g, "_"),
|
|
98
|
+
jsonValue: u,
|
|
99
|
+
manual: !1,
|
|
100
|
+
original: e,
|
|
101
|
+
text: t,
|
|
102
|
+
value: n
|
|
103
|
+
};
|
|
104
|
+
})), O = g(() => {
|
|
105
|
+
let e = be.value.reduce(
|
|
106
|
+
(n, u) => (n[u.id] = u, n),
|
|
107
|
+
{}
|
|
108
|
+
);
|
|
109
|
+
const a = _.value.reduce(
|
|
110
|
+
(n, u) => (n[u.id] || (n[u.id] = u), n),
|
|
111
|
+
e
|
|
112
|
+
), t = f.value.reduce(
|
|
113
|
+
(n, u) => (n[u.id] || (n[u.id] = u), n),
|
|
114
|
+
a
|
|
115
|
+
);
|
|
116
|
+
return Object.values(t).map((n, u) => ({
|
|
117
|
+
...n,
|
|
118
|
+
selected: E(he.value.get(n.value)),
|
|
119
|
+
index: u
|
|
120
|
+
}));
|
|
121
|
+
}), w = g(() => {
|
|
122
|
+
let e = [];
|
|
123
|
+
return o.value && !s.value.some((a) => a.text === o.value) ? e = O.value.filter((a) => {
|
|
124
|
+
let t = !1;
|
|
125
|
+
if (l.filterBy) {
|
|
126
|
+
if (typeof l.filterBy == "function")
|
|
127
|
+
t = l.filterBy(a.value, a.original);
|
|
128
|
+
else if (l.filterBy.length) {
|
|
129
|
+
const n = [].concat(l.filterBy);
|
|
130
|
+
for (let u = 0; u < n.length; u++) {
|
|
131
|
+
const T = n[u];
|
|
132
|
+
t = t || a.original[T] && a.original[T].toLowerCase().includes(o.value.toLowerCase());
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
} else
|
|
136
|
+
return !0;
|
|
137
|
+
return t || a.text.toLowerCase().includes(o.value.toLowerCase());
|
|
138
|
+
}) : e = O.value, e;
|
|
139
|
+
}), q = g(
|
|
140
|
+
() => O.value.reduce(
|
|
141
|
+
(e, a) => ({
|
|
142
|
+
...e,
|
|
143
|
+
[a.id]: a
|
|
144
|
+
}),
|
|
145
|
+
{}
|
|
146
|
+
)
|
|
147
|
+
), v = g(() => {
|
|
148
|
+
if (l.matchStrategy === "string") {
|
|
149
|
+
let e = O.value.reduce(
|
|
150
|
+
(a, t) => (a[t.jsonValue] = t, a),
|
|
151
|
+
{}
|
|
152
|
+
);
|
|
153
|
+
return {
|
|
154
|
+
get: (a) => e[JSON.stringify(a)]
|
|
155
|
+
};
|
|
156
|
+
} else if (l.matchStrategy === "equality") {
|
|
157
|
+
let e = O.value.map((a) => [
|
|
158
|
+
a.value,
|
|
159
|
+
a
|
|
160
|
+
]);
|
|
161
|
+
return {
|
|
162
|
+
get: (a) => {
|
|
163
|
+
var t;
|
|
164
|
+
return (t = e.find((n) => se(n[0], a))) == null ? void 0 : t[1];
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
} else
|
|
168
|
+
throw new Error("No match strategy has been defined");
|
|
169
|
+
}), he = g(() => {
|
|
170
|
+
if (l.matchStrategy === "string") {
|
|
171
|
+
let e = {};
|
|
172
|
+
return [].concat(l.modelValue).forEach((a, t) => {
|
|
173
|
+
e[JSON.stringify(a)] = t;
|
|
174
|
+
}), {
|
|
175
|
+
get: (a) => e[JSON.stringify(a)]
|
|
176
|
+
};
|
|
177
|
+
} else if (l.matchStrategy === "equality") {
|
|
178
|
+
const e = [].concat(l.modelValue).filter(E).map((a, t) => [a, t]);
|
|
179
|
+
return {
|
|
180
|
+
get: (a) => {
|
|
181
|
+
var t;
|
|
182
|
+
return (t = e.find((n) => se(n[0], a))) == null ? void 0 : t[1];
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
} else
|
|
186
|
+
throw new Error("No match strategy has been defined");
|
|
187
|
+
}), s = g(() => [].concat(l.modelValue).reduce((e, a) => {
|
|
188
|
+
const t = v.value.get(a);
|
|
189
|
+
return t && e.push(t), e;
|
|
190
|
+
}, [])), F = (e) => {
|
|
191
|
+
let a;
|
|
192
|
+
r.value = e.index, l.multiple ? (e.selected ? (e.manual && (_.value = _.value.filter(
|
|
193
|
+
(t) => t.id !== e.id
|
|
194
|
+
)), a = l.modelValue.filter(
|
|
195
|
+
(t) => JSON.stringify(t) !== e.jsonValue
|
|
196
|
+
), l.stash && (f.value = f.value.filter((t) => t.id !== e.id))) : (a = l.modelValue.concat(e.value), l.stash && (f.value = f.value.concat(e))), l.resetQueryOnOptionSelected && (o.value = "")) : e.selected ? (e.manual && (_.value = _.value.filter(
|
|
197
|
+
(t) => t.id !== e.id
|
|
198
|
+
)), a = null, l.stash && (f.value = []), o.value = "") : (a = e.value, l.stash && (f.value = [e]), o.value = e.text), c("update:modelValue", a);
|
|
199
|
+
}, I = async ({ prefill: e = !1 }) => {
|
|
200
|
+
let a = [];
|
|
201
|
+
Array.isArray(l.items) ? a = l.items : typeof l.items == "function" && (d.value++, a = await l.items(o.value, e, l.modelValue), d.value--), ee.value = a;
|
|
202
|
+
}, ye = () => {
|
|
203
|
+
const e = o.value, a = o.value, t = JSON.stringify(a), n = {
|
|
204
|
+
text: e,
|
|
205
|
+
value: a,
|
|
206
|
+
jsonValue: t,
|
|
207
|
+
id: "option_" + t.replace(/\W/g, "_"),
|
|
208
|
+
original: a,
|
|
209
|
+
manual: !0,
|
|
210
|
+
disabled: !1
|
|
211
|
+
};
|
|
212
|
+
_.value = _.value.concat(n), o.value = "";
|
|
213
|
+
}, z = l.prefill === !0 || !l.multiple && E(l.modelValue) || l.multiple && !!l.modelValue.length;
|
|
214
|
+
let j;
|
|
215
|
+
Y(
|
|
216
|
+
() => l.modelValue,
|
|
217
|
+
(e, a) => {
|
|
218
|
+
j && clearTimeout(j), j = setTimeout(
|
|
219
|
+
async () => {
|
|
220
|
+
if (l.multiple) {
|
|
221
|
+
if (!Array.isArray(l.modelValue))
|
|
222
|
+
throw new Error("props.modelValue is not an array.");
|
|
223
|
+
let t = l.modelValue.every(
|
|
224
|
+
(n) => v.value.get(n)
|
|
225
|
+
);
|
|
226
|
+
if ((!t || a === void 0) && (await I({ prefill: !0 }), t = l.modelValue.every(
|
|
227
|
+
(n) => v.value.get(n)
|
|
228
|
+
)), t)
|
|
229
|
+
l.stash && (f.value = l.modelValue.map(
|
|
230
|
+
(n) => v.value.get(n)
|
|
231
|
+
));
|
|
232
|
+
else {
|
|
233
|
+
let n = [];
|
|
234
|
+
const u = e.filter((T) => {
|
|
235
|
+
let M = v.value.get(T);
|
|
236
|
+
return M && n.push(M), M;
|
|
237
|
+
});
|
|
238
|
+
l.stash && (f.value = n), l.enforceCoherence && c("update:modelValue", u);
|
|
239
|
+
}
|
|
240
|
+
} else {
|
|
241
|
+
let t = v.value.get(l.modelValue);
|
|
242
|
+
if (!t && E(l.modelValue) || a === void 0) {
|
|
243
|
+
const n = o.value;
|
|
244
|
+
o.value = "", await I({ prefill: !0 }), o.value = n;
|
|
245
|
+
}
|
|
246
|
+
t = v.value.get(l.modelValue), t ? (o.value = t.text, l.stash && (f.value = [t])) : l.enforceCoherence && E(e) ? (o.value = "", l.stash && (f.value = []), c("update:modelValue", null)) : o.value = "";
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
z ? 0 : l.modelValueDebounceTime
|
|
250
|
+
);
|
|
251
|
+
},
|
|
252
|
+
// Prefill when asked or when items are static
|
|
253
|
+
{ immediate: z, deep: !0 }
|
|
254
|
+
), Y(
|
|
255
|
+
() => l.items,
|
|
256
|
+
async (e, a) => {
|
|
257
|
+
if (typeof e == "function" || // Circumvent arrays defined in the template by the parent
|
|
258
|
+
JSON.stringify(e) !== JSON.stringify(a))
|
|
259
|
+
if (await I({ prefill: !1 }), l.multiple) {
|
|
260
|
+
if (!l.modelValue.every(
|
|
261
|
+
(n) => v.value.get(n)
|
|
262
|
+
) && l.enforceCoherence) {
|
|
263
|
+
const n = l.modelValue.filter((u) => v.value.get(u));
|
|
264
|
+
c("update:modelValue", n);
|
|
265
|
+
}
|
|
266
|
+
} else
|
|
267
|
+
!v.value.get(l.modelValue) && l.enforceCoherence && E(l.modelValue) && c("update:modelValue", null), r.value = null;
|
|
268
|
+
}
|
|
269
|
+
);
|
|
270
|
+
let Q;
|
|
271
|
+
Y(
|
|
272
|
+
() => l.dependencies,
|
|
273
|
+
(e, a) => {
|
|
274
|
+
!z && l.prefill === "focus" && U || JSON.stringify(e) !== JSON.stringify(a) && (Q && clearTimeout(Q), Q = setTimeout(async () => {
|
|
275
|
+
if (JSON.stringify(e) !== JSON.stringify(a)) {
|
|
276
|
+
l.enforceCoherence && l.stash && (f.value = []);
|
|
277
|
+
let t = o.value;
|
|
278
|
+
if (o.value = "", await I({ prefill: !0 }), o.value = t, !l.multiple)
|
|
279
|
+
!v.value.get(l.modelValue) && l.enforceCoherence && E(l.modelValue) && (o.value = "", l.stash && (f.value = []), c("update:modelValue", null));
|
|
280
|
+
else if (!l.modelValue.every(
|
|
281
|
+
(u) => v.value.get(u)
|
|
282
|
+
) && l.enforceCoherence) {
|
|
283
|
+
let u = [];
|
|
284
|
+
const T = l.modelValue.filter((M) => {
|
|
285
|
+
let R = v.value.get(M);
|
|
286
|
+
return R && u.push(R), R;
|
|
287
|
+
});
|
|
288
|
+
l.stash && (f.value = u), c("update:modelValue", T);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}, l.depsDebounceTime));
|
|
292
|
+
},
|
|
293
|
+
{ deep: !0 }
|
|
294
|
+
);
|
|
295
|
+
const y = m(!1), W = m(!0), N = async () => {
|
|
296
|
+
W.value = !1, y.value = !0;
|
|
297
|
+
}, A = async () => {
|
|
298
|
+
y.value = !1, W.value = !0;
|
|
299
|
+
}, H = m(!1);
|
|
300
|
+
let U = !0;
|
|
301
|
+
const ge = async (e) => {
|
|
302
|
+
c("focus", e), H.value = !0, document.addEventListener("click", te), document.addEventListener("focusin", le), S.value instanceof HTMLInputElement && window.screen.width > 768 && S.value.select(), l.prefill === "focus" && U && !z && (await I({ prefill: !0 }), U = !1);
|
|
303
|
+
}, le = (e) => {
|
|
304
|
+
if (e.target instanceof Node && L.value && k.value && !L.value.contains(e.target) && !k.value.contains(e.target)) {
|
|
305
|
+
A(), c("inactive"), document.removeEventListener("focusin", le), H.value = !1, l.multiple && X(500).then(() => {
|
|
306
|
+
o.value = "";
|
|
307
|
+
});
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
}, we = async (e) => {
|
|
311
|
+
if (c("blur", e), !l.multiple) {
|
|
312
|
+
let a = !1;
|
|
313
|
+
const t = l.modelValue;
|
|
314
|
+
if (await Promise.race([
|
|
315
|
+
X(250),
|
|
316
|
+
je(() => t !== l.modelValue).then(() => {
|
|
317
|
+
a = !0;
|
|
318
|
+
})
|
|
319
|
+
]), !a) {
|
|
320
|
+
const n = v.value.get(l.modelValue);
|
|
321
|
+
n && (o.value = n.text);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}, Ve = (e) => c("change", e), Ce = (e) => {
|
|
325
|
+
c("input", e), o.value === "" && (l.multiple || c("update:modelValue", null)), typeof l.items == "function" && Se();
|
|
326
|
+
}, r = m(null), C = g(() => {
|
|
327
|
+
if (r.value === null || !w.value.length)
|
|
328
|
+
return null;
|
|
329
|
+
let e = r.value >= 0 ? r.value : w.value.length - 1;
|
|
330
|
+
const a = 0, t = w.value.length - 1;
|
|
331
|
+
return qe(e % w.value.length, a, t);
|
|
332
|
+
}), i = m(null), ke = () => {
|
|
333
|
+
r.value !== null ? r.value++ : r.value = 0, ie().then(() => {
|
|
334
|
+
var e;
|
|
335
|
+
if (C.value !== null) {
|
|
336
|
+
const a = (e = k.value) == null ? void 0 : e.querySelector(
|
|
337
|
+
`#${O.value[C.value].id}`
|
|
338
|
+
);
|
|
339
|
+
a instanceof HTMLElement && a.scrollIntoView({
|
|
340
|
+
behavior: "smooth",
|
|
341
|
+
block: "nearest",
|
|
342
|
+
inline: "start"
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}, _e = () => {
|
|
347
|
+
r.value !== null ? r.value-- : r.value = O.value.length - 1, ie().then(() => {
|
|
348
|
+
var e;
|
|
349
|
+
if (C.value !== null) {
|
|
350
|
+
const a = (e = k.value) == null ? void 0 : e.querySelector(
|
|
351
|
+
`#${O.value[C.value].id}`
|
|
352
|
+
);
|
|
353
|
+
a instanceof HTMLElement && a.scrollIntoView({
|
|
354
|
+
behavior: "smooth",
|
|
355
|
+
block: "nearest",
|
|
356
|
+
inline: "start"
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
}, Oe = async (e) => {
|
|
361
|
+
var a, t;
|
|
362
|
+
if (l.readonly || l.disabled) {
|
|
363
|
+
e.preventDefault();
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
switch (e.key) {
|
|
367
|
+
case "ArrowUp":
|
|
368
|
+
{
|
|
369
|
+
if (e.preventDefault(), d.value)
|
|
370
|
+
return;
|
|
371
|
+
i.value = null, y.value ? _e() : (s.value.length && (r.value = G(s.value).index), await N());
|
|
372
|
+
}
|
|
373
|
+
break;
|
|
374
|
+
case "ArrowDown":
|
|
375
|
+
{
|
|
376
|
+
if (e.preventDefault(), d.value)
|
|
377
|
+
return;
|
|
378
|
+
i.value = null, y.value ? ke() : (s.value.length && (r.value = G(s.value).index), await N());
|
|
379
|
+
}
|
|
380
|
+
break;
|
|
381
|
+
case "ArrowLeft":
|
|
382
|
+
{
|
|
383
|
+
if (d.value)
|
|
384
|
+
return;
|
|
385
|
+
if (!o.value && s.value.length && (i.value === null ? i.value = s.value.length - 1 : i.value > 0 ? i.value-- : i.value = null, i.value !== null)) {
|
|
386
|
+
let n = s.value[i.value], u = (a = k.value) == null ? void 0 : a.querySelector(
|
|
387
|
+
`#${n.id}`
|
|
388
|
+
);
|
|
389
|
+
u && (u.scrollIntoView({
|
|
390
|
+
behavior: "smooth",
|
|
391
|
+
block: "nearest",
|
|
392
|
+
inline: "start"
|
|
393
|
+
}), r.value = q.value[s.value[i.value].id].index);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
break;
|
|
397
|
+
case "ArrowRight":
|
|
398
|
+
{
|
|
399
|
+
if (d.value)
|
|
400
|
+
return;
|
|
401
|
+
if (!o.value && s.value.length && (i.value === null ? i.value = 0 : i.value < s.value.length - 1 ? i.value++ : i.value = null, i.value !== null)) {
|
|
402
|
+
let n = s.value[i.value], u = (t = k.value) == null ? void 0 : t.querySelector(
|
|
403
|
+
`#${n.id}`
|
|
404
|
+
);
|
|
405
|
+
u && (u.scrollIntoView({
|
|
406
|
+
behavior: "smooth",
|
|
407
|
+
block: "nearest",
|
|
408
|
+
inline: "start"
|
|
409
|
+
}), r.value = q.value[s.value[i.value].id].index);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
break;
|
|
413
|
+
case "Enter":
|
|
414
|
+
{
|
|
415
|
+
if (e.preventDefault(), d.value)
|
|
416
|
+
return;
|
|
417
|
+
if (!y.value)
|
|
418
|
+
w.value.length && s.value.length && (r.value = G(s.value).index), await N();
|
|
419
|
+
else if (C.value !== null) {
|
|
420
|
+
if (w.value[C.value].disabled)
|
|
421
|
+
return;
|
|
422
|
+
l.multiple || await A(), F(
|
|
423
|
+
w.value[C.value]
|
|
424
|
+
);
|
|
425
|
+
} else if (l.addOptions) {
|
|
426
|
+
if (l.itemText || l.itemValue) {
|
|
427
|
+
console.error(
|
|
428
|
+
`Adding an option for mapped items is not supported. You can't create an option while passing "item-text" or "item-value".`
|
|
429
|
+
);
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
ye();
|
|
433
|
+
const n = ze(_.value);
|
|
434
|
+
n && F(q.value[n.id]);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
break;
|
|
438
|
+
case "Tab":
|
|
439
|
+
case "Escape":
|
|
440
|
+
y.value && await A(), c("inactive"), i.value = null, r.value = null;
|
|
441
|
+
break;
|
|
442
|
+
case "Shift":
|
|
443
|
+
if (d.value)
|
|
444
|
+
return;
|
|
445
|
+
break;
|
|
446
|
+
case "Backspace":
|
|
447
|
+
{
|
|
448
|
+
if (d.value)
|
|
449
|
+
return;
|
|
450
|
+
o.value || s.value.length && (i.value === null ? i.value = s.value.length - 1 : (F(
|
|
451
|
+
s.value[i.value]
|
|
452
|
+
), s.value.length ? i.value = Math.max(
|
|
453
|
+
Math.min(
|
|
454
|
+
i.value,
|
|
455
|
+
s.value.length - 2
|
|
456
|
+
),
|
|
457
|
+
0
|
|
458
|
+
) : i.value = null)), await N();
|
|
459
|
+
}
|
|
460
|
+
break;
|
|
461
|
+
default:
|
|
462
|
+
i.value = null, r.value = null, await N();
|
|
463
|
+
break;
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
let K;
|
|
467
|
+
const Se = () => {
|
|
468
|
+
K && clearTimeout(K), K = setTimeout(async () => {
|
|
469
|
+
try {
|
|
470
|
+
await I({ prefill: !1 });
|
|
471
|
+
} catch (e) {
|
|
472
|
+
console.error(e);
|
|
473
|
+
}
|
|
474
|
+
}, l.queryDebounceTime);
|
|
475
|
+
}, Te = (e) => {
|
|
476
|
+
c("click", e), !(l.disabled || l.readonly) && (S.value instanceof HTMLElement && S.value.focus(), N());
|
|
477
|
+
}, xe = (e) => {
|
|
478
|
+
if (e.currentTarget instanceof HTMLElement && (e.stopImmediatePropagation(), e.currentTarget.classList.contains("bb-base-select-option"))) {
|
|
479
|
+
const a = q.value[e.currentTarget.id];
|
|
480
|
+
if (a.disabled)
|
|
481
|
+
return;
|
|
482
|
+
S.value instanceof HTMLInputElement && S.value.focus(), l.multiple || A(), F(a);
|
|
483
|
+
}
|
|
484
|
+
}, te = (e) => {
|
|
485
|
+
if (e.target instanceof Node && L.value && !L.value.contains(e.target)) {
|
|
486
|
+
A(), c("inactive"), document.removeEventListener("click", te), H.value = !1, l.multiple && X(500).then(() => {
|
|
487
|
+
o.value = "";
|
|
488
|
+
});
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
}, Be = Qe(
|
|
492
|
+
(e) => typeof e != "string",
|
|
493
|
+
JSON.stringify
|
|
494
|
+
), Ee = g(() => [].concat(l.modelValue).map((e) => {
|
|
495
|
+
const a = Be(e);
|
|
496
|
+
return {
|
|
497
|
+
disabled: l.disabled,
|
|
498
|
+
name: l.name,
|
|
499
|
+
type: "hidden",
|
|
500
|
+
value: a
|
|
501
|
+
};
|
|
502
|
+
}));
|
|
503
|
+
return (e, a) => (p(), h("div", {
|
|
504
|
+
ref_key: "outerContainer",
|
|
505
|
+
ref: L,
|
|
506
|
+
class: x({
|
|
507
|
+
"bb-base-select": !0,
|
|
508
|
+
"bb-base-select--active": H.value,
|
|
509
|
+
"bb-base-select--shown": y.value,
|
|
510
|
+
"bb-base-select--loading": d.value,
|
|
511
|
+
"bb-base-select--disabled": e.disabled,
|
|
512
|
+
"bb-base-select--errors": e.hasErrors,
|
|
513
|
+
"bb-base-select--readonly": e.readonly
|
|
514
|
+
}),
|
|
515
|
+
onClick: Te
|
|
516
|
+
}, [
|
|
517
|
+
b(e.$slots, "prepend-outer"),
|
|
518
|
+
V("span", {
|
|
519
|
+
ref_key: "innerContainer",
|
|
520
|
+
ref: J,
|
|
521
|
+
class: "bb-base-select__inner-container"
|
|
522
|
+
}, [
|
|
523
|
+
b(e.$slots, "prepend"),
|
|
524
|
+
V("span", Ze, [
|
|
525
|
+
e.multiple ? (p(), h($, { key: 0 }, [
|
|
526
|
+
e.comma ? (p(!0), h($, { key: 0 }, P(s.value, (t, n) => (p(), h("span", {
|
|
527
|
+
key: t.id,
|
|
528
|
+
class: x({
|
|
529
|
+
"bb-base-select__selected": !0,
|
|
530
|
+
"bb-base-select__selected--comma": !0,
|
|
531
|
+
"bb-base-select__selected--focused": n === i.value
|
|
532
|
+
})
|
|
533
|
+
}, D(t.text) + D(n < s.value.length - 1 ? "," : ""), 3))), 128)) : (p(!0), h($, { key: 1 }, P(s.value, (t, n) => (p(), ae(Ae, {
|
|
534
|
+
key: t.id,
|
|
535
|
+
class: x({
|
|
536
|
+
"bb-base-select__selected": !0,
|
|
537
|
+
"bb-base-select__selected--chip": !0,
|
|
538
|
+
"bb-base-select__selected--focused": n === i.value
|
|
539
|
+
}),
|
|
540
|
+
clearable: !0,
|
|
541
|
+
text: t.text,
|
|
542
|
+
"onClick:clear": B((u) => F(t), ["stop"])
|
|
543
|
+
}, {
|
|
544
|
+
default: ne(() => [
|
|
545
|
+
b(e.$slots, "chip", {
|
|
546
|
+
disabled: t.disabled,
|
|
547
|
+
hasErrors: e.hasErrors,
|
|
548
|
+
index: t.index,
|
|
549
|
+
item: t.original,
|
|
550
|
+
loading: !!d.value,
|
|
551
|
+
manual: t.manual,
|
|
552
|
+
selected: t.selected,
|
|
553
|
+
text: t.text,
|
|
554
|
+
value: t.value
|
|
555
|
+
}, () => [
|
|
556
|
+
Z(D(t.text), 1)
|
|
557
|
+
])
|
|
558
|
+
]),
|
|
559
|
+
_: 2
|
|
560
|
+
}, 1032, ["class", "text", "onClick:clear"]))), 128))
|
|
561
|
+
], 64)) : ue("", !0),
|
|
562
|
+
Ne(V("input", {
|
|
563
|
+
"aria-autocomplete": "list",
|
|
564
|
+
"aria-describedby": e.ariaDescribedby,
|
|
565
|
+
"aria-controls": `${e.id}_listbox`,
|
|
566
|
+
"aria-expanded": y.value,
|
|
567
|
+
autocomplete: e.autocomplete,
|
|
568
|
+
autofocus: e.autofocus,
|
|
569
|
+
class: x("bb-base-select__text-input"),
|
|
570
|
+
disabled: e.disabled,
|
|
571
|
+
id: e.id,
|
|
572
|
+
placeholder: ve.value,
|
|
573
|
+
readonly: e.readonly || !e.allowWriting,
|
|
574
|
+
type: "text",
|
|
575
|
+
ref_key: "input",
|
|
576
|
+
ref: S,
|
|
577
|
+
role: "combobox",
|
|
578
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => o.value = t),
|
|
579
|
+
onBlur: B(we, ["stop"]),
|
|
580
|
+
onChange: B(Ve, ["stop"]),
|
|
581
|
+
onFocus: B(ge, ["stop"]),
|
|
582
|
+
onInput: B(Ce, ["stop"]),
|
|
583
|
+
onKeydown: B(Oe, ["stop"])
|
|
584
|
+
}, null, 40, Ge), [
|
|
585
|
+
[$e, o.value]
|
|
586
|
+
])
|
|
587
|
+
]),
|
|
588
|
+
V("span", Xe, [
|
|
589
|
+
b(e.$slots, "chevron", {
|
|
590
|
+
loading: !!d.value,
|
|
591
|
+
shown: y.value
|
|
592
|
+
}, () => [
|
|
593
|
+
el
|
|
594
|
+
])
|
|
595
|
+
]),
|
|
596
|
+
d.value ? (p(), h("span", {
|
|
597
|
+
key: 1,
|
|
598
|
+
class: x({
|
|
599
|
+
"bb-base-select__spinner": !0,
|
|
600
|
+
"bb-base-select__spinner--loading": d.value
|
|
601
|
+
})
|
|
602
|
+
}, [
|
|
603
|
+
b(e.$slots, "spinner", {
|
|
604
|
+
loading: !!d.value
|
|
605
|
+
}, () => [
|
|
606
|
+
oe(Me)
|
|
607
|
+
])
|
|
608
|
+
], 2)) : b(e.$slots, "append", { key: 0 })
|
|
609
|
+
], 512),
|
|
610
|
+
b(e.$slots, "append-outer"),
|
|
611
|
+
(p(!0), h($, null, P(Ee.value, (t) => (p(), h("input", De({
|
|
612
|
+
key: t.value
|
|
613
|
+
}, t), null, 16))), 128)),
|
|
614
|
+
(p(), ae(Le, { to: "body" }, [
|
|
615
|
+
V("span", {
|
|
616
|
+
ref_key: "optionsContainer",
|
|
617
|
+
ref: k,
|
|
618
|
+
class: x({
|
|
619
|
+
"bb-base-select__options-container": !0,
|
|
620
|
+
"bb-base-select__options-container--shown": y.value,
|
|
621
|
+
"bb-base-select__options-container--hidden": W.value
|
|
622
|
+
}),
|
|
623
|
+
id: `${e.id}_listbox`,
|
|
624
|
+
role: "listbox",
|
|
625
|
+
tabindex: -1,
|
|
626
|
+
style: Fe(fe.value)
|
|
627
|
+
}, [
|
|
628
|
+
oe(We, {
|
|
629
|
+
modelValue: y.value,
|
|
630
|
+
"transition-duration": e.transitionDuration
|
|
631
|
+
}, {
|
|
632
|
+
default: ne(() => [
|
|
633
|
+
b(e.$slots, "options:prepend"),
|
|
634
|
+
!w.value.length && d.value ? (p(), h("span", tl, [
|
|
635
|
+
b(e.$slots, "loading", { query: o.value }, () => [
|
|
636
|
+
Z(D(e.loadingText), 1)
|
|
637
|
+
])
|
|
638
|
+
])) : w.value.length ? ue("", !0) : (p(), h("span", al, [
|
|
639
|
+
b(e.$slots, "no-data", { query: o.value }, () => [
|
|
640
|
+
Z(D(e.noDataText), 1)
|
|
641
|
+
])
|
|
642
|
+
])),
|
|
643
|
+
(p(!0), h($, null, P(w.value, (t, n) => (p(), h($, {
|
|
644
|
+
key: t.id
|
|
645
|
+
}, [
|
|
646
|
+
b(e.$slots, "option:prepend", {
|
|
647
|
+
item: t.original
|
|
648
|
+
}),
|
|
649
|
+
V("span", {
|
|
650
|
+
id: t.id,
|
|
651
|
+
"aria-selected": t.selected,
|
|
652
|
+
class: x({
|
|
653
|
+
"bb-base-select-option": !0,
|
|
654
|
+
"bb-base-select-option--selected": t.selected,
|
|
655
|
+
"bb-base-select-option--focused": C.value === n,
|
|
656
|
+
"bb-base-select-option--disabled": t.disabled
|
|
657
|
+
}),
|
|
658
|
+
role: "option",
|
|
659
|
+
onClick: B(xe, ["stop"])
|
|
660
|
+
}, [
|
|
661
|
+
b(e.$slots, "option", {
|
|
662
|
+
disabled: t.disabled,
|
|
663
|
+
focused: C.value === n,
|
|
664
|
+
hasErrors: e.hasErrors,
|
|
665
|
+
index: t.index,
|
|
666
|
+
item: t.original,
|
|
667
|
+
loading: !!d.value,
|
|
668
|
+
manual: t.manual,
|
|
669
|
+
selected: t.selected,
|
|
670
|
+
text: t.text,
|
|
671
|
+
value: t.value
|
|
672
|
+
}, () => [
|
|
673
|
+
V("span", ul, [
|
|
674
|
+
V("span", ol, D(t.text), 1)
|
|
675
|
+
])
|
|
676
|
+
])
|
|
677
|
+
], 10, nl),
|
|
678
|
+
b(e.$slots, "option:append", {
|
|
679
|
+
item: t.original
|
|
680
|
+
})
|
|
681
|
+
], 64))), 128)),
|
|
682
|
+
b(e.$slots, "options:append")
|
|
683
|
+
]),
|
|
684
|
+
_: 3
|
|
685
|
+
}, 8, ["modelValue", "transition-duration"])
|
|
686
|
+
], 14, ll)
|
|
687
|
+
]))
|
|
688
|
+
], 2));
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
export {
|
|
692
|
+
Tl as default
|
|
693
|
+
};
|
|
2
694
|
//# sourceMappingURL=index32.js.map
|