(),
6 | modelValue: {
7 | type: [String, Object, Number, Array, undefined],
8 | },
9 | color: {
10 | type: String,
11 | default: 'indigo',
12 | },
13 | placeholder: {
14 | type: String,
15 | default: '',
16 | },
17 | inline: {
18 | type: Boolean,
19 | default: false,
20 | },
21 | inputProps: {
22 | type: Object,
23 | default: () => {},
24 | },
25 | }
26 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagAE.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagAF.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagAG.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagAL.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagAM.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagAQ.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagAR.vue:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagAS.vue:
--------------------------------------------------------------------------------
1 |
2 |
23 |
24 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagAT.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagAW.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagAX.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagAZ.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBB.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBD.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBE.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBF.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBG.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBH.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBI.vue:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBJ.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBO.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBQ.vue:
--------------------------------------------------------------------------------
1 |
2 |
26 |
27 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBR.vue:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBS.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBT.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBV.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBW.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBY.vue:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagBZ.vue:
--------------------------------------------------------------------------------
1 |
2 |
28 |
29 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCA.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCD.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCF.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCG.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCH.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCI.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCL.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCM.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCN.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCO.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCR.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCU.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCW.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagCZ.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagDE.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagDJ.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagDK.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagDO.vue:
--------------------------------------------------------------------------------
1 |
2 |
37 |
38 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagDZ.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagEC.vue:
--------------------------------------------------------------------------------
1 |
2 |
29 |
30 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagEE.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagEG.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagEH.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagER.vue:
--------------------------------------------------------------------------------
1 |
2 |
43 |
44 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagES.vue:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagET.vue:
--------------------------------------------------------------------------------
1 |
2 |
23 |
24 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagFI.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagFJ.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagFM.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagFO.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagFR.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGA.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGE.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGEOS.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGF.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGG.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGH.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGL.vue:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGM.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGN.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGP.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGR.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGT.vue:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGW.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagGY.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagHN.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagHT.vue:
--------------------------------------------------------------------------------
1 |
2 |
34 |
35 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagHU.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagID.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagIE.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagIL.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagIN.vue:
--------------------------------------------------------------------------------
1 |
2 |
31 |
32 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagIQ.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagIS.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagIT.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagJE.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagJM.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagJO.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagJP.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagKG.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagKH.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagKN.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagKP.vue:
--------------------------------------------------------------------------------
1 |
2 |
23 |
24 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagKW.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagLA.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagLB.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagLC.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagLI.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagLR.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagLS.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagLT.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagLU.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagLV.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagLY.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMA.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMC.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMD.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMF.vue:
--------------------------------------------------------------------------------
1 |
2 |
23 |
24 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMG.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMH.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMK.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagML.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMM.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMN.vue:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMP.vue:
--------------------------------------------------------------------------------
1 |
2 |
32 |
33 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMR.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMT.vue:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMU.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMV.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMW.vue:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMX.vue:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMY.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagMZ.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagNA.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagNC.vue:
--------------------------------------------------------------------------------
1 |
2 |
36 |
37 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagNE.vue:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagNF.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagNG.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagNI.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagNL.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagNO.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagNP.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagNR.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagOM.vue:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagPA.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagPE.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagPF.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagPH.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagPK.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagPL.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagPM.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagPR.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagPS.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagPT.vue:
--------------------------------------------------------------------------------
1 |
2 |
23 |
24 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagPW.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagPY.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagQA.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagRE.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagRO.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagRU.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagRW.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSB.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSC.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSD.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSE.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSI.vue:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSJ.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSL.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSN.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSO.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSR.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSS.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagST.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSV.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSX.vue:
--------------------------------------------------------------------------------
1 |
2 |
28 |
29 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSY.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagSZ.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagTD.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagTF.vue:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagTG.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagTH.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagTK.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagTL.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagTN.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagTO.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagTR.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagTT.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagTW.vue:
--------------------------------------------------------------------------------
1 |
2 |
23 |
24 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagTZ.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagUA.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagUY.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagVA.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagVC.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagVE.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagVN.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagVU.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagWF.vue:
--------------------------------------------------------------------------------
1 |
2 |
23 |
24 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagWS.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagYE.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagZA.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/icons/flags/FlagZM.vue:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/misc/client-only.vue:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/misc/fragment.vue:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/misc/text-placeholder.vue:
--------------------------------------------------------------------------------
1 |
17 |
18 |
24 |
25 |
26 |
27 |
28 | {{ placeholder }}
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/misc/transitionable.vue:
--------------------------------------------------------------------------------
1 |
17 |
18 |
24 |
25 |
26 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/rich-select/partials/clear-button.vue:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/components/rich-select/partials/trigger-tags.vue:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
16 |
21 |
22 |
26 |
27 |
28 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/config/index.ts:
--------------------------------------------------------------------------------
1 | export * from './common-classes'
2 | export * from './popper-options'
3 | export * from './transitions'
4 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/config/transitions.ts:
--------------------------------------------------------------------------------
1 | export const enterAndLeave = {
2 | enterActiveClass: 'transition-opacity duration-100 ease-out',
3 | enterFromClass: 'transform scale-95 opacity-0',
4 | enterToClass: 'transform scale-100 opacity-100',
5 | leaveActiveClass: 'transition-opacity duration-100 ease-in',
6 | leaveFromClass: 'transform scale-100 opacity-100',
7 | leaveToClass: 'transform scale-95 opacity-0',
8 | }
9 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/addToArray.ts:
--------------------------------------------------------------------------------
1 | const addToArray = >(arr: any, value: any): P => {
2 | if (!Array.isArray(arr)) {
3 | return [value] as P
4 | }
5 |
6 | return [...arr, value] as P
7 | }
8 |
9 | export default addToArray
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/debounce.ts:
--------------------------------------------------------------------------------
1 | import type { DebounceFn, DebouncedFn } from '../types'
2 |
3 | const debounce = (func: (...args: any[]) => void, wait = 200): DebouncedFn => {
4 | let timeout: ReturnType | undefined
5 |
6 | const cancel: () => void = () => {
7 | if (timeout) {
8 | clearTimeout(timeout)
9 | }
10 | }
11 |
12 | const debounceFn: DebounceFn = (...args: any[]) => {
13 | cancel()
14 |
15 | timeout = setTimeout(() => {
16 | timeout = undefined
17 | func(args)
18 | }, wait)
19 |
20 | if (!wait) {
21 | func(args)
22 | }
23 | }
24 |
25 | return Object.assign(debounceFn, { cancel })
26 | }
27 |
28 | export default debounce
29 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/elementIsTargetOrTargetChild.ts:
--------------------------------------------------------------------------------
1 | const elementIsTargetOrTargetChild = (target: EventTarget | null, wrapper: HTMLElement): boolean => {
2 | if (!(target instanceof Element)) {
3 | return false
4 | }
5 |
6 | return wrapper.contains(target)
7 | }
8 |
9 | export default elementIsTargetOrTargetChild
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/filterOptions.ts:
--------------------------------------------------------------------------------
1 | import type { NormalizedOption, NormalizedOptions } from '../types'
2 |
3 | const filterOptions = (options: NormalizedOptions, query: string): NormalizedOptions => {
4 | if (query === '') {
5 | return options
6 | }
7 |
8 | return options
9 | .map((option: NormalizedOption): NormalizedOption => {
10 | if (option.children) {
11 | const newOption: NormalizedOption = {
12 | ...option,
13 | ...{
14 | children: filterOptions(option.children, query),
15 | },
16 | }
17 | return newOption
18 | }
19 |
20 | return option
21 | }).filter((option: NormalizedOption): boolean => {
22 | const foundText = String(option.text)
23 | .toUpperCase()
24 | .trim()
25 | .includes(query.toUpperCase().trim())
26 |
27 | const hasChildren = option.children && option.children.length > 0
28 |
29 | return hasChildren || foundText
30 | })
31 | }
32 |
33 | export default filterOptions
34 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/firstOf.ts:
--------------------------------------------------------------------------------
1 | const firstOf = (object: object | string []) => {
2 | // @ts-expect-error
3 | return object[Object.keys(object)[0]]
4 | }
5 | export default firstOf
6 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/flattenOptions.ts:
--------------------------------------------------------------------------------
1 | import type { NormalizedOption, NormalizedOptions } from '../types'
2 |
3 | const flattenOptions = (options: NormalizedOptions): NormalizedOptions => options.flatMap((option: NormalizedOption) => {
4 | if (option.children) {
5 | return flattenOptions(option.children)
6 | }
7 |
8 | return option
9 | })
10 |
11 | export default flattenOptions
12 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/get.ts:
--------------------------------------------------------------------------------
1 | const get = (object: T, path: string | number | symbol, defaultValue?: unknown): K | undefined => {
2 | const result = String(path)
3 | .replace(/\[/g, '.')
4 | .replace(/\]/g, '')
5 | .split('.')
6 | .reduce((objectSoFar: T | any, step: string) => {
7 | if (typeof objectSoFar === 'object' || Array.isArray(objectSoFar)) {
8 | return objectSoFar[step]
9 | }
10 |
11 | return undefined
12 | }, object)
13 |
14 | return result === undefined ? defaultValue : result
15 | }
16 |
17 | export default get
18 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/getFocusableElements.ts:
--------------------------------------------------------------------------------
1 | const getFocusableElements = (element: HTMLElement): Array => Array
2 | .from(element.querySelectorAll(
3 | 'a, button, input, textarea, select, details, [contenteditable], [tabindex]:not([tabindex="-1"])',
4 | ))
5 | .filter(el => !el.hasAttribute('disabled')) as Array
6 |
7 | export default getFocusableElements
8 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/hasProperty.ts:
--------------------------------------------------------------------------------
1 | const hasProperty = (obj: X | undefined, prop: Y): obj is X & Record => obj !== null && typeof obj === 'object' && Object.prototype.hasOwnProperty.call(obj, prop)
2 |
3 | export default hasProperty
4 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/hasSlot.ts:
--------------------------------------------------------------------------------
1 | import type { Slot, VNode } from 'vue'
2 | import { Comment, Text } from 'vue'
3 |
4 | export default function hasSlot(slot: Slot | undefined, slotProps = {}): boolean {
5 | if (!slot)
6 | return false
7 |
8 | return slot(slotProps).some((vnode: VNode) => {
9 | if (vnode.type === Comment)
10 | return false
11 |
12 | if (Array.isArray(vnode.children) && !vnode.children.length)
13 | return false
14 |
15 | return (
16 | vnode.type !== Text
17 | || (typeof vnode.children === 'string' && vnode.children.trim() !== '')
18 | )
19 | })
20 | }
21 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/isEqual.ts:
--------------------------------------------------------------------------------
1 | const isEqual = (a: unknown, b: unknown): boolean => JSON.stringify(a) === JSON.stringify(b)
2 | export default isEqual
3 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/isNumber.ts:
--------------------------------------------------------------------------------
1 | const isNumber = (value: unknown): boolean => {
2 | if (value === null) {
3 | return false
4 | }
5 |
6 | return ['number'].includes(typeof value)
7 | }
8 |
9 | export default isNumber
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/isPrimitive.ts:
--------------------------------------------------------------------------------
1 | const isPrimitive = (value: unknown): boolean => {
2 | if (value === null) {
3 | return true
4 | }
5 |
6 | return !['array', 'function', 'object'].includes(typeof value)
7 | }
8 |
9 | export default isPrimitive
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/isTouchOnlyDevice.ts:
--------------------------------------------------------------------------------
1 | const isTouchOnlyDevice = (w?: Window): boolean => {
2 | if (w === undefined) {
3 | if (window === undefined) {
4 | return false
5 | }
6 |
7 | w = window
8 | }
9 |
10 | return !!(w.matchMedia && w.matchMedia('(any-hover: none)').matches)
11 | }
12 |
13 | export default isTouchOnlyDevice
14 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/normalizeMeasure.ts:
--------------------------------------------------------------------------------
1 | import type { Measure } from '../types'
2 |
3 | const normalizeMeasure = (measure?: Measure | null | undefined): string | undefined => {
4 | if (measure === null || measure === undefined) {
5 | return undefined
6 | }
7 |
8 | if (typeof measure === 'number') {
9 | return `${measure}px`
10 | }
11 |
12 | if (String(Number(measure)) === measure) {
13 | return `${Number(measure)}px`
14 | }
15 |
16 | return measure
17 | }
18 |
19 | export default normalizeMeasure
20 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/normalizedOptionIsDisabled.ts:
--------------------------------------------------------------------------------
1 | import type { NormalizedOption } from '../types'
2 |
3 | const normalizedOptionIsDisabled = (option: NormalizedOption): boolean => option.disabled === true || option.disabled === 'disabled'
4 |
5 | export default normalizedOptionIsDisabled
6 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/objectToArrayMap.ts:
--------------------------------------------------------------------------------
1 | const objectToArrayMap = (initialObject: object, toKey: string, toValue: string): { [key: string]: unknown } => {
2 | return Object.fromEntries(Object.entries(initialObject).map(([key, value]) => [value[toKey], value[toValue]]))
3 | }
4 |
5 | export default objectToArrayMap
6 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/pick.ts:
--------------------------------------------------------------------------------
1 | const pick = (object: T, condition: (value: T[K], key: K) => boolean = value => !!value): T => {
2 | const newObject = { ...object }
3 |
4 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment
5 | // @ts-expect-error
6 | Object.keys(object)
7 | .filter(key => !condition(newObject[key as K], key as K))
8 | .forEach(key => delete newObject[key as K])
9 |
10 | return newObject
11 | }
12 |
13 | export default pick
14 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/promisify.ts:
--------------------------------------------------------------------------------
1 | const promisify = (value: Promise
| P): Promise
=> {
2 | if (value instanceof Promise) {
3 | return value
4 | }
5 |
6 | return Promise.resolve(value)
7 | }
8 |
9 | export default promisify
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/promisifyFunctionResult.ts:
--------------------------------------------------------------------------------
1 | import promisify from './promisify'
2 |
3 | const promisifyFunctionResult =
(fn: (...args: P) => K | Promise, ...args: P): Promise => {
4 | const result = fn(...args)
5 |
6 | return promisify(result)
7 | }
8 |
9 | export default promisifyFunctionResult
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/ssr.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Check if its not running server side nad window or document are available
3 | * @returns {Boolean}
4 | */
5 | export const isClient = () => typeof window !== 'undefined' && typeof document !== 'undefined'
6 |
7 | /**
8 | * Check its running server side
9 | * @returns {Boolean}
10 | */
11 |
12 | export const isServer = () => typeof window === 'undefined' || typeof document === 'undefined'
13 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/subtractFromArray.ts:
--------------------------------------------------------------------------------
1 | import isEqual from './isEqual'
2 |
3 | const subtractFromArray = (arr: any, value: any): P => {
4 | if (!Array.isArray(arr)) {
5 | return [] as any
6 | }
7 |
8 | const index = arr.findIndex(valueInOriginal => isEqual(valueInOriginal, value))
9 |
10 | if (index === -1) {
11 | return arr as P
12 | }
13 |
14 | const newArray = [...arr]
15 |
16 | newArray.splice(index, 1)
17 |
18 | return newArray as P
19 | }
20 |
21 | export default subtractFromArray
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/throttle.ts:
--------------------------------------------------------------------------------
1 | const throttle = (func: (...args: any[]) => void, wait = 200): (...args: any[]) => void => {
2 | let isCalled = false
3 |
4 | return (...args: any[]) => {
5 | if (!isCalled) {
6 | func(...args)
7 | isCalled = true
8 | setTimeout(() => {
9 | isCalled = false
10 | }, wait)
11 | }
12 | }
13 | }
14 |
15 | export default throttle
16 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/uniqueID.ts:
--------------------------------------------------------------------------------
1 | const idCounter = {} as string[] | number[]
2 | function uniqueId(prefix: any = '$lodash$') {
3 | if (!idCounter[prefix]) {
4 | idCounter[prefix] = 0
5 | }
6 |
7 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment
8 | // @ts-expect-error
9 | const id = ++idCounter[prefix]
10 | if (prefix === '$lodash$') {
11 | return `${id}`
12 | }
13 |
14 | return `${prefix}${id}`
15 | }
16 | export default uniqueId
17 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/helpers/urlHelper.ts:
--------------------------------------------------------------------------------
1 | import { parse, stringify } from 'qs'
2 |
3 | const urlBuilder = (url: string | undefined, query: object | null): string => {
4 | if (!url) {
5 | return ''
6 | }
7 | const isFullQualifiedUrl = url.startsWith('http://') || url.startsWith('https://')
8 | if (!isFullQualifiedUrl) {
9 | console.warn('The URL provided is not a full qualified URL')
10 | return url
11 | }
12 |
13 | const parsedUrl = new URL(url)
14 | if (!query) {
15 | return parsedUrl.toString()
16 | }
17 | const parsedUrlParams = parse(parsedUrl.search, { ignoreQueryPrefix: true })
18 | parsedUrl.search = stringify({ ...parsedUrlParams, ...query }, { arrayFormat: 'brackets' })
19 | return parsedUrl.toString()
20 | }
21 | export default urlBuilder
22 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/types/css-class.ts:
--------------------------------------------------------------------------------
1 | export interface CSSClassKeyValuePair {
2 |
3 | [key: string]: any
4 | }
5 |
6 | export type CSSClasses = CssClass[]
7 |
8 | export type CssClass = CSSClassKeyValuePair | string | CSSClasses | undefined
9 |
10 | export type CSSRawClassesList = {
11 | [key in ClassesKeys]?: CssClass
12 | }
13 |
14 | export type CSSClassesList = {
15 | [key in ClassesKeys]?: CssClass
16 | }
17 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from './css-class'
2 | export * from './variants'
3 | export * from './input-options'
4 | export * from './misc'
5 | export * from './options'
6 | export * from './components'
7 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/types/input-options.ts:
--------------------------------------------------------------------------------
1 | export type NormalizedOptions = Array
2 |
3 | export type InputOptionValue = string | number | undefined | null | object | boolean
4 |
5 | export type InputOptionText = string | number | undefined
6 |
7 | export interface NormalizedOption {
8 | value: InputOptionValue
9 | text: InputOptionText
10 | description?: InputOptionText
11 |
12 | raw?: any
13 | children?: NormalizedOptions
14 | disabled?: boolean | 'disabled'
15 | }
16 |
17 | export type InputOptions = Array | { [key: string]: InputOptionText }
18 |
19 | export interface InputOptionObject {
20 | value?: InputOptionValue
21 | text?: InputOptionText
22 | description?: InputOptionText
23 | disabled?: boolean | undefined
24 | children?: InputOptions
25 |
26 | [key: string]: any
27 | }
28 |
29 | export type InputOption = InputOptionObject | string | number
30 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/types/options.ts:
--------------------------------------------------------------------------------
1 | export interface PluginOptions {
2 | swapErrorsVariantOnModelValueChanges?: boolean
3 | }
4 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/types/variants.ts:
--------------------------------------------------------------------------------
1 | import type { CSSClassesList, CssClass } from './index'
2 |
3 | export type WithVariantProps = {
4 | classes: CssClass
5 | fixedClasses: CssClass
6 | variants?: Variants
7 | variant?: string
8 | class?: string
9 | errors?: string
10 | name?: string
11 | feedback?: string
12 | } & P
13 |
14 | export interface Variants
{
15 | [key: string]: WithVariantProps
| undefined
16 | }
17 |
18 | export interface ObjectWithClassName {
19 | class?: string
20 | }
21 |
22 | export type ObjectWithClassesList = ObjectWithClassName & {
23 | classesList: CSSClassesList
24 | }
25 |
26 | export type WithVariantPropsAndClassesList
= WithVariantProps
& {
27 | classesList: CSSClassesList
28 | }
29 |
30 | export interface VariantsWithClassesList {
31 | [key: string]: WithVariantPropsAndClassesList
| undefined
32 | }
33 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/use/useAttributesAndProps.ts:
--------------------------------------------------------------------------------
1 | import { getCurrentInstance, unref } from 'vue'
2 | import pick from 'lodash/pick'
3 | import omit from 'lodash/omit'
4 |
5 | export default function useAttributesAndProps(only: string[] = [], except: string[] = []) {
6 | const vm = getCurrentInstance()!
7 |
8 | const props = Object.fromEntries(Object.entries(unref(vm.props)).filter(([v]) => v != null && v !== undefined))
9 | const attrs = Object.fromEntries(Object.entries(unref(vm.attrs)).filter(([v]) => v != null && v !== undefined))
10 |
11 | let merge = {
12 | ...props,
13 | ...attrs,
14 | }
15 |
16 | if (only.length) {
17 | merge = pick(merge, only)
18 | }
19 |
20 | if (except.length) {
21 | merge = omit(merge, except)
22 | }
23 |
24 | // Always removed these
25 | const blacklist = ['variant', 'variants', 'classes', 'variants']
26 |
27 | return omit(merge, blacklist)
28 | }
29 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/use/useDefaultName.ts:
--------------------------------------------------------------------------------
1 | import { getCurrentInstance } from 'vue'
2 | import { uniqueId } from '../helpers'
3 | import type { Data } from '../types'
4 |
5 | /**
6 | * Attempts to set the child name default based on parent label / name
7 | * @param props
8 | */
9 | export default function useDefaultName(props: Props): string | unknown {
10 | const vm = getCurrentInstance()!
11 | let localName = uniqueId('vc-component-') as string | unknown
12 |
13 | if (
14 | props.name === undefined
15 | && vm?.parent?.props?.name !== undefined
16 | && vm?.parent?.type?.name === 'VanillaInputGroup'
17 | && vm?.type.name !== 'VanillaInputGroup'
18 | && vm?.type.name !== 'VanillaFormLabel'
19 | ) {
20 | localName = vm.parent?.props?.name
21 |
22 | return localName || uniqueId('vc-component-')
23 | }
24 | return localName
25 | }
26 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/use/useDynamicSlots.ts:
--------------------------------------------------------------------------------
1 | import { camelize, capitalize } from 'vue'
2 |
3 | export default function useDynamicSlots(prefix: string, slotName: string): string {
4 | const lowercaseColumnName = slotName.toLowerCase()
5 | return camelize(prefix + capitalize(lowercaseColumnName.replace(/\.|\_/g, '-')))
6 | }
7 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/use/useFetchData.ts:
--------------------------------------------------------------------------------
1 | import { useCookies } from '@vueuse/integrations/useCookies'
2 | import merge from 'lodash/merge'
3 | import { urlHelper } from '../helpers'
4 |
5 | export default function useFetchData(
6 | url: string | undefined,
7 | query: null | object = null,
8 | options: RequestInit = {},
9 | ): Promise {
10 | // Extract proper token from cookies ( Laravel )
11 | const token = useCookies().get('XSRF-TOKEN')
12 |
13 | // Check for full qualified URL
14 |
15 | const finalUrl = urlHelper(url, query)
16 |
17 | const finalOptions = merge({
18 | headers: {
19 | 'Content-Type': 'application/json',
20 | 'Accept': 'application/json',
21 | 'X-Requested-With': 'XMLHttpRequest',
22 | 'X-XSRF-TOKEN': token ? decodeURIComponent(token) : '',
23 | },
24 | credentials: 'include',
25 | ...options,
26 | })
27 |
28 | return fetch(finalUrl, finalOptions).then(response => response.json())
29 | }
30 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/use/useInjectsClassesList.ts:
--------------------------------------------------------------------------------
1 | import type { ComputedRef } from 'vue'
2 | import { computed } from 'vue'
3 | import { useInjectsConfiguration } from '../use'
4 | import type { CSSClassesList } from '../types'
5 |
6 | export default function useInjectsClassesList(key = 'configuration_vanilla'): ComputedRef {
7 | const configuration = useInjectsConfiguration(key)
8 | return computed((): CSSClassesList => configuration.classesList || {})
9 | }
10 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/use/useInjectsClassesListClass.ts:
--------------------------------------------------------------------------------
1 | import type { ComputedRef } from 'vue'
2 | import { computed } from 'vue'
3 | import type { CssClass } from '../types'
4 | import { useInjectsConfiguration } from '../use'
5 | import { get } from '../helpers'
6 |
7 | export default function useInjectsClassesListClass(property: string): ComputedRef {
8 | const configuration = useInjectsConfiguration()
9 | return computed((): CssClass => get(configuration.classesList, property, ''))
10 | }
11 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/use/useInjectsConfiguration.ts:
--------------------------------------------------------------------------------
1 | import { inject } from 'vue'
2 | import type { Data, WithVariantPropsAndClassesList } from '../types'
3 |
4 | export default function useInjectsConfiguration>(key = 'configuration_vanilla'): P {
5 | return inject
(key, {} as P)
6 | }
7 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/use/useVModel.ts:
--------------------------------------------------------------------------------
1 | import type { Ref } from 'vue'
2 | import { getCurrentInstance, ref, watch } from 'vue'
3 | import type { Data } from '../types'
4 |
5 | export default function useVModel
(
6 | props: P,
7 | key: K,
8 | ): Ref
{
9 | const vm = getCurrentInstance()
10 | const localValue = ref(props[key]) as Ref
11 |
12 | watch(localValue, (value) => {
13 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14 | // @ts-expect-error
15 | if (props.disabled) {
16 | return
17 | }
18 |
19 | // @ts-expect-error
20 | vm?.emit(`update:${key}`, value)
21 | })
22 |
23 | watch(() => props[key], (value) => {
24 | localValue.value = value
25 | })
26 |
27 | return localValue
28 | }
29 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/core/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './country-codes'
2 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/directives/eager.ts:
--------------------------------------------------------------------------------
1 | import { isServer } from '../core/helpers'
2 |
3 | function event(name: string) {
4 | if (isServer()) {
5 | return
6 | }
7 | const event = new Event(name)
8 | document.dispatchEvent(event)
9 | return event
10 | }
11 |
12 | export default function (el: HTMLElement) {
13 | if (el.tagName.toLocaleUpperCase() !== 'INPUT') {
14 | const els = el.getElementsByTagName('input')
15 | if (els.length !== 1) {
16 | throw new Error(
17 | `v-eager directive requires 1 input, found ${els.length}`,
18 | )
19 | }
20 | else {
21 | el = els[0]
22 | }
23 | }
24 |
25 | el.oninput = function (evt) {
26 | if (!evt.isTrusted) {
27 | return
28 | }
29 | el.dispatchEvent(event('input'))
30 | }
31 | }
32 |
33 | // import eager from "./directive";
34 | // function install(Vue) {
35 | // Vue.directive("eager", eager);
36 | // }
37 | //
38 | // export default install;
39 | // export { eager };
40 |
--------------------------------------------------------------------------------
/packages/vanilla-components/src/plugin.ts:
--------------------------------------------------------------------------------
1 | import type { App, Plugin } from 'vue'
2 | import { defineOptions, mergeConfiguration } from './configuration'
3 | import type { ComponentsConfiguration, PluginOptions } from './core/types'
4 |
5 | const plugin: Plugin = {
6 | install: (
7 | app: App,
8 | configuration: ComponentsConfiguration = {},
9 | options: PluginOptions = {},
10 | ): void => {
11 | app.config.globalProperties.$vanillaComponents = true
12 | const mergedConfiguration = mergeConfiguration(configuration)
13 | app.provide('vanilla_configuration', mergedConfiguration)
14 | app.provide('vanilla_components_options', defineOptions(options))
15 | },
16 | }
17 |
18 | declare module '@vue/runtime-core' {
19 | interface ComponentCustomProperties {
20 | $vanillaComponents: boolean
21 | }
22 | }
23 |
24 | export default plugin
25 |
--------------------------------------------------------------------------------
/packages/vanilla-components/webtypesconfig.ts:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | apiOptions: {
3 | addScriptHandlers: [
4 | function (
5 | documentation,
6 | componentDefinition,
7 | astPath,
8 | opt,
9 | ) {
10 | const componentDoc = astPath.tokens.filter(token => token.type === 'CommentBlock' && token.value.includes('@docs')).find(() => true)
11 |
12 | if (componentDoc) {
13 | const lines = componentDoc.value.split('\n')
14 |
15 | const nameLine = lines.filter(line => line.includes('@displayName'))[0]
16 | const descriptionLine = lines.filter(line => line.includes('@description'))[0]
17 |
18 | if (nameLine) {
19 | documentation.set('displayName', nameLine.replaceAll('@displayName', '').replaceAll(/[^a-zA-Z0-9]+/g, ''))
20 | }
21 |
22 | if (descriptionLine) {
23 | documentation.set('description', descriptionLine.replaceAll(/\*\s+\@description/g, '').trim())
24 | }
25 | }
26 | },
27 | ],
28 | },
29 | }
30 |
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - 'packages/*'
--------------------------------------------------------------------------------
/postcss.config.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [
3 | require('postcss-import'),
4 | require('tailwindcss/nesting'),
5 | require('tailwindcss'),
6 | require('autoprefixer'),
7 | require('postcss-prefix-selector')({
8 | prefix: ':not(:where(.vp-raw *, #headlessui-portal-root *, .z-50 *))',
9 | includeFiles: [
10 | /vp-doc\.css/,
11 | /base\.css/,
12 | /vp-code\.css/,
13 | /utils\.css/,
14 | ],
15 | transform(prefix, _selector, prefixedSelector) {
16 | const [selector, pseudo = ''] = _selector.split(/(:\S*)$/)
17 | return selector + prefix + pseudo
18 | },
19 | }),
20 | ],
21 | }
22 |
--------------------------------------------------------------------------------
/tailwind.config.cjs:
--------------------------------------------------------------------------------
1 | const defaultTheme = require('tailwindcss/defaultTheme')
2 | const colors = require('tailwindcss/colors')
3 |
4 | /** @type {import('tailwindcss').Config} */
5 | module.exports = {
6 | mode: 'jit',
7 | darkMode: 'class',
8 | content: [
9 | './documentation/.vitepress/**/*.{js,jsx,ts,tsx,vue,md}',
10 | './packages/vanilla-components/src/**/*.*',
11 | './documentation/src/**/*.{js,jsx,ts,tsx,vue,md,json}',
12 | ],
13 | theme: {
14 | extend: {
15 | colors: {
16 | gray: colors.zinc,
17 | primary: colors.indigo,
18 | },
19 | fontFamily: {
20 | sans: ['Nunito', ...defaultTheme.fontFamily.sans],
21 | inter: ['Inter', 'sans-serif'], // Ensure fonts with spaces have " " surrounding it.
22 | },
23 | screens: {
24 | xxs: { min: '200px', max: '374px' },
25 | xs: { min: '375px', max: '639px' },
26 | },
27 | },
28 | },
29 | plugins: [
30 | require('@tailwindcss/typography'),
31 | require('@tailwindcss/aspect-ratio'),
32 | require('@tailwindcss/forms'),
33 | ],
34 | }
35 |
--------------------------------------------------------------------------------