@7pmlabs/design-system 2.0.9 → 2.1.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/README.md +4 -4
- package/dist/design-system.css +1 -1
- package/dist/design-system.js +65 -59
- package/dist/design-system100.js +1 -1
- package/dist/design-system100.js.map +1 -1
- package/dist/design-system101.js +87 -53
- package/dist/design-system101.js.map +1 -1
- package/dist/design-system103.js +5 -13
- package/dist/design-system103.js.map +1 -1
- package/dist/design-system104.js +53 -108
- package/dist/design-system104.js.map +1 -1
- package/dist/{design-system102.js → design-system105.js} +1 -1
- package/dist/{design-system102.js.map → design-system105.js.map} +1 -1
- package/dist/design-system106.js +13 -6
- package/dist/design-system106.js.map +1 -1
- package/dist/design-system107.js +93 -190
- package/dist/design-system107.js.map +1 -1
- package/dist/design-system109.js +2 -2
- package/dist/design-system109.js.map +1 -1
- package/dist/design-system110.js +183 -484
- package/dist/design-system110.js.map +1 -1
- package/dist/design-system112.js +5 -4
- package/dist/design-system112.js.map +1 -1
- package/dist/design-system113.js +507 -7
- package/dist/design-system113.js.map +1 -1
- package/dist/design-system115.js +8 -0
- package/dist/design-system115.js.map +1 -0
- package/dist/design-system116.js +7 -6
- package/dist/design-system116.js.map +1 -1
- package/dist/design-system117.js +154 -169
- package/dist/design-system117.js.map +1 -1
- package/dist/design-system119.js +2 -2
- package/dist/design-system119.js.map +1 -1
- package/dist/design-system120.js +210 -149
- package/dist/design-system120.js.map +1 -1
- package/dist/design-system122.js +5 -4
- package/dist/design-system122.js.map +1 -1
- package/dist/design-system123.js +160 -9
- package/dist/design-system123.js.map +1 -1
- package/dist/design-system125.js +8 -0
- package/dist/design-system125.js.map +1 -0
- package/dist/design-system126.js +176 -6
- package/dist/design-system126.js.map +1 -1
- package/dist/design-system128.js +8 -0
- package/dist/design-system128.js.map +1 -0
- package/dist/design-system129.js +213 -5
- package/dist/design-system129.js.map +1 -1
- package/dist/design-system131.js +5 -90
- package/dist/design-system131.js.map +1 -1
- package/dist/design-system132.js +166 -0
- package/dist/design-system132.js.map +1 -0
- package/dist/design-system134.js +5 -42
- package/dist/design-system134.js.map +1 -1
- package/dist/design-system135.js +12 -0
- package/dist/design-system135.js.map +1 -0
- package/dist/design-system136.js +274 -5
- package/dist/design-system136.js.map +1 -1
- package/dist/design-system138.js +9 -0
- package/dist/{design-system124.js.map → design-system138.js.map} +1 -1
- package/dist/design-system139.js +16 -5
- package/dist/design-system139.js.map +1 -1
- package/dist/design-system141.js +8 -0
- package/dist/{design-system127.js.map → design-system141.js.map} +1 -1
- package/dist/design-system142.js +12 -5
- package/dist/design-system142.js.map +1 -1
- package/dist/design-system143.js +78 -83
- package/dist/design-system143.js.map +1 -1
- package/dist/design-system145.js +1 -1
- package/dist/design-system145.js.map +1 -1
- package/dist/design-system146.js +42 -9
- package/dist/design-system146.js.map +1 -1
- package/dist/design-system148.js +3 -2
- package/dist/design-system148.js.map +1 -1
- package/dist/design-system149.js +230 -18
- package/dist/design-system149.js.map +1 -1
- package/dist/design-system151.js +5 -158
- package/dist/design-system151.js.map +1 -1
- package/dist/{design-system140.js → design-system152.js} +6 -6
- package/dist/{design-system140.js.map → design-system152.js.map} +1 -1
- package/dist/design-system154.js +5 -307
- package/dist/design-system154.js.map +1 -1
- package/dist/design-system155.js +98 -0
- package/dist/design-system155.js.map +1 -0
- package/dist/design-system157.js +5 -240
- package/dist/design-system157.js.map +1 -1
- package/dist/design-system158.js +12 -0
- package/dist/design-system158.js.map +1 -0
- package/dist/design-system159.js +37 -5
- package/dist/design-system159.js.map +1 -1
- package/dist/design-system160.js +4 -189
- package/dist/design-system160.js.map +1 -1
- package/dist/design-system161.js +24 -0
- package/dist/{design-system150.js.map → design-system161.js.map} +1 -1
- package/dist/design-system162.js +2 -3
- package/dist/design-system162.js.map +1 -1
- package/dist/design-system163.js +158 -3
- package/dist/design-system163.js.map +1 -1
- package/dist/{design-system153.js → design-system165.js} +2 -2
- package/dist/{design-system153.js.map → design-system165.js.map} +1 -1
- package/dist/design-system166.js +307 -6
- package/dist/design-system166.js.map +1 -1
- package/dist/{design-system156.js → design-system168.js} +2 -2
- package/dist/{design-system156.js.map → design-system168.js.map} +1 -1
- package/dist/design-system169.js +167 -6
- package/dist/design-system169.js.map +1 -1
- package/dist/design-system171.js +8 -0
- package/dist/design-system171.js.map +1 -0
- package/dist/design-system172.js +240 -6
- package/dist/design-system172.js.map +1 -1
- package/dist/design-system174.js +8 -0
- package/dist/design-system174.js.map +1 -0
- package/dist/design-system175.js +189 -6
- package/dist/design-system175.js.map +1 -1
- package/dist/design-system177.js +8 -0
- package/dist/design-system177.js.map +1 -0
- package/dist/design-system178.js +3 -5
- package/dist/design-system178.js.map +1 -1
- package/dist/design-system179.js +58 -11
- package/dist/design-system179.js.map +1 -1
- package/dist/design-system181.js +9 -0
- package/dist/design-system181.js.map +1 -0
- package/dist/design-system182.js +56 -6
- package/dist/design-system182.js.map +1 -1
- package/dist/design-system184.js +9 -0
- package/dist/{design-system167.js.map → design-system184.js.map} +1 -1
- package/dist/design-system185.js +69 -5
- package/dist/design-system185.js.map +1 -1
- package/dist/design-system187.js +9 -0
- package/dist/{design-system170.js.map → design-system187.js.map} +1 -1
- package/dist/design-system188.js +182 -5
- package/dist/design-system188.js.map +1 -1
- package/dist/design-system190.js +9 -0
- package/dist/design-system190.js.map +1 -0
- package/dist/design-system191.js +115 -5
- package/dist/design-system191.js.map +1 -1
- package/dist/design-system193.js +8 -0
- package/dist/{design-system176.js.map → design-system193.js.map} +1 -1
- package/dist/design-system194.js +11 -5
- package/dist/design-system194.js.map +1 -1
- package/dist/design-system195.js +453 -24
- package/dist/design-system195.js.map +1 -1
- package/dist/design-system197.js +5 -4
- package/dist/design-system197.js.map +1 -1
- package/dist/design-system198.js +20 -16
- package/dist/design-system198.js.map +1 -1
- package/dist/design-system200.js +1 -1
- package/dist/design-system200.js.map +1 -1
- package/dist/design-system201.js +70 -314
- package/dist/design-system201.js.map +1 -1
- package/dist/design-system203.js +1 -1
- package/dist/design-system203.js.map +1 -1
- package/dist/design-system204.js +24 -89
- package/dist/design-system204.js.map +1 -1
- package/dist/design-system206.js +1 -1
- package/dist/design-system206.js.map +1 -1
- package/dist/design-system207.js +26 -17
- package/dist/design-system207.js.map +1 -1
- package/dist/design-system209.js +5 -3
- package/dist/design-system209.js.map +1 -1
- package/dist/design-system210.js +22 -408
- package/dist/design-system210.js.map +1 -1
- package/dist/design-system212.js +1 -1
- package/dist/design-system212.js.map +1 -1
- package/dist/design-system213.js +24 -52
- package/dist/design-system213.js.map +1 -1
- package/dist/design-system215.js +1 -1
- package/dist/design-system215.js.map +1 -1
- package/dist/design-system216.js +329 -85
- package/dist/design-system216.js.map +1 -1
- package/dist/design-system218.js +5 -108
- package/dist/design-system218.js.map +1 -1
- package/dist/design-system219.js +103 -0
- package/dist/design-system219.js.map +1 -0
- package/dist/design-system221.js +5 -106
- package/dist/design-system221.js.map +1 -1
- package/dist/design-system222.js +22 -0
- package/dist/{design-system208.js.map → design-system222.js.map} +1 -1
- package/dist/design-system223.js +4 -6
- package/dist/design-system223.js.map +1 -1
- package/dist/design-system224.js +3 -737
- package/dist/design-system224.js.map +1 -1
- package/dist/design-system225.js +422 -0
- package/dist/design-system225.js.map +1 -0
- package/dist/design-system227.js +5 -11
- package/dist/design-system227.js.map +1 -1
- package/dist/design-system228.js +51 -517
- package/dist/design-system228.js.map +1 -1
- package/dist/design-system230.js +1 -1
- package/dist/design-system230.js.map +1 -1
- package/dist/design-system231.js +88 -3
- package/dist/design-system231.js.map +1 -1
- package/dist/design-system232.js +4 -46
- package/dist/design-system232.js.map +1 -1
- package/dist/design-system233.js +108 -4
- package/dist/design-system233.js.map +1 -1
- package/dist/{design-system220.js → design-system235.js} +2 -2
- package/dist/{design-system220.js.map → design-system235.js.map} +1 -1
- package/dist/design-system236.js +106 -5
- package/dist/design-system236.js.map +1 -1
- package/dist/design-system238.js +9 -0
- package/dist/design-system238.js.map +1 -0
- package/dist/design-system239.js +737 -5
- package/dist/design-system239.js.map +1 -1
- package/dist/{design-system226.js → design-system241.js} +2 -2
- package/dist/{design-system226.js.map → design-system241.js.map} +1 -1
- package/dist/design-system242.js +3 -5
- package/dist/design-system242.js.map +1 -1
- package/dist/design-system243.js +42 -50
- package/dist/design-system243.js.map +1 -1
- package/dist/design-system244.js +1 -1
- package/dist/design-system244.js.map +1 -1
- package/dist/design-system245.js +254 -141
- package/dist/design-system245.js.map +1 -1
- package/dist/design-system247.js +1 -1
- package/dist/design-system247.js.map +1 -1
- package/dist/design-system248.js +119 -7
- package/dist/design-system248.js.map +1 -1
- package/dist/design-system250.js +8 -0
- package/dist/design-system250.js.map +1 -0
- package/dist/design-system251.js +172 -5
- package/dist/design-system251.js.map +1 -1
- package/dist/design-system253.js +8 -0
- package/dist/design-system253.js.map +1 -0
- package/dist/design-system254.js +11 -6
- package/dist/design-system254.js.map +1 -1
- package/dist/design-system255.js +525 -9
- package/dist/design-system255.js.map +1 -1
- package/dist/design-system257.js +8 -0
- package/dist/design-system257.js.map +1 -0
- package/dist/design-system258.js +112 -6
- package/dist/design-system258.js.map +1 -1
- package/dist/design-system260.js +5 -374
- package/dist/design-system260.js.map +1 -1
- package/dist/design-system261.js +57 -0
- package/dist/design-system261.js.map +1 -0
- package/dist/design-system262.js +4 -6
- package/dist/design-system262.js.map +1 -1
- package/dist/design-system263.js +173 -0
- package/dist/design-system263.js.map +1 -0
- package/dist/design-system265.js +8 -0
- package/dist/design-system265.js.map +1 -0
- package/dist/design-system266.js +10 -0
- package/dist/design-system266.js.map +1 -0
- package/dist/{design-system249.js → design-system267.js} +2 -2
- package/dist/{design-system249.js.map → design-system267.js.map} +1 -1
- package/dist/design-system269.js +8 -0
- package/dist/design-system269.js.map +1 -0
- package/dist/{design-system252.js → design-system270.js} +1 -1
- package/dist/{design-system252.js.map → design-system270.js.map} +1 -1
- package/dist/design-system272.js +9 -0
- package/dist/design-system272.js.map +1 -0
- package/dist/design-system273.js +12 -0
- package/dist/design-system273.js.map +1 -0
- package/dist/{design-system256.js → design-system274.js} +2 -2
- package/dist/{design-system256.js.map → design-system274.js.map} +1 -1
- package/dist/design-system276.js +9 -0
- package/dist/design-system276.js.map +1 -0
- package/dist/{design-system259.js → design-system277.js} +1 -1
- package/dist/{design-system259.js.map → design-system277.js.map} +1 -1
- package/dist/design-system278.js +377 -0
- package/dist/design-system278.js.map +1 -0
- package/dist/design-system280.js +9 -0
- package/dist/design-system280.js.map +1 -0
- package/dist/design-system69.js +182 -13
- package/dist/design-system69.js.map +1 -1
- package/dist/design-system71.js +8 -0
- package/dist/design-system71.js.map +1 -0
- package/dist/design-system72.js +13 -5
- package/dist/design-system72.js.map +1 -1
- package/dist/design-system73.js +677 -139
- package/dist/design-system73.js.map +1 -1
- package/dist/design-system75.js +1 -1
- package/dist/design-system75.js.map +1 -1
- package/dist/design-system76.js +152 -23
- package/dist/design-system76.js.map +1 -1
- package/dist/design-system78.js +5 -49
- package/dist/design-system78.js.map +1 -1
- package/dist/design-system79.js +32 -0
- package/dist/design-system79.js.map +1 -0
- package/dist/design-system80.js +2 -3
- package/dist/design-system80.js.map +1 -1
- package/dist/design-system81.js +38 -188
- package/dist/design-system81.js.map +1 -1
- package/dist/design-system83.js +1 -1
- package/dist/design-system83.js.map +1 -1
- package/dist/design-system84.js +199 -7
- package/dist/design-system84.js.map +1 -1
- package/dist/design-system86.js +8 -0
- package/dist/design-system86.js.map +1 -0
- package/dist/design-system87.js +7 -5
- package/dist/design-system87.js.map +1 -1
- package/dist/design-system88.js +264 -48
- package/dist/design-system88.js.map +1 -1
- package/dist/design-system90.js +1 -1
- package/dist/design-system90.js.map +1 -1
- package/dist/design-system91.js +57 -11
- package/dist/design-system91.js.map +1 -1
- package/dist/design-system93.js +8 -0
- package/dist/design-system93.js.map +1 -0
- package/dist/design-system94.js +11 -5
- package/dist/design-system94.js.map +1 -1
- package/dist/design-system95.js +92 -59
- package/dist/design-system95.js.map +1 -1
- package/dist/design-system97.js +1 -1
- package/dist/design-system97.js.map +1 -1
- package/dist/design-system98.js +56 -78
- package/dist/design-system98.js.map +1 -1
- package/dist/types/components/BContextMenu/BContextMenu.spec.d.ts +1 -0
- package/dist/types/components/BContextMenu/BContextMenu.vue.d.ts +42 -0
- package/dist/types/components/BContextMenu/index.d.ts +2 -0
- package/dist/types/components/BContextMenu/types.d.ts +23 -0
- package/dist/types/components/BInputTags/BInputTags.spec.d.ts +1 -0
- package/dist/types/components/BInputTags/BInputTags.vue.d.ts +54 -0
- package/dist/types/components/BInputTags/index.d.ts +1 -0
- package/dist/types/components/BLink/BLink.spec.d.ts +1 -0
- package/dist/types/components/BLink/BLink.vue.d.ts +100 -0
- package/dist/types/components/BLink/index.d.ts +1 -0
- package/dist/types/components/BListbox/BListbox.spec.d.ts +1 -0
- package/dist/types/components/BListbox/BListbox.vue.d.ts +52 -0
- package/dist/types/components/BListbox/index.d.ts +1 -0
- package/dist/types/components/BModal/BModal.spec.d.ts +1 -0
- package/dist/types/components/BPinInput/BPinInput.spec.d.ts +1 -0
- package/dist/types/components/BPinInput/BPinInput.vue.d.ts +43 -0
- package/dist/types/components/BPinInput/index.d.ts +1 -0
- package/dist/types/components/BProgress/BProgress.vue.d.ts +47 -2
- package/dist/types/components/BTextarea/BTextarea.spec.d.ts +1 -0
- package/dist/types/components/BTextarea/BTextarea.vue.d.ts +77 -0
- package/dist/types/components/BTextarea/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +7 -1
- package/package.json +1 -1
- package/dist/design-system114.js +0 -212
- package/dist/design-system114.js.map +0 -1
- package/dist/design-system124.js +0 -277
- package/dist/design-system127.js +0 -19
- package/dist/design-system130.js +0 -15
- package/dist/design-system130.js.map +0 -1
- package/dist/design-system133.js +0 -8
- package/dist/design-system133.js.map +0 -1
- package/dist/design-system137.js +0 -236
- package/dist/design-system137.js.map +0 -1
- package/dist/design-system147.js +0 -40
- package/dist/design-system147.js.map +0 -1
- package/dist/design-system150.js +0 -7
- package/dist/design-system164.js +0 -61
- package/dist/design-system164.js.map +0 -1
- package/dist/design-system167.js +0 -59
- package/dist/design-system170.js +0 -72
- package/dist/design-system173.js +0 -185
- package/dist/design-system173.js.map +0 -1
- package/dist/design-system176.js +0 -118
- package/dist/design-system180.js +0 -465
- package/dist/design-system180.js.map +0 -1
- package/dist/design-system183.js +0 -38
- package/dist/design-system183.js.map +0 -1
- package/dist/design-system186.js +0 -91
- package/dist/design-system186.js.map +0 -1
- package/dist/design-system189.js +0 -38
- package/dist/design-system189.js.map +0 -1
- package/dist/design-system192.js +0 -31
- package/dist/design-system192.js.map +0 -1
- package/dist/design-system208.js +0 -7
- package/dist/design-system217.js +0 -7
- package/dist/design-system217.js.map +0 -1
- package/dist/design-system234.js +0 -286
- package/dist/design-system234.js.map +0 -1
- package/dist/design-system237.js +0 -122
- package/dist/design-system237.js.map +0 -1
- package/dist/design-system240.js +0 -115
- package/dist/design-system240.js.map +0 -1
- package/dist/design-system70.js +0 -699
- package/dist/design-system70.js.map +0 -1
- package/dist/design-system77.js +0 -7
- package/dist/design-system77.js.map +0 -1
- package/dist/design-system85.js +0 -276
- package/dist/design-system85.js.map +0 -1
- package/dist/design-system92.js +0 -102
- package/dist/design-system92.js.map +0 -1
package/dist/design-system169.js
CHANGED
|
@@ -1,9 +1,170 @@
|
|
|
1
|
-
import e from "./design-
|
|
2
|
-
import t from "./design-
|
|
3
|
-
|
|
4
|
-
//#region src/components/
|
|
5
|
-
var
|
|
1
|
+
import { BCommonSize as e } from "./design-system3.js";
|
|
2
|
+
import { useComponentId as t } from "./design-system10.js";
|
|
3
|
+
import { Fragment as n, computed as r, createElementBlock as i, defineComponent as a, mergeModels as o, nextTick as s, normalizeClass as c, onMounted as l, openBlock as u, ref as d, renderList as f, useModel as p, watch as m } from "vue";
|
|
4
|
+
//#region src/components/BPinInput/BPinInput.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var h = [
|
|
6
|
+
"id",
|
|
7
|
+
"aria-label",
|
|
8
|
+
"aria-disabled"
|
|
9
|
+
], g = [
|
|
10
|
+
"value",
|
|
11
|
+
"type",
|
|
12
|
+
"inputmode",
|
|
13
|
+
"pattern",
|
|
14
|
+
"disabled",
|
|
15
|
+
"autocomplete",
|
|
16
|
+
"aria-label",
|
|
17
|
+
"onInput",
|
|
18
|
+
"onKeydown",
|
|
19
|
+
"onPaste"
|
|
20
|
+
], _ = /* @__PURE__ */ a({
|
|
21
|
+
inheritAttrs: !1,
|
|
22
|
+
__name: "BPinInput",
|
|
23
|
+
props: /* @__PURE__ */ o({
|
|
24
|
+
length: { default: 6 },
|
|
25
|
+
mask: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
type: { default: "number" },
|
|
30
|
+
size: { default: () => e.Medium },
|
|
31
|
+
disabled: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
},
|
|
35
|
+
autoFocus: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !1
|
|
38
|
+
},
|
|
39
|
+
id: {},
|
|
40
|
+
ariaLabel: { default: "PIN entry" }
|
|
41
|
+
}, {
|
|
42
|
+
modelValue: { default: "" },
|
|
43
|
+
modelModifiers: {}
|
|
44
|
+
}),
|
|
45
|
+
emits: /* @__PURE__ */ o(["complete"], ["update:modelValue"]),
|
|
46
|
+
setup(e, { expose: a, emit: o }) {
|
|
47
|
+
let _ = o, v = p(e, "modelValue"), { componentUID: y } = t(), b = r(() => e.id ?? `b-pin-input-${y.value}`), x = d([]), S = r(() => {
|
|
48
|
+
let t = v.value ?? "", n = Array.from({ length: e.length });
|
|
49
|
+
for (let r = 0; r < e.length; r++) n[r] = t[r] ?? "";
|
|
50
|
+
return n;
|
|
51
|
+
}), C = (t) => t ? e.type === "number" ? /[0-9]/.test(t) ? t : "" : e.type === "alphanumeric" ? /[A-Za-z0-9]/.test(t) ? t : "" : t.length === 1 ? t : "" : "", w = (t) => e.type === "number" ? (t.match(/[0-9]/g) ?? []).join("") : e.type === "alphanumeric" ? (t.match(/[A-Za-z0-9]/g) ?? []).join("") : t, T = r(() => e.type === "number" ? "numeric" : "text"), E = r(() => e.type === "number" ? "[0-9]*" : void 0), D = r(() => e.mask ? "password" : "text"), O = (t) => {
|
|
52
|
+
let n = t.join("");
|
|
53
|
+
n !== v.value && (v.value = n, n.length === e.length && t.every((e) => e.length === 1) && _("complete", n));
|
|
54
|
+
}, k = (e) => {
|
|
55
|
+
let t = x.value[e];
|
|
56
|
+
t && !t.disabled && (t.focus(), t.select());
|
|
57
|
+
}, A = (t, n) => {
|
|
58
|
+
let r = t.target, i = r.value, a = C(i.length > 0 ? i[i.length - 1] : "");
|
|
59
|
+
r.value = a;
|
|
60
|
+
let o = [...S.value];
|
|
61
|
+
o[n] = a, O(o), a && n < e.length - 1 && s(() => k(n + 1));
|
|
62
|
+
}, j = (t, n) => {
|
|
63
|
+
let r = t.key;
|
|
64
|
+
if (r === "Backspace") {
|
|
65
|
+
if (S.value[n]) {
|
|
66
|
+
let e = [...S.value];
|
|
67
|
+
e[n] = "", O(e), t.preventDefault();
|
|
68
|
+
} else if (n > 0) {
|
|
69
|
+
t.preventDefault();
|
|
70
|
+
let e = [...S.value];
|
|
71
|
+
e[n - 1] = "", O(e), s(() => k(n - 1));
|
|
72
|
+
}
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (r === "ArrowLeft" && n > 0) {
|
|
76
|
+
t.preventDefault(), k(n - 1);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (r === "ArrowRight" && n < e.length - 1) {
|
|
80
|
+
t.preventDefault(), k(n + 1);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (r === "Home") {
|
|
84
|
+
t.preventDefault(), k(0);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
r === "End" && (t.preventDefault(), k(e.length - 1));
|
|
88
|
+
}, M = (t, n) => {
|
|
89
|
+
t.preventDefault();
|
|
90
|
+
let r = w(t.clipboardData?.getData("text") ?? "");
|
|
91
|
+
if (!r) return;
|
|
92
|
+
let i = [...S.value], a = n;
|
|
93
|
+
for (let t of r) {
|
|
94
|
+
if (a >= e.length) break;
|
|
95
|
+
i[a] = t, a += 1;
|
|
96
|
+
}
|
|
97
|
+
O(i);
|
|
98
|
+
let o = Math.min(a, e.length - 1);
|
|
99
|
+
s(() => k(o));
|
|
100
|
+
}, N = (e) => {
|
|
101
|
+
e.target.select();
|
|
102
|
+
};
|
|
103
|
+
m(() => v.value, (t) => {
|
|
104
|
+
let n = w(t ?? "").slice(0, e.length);
|
|
105
|
+
n !== t && (v.value = n);
|
|
106
|
+
}, { immediate: !0 });
|
|
107
|
+
let P = () => {
|
|
108
|
+
for (let t = 0; t < e.length; t++) {
|
|
109
|
+
let e = x.value[t];
|
|
110
|
+
if (e && !e.disabled) {
|
|
111
|
+
e.focus(), e.select();
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
return l(() => {
|
|
117
|
+
e.autoFocus && s(() => P());
|
|
118
|
+
}), a({
|
|
119
|
+
focus: (t) => {
|
|
120
|
+
if (t === void 0) {
|
|
121
|
+
P();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
t < 0 || t >= e.length || k(t);
|
|
125
|
+
},
|
|
126
|
+
clear: () => {
|
|
127
|
+
v.value !== "" && (v.value = ""), s(() => P());
|
|
128
|
+
},
|
|
129
|
+
focusFirst: P,
|
|
130
|
+
focusLast: () => {
|
|
131
|
+
for (let t = e.length - 1; t >= 0; t--) {
|
|
132
|
+
let e = x.value[t];
|
|
133
|
+
if (e && !e.disabled) {
|
|
134
|
+
e.focus(), e.select();
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}), (t, r) => (u(), i("div", {
|
|
140
|
+
id: b.value,
|
|
141
|
+
class: c(["b-pin-input", [`b-pin-input--${e.size}`, { "b-pin-input--disabled": e.disabled }]]),
|
|
142
|
+
role: "group",
|
|
143
|
+
"aria-label": e.ariaLabel,
|
|
144
|
+
"aria-disabled": e.disabled || void 0
|
|
145
|
+
}, [(u(!0), i(n, null, f(S.value, (t, n) => (u(), i("input", {
|
|
146
|
+
key: n,
|
|
147
|
+
ref_for: !0,
|
|
148
|
+
ref: (e) => {
|
|
149
|
+
e && (x.value[n] = e);
|
|
150
|
+
},
|
|
151
|
+
value: t,
|
|
152
|
+
type: D.value,
|
|
153
|
+
inputmode: T.value,
|
|
154
|
+
pattern: E.value,
|
|
155
|
+
disabled: e.disabled,
|
|
156
|
+
autocomplete: n === 0 ? "one-time-code" : "off",
|
|
157
|
+
maxlength: "1",
|
|
158
|
+
class: "b-pin-input__cell",
|
|
159
|
+
"aria-label": e.type === "number" ? `Digit ${n + 1} of ${e.length}` : `Character ${n + 1} of ${e.length}`,
|
|
160
|
+
onInput: (e) => A(e, n),
|
|
161
|
+
onKeydown: (e) => j(e, n),
|
|
162
|
+
onPaste: (e) => M(e, n),
|
|
163
|
+
onFocus: N
|
|
164
|
+
}, null, 40, g))), 128))], 10, h));
|
|
165
|
+
}
|
|
166
|
+
});
|
|
6
167
|
//#endregion
|
|
7
|
-
export {
|
|
168
|
+
export { _ as default };
|
|
8
169
|
|
|
9
170
|
//# sourceMappingURL=design-system169.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-system169.js","names":[],"sources":["../src/components/BRadio/BRadioButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { useComponentId } from '@/composables/useComponentId.ts';\nimport { computed, inject } from 'vue';\nimport { B_RADIO_GROUP_KEY, type BRadioGroupContext } from './types';\n\n//#region Props\nconst {\n id = '',\n disabled = false,\n value = '',\n name = '',\n} = defineProps<{\n /** Custom id attribute for the radio button input. */\n id?: string;\n /** Whether the radio button is disabled. */\n disabled?: boolean;\n /** Value when used inside BRadioGroup. */\n value?: string | number;\n /** The name attribute for the input element. */\n name?: string;\n}>();\n\n/**\n * The checked state of the radio button.\n */\nconst model = defineModel<boolean>({ default: false });\n\nconst emit = defineEmits<{\n change: [checked: boolean, event: Event];\n}>();\n//#endregion\n\n//#region Group integration\nconst group = inject<BRadioGroupContext | null>(B_RADIO_GROUP_KEY, null);\n\nconst isDisabled = computed(() => disabled || group?.disabled.value || false);\nconst inputName = computed(() => name || group?.name.value || '');\nconst groupSize = computed(() => group?.size.value || 'middle');\nconst groupButtonStyle = computed(() => group?.buttonStyle.value || 'outline');\n\nconst isChecked = computed(() => {\n if (group) {\n return group.modelValue.value === value;\n }\n return model.value;\n});\n//#endregion\n\n//#region ID generation\nconst { componentUID } = useComponentId();\nconst inputId = computed(() => id || `b-radio-button-${componentUID.value}`);\n//#endregion\n\n//#region Handlers\nfunction handleChange(event: Event) {\n if (isDisabled.value) return;\n\n if (group) {\n group.setValue(value);\n } else {\n model.value = true;\n }\n emit('change', true, event);\n}\n//#endregion\n</script>\n\n<template>\n <label\n class=\"b-radio-button b:relative b:inline-flex b:cursor-pointer b:items-center b:justify-center b:leading-none b:select-none\"\n :class=\"[\n `b-radio-button--${groupSize}`,\n `b-radio-button--${groupButtonStyle}`,\n {\n 'b-radio-button--checked': isChecked,\n 'b-radio-button--disabled b:cursor-not-allowed': isDisabled,\n },\n ]\"\n :for=\"inputId\"\n >\n <input\n :id=\"inputId\"\n type=\"radio\"\n class=\"b-radio-button__input\"\n :checked=\"isChecked\"\n :disabled=\"isDisabled\"\n :name=\"inputName\"\n :value=\"value\"\n @change=\"handleChange\"\n />\n <span class=\"b-radio-button__label\">\n <slot />\n </span>\n </label>\n</template>\n\n<style scoped>\n.b-radio-button {\n --b-radio-button-bg: #ffffff;\n --b-radio-button-checked-bg: #ffffff;\n --b-radio-button-color: rgba(0, 0, 0, 0.88);\n --b-radio-button-color-primary: #0958d9;\n --b-radio-button-color-primary-hover: #0958d9;\n --b-radio-button-color-primary-active: #003eb3;\n --b-radio-button-color-border: #d9d9d9;\n --b-radio-button-color-disabled-bg: rgba(0, 0, 0, 0.04);\n --b-radio-button-color-disabled: rgba(0, 0, 0, 0.25);\n --b-radio-button-solid-checked-bg: #0958d9;\n --b-radio-button-solid-checked-color: #fff;\n --b-radio-button-solid-checked-hover-bg: #003eb3;\n --b-radio-button-solid-checked-active-bg: #002b80;\n --b-radio-button-padding-inline: 15px;\n --b-radio-button-border-width: 1px;\n --b-radio-button-transition-duration: 0.2s;\n\n border: var(--b-radio-button-border-width) solid var(--b-radio-button-color-border);\n background-color: var(--b-radio-button-bg);\n color: var(--b-radio-button-color);\n padding-inline: var(--b-radio-button-padding-inline);\n transition:\n color var(--b-radio-button-transition-duration) ease-in-out,\n background-color var(--b-radio-button-transition-duration) ease-in-out,\n border-color var(--b-radio-button-transition-duration) ease-in-out;\n margin-inline-start: calc(-1 * var(--b-radio-button-border-width));\n}\n\n.b-radio-button:first-child {\n margin-inline-start: 0;\n border-start-start-radius: 6px;\n border-end-start-radius: 6px;\n}\n\n.b-radio-button:last-child {\n border-start-end-radius: 6px;\n border-end-end-radius: 6px;\n}\n\n/* Sizes */\n.b-radio-button--large {\n padding-block: 8px;\n font-size: 16px;\n line-height: 1.5;\n}\n\n.b-radio-button--middle {\n padding-block: 5px;\n font-size: 14px;\n line-height: 1.5714;\n}\n\n.b-radio-button--small {\n padding-block: 1px;\n font-size: 14px;\n line-height: 1.5714;\n}\n\n/* Outline style — checked */\n.b-radio-button--outline.b-radio-button--checked {\n color: var(--b-radio-button-color-primary);\n border-color: var(--b-radio-button-color-primary);\n background-color: var(--b-radio-button-checked-bg);\n z-index: 1;\n}\n\n.b-radio-button--outline:not(.b-radio-button--disabled):hover {\n color: var(--b-radio-button-color-primary-hover);\n border-color: var(--b-radio-button-color-primary-hover);\n z-index: 1;\n}\n\n/* Solid style — checked */\n.b-radio-button--solid.b-radio-button--checked {\n color: var(--b-radio-button-solid-checked-color);\n background-color: var(--b-radio-button-solid-checked-bg);\n border-color: var(--b-radio-button-solid-checked-bg);\n z-index: 1;\n}\n\n.b-radio-button--solid.b-radio-button--checked:hover {\n background-color: var(--b-radio-button-solid-checked-hover-bg);\n border-color: var(--b-radio-button-solid-checked-hover-bg);\n}\n\n.b-radio-button--solid:not(.b-radio-button--checked):not(.b-radio-button--disabled):hover {\n color: var(--b-radio-button-color-primary-hover);\n border-color: var(--b-radio-button-color-primary-hover);\n z-index: 1;\n}\n\n/* Disabled */\n.b-radio-button--disabled {\n background-color: var(--b-radio-button-color-disabled-bg);\n color: var(--b-radio-button-color-disabled);\n border-color: var(--b-radio-button-color-border);\n opacity: 1;\n}\n\n.b-radio-button--disabled.b-radio-button--checked {\n background-color: var(--b-radio-button-color-disabled-bg);\n color: var(--b-radio-button-color-disabled);\n border-color: var(--b-radio-button-color-border);\n}\n\n/* Hidden input */\n.b-radio-button__input {\n appearance: none;\n -webkit-appearance: none;\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n margin: 0;\n padding: 0;\n cursor: pointer;\n z-index: 1;\n}\n\n.b-radio-button--disabled .b-radio-button__input {\n cursor: not-allowed;\n}\n\n/* Focus-visible ring */\n.b-radio-button__input:focus-visible ~ .b-radio-button__label {\n outline: 2px solid var(--b-radio-button-color-primary);\n outline-offset: 2px;\n border-radius: 2px;\n}\n\n/* Dark mode */\n[data-prefers-color='dark'] .b-radio-button {\n --b-radio-button-bg: #141414;\n --b-radio-button-checked-bg: #141414;\n --b-radio-button-color: rgba(255, 255, 255, 0.85);\n --b-radio-button-color-primary: #4d94e8;\n --b-radio-button-color-primary-hover: #4d94e8;\n --b-radio-button-color-primary-active: #3c89e8;\n --b-radio-button-color-border: #424242;\n --b-radio-button-color-disabled-bg: rgba(255, 255, 255, 0.08);\n --b-radio-button-color-disabled: rgba(255, 255, 255, 0.25);\n --b-radio-button-solid-checked-bg: #1668dc;\n --b-radio-button-solid-checked-color: #fff;\n --b-radio-button-solid-checked-hover-bg: #0958d9;\n --b-radio-button-solid-checked-active-bg: #003eb3;\n}\n\n@media (prefers-color-scheme: dark) {\n [data-prefers-color='system'] .b-radio-button {\n --b-radio-button-bg: #141414;\n --b-radio-button-checked-bg: #141414;\n --b-radio-button-color: rgba(255, 255, 255, 0.85);\n --b-radio-button-color-primary: #4d94e8;\n --b-radio-button-color-primary-hover: #4d94e8;\n --b-radio-button-color-primary-active: #3c89e8;\n --b-radio-button-color-border: #424242;\n --b-radio-button-color-disabled-bg: rgba(255, 255, 255, 0.08);\n --b-radio-button-color-disabled: rgba(255, 255, 255, 0.25);\n --b-radio-button-solid-checked-bg: #1668dc;\n --b-radio-button-solid-checked-color: #fff;\n --b-radio-button-solid-checked-hover-bg: #0958d9;\n --b-radio-button-solid-checked-active-bg: #003eb3;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .b-radio-button {\n transition: none;\n }\n}\n</style>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"design-system169.js","names":[],"sources":["../src/components/BPinInput/BPinInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useComponentId } from '@/composables/useComponentId.ts';\nimport { BCommonSize } from '@/types.ts';\nimport { computed, nextTick, onMounted, ref, watch } from 'vue';\n\ndefineOptions({ inheritAttrs: false });\n\nconst {\n length = 6,\n mask = false,\n type = 'number',\n size = BCommonSize.Medium,\n disabled = false,\n autoFocus = false,\n id,\n ariaLabel = 'PIN entry',\n} = defineProps<{\n /** Number of cells (digits/characters) in the PIN. @default 6 */\n length?: number;\n /** Render the value as bullets (uses `type=\"password\"` on each cell). @default false */\n mask?: boolean;\n /**\n * Allowed character class:\n * - `'number'` — digits 0-9 only (uses `inputmode=\"numeric\"` + `pattern=\"[0-9]*\"`).\n * - `'text'` — any character.\n * - `'alphanumeric'` — letters + digits only.\n * @default 'number'\n */\n type?: 'number' | 'text' | 'alphanumeric';\n /** Size preset applied to each cell. @default 'md' */\n size?: `${BCommonSize}`;\n /** Disable every cell. @default false */\n disabled?: boolean;\n /** Focus the first non-disabled cell on mount. @default false */\n autoFocus?: boolean;\n /** HTML id attribute applied to the wrapping group element. */\n id?: string;\n /** Accessible label for the wrapping `role=\"group\"` element. @default 'PIN entry' */\n ariaLabel?: string;\n}>();\n\nconst emit = defineEmits<{\n /** Fired once every cell is filled. The argument is the joined string. */\n complete: [value: string];\n}>();\n\nconst model = defineModel<string>({ default: '' });\n\nconst { componentUID } = useComponentId();\nconst groupId = computed(() => id ?? `b-pin-input-${componentUID.value}`);\n\n// ─────────────────────────────────────────────\n// Cell state\n// ─────────────────────────────────────────────\nconst cellRefs = ref<HTMLInputElement[]>([]);\n\nconst cells = computed<string[]>(() => {\n const value = model.value ?? '';\n const out: string[] = Array.from({ length });\n for (let i = 0; i < length; i++) {\n out[i] = value[i] ?? '';\n }\n return out;\n});\n\n// ─────────────────────────────────────────────\n// Filtering by `type`\n// ─────────────────────────────────────────────\nconst filterChar = (ch: string): string => {\n if (!ch) return '';\n if (type === 'number') return /[0-9]/.test(ch) ? ch : '';\n if (type === 'alphanumeric') return /[A-Za-z0-9]/.test(ch) ? ch : '';\n return ch.length === 1 ? ch : '';\n};\n\nconst filterString = (raw: string): string => {\n if (type === 'number') return (raw.match(/[0-9]/g) ?? []).join('');\n if (type === 'alphanumeric') return (raw.match(/[A-Za-z0-9]/g) ?? []).join('');\n return raw;\n};\n\nconst inputMode = computed<'numeric' | 'text'>(() => (type === 'number' ? 'numeric' : 'text'));\nconst cellPattern = computed<string | undefined>(() =>\n type === 'number' ? '[0-9]*' : undefined,\n);\nconst cellType = computed<'text' | 'password'>(() => (mask ? 'password' : 'text'));\n\n// ─────────────────────────────────────────────\n// Helpers — write to the model & emit\n// ─────────────────────────────────────────────\nconst updateModel = (next: string[]) => {\n // Trim trailing empties to keep the joined string compact, but preserve interior gaps\n // by replacing them with the empty string (still filled positions render).\n const joined = next.join('');\n if (joined === model.value) return;\n model.value = joined;\n if (joined.length === length && next.every((c) => c.length === 1)) {\n emit('complete', joined);\n }\n};\n\nconst focusCell = (index: number) => {\n const target = cellRefs.value[index];\n if (target && !target.disabled) {\n target.focus();\n target.select();\n }\n};\n\n// ─────────────────────────────────────────────\n// Event handlers\n// ─────────────────────────────────────────────\nconst handleInput = (event: Event, index: number) => {\n const target = event.target as HTMLInputElement;\n const raw = target.value;\n\n // The user may have typed a multi-char string (autofill, IME). Take the LAST character\n // so the cell always reflects what they just typed.\n const lastChar = raw.length > 0 ? raw[raw.length - 1] : '';\n const ch = filterChar(lastChar);\n\n // Force the DOM value to match our filtered char, even if Vue re-renders.\n target.value = ch;\n\n const next = [...cells.value];\n next[index] = ch;\n updateModel(next);\n\n if (ch && index < length - 1) {\n void nextTick(() => focusCell(index + 1));\n }\n};\n\nconst handleKeyDown = (event: KeyboardEvent, index: number) => {\n const key = event.key;\n\n if (key === 'Backspace') {\n const current = cells.value[index];\n if (current) {\n // Filled cell: clear it in place.\n const next = [...cells.value];\n next[index] = '';\n updateModel(next);\n // Don't preventDefault — let the browser's own backspace handling complete on the\n // already-empty input as well; we've already cleared model state.\n event.preventDefault();\n } else if (index > 0) {\n // Empty cell: hop back and clear that one too.\n event.preventDefault();\n const next = [...cells.value];\n next[index - 1] = '';\n updateModel(next);\n void nextTick(() => focusCell(index - 1));\n }\n return;\n }\n\n if (key === 'ArrowLeft' && index > 0) {\n event.preventDefault();\n focusCell(index - 1);\n return;\n }\n\n if (key === 'ArrowRight' && index < length - 1) {\n event.preventDefault();\n focusCell(index + 1);\n return;\n }\n\n if (key === 'Home') {\n event.preventDefault();\n focusCell(0);\n return;\n }\n\n if (key === 'End') {\n event.preventDefault();\n focusCell(length - 1);\n }\n};\n\nconst handlePaste = (event: ClipboardEvent, index: number) => {\n event.preventDefault();\n const pasted = event.clipboardData?.getData('text') ?? '';\n const filtered = filterString(pasted);\n if (!filtered) return;\n\n const next = [...cells.value];\n let writeAt = index;\n for (const ch of filtered) {\n if (writeAt >= length) break;\n next[writeAt] = ch;\n writeAt += 1;\n }\n updateModel(next);\n\n // Focus the next empty cell, or the last cell if all are filled.\n const focusIndex = Math.min(writeAt, length - 1);\n void nextTick(() => focusCell(focusIndex));\n};\n\nconst handleFocus = (event: FocusEvent) => {\n // Convenience: select the cell content on focus so typing replaces it.\n (event.target as HTMLInputElement).select();\n};\n\n// ─────────────────────────────────────────────\n// External model changes — sanitize against `type`\n// ─────────────────────────────────────────────\nwatch(\n () => model.value,\n (val) => {\n const filtered = filterString(val ?? '').slice(0, length);\n if (filtered !== val) {\n model.value = filtered;\n }\n },\n { immediate: true },\n);\n\n// ─────────────────────────────────────────────\n// autoFocus + exposed API\n// ─────────────────────────────────────────────\nconst focusFirst = () => {\n for (let i = 0; i < length; i++) {\n const el = cellRefs.value[i];\n if (el && !el.disabled) {\n el.focus();\n el.select();\n return;\n }\n }\n};\n\nconst focusLast = () => {\n for (let i = length - 1; i >= 0; i--) {\n const el = cellRefs.value[i];\n if (el && !el.disabled) {\n el.focus();\n el.select();\n return;\n }\n }\n};\n\nconst focus = (index?: number) => {\n if (index === undefined) {\n focusFirst();\n return;\n }\n if (index < 0 || index >= length) return;\n focusCell(index);\n};\n\nconst clear = () => {\n if (model.value !== '') model.value = '';\n void nextTick(() => focusFirst());\n};\n\nonMounted(() => {\n if (autoFocus) {\n void nextTick(() => focusFirst());\n }\n});\n\ndefineExpose({ focus, clear, focusFirst, focusLast });\n</script>\n\n<template>\n <div\n :id=\"groupId\"\n class=\"b-pin-input\"\n :class=\"[\n `b-pin-input--${size}`,\n {\n 'b-pin-input--disabled': disabled,\n },\n ]\"\n role=\"group\"\n :aria-label=\"ariaLabel\"\n :aria-disabled=\"disabled || undefined\"\n >\n <input\n v-for=\"(cellValue, idx) in cells\"\n :key=\"idx\"\n :ref=\"\n (el) => {\n if (el) cellRefs[idx] = el as HTMLInputElement;\n }\n \"\n :value=\"cellValue\"\n :type=\"cellType\"\n :inputmode=\"inputMode\"\n :pattern=\"cellPattern\"\n :disabled=\"disabled\"\n :autocomplete=\"idx === 0 ? 'one-time-code' : 'off'\"\n maxlength=\"1\"\n class=\"b-pin-input__cell\"\n :aria-label=\"\n type === 'number'\n ? `Digit ${idx + 1} of ${length}`\n : `Character ${idx + 1} of ${length}`\n \"\n @input=\"handleInput($event, idx)\"\n @keydown=\"handleKeyDown($event, idx)\"\n @paste=\"handlePaste($event, idx)\"\n @focus=\"handleFocus\"\n />\n </div>\n</template>\n\n<style>\n.b-pin-input {\n /* ── Tokens ── */\n --b-pin-input-cell-size: 2.5rem;\n --b-pin-input-cell-gap: 0.5rem;\n --b-pin-input-cell-bg: #ffffff;\n --b-pin-input-cell-border-color: #d9d9d9;\n --b-pin-input-cell-border-color-focus: #1677ff;\n --b-pin-input-cell-radius: 6px;\n --b-pin-input-cell-font-size: 1.125rem;\n --b-pin-input-cell-fg: rgba(0, 0, 0, 0.88);\n --b-pin-input-cell-shadow-focus: 0 0 0 2px rgba(5, 145, 255, 0.15);\n --b-pin-input-cell-disabled-bg: rgba(0, 0, 0, 0.04);\n --b-pin-input-cell-disabled-fg: rgba(0, 0, 0, 0.25);\n\n display: inline-flex;\n flex-wrap: nowrap;\n align-items: center;\n gap: var(--b-pin-input-cell-gap);\n font-family: inherit;\n}\n\n.b-pin-input--sm {\n --b-pin-input-cell-size: 2rem;\n --b-pin-input-cell-font-size: 0.95rem;\n --b-pin-input-cell-gap: 0.375rem;\n}\n\n.b-pin-input--lg {\n --b-pin-input-cell-size: 3rem;\n --b-pin-input-cell-font-size: 1.375rem;\n --b-pin-input-cell-gap: 0.625rem;\n}\n\n.b-pin-input__cell {\n width: var(--b-pin-input-cell-size);\n height: var(--b-pin-input-cell-size);\n padding: 0;\n margin: 0;\n text-align: center;\n font-size: var(--b-pin-input-cell-font-size);\n font-family: inherit;\n font-weight: 500;\n color: var(--b-pin-input-cell-fg);\n background: var(--b-pin-input-cell-bg);\n border: 1px solid var(--b-pin-input-cell-border-color);\n border-radius: var(--b-pin-input-cell-radius);\n outline: none;\n caret-color: var(--b-pin-input-cell-border-color-focus);\n transition:\n border-color 0.2s ease,\n box-shadow 0.2s ease,\n background-color 0.2s ease;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n\n.b-pin-input__cell::-webkit-outer-spin-button,\n.b-pin-input__cell::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.b-pin-input__cell:hover:not(:disabled) {\n border-color: var(--b-pin-input-cell-border-color-focus);\n}\n\n.b-pin-input__cell:focus-visible {\n border-color: var(--b-pin-input-cell-border-color-focus);\n box-shadow: var(--b-pin-input-cell-shadow-focus);\n}\n\n.b-pin-input--disabled .b-pin-input__cell,\n.b-pin-input__cell:disabled {\n background: var(--b-pin-input-cell-disabled-bg);\n color: var(--b-pin-input-cell-disabled-fg);\n cursor: not-allowed;\n}\n\n/* ─────────────────────────────────────────────\n Dark mode\n ───────────────────────────────────────────── */\n[data-prefers-color='dark'] .b-pin-input {\n --b-pin-input-cell-bg: #141414;\n --b-pin-input-cell-border-color: #424242;\n --b-pin-input-cell-border-color-focus: #1668dc;\n --b-pin-input-cell-fg: rgba(255, 255, 255, 0.88);\n --b-pin-input-cell-shadow-focus: 0 0 0 2px rgba(22, 104, 220, 0.18);\n --b-pin-input-cell-disabled-bg: rgba(255, 255, 255, 0.08);\n --b-pin-input-cell-disabled-fg: rgba(255, 255, 255, 0.25);\n}\n\n@media (prefers-color-scheme: dark) {\n [data-prefers-color='system'] .b-pin-input {\n --b-pin-input-cell-bg: #141414;\n --b-pin-input-cell-border-color: #424242;\n --b-pin-input-cell-border-color-focus: #1668dc;\n --b-pin-input-cell-fg: rgba(255, 255, 255, 0.88);\n --b-pin-input-cell-shadow-focus: 0 0 0 2px rgba(22, 104, 220, 0.18);\n --b-pin-input-cell-disabled-bg: rgba(255, 255, 255, 0.08);\n --b-pin-input-cell-disabled-fg: rgba(255, 255, 255, 0.25);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .b-pin-input__cell {\n transition: none;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCA,IAAM,IAAO,GAKP,IAAQ,EAAmB,GAAA,aAAiB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ADrB,EAyBE,SAAA;GAvBC,KAAK;;GACL,MAAe,MAAE;IAAqB,MAAI,EAAA,MAAS,KAAO;;GAK1D,OAAO;GACP,MAAM,EAAA;GACN,WAAW,EAAA;GACX,SAAS,EAAA;GACT,UAAU,EAAA;GACV,cAAc,MAAG,IAAA,kBAAA;GAClB,WAAU;GACV,OAAM;GACL,cAAqB,EAAA,SAAI,WAAA,SAAmC,IAAG,EAAA,MAAW,EAAA,WAAA,aAAkC,IAAG,EAAA,MAAW,EAAA;GAK1H,UAAK,MAAE,EAAY,GAAQ,EAAG;GAC9B,YAAO,MAAE,EAAc,GAAQ,EAAG;GAClC,UAAK,MAAE,EAAY,GAAQ,EAAG;GAC9B,SAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-system171.js","names":[],"sources":["../src/components/BPinInput/BPinInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useComponentId } from '@/composables/useComponentId.ts';\nimport { BCommonSize } from '@/types.ts';\nimport { computed, nextTick, onMounted, ref, watch } from 'vue';\n\ndefineOptions({ inheritAttrs: false });\n\nconst {\n length = 6,\n mask = false,\n type = 'number',\n size = BCommonSize.Medium,\n disabled = false,\n autoFocus = false,\n id,\n ariaLabel = 'PIN entry',\n} = defineProps<{\n /** Number of cells (digits/characters) in the PIN. @default 6 */\n length?: number;\n /** Render the value as bullets (uses `type=\"password\"` on each cell). @default false */\n mask?: boolean;\n /**\n * Allowed character class:\n * - `'number'` — digits 0-9 only (uses `inputmode=\"numeric\"` + `pattern=\"[0-9]*\"`).\n * - `'text'` — any character.\n * - `'alphanumeric'` — letters + digits only.\n * @default 'number'\n */\n type?: 'number' | 'text' | 'alphanumeric';\n /** Size preset applied to each cell. @default 'md' */\n size?: `${BCommonSize}`;\n /** Disable every cell. @default false */\n disabled?: boolean;\n /** Focus the first non-disabled cell on mount. @default false */\n autoFocus?: boolean;\n /** HTML id attribute applied to the wrapping group element. */\n id?: string;\n /** Accessible label for the wrapping `role=\"group\"` element. @default 'PIN entry' */\n ariaLabel?: string;\n}>();\n\nconst emit = defineEmits<{\n /** Fired once every cell is filled. The argument is the joined string. */\n complete: [value: string];\n}>();\n\nconst model = defineModel<string>({ default: '' });\n\nconst { componentUID } = useComponentId();\nconst groupId = computed(() => id ?? `b-pin-input-${componentUID.value}`);\n\n// ─────────────────────────────────────────────\n// Cell state\n// ─────────────────────────────────────────────\nconst cellRefs = ref<HTMLInputElement[]>([]);\n\nconst cells = computed<string[]>(() => {\n const value = model.value ?? '';\n const out: string[] = Array.from({ length });\n for (let i = 0; i < length; i++) {\n out[i] = value[i] ?? '';\n }\n return out;\n});\n\n// ─────────────────────────────────────────────\n// Filtering by `type`\n// ─────────────────────────────────────────────\nconst filterChar = (ch: string): string => {\n if (!ch) return '';\n if (type === 'number') return /[0-9]/.test(ch) ? ch : '';\n if (type === 'alphanumeric') return /[A-Za-z0-9]/.test(ch) ? ch : '';\n return ch.length === 1 ? ch : '';\n};\n\nconst filterString = (raw: string): string => {\n if (type === 'number') return (raw.match(/[0-9]/g) ?? []).join('');\n if (type === 'alphanumeric') return (raw.match(/[A-Za-z0-9]/g) ?? []).join('');\n return raw;\n};\n\nconst inputMode = computed<'numeric' | 'text'>(() => (type === 'number' ? 'numeric' : 'text'));\nconst cellPattern = computed<string | undefined>(() =>\n type === 'number' ? '[0-9]*' : undefined,\n);\nconst cellType = computed<'text' | 'password'>(() => (mask ? 'password' : 'text'));\n\n// ─────────────────────────────────────────────\n// Helpers — write to the model & emit\n// ─────────────────────────────────────────────\nconst updateModel = (next: string[]) => {\n // Trim trailing empties to keep the joined string compact, but preserve interior gaps\n // by replacing them with the empty string (still filled positions render).\n const joined = next.join('');\n if (joined === model.value) return;\n model.value = joined;\n if (joined.length === length && next.every((c) => c.length === 1)) {\n emit('complete', joined);\n }\n};\n\nconst focusCell = (index: number) => {\n const target = cellRefs.value[index];\n if (target && !target.disabled) {\n target.focus();\n target.select();\n }\n};\n\n// ─────────────────────────────────────────────\n// Event handlers\n// ─────────────────────────────────────────────\nconst handleInput = (event: Event, index: number) => {\n const target = event.target as HTMLInputElement;\n const raw = target.value;\n\n // The user may have typed a multi-char string (autofill, IME). Take the LAST character\n // so the cell always reflects what they just typed.\n const lastChar = raw.length > 0 ? raw[raw.length - 1] : '';\n const ch = filterChar(lastChar);\n\n // Force the DOM value to match our filtered char, even if Vue re-renders.\n target.value = ch;\n\n const next = [...cells.value];\n next[index] = ch;\n updateModel(next);\n\n if (ch && index < length - 1) {\n void nextTick(() => focusCell(index + 1));\n }\n};\n\nconst handleKeyDown = (event: KeyboardEvent, index: number) => {\n const key = event.key;\n\n if (key === 'Backspace') {\n const current = cells.value[index];\n if (current) {\n // Filled cell: clear it in place.\n const next = [...cells.value];\n next[index] = '';\n updateModel(next);\n // Don't preventDefault — let the browser's own backspace handling complete on the\n // already-empty input as well; we've already cleared model state.\n event.preventDefault();\n } else if (index > 0) {\n // Empty cell: hop back and clear that one too.\n event.preventDefault();\n const next = [...cells.value];\n next[index - 1] = '';\n updateModel(next);\n void nextTick(() => focusCell(index - 1));\n }\n return;\n }\n\n if (key === 'ArrowLeft' && index > 0) {\n event.preventDefault();\n focusCell(index - 1);\n return;\n }\n\n if (key === 'ArrowRight' && index < length - 1) {\n event.preventDefault();\n focusCell(index + 1);\n return;\n }\n\n if (key === 'Home') {\n event.preventDefault();\n focusCell(0);\n return;\n }\n\n if (key === 'End') {\n event.preventDefault();\n focusCell(length - 1);\n }\n};\n\nconst handlePaste = (event: ClipboardEvent, index: number) => {\n event.preventDefault();\n const pasted = event.clipboardData?.getData('text') ?? '';\n const filtered = filterString(pasted);\n if (!filtered) return;\n\n const next = [...cells.value];\n let writeAt = index;\n for (const ch of filtered) {\n if (writeAt >= length) break;\n next[writeAt] = ch;\n writeAt += 1;\n }\n updateModel(next);\n\n // Focus the next empty cell, or the last cell if all are filled.\n const focusIndex = Math.min(writeAt, length - 1);\n void nextTick(() => focusCell(focusIndex));\n};\n\nconst handleFocus = (event: FocusEvent) => {\n // Convenience: select the cell content on focus so typing replaces it.\n (event.target as HTMLInputElement).select();\n};\n\n// ─────────────────────────────────────────────\n// External model changes — sanitize against `type`\n// ─────────────────────────────────────────────\nwatch(\n () => model.value,\n (val) => {\n const filtered = filterString(val ?? '').slice(0, length);\n if (filtered !== val) {\n model.value = filtered;\n }\n },\n { immediate: true },\n);\n\n// ─────────────────────────────────────────────\n// autoFocus + exposed API\n// ─────────────────────────────────────────────\nconst focusFirst = () => {\n for (let i = 0; i < length; i++) {\n const el = cellRefs.value[i];\n if (el && !el.disabled) {\n el.focus();\n el.select();\n return;\n }\n }\n};\n\nconst focusLast = () => {\n for (let i = length - 1; i >= 0; i--) {\n const el = cellRefs.value[i];\n if (el && !el.disabled) {\n el.focus();\n el.select();\n return;\n }\n }\n};\n\nconst focus = (index?: number) => {\n if (index === undefined) {\n focusFirst();\n return;\n }\n if (index < 0 || index >= length) return;\n focusCell(index);\n};\n\nconst clear = () => {\n if (model.value !== '') model.value = '';\n void nextTick(() => focusFirst());\n};\n\nonMounted(() => {\n if (autoFocus) {\n void nextTick(() => focusFirst());\n }\n});\n\ndefineExpose({ focus, clear, focusFirst, focusLast });\n</script>\n\n<template>\n <div\n :id=\"groupId\"\n class=\"b-pin-input\"\n :class=\"[\n `b-pin-input--${size}`,\n {\n 'b-pin-input--disabled': disabled,\n },\n ]\"\n role=\"group\"\n :aria-label=\"ariaLabel\"\n :aria-disabled=\"disabled || undefined\"\n >\n <input\n v-for=\"(cellValue, idx) in cells\"\n :key=\"idx\"\n :ref=\"\n (el) => {\n if (el) cellRefs[idx] = el as HTMLInputElement;\n }\n \"\n :value=\"cellValue\"\n :type=\"cellType\"\n :inputmode=\"inputMode\"\n :pattern=\"cellPattern\"\n :disabled=\"disabled\"\n :autocomplete=\"idx === 0 ? 'one-time-code' : 'off'\"\n maxlength=\"1\"\n class=\"b-pin-input__cell\"\n :aria-label=\"\n type === 'number'\n ? `Digit ${idx + 1} of ${length}`\n : `Character ${idx + 1} of ${length}`\n \"\n @input=\"handleInput($event, idx)\"\n @keydown=\"handleKeyDown($event, idx)\"\n @paste=\"handlePaste($event, idx)\"\n @focus=\"handleFocus\"\n />\n </div>\n</template>\n\n<style>\n.b-pin-input {\n /* ── Tokens ── */\n --b-pin-input-cell-size: 2.5rem;\n --b-pin-input-cell-gap: 0.5rem;\n --b-pin-input-cell-bg: #ffffff;\n --b-pin-input-cell-border-color: #d9d9d9;\n --b-pin-input-cell-border-color-focus: #1677ff;\n --b-pin-input-cell-radius: 6px;\n --b-pin-input-cell-font-size: 1.125rem;\n --b-pin-input-cell-fg: rgba(0, 0, 0, 0.88);\n --b-pin-input-cell-shadow-focus: 0 0 0 2px rgba(5, 145, 255, 0.15);\n --b-pin-input-cell-disabled-bg: rgba(0, 0, 0, 0.04);\n --b-pin-input-cell-disabled-fg: rgba(0, 0, 0, 0.25);\n\n display: inline-flex;\n flex-wrap: nowrap;\n align-items: center;\n gap: var(--b-pin-input-cell-gap);\n font-family: inherit;\n}\n\n.b-pin-input--sm {\n --b-pin-input-cell-size: 2rem;\n --b-pin-input-cell-font-size: 0.95rem;\n --b-pin-input-cell-gap: 0.375rem;\n}\n\n.b-pin-input--lg {\n --b-pin-input-cell-size: 3rem;\n --b-pin-input-cell-font-size: 1.375rem;\n --b-pin-input-cell-gap: 0.625rem;\n}\n\n.b-pin-input__cell {\n width: var(--b-pin-input-cell-size);\n height: var(--b-pin-input-cell-size);\n padding: 0;\n margin: 0;\n text-align: center;\n font-size: var(--b-pin-input-cell-font-size);\n font-family: inherit;\n font-weight: 500;\n color: var(--b-pin-input-cell-fg);\n background: var(--b-pin-input-cell-bg);\n border: 1px solid var(--b-pin-input-cell-border-color);\n border-radius: var(--b-pin-input-cell-radius);\n outline: none;\n caret-color: var(--b-pin-input-cell-border-color-focus);\n transition:\n border-color 0.2s ease,\n box-shadow 0.2s ease,\n background-color 0.2s ease;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n\n.b-pin-input__cell::-webkit-outer-spin-button,\n.b-pin-input__cell::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.b-pin-input__cell:hover:not(:disabled) {\n border-color: var(--b-pin-input-cell-border-color-focus);\n}\n\n.b-pin-input__cell:focus-visible {\n border-color: var(--b-pin-input-cell-border-color-focus);\n box-shadow: var(--b-pin-input-cell-shadow-focus);\n}\n\n.b-pin-input--disabled .b-pin-input__cell,\n.b-pin-input__cell:disabled {\n background: var(--b-pin-input-cell-disabled-bg);\n color: var(--b-pin-input-cell-disabled-fg);\n cursor: not-allowed;\n}\n\n/* ─────────────────────────────────────────────\n Dark mode\n ───────────────────────────────────────────── */\n[data-prefers-color='dark'] .b-pin-input {\n --b-pin-input-cell-bg: #141414;\n --b-pin-input-cell-border-color: #424242;\n --b-pin-input-cell-border-color-focus: #1668dc;\n --b-pin-input-cell-fg: rgba(255, 255, 255, 0.88);\n --b-pin-input-cell-shadow-focus: 0 0 0 2px rgba(22, 104, 220, 0.18);\n --b-pin-input-cell-disabled-bg: rgba(255, 255, 255, 0.08);\n --b-pin-input-cell-disabled-fg: rgba(255, 255, 255, 0.25);\n}\n\n@media (prefers-color-scheme: dark) {\n [data-prefers-color='system'] .b-pin-input {\n --b-pin-input-cell-bg: #141414;\n --b-pin-input-cell-border-color: #424242;\n --b-pin-input-cell-border-color-focus: #1668dc;\n --b-pin-input-cell-fg: rgba(255, 255, 255, 0.88);\n --b-pin-input-cell-shadow-focus: 0 0 0 2px rgba(22, 104, 220, 0.18);\n --b-pin-input-cell-disabled-bg: rgba(255, 255, 255, 0.08);\n --b-pin-input-cell-disabled-fg: rgba(255, 255, 255, 0.25);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .b-pin-input__cell {\n transition: none;\n }\n}\n</style>\n"],"mappings":""}
|
package/dist/design-system172.js
CHANGED
|
@@ -1,9 +1,243 @@
|
|
|
1
|
-
import e from "./design-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
//#region src/components/
|
|
5
|
-
var
|
|
1
|
+
import { BPopconfirmPlacement as e, BPopconfirmTrigger as t } from "./design-system3.js";
|
|
2
|
+
import { useComponentId as n } from "./design-system10.js";
|
|
3
|
+
import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, nextTick as u, normalizeClass as d, normalizeStyle as f, onBeforeUnmount as ee, onMounted as te, openBlock as p, ref as m, renderSlot as h, toDisplayString as g, unref as ne, useId as re, watch as _ } from "vue";
|
|
4
|
+
//#region src/components/BPopconfirm/BPopconfirm.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var ie = ["aria-describedby", "id"], ae = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "b-popconfirm__arrow",
|
|
8
|
+
"aria-hidden": "true"
|
|
9
|
+
}, oe = { class: "b-popconfirm__inner" }, v = { class: "b-popconfirm__message" }, y = {
|
|
10
|
+
class: "b-popconfirm__icon",
|
|
11
|
+
"aria-hidden": "true"
|
|
12
|
+
}, b = { class: "b-popconfirm__text" }, se = {
|
|
13
|
+
class: "b-popconfirm__buttons",
|
|
14
|
+
role: "group"
|
|
15
|
+
}, x = "a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", S = /* @__PURE__ */ l({
|
|
16
|
+
__name: "BPopconfirm",
|
|
17
|
+
props: {
|
|
18
|
+
title: {},
|
|
19
|
+
description: {},
|
|
20
|
+
okText: { default: "Yes" },
|
|
21
|
+
cancelText: { default: "No" },
|
|
22
|
+
okType: { default: "primary" },
|
|
23
|
+
disabled: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
},
|
|
27
|
+
icon: {},
|
|
28
|
+
showCancel: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !0
|
|
31
|
+
},
|
|
32
|
+
trigger: { default: () => t.Click },
|
|
33
|
+
placement: { default: () => e.TopCenter },
|
|
34
|
+
arrow: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !0
|
|
37
|
+
},
|
|
38
|
+
mouseEnterDelay: { default: 100 },
|
|
39
|
+
mouseLeaveDelay: { default: 100 },
|
|
40
|
+
destroyTooltipOnHide: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
zIndex: { default: 1060 },
|
|
45
|
+
modelValue: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: () => void 0
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
emits: [
|
|
51
|
+
"confirm",
|
|
52
|
+
"cancel",
|
|
53
|
+
"openChange",
|
|
54
|
+
"update:modelValue"
|
|
55
|
+
],
|
|
56
|
+
setup(l, { expose: S, emit: C }) {
|
|
57
|
+
let w = C, { componentUID: ce } = n(), T = re(), E = `${T}-title`, D = `${T}-desc`, O = m(!1), k = i(() => l.modelValue === void 0 ? O.value : l.modelValue), A = m(!1), le = i(() => l.destroyTooltipOnHide ? k.value : A.value || k.value);
|
|
58
|
+
_(k, (e) => {
|
|
59
|
+
e && (A.value = !0);
|
|
60
|
+
});
|
|
61
|
+
let j = null, M = null;
|
|
62
|
+
function N() {
|
|
63
|
+
j &&= (clearTimeout(j), null), M &&= (clearTimeout(M), null);
|
|
64
|
+
}
|
|
65
|
+
function P(e = 0) {
|
|
66
|
+
l.disabled || (N(), !k.value && (e > 0 ? j = setTimeout(() => I(), e) : I()));
|
|
67
|
+
}
|
|
68
|
+
function F(e = 0) {
|
|
69
|
+
N(), k.value && (e > 0 ? M = setTimeout(() => L(), e) : L());
|
|
70
|
+
}
|
|
71
|
+
function I() {
|
|
72
|
+
B.value?.showPopover();
|
|
73
|
+
}
|
|
74
|
+
function L() {
|
|
75
|
+
B.value?.hidePopover();
|
|
76
|
+
}
|
|
77
|
+
function R(e) {
|
|
78
|
+
l.modelValue === void 0 ? O.value = e : w("update:modelValue", e), w("openChange", e);
|
|
79
|
+
}
|
|
80
|
+
let z = ({ newState: e }) => {
|
|
81
|
+
R(e === "open");
|
|
82
|
+
}, B = m(null), V = m(null), H = null;
|
|
83
|
+
function U() {
|
|
84
|
+
u(() => {
|
|
85
|
+
if (!B.value) return;
|
|
86
|
+
let e = B.value.querySelector(x);
|
|
87
|
+
e ? e.focus() : B.value.focus();
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function ue(e) {
|
|
91
|
+
if (e.key !== "Tab" || !B.value) return;
|
|
92
|
+
let t = Array.from(B.value.querySelectorAll(x));
|
|
93
|
+
if (t.length === 0) {
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
let n = t[0], r = t[t.length - 1];
|
|
98
|
+
e.shiftKey ? document.activeElement === n && (e.preventDefault(), r.focus()) : document.activeElement === r && (e.preventDefault(), n.focus());
|
|
99
|
+
}
|
|
100
|
+
_(k, (e) => {
|
|
101
|
+
e ? (H = document.activeElement, U()) : H && u(() => H?.focus());
|
|
102
|
+
});
|
|
103
|
+
function de(e) {
|
|
104
|
+
w("confirm", e), F();
|
|
105
|
+
}
|
|
106
|
+
function fe(e) {
|
|
107
|
+
w("cancel", e), F();
|
|
108
|
+
}
|
|
109
|
+
function W() {
|
|
110
|
+
l.disabled || (k.value ? F() : P());
|
|
111
|
+
}
|
|
112
|
+
function G() {
|
|
113
|
+
P(l.mouseEnterDelay);
|
|
114
|
+
}
|
|
115
|
+
function K() {
|
|
116
|
+
F(l.mouseLeaveDelay);
|
|
117
|
+
}
|
|
118
|
+
function q() {
|
|
119
|
+
P();
|
|
120
|
+
}
|
|
121
|
+
function J() {
|
|
122
|
+
F();
|
|
123
|
+
}
|
|
124
|
+
function Y(e) {
|
|
125
|
+
e.key === "Escape" && k.value && (e.preventDefault(), F());
|
|
126
|
+
}
|
|
127
|
+
function pe(e) {
|
|
128
|
+
e.key === "Escape" && (e.preventDefault(), F()), ue(e);
|
|
129
|
+
}
|
|
130
|
+
function me() {
|
|
131
|
+
l.trigger === t.Hover && N();
|
|
132
|
+
}
|
|
133
|
+
function X() {
|
|
134
|
+
l.trigger === t.Hover && F(l.mouseLeaveDelay);
|
|
135
|
+
}
|
|
136
|
+
function Z() {
|
|
137
|
+
let e = V.value;
|
|
138
|
+
if (e) switch (e.addEventListener("keydown", Y), l.trigger) {
|
|
139
|
+
case t.Click:
|
|
140
|
+
e.addEventListener("click", W);
|
|
141
|
+
break;
|
|
142
|
+
case t.Focus:
|
|
143
|
+
e.addEventListener("focusin", q), e.addEventListener("focusout", J);
|
|
144
|
+
break;
|
|
145
|
+
case t.Hover:
|
|
146
|
+
default:
|
|
147
|
+
e.addEventListener("mouseenter", G), e.addEventListener("mouseleave", K), e.addEventListener("focusin", q), e.addEventListener("focusout", J);
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function Q() {
|
|
152
|
+
let e = V.value;
|
|
153
|
+
e && (e.removeEventListener("keydown", Y), e.removeEventListener("click", W), e.removeEventListener("focusin", q), e.removeEventListener("focusout", J), e.removeEventListener("mouseenter", G), e.removeEventListener("mouseleave", K));
|
|
154
|
+
}
|
|
155
|
+
te(() => {
|
|
156
|
+
Z();
|
|
157
|
+
}), ee(() => {
|
|
158
|
+
Q(), N();
|
|
159
|
+
}), _(() => l.trigger, () => {
|
|
160
|
+
Q(), Z();
|
|
161
|
+
}), _(() => l.modelValue, (e) => {
|
|
162
|
+
e !== void 0 && (e ? B.value?.showPopover() : B.value?.hidePopover());
|
|
163
|
+
});
|
|
164
|
+
let $ = i(() => `--b-popconfirm-anchor-${ce.value}`), he = i(() => ({
|
|
165
|
+
[e.TopLeft]: "top-left",
|
|
166
|
+
[e.TopCenter]: "top-center",
|
|
167
|
+
[e.TopRight]: "top-right",
|
|
168
|
+
[e.RightTop]: "right-top",
|
|
169
|
+
[e.RightCenter]: "right-center",
|
|
170
|
+
[e.RightBottom]: "right-bottom",
|
|
171
|
+
[e.BottomRight]: "bottom-right",
|
|
172
|
+
[e.BottomCenter]: "bottom-center",
|
|
173
|
+
[e.BottomLeft]: "bottom-left",
|
|
174
|
+
[e.LeftBottom]: "left-bottom",
|
|
175
|
+
[e.LeftCenter]: "left-center",
|
|
176
|
+
[e.LeftTop]: "left-top"
|
|
177
|
+
})[l.placement] ?? "top-center"), ge = i(() => ({
|
|
178
|
+
primary: "b-popconfirm__btn--primary",
|
|
179
|
+
default: "b-popconfirm__btn--default",
|
|
180
|
+
dashed: "b-popconfirm__btn--dashed",
|
|
181
|
+
text: "b-popconfirm__btn--text",
|
|
182
|
+
link: "b-popconfirm__btn--link"
|
|
183
|
+
})[l.okType] ?? "b-popconfirm__btn--primary");
|
|
184
|
+
return S({
|
|
185
|
+
open: I,
|
|
186
|
+
close: L
|
|
187
|
+
}), (e, t) => (p(), o(r, null, [s("div", {
|
|
188
|
+
ref_key: "toggleRef",
|
|
189
|
+
ref: V,
|
|
190
|
+
class: "b-popconfirm__toggle",
|
|
191
|
+
style: f({ anchorName: $.value })
|
|
192
|
+
}, [h(e.$slots, "default")], 4), s("div", {
|
|
193
|
+
ref_key: "popconfirmRef",
|
|
194
|
+
ref: B,
|
|
195
|
+
popover: "manual",
|
|
196
|
+
class: d([
|
|
197
|
+
"b-popconfirm__content",
|
|
198
|
+
he.value,
|
|
199
|
+
{ "b-popconfirm__content--no-arrow": !l.arrow }
|
|
200
|
+
]),
|
|
201
|
+
style: f({
|
|
202
|
+
zIndex: l.zIndex,
|
|
203
|
+
positionAnchor: $.value
|
|
204
|
+
}),
|
|
205
|
+
role: "dialog",
|
|
206
|
+
"aria-modal": "false",
|
|
207
|
+
"aria-labelledby": E,
|
|
208
|
+
"aria-describedby": l.description ? D : void 0,
|
|
209
|
+
id: ne(T),
|
|
210
|
+
tabindex: "-1",
|
|
211
|
+
onToggle: z,
|
|
212
|
+
onKeydown: pe,
|
|
213
|
+
onMouseenter: me,
|
|
214
|
+
onMouseleave: X
|
|
215
|
+
}, [le.value || !l.destroyTooltipOnHide ? (p(), o(r, { key: 0 }, [l.arrow ? (p(), o("div", ae)) : a("", !0), s("div", oe, [s("div", v, [s("span", y, [h(e.$slots, "icon", {}, () => [t[0] ||= s("svg", {
|
|
216
|
+
viewBox: "0 0 24 24",
|
|
217
|
+
fill: "currentColor",
|
|
218
|
+
width: "16",
|
|
219
|
+
height: "16",
|
|
220
|
+
"aria-hidden": "true"
|
|
221
|
+
}, [s("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" })], -1)])]), s("div", b, [s("div", {
|
|
222
|
+
id: E,
|
|
223
|
+
class: "b-popconfirm__title"
|
|
224
|
+
}, [h(e.$slots, "title", {}, () => [c(g(l.title), 1)])]), l.description || e.$slots.description ? (p(), o("div", {
|
|
225
|
+
key: 0,
|
|
226
|
+
id: D,
|
|
227
|
+
class: "b-popconfirm__description"
|
|
228
|
+
}, [h(e.$slots, "description", {}, () => [c(g(l.description), 1)])])) : a("", !0)])]), s("div", se, [h(e.$slots, "cancelButton", {}, () => [l.showCancel ? (p(), o("button", {
|
|
229
|
+
key: 0,
|
|
230
|
+
type: "button",
|
|
231
|
+
class: "b-popconfirm__btn b-popconfirm__btn--default",
|
|
232
|
+
onClick: fe
|
|
233
|
+
}, g(l.cancelText), 1)) : a("", !0)]), h(e.$slots, "okButton", {}, () => [s("button", {
|
|
234
|
+
type: "button",
|
|
235
|
+
class: d(["b-popconfirm__btn", ge.value]),
|
|
236
|
+
onClick: de
|
|
237
|
+
}, g(l.okText), 3)])])])], 64)) : a("", !0)], 46, ie)], 64));
|
|
238
|
+
}
|
|
239
|
+
});
|
|
6
240
|
//#endregion
|
|
7
|
-
export {
|
|
241
|
+
export { S as default };
|
|
8
242
|
|
|
9
243
|
//# sourceMappingURL=design-system172.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-system172.js","names":[],"sources":["../src/components/BRadio/BRadioGroup.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed, provide, reactive, toRefs } from 'vue';\nimport BRadio from './BRadio.vue';\nimport BRadioButton from './BRadioButton.vue';\nimport { B_RADIO_GROUP_KEY, type BRadioOption } from './types';\n\n//#region Props\nconst {\n disabled = false,\n name = '',\n options = undefined,\n optionType = 'default',\n size = 'middle',\n buttonStyle = 'outline',\n block = false,\n} = defineProps<{\n /** Disable all radios in the group. */\n disabled?: boolean;\n /** The name property of all child input elements. */\n name?: string;\n /** Shorthand options to render radios from an array. */\n options?: BRadioOption[] | string[] | number[];\n /** Style type of radio: default or button. */\n optionType?: 'default' | 'button';\n /** Size of radio button (only works with button style). */\n size?: 'large' | 'middle' | 'small';\n /** Style of radio button appearance. */\n buttonStyle?: 'outline' | 'solid';\n /** Whether to fit the width of the parent container. */\n block?: boolean;\n}>();\n\n/**\n * Currently selected value.\n */\nconst model = defineModel<string | number>();\n\nconst emit = defineEmits<{\n change: [value: string | number | undefined, event?: Event];\n}>();\n//#endregion\n\n//#region Normalize options\nconst normalizedOptions = computed<BRadioOption[]>(() => {\n if (!options) return [];\n return options.map((opt) => {\n if (typeof opt === 'string' || typeof opt === 'number') {\n return { label: String(opt), value: opt };\n }\n return opt;\n });\n});\n//#endregion\n\n//#region Group context\nfunction setValue(val: string | number) {\n model.value = val;\n emit('change', val);\n}\n\nconst props = reactive({ disabled, name, size, optionType, buttonStyle });\nconst {\n disabled: disabledRef,\n name: nameRef,\n size: sizeRef,\n optionType: optionTypeRef,\n buttonStyle: buttonStyleRef,\n} = toRefs(props);\n\nprovide(B_RADIO_GROUP_KEY, {\n modelValue: computed(() => model.value),\n disabled: disabledRef,\n name: nameRef,\n size: sizeRef,\n optionType: optionTypeRef,\n buttonStyle: buttonStyleRef,\n setValue,\n});\n//#endregion\n\n//#region Computed component\nconst radioComponent = computed(() => (optionType === 'button' ? BRadioButton : BRadio));\n//#endregion\n</script>\n\n<template>\n <div\n class=\"b-radio-group b:inline-flex b:flex-wrap b:items-center\"\n :class=\"{\n 'b-radio-group--block b:flex b:w-full': block,\n 'b:gap-2': optionType !== 'button',\n 'b:gap-0': optionType === 'button',\n }\"\n role=\"radiogroup\"\n >\n <template v-if=\"normalizedOptions.length > 0\">\n <component\n :is=\"radioComponent\"\n v-for=\"opt in normalizedOptions\"\n :key=\"opt.value\"\n :value=\"opt.value\"\n :disabled=\"opt.disabled\"\n >\n {{ opt.label }}\n </component>\n </template>\n <slot v-else />\n </div>\n</template>\n\n<style scoped>\n.b-radio-group--block > * {\n flex: 1;\n}\n</style>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"design-system172.js","names":["$slots"],"sources":["../src/components/BPopconfirm/BPopconfirm.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useComponentId } from '@/composables/useComponentId.ts';\nimport { BPopconfirmPlacement, BPopconfirmTrigger } from '@/types.ts';\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, useId, watch } from 'vue';\n\n// ─────────────────────────────────────────────\n// Props & emits\n// ─────────────────────────────────────────────\nconst {\n title,\n description,\n okText = 'Yes',\n cancelText = 'No',\n okType = 'primary',\n disabled = false,\n icon: _icon,\n showCancel = true,\n trigger = BPopconfirmTrigger.Click,\n placement = BPopconfirmPlacement.TopCenter,\n arrow = true,\n mouseEnterDelay = 100,\n mouseLeaveDelay = 100,\n destroyTooltipOnHide = false,\n zIndex = 1060,\n modelValue = undefined,\n} = defineProps<{\n /** The confirmation question or text shown in the popconfirm. Also accepts the `title` slot. */\n title?: string;\n /** Additional description below the title. Also accepts the `description` slot. */\n description?: string;\n /** Text of the confirm button. */\n okText?: string;\n /** Text of the cancel button. */\n cancelText?: string;\n /** Button type of the confirm button: 'primary' | 'default' | 'dashed' | 'text' | 'link'. */\n okType?: 'primary' | 'default' | 'dashed' | 'text' | 'link';\n /** Whether the popconfirm is disabled (clicking trigger does nothing). */\n disabled?: boolean;\n /** Custom icon slot name override. When not provided, a default warning icon is used. */\n icon?: string;\n /** Whether to show the cancel button. */\n showCancel?: boolean;\n /** The event that triggers the popconfirm to open. */\n trigger?: `${BPopconfirmTrigger}`;\n /** Placement of the popconfirm relative to the target element. */\n placement?: `${BPopconfirmPlacement}`;\n /** Whether the popconfirm has an arrow pointing to the target. */\n arrow?: boolean;\n /** Delay in ms before showing on mouseenter. */\n mouseEnterDelay?: number;\n /** Delay in ms before hiding on mouseleave. */\n mouseLeaveDelay?: number;\n /** Whether to destroy the popconfirm DOM when hidden. */\n destroyTooltipOnHide?: boolean;\n /** z-index of the popconfirm. */\n zIndex?: number;\n /** Controlled visibility - bind with `v-model`. */\n modelValue?: boolean;\n}>();\n\nconst emit = defineEmits<{\n /** Emitted when the confirm button is clicked. Receives a callback to close programmatically. */\n (e: 'confirm', event: MouseEvent): void;\n /** Emitted when the cancel button is clicked. Receives a callback to close programmatically. */\n (e: 'cancel', event: MouseEvent): void;\n /** Emitted when the popconfirm visibility changes. */\n (e: 'openChange', open: boolean): void;\n /** v-model support. */\n (e: 'update:modelValue', value: boolean): void;\n}>();\n\ndefineSlots<{\n /** The target element that triggers the popconfirm. */\n default?(): unknown;\n /** Overrides the `title` prop with custom content. */\n title?(): unknown;\n /** Overrides the `description` prop with custom content. */\n description?(): unknown;\n /** Overrides the default warning icon. */\n icon?(): unknown;\n /** Overrides the confirm button. */\n okButton?(): unknown;\n /** Overrides the cancel button. */\n cancelButton?(): unknown;\n}>();\n\n// ─────────────────────────────────────────────\n// Internal state\n// ─────────────────────────────────────────────\nconst { componentUID } = useComponentId();\nconst popconfirmId = useId();\nconst titleId = `${popconfirmId}-title`;\nconst descId = `${popconfirmId}-desc`;\n\nconst internalOpen = ref(false);\nconst isOpen = computed(() => (modelValue !== undefined ? modelValue : internalOpen.value));\n\nconst hasBeenOpened = ref(false);\nconst shouldRender = computed(() => {\n if (destroyTooltipOnHide) return isOpen.value;\n return hasBeenOpened.value || isOpen.value;\n});\n\nwatch(isOpen, (val) => {\n if (val) hasBeenOpened.value = true;\n});\n\n// ─────────────────────────────────────────────\n// Visibility control\n// ─────────────────────────────────────────────\nlet showTimer: ReturnType<typeof setTimeout> | null = null;\nlet hideTimer: ReturnType<typeof setTimeout> | null = null;\n\nfunction clearTimers() {\n if (showTimer) {\n clearTimeout(showTimer);\n showTimer = null;\n }\n if (hideTimer) {\n clearTimeout(hideTimer);\n hideTimer = null;\n }\n}\n\nfunction requestOpen(delay = 0) {\n if (disabled) return;\n clearTimers();\n if (isOpen.value) return;\n if (delay > 0) {\n showTimer = setTimeout(() => doOpen(), delay);\n } else {\n doOpen();\n }\n}\n\nfunction requestClose(delay = 0) {\n clearTimers();\n if (!isOpen.value) return;\n if (delay > 0) {\n hideTimer = setTimeout(() => doClose(), delay);\n } else {\n doClose();\n }\n}\n\nfunction doOpen() {\n popconfirmRef.value?.showPopover();\n}\n\nfunction doClose() {\n popconfirmRef.value?.hidePopover();\n}\n\nfunction setOpen(val: boolean) {\n if (modelValue !== undefined) {\n emit('update:modelValue', val);\n } else {\n internalOpen.value = val;\n }\n emit('openChange', val);\n}\n\n// ─────────────────────────────────────────────\n// Popover toggle event\n// ─────────────────────────────────────────────\nconst onPopoverToggle = ({ newState }: ToggleEvent) => {\n setOpen(newState === 'open');\n};\n\n// ─────────────────────────────────────────────\n// Refs\n// ─────────────────────────────────────────────\nconst popconfirmRef = ref<HTMLDivElement | null>(null);\nconst toggleRef = ref<HTMLDivElement | null>(null);\n\n// ─────────────────────────────────────────────\n// Focus management\n// ─────────────────────────────────────────────\nlet previouslyFocusedElement: HTMLElement | null = null;\n\nconst focusableSelector =\n 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\nfunction focusFirstButton() {\n nextTick(() => {\n if (!popconfirmRef.value) return;\n const first = popconfirmRef.value.querySelector<HTMLElement>(focusableSelector);\n if (first) {\n first.focus();\n } else {\n popconfirmRef.value.focus();\n }\n });\n}\n\nfunction trapFocus(event: KeyboardEvent) {\n if (event.key !== 'Tab' || !popconfirmRef.value) return;\n\n const focusable = Array.from(\n popconfirmRef.value.querySelectorAll<HTMLElement>(focusableSelector),\n );\n if (focusable.length === 0) {\n event.preventDefault();\n return;\n }\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n\n if (event.shiftKey) {\n if (document.activeElement === first) {\n event.preventDefault();\n last.focus();\n }\n } else {\n if (document.activeElement === last) {\n event.preventDefault();\n first.focus();\n }\n }\n}\n\nwatch(isOpen, (val) => {\n if (val) {\n previouslyFocusedElement = document.activeElement as HTMLElement | null;\n focusFirstButton();\n } else {\n if (previouslyFocusedElement) {\n nextTick(() => previouslyFocusedElement?.focus());\n }\n }\n});\n\n// ─────────────────────────────────────────────\n// Button handlers\n// ─────────────────────────────────────────────\nfunction onConfirm(event: MouseEvent) {\n emit('confirm', event);\n requestClose();\n}\n\nfunction onCancel(event: MouseEvent) {\n emit('cancel', event);\n requestClose();\n}\n\n// ─────────────────────────────────────────────\n// Event handlers\n// ─────────────────────────────────────────────\nfunction onClick() {\n if (disabled) return;\n if (isOpen.value) {\n requestClose();\n } else {\n requestOpen();\n }\n}\n\nfunction onMouseEnter() {\n requestOpen(mouseEnterDelay);\n}\n\nfunction onMouseLeave() {\n requestClose(mouseLeaveDelay);\n}\n\nfunction onFocusIn() {\n requestOpen();\n}\n\nfunction onFocusOut() {\n requestClose();\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape' && isOpen.value) {\n event.preventDefault();\n requestClose();\n }\n}\n\nfunction onPopconfirmKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape') {\n event.preventDefault();\n requestClose();\n }\n trapFocus(event);\n}\n\n// ─────────────────────────────────────────────\n// Popconfirm hover (keep open when hovering content)\n// ─────────────────────────────────────────────\nfunction onPopconfirmMouseEnter() {\n if (trigger === BPopconfirmTrigger.Hover) {\n clearTimers();\n }\n}\n\nfunction onPopconfirmMouseLeave() {\n if (trigger === BPopconfirmTrigger.Hover) {\n requestClose(mouseLeaveDelay);\n }\n}\n\n// ─────────────────────────────────────────────\n// Event listener management\n// ─────────────────────────────────────────────\nfunction attachListeners() {\n const el = toggleRef.value;\n if (!el) return;\n\n el.addEventListener('keydown', onKeydown);\n\n switch (trigger) {\n case BPopconfirmTrigger.Click:\n el.addEventListener('click', onClick);\n break;\n case BPopconfirmTrigger.Focus:\n el.addEventListener('focusin', onFocusIn);\n el.addEventListener('focusout', onFocusOut);\n break;\n case BPopconfirmTrigger.Hover:\n default:\n el.addEventListener('mouseenter', onMouseEnter);\n el.addEventListener('mouseleave', onMouseLeave);\n el.addEventListener('focusin', onFocusIn);\n el.addEventListener('focusout', onFocusOut);\n break;\n }\n}\n\nfunction detachListeners() {\n const el = toggleRef.value;\n if (!el) return;\n\n el.removeEventListener('keydown', onKeydown);\n el.removeEventListener('click', onClick);\n el.removeEventListener('focusin', onFocusIn);\n el.removeEventListener('focusout', onFocusOut);\n el.removeEventListener('mouseenter', onMouseEnter);\n el.removeEventListener('mouseleave', onMouseLeave);\n}\n\nonMounted(() => {\n attachListeners();\n});\n\nonBeforeUnmount(() => {\n detachListeners();\n clearTimers();\n});\n\nwatch(\n () => trigger,\n () => {\n detachListeners();\n attachListeners();\n },\n);\n\n// Sync controlled v-model → popover state\nwatch(\n () => modelValue,\n (val) => {\n if (val === undefined) return;\n if (val) {\n popconfirmRef.value?.showPopover();\n } else {\n popconfirmRef.value?.hidePopover();\n }\n },\n);\n\n// ─────────────────────────────────────────────\n// Computed styles\n// ─────────────────────────────────────────────\nconst anchorName = computed(() => `--b-popconfirm-anchor-${componentUID.value}`);\n\nconst placementClass = computed(() => {\n const map: Record<string, string> = {\n [BPopconfirmPlacement.TopLeft]: 'top-left',\n [BPopconfirmPlacement.TopCenter]: 'top-center',\n [BPopconfirmPlacement.TopRight]: 'top-right',\n [BPopconfirmPlacement.RightTop]: 'right-top',\n [BPopconfirmPlacement.RightCenter]: 'right-center',\n [BPopconfirmPlacement.RightBottom]: 'right-bottom',\n [BPopconfirmPlacement.BottomRight]: 'bottom-right',\n [BPopconfirmPlacement.BottomCenter]: 'bottom-center',\n [BPopconfirmPlacement.BottomLeft]: 'bottom-left',\n [BPopconfirmPlacement.LeftBottom]: 'left-bottom',\n [BPopconfirmPlacement.LeftCenter]: 'left-center',\n [BPopconfirmPlacement.LeftTop]: 'left-top',\n };\n return map[placement] ?? 'top-center';\n});\n\nconst okButtonClass = computed(() => {\n const map: Record<string, string> = {\n primary: 'b-popconfirm__btn--primary',\n default: 'b-popconfirm__btn--default',\n dashed: 'b-popconfirm__btn--dashed',\n text: 'b-popconfirm__btn--text',\n link: 'b-popconfirm__btn--link',\n };\n return map[okType] ?? 'b-popconfirm__btn--primary';\n});\n\n// ─────────────────────────────────────────────\n// Public API\n// ─────────────────────────────────────────────\ndefineExpose({ open: doOpen, close: doClose });\n</script>\n\n<template>\n <div ref=\"toggleRef\" class=\"b-popconfirm__toggle\" :style=\"{ anchorName: anchorName }\">\n <slot />\n </div>\n\n <div\n ref=\"popconfirmRef\"\n popover=\"manual\"\n :class=\"[\n 'b-popconfirm__content',\n placementClass,\n { 'b-popconfirm__content--no-arrow': !arrow },\n ]\"\n :style=\"{ zIndex, positionAnchor: anchorName }\"\n role=\"dialog\"\n aria-modal=\"false\"\n :aria-labelledby=\"titleId\"\n :aria-describedby=\"description ? descId : undefined\"\n :id=\"popconfirmId\"\n tabindex=\"-1\"\n @toggle=\"onPopoverToggle\"\n @keydown=\"onPopconfirmKeydown\"\n @mouseenter=\"onPopconfirmMouseEnter\"\n @mouseleave=\"onPopconfirmMouseLeave\"\n >\n <template v-if=\"shouldRender || !destroyTooltipOnHide\">\n <div v-if=\"arrow\" class=\"b-popconfirm__arrow\" aria-hidden=\"true\" />\n <div class=\"b-popconfirm__inner\">\n <div class=\"b-popconfirm__message\">\n <span class=\"b-popconfirm__icon\" aria-hidden=\"true\">\n <slot name=\"icon\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n width=\"16\"\n height=\"16\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z\"\n />\n </svg>\n </slot>\n </span>\n <div class=\"b-popconfirm__text\">\n <div :id=\"titleId\" class=\"b-popconfirm__title\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div\n v-if=\"description || $slots.description\"\n :id=\"descId\"\n class=\"b-popconfirm__description\"\n >\n <slot name=\"description\">{{ description }}</slot>\n </div>\n </div>\n </div>\n <div class=\"b-popconfirm__buttons\" role=\"group\">\n <slot name=\"cancelButton\">\n <button\n v-if=\"showCancel\"\n type=\"button\"\n class=\"b-popconfirm__btn b-popconfirm__btn--default\"\n @click=\"onCancel\"\n >\n {{ cancelText }}\n </button>\n </slot>\n <slot name=\"okButton\">\n <button type=\"button\" :class=\"['b-popconfirm__btn', okButtonClass]\" @click=\"onConfirm\">\n {{ okText }}\n </button>\n </slot>\n </div>\n </div>\n </template>\n </div>\n</template>\n\n<style>\n/* ────────────────────────────────────────────\n CSS Custom Properties (tokens)\n ──────────────────────────────────────────── */\n:root {\n --b-popconfirm-bg: #fff;\n --b-popconfirm-color: oklch(25% 0 0);\n --b-popconfirm-font-size: 0.875rem;\n --b-popconfirm-line-height: 1.5;\n --b-popconfirm-padding-x: 0.75rem;\n --b-popconfirm-padding-y: 0.75rem;\n --b-popconfirm-border-radius: 0.5rem;\n --b-popconfirm-max-width: 320px;\n --b-popconfirm-arrow-size: 8px;\n --b-popconfirm-arrow-color: #fff;\n --b-popconfirm-gap: 8px;\n --b-popconfirm-transition-duration: 200ms;\n --b-popconfirm-shadow:\n 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05);\n --b-popconfirm-icon-color: oklch(75% 0.15 85);\n --b-popconfirm-title-font-weight: 600;\n --b-popconfirm-description-color: oklch(45% 0 0);\n --b-popconfirm-btn-font-size: 0.8125rem;\n --b-popconfirm-btn-padding-x: 0.5rem;\n --b-popconfirm-btn-padding-y: 0.125rem;\n --b-popconfirm-btn-border-radius: 0.25rem;\n --b-popconfirm-btn-primary-bg: oklch(55% 0.2 260);\n --b-popconfirm-btn-primary-color: #fff;\n --b-popconfirm-btn-default-bg: transparent;\n --b-popconfirm-btn-default-color: oklch(25% 0 0);\n --b-popconfirm-btn-default-border: oklch(80% 0 0);\n}\n\n/* ── Dark mode ── */\n[data-prefers-color='dark'] {\n --b-popconfirm-bg: oklch(22% 0 0);\n --b-popconfirm-color: oklch(90% 0 0);\n --b-popconfirm-arrow-color: oklch(22% 0 0);\n --b-popconfirm-shadow:\n 0 6px 16px 0 rgba(0, 0, 0, 0.24), 0 3px 6px -4px rgba(0, 0, 0, 0.36),\n 0 9px 28px 8px rgba(0, 0, 0, 0.2);\n --b-popconfirm-icon-color: oklch(80% 0.15 85);\n --b-popconfirm-description-color: oklch(65% 0 0);\n --b-popconfirm-btn-primary-bg: oklch(55% 0.2 260);\n --b-popconfirm-btn-default-color: oklch(90% 0 0);\n --b-popconfirm-btn-default-border: oklch(40% 0 0);\n}\n\n@media (prefers-color-scheme: dark) {\n [data-prefers-color='system'] {\n --b-popconfirm-bg: oklch(22% 0 0);\n --b-popconfirm-color: oklch(90% 0 0);\n --b-popconfirm-arrow-color: oklch(22% 0 0);\n --b-popconfirm-shadow:\n 0 6px 16px 0 rgba(0, 0, 0, 0.24), 0 3px 6px -4px rgba(0, 0, 0, 0.36),\n 0 9px 28px 8px rgba(0, 0, 0, 0.2);\n --b-popconfirm-icon-color: oklch(80% 0.15 85);\n --b-popconfirm-description-color: oklch(65% 0 0);\n --b-popconfirm-btn-primary-bg: oklch(55% 0.2 260);\n --b-popconfirm-btn-default-color: oklch(90% 0 0);\n --b-popconfirm-btn-default-border: oklch(40% 0 0);\n }\n}\n\n/* ─────────────────────────────────────────────\n Toggle wrapper\n ───────────────────────────────────────────── */\n.b-popconfirm__toggle {\n display: inline-block;\n}\n\n/* ─────────────────────────────────────────────\n Popconfirm content (popover)\n ───────────────────────────────────────────── */\n.b-popconfirm__content {\n /* Reset popover defaults */\n position: absolute;\n border: none;\n padding: 0;\n margin: 0;\n background: transparent;\n overflow: visible;\n max-width: var(--b-popconfirm-max-width);\n box-sizing: border-box;\n pointer-events: auto;\n\n /* Animation and visibility */\n transition:\n display var(--b-popconfirm-transition-duration),\n opacity var(--b-popconfirm-transition-duration);\n transition-behavior: allow-discrete;\n opacity: 0;\n\n &:popover-open {\n opacity: 1;\n\n @starting-style {\n opacity: 0;\n }\n }\n\n /* ── Placement: Top ── */\n &.top-left {\n inset: auto;\n bottom: anchor(top);\n left: anchor(left);\n margin-bottom: var(--b-popconfirm-gap);\n }\n &.top-center {\n inset: auto;\n bottom: anchor(top);\n justify-self: anchor-center;\n margin-bottom: var(--b-popconfirm-gap);\n }\n &.top-right {\n inset: auto;\n bottom: anchor(top);\n right: anchor(right);\n margin-bottom: var(--b-popconfirm-gap);\n }\n\n /* ── Placement: Right ── */\n &.right-top {\n inset: auto;\n top: anchor(top);\n left: anchor(right);\n margin-left: var(--b-popconfirm-gap);\n }\n &.right-center {\n inset: auto;\n align-self: anchor-center;\n left: anchor(right);\n margin-left: var(--b-popconfirm-gap);\n }\n &.right-bottom {\n inset: auto;\n bottom: anchor(bottom);\n left: anchor(right);\n margin-left: var(--b-popconfirm-gap);\n }\n\n /* ── Placement: Bottom ── */\n &.bottom-right {\n inset: auto;\n top: anchor(bottom);\n right: anchor(right);\n margin-top: var(--b-popconfirm-gap);\n }\n &.bottom-center {\n inset: auto;\n top: anchor(bottom);\n justify-self: anchor-center;\n margin-top: var(--b-popconfirm-gap);\n }\n &.bottom-left {\n inset: auto;\n top: anchor(bottom);\n left: anchor(left);\n margin-top: var(--b-popconfirm-gap);\n }\n\n /* ── Placement: Left ── */\n &.left-bottom {\n inset: auto;\n bottom: anchor(bottom);\n right: anchor(left);\n margin-right: var(--b-popconfirm-gap);\n }\n &.left-center {\n inset: auto;\n align-self: anchor-center;\n right: anchor(left);\n margin-right: var(--b-popconfirm-gap);\n }\n &.left-top {\n inset: auto;\n top: anchor(top);\n right: anchor(left);\n margin-right: var(--b-popconfirm-gap);\n }\n}\n\n/* ─────────────────────────────────────────────\n Inner content\n ───────────────────────────────────────────── */\n.b-popconfirm__inner {\n background: var(--b-popconfirm-bg);\n color: var(--b-popconfirm-color);\n font-size: var(--b-popconfirm-font-size);\n line-height: var(--b-popconfirm-line-height);\n padding: var(--b-popconfirm-padding-y) var(--b-popconfirm-padding-x);\n border-radius: var(--b-popconfirm-border-radius);\n box-shadow: var(--b-popconfirm-shadow);\n word-wrap: break-word;\n}\n\n/* ─────────────────────────────────────────────\n Message row (icon + text)\n ───────────────────────────────────────────── */\n.b-popconfirm__message {\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n margin-bottom: 0.5rem;\n}\n\n.b-popconfirm__icon {\n flex-shrink: 0;\n color: var(--b-popconfirm-icon-color);\n line-height: 1;\n margin-top: 0.125rem;\n}\n\n.b-popconfirm__text {\n flex: 1;\n min-width: 0;\n}\n\n.b-popconfirm__title {\n font-weight: var(--b-popconfirm-title-font-weight);\n}\n\n.b-popconfirm__description {\n color: var(--b-popconfirm-description-color);\n margin-top: 0.25rem;\n font-size: 0.8125rem;\n}\n\n/* ─────────────────────────────────────────────\n Buttons\n ───────────────────────────────────────────── */\n.b-popconfirm__buttons {\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n}\n\n.b-popconfirm__btn {\n cursor: pointer;\n font-size: var(--b-popconfirm-btn-font-size);\n line-height: 1.5;\n padding: var(--b-popconfirm-btn-padding-y) var(--b-popconfirm-btn-padding-x);\n border-radius: var(--b-popconfirm-btn-border-radius);\n border: 1px solid transparent;\n font-family: inherit;\n transition: opacity 150ms;\n\n &:hover {\n opacity: 0.85;\n }\n\n &:focus-visible {\n outline: 2px solid oklch(55% 0.2 260);\n outline-offset: 1px;\n }\n}\n\n.b-popconfirm__btn--primary {\n background: var(--b-popconfirm-btn-primary-bg);\n color: var(--b-popconfirm-btn-primary-color);\n}\n\n.b-popconfirm__btn--default {\n background: var(--b-popconfirm-btn-default-bg);\n color: var(--b-popconfirm-btn-default-color);\n border-color: var(--b-popconfirm-btn-default-border);\n}\n\n.b-popconfirm__btn--dashed {\n background: var(--b-popconfirm-btn-default-bg);\n color: var(--b-popconfirm-btn-default-color);\n border-color: var(--b-popconfirm-btn-default-border);\n border-style: dashed;\n}\n\n.b-popconfirm__btn--text {\n background: transparent;\n color: var(--b-popconfirm-btn-default-color);\n border: none;\n}\n\n.b-popconfirm__btn--link {\n background: transparent;\n color: var(--b-popconfirm-btn-primary-bg);\n border: none;\n text-decoration: underline;\n}\n\n/* ─────────────────────────────────────────────\n Arrow\n ───────────────────────────────────────────── */\n.b-popconfirm__arrow {\n position: absolute;\n width: var(--b-popconfirm-arrow-size);\n height: var(--b-popconfirm-arrow-size);\n background: var(--b-popconfirm-arrow-color);\n transform: rotate(45deg);\n pointer-events: none;\n}\n\n/* Arrow positioning for top placements */\n.b-popconfirm__content.top-left .b-popconfirm__arrow,\n.b-popconfirm__content.top-center .b-popconfirm__arrow,\n.b-popconfirm__content.top-right .b-popconfirm__arrow {\n bottom: calc(var(--b-popconfirm-arrow-size) / -2);\n left: 50%;\n margin-left: calc(var(--b-popconfirm-arrow-size) / -2);\n}\n\n/* Arrow positioning for bottom placements */\n.b-popconfirm__content.bottom-left .b-popconfirm__arrow,\n.b-popconfirm__content.bottom-center .b-popconfirm__arrow,\n.b-popconfirm__content.bottom-right .b-popconfirm__arrow {\n top: calc(var(--b-popconfirm-arrow-size) / -2);\n left: 50%;\n margin-left: calc(var(--b-popconfirm-arrow-size) / -2);\n}\n\n/* Arrow positioning for right placements */\n.b-popconfirm__content.right-top .b-popconfirm__arrow,\n.b-popconfirm__content.right-center .b-popconfirm__arrow,\n.b-popconfirm__content.right-bottom .b-popconfirm__arrow {\n left: calc(var(--b-popconfirm-arrow-size) / -2);\n top: 50%;\n margin-top: calc(var(--b-popconfirm-arrow-size) / -2);\n}\n\n/* Arrow positioning for left placements */\n.b-popconfirm__content.left-top .b-popconfirm__arrow,\n.b-popconfirm__content.left-center .b-popconfirm__arrow,\n.b-popconfirm__content.left-bottom .b-popconfirm__arrow {\n right: calc(var(--b-popconfirm-arrow-size) / -2);\n top: 50%;\n margin-top: calc(var(--b-popconfirm-arrow-size) / -2);\n}\n\n/* ─────────────────────────────────────────────\n Position fallbacks (auto-adjust overflow)\n ───────────────────────────────────────────── */\n@position-try --b-popconfirm-top-center {\n inset: auto;\n bottom: anchor(top);\n justify-self: anchor-center;\n margin-bottom: var(--b-popconfirm-gap);\n}\n\n@position-try --b-popconfirm-bottom-center {\n inset: auto;\n top: anchor(bottom);\n justify-self: anchor-center;\n margin-top: var(--b-popconfirm-gap);\n}\n\n@position-try --b-popconfirm-right-center {\n inset: auto;\n align-self: anchor-center;\n left: anchor(right);\n margin-left: var(--b-popconfirm-gap);\n}\n\n@position-try --b-popconfirm-left-center {\n inset: auto;\n align-self: anchor-center;\n right: anchor(left);\n margin-right: var(--b-popconfirm-gap);\n}\n\n/* ── Reduced motion ── */\n@media (prefers-reduced-motion: reduce) {\n .b-popconfirm__content {\n transition-duration: 0ms;\n }\n\n .b-popconfirm__btn {\n transition-duration: 0ms;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;GAoLM,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAzHF,IAAM,IAAO,GA6BP,EAAE,qBAAiB,GAAgB,EACnC,IAAe,IAAO,EACtB,IAAU,GAAG,EAAa,SAC1B,IAAS,GAAG,EAAa,QAEzB,IAAe,EAAI,GAAM,EACzB,IAAS,QAAgB,EAAA,eAAe,KAAA,IAAyB,EAAa,QAA1B,EAAA,WAAiC,EAErF,IAAgB,EAAI,GAAM,EAC1B,KAAe,QACf,EAAA,uBAA6B,EAAO,QACjC,EAAc,SAAS,EAAO,MACrC;AAEF,IAAM,IAAS,MAAQ;AACrB,GAAI,MAA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