@bagelink/vue 1.4.22 → 1.4.28

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.
@@ -6139,42 +6139,231 @@
6139
6139
  grid-template-rows: 1fr;
6140
6140
  }
6141
6141
 
6142
- .grid-wrap-50 {
6142
+ .grid-wrap-50,
6143
+ .grid-wrap-50-fit {
6143
6144
  grid-template-columns: repeat(auto-fit, minmax(min(50px, 100%), 1fr));
6144
6145
  height: max-content;
6145
6146
  width: 100%;
6146
6147
  }
6147
6148
 
6148
- .grid-wrap-100 {
6149
+ .grid-wrap-100,
6150
+ .grid-wrap-100-fit {
6149
6151
  grid-template-columns: repeat(auto-fit, minmax(min(100px, 100%), 1fr));
6150
6152
  height: max-content;
6151
6153
  width: 100%;
6152
6154
  }
6153
6155
 
6154
- .grid-wrap-200 {
6156
+ .grid-wrap-150,
6157
+ .grid-wrap-150-fit {
6158
+ grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
6159
+ height: max-content;
6160
+ width: 100%;
6161
+ }
6162
+
6163
+ .grid-wrap-200,
6164
+ .grid-wrap-200-fit {
6155
6165
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
6156
6166
  height: max-content;
6157
6167
  width: 100%;
6158
6168
  }
6159
6169
 
6160
- .grid-wrap-300 {
6170
+ .grid-wrap-250,
6171
+ .grid-wrap-250-fit {
6172
+ grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
6173
+ height: max-content;
6174
+ width: 100%;
6175
+ }
6176
+
6177
+ .grid-wrap-300,
6178
+ .grid-wrap-300-fit {
6161
6179
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
6162
6180
  height: max-content;
6163
6181
  width: 100%;
6164
6182
  }
6165
6183
 
6166
- .grid-wrap-400 {
6184
+ .grid-wrap-350,
6185
+ .grid-wrap-350-fit {
6186
+ grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
6187
+ height: max-content;
6188
+ width: 100%;
6189
+ }
6190
+
6191
+ .grid-wrap-400,
6192
+ .grid-wrap-400-fit {
6167
6193
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
6168
6194
  height: max-content;
6169
6195
  width: 100%;
6170
6196
  }
6171
6197
 
6172
- .grid-wrap-500 {
6198
+ .grid-wrap-450,
6199
+ .grid-wrap-450-fit {
6200
+ grid-template-columns: repeat(auto-fit, minmax(min(450px, 100%), 1fr));
6201
+ height: max-content;
6202
+ width: 100%;
6203
+ }
6204
+
6205
+ .grid-wrap-500,
6206
+ .grid-wrap-500-fit {
6173
6207
  grid-template-columns: repeat(auto-fit, minmax(min(500px, 100%), 1fr));
6174
6208
  height: max-content;
6175
6209
  width: 100%;
6176
6210
  }
6177
6211
 
6212
+ .grid-wrap-550,
6213
+ .grid-wrap-550-fit {
6214
+ grid-template-columns: repeat(auto-fit, minmax(min(550px, 100%), 1fr));
6215
+ height: max-content;
6216
+ width: 100%;
6217
+ }
6218
+
6219
+ .grid-wrap-600,
6220
+ .grid-wrap-600-fit {
6221
+ grid-template-columns: repeat(auto-fit, minmax(min(600px, 100%), 1fr));
6222
+ height: max-content;
6223
+ width: 100%;
6224
+ }
6225
+
6226
+ .grid-wrap-650,
6227
+ .grid-wrap-650-fit {
6228
+ grid-template-columns: repeat(auto-fit, minmax(min(650px, 100%), 1fr));
6229
+ height: max-content;
6230
+ width: 100%;
6231
+ }
6232
+
6233
+ .grid-wrap-700,
6234
+ .grid-wrap-700-fit {
6235
+ grid-template-columns: repeat(auto-fit, minmax(min(700px, 100%), 1fr));
6236
+ height: max-content;
6237
+ width: 100%;
6238
+ }
6239
+
6240
+ .grid-wrap-750,
6241
+ .grid-wrap-750-fit {
6242
+ grid-template-columns: repeat(auto-fit, minmax(min(750px, 100%), 1fr));
6243
+ height: max-content;
6244
+ width: 100%;
6245
+ }
6246
+
6247
+ .grid-wrap-800,
6248
+ .grid-wrap-800-fit {
6249
+ grid-template-columns: repeat(auto-fit, minmax(min(800px, 100%), 1fr));
6250
+ height: max-content;
6251
+ width: 100%;
6252
+ }
6253
+
6254
+ .grid-wrap-850,
6255
+ .grid-wrap-850-fit {
6256
+ grid-template-columns: repeat(auto-fit, minmax(min(850px, 100%), 1fr));
6257
+ height: max-content;
6258
+ width: 100%;
6259
+ }
6260
+
6261
+ .grid-wrap-900,
6262
+ .grid-wrap-900-fit {
6263
+ grid-template-columns: repeat(auto-fit, minmax(min(900px, 100%), 1fr));
6264
+ height: max-content;
6265
+ width: 100%;
6266
+ }
6267
+
6268
+ .grid-wrap-950,
6269
+ .grid-wrap-950-fit {
6270
+ grid-template-columns: repeat(auto-fit, minmax(min(950px, 100%), 1fr));
6271
+ height: max-content;
6272
+ width: 100%;
6273
+ }
6274
+
6275
+ .grid-wrap-1000,
6276
+ .grid-wrap-1000-fit {
6277
+ grid-template-columns: repeat(auto-fit, minmax(min(1000px, 100%), 1fr));
6278
+ height: max-content;
6279
+ width: 100%;
6280
+ }
6281
+
6282
+
6283
+
6284
+ .grid-wrap-50-fill {
6285
+ grid-template-columns: repeat(auto-fill, minmax(min(50px, 100%), 1fr));
6286
+ }
6287
+
6288
+ .grid-wrap-100-fill {
6289
+ grid-template-columns: repeat(auto-fill, minmax(min(100px, 100%), 1fr));
6290
+ }
6291
+
6292
+ .grid-wrap-150-fill {
6293
+ grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
6294
+ }
6295
+
6296
+ .grid-wrap-200-fill {
6297
+ grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
6298
+ }
6299
+
6300
+ .grid-wrap-250-fill {
6301
+ grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
6302
+ }
6303
+
6304
+ .grid-wrap-300-fill {
6305
+ grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
6306
+ }
6307
+
6308
+ .grid-wrap-350-fill {
6309
+ grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
6310
+ }
6311
+
6312
+ .grid-wrap-400-fill {
6313
+ grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr));
6314
+ }
6315
+
6316
+ .grid-wrap-450-fill {
6317
+ grid-template-columns: repeat(auto-fill, minmax(min(450px, 100%), 1fr));
6318
+ }
6319
+
6320
+ .grid-wrap-500-fill {
6321
+ grid-template-columns: repeat(auto-fill, minmax(min(500px, 100%), 1fr));
6322
+ }
6323
+
6324
+ .grid-wrap-550-fill {
6325
+ grid-template-columns: repeat(auto-fill, minmax(min(550px, 100%), 1fr));
6326
+ }
6327
+
6328
+ .grid-wrap-600-fill {
6329
+ grid-template-columns: repeat(auto-fill, minmax(min(600px, 100%), 1fr));
6330
+ }
6331
+
6332
+ .grid-wrap-650-fill {
6333
+ grid-template-columns: repeat(auto-fill, minmax(min(650px, 100%), 1fr));
6334
+ }
6335
+
6336
+ .grid-wrap-700-fill {
6337
+ grid-template-columns: repeat(auto-fill, minmax(min(700px, 100%), 1fr));
6338
+ }
6339
+
6340
+ .grid-wrap-750-fill {
6341
+ grid-template-columns: repeat(auto-fill, minmax(min(750px, 100%), 1fr));
6342
+ }
6343
+
6344
+ .grid-wrap-800-fill {
6345
+ grid-template-columns: repeat(auto-fill, minmax(min(800px, 100%), 1fr));
6346
+ }
6347
+
6348
+ .grid-wrap-850-fill {
6349
+ grid-template-columns: repeat(auto-fill, minmax(min(850px, 100%), 1fr));
6350
+ }
6351
+
6352
+ .grid-wrap-900-fill {
6353
+ grid-template-columns: repeat(auto-fill, minmax(min(900px, 100%), 1fr));
6354
+ }
6355
+
6356
+ .grid-wrap-950-fill {
6357
+ grid-template-columns: repeat(auto-fill, minmax(min(950px, 100%), 1fr));
6358
+ }
6359
+
6360
+ .grid-wrap-1000-fill {
6361
+ grid-template-columns: repeat(auto-fill, minmax(min(1000px, 100%), 1fr));
6362
+ }
6363
+
6364
+
6365
+
6366
+
6178
6367
  .grid-wrap-1 {
6179
6368
  grid-template-columns: repeat(1, 1fr);
6180
6369
  height: max-content;
@@ -5396,40 +5396,227 @@
5396
5396
  }
5397
5397
 
5398
5398
 
5399
- .m_grid-wrap-50 {
5399
+
5400
+ .m_grid-wrap-50,
5401
+ .m_grid-wrap-50-fit {
5400
5402
  grid-template-columns: repeat(auto-fit, minmax(min(50px, 100%), 1fr));
5401
5403
  height: max-content;
5402
- width: 100%
5404
+ width: 100%;
5403
5405
  }
5404
5406
 
5405
- .m_grid-wrap-100 {
5407
+ .m_grid-wrap-100,
5408
+ .m_grid-wrap-100-fit {
5406
5409
  grid-template-columns: repeat(auto-fit, minmax(min(100px, 100%), 1fr));
5407
5410
  height: max-content;
5408
- width: 100%
5411
+ width: 100%;
5412
+ }
5413
+
5414
+ .m_grid-wrap-150,
5415
+ .m_grid-wrap-150-fit {
5416
+ grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
5417
+ height: max-content;
5418
+ width: 100%;
5409
5419
  }
5410
5420
 
5411
- .m_grid-wrap-200 {
5421
+ .m_grid-wrap-200,
5422
+ .m_grid-wrap-200-fit {
5412
5423
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
5413
5424
  height: max-content;
5414
- width: 100%
5425
+ width: 100%;
5415
5426
  }
5416
5427
 
5417
- .m_grid-wrap-300 {
5428
+ .m_grid-wrap-250,
5429
+ .m_grid-wrap-250-fit {
5430
+ grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
5431
+ height: max-content;
5432
+ width: 100%;
5433
+ }
5434
+
5435
+ .m_grid-wrap-300,
5436
+ .m_grid-wrap-300-fit {
5418
5437
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
5419
5438
  height: max-content;
5420
- width: 100%
5439
+ width: 100%;
5421
5440
  }
5422
5441
 
5423
- .m_grid-wrap-400 {
5442
+ .m_grid-wrap-350,
5443
+ .m_grid-wrap-350-fit {
5444
+ grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
5445
+ height: max-content;
5446
+ width: 100%;
5447
+ }
5448
+
5449
+ .m_grid-wrap-400,
5450
+ .m_grid-wrap-400-fit {
5424
5451
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
5425
5452
  height: max-content;
5426
- width: 100%
5453
+ width: 100%;
5427
5454
  }
5428
5455
 
5429
- .m_grid-wrap-500 {
5456
+ .m_grid-wrap-450,
5457
+ .m_grid-wrap-450-fit {
5458
+ grid-template-columns: repeat(auto-fit, minmax(min(450px, 100%), 1fr));
5459
+ height: max-content;
5460
+ width: 100%;
5461
+ }
5462
+
5463
+ .m_grid-wrap-500,
5464
+ .m_grid-wrap-500-fit {
5430
5465
  grid-template-columns: repeat(auto-fit, minmax(min(500px, 100%), 1fr));
5431
5466
  height: max-content;
5432
- width: 100%
5467
+ width: 100%;
5468
+ }
5469
+
5470
+ .m_grid-wrap-550,
5471
+ .m_grid-wrap-550-fit {
5472
+ grid-template-columns: repeat(auto-fit, minmax(min(550px, 100%), 1fr));
5473
+ height: max-content;
5474
+ width: 100%;
5475
+ }
5476
+
5477
+ .m_grid-wrap-600,
5478
+ .m_grid-wrap-600-fit {
5479
+ grid-template-columns: repeat(auto-fit, minmax(min(600px, 100%), 1fr));
5480
+ height: max-content;
5481
+ width: 100%;
5482
+ }
5483
+
5484
+ .m_grid-wrap-650,
5485
+ .m_grid-wrap-650-fit {
5486
+ grid-template-columns: repeat(auto-fit, minmax(min(650px, 100%), 1fr));
5487
+ height: max-content;
5488
+ width: 100%;
5489
+ }
5490
+
5491
+ .m_grid-wrap-700,
5492
+ .m_grid-wrap-700-fit {
5493
+ grid-template-columns: repeat(auto-fit, minmax(min(700px, 100%), 1fr));
5494
+ height: max-content;
5495
+ width: 100%;
5496
+ }
5497
+
5498
+ .m_grid-wrap-750,
5499
+ .m_grid-wrap-750-fit {
5500
+ grid-template-columns: repeat(auto-fit, minmax(min(750px, 100%), 1fr));
5501
+ height: max-content;
5502
+ width: 100%;
5503
+ }
5504
+
5505
+ .m_grid-wrap-800,
5506
+ .m_grid-wrap-800-fit {
5507
+ grid-template-columns: repeat(auto-fit, minmax(min(800px, 100%), 1fr));
5508
+ height: max-content;
5509
+ width: 100%;
5510
+ }
5511
+
5512
+ .m_grid-wrap-850,
5513
+ .m_grid-wrap-850-fit {
5514
+ grid-template-columns: repeat(auto-fit, minmax(min(850px, 100%), 1fr));
5515
+ height: max-content;
5516
+ width: 100%;
5517
+ }
5518
+
5519
+ .m_grid-wrap-900,
5520
+ .m_grid-wrap-900-fit {
5521
+ grid-template-columns: repeat(auto-fit, minmax(min(900px, 100%), 1fr));
5522
+ height: max-content;
5523
+ width: 100%;
5524
+ }
5525
+
5526
+ .m_grid-wrap-950,
5527
+ .m_grid-wrap-950-fit {
5528
+ grid-template-columns: repeat(auto-fit, minmax(min(950px, 100%), 1fr));
5529
+ height: max-content;
5530
+ width: 100%;
5531
+ }
5532
+
5533
+ .m_grid-wrap-1000,
5534
+ .m_grid-wrap-1000-fit {
5535
+ grid-template-columns: repeat(auto-fit, minmax(min(1000px, 100%), 1fr));
5536
+ height: max-content;
5537
+ width: 100%;
5538
+ }
5539
+
5540
+
5541
+
5542
+ .m_grid-wrap-50-fill {
5543
+ grid-template-columns: repeat(auto-fill, minmax(min(50px, 100%), 1fr));
5544
+ }
5545
+
5546
+ .m_grid-wrap-100-fill {
5547
+ grid-template-columns: repeat(auto-fill, minmax(min(100px, 100%), 1fr));
5548
+ }
5549
+
5550
+ .m_grid-wrap-150-fill {
5551
+ grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
5552
+ }
5553
+
5554
+ .m_grid-wrap-200-fill {
5555
+ grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
5556
+ }
5557
+
5558
+ .m_grid-wrap-250-fill {
5559
+ grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
5560
+ }
5561
+
5562
+ .m_grid-wrap-300-fill {
5563
+ grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
5564
+ }
5565
+
5566
+ .m_grid-wrap-350-fill {
5567
+ grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
5568
+ }
5569
+
5570
+ .m_grid-wrap-400-fill {
5571
+ grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr));
5572
+ }
5573
+
5574
+ .m_grid-wrap-450-fill {
5575
+ grid-template-columns: repeat(auto-fill, minmax(min(450px, 100%), 1fr));
5576
+ }
5577
+
5578
+ .m_grid-wrap-500-fill {
5579
+ grid-template-columns: repeat(auto-fill, minmax(min(500px, 100%), 1fr));
5580
+ }
5581
+
5582
+ .m_grid-wrap-550-fill {
5583
+ grid-template-columns: repeat(auto-fill, minmax(min(550px, 100%), 1fr));
5584
+ }
5585
+
5586
+ .m_grid-wrap-600-fill {
5587
+ grid-template-columns: repeat(auto-fill, minmax(min(600px, 100%), 1fr));
5588
+ }
5589
+
5590
+ .m_grid-wrap-650-fill {
5591
+ grid-template-columns: repeat(auto-fill, minmax(min(650px, 100%), 1fr));
5592
+ }
5593
+
5594
+ .m_grid-wrap-700-fill {
5595
+ grid-template-columns: repeat(auto-fill, minmax(min(700px, 100%), 1fr));
5596
+ }
5597
+
5598
+ .m_grid-wrap-750-fill {
5599
+ grid-template-columns: repeat(auto-fill, minmax(min(750px, 100%), 1fr));
5600
+ }
5601
+
5602
+ .m_grid-wrap-800-fill {
5603
+ grid-template-columns: repeat(auto-fill, minmax(min(800px, 100%), 1fr));
5604
+ }
5605
+
5606
+ .m_grid-wrap-850-fill {
5607
+ grid-template-columns: repeat(auto-fill, minmax(min(850px, 100%), 1fr));
5608
+ }
5609
+
5610
+ .m_grid-wrap-900-fill {
5611
+ grid-template-columns: repeat(auto-fill, minmax(min(900px, 100%), 1fr));
5612
+ }
5613
+
5614
+ .m_grid-wrap-950-fill {
5615
+ grid-template-columns: repeat(auto-fill, minmax(min(950px, 100%), 1fr));
5616
+ }
5617
+
5618
+ .m_grid-wrap-1000-fill {
5619
+ grid-template-columns: repeat(auto-fill, minmax(min(1000px, 100%), 1fr));
5433
5620
  }
5434
5621
 
5435
5622
  .m_grid-wrap-1 {
@@ -1,4 +1,4 @@
1
- import type { SelectInput, TextInput } from '@bagelink/vue'
1
+ import type { ArrayAttrs, FieldArray, SelectInput, TextInput } from '@bagelink/vue'
2
2
  import type { Paths, Get, IterableElement, OmitIndexSignature } from 'type-fest'
3
3
  import type { ToString } from 'type-fest/source/internal'
4
4
  import type { LiteralStringUnion } from 'type-fest/source/literal-union'
@@ -163,6 +163,16 @@ export interface SelectBagelField<
163
163
  type?: string
164
164
  }
165
165
 
166
+ export interface ArrayBagelField<
167
+ T,
168
+ P extends Path<T, PO>,
169
+ PO extends PathsOptions = DefaultPathsOptions,
170
+ >
171
+ extends BaseBagelField<T, P, PO> {
172
+ $el: 'array' | ComponentExposed<typeof FieldArray>
173
+ attrs?: ArrayAttrs<T, P>
174
+ }
175
+
166
176
  export interface ValidateInputBaseT {
167
177
  validate?: ValidationFn<{ [key: string]: unknown }, string>
168
178
  getFormData?: () => any
@@ -1,7 +1,8 @@
1
- import type { ArrayFieldVal, Attributes, BaseBagelField, BglFormSchemaT, FieldByP, IconType, InputBagelField, Option, Path, SchemaChild, SelectBagelField, ShallowBglFormSchemaT, UploadInputProps } from '@bagelink/vue'
1
+ import type { ArrayBagelField, ArrayFieldVal, Attributes, BaseBagelField, BglFormSchemaT, FieldByP, IconType, InputBagelField, Option, Path, SchemaChild, SelectBagelField, ShallowBglFormSchemaT, UploadInputProps } from '@bagelink/vue'
2
2
  import type { DefaultPathsOptions, PathsOptions } from 'type-fest/source/paths'
3
+ import type { InputTypeHTMLAttribute } from 'vue'
3
4
 
4
- interface InputOptions<
5
+ export interface InputOptions<
5
6
  T,
6
7
  P extends Path<T>
7
8
  > extends Partial<BaseBagelField<T, P>> {
@@ -9,15 +10,15 @@ interface InputOptions<
9
10
  autocomplete?: AutoFillField
10
11
  }
11
12
 
12
- interface DateOptions<T, K extends Path<T>> extends InputOptions<T, K> {
13
+ export interface DateOptions<T, K extends Path<T>> extends InputOptions<T, K> {
13
14
  enableTime?: boolean
14
15
  mode?: 'day' | 'month' | 'year'
15
16
  locale?: string
16
17
  timezone?: string
17
18
  }
18
19
 
19
- interface TextInputOptions<T, K extends Path<T>> extends InputOptions<T, K> {
20
- type?: 'text' | 'tel' | 'email' | 'time'
20
+ export interface TextInputOptions<T, K extends Path<T>> extends InputOptions<T, K> {
21
+ type?: InputTypeHTMLAttribute
21
22
  pattern?: string
22
23
  multiline?: boolean
23
24
  autoheight?: boolean
@@ -27,14 +28,14 @@ interface TextInputOptions<T, K extends Path<T>> extends InputOptions<T, K> {
27
28
  iconStart?: IconType
28
29
  }
29
30
 
30
- interface SlctInputOptions<T, K extends Path<T>> extends InputOptions<T, K> {
31
+ export interface SlctInputOptions<T, K extends Path<T>> extends InputOptions<T, K> {
31
32
  searchable?: boolean
32
33
  multiselect?: boolean
33
34
  clearable?: boolean
34
35
  onSearch?: (search: string) => any
35
36
  }
36
37
 
37
- interface NumFieldOptions<T, K extends Path<T>> extends InputOptions<T, K> {
38
+ export interface NumFieldOptions<T, K extends Path<T>> extends InputOptions<T, K> {
38
39
  max?: number
39
40
  min?: number
40
41
  step?: number
@@ -44,16 +45,11 @@ interface NumFieldOptions<T, K extends Path<T>> extends InputOptions<T, K> {
44
45
  useGrouping?: boolean
45
46
  }
46
47
 
47
- type RichTextOptions<
48
- T,
49
- P extends Path<T>
50
- > = InputOptions<T, P>
48
+ export interface RichTextOptions<T, P extends Path<T>> extends InputOptions<T, P> {
49
+ height?: number | string
50
+ }
51
51
 
52
- export function getBaseField<
53
- T,
54
- P extends Path<T, PO>,
55
- PO extends PathsOptions = DefaultPathsOptions,
56
- >(
52
+ export function getBaseField<T, P extends Path<T, PO>, PO extends PathsOptions = DefaultPathsOptions>(
57
53
  id?: P,
58
54
  labelOrRest: string | Partial<BaseBagelField<T, P>> = {},
59
55
  rest: Partial<BaseBagelField<T, P>> = {}
@@ -80,6 +76,7 @@ export function richText<
80
76
  vIf: options?.vIf,
81
77
  placeholder: options?.placeholder,
82
78
  attrs: {
79
+ height: options?.height,
83
80
  autocomplete: options?.autocomplete,
84
81
  },
85
82
  }
@@ -412,11 +409,15 @@ export function findBglFieldById<T>(id: string, _schema: ShallowBglFormSchemaT<T
412
409
  return undefined
413
410
  }
414
411
 
415
- export interface ArrayFieldOptions<T, K extends Path<T>> extends InputOptions<T, K> {
412
+ export interface ArrayAttrs<T, P extends Path<T>> extends Attributes<T, P> {
416
413
  delete?: boolean
417
414
  add?: boolean
415
+ // schema?: MaybeRefOrGetter<BglFormSchemaT<ArrayFieldVal<T, P>>>
416
+ // type?: ArrayType
418
417
  }
419
418
 
419
+ export interface ArrayFieldOptions<T, K extends Path<T>> extends InputOptions<T, K>, ArrayAttrs<T, K> {}
420
+
420
421
  export type ArrayType = 'number' | 'text'
421
422
 
422
423
  export function arrField<
@@ -428,13 +429,18 @@ export function arrField<
428
429
  label: string,
429
430
  schemaOrType: BglFormSchemaT<ArrayFieldVal<T, P>> | ArrayType,
430
431
  options?: ArrayFieldOptions<T, P>
431
- ): BaseBagelField<T, P, PO> {
432
- const attrs: Attributes<T, P> = { delete: true, add: true, ...options }
433
-
434
- if (typeof schemaOrType === 'string') {
435
- attrs.type = schemaOrType
436
- } else {
437
- attrs.schema = schemaOrType
432
+ ): ArrayBagelField<T, P, PO> {
433
+ const arraySpecificAttrs = (
434
+ typeof schemaOrType === 'string'
435
+ ? { type: schemaOrType }
436
+ : { schema: schemaOrType }
437
+ )
438
+
439
+ const attrs: ArrayAttrs<T, P> = {
440
+ delete: true,
441
+ add: true,
442
+ ...options,
443
+ ...arraySpecificAttrs,
438
444
  }
439
445
 
440
446
  return {
@@ -473,6 +479,7 @@ export function useForm() {
473
479
  checkField,
474
480
  dateField,
475
481
  numField,
482
+ emailField,
476
483
  frmRow,
477
484
  uploadField,
478
485
  rangeField,
@@ -1,31 +1,43 @@
1
1
  import type { ComputedRef, MaybeRefOrGetter } from 'vue'
2
2
  import { computed, ref, watch, toValue } from 'vue'
3
+
4
+ const htmlReplacers = {
5
+ '': /<[^>]*>?/g,
6
+ ' ': /&nbsp;/g,
7
+ '"': /&quot;/g,
8
+ '\'': /&apos;/g,
9
+ '&': /&amp;/g,
10
+ '<': /&lt;/g,
11
+ '>': /&gt;/g,
12
+ } as const
13
+
3
14
  /**
4
15
  * Clears HTML tags from a string
5
16
  * @param html - HTML string to clean
6
17
  * @returns Plain text without HTML tags
7
18
  */
8
-
9
19
  export function clearHtml(value?: string) {
10
20
  if (!value) return ''
11
- return value
12
- .replace(/<[^>]*>?/g, '')
13
- .replace(/&nbsp;/g, ' ')
14
- .replace(/&quot;/g, '"')
15
- .replace(/&apos;/g, `'`)
16
- .replace(/&amp;/g, '&')
17
- .replace(/&lt;/g, '<')
18
- .replace(/&gt;/g, '>')
21
+ return Object.entries(htmlReplacers)
22
+ .reduce(
23
+ (
24
+ text,
25
+ [replacement, regex]
26
+ ) => (
27
+ text.replace(regex, replacement)
28
+ ),
29
+ value
30
+ )
19
31
  }
20
32
 
33
+ const normalizeSearchChars = /[\p{N}\p{L}\s]/gu
21
34
  /**
22
35
  * Normalizes text by removing special characters and converting to lowercase
23
36
  * @param text - Text to normalize
24
37
  * @returns Normalized text
25
38
  */
26
39
  export function normalizeText(text: string): string {
27
- const searchChars = /[\p{N}\p{L}\s]/gu
28
- return text.match(searchChars)?.join('').toLowerCase() ?? ''
40
+ return text.match(normalizeSearchChars)?.join('').toLowerCase() ?? ''
29
41
  }
30
42
 
31
43
  /**