bitboss-ui 2.1.119 → 2.1.121
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/ai/BaseButton.md +2 -1
- package/dist/ai/BbButton.md +2 -1
- package/dist/ai/BbPopover.md +15 -2
- package/dist/ai/BbTab.md +6 -3
- package/dist/ai/CommonPopover.md +35 -1
- package/dist/components/BaseButton/BaseButton.vue.d.ts +5 -10
- package/dist/components/BaseButton/RouterComponent.vue.d.ts +12 -15
- package/dist/components/BaseButton/types.d.ts +2 -1
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +10 -24
- package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +22 -17
- package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +6 -205
- package/dist/components/BaseColorInput/ColorPalette.vue.d.ts +3 -10
- package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +6 -11
- package/dist/components/BaseDatePicker/BaseDatePickerHeader.vue.d.ts +3 -2
- package/dist/components/BaseDatePicker/BaseDatePickerInputDaySelector.vue.d.ts +27 -35
- package/dist/components/BaseDatePicker/BaseDatePickerMonthSelector.vue.d.ts +3 -2
- package/dist/components/BaseDatePicker/BaseDatePickerYearSelector.vue.d.ts +3 -4
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +6 -345
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +8 -22
- package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +6 -15
- package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +6 -15
- package/dist/components/BaseRadio/BaseRadio.vue.d.ts +6 -11
- package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +22 -17
- package/dist/components/BaseRating/BaseRating.vue.d.ts +6 -15
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +20 -15
- package/dist/components/BaseSlider/BaseSlider.vue.d.ts +6 -21
- package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +6 -15
- package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +22 -17
- package/dist/components/BaseTag/BaseTag.vue.d.ts +6 -353
- package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +6 -15
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +6 -15
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +6 -11
- package/dist/components/BbAlert/BbAlert.vue.d.ts +5 -10
- package/dist/components/BbAvatar/BbAvatar.vue.d.ts +6 -15
- package/dist/components/BbBadge/BbBadge.vue.d.ts +5 -10
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +7 -34
- package/dist/components/BbButton/BbButton.vue.d.ts +7 -11
- package/dist/components/BbButton/types.d.ts +2 -1
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +6 -11
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +22 -17
- package/dist/components/BbChip/BbChip.vue.d.ts +6 -11
- package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +5 -10
- package/dist/components/BbColorInput/BbColorInput.vue.d.ts +7 -16
- package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +6 -77
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +2 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +14 -29
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +6 -11
- package/dist/components/BbDialog/BbDialog.vue.d.ts +8 -12
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +7 -216
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +7 -30
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +6 -15
- package/dist/components/BbIcon/BbIcon.vue.d.ts +3 -2
- package/dist/components/BbIntersection/BbIntersection.vue.d.ts +6 -15
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +7 -284
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +8 -22
- package/dist/components/BbPagination/BbPagination.vue.d.ts +8 -18
- package/dist/components/BbPopover/BbPopover.vue.d.ts +9 -201
- package/dist/components/BbPopover/types.d.ts +6 -0
- package/dist/components/BbProgress/BbProgress.vue.d.ts +3 -2
- package/dist/components/BbRadio/BbRadio.vue.d.ts +6 -11
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +22 -17
- package/dist/components/BbRating/BbRating.vue.d.ts +7 -16
- package/dist/components/BbRatio/BbRatio.vue.d.ts +5 -10
- package/dist/components/BbRows/BbRows.vue.d.ts +14 -49
- package/dist/components/BbSelect/BbSelect.vue.d.ts +20 -15
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +20 -15
- package/dist/components/BbSlider/BbSlider.vue.d.ts +7 -16
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +6 -17
- package/dist/components/BbSpinner/BbSpinner.vue.d.ts +3 -2
- package/dist/components/BbSwitch/BbSwitch.vue.d.ts +6 -11
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +22 -17
- package/dist/components/BbTab/BbTab.vue.d.ts +15 -18
- package/dist/components/BbTable/BbTable.vue.d.ts +25 -83
- package/dist/components/BbTag/BbTag.vue.d.ts +6 -11
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +7 -16
- package/dist/components/BbTextarea/BbTextarea.vue.d.ts +7 -16
- package/dist/components/BbToast/BbToast.vue.d.ts +3 -2
- package/dist/components/BbToast/BbToastMessage.vue.d.ts +3 -2
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +8 -200
- package/dist/components/BbTree/BbTree.vue.d.ts +5 -10
- package/dist/components/ChipsBox/ChipsBox.vue.d.ts +2 -1
- package/dist/components/ClearableButton/ClearableButton.vue.d.ts +2 -1
- package/dist/components/CommaBox/CommaBox.vue.d.ts +2 -1
- package/dist/components/CommonInputInnerContainer/CommonInputInnerContainer.vue.d.ts +6 -15
- package/dist/components/CommonInputOuterContainer/CommonInputOuterContainer.vue.d.ts +5 -10
- package/dist/components/CommonPopover/CommonPopover.vue.d.ts +9 -18
- package/dist/components/CommonPopover/types.d.ts +7 -0
- package/dist/components/ErrorIcon/ErrorIcon.vue.d.ts +2 -1
- package/dist/components/FlatListBox/FlatListBox.vue.d.ts +16 -11
- package/dist/components/GroupedListBox/GroupedListBox.vue.d.ts +16 -11
- package/dist/components/ListBox/ListBox.vue.d.ts +16 -11
- package/dist/components/OptionsContainer/OptionsContainer.vue.d.ts +11 -6
- package/dist/components/Transitions/ScaleFade.vue.d.ts +7 -15
- package/dist/components/Transitions/Slide.vue.d.ts +7 -15
- package/dist/index.css +2 -1
- package/dist/index.js +78 -220
- package/dist/index10.js +4 -81
- package/dist/index100.js +6 -0
- package/dist/index101.js +300 -94
- package/dist/index102.js +16 -0
- package/dist/index103.js +16 -136
- package/dist/index104.js +27 -0
- package/dist/index105.js +4 -102
- package/dist/index106.js +7 -0
- package/dist/index107.js +9 -24
- package/dist/index108.js +4 -0
- package/dist/index109.js +19 -142
- package/dist/index11.js +41 -39
- package/dist/index110.js +12 -532
- package/dist/index111.js +19 -0
- package/dist/index112.js +24 -190
- package/dist/index114.js +7 -116
- package/dist/index115.js +241 -0
- package/dist/index116.js +5 -58
- package/dist/index117.js +42 -0
- package/dist/index118.js +5 -40
- package/dist/index119.js +53 -0
- package/dist/index12.js +10 -41
- package/dist/index120.js +5 -100
- package/dist/index121.js +32 -0
- package/dist/index122.js +5 -137
- package/dist/index123.js +8 -0
- package/dist/index124.js +51 -365
- package/dist/index125.js +5 -0
- package/dist/index126.js +222 -554
- package/dist/index128.js +6 -124
- package/dist/index129.js +162 -0
- package/dist/index13.js +92 -185
- package/dist/index130.js +25 -118
- package/dist/index131.js +51 -0
- package/dist/index132.js +5 -126
- package/dist/index133.js +607 -0
- package/dist/index135.js +6 -0
- package/dist/index136.js +13 -164
- package/dist/index137.js +153 -0
- package/dist/index139.js +6 -0
- package/dist/index14.js +306 -128
- package/dist/index140.js +224 -71
- package/dist/index141.js +5 -0
- package/dist/index142.js +4 -14
- package/dist/index143.js +128 -0
- package/dist/index145.js +6 -4
- package/dist/index146.js +7 -420
- package/dist/index147.js +182 -11
- package/dist/index149.js +6 -27
- package/dist/index15.js +10 -0
- package/dist/index150.js +5 -3
- package/dist/index151.js +4 -7
- package/dist/index152.js +95 -8
- package/dist/index154.js +6 -5
- package/dist/index155.js +168 -5
- package/dist/index157.js +6 -5
- package/dist/index158.js +145 -5
- package/dist/index16.js +58 -152
- package/dist/index160.js +6 -5
- package/dist/index161.js +53 -5
- package/dist/index163.js +6 -5
- package/dist/index164.js +15 -4
- package/dist/index165.js +18 -4
- package/dist/index166.js +35 -5
- package/dist/index168.js +6 -5
- package/dist/index169.js +89 -5
- package/dist/index17.js +11 -0
- package/dist/index171.js +6 -5
- package/dist/index172.js +82 -5
- package/dist/index174.js +6 -5
- package/dist/index175.js +37 -4
- package/dist/index176.js +460 -4
- package/dist/index177.js +28 -5
- package/dist/index178.js +66 -5
- package/dist/index179.js +17 -5
- package/dist/index18.js +34 -128
- package/dist/index180.js +162 -5
- package/dist/index181.js +5 -5
- package/dist/index182.js +217 -5
- package/dist/index183.js +5 -5
- package/dist/index184.js +112 -4
- package/dist/index185.js +5 -5
- package/dist/index186.js +457 -4
- package/dist/index188.js +6 -5
- package/dist/index189.js +4 -5
- package/dist/index19.js +4 -0
- package/dist/index190.js +7 -4
- package/dist/index191.js +7 -5
- package/dist/index192.js +268 -5
- package/dist/index194.js +6 -5
- package/dist/index195.js +124 -5
- package/dist/index197.js +6 -5
- package/dist/index198.js +174 -5
- package/dist/index2.js +20 -0
- package/dist/index20.js +8 -195
- package/dist/index200.js +5 -4
- package/dist/index201.js +224 -5
- package/dist/index203.js +6 -4
- package/dist/index204.js +135 -5
- package/dist/index206.js +5 -4
- package/dist/index207.js +5 -5
- package/dist/index208.js +170 -5
- package/dist/index21.js +35 -0
- package/dist/index210.js +5 -4
- package/dist/index211.js +37 -5
- package/dist/index213.js +5 -4
- package/dist/index214.js +63 -5
- package/dist/index216.js +5 -4
- package/dist/index217.js +74 -5
- package/dist/index219.js +5 -4
- package/dist/index22.js +6 -245
- package/dist/index220.js +65 -5
- package/dist/index222.js +6 -140
- package/dist/index223.js +67 -4
- package/dist/index225.js +6 -4
- package/dist/index226.js +41 -4
- package/dist/index228.js +6 -15
- package/dist/index229.js +9 -6
- package/dist/index23.js +7 -0
- package/dist/index230.js +22 -10
- package/dist/index231.js +23 -5
- package/dist/index232.js +285 -22
- package/dist/index234.js +6 -5
- package/dist/index235.js +47 -6
- package/dist/index236.js +165 -5
- package/dist/index238.js +6 -5
- package/dist/index239.js +10 -3
- package/dist/index24.js +9 -616
- package/dist/index240.js +159 -20
- package/dist/index242.js +6 -14
- package/dist/index243.js +134 -53
- package/dist/index245.js +6 -14
- package/dist/index246.js +167 -19
- package/dist/index248.js +6 -20
- package/dist/index249.js +147 -15
- package/dist/index25.js +24 -0
- package/dist/index251.js +6 -0
- package/dist/index252.js +35 -35
- package/dist/index254.js +6 -8
- package/dist/index255.js +65 -4
- package/dist/index257.js +6 -0
- package/dist/index258.js +18 -101
- package/dist/index259.js +5 -0
- package/dist/index26.js +4 -184
- package/dist/index260.js +160 -5
- package/dist/index262.js +6 -7
- package/dist/index263.js +60 -7
- package/dist/index265.js +6 -7
- package/dist/index266.js +134 -8
- package/dist/index268.js +6 -270
- package/dist/index269.js +12 -54
- package/dist/index27.js +4 -0
- package/dist/index270.js +205 -53
- package/dist/index272.js +6 -62
- package/dist/index273.js +85 -27
- package/dist/index274.js +5 -4
- package/dist/index275.js +55 -9
- package/dist/index276.js +5 -9
- package/dist/index277.js +164 -6
- package/dist/index279.js +6 -11
- package/dist/index28.js +8 -148
- package/dist/index280.js +145 -23
- package/dist/index282.js +6 -88
- package/dist/index283.js +11 -0
- package/dist/index284.js +200 -5
- package/dist/index286.js +6 -18
- package/dist/index287.js +240 -374
- package/dist/index289.js +6 -9
- package/dist/index29.js +7 -0
- package/dist/index290.js +21 -7
- package/dist/index292.js +6 -7
- package/dist/index293.js +125 -7
- package/dist/index295.js +6 -69
- package/dist/index296.js +161 -190
- package/dist/index298.js +6 -11
- package/dist/index299.js +127 -25
- package/dist/index30.js +117 -177
- package/dist/index301.js +6 -0
- package/dist/index302.js +20 -9
- package/dist/index304.js +5 -4
- package/dist/index305.js +116 -5
- package/dist/index306.js +5 -5
- package/dist/index307.js +507 -4
- package/dist/index309.js +6 -19
- package/dist/index31.js +10 -0
- package/dist/index310.js +196 -6
- package/dist/index312.js +6 -282
- package/dist/index313.js +142 -4
- package/dist/index315.js +6 -4
- package/dist/index316.js +134 -18
- package/dist/index318.js +6 -29
- package/dist/index319.js +162 -4
- package/dist/index32.js +27 -99
- package/dist/index321.js +6 -4
- package/dist/index322.js +319 -4
- package/dist/index324.js +6 -4
- package/dist/index325.js +42 -6
- package/dist/index326.js +450 -7
- package/dist/index328.js +6 -368
- package/dist/index329.js +155 -59
- package/dist/index33.js +5 -0
- package/dist/index331.js +6 -9
- package/dist/index332.js +142 -5
- package/dist/index334.js +6 -4
- package/dist/index335.js +155 -17
- package/dist/index337.js +6 -21
- package/dist/index338.js +58 -4
- package/dist/index339.js +5 -4
- package/dist/index34.js +111 -176
- package/dist/index340.js +20 -6
- package/dist/index342.js +6 -69
- package/dist/index343.js +141 -5
- package/dist/index345.js +5 -6
- package/dist/index346.js +4 -9
- package/dist/index347.js +109 -9
- package/dist/index349.js +6 -11
- package/dist/index350.js +838 -16
- package/dist/index351.js +473 -94
- package/dist/index352.js +51 -229
- package/dist/index353.js +7 -202
- package/dist/index36.js +6 -133
- package/dist/index37.js +6 -0
- package/dist/index38.js +62 -489
- package/dist/index39.js +63 -0
- package/dist/index40.js +8 -334
- package/dist/index41.js +9 -0
- package/dist/index42.js +8 -127
- package/dist/index43.js +179 -0
- package/dist/index44.js +20 -184
- package/dist/index45.js +6 -0
- package/dist/index46.js +384 -239
- package/dist/index48.js +6 -140
- package/dist/index49.js +33 -0
- package/dist/index5.js +34 -41
- package/dist/index50.js +11 -156
- package/dist/index51.js +8 -0
- package/dist/index52.js +105 -64
- package/dist/index53.js +330 -0
- package/dist/index54.js +97 -91
- package/dist/index55.js +328 -0
- package/dist/index56.js +27 -68
- package/dist/index57.js +102 -0
- package/dist/index58.js +145 -53
- package/dist/index6.js +37 -61
- package/dist/index60.js +5 -225
- package/dist/index61.js +131 -0
- package/dist/index62.js +5 -171
- package/dist/index64.js +7 -99
- package/dist/index65.js +35 -0
- package/dist/index66.js +25 -137
- package/dist/index68.js +6 -43
- package/dist/index69.js +54 -0
- package/dist/index7.js +58 -64
- package/dist/index71.js +6 -0
- package/dist/index72.js +13 -120
- package/dist/index74.js +6 -125
- package/dist/index75.js +158 -84
- package/dist/index77.js +6 -21
- package/dist/index78.js +4 -129
- package/dist/index79.js +4 -0
- package/dist/index8.js +4 -14
- package/dist/index80.js +54 -62
- package/dist/index81.js +5 -0
- package/dist/index82.js +5 -323
- package/dist/index83.js +131 -0
- package/dist/index85.js +6 -0
- package/dist/index86.js +64 -220
- package/dist/index88.js +6 -84
- package/dist/index89.js +30 -0
- package/dist/index9.js +10 -9
- package/dist/index90.js +18 -45
- package/dist/index91.js +17 -134
- package/dist/index92.js +9 -0
- package/dist/index93.js +33 -176
- package/dist/index94.js +4 -0
- package/dist/index95.js +15 -234
- package/dist/index96.js +10 -0
- package/dist/index97.js +17 -247
- package/dist/index98.js +189 -0
- package/package.json +1 -1
- package/dist/index134.js +0 -28
- package/dist/index138.js +0 -122
- package/dist/index144.js +0 -13
- package/dist/index148.js +0 -11
- package/dist/index153.js +0 -7
- package/dist/index156.js +0 -5
- package/dist/index159.js +0 -5
- package/dist/index162.js +0 -5
- package/dist/index167.js +0 -5
- package/dist/index170.js +0 -5
- package/dist/index173.js +0 -5
- package/dist/index187.js +0 -5
- package/dist/index193.js +0 -4
- package/dist/index196.js +0 -5
- package/dist/index199.js +0 -5
- package/dist/index202.js +0 -5
- package/dist/index205.js +0 -5
- package/dist/index209.js +0 -5
- package/dist/index212.js +0 -5
- package/dist/index215.js +0 -5
- package/dist/index218.js +0 -5
- package/dist/index221.js +0 -4
- package/dist/index224.js +0 -36
- package/dist/index227.js +0 -4
- package/dist/index233.js +0 -12
- package/dist/index237.js +0 -13
- package/dist/index241.js +0 -25
- package/dist/index244.js +0 -20
- package/dist/index247.js +0 -32
- package/dist/index250.js +0 -137
- package/dist/index253.js +0 -109
- package/dist/index256.js +0 -108
- package/dist/index261.js +0 -5
- package/dist/index264.js +0 -7
- package/dist/index267.js +0 -10
- package/dist/index271.js +0 -34
- package/dist/index278.js +0 -11
- package/dist/index281.js +0 -15
- package/dist/index285.js +0 -8
- package/dist/index291.js +0 -7
- package/dist/index294.js +0 -55
- package/dist/index297.js +0 -5
- package/dist/index300.js +0 -30
- package/dist/index303.js +0 -4
- package/dist/index308.js +0 -30
- package/dist/index311.js +0 -5
- package/dist/index314.js +0 -18
- package/dist/index317.js +0 -4
- package/dist/index320.js +0 -4
- package/dist/index323.js +0 -4
- package/dist/index327.js +0 -721
- package/dist/index333.js +0 -127
- package/dist/index336.js +0 -4
- package/dist/index341.js +0 -69
- package/dist/index344.js +0 -8
- package/dist/index348.js +0 -21
- package/dist/index354.js +0 -261
- package/dist/index355.js +0 -37
- package/dist/index356.js +0 -131
- package/dist/index357.js +0 -400
- package/dist/index358.js +0 -24
- package/dist/index360.js +0 -4
- package/dist/index361.js +0 -4
- package/dist/index362.js +0 -136
- package/dist/index363.js +0 -443
- package/dist/index364.js +0 -130
- package/dist/index365.js +0 -49
- package/dist/index366.js +0 -72
- package/dist/index367.js +0 -522
- package/dist/index368.js +0 -52
- package/dist/index4.js +0 -35
- package/dist/index70.js +0 -46
- package/dist/index84.js +0 -154
- package/dist/index99.js +0 -33
package/dist/index192.js
CHANGED
|
@@ -1,5 +1,268 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
1
|
+
import { clamp as e } from "./index8.js";
|
|
2
|
+
import { getAsPercentage as t, getAsPercentageBetween as n, getValueFromPercentageInInterval as r } from "./index9.js";
|
|
3
|
+
import { isCssColor as i } from "./index78.js";
|
|
4
|
+
import { isNil as a } from "./index94.js";
|
|
5
|
+
import { last as o } from "./index105.js";
|
|
6
|
+
import { head as s } from "./index189.js";
|
|
7
|
+
import { snapToStep as ee } from "./index190.js";
|
|
8
|
+
import { transpose as c } from "./index191.js";
|
|
9
|
+
import { Fragment as l, computed as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, defineComponent as m, guardReactiveProps as h, mergeProps as g, normalizeClass as _, normalizeProps as v, normalizeStyle as y, onMounted as te, openBlock as b, ref as x, renderList as S, renderSlot as C, unref as w, watch as T } from "vue";
|
|
10
|
+
//#region src/components/BaseSlider/BaseSlider.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
+
var E = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "bb-base-slider__ticks-container"
|
|
14
|
+
}, ne = [
|
|
15
|
+
"id",
|
|
16
|
+
"disabled",
|
|
17
|
+
"name",
|
|
18
|
+
"required",
|
|
19
|
+
"value"
|
|
20
|
+
], re = [
|
|
21
|
+
"aria-describedby",
|
|
22
|
+
"aria-readonly",
|
|
23
|
+
"aria-valuemax",
|
|
24
|
+
"aria-valuemin",
|
|
25
|
+
"aria-valuenow",
|
|
26
|
+
"tabindex"
|
|
27
|
+
], ie = [
|
|
28
|
+
"aria-describedby",
|
|
29
|
+
"aria-readonly",
|
|
30
|
+
"aria-valuemax",
|
|
31
|
+
"aria-valuemin",
|
|
32
|
+
"aria-valuenow",
|
|
33
|
+
"tabindex"
|
|
34
|
+
], D = /* @__PURE__ */ m({
|
|
35
|
+
__name: "BaseSlider",
|
|
36
|
+
props: {
|
|
37
|
+
ariaDescribedby: {},
|
|
38
|
+
autofocus: {},
|
|
39
|
+
color: {},
|
|
40
|
+
disabled: { type: Boolean },
|
|
41
|
+
hasErrors: { type: Boolean },
|
|
42
|
+
id: {},
|
|
43
|
+
max: { default: 100 },
|
|
44
|
+
maxPrecision: { default: 2 },
|
|
45
|
+
min: { default: 0 },
|
|
46
|
+
modelValue: { default: 0 },
|
|
47
|
+
name: {},
|
|
48
|
+
range: { type: Boolean },
|
|
49
|
+
readonly: { type: Boolean },
|
|
50
|
+
required: { type: Boolean },
|
|
51
|
+
step: { default: 1 },
|
|
52
|
+
ticks: { type: Boolean },
|
|
53
|
+
thumbTranslate: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !0
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
emits: [
|
|
59
|
+
"active",
|
|
60
|
+
"inactive",
|
|
61
|
+
"click",
|
|
62
|
+
"focus",
|
|
63
|
+
"keydown",
|
|
64
|
+
"pointerdown",
|
|
65
|
+
"pointermove",
|
|
66
|
+
"pointerup",
|
|
67
|
+
"update:modelValue"
|
|
68
|
+
],
|
|
69
|
+
setup(m, { emit: D }) {
|
|
70
|
+
let O = m, k = D;
|
|
71
|
+
if (O.min < -(2 ** 53 - 1) || O.max > 2 ** 53 - 1) throw Error("BaseSlider min or max is too large");
|
|
72
|
+
let A = x(), j = x(), M = x(), N = x(), P = x(0), F = x(0), I = u(() => Array.isArray(O.modelValue) ? s(O.modelValue) ?? void 0 : a(O.modelValue) ? void 0 : Number(O.modelValue)), L = u(() => Array.isArray(O.modelValue) ? o(O.modelValue) ?? void 0 : a(O.modelValue) ? void 0 : Number(O.modelValue)), R = u(() => [P.value, F.value].sort((e, t) => e - t)), z = x(!1);
|
|
73
|
+
if (O.range && !Array.isArray(O.modelValue)) throw TypeError("BaseSlider mode is set as range but modelValue is not an array");
|
|
74
|
+
te(() => {
|
|
75
|
+
O.autofocus && N.value?.focus();
|
|
76
|
+
});
|
|
77
|
+
let B = x(!1), V = x(null), H = (e) => {
|
|
78
|
+
if (N.value && N.value.contains(e.target)) return "higher";
|
|
79
|
+
if (M.value && M.value.contains(e.target)) return "lower";
|
|
80
|
+
throw Error("Could not identify target thumb");
|
|
81
|
+
}, ae = (e) => {
|
|
82
|
+
O.disabled || O.readonly || (V.value ||= H(e), B.value = !0, document.addEventListener("pointermove", W), document.addEventListener("pointerup", J), k("pointerdown", e));
|
|
83
|
+
}, U = u(() => B.value ? {} : { onPointerdown: ae }), W = (t) => {
|
|
84
|
+
if (!(O.disabled || O.readonly) && j.value) {
|
|
85
|
+
t instanceof PointerEvent ? k("pointermove", t) : k("click", t);
|
|
86
|
+
let r = j.value.getBoundingClientRect(), i = t.clientX, a = r.left, o = r.width, s = e(n(ee(c(i, a, a + o, O.min, O.max), O.min, O.max, O.step), O.min, O.max), 0, 100);
|
|
87
|
+
V.value === "higher" ? F.value = s : V.value === "lower" && (P.value = s), k("update:modelValue", G());
|
|
88
|
+
}
|
|
89
|
+
}, G = () => {
|
|
90
|
+
if (O.range) return [r(P.value, O.min, O.max), r(F.value, O.min, O.max)].sort((e, t) => e - t).map((e) => Number(e.toFixed(O.maxPrecision)));
|
|
91
|
+
{
|
|
92
|
+
let e = r(F.value, O.min, O.max);
|
|
93
|
+
return Number(e.toFixed(O.maxPrecision));
|
|
94
|
+
}
|
|
95
|
+
}, K = () => {
|
|
96
|
+
O.disabled || O.readonly || O.range || k("update:modelValue", e((O.modelValue ?? 0) + O.step, O.min, O.max));
|
|
97
|
+
}, q = () => {
|
|
98
|
+
O.disabled || O.readonly || O.range || k("update:modelValue", e((O.modelValue ?? 0) - O.step, O.min, O.max));
|
|
99
|
+
};
|
|
100
|
+
T(() => O.modelValue, (t) => {
|
|
101
|
+
if (O.range) {
|
|
102
|
+
if (!Array.isArray(t)) throw Error("BaseSlider modelValue must be an array");
|
|
103
|
+
if (t.length !== 2) {
|
|
104
|
+
P.value = 0, F.value = 100;
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
let r = [...t].sort((e, t) => e - t).map((t) => e(n(t, O.min, O.max), 0, 100));
|
|
108
|
+
P.value > F.value ? (P.value = r[1], F.value = r[0]) : (P.value = r[0], F.value = r[1]);
|
|
109
|
+
} else F.value = e(c(t ?? O.min, O.min, O.max, 0, 100), 0, 100);
|
|
110
|
+
}, { immediate: !0 });
|
|
111
|
+
let J = (e) => {
|
|
112
|
+
B.value = !1, V.value = null, document.removeEventListener("pointermove", W), document.removeEventListener("pointerup", J), k("pointerup", e);
|
|
113
|
+
}, Y = t(O.step, O.max - O.min), X = (t) => {
|
|
114
|
+
k("keydown", t), !(O.disabled || O.readonly || t.key !== "ArrowLeft" && t.key !== "ArrowRight") && (t.key === "ArrowLeft" ? V.value === "higher" || document.activeElement === N.value || t.target === N.value ? F.value = e(F.value - Y, 0, 100) : (V.value === "lower" || document.activeElement === M.value || t.target === M.value) && (P.value = e(P.value - Y, 0, 100)) : t.key === "ArrowRight" && (V.value === "higher" || document.activeElement === N.value || t.target === N.value ? F.value = e(F.value + Y, 0, 100) : (V.value === "lower" || document.activeElement === M.value || t.target === M.value) && (P.value = e(P.value + Y, 0, 100))), k("update:modelValue", G()));
|
|
115
|
+
}, Z = (e) => {
|
|
116
|
+
k("focus", e);
|
|
117
|
+
let t = H(e);
|
|
118
|
+
t && (V.value = t), z.value || (z.value = !0, k("active"), document.addEventListener("focusin", Q), document.addEventListener("click", Q));
|
|
119
|
+
}, Q = (e) => {
|
|
120
|
+
e.target instanceof HTMLElement && (A.value?.contains(e.target) || (z.value = !1, V.value = null, k("inactive"), document.removeEventListener("focusin", Q), document.removeEventListener("click", Q)));
|
|
121
|
+
}, oe = u(() => {
|
|
122
|
+
let e = {
|
|
123
|
+
class: {
|
|
124
|
+
"bb-base-slider": !0,
|
|
125
|
+
"bb-base-slider--disabled": O.disabled,
|
|
126
|
+
"bb-base-slider--errors": O.hasErrors,
|
|
127
|
+
"bb-base-slider--readonly": O.readonly,
|
|
128
|
+
[`bb-base-slider--${O.color}`]: O.color && !i(O.color)
|
|
129
|
+
},
|
|
130
|
+
style: {}
|
|
131
|
+
};
|
|
132
|
+
return O.color && i(O.color) && (e.style["--color"] = O.color), e;
|
|
133
|
+
}), se = { onPointerdown: (e) => {
|
|
134
|
+
O.range || (N.value?.focus(), W(e), document.addEventListener("pointermove", W), document.addEventListener("pointerup", J));
|
|
135
|
+
} }, ce = u(() => ({
|
|
136
|
+
class: "bb-base-slider__track-background",
|
|
137
|
+
style: {
|
|
138
|
+
width: `${R.value[1] - R.value[0]}%`,
|
|
139
|
+
left: `${R.value[0]}%`
|
|
140
|
+
}
|
|
141
|
+
})), le = (e) => a(O.modelValue) ? !1 : Array.isArray(O.modelValue) ? O.modelValue.length === 0 ? !1 : O.modelValue[0] <= e && O.modelValue[1] >= e : e <= Number(O.modelValue), $ = u(() => {
|
|
142
|
+
if (!O.ticks) return [];
|
|
143
|
+
let e = [], t = O.min;
|
|
144
|
+
for (; t <= O.max;) {
|
|
145
|
+
let r = t, i = n(r, O.min, O.max), a = le(r);
|
|
146
|
+
e.push({
|
|
147
|
+
value: r,
|
|
148
|
+
percent: i,
|
|
149
|
+
active: a
|
|
150
|
+
}), t += O.step;
|
|
151
|
+
}
|
|
152
|
+
return e;
|
|
153
|
+
});
|
|
154
|
+
return (e, t) => (b(), f("span", v(h(oe.value)), [
|
|
155
|
+
C(e.$slots, "prepend", {
|
|
156
|
+
decrease: q,
|
|
157
|
+
increase: K
|
|
158
|
+
}),
|
|
159
|
+
p("span", g({
|
|
160
|
+
ref_key: "container",
|
|
161
|
+
ref: A
|
|
162
|
+
}, se, { class: "bb-base-slider__slider-container" }), [
|
|
163
|
+
$.value.length ? (b(), f("span", E, [(b(!0), f(l, null, S($.value, (t) => (b(), f("span", {
|
|
164
|
+
key: t.value,
|
|
165
|
+
class: "bb-base-slider__tick"
|
|
166
|
+
}, [C(e.$slots, "tick", {
|
|
167
|
+
active: t.active,
|
|
168
|
+
percent: t.percent,
|
|
169
|
+
value: t.value
|
|
170
|
+
})]))), 128))])) : d("", !0),
|
|
171
|
+
p("input", {
|
|
172
|
+
id: e.id,
|
|
173
|
+
class: "sr-only",
|
|
174
|
+
disabled: e.disabled,
|
|
175
|
+
name: e.name,
|
|
176
|
+
readonly: !0,
|
|
177
|
+
required: e.required,
|
|
178
|
+
tabindex: -1,
|
|
179
|
+
type: "text",
|
|
180
|
+
value: JSON.stringify(e.modelValue)
|
|
181
|
+
}, null, 8, ne),
|
|
182
|
+
p("span", {
|
|
183
|
+
ref_key: "track",
|
|
184
|
+
ref: j,
|
|
185
|
+
class: "bb-base-slider__track-container"
|
|
186
|
+
}, [t[0] ||= p("span", { class: "bb-base-slider__track-fill" }, null, -1), p("span", v(h(ce.value)), null, 16)], 512),
|
|
187
|
+
O.range ? (b(), f("span", g({ key: 1 }, w(U), {
|
|
188
|
+
key: "thumblower",
|
|
189
|
+
ref_key: "thumblower",
|
|
190
|
+
ref: M,
|
|
191
|
+
"aria-describedby": e.ariaDescribedby,
|
|
192
|
+
"aria-orientation": "horizontal",
|
|
193
|
+
"aria-readonly": !e.readonly,
|
|
194
|
+
"aria-valuemax": e.max,
|
|
195
|
+
"aria-valuemin": e.min,
|
|
196
|
+
"aria-valuenow": I.value,
|
|
197
|
+
class: "bb-base-slider__thumb-container",
|
|
198
|
+
"data-thumb": "lower",
|
|
199
|
+
role: "slider",
|
|
200
|
+
style: { left: `${P.value}%` },
|
|
201
|
+
tabindex: e.disabled ? -1 : 0,
|
|
202
|
+
onFocus: Z,
|
|
203
|
+
onKeydown: X
|
|
204
|
+
}), [p("span", {
|
|
205
|
+
class: _({
|
|
206
|
+
"bb-base-slider__thumb": !0,
|
|
207
|
+
"bb-base-slider__thumb--lower": !0,
|
|
208
|
+
"bb-base-slider__thumb--focused": w(V) === "lower"
|
|
209
|
+
}),
|
|
210
|
+
style: y({
|
|
211
|
+
transform: `translateY(-50%) ${e.thumbTranslate ? `translateX(-${P.value}%)` : "translateX(-50%)"}`,
|
|
212
|
+
left: `${P.value}%`
|
|
213
|
+
})
|
|
214
|
+
}, [C(e.$slots, "thumb:lower", {
|
|
215
|
+
focused: w(V) === "lower",
|
|
216
|
+
percent: P.value,
|
|
217
|
+
value: I.value
|
|
218
|
+
}, () => [C(e.$slots, "thumb", {
|
|
219
|
+
focused: w(V) === "lower",
|
|
220
|
+
percent: P.value,
|
|
221
|
+
value: I.value
|
|
222
|
+
})])], 6)], 16, re)) : d("", !0),
|
|
223
|
+
p("span", g(w(U), {
|
|
224
|
+
key: "thumbhigher",
|
|
225
|
+
ref_key: "thumbhigher",
|
|
226
|
+
ref: N,
|
|
227
|
+
"aria-describedby": e.ariaDescribedby,
|
|
228
|
+
"aria-orientation": "horizontal",
|
|
229
|
+
"aria-readonly": !e.readonly,
|
|
230
|
+
"aria-valuemax": e.max,
|
|
231
|
+
"aria-valuemin": e.min,
|
|
232
|
+
"aria-valuenow": L.value,
|
|
233
|
+
class: "bb-base-slider__thumb-container",
|
|
234
|
+
"data-thumb": "higher",
|
|
235
|
+
role: "slider",
|
|
236
|
+
style: { left: `${F.value}%` },
|
|
237
|
+
tabindex: e.disabled ? -1 : 0,
|
|
238
|
+
onFocus: Z,
|
|
239
|
+
onKeydown: X
|
|
240
|
+
}), [p("span", {
|
|
241
|
+
class: _({
|
|
242
|
+
"bb-base-slider__thumb": !0,
|
|
243
|
+
"bb-base-slider__thumb--higher": !0,
|
|
244
|
+
"bb-base-slider__thumb--focused": w(V) === "higher"
|
|
245
|
+
}),
|
|
246
|
+
style: y({
|
|
247
|
+
transform: `translateY(-50%) ${e.thumbTranslate ? `translateX(-${F.value}%)` : "translateX(-50%)"}`,
|
|
248
|
+
left: `${F.value}%`
|
|
249
|
+
})
|
|
250
|
+
}, [C(e.$slots, "thumb:higher", {
|
|
251
|
+
focused: w(V) === "higher",
|
|
252
|
+
percent: F.value,
|
|
253
|
+
value: L.value
|
|
254
|
+
}, () => [C(e.$slots, "thumb", {
|
|
255
|
+
focused: w(V) === "higher",
|
|
256
|
+
percent: F.value,
|
|
257
|
+
value: L.value
|
|
258
|
+
})])], 6)], 16, ie)
|
|
259
|
+
], 16),
|
|
260
|
+
C(e.$slots, "append", {
|
|
261
|
+
decrease: q,
|
|
262
|
+
increase: K
|
|
263
|
+
})
|
|
264
|
+
], 16));
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
//#endregion
|
|
268
|
+
export { D as default };
|
package/dist/index194.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
/* empty css
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import e from "./index192.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
//#region src/components/BaseSlider/BaseSlider.vue
|
|
4
|
+
var t = e;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { t as default };
|
package/dist/index195.js
CHANGED
|
@@ -1,5 +1,124 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
import { isCssColor as e } from "./index78.js";
|
|
2
|
+
import { when as t } from "./index151.js";
|
|
3
|
+
import { computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, guardReactiveProps as s, mergeProps as c, normalizeProps as l, openBlock as u, ref as d, renderSlot as f, watch as p } from "vue";
|
|
4
|
+
//#region src/components/BaseSwitch/BaseSwitch.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var m = { class: "bb-base-switch-container" }, h = /* @__PURE__ */ o({
|
|
6
|
+
__name: "BaseSwitch",
|
|
7
|
+
props: {
|
|
8
|
+
ariaDescribedby: {},
|
|
9
|
+
autofocus: {},
|
|
10
|
+
checked: { type: [Boolean, String] },
|
|
11
|
+
color: {},
|
|
12
|
+
disabled: { type: Boolean },
|
|
13
|
+
falseValue: { default: !1 },
|
|
14
|
+
hasErrors: { type: Boolean },
|
|
15
|
+
id: {},
|
|
16
|
+
indeterminate: {},
|
|
17
|
+
modelValue: {},
|
|
18
|
+
name: {},
|
|
19
|
+
readonly: { type: Boolean },
|
|
20
|
+
required: { type: Boolean },
|
|
21
|
+
submitWhenFalse: { type: Boolean },
|
|
22
|
+
trueValue: { default: !0 }
|
|
23
|
+
},
|
|
24
|
+
emits: [
|
|
25
|
+
"blur",
|
|
26
|
+
"change",
|
|
27
|
+
"click",
|
|
28
|
+
"focus",
|
|
29
|
+
"input",
|
|
30
|
+
"keydown",
|
|
31
|
+
"mousedown",
|
|
32
|
+
"mouseup",
|
|
33
|
+
"update:modelValue"
|
|
34
|
+
],
|
|
35
|
+
setup(o, { emit: h }) {
|
|
36
|
+
let g = o, _ = h, v = d(null), y = n(() => g.checked ? !0 : JSON.stringify(g.trueValue) === JSON.stringify(g.modelValue)), b = d(!1), x = d(!1), S = n(() => {
|
|
37
|
+
let t = { class: {
|
|
38
|
+
"bb-base-switch": !0,
|
|
39
|
+
"bb-base-switch--disabled": g.disabled,
|
|
40
|
+
"bb-base-switch--errors": g.hasErrors,
|
|
41
|
+
"bb-base-switch--indeterminate": g.indeterminate,
|
|
42
|
+
"bb-base-switch--readonly": g.readonly,
|
|
43
|
+
[`bb-base-switch--${g.color}`]: g.color && !e(g.color)
|
|
44
|
+
} };
|
|
45
|
+
return g.color && e(g.color) && (t.style = `--color: ${g.color}`), t;
|
|
46
|
+
}), C = t((e) => typeof e != "string", JSON.stringify), w = n(() => {
|
|
47
|
+
let e = C(g.falseValue);
|
|
48
|
+
return {
|
|
49
|
+
disabled: g.disabled,
|
|
50
|
+
name: g.name,
|
|
51
|
+
type: "hidden",
|
|
52
|
+
value: e
|
|
53
|
+
};
|
|
54
|
+
}), T = n(() => {
|
|
55
|
+
let e = C(g.trueValue);
|
|
56
|
+
return {
|
|
57
|
+
"aria-describedby": g.ariaDescribedby,
|
|
58
|
+
autofocus: g.autofocus,
|
|
59
|
+
checked: y.value,
|
|
60
|
+
disabled: g.disabled || g.readonly,
|
|
61
|
+
id: g.id,
|
|
62
|
+
indeterminate: g.indeterminate,
|
|
63
|
+
name: g.name,
|
|
64
|
+
required: g.required,
|
|
65
|
+
tabindex: g.disabled ? -1 : void 0,
|
|
66
|
+
type: "checkbox",
|
|
67
|
+
value: e,
|
|
68
|
+
class: "sr-only",
|
|
69
|
+
onBlur: (e) => {
|
|
70
|
+
b.value = !1, x.value = !1, _("blur", e);
|
|
71
|
+
},
|
|
72
|
+
onChange: (e) => {
|
|
73
|
+
if (e.target instanceof HTMLInputElement) {
|
|
74
|
+
let t = e.target.checked ? g.trueValue : g.falseValue;
|
|
75
|
+
_("change", e), _("update:modelValue", t);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
onClick: (e) => _("click", e),
|
|
79
|
+
onFocus: (e) => {
|
|
80
|
+
b.value = !0, e.target instanceof HTMLInputElement && (x.value = e.target.matches(":focus-visible")), _("focus", e);
|
|
81
|
+
},
|
|
82
|
+
onInput: (e) => _("input", e),
|
|
83
|
+
onKeydown: (e) => _("keydown", e),
|
|
84
|
+
onMousedown: (e) => _("mousedown", e),
|
|
85
|
+
onMouseup: (e) => _("mouseup", e)
|
|
86
|
+
};
|
|
87
|
+
}), E = n(() => ({
|
|
88
|
+
checked: y.value,
|
|
89
|
+
disabled: g.disabled,
|
|
90
|
+
falseValue: g.falseValue,
|
|
91
|
+
focused: b.value,
|
|
92
|
+
focusVisible: x.value,
|
|
93
|
+
hasErrors: g.hasErrors,
|
|
94
|
+
id: g.id,
|
|
95
|
+
name: g.name,
|
|
96
|
+
parsedValue: T.value.value,
|
|
97
|
+
readonly: g.readonly,
|
|
98
|
+
trueValue: g.trueValue,
|
|
99
|
+
value: y.value ? g.trueValue : g.falseValue
|
|
100
|
+
})), D = n(() => {
|
|
101
|
+
let t = {};
|
|
102
|
+
return g.color && e(g.color) && (t.color = g.color), {
|
|
103
|
+
class: "bb-base-switch-container__icon",
|
|
104
|
+
style: t
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
return p(() => [
|
|
108
|
+
g.modelValue,
|
|
109
|
+
g.checked,
|
|
110
|
+
g.indeterminate
|
|
111
|
+
], () => {
|
|
112
|
+
v.value && (v.value.indeterminate = !!g.indeterminate);
|
|
113
|
+
}), (e, t) => (u(), i("span", l(s(S.value)), [
|
|
114
|
+
!y.value && e.submitWhenFalse ? (u(), i("input", l(c({ key: 0 }, w.value)), null, 16)) : r("", !0),
|
|
115
|
+
a("input", c(T.value, {
|
|
116
|
+
ref_key: "checkboxInput",
|
|
117
|
+
ref: v
|
|
118
|
+
}), null, 16),
|
|
119
|
+
a("span", m, [f(e.$slots, "icon", l(s(E.value)), () => [a("span", l(s(D.value)), t[0] ||= [a("span", { class: "bb-base-switch-container__icon-thumb" }, null, -1)], 16)])])
|
|
120
|
+
], 16));
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
//#endregion
|
|
124
|
+
export { h as default };
|
package/dist/index197.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
/* empty css
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import e from "./index195.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
//#region src/components/BaseSwitch/BaseSwitch.vue
|
|
4
|
+
var t = e;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { t as default };
|
package/dist/index198.js
CHANGED
|
@@ -1,5 +1,174 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
1
|
+
import { hash as e } from "./index81.js";
|
|
2
|
+
import t from "./index88.js";
|
|
3
|
+
import { useItemsGetter as n } from "./index89.js";
|
|
4
|
+
import { useIndexById as r } from "./index90.js";
|
|
5
|
+
import { useBaseOptions as i } from "./index93.js";
|
|
6
|
+
import { useCoherence as a } from "./index95.js";
|
|
7
|
+
import { useHashedWatcher as o } from "./index96.js";
|
|
8
|
+
import { usePrefill as s } from "./index97.js";
|
|
9
|
+
import c from "./index197.js";
|
|
10
|
+
import { createBlock as l, createSlots as u, createVNode as d, defineComponent as f, guardReactiveProps as p, mergeProps as m, normalizeProps as h, openBlock as g, ref as _, renderSlot as v, toRef as y, unref as b, withCtx as x } from "vue";
|
|
11
|
+
//#region src/components/BaseSwitchGroup/BaseSwitchGroup.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var S = /* @__PURE__ */ f({
|
|
13
|
+
__name: "BaseSwitchGroup",
|
|
14
|
+
props: {
|
|
15
|
+
ariaDescribedby: {},
|
|
16
|
+
autofocus: {},
|
|
17
|
+
color: {},
|
|
18
|
+
dependencies: {},
|
|
19
|
+
depsDebounceTime: { default: 0 },
|
|
20
|
+
direction: { default: "horizontal" },
|
|
21
|
+
disabled: { type: Boolean },
|
|
22
|
+
enforceCoherence: { type: Boolean },
|
|
23
|
+
hasErrors: { type: Boolean },
|
|
24
|
+
hideLabel: { type: Boolean },
|
|
25
|
+
id: {},
|
|
26
|
+
items: {
|
|
27
|
+
type: [Array, Function],
|
|
28
|
+
default: () => []
|
|
29
|
+
},
|
|
30
|
+
itemText: {},
|
|
31
|
+
itemValue: {},
|
|
32
|
+
loadingText: {},
|
|
33
|
+
max: { default: Infinity },
|
|
34
|
+
modelValue: {},
|
|
35
|
+
multiple: { type: Boolean },
|
|
36
|
+
modelValueDebounceTime: { default: 0 },
|
|
37
|
+
name: {},
|
|
38
|
+
noDataText: {},
|
|
39
|
+
readonly: { type: Boolean }
|
|
40
|
+
},
|
|
41
|
+
emits: [
|
|
42
|
+
"blur",
|
|
43
|
+
"change",
|
|
44
|
+
"click",
|
|
45
|
+
"focus",
|
|
46
|
+
"inactive",
|
|
47
|
+
"input",
|
|
48
|
+
"keydown",
|
|
49
|
+
"mousedown",
|
|
50
|
+
"mouseup",
|
|
51
|
+
"update:modelValue"
|
|
52
|
+
],
|
|
53
|
+
setup(f, { emit: S }) {
|
|
54
|
+
let C = f, w = S;
|
|
55
|
+
if (!Array.isArray(C.modelValue)) throw Error("Model value must be an array in checkbox group.");
|
|
56
|
+
let T = _(), E = _(!1), { getter: D, items: O, loading: k } = n({
|
|
57
|
+
items: y(C, "items"),
|
|
58
|
+
debounce: 0
|
|
59
|
+
}), A = () => {
|
|
60
|
+
C.enforceCoherence && !L.value && w("update:modelValue", R.value.coherent);
|
|
61
|
+
}, { hasPrefilled: j } = s({
|
|
62
|
+
trigger: !0,
|
|
63
|
+
fn: async (e) => {
|
|
64
|
+
await D(e, C.modelValue), A();
|
|
65
|
+
}
|
|
66
|
+
}), { data: M } = r({ items: y(C, "modelValue") }), { options: N } = i({
|
|
67
|
+
disabled: y(C, "disabled"),
|
|
68
|
+
items: O,
|
|
69
|
+
itemText: C.itemText,
|
|
70
|
+
itemValue: C.itemValue,
|
|
71
|
+
max: C.max,
|
|
72
|
+
selectable: !0,
|
|
73
|
+
selectedIndexedByHash: M
|
|
74
|
+
}), P = async (e) => {
|
|
75
|
+
w("update:modelValue", C.modelValue.concat(e.value));
|
|
76
|
+
}, F = async (e) => {
|
|
77
|
+
let t = { ...M.value };
|
|
78
|
+
delete t[e.valueHash], w("update:modelValue", Object.values(t));
|
|
79
|
+
}, { data: I } = r({
|
|
80
|
+
items: N,
|
|
81
|
+
key: "valueHash"
|
|
82
|
+
}), { coherent: L, status: R } = a({
|
|
83
|
+
modelValue: y(C, "modelValue"),
|
|
84
|
+
multiple: !0,
|
|
85
|
+
iteratee: (t) => !!I.value[e(t)]
|
|
86
|
+
}), z = 0;
|
|
87
|
+
o(() => C.modelValue, async () => {
|
|
88
|
+
z++, L.value || (await D(!1, C.modelValue), A()), z--;
|
|
89
|
+
}, { debounce: C.modelValueDebounceTime }), o(() => [C.dependencies, C.items], async () => {
|
|
90
|
+
j.value && (z++, await D(!1, C.modelValue), z === 1 && A(), z--);
|
|
91
|
+
}, { debounce: C.depsDebounceTime });
|
|
92
|
+
let B = (e) => {
|
|
93
|
+
if (C.id) return [C.id, e.valueHash].filter(Boolean).join("-");
|
|
94
|
+
}, V = (e, t) => {
|
|
95
|
+
w("change", e), t.selected ? F(t) : P(t);
|
|
96
|
+
}, H = {
|
|
97
|
+
onBlur: (e) => w("blur", e),
|
|
98
|
+
onClick: (e) => w("click", e),
|
|
99
|
+
onFocus: (e) => {
|
|
100
|
+
w("focus", e), E.value ||= (document.addEventListener("focusin", U, { passive: !0 }), document.addEventListener("click", W, { passive: !0 }), !0);
|
|
101
|
+
},
|
|
102
|
+
onInput: (e) => w("input", e),
|
|
103
|
+
onKeydown: (e) => w("keydown", e),
|
|
104
|
+
onMousedown: (e) => w("mousedown", e),
|
|
105
|
+
onMouseup: (e) => w("mouseup", e)
|
|
106
|
+
}, U = (e) => {
|
|
107
|
+
e.target instanceof HTMLElement && (T.value?.$el.contains(e.target) || (w("inactive"), E.value = !1, document.removeEventListener("focusin", U), document.removeEventListener("click", W)));
|
|
108
|
+
}, W = (e) => {
|
|
109
|
+
e.target instanceof HTMLElement && (T.value?.$el.contains(e.target) || (w("inactive"), E.value = !1, document.removeEventListener("focusin", U), document.removeEventListener("click", W)));
|
|
110
|
+
};
|
|
111
|
+
return (e, n) => (g(), l(t, {
|
|
112
|
+
ref_key: "container",
|
|
113
|
+
ref: T,
|
|
114
|
+
class: "bb-base-switch-group",
|
|
115
|
+
direction: e.direction,
|
|
116
|
+
"has-errors": e.hasErrors,
|
|
117
|
+
"hide-label": e.hideLabel,
|
|
118
|
+
loading: !!b(k),
|
|
119
|
+
"loading-text": e.loadingText,
|
|
120
|
+
"no-data-text": e.noDataText,
|
|
121
|
+
options: b(N)
|
|
122
|
+
}, {
|
|
123
|
+
prepend: x(() => [v(e.$slots, "prepend")]),
|
|
124
|
+
loading: x(() => [v(e.$slots, "loading")]),
|
|
125
|
+
"no-data": x(() => [v(e.$slots, "no-data")]),
|
|
126
|
+
label: x((t) => [v(e.$slots, "label", h(p(t)))]),
|
|
127
|
+
"option:prepend": x((t) => [v(e.$slots, "option:prepend", h(p(t)))]),
|
|
128
|
+
input: x(({ option: t, index: n }) => [d(c, m({
|
|
129
|
+
id: B(t),
|
|
130
|
+
"aria-describedby": e.ariaDescribedby,
|
|
131
|
+
autofocus: e.autofocus && !n,
|
|
132
|
+
checked: t.selected,
|
|
133
|
+
color: e.color,
|
|
134
|
+
disabled: t.disabled,
|
|
135
|
+
"has-errors": e.hasErrors,
|
|
136
|
+
name: e.name,
|
|
137
|
+
readonly: e.readonly,
|
|
138
|
+
"true-value": t.value
|
|
139
|
+
}, H, { onChange: (e) => V(e, t) }), u({ _: 2 }, [e.$slots.icon ? {
|
|
140
|
+
name: "icon",
|
|
141
|
+
fn: x((n) => [v(e.$slots, "icon", m({
|
|
142
|
+
item: t.item,
|
|
143
|
+
text: t.text
|
|
144
|
+
}, n))]),
|
|
145
|
+
key: "0"
|
|
146
|
+
} : void 0]), 1040, [
|
|
147
|
+
"id",
|
|
148
|
+
"aria-describedby",
|
|
149
|
+
"autofocus",
|
|
150
|
+
"checked",
|
|
151
|
+
"color",
|
|
152
|
+
"disabled",
|
|
153
|
+
"has-errors",
|
|
154
|
+
"name",
|
|
155
|
+
"readonly",
|
|
156
|
+
"true-value",
|
|
157
|
+
"onChange"
|
|
158
|
+
])]),
|
|
159
|
+
"option:append": x((t) => [v(e.$slots, "option:append", h(p(t)))]),
|
|
160
|
+
append: x(() => [v(e.$slots, "append")]),
|
|
161
|
+
_: 3
|
|
162
|
+
}, 8, [
|
|
163
|
+
"direction",
|
|
164
|
+
"has-errors",
|
|
165
|
+
"hide-label",
|
|
166
|
+
"loading",
|
|
167
|
+
"loading-text",
|
|
168
|
+
"no-data-text",
|
|
169
|
+
"options"
|
|
170
|
+
]));
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
//#endregion
|
|
174
|
+
export { S as default };
|
package/dist/index2.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in e) t(r, i, {
|
|
5
|
+
get: e[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
}, c = (e, i, o, s) => {
|
|
10
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
11
|
+
get: ((e) => i[e]).bind(null, d),
|
|
12
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
13
|
+
});
|
|
14
|
+
return e;
|
|
15
|
+
}, l = (e, t, n) => (c(e, t, "default"), n && c(n, t, "default")), u = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
|
|
16
|
+
value: n,
|
|
17
|
+
enumerable: !0
|
|
18
|
+
}) : a, n));
|
|
19
|
+
//#endregion
|
|
20
|
+
export { o as __commonJSMin, s as __exportAll, l as __reExport, u as __toESM };
|