@bagelink/vue 0.0.243 → 0.0.247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Drop.vue.d.ts +34 -0
- package/dist/components/Drop.vue.d.ts.map +1 -0
- package/dist/components/FileUploader.vue.d.ts +60 -0
- package/dist/components/FileUploader.vue.d.ts.map +1 -0
- package/dist/components/form/BglField.vue.d.ts.map +1 -1
- package/dist/components/form/BglForm.vue.d.ts.map +1 -1
- package/dist/components/form/ItemRef.vue.d.ts +1 -0
- package/dist/components/form/ItemRef.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DateInput.vue.d.ts +3 -0
- package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectField.vue.d.ts +1 -4
- package/dist/components/form/inputs/SelectField.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/index.cjs +1742 -1707
- package/dist/index.mjs +1742 -1707
- package/dist/style.css +173 -79
- package/dist/types/BagelForm.d.ts +2 -6
- package/dist/types/BagelForm.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Avatar.vue +1 -1
- package/src/components/form/BglField.vue +33 -8
- package/src/components/form/BglForm.vue +5 -2
- package/src/components/form/inputs/DateInput.vue +14 -3
- package/src/components/form/inputs/FileUpload.vue +69 -15
- package/src/components/form/inputs/SelectInput.vue +32 -22
- package/src/styles/layout.css +154 -39
- package/src/styles/text.css +4 -0
- package/src/types/BagelForm.ts +1 -2
- package/src/utils/index.ts +2 -2
package/dist/style.css
CHANGED
|
@@ -867,21 +867,22 @@ th[data-v-56ec9012] {
|
|
|
867
867
|
color: var(--input-color);
|
|
868
868
|
}
|
|
869
869
|
|
|
870
|
-
.avatar[data-v-
|
|
870
|
+
.avatar[data-v-0441b0b8] {
|
|
871
871
|
border-radius: 100%;
|
|
872
872
|
background-color: var(--bgl-gray-20);
|
|
873
873
|
border: 0.5px solid var(--border-color);
|
|
874
874
|
overflow: hidden;
|
|
875
875
|
text-align: center;
|
|
876
876
|
padding: none;
|
|
877
|
+
flex: 0 0 40px;
|
|
877
878
|
}
|
|
878
|
-
.avatar p[data-v-
|
|
879
|
+
.avatar p[data-v-0441b0b8] {
|
|
879
880
|
font-size: 1.5rem;
|
|
880
881
|
line-height: 50px;
|
|
881
882
|
margin: 0;
|
|
882
883
|
font-weight: 200;
|
|
883
884
|
}
|
|
884
|
-
.avatar img[data-v-
|
|
885
|
+
.avatar img[data-v-0441b0b8] {
|
|
885
886
|
width: 100%;
|
|
886
887
|
height: 100%;
|
|
887
888
|
object-fit: cover;
|
|
@@ -1181,7 +1182,7 @@ fieldset[disabled] .multiselect {
|
|
|
1181
1182
|
width: 100%;
|
|
1182
1183
|
min-height: var(--input-height);
|
|
1183
1184
|
text-align: left;
|
|
1184
|
-
color:
|
|
1185
|
+
color: var(--input-color);
|
|
1185
1186
|
}
|
|
1186
1187
|
.multiselect * {
|
|
1187
1188
|
box-sizing: border-box;
|
|
@@ -1219,20 +1220,20 @@ fieldset[disabled] .multiselect {
|
|
|
1219
1220
|
.multiselect__single {
|
|
1220
1221
|
position: relative;
|
|
1221
1222
|
display: inline-block;
|
|
1222
|
-
min-height: 20px;
|
|
1223
|
-
line-height: 20px;
|
|
1224
1223
|
border: none;
|
|
1225
|
-
border-radius: var(--input-border-radius);
|
|
1226
1224
|
background: var(--input-bg);
|
|
1227
|
-
padding: 0 0 0 5px;
|
|
1228
1225
|
width: calc(100%);
|
|
1229
1226
|
transition: border 0.1s ease;
|
|
1230
1227
|
box-sizing: border-box;
|
|
1231
|
-
margin-bottom: 8px;
|
|
1232
1228
|
vertical-align: top;
|
|
1229
|
+
font-size: var(--input-font-size);
|
|
1230
|
+
padding-inline-start: 0rem;
|
|
1231
|
+
}
|
|
1232
|
+
.multiselect--active .multiselect__input {
|
|
1233
|
+
margin-top: -0.5rem;
|
|
1233
1234
|
}
|
|
1234
1235
|
.multiselect__input::placeholder {
|
|
1235
|
-
color:
|
|
1236
|
+
color: var(--input-color);
|
|
1236
1237
|
}
|
|
1237
1238
|
.multiselect__tag~.multiselect__input,
|
|
1238
1239
|
.multiselect__tag~.multiselect__single {
|
|
@@ -1248,19 +1249,24 @@ fieldset[disabled] .multiselect {
|
|
|
1248
1249
|
outline: none;
|
|
1249
1250
|
}
|
|
1250
1251
|
.multiselect__single {
|
|
1251
|
-
padding-left: 5px;
|
|
1252
|
+
/* padding-left: 5px; */
|
|
1252
1253
|
margin-bottom: 8px;
|
|
1253
1254
|
}
|
|
1254
1255
|
.multiselect__tags-wrap {
|
|
1255
1256
|
display: inline;
|
|
1256
1257
|
}
|
|
1257
1258
|
.multiselect__tags {
|
|
1258
|
-
min-height: 40px;
|
|
1259
|
+
/* min-height: 40px; */
|
|
1259
1260
|
display: block;
|
|
1260
|
-
padding:
|
|
1261
|
+
/* padding: 0.7rem 40px 0.7rem 8px; */
|
|
1261
1262
|
border-radius: var(--input-border-radius);
|
|
1262
1263
|
background: var(--input-bg);
|
|
1263
1264
|
font-size: var(--input-font-size);
|
|
1265
|
+
height: var(--input-height);
|
|
1266
|
+
line-height: 0;
|
|
1267
|
+
padding: calc(var(--input-height) / 2);
|
|
1268
|
+
padding-inline-end: 40px;
|
|
1269
|
+
padding-inline-start: 0.7rem;
|
|
1264
1270
|
}
|
|
1265
1271
|
.multiselect__tag {
|
|
1266
1272
|
position: relative;
|
|
@@ -1327,8 +1333,8 @@ fieldset[disabled] .multiselect {
|
|
|
1327
1333
|
display: block;
|
|
1328
1334
|
position: absolute;
|
|
1329
1335
|
box-sizing: border-box;
|
|
1330
|
-
width: 40px;
|
|
1331
|
-
height: 38px;
|
|
1336
|
+
/* width: 40px; */
|
|
1337
|
+
/* height: 38px; */
|
|
1332
1338
|
right: 1px;
|
|
1333
1339
|
top: 1px;
|
|
1334
1340
|
padding: 4px 8px;
|
|
@@ -1337,20 +1343,19 @@ fieldset[disabled] .multiselect {
|
|
|
1337
1343
|
text-align: center;
|
|
1338
1344
|
cursor: pointer;
|
|
1339
1345
|
transition: transform 0.2s ease;
|
|
1346
|
+
padding-top: calc(var(--input-height) / 2 - 0.7rem);
|
|
1340
1347
|
}
|
|
1341
1348
|
.multiselect__select::before {
|
|
1342
1349
|
position: relative;
|
|
1343
1350
|
background-size: contain;
|
|
1344
1351
|
transform: scale(0.5);
|
|
1345
|
-
top: 4px;
|
|
1346
1352
|
color: var(--bgl-black);
|
|
1347
|
-
content: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='%23b7b7b7' height='24' viewBox='0 -960 960 960' width='24'><path d='M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z'/></svg>")
|
|
1353
|
+
content: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='%23b7b7b7' height='24' viewBox='0 -960 960 960' width='24'><path d='M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z'/></svg>");
|
|
1348
1354
|
}
|
|
1349
1355
|
.multiselect__placeholder {
|
|
1350
|
-
color:
|
|
1356
|
+
color: var(--placeholder-color);
|
|
1351
1357
|
display: inline-block;
|
|
1352
1358
|
margin-bottom: 10px;
|
|
1353
|
-
padding-top: 2px;
|
|
1354
1359
|
}
|
|
1355
1360
|
.multiselect--active .multiselect__placeholder {
|
|
1356
1361
|
display: none;
|
|
@@ -1444,14 +1449,14 @@ fieldset[disabled] .multiselect {
|
|
|
1444
1449
|
}
|
|
1445
1450
|
.multiselect__option--group {
|
|
1446
1451
|
background: #ededed;
|
|
1447
|
-
color:
|
|
1452
|
+
color: var(--input-color);
|
|
1448
1453
|
}
|
|
1449
1454
|
.multiselect__option--group.multiselect__option--highlight {
|
|
1450
|
-
background:
|
|
1455
|
+
background: var(--input-color);
|
|
1451
1456
|
color: #fff;
|
|
1452
1457
|
}
|
|
1453
1458
|
.multiselect__option--group.multiselect__option--highlight::after {
|
|
1454
|
-
background:
|
|
1459
|
+
background: var(--input-color);
|
|
1455
1460
|
}
|
|
1456
1461
|
.multiselect__option--disabled.multiselect__option--highlight {
|
|
1457
1462
|
background: #dedede;
|
|
@@ -1487,7 +1492,9 @@ fieldset[disabled] .multiselect {
|
|
|
1487
1492
|
left: 1px;
|
|
1488
1493
|
}
|
|
1489
1494
|
*[dir="rtl"] .multiselect__tags {
|
|
1490
|
-
padding:
|
|
1495
|
+
padding: calc(var(--input-height) / 2);
|
|
1496
|
+
padding-inline-end: 40px;
|
|
1497
|
+
padding-inline-start: 0.7rem;
|
|
1491
1498
|
}
|
|
1492
1499
|
*[dir="rtl"] .multiselect__content {
|
|
1493
1500
|
text-align: right;
|
|
@@ -1901,7 +1908,7 @@ to {
|
|
|
1901
1908
|
color: var(--bgl-white);
|
|
1902
1909
|
}
|
|
1903
1910
|
|
|
1904
|
-
.bagel-input .fileUploadWrap[data-v-
|
|
1911
|
+
.bagel-input .fileUploadWrap[data-v-7deb423e] {
|
|
1905
1912
|
outline: 1px solid var(--border-color);
|
|
1906
1913
|
border-radius: var(--input-border-radius);
|
|
1907
1914
|
text-align: center;
|
|
@@ -1911,7 +1918,7 @@ to {
|
|
|
1911
1918
|
height: 132px;
|
|
1912
1919
|
font-size: var(--input-font-size);
|
|
1913
1920
|
}
|
|
1914
|
-
.previewName[data-v-
|
|
1921
|
+
.previewName[data-v-7deb423e] {
|
|
1915
1922
|
padding: 0.5rem;
|
|
1916
1923
|
text-align: start;
|
|
1917
1924
|
color: var(--input-color);
|
|
@@ -1919,37 +1926,37 @@ to {
|
|
|
1919
1926
|
grid-template-columns: 1fr 22px;
|
|
1920
1927
|
align-items: center;
|
|
1921
1928
|
}
|
|
1922
|
-
.previewName p[data-v-
|
|
1929
|
+
.previewName p[data-v-7deb423e] {
|
|
1923
1930
|
overflow: hidden;
|
|
1924
1931
|
text-overflow: ellipsis;
|
|
1925
1932
|
white-space: nowrap;
|
|
1926
1933
|
}
|
|
1927
|
-
.imagePreviewWrap[data-v-
|
|
1934
|
+
.imagePreviewWrap[data-v-7deb423e] {
|
|
1928
1935
|
background: var(--input-bg);
|
|
1929
1936
|
border-radius: var(--input-border-radius);
|
|
1930
1937
|
height: 90px;
|
|
1931
1938
|
padding: 5px;
|
|
1932
1939
|
}
|
|
1933
|
-
img.preview[data-v-
|
|
1940
|
+
img.preview[data-v-7deb423e] {
|
|
1934
1941
|
height: 80px;
|
|
1935
1942
|
border-radius: var(--input-border-radius);
|
|
1936
1943
|
object-fit: contain;
|
|
1937
1944
|
}
|
|
1938
|
-
.fileUploadWrap.dragover[data-v-
|
|
1939
|
-
.fileUploadWrap[data-v-
|
|
1945
|
+
.fileUploadWrap.dragover[data-v-7deb423e],
|
|
1946
|
+
.fileUploadWrap[data-v-7deb423e]:hover {
|
|
1940
1947
|
box-shadow: inset 0 0 10px #00000012;
|
|
1941
1948
|
}
|
|
1942
|
-
.bagel-input .fileUploadWrap.fileDropZone[data-v-
|
|
1949
|
+
.bagel-input .fileUploadWrap.fileDropZone[data-v-7deb423e] {
|
|
1943
1950
|
background: var(--input-bg);
|
|
1944
1951
|
display: flex;
|
|
1945
1952
|
align-items: center;
|
|
1946
1953
|
justify-content: center;
|
|
1947
1954
|
color: var(--bgl-gray);
|
|
1948
1955
|
}
|
|
1949
|
-
.bagel-input .fileUploadWrap.fileDropZone[data-v-
|
|
1956
|
+
.bagel-input .fileUploadWrap.fileDropZone[data-v-7deb423e]:after {
|
|
1950
1957
|
content: "Drop files here or click to upload";
|
|
1951
1958
|
}
|
|
1952
|
-
.pie[data-v-
|
|
1959
|
+
.pie[data-v-7deb423e] {
|
|
1953
1960
|
width: 30px;
|
|
1954
1961
|
height: 30px;
|
|
1955
1962
|
position: relative;
|
|
@@ -1957,7 +1964,7 @@ img.preview[data-v-4144cc3e] {
|
|
|
1957
1964
|
align-items: center;
|
|
1958
1965
|
justify-content: center;
|
|
1959
1966
|
}
|
|
1960
|
-
.pie[data-v-
|
|
1967
|
+
.pie[data-v-7deb423e]:before {
|
|
1961
1968
|
content: "";
|
|
1962
1969
|
position: absolute;
|
|
1963
1970
|
border-radius: 50%;
|
|
@@ -1971,26 +1978,26 @@ img.preview[data-v-4144cc3e] {
|
|
|
1971
1978
|
#0000 calc(99% - var(--b)),
|
|
1972
1979
|
#000 calc(100% - var(--b)));
|
|
1973
1980
|
}
|
|
1974
|
-
.pie .success[data-v-
|
|
1981
|
+
.pie .success[data-v-7deb423e] {
|
|
1975
1982
|
transform: scale(0);
|
|
1976
1983
|
opacity: 0;
|
|
1977
1984
|
transition: all 0.3s ease-in-out;
|
|
1978
1985
|
}
|
|
1979
|
-
.pie .progress[data-v-
|
|
1986
|
+
.pie .progress[data-v-7deb423e] {
|
|
1980
1987
|
position: absolute;
|
|
1981
1988
|
font-size: 10px;
|
|
1982
1989
|
}
|
|
1983
|
-
.pie.complete .progress[data-v-
|
|
1990
|
+
.pie.complete .progress[data-v-7deb423e] {
|
|
1984
1991
|
display: none;
|
|
1985
1992
|
}
|
|
1986
|
-
.pie.complete .success[data-v-
|
|
1993
|
+
.pie.complete .success[data-v-7deb423e] {
|
|
1987
1994
|
transform: scale(1.3);
|
|
1988
1995
|
opacity: 1;
|
|
1989
1996
|
}
|
|
1990
|
-
.pie.complete[data-v-
|
|
1997
|
+
.pie.complete[data-v-7deb423e]:before {
|
|
1991
1998
|
background: conic-gradient(var(--bgl-green) calc(var(--p) * 1%), #0000 0);
|
|
1992
1999
|
}
|
|
1993
|
-
.pie.complete[data-v-
|
|
2000
|
+
.pie.complete[data-v-7deb423e] {
|
|
1994
2001
|
color: var(--bgl-green);
|
|
1995
2002
|
}
|
|
1996
2003
|
|
|
@@ -2380,6 +2387,18 @@ img.preview[data-v-4144cc3e] {
|
|
|
2380
2387
|
.flex-3-col {
|
|
2381
2388
|
flex: 1 1 33.33333%;
|
|
2382
2389
|
}
|
|
2390
|
+
.mb-0 {
|
|
2391
|
+
margin-bottom: 0rem !important;
|
|
2392
|
+
}
|
|
2393
|
+
.mb-025 {
|
|
2394
|
+
margin-bottom: 0.25rem !important;
|
|
2395
|
+
}
|
|
2396
|
+
.mb-05 {
|
|
2397
|
+
margin-bottom: 0.5rem !important;
|
|
2398
|
+
}
|
|
2399
|
+
.mb-075 {
|
|
2400
|
+
margin-bottom: 0.75rem !important;
|
|
2401
|
+
}
|
|
2383
2402
|
.mb-1 {
|
|
2384
2403
|
margin-bottom: 1rem !important;
|
|
2385
2404
|
}
|
|
@@ -2389,6 +2408,21 @@ img.preview[data-v-4144cc3e] {
|
|
|
2389
2408
|
.mb-3 {
|
|
2390
2409
|
margin-bottom: 3rem !important;
|
|
2391
2410
|
}
|
|
2411
|
+
.mb-4 {
|
|
2412
|
+
margin-bottom: 4rem !important;
|
|
2413
|
+
}
|
|
2414
|
+
.mt-0 {
|
|
2415
|
+
margin-top: 0rem !important;
|
|
2416
|
+
}
|
|
2417
|
+
.mt-025 {
|
|
2418
|
+
margin-top: 0.25rem !important;
|
|
2419
|
+
}
|
|
2420
|
+
.mt-05 {
|
|
2421
|
+
margin-top: 0.5rem !important;
|
|
2422
|
+
}
|
|
2423
|
+
.mt-075 {
|
|
2424
|
+
margin-top: 0.75rem !important;
|
|
2425
|
+
}
|
|
2392
2426
|
.mt-1 {
|
|
2393
2427
|
margin-top: 1rem !important;
|
|
2394
2428
|
}
|
|
@@ -2398,6 +2432,21 @@ img.preview[data-v-4144cc3e] {
|
|
|
2398
2432
|
.mt-3 {
|
|
2399
2433
|
margin-top: 3rem !important;
|
|
2400
2434
|
}
|
|
2435
|
+
.mt-4 {
|
|
2436
|
+
margin-top: 4rem !important;
|
|
2437
|
+
}
|
|
2438
|
+
.ms-0 {
|
|
2439
|
+
margin-inline-start: 0rem !important;
|
|
2440
|
+
}
|
|
2441
|
+
.ms-025 {
|
|
2442
|
+
margin-inline-start: 0.25rem !important;
|
|
2443
|
+
}
|
|
2444
|
+
.ms-05 {
|
|
2445
|
+
margin-inline-start: 0.5rem !important;
|
|
2446
|
+
}
|
|
2447
|
+
.ms-075 {
|
|
2448
|
+
margin-inline-start: 0.75rem !important;
|
|
2449
|
+
}
|
|
2401
2450
|
.ms-1 {
|
|
2402
2451
|
margin-inline-start: 1rem !important;
|
|
2403
2452
|
}
|
|
@@ -2407,6 +2456,21 @@ img.preview[data-v-4144cc3e] {
|
|
|
2407
2456
|
.ms-3 {
|
|
2408
2457
|
margin-inline-start: 3rem !important;
|
|
2409
2458
|
}
|
|
2459
|
+
.ms-4 {
|
|
2460
|
+
margin-inline-start: 4rem !important;
|
|
2461
|
+
}
|
|
2462
|
+
.me-0 {
|
|
2463
|
+
margin-inline-end: 0rem !important;
|
|
2464
|
+
}
|
|
2465
|
+
.me-025 {
|
|
2466
|
+
margin-inline-end: 0.25rem !important;
|
|
2467
|
+
}
|
|
2468
|
+
.me-05 {
|
|
2469
|
+
margin-inline-end: 0.5rem !important;
|
|
2470
|
+
}
|
|
2471
|
+
.me-075 {
|
|
2472
|
+
margin-inline-end: 0.75rem !important;
|
|
2473
|
+
}
|
|
2410
2474
|
.me-1 {
|
|
2411
2475
|
margin-inline-end: 1rem !important;
|
|
2412
2476
|
}
|
|
@@ -2416,65 +2480,92 @@ img.preview[data-v-4144cc3e] {
|
|
|
2416
2480
|
.me-3 {
|
|
2417
2481
|
margin-inline-end: 3rem !important;
|
|
2418
2482
|
}
|
|
2419
|
-
.
|
|
2420
|
-
margin-
|
|
2483
|
+
.me-4 {
|
|
2484
|
+
margin-inline-end: 4rem !important;
|
|
2421
2485
|
}
|
|
2422
|
-
|
|
2423
|
-
margin-bottom:
|
|
2486
|
+
.-mb-025 {
|
|
2487
|
+
margin-bottom: -0.25rem !important;
|
|
2424
2488
|
}
|
|
2425
|
-
|
|
2426
|
-
margin-bottom: 0.
|
|
2489
|
+
.-mb-05 {
|
|
2490
|
+
margin-bottom: -0.5rem !important;
|
|
2427
2491
|
}
|
|
2428
|
-
|
|
2429
|
-
margin-bottom: 0.
|
|
2492
|
+
.-mb-075 {
|
|
2493
|
+
margin-bottom: -0.75rem !important;
|
|
2430
2494
|
}
|
|
2431
|
-
|
|
2432
|
-
margin-bottom:
|
|
2495
|
+
.-mb-1 {
|
|
2496
|
+
margin-bottom: -1rem !important;
|
|
2433
2497
|
}
|
|
2434
|
-
|
|
2435
|
-
margin-
|
|
2498
|
+
.-mb-2 {
|
|
2499
|
+
margin-bottom: -2rem !important;
|
|
2436
2500
|
}
|
|
2437
|
-
|
|
2438
|
-
margin-
|
|
2501
|
+
.-mb-3 {
|
|
2502
|
+
margin-bottom: -3rem !important;
|
|
2439
2503
|
}
|
|
2440
|
-
|
|
2504
|
+
.-mb-4 {
|
|
2505
|
+
margin-bottom: -4rem !important;
|
|
2506
|
+
}
|
|
2507
|
+
.-mt-025 {
|
|
2508
|
+
margin-top: -0.25rem !important;
|
|
2509
|
+
}
|
|
2510
|
+
.-mt-05 {
|
|
2511
|
+
margin-top: -0.5rem !important;
|
|
2512
|
+
}
|
|
2513
|
+
.-mt-075 {
|
|
2441
2514
|
margin-top: 0.75rem !important;
|
|
2442
2515
|
}
|
|
2443
|
-
|
|
2444
|
-
margin-top:
|
|
2516
|
+
.-mt-1 {
|
|
2517
|
+
margin-top: -1rem !important;
|
|
2445
2518
|
}
|
|
2446
|
-
|
|
2447
|
-
margin-top:
|
|
2519
|
+
.-mt-2 {
|
|
2520
|
+
margin-top: -2rem !important;
|
|
2448
2521
|
}
|
|
2449
|
-
|
|
2450
|
-
margin-
|
|
2522
|
+
.-mt-3 {
|
|
2523
|
+
margin-top: -3rem !important;
|
|
2451
2524
|
}
|
|
2452
|
-
|
|
2453
|
-
margin-
|
|
2525
|
+
.-mt-4 {
|
|
2526
|
+
margin-top: -4rem !important;
|
|
2454
2527
|
}
|
|
2455
|
-
|
|
2456
|
-
margin-inline-start: 0.
|
|
2528
|
+
.-ms-025 {
|
|
2529
|
+
margin-inline-start: -0.25rem !important;
|
|
2457
2530
|
}
|
|
2458
|
-
|
|
2459
|
-
margin-inline-start: 0.5rem !important;
|
|
2531
|
+
.-ms-05 {
|
|
2532
|
+
margin-inline-start: -0.5rem !important;
|
|
2460
2533
|
}
|
|
2461
|
-
|
|
2462
|
-
margin-inline-start: 0.
|
|
2534
|
+
.-ms-075 {
|
|
2535
|
+
margin-inline-start: -0.75rem !important;
|
|
2463
2536
|
}
|
|
2464
|
-
|
|
2465
|
-
margin-inline-
|
|
2537
|
+
.-ms-1 {
|
|
2538
|
+
margin-inline-start: -1rem !important;
|
|
2466
2539
|
}
|
|
2467
|
-
|
|
2468
|
-
margin-inline-
|
|
2540
|
+
.-ms-2 {
|
|
2541
|
+
margin-inline-start: -2rem !important;
|
|
2469
2542
|
}
|
|
2470
|
-
|
|
2471
|
-
margin-inline-
|
|
2543
|
+
.-ms-3 {
|
|
2544
|
+
margin-inline-start: -3rem !important;
|
|
2472
2545
|
}
|
|
2473
|
-
|
|
2474
|
-
margin-inline-
|
|
2546
|
+
.-ms-4 {
|
|
2547
|
+
margin-inline-start: -4rem !important;
|
|
2475
2548
|
}
|
|
2476
|
-
|
|
2477
|
-
margin-inline-end: 0.25rem !important;
|
|
2549
|
+
.-me-025 {
|
|
2550
|
+
margin-inline-end: -0.25rem !important;
|
|
2551
|
+
}
|
|
2552
|
+
.-me-05 {
|
|
2553
|
+
margin-inline-end: -0.5rem !important;
|
|
2554
|
+
}
|
|
2555
|
+
.-me-075 {
|
|
2556
|
+
margin-inline-end: -0.75rem !important;
|
|
2557
|
+
}
|
|
2558
|
+
.-me-1 {
|
|
2559
|
+
margin-inline-end: -1rem !important;
|
|
2560
|
+
}
|
|
2561
|
+
.-me-2 {
|
|
2562
|
+
margin-inline-end: -2rem !important;
|
|
2563
|
+
}
|
|
2564
|
+
.-me-3 {
|
|
2565
|
+
margin-inline-end: -3rem !important;
|
|
2566
|
+
}
|
|
2567
|
+
.-me-4 {
|
|
2568
|
+
margin-inline-end: -4rem !important;
|
|
2478
2569
|
}
|
|
2479
2570
|
.pb-0 {
|
|
2480
2571
|
padding-bottom: 0rem !important;
|
|
@@ -2898,6 +2989,9 @@ h6 {}
|
|
|
2898
2989
|
.bold {
|
|
2899
2990
|
font-weight: 700;
|
|
2900
2991
|
}
|
|
2992
|
+
.line-height-1 {
|
|
2993
|
+
line-height: 1;
|
|
2994
|
+
}
|
|
2901
2995
|
.ellipsis {
|
|
2902
2996
|
overflow: hidden;
|
|
2903
2997
|
display: block;
|
|
@@ -15,9 +15,9 @@ export type BaseBagelField<T = Record<string, any>> = {
|
|
|
15
15
|
required?: boolean;
|
|
16
16
|
helptext?: string;
|
|
17
17
|
options?: string | ({
|
|
18
|
-
label
|
|
18
|
+
label?: string;
|
|
19
19
|
value: string | number;
|
|
20
|
-
} | string | number)[];
|
|
20
|
+
} | string | number | Record<string, any>)[];
|
|
21
21
|
defaultValue?: any;
|
|
22
22
|
transform?: (val?: any, rowData?: Record<string, any>) => any;
|
|
23
23
|
onUpdate?: (val: any, fieldData?: any, rowData?: Record<string, any>) => void;
|
|
@@ -31,10 +31,6 @@ export interface InputBagelField<T> extends BaseBagelField<T> {
|
|
|
31
31
|
export interface SelectBagelField<T> extends BaseBagelField<T> {
|
|
32
32
|
$el: 'select' | typeof SelectInput;
|
|
33
33
|
id: string;
|
|
34
|
-
options: string | ({
|
|
35
|
-
label: string;
|
|
36
|
-
value: string | number;
|
|
37
|
-
} | string | number)[];
|
|
38
34
|
}
|
|
39
35
|
export type Field<T = Record<string, any>> = BaseBagelField<T> | InputBagelField<T> | SelectBagelField<T>;
|
|
40
36
|
export type BglFormSchemaT<T = Record<string, any>> = Field<T>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BagelForm.d.ts","sourceRoot":"","sources":["../../src/types/BagelForm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEhG,M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C,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAC9E,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC;CAC7D,CAAA;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IAC3D,GAAG,EAAE,MAAM,GAAG,OAAO,SAAS,CAAC;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IAC5D,GAAG,EAAE,QAAQ,GAAG,OAAO,WAAW,CAAC;IACnC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAE1G,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component
|
|
3
|
-
:
|
|
4
|
-
|
|
5
|
-
:
|
|
6
|
-
|
|
2
|
+
<component
|
|
3
|
+
:required="field.required"
|
|
4
|
+
v-bind="bindAttrs(field?.attrs || {}, fieldData, modelValue)"
|
|
5
|
+
:class="classify(fieldData, modelValue, field.class, field.attrs?.class)"
|
|
6
|
+
v-if="vIf"
|
|
7
|
+
:is="is"
|
|
8
|
+
:label="field.label"
|
|
9
|
+
:id="field.id"
|
|
10
|
+
:placeholder="field.placeholder || field.label"
|
|
11
|
+
v-model="fieldData"
|
|
12
|
+
:defaultValue="field.defaultValue"
|
|
13
|
+
:options="field.options"
|
|
14
|
+
:helptext="field.helptext"
|
|
15
|
+
@update:modelValue="($event: any) => field?.onUpdate?.($event, denullify(fieldData, field.id), formData)"
|
|
16
|
+
>
|
|
7
17
|
{{ field.transform?.(fieldData, modelValue) || fieldData || '' }}
|
|
8
|
-
<BglField
|
|
18
|
+
<BglField
|
|
19
|
+
v-model="formData"
|
|
20
|
+
v-for="(child, ii) in field.children"
|
|
21
|
+
:key="child.id || ii"
|
|
22
|
+
:field="child"
|
|
23
|
+
/>
|
|
9
24
|
</component>
|
|
10
25
|
</template>
|
|
11
26
|
|
|
12
27
|
<script lang="ts" setup>
|
|
13
28
|
import {
|
|
14
|
-
type Field, bindAttrs, classify, SelectInput, TextInput, ToggleInput, CheckInput,
|
|
29
|
+
type Field, bindAttrs, classify, SelectInput, TextInput, ToggleInput, CheckInput, denullify,
|
|
15
30
|
} from '@bagelink/vue';
|
|
16
31
|
|
|
17
32
|
const props = withDefaults(defineProps<{
|
|
@@ -43,6 +58,16 @@ const fieldData = $computed({
|
|
|
43
58
|
data[props.field.id] = val;
|
|
44
59
|
emit('update:modelValue', data);
|
|
45
60
|
},
|
|
46
|
-
get: () => (props.field.id ? props.modelValue[props.field.id] : ''),
|
|
61
|
+
get: () => (props.field.id ? props.modelValue[props.field.id] : props.field.defaultValue || ''),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const vIf = $computed(() => {
|
|
65
|
+
if (props.field['v-if'] === undefined) return true;
|
|
66
|
+
if (typeof props.field['v-if'] === 'boolean') return props.field['v-if'];
|
|
67
|
+
if (typeof props.field['v-if'] === 'string') return true;
|
|
68
|
+
if (typeof props.field['v-if'] === 'function') {
|
|
69
|
+
return props.field['v-if']?.(fieldData, formData);
|
|
70
|
+
}
|
|
71
|
+
return true;
|
|
47
72
|
});
|
|
48
73
|
</script>
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<template v-if="id">
|
|
3
|
+
<BglField v-for="(field, i) in schema" :key="field.id || `${i}p`" :field="field" v-model="data" />
|
|
4
|
+
</template>
|
|
5
|
+
<form v-else ref="form" @submit.prevent="runSubmit">
|
|
3
6
|
<Title tag="h4" :label="label" v-if="label" />
|
|
4
7
|
<BglField v-for="(field, i) in schema" :key="field.id || `${i}p`" :field="field" v-model="data" />
|
|
5
8
|
<slot name="submit" />
|
|
6
|
-
</
|
|
9
|
+
</form>
|
|
7
10
|
</template>
|
|
8
11
|
|
|
9
12
|
<script lang="ts" setup>
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="bagel-input"
|
|
4
|
+
:title="label"
|
|
5
|
+
:class="{ small: small }"
|
|
6
|
+
>
|
|
3
7
|
<label v-if="label">
|
|
4
8
|
{{ label }}
|
|
5
9
|
</label>
|
|
6
|
-
<VDatepicker
|
|
10
|
+
<VDatepicker
|
|
11
|
+
ref="datePicker"
|
|
12
|
+
:auto-apply="true"
|
|
13
|
+
v-model="date"
|
|
14
|
+
:enable-time-picker="enableTime"
|
|
15
|
+
v-bind="extraProps"
|
|
16
|
+
/>
|
|
7
17
|
</div>
|
|
8
18
|
</template>
|
|
9
19
|
|
|
10
20
|
<script setup lang="ts">
|
|
11
|
-
import VDatepicker, { DatePickerInstance } from '@vuepic/vue-datepicker';
|
|
21
|
+
import VDatepicker, { type DatePickerInstance, type VueDatePickerProps } from '@vuepic/vue-datepicker';
|
|
12
22
|
import '@vuepic/vue-datepicker/dist/main.css';
|
|
13
23
|
import { onMounted } from 'vue';
|
|
14
24
|
|
|
@@ -22,6 +32,7 @@ const props = withDefaults(
|
|
|
22
32
|
enableTime?: boolean;
|
|
23
33
|
modelValue?: string | Date;
|
|
24
34
|
defaultValue?: string | Date;
|
|
35
|
+
extraProps?: VueDatePickerProps;
|
|
25
36
|
}>(),
|
|
26
37
|
{
|
|
27
38
|
enableTime: false,
|