@adyen/bento-vue2 1.76.2 → 1.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +300 -35
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown-tag.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/payment-method.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/tag.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{checkbox-group.CtNVRcmP.js → checkbox-group.C3RH5Gcg.js} +2 -2
- package/dist/chunks/{checkbox-group.CtNVRcmP.js.map → checkbox-group.C3RH5Gcg.js.map} +1 -1
- package/dist/chunks/{checkbox.nyUc0gLb.js → checkbox.itbBlXev.js} +3 -3
- package/dist/chunks/{checkbox.nyUc0gLb.js.map → checkbox.itbBlXev.js.map} +1 -1
- package/dist/chunks/{code-snippet.DFf3KMSi.js → code-snippet.BEbA1bIn.js} +2 -2
- package/dist/chunks/{code-snippet.DFf3KMSi.js.map → code-snippet.BEbA1bIn.js.map} +1 -1
- package/dist/chunks/{currency.AvvbekWO.js → currency.Cwhzzxw2.js} +2 -2
- package/dist/chunks/{currency.AvvbekWO.js.map → currency.Cwhzzxw2.js.map} +1 -1
- package/dist/chunks/{data-grid.C07AmPwV.js → data-grid.B-kBw540.js} +7 -7
- package/dist/chunks/{data-grid.C07AmPwV.js.map → data-grid.B-kBw540.js.map} +1 -1
- package/dist/chunks/date-picker.CKaQJcPa.js +168 -0
- package/dist/chunks/date-picker.CKaQJcPa.js.map +1 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js +5 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -0
- package/dist/chunks/date-range-picker.BtPxkPN0.js +942 -0
- package/dist/chunks/date-range-picker.BtPxkPN0.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.yLeN0E2z.js → dropdown-default-textbox.BCOVaw-a.js} +10 -10
- package/dist/chunks/dropdown-default-textbox.BCOVaw-a.js.map +1 -0
- package/dist/chunks/dropdown-tag.BXMgDH3v.js +294 -0
- package/dist/chunks/dropdown-tag.BXMgDH3v.js.map +1 -0
- package/dist/chunks/{dropdown.RxD2TqnP.js → dropdown.-3x2IBDg.js} +305 -297
- package/dist/chunks/{dropdown.RxD2TqnP.js.map → dropdown.-3x2IBDg.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{file-uploader.BGoCYrnw.js → file-uploader.BkTtqgvQ.js} +296 -295
- package/dist/chunks/{file-uploader.BGoCYrnw.js.map → file-uploader.BkTtqgvQ.js.map} +1 -1
- package/dist/chunks/{filter-bar.DVqgwt2p.js → filter-bar.BLnSnOlj.js} +201 -201
- package/dist/chunks/filter-bar.BLnSnOlj.js.map +1 -0
- package/dist/chunks/form-field.BBqLu-vs.js +10 -0
- package/dist/chunks/form-field.BBqLu-vs.js.map +1 -0
- package/dist/chunks/get-slot-text.Bjb9dTSV.js +12 -0
- package/dist/chunks/get-slot-text.Bjb9dTSV.js.map +1 -0
- package/dist/chunks/{header-with-views.jnhILkoQ.js → header-with-views.C6Y7mAkq.js} +3 -3
- package/dist/chunks/{header-with-views.jnhILkoQ.js.map → header-with-views.C6Y7mAkq.js.map} +1 -1
- package/dist/chunks/{input-field-password.CHn2GUcL.js → input-field-password.sthICA2L.js} +3 -3
- package/dist/chunks/{input-field-password.CHn2GUcL.js.map → input-field-password.sthICA2L.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CpnfVw6w.js → input-field-phone-number.BjinuvOl.js} +5 -5
- package/dist/chunks/{input-field-phone-number.CpnfVw6w.js.map → input-field-phone-number.BjinuvOl.js.map} +1 -1
- package/dist/chunks/{input-field.sGmuIXiw.js → input-field.CwKD3p3q.js} +34 -34
- package/dist/chunks/input-field.CwKD3p3q.js.map +1 -0
- package/dist/chunks/link.D8qpqg3W.js.map +1 -1
- package/dist/chunks/{listbox-option-tag.Dl8GwHLT.js → listbox-option-tag.DkPz3wPc.js} +2 -2
- package/dist/chunks/{listbox-option-tag.Dl8GwHLT.js.map → listbox-option-tag.DkPz3wPc.js.map} +1 -1
- package/dist/chunks/{pagination.C0YW_A_o.js → pagination.BzyyZJy6.js} +7 -7
- package/dist/chunks/pagination.BzyyZJy6.js.map +1 -0
- package/dist/chunks/{payment-method.DtvfUnit.js → payment-method.CcASYR3B.js} +12 -12
- package/dist/chunks/payment-method.CcASYR3B.js.map +1 -0
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
- package/dist/chunks/{radio-group.AcYMFudv.js → radio-group.B8ukv-pw.js} +3 -3
- package/dist/chunks/{radio-group.AcYMFudv.js.map → radio-group.B8ukv-pw.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.eYW8X_YP.js → rich-text-editor.DzH-Z5oi.js} +2 -2
- package/dist/chunks/{rich-text-editor.eYW8X_YP.js.map → rich-text-editor.DzH-Z5oi.js.map} +1 -1
- package/dist/chunks/{search-bar.D8SJsbze.js → search-bar.CgzPXP8r.js} +3 -3
- package/dist/chunks/{search-bar.D8SJsbze.js.map → search-bar.CgzPXP8r.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BFiTQaag.js → secondary-nav.3eZKyb8K.js} +4 -4
- package/dist/chunks/secondary-nav.3eZKyb8K.js.map +1 -0
- package/dist/chunks/{summary-grid.types.B80533d1.js → summary-grid.types.CaYrtyVO.js} +2 -2
- package/dist/chunks/{summary-grid.types.B80533d1.js.map → summary-grid.types.CaYrtyVO.js.map} +1 -1
- package/dist/chunks/tag.BltIbSh3.js +44 -0
- package/dist/chunks/tag.BltIbSh3.js.map +1 -0
- package/dist/chunks/textarea.h-WF62HP.js +173 -0
- package/dist/chunks/textarea.h-WF62HP.js.map +1 -0
- package/dist/chunks/{timeline-item.CZBuknZ_.js → timeline-item.BLhS7uNF.js} +5 -5
- package/dist/chunks/timeline-item.BLhS7uNF.js.map +1 -0
- package/dist/chunks/{toggle.BJMXpHRu.js → toggle.D2wmNu7m.js} +2 -2
- package/dist/chunks/{toggle.BJMXpHRu.js.map → toggle.D2wmNu7m.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +7 -6
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/index.js +247 -246
- package/dist/index.js.map +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/styles/bento-dark.css +4 -0
- package/dist/styles/bento-light.css +4 -0
- package/dist/styles/bento.css +4 -0
- package/dist/styles/legacy.css +4 -0
- package/dist/styles/styleguide.css +4 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/web-types.json +144 -6
- package/package.json +6 -6
- package/dist/chunks/date-picker.DImAYvoM.js +0 -158
- package/dist/chunks/date-picker.DImAYvoM.js.map +0 -1
- package/dist/chunks/date-range-picker.NAG_5i8I.js +0 -914
- package/dist/chunks/date-range-picker.NAG_5i8I.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.yLeN0E2z.js.map +0 -1
- package/dist/chunks/dropdown-tag.CpvU8eSZ.js +0 -260
- package/dist/chunks/dropdown-tag.CpvU8eSZ.js.map +0 -1
- package/dist/chunks/filter-bar.DVqgwt2p.js.map +0 -1
- package/dist/chunks/get-slot-text.BQS5Olxm.js +0 -12
- package/dist/chunks/get-slot-text.BQS5Olxm.js.map +0 -1
- package/dist/chunks/input-field.sGmuIXiw.js.map +0 -1
- package/dist/chunks/pagination.C0YW_A_o.js.map +0 -1
- package/dist/chunks/payment-method.DtvfUnit.js.map +0 -1
- package/dist/chunks/secondary-nav.BFiTQaag.js.map +0 -1
- package/dist/chunks/tag.BwKc2d2E.js +0 -44
- package/dist/chunks/tag.BwKc2d2E.js.map +0 -1
- package/dist/chunks/textarea.CIQuLWQ8.js +0 -165
- package/dist/chunks/textarea.CIQuLWQ8.js.map +0 -1
- package/dist/chunks/timeline-item.CZBuknZ_.js.map +0 -1
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "@adyen/bento-vue2",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.77.0",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -5455,6 +5455,16 @@
|
|
|
5455
5455
|
},
|
|
5456
5456
|
"default": "null"
|
|
5457
5457
|
},
|
|
5458
|
+
{
|
|
5459
|
+
"name": "modelValue",
|
|
5460
|
+
"required": false,
|
|
5461
|
+
"description": "Selected date",
|
|
5462
|
+
"value": {
|
|
5463
|
+
"kind": "expression",
|
|
5464
|
+
"type": "union"
|
|
5465
|
+
},
|
|
5466
|
+
"default": "null"
|
|
5467
|
+
},
|
|
5458
5468
|
{
|
|
5459
5469
|
"name": "value",
|
|
5460
5470
|
"required": false,
|
|
@@ -5476,11 +5486,29 @@
|
|
|
5476
5486
|
"default": "undefined"
|
|
5477
5487
|
}
|
|
5478
5488
|
],
|
|
5489
|
+
"events": [
|
|
5490
|
+
{
|
|
5491
|
+
"name": "update:model-value",
|
|
5492
|
+
"description": "Emitted when the component's model changes."
|
|
5493
|
+
},
|
|
5494
|
+
{
|
|
5495
|
+
"name": "input",
|
|
5496
|
+
"description": "Emitted when the component's model changes."
|
|
5497
|
+
}
|
|
5498
|
+
],
|
|
5479
5499
|
"source": {
|
|
5480
5500
|
"module": "./src/components/date-picker/date-picker.vue",
|
|
5481
5501
|
"symbol": "default"
|
|
5482
5502
|
}
|
|
5483
5503
|
},
|
|
5504
|
+
{
|
|
5505
|
+
"name": "date-picker-default-example",
|
|
5506
|
+
"description": "",
|
|
5507
|
+
"source": {
|
|
5508
|
+
"module": "./src/components/date-picker/__tests__/date-picker-default-example.vue",
|
|
5509
|
+
"symbol": "default"
|
|
5510
|
+
}
|
|
5511
|
+
},
|
|
5484
5512
|
{
|
|
5485
5513
|
"name": "date-range-picker",
|
|
5486
5514
|
"description": "",
|
|
@@ -5785,8 +5813,9 @@
|
|
|
5785
5813
|
"description": "Number of months rendered on pane",
|
|
5786
5814
|
"value": {
|
|
5787
5815
|
"kind": "expression",
|
|
5788
|
-
"type": "Calendar.props.numberOfMonths"
|
|
5789
|
-
}
|
|
5816
|
+
"type": "Calendar.props.numberOfMonths.type"
|
|
5817
|
+
},
|
|
5818
|
+
"default": "Calendar.props.numberOfMonths.default"
|
|
5790
5819
|
},
|
|
5791
5820
|
{
|
|
5792
5821
|
"name": "showEndDateOnOpen",
|
|
@@ -6258,6 +6287,16 @@
|
|
|
6258
6287
|
},
|
|
6259
6288
|
"default": "null"
|
|
6260
6289
|
},
|
|
6290
|
+
{
|
|
6291
|
+
"name": "modelValue",
|
|
6292
|
+
"required": false,
|
|
6293
|
+
"description": "The `input` value.\nProviding an empty string will select no options.\nSet to an empty string `''` if you don't want any of the available options to be selected.",
|
|
6294
|
+
"value": {
|
|
6295
|
+
"kind": "expression",
|
|
6296
|
+
"type": "BentoListboxSelectedValue"
|
|
6297
|
+
},
|
|
6298
|
+
"default": "null"
|
|
6299
|
+
},
|
|
6261
6300
|
{
|
|
6262
6301
|
"name": "virtualScroll",
|
|
6263
6302
|
"required": false,
|
|
@@ -6284,6 +6323,10 @@
|
|
|
6284
6323
|
"name": "input",
|
|
6285
6324
|
"description": "Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model."
|
|
6286
6325
|
},
|
|
6326
|
+
{
|
|
6327
|
+
"name": "update:model-value",
|
|
6328
|
+
"description": "Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model."
|
|
6329
|
+
},
|
|
6287
6330
|
{
|
|
6288
6331
|
"name": "show-more",
|
|
6289
6332
|
"description": "Emitted when:\n- `lazyLoad` is `automatic` and the scroll meets the end of the list\n- `lazyload` is `button` and the button is clicked"
|
|
@@ -6325,6 +6368,10 @@
|
|
|
6325
6368
|
"name": "input",
|
|
6326
6369
|
"description": "Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model."
|
|
6327
6370
|
},
|
|
6371
|
+
{
|
|
6372
|
+
"name": "update:model-value",
|
|
6373
|
+
"description": "Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model."
|
|
6374
|
+
},
|
|
6328
6375
|
{
|
|
6329
6376
|
"name": "show-more",
|
|
6330
6377
|
"description": "Emitted when:\n- `lazyLoad` is `automatic` and the scroll meets the end of the list\n- `lazyload` is `button` and the button is clicked"
|
|
@@ -6511,6 +6558,9 @@
|
|
|
6511
6558
|
}
|
|
6512
6559
|
],
|
|
6513
6560
|
"slots": [
|
|
6561
|
+
{
|
|
6562
|
+
"name": "display-value"
|
|
6563
|
+
},
|
|
6514
6564
|
{
|
|
6515
6565
|
"name": "default"
|
|
6516
6566
|
},
|
|
@@ -6575,6 +6625,10 @@
|
|
|
6575
6625
|
"name": "input",
|
|
6576
6626
|
"description": "Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model."
|
|
6577
6627
|
},
|
|
6628
|
+
{
|
|
6629
|
+
"name": "update:model-value",
|
|
6630
|
+
"description": "Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model."
|
|
6631
|
+
},
|
|
6578
6632
|
{
|
|
6579
6633
|
"name": "show-more",
|
|
6580
6634
|
"description": "Emitted when:\n- `lazyLoad` is `automatic` and the scroll meets the end of the list\n- `lazyload` is `button` and the button is clicked"
|
|
@@ -6608,6 +6662,10 @@
|
|
|
6608
6662
|
"name": "input",
|
|
6609
6663
|
"description": "Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model."
|
|
6610
6664
|
},
|
|
6665
|
+
{
|
|
6666
|
+
"name": "update:model-value",
|
|
6667
|
+
"description": "Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model."
|
|
6668
|
+
},
|
|
6611
6669
|
{
|
|
6612
6670
|
"name": "show-more",
|
|
6613
6671
|
"description": "Emitted when:\n- `lazyLoad` is `automatic` and the scroll meets the end of the list\n- `lazyload` is `button` and the button is clicked"
|
|
@@ -7062,6 +7120,10 @@
|
|
|
7062
7120
|
"name": "input",
|
|
7063
7121
|
"description": "Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model."
|
|
7064
7122
|
},
|
|
7123
|
+
{
|
|
7124
|
+
"name": "update:model-value",
|
|
7125
|
+
"description": "Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model."
|
|
7126
|
+
},
|
|
7065
7127
|
{
|
|
7066
7128
|
"name": "show-more",
|
|
7067
7129
|
"description": "Emitted when:\n- `lazyLoad` is `automatic` and the scroll meets the end of the list\n- `lazyload` is `button` and the button is clicked"
|
|
@@ -7076,6 +7138,22 @@
|
|
|
7076
7138
|
"symbol": "default"
|
|
7077
7139
|
}
|
|
7078
7140
|
},
|
|
7141
|
+
{
|
|
7142
|
+
"name": "dropdown-payment-method-default-example",
|
|
7143
|
+
"description": "",
|
|
7144
|
+
"source": {
|
|
7145
|
+
"module": "./src/components/dropdown/components/variants/dropdown-payment-method/__tests__/dropdown-payment-method-default-example.vue",
|
|
7146
|
+
"symbol": "default"
|
|
7147
|
+
}
|
|
7148
|
+
},
|
|
7149
|
+
{
|
|
7150
|
+
"name": "dropdown-payment-method-with-description-example",
|
|
7151
|
+
"description": "",
|
|
7152
|
+
"source": {
|
|
7153
|
+
"module": "./src/components/dropdown/components/variants/dropdown-payment-method/__tests__/dropdown-payment-method-with-description-example.vue",
|
|
7154
|
+
"symbol": "default"
|
|
7155
|
+
}
|
|
7156
|
+
},
|
|
7079
7157
|
{
|
|
7080
7158
|
"name": "dropdown-scoped-slots-stub",
|
|
7081
7159
|
"description": "",
|
|
@@ -7282,6 +7360,10 @@
|
|
|
7282
7360
|
"name": "input",
|
|
7283
7361
|
"description": "Emitted when an option is clicked. Updates the selected option from the \"value\" property linked to the v-model."
|
|
7284
7362
|
},
|
|
7363
|
+
{
|
|
7364
|
+
"name": "update:model-value",
|
|
7365
|
+
"description": "Emitted when an option is clicked. Updates the selected option from the \"modelValue\" property linked to the v-model."
|
|
7366
|
+
},
|
|
7285
7367
|
{
|
|
7286
7368
|
"name": "show-more",
|
|
7287
7369
|
"description": "Emitted when:\n- `lazyLoad` is `automatic` and the scroll meets the end of the list\n- `lazyload` is `button` and the button is clicked"
|
|
@@ -7296,6 +7378,22 @@
|
|
|
7296
7378
|
"symbol": "default"
|
|
7297
7379
|
}
|
|
7298
7380
|
},
|
|
7381
|
+
{
|
|
7382
|
+
"name": "dropdown-with-custom-slots-example",
|
|
7383
|
+
"description": "",
|
|
7384
|
+
"source": {
|
|
7385
|
+
"module": "./src/components/dropdown/__tests__/dropdown-with-custom-slots-example.vue",
|
|
7386
|
+
"symbol": "default"
|
|
7387
|
+
}
|
|
7388
|
+
},
|
|
7389
|
+
{
|
|
7390
|
+
"name": "dropdown-with-description-example",
|
|
7391
|
+
"description": "",
|
|
7392
|
+
"source": {
|
|
7393
|
+
"module": "./src/components/dropdown/__tests__/dropdown-with-description-example.vue",
|
|
7394
|
+
"symbol": "default"
|
|
7395
|
+
}
|
|
7396
|
+
},
|
|
7299
7397
|
{
|
|
7300
7398
|
"name": "dynamic-content-slot-stub",
|
|
7301
7399
|
"description": "",
|
|
@@ -7627,7 +7725,7 @@
|
|
|
7627
7725
|
"description": "Vue2: Emitted when files are added or removed. Updates the v-model.\nProvides the entire list of files available.\nCan be undefined if the list is empty"
|
|
7628
7726
|
},
|
|
7629
7727
|
{
|
|
7630
|
-
"name": "update:
|
|
7728
|
+
"name": "update:model-value",
|
|
7631
7729
|
"description": "Vue3: Emitted when files are added or removed. Updates the v-model.\nProvides the entire list of files available.\nCan be undefined if the list is empty"
|
|
7632
7730
|
},
|
|
7633
7731
|
{
|
|
@@ -12003,12 +12101,13 @@
|
|
|
12003
12101
|
"attributes": [
|
|
12004
12102
|
{
|
|
12005
12103
|
"name": "label",
|
|
12006
|
-
"required":
|
|
12104
|
+
"required": false,
|
|
12007
12105
|
"description": "The label describing to the payment method icon.",
|
|
12008
12106
|
"value": {
|
|
12009
12107
|
"kind": "expression",
|
|
12010
12108
|
"type": "string"
|
|
12011
|
-
}
|
|
12109
|
+
},
|
|
12110
|
+
"default": "null"
|
|
12012
12111
|
},
|
|
12013
12112
|
{
|
|
12014
12113
|
"name": "small",
|
|
@@ -14204,6 +14303,14 @@
|
|
|
14204
14303
|
"symbol": "default"
|
|
14205
14304
|
}
|
|
14206
14305
|
},
|
|
14306
|
+
{
|
|
14307
|
+
"name": "selection-card-group-everything-bagel-example",
|
|
14308
|
+
"description": "",
|
|
14309
|
+
"source": {
|
|
14310
|
+
"module": "./src/components/selection-card/components/selection-card-group/__tests__/selection-card-group-everything-bagel-example.vue",
|
|
14311
|
+
"symbol": "default"
|
|
14312
|
+
}
|
|
14313
|
+
},
|
|
14207
14314
|
{
|
|
14208
14315
|
"name": "selection-card-group-stub",
|
|
14209
14316
|
"description": "",
|
|
@@ -14223,6 +14330,14 @@
|
|
|
14223
14330
|
"symbol": "default"
|
|
14224
14331
|
}
|
|
14225
14332
|
},
|
|
14333
|
+
{
|
|
14334
|
+
"name": "selection-card-group-with-slots-example",
|
|
14335
|
+
"description": "",
|
|
14336
|
+
"source": {
|
|
14337
|
+
"module": "./src/components/selection-card/components/selection-card-group/__tests__/selection-card-group-with-slots-example.vue",
|
|
14338
|
+
"symbol": "default"
|
|
14339
|
+
}
|
|
14340
|
+
},
|
|
14226
14341
|
{
|
|
14227
14342
|
"name": "selection-card-stub",
|
|
14228
14343
|
"description": "",
|
|
@@ -15674,11 +15789,24 @@
|
|
|
15674
15789
|
"default": "BentoTagVariant.GREY"
|
|
15675
15790
|
}
|
|
15676
15791
|
],
|
|
15792
|
+
"slots": [
|
|
15793
|
+
{
|
|
15794
|
+
"name": "icon"
|
|
15795
|
+
}
|
|
15796
|
+
],
|
|
15677
15797
|
"source": {
|
|
15678
15798
|
"module": "./src/components/tag/tag.vue",
|
|
15679
15799
|
"symbol": "default"
|
|
15680
15800
|
}
|
|
15681
15801
|
},
|
|
15802
|
+
{
|
|
15803
|
+
"name": "tag-with-icon",
|
|
15804
|
+
"description": "",
|
|
15805
|
+
"source": {
|
|
15806
|
+
"module": "./src/components/tag/__tests__/tag-with-icon.vue",
|
|
15807
|
+
"symbol": "default"
|
|
15808
|
+
}
|
|
15809
|
+
},
|
|
15682
15810
|
{
|
|
15683
15811
|
"name": "teleport",
|
|
15684
15812
|
"description": "",
|
|
@@ -15845,6 +15973,16 @@
|
|
|
15845
15973
|
"type": "string"
|
|
15846
15974
|
},
|
|
15847
15975
|
"default": "''"
|
|
15976
|
+
},
|
|
15977
|
+
{
|
|
15978
|
+
"name": "modelValue",
|
|
15979
|
+
"required": false,
|
|
15980
|
+
"description": "Text displayed as the value of the textarea",
|
|
15981
|
+
"value": {
|
|
15982
|
+
"kind": "expression",
|
|
15983
|
+
"type": "string"
|
|
15984
|
+
},
|
|
15985
|
+
"default": "''"
|
|
15848
15986
|
}
|
|
15849
15987
|
],
|
|
15850
15988
|
"source": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adyen/bento-vue2",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.77.0",
|
|
4
4
|
"description": "Adyen Bento Vue2 components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"unified": "11.0.5",
|
|
49
49
|
"uuid": "11.0.5",
|
|
50
50
|
"vue-demi": "0.14.10",
|
|
51
|
-
"@adyen/bento-design-tokens": "1.
|
|
51
|
+
"@adyen/bento-design-tokens": "1.77.0"
|
|
52
52
|
},
|
|
53
53
|
"dependenciesMeta": {
|
|
54
54
|
"@adyen/bento-vue-i18n-demi": {
|
|
@@ -127,12 +127,12 @@
|
|
|
127
127
|
"vue-style-loader": "4.1.3",
|
|
128
128
|
"vue-template-compiler": "2.7.16",
|
|
129
129
|
"vue-tsc": "1.0.24",
|
|
130
|
-
"@adyen/bento-cli": "0.7.
|
|
130
|
+
"@adyen/bento-cli": "0.7.2",
|
|
131
131
|
"@adyen/bento-core": "0.0.1",
|
|
132
|
-
"@adyen/bento-tailwind": "0.7.
|
|
132
|
+
"@adyen/bento-tailwind": "0.7.2",
|
|
133
133
|
"@adyen/bento-vue-i18n-demi": "0.1.0",
|
|
134
|
-
"@adyen/ui-assets-
|
|
135
|
-
"@adyen/ui-assets-icons
|
|
134
|
+
"@adyen/ui-assets-icons-16": "7.3.2",
|
|
135
|
+
"@adyen/ui-assets-payment-method-icons": "10.4.2"
|
|
136
136
|
},
|
|
137
137
|
"optionalDependencies": {
|
|
138
138
|
"vue-router": "~3.6"
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { ref as f, computed as D, defineComponent as K, toRef as x, watch as W, nextTick as j } from "vue";
|
|
2
|
-
import { f as N, s as U, b as z } from "./calendar.Fm_dfQC5.js";
|
|
3
|
-
import { h as G } from "./button-actions.B81vY51z.js";
|
|
4
|
-
import { B as H } from "./typography.hlOAxsEn.js";
|
|
5
|
-
import { d as J } from "./debounce.DUTu11PS.js";
|
|
6
|
-
import { D as E, v as Q, f as X } from "./date-format.B8RU7D42.js";
|
|
7
|
-
import { g as v } from "./generate-uid.NJ8tVoha.js";
|
|
8
|
-
import { u as F } from "./index.B6WW_F-J.js";
|
|
9
|
-
import { g as Z } from "./differenceInMonths.C8FyCrav.js";
|
|
10
|
-
import { u as $ } from "./use-form-layout-loading.D3lALhtC.js";
|
|
11
|
-
import "./index.Cl4_42j5.js";
|
|
12
|
-
import { D as ee } from "./dropdown-default-textbox.yLeN0E2z.js";
|
|
13
|
-
import { B as ae } from "./directive.Cbdox5VL.js";
|
|
14
|
-
import { F as te, E as re } from "./field-label.Auq-Pzho.js";
|
|
15
|
-
import { n as le } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
16
|
-
import "../assets/date-picker.css";
|
|
17
|
-
const ne = {
|
|
18
|
-
"en-US": {
|
|
19
|
-
datePicker: "Date picker",
|
|
20
|
-
provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
|
|
21
|
-
selectDate: "Select a date",
|
|
22
|
-
selectDateRange: "Select a date range",
|
|
23
|
-
selectedDateIsNotAvailable: "Selected date is not available"
|
|
24
|
-
},
|
|
25
|
-
"ja-JP": {
|
|
26
|
-
datePicker: "日付ピッカー",
|
|
27
|
-
selectDate: "日付を選択"
|
|
28
|
-
},
|
|
29
|
-
"pt-BR": {
|
|
30
|
-
datePicker: "Seletor de datas",
|
|
31
|
-
selectDate: "Selecione uma data"
|
|
32
|
-
}
|
|
33
|
-
}, oe = ({
|
|
34
|
-
datePickerValue: o,
|
|
35
|
-
isDateIncorrect: a,
|
|
36
|
-
isMonthVariant: t,
|
|
37
|
-
placeholder: e
|
|
38
|
-
}) => {
|
|
39
|
-
var b;
|
|
40
|
-
const { locale: r, t: m } = F(), c = Z(), p = f((b = o.value) == null ? void 0 : b.toDateString());
|
|
41
|
-
return {
|
|
42
|
-
// Values
|
|
43
|
-
dateDisplayValue: D(() => {
|
|
44
|
-
var i;
|
|
45
|
-
return a.value ? p.value : o.value ? N(
|
|
46
|
-
o.value,
|
|
47
|
-
t != null && t.value ? E.LONG_MONTH_YEAR : E.FULL_DATE,
|
|
48
|
-
{
|
|
49
|
-
locale: c[(i = r.value) == null ? void 0 : i.substring(0, 2)] || c.enUS
|
|
50
|
-
}
|
|
51
|
-
) : (e == null ? void 0 : e.value) || m("selectDate");
|
|
52
|
-
}),
|
|
53
|
-
textInputValue: p,
|
|
54
|
-
// Methods
|
|
55
|
-
formatTextInputDisplayValue: (i = o.value) => {
|
|
56
|
-
var n;
|
|
57
|
-
if (a.value)
|
|
58
|
-
return;
|
|
59
|
-
const _ = t != null && t.value ? U(i) : i;
|
|
60
|
-
p.value = i ? N(_, E.NUMERIC_DATE_YEAR_FIRST, {
|
|
61
|
-
locale: c[(n = r.value) == null ? void 0 : n.substring(0, 2)] || c.enUS
|
|
62
|
-
}) : null;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
var d = /* @__PURE__ */ ((o) => (o.INPUT = "input", o))(d || {});
|
|
67
|
-
const ie = {
|
|
68
|
-
i18n: { messages: ne },
|
|
69
|
-
name: "bento-date-picker"
|
|
70
|
-
}, se = /* @__PURE__ */ K({
|
|
71
|
-
...ie,
|
|
72
|
-
props: {
|
|
73
|
-
description: { default: void 0 },
|
|
74
|
-
disabled: { type: Boolean, default: !1 },
|
|
75
|
-
errorMessage: { default: null },
|
|
76
|
-
label: { default: void 0 },
|
|
77
|
-
optional: { type: Boolean, default: !1 },
|
|
78
|
-
placeholder: { default: null },
|
|
79
|
-
readonly: { type: Boolean, default: !1 },
|
|
80
|
-
required: { type: Boolean, default: !1 },
|
|
81
|
-
tooltipText: { default: null },
|
|
82
|
-
defaultDisplayMonth: { default: null },
|
|
83
|
-
firstDayOfWeek: { default: 1 },
|
|
84
|
-
isDateDisabled: { default: void 0 },
|
|
85
|
-
min: { default: null },
|
|
86
|
-
max: { default: null },
|
|
87
|
-
value: { default: null },
|
|
88
|
-
variant: { default: void 0 }
|
|
89
|
-
},
|
|
90
|
-
emits: [d.INPUT],
|
|
91
|
-
setup(o, { emit: a }) {
|
|
92
|
-
const t = o, e = 1e3, { t: r } = F(), m = v("bento-date-picker-container"), c = v("bento-date-picker-label"), p = v("bento-date-picker-description"), k = v("bento-date-picker-error"), y = v("bento-date-picker-date-error"), b = D(() => t.label || r("datePicker", { name: m })), i = f(null), _ = f(null), n = f(!1), s = f(!1), O = f(void 0), { isReadOnly: A } = $(x(t, "readonly"));
|
|
93
|
-
W(
|
|
94
|
-
() => t.disabled,
|
|
95
|
-
(l) => {
|
|
96
|
-
l && s.value && (s.value = !1);
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
const T = D(() => t.variant === "month"), { dateDisplayValue: L, textInputValue: u, formatTextInputDisplayValue: I } = oe({
|
|
100
|
-
datePickerValue: x(t, "value"),
|
|
101
|
-
isDateIncorrect: n,
|
|
102
|
-
isMonthVariant: T,
|
|
103
|
-
placeholder: x(t, "placeholder")
|
|
104
|
-
}), g = D(() => t.isDateDisabled && u.value && t.isDateDisabled(new Date(u.value)) && !s.value ? r("selectedDateIsNotAvailable") : n.value ? r("provideDateInAFormat") : null), M = D(() => ({
|
|
105
|
-
"b-date-picker__description--error": t.errorMessage || g.value
|
|
106
|
-
})), h = D(
|
|
107
|
-
() => `${t.description ? p : ""} ${t.errorMessage ? k : ""} ${g.value ? y : ""}`.trim() || null
|
|
108
|
-
), B = (l) => t.min && l <= t.min || t.max && l >= t.max ? !1 : t.isDateDisabled ? !t.isDateDisabled(l) : !0, R = () => {
|
|
109
|
-
s.value = !1;
|
|
110
|
-
}, S = () => {
|
|
111
|
-
s.value = !0, I();
|
|
112
|
-
}, Y = (l) => {
|
|
113
|
-
n.value = !1, R(), a(d.INPUT, l);
|
|
114
|
-
}, V = async () => {
|
|
115
|
-
n.value && (n.value = !1, u.value = null), a(d.INPUT, null);
|
|
116
|
-
}, q = (l) => {
|
|
117
|
-
Q(l);
|
|
118
|
-
}, C = (l) => {
|
|
119
|
-
if (l.length < 10)
|
|
120
|
-
return;
|
|
121
|
-
/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(l) && B(new Date(l)) ? (n.value = !1, a(d.INPUT, new Date(l))) : l && (n.value = !0, a(d.INPUT, null));
|
|
122
|
-
}, w = J(C, e);
|
|
123
|
-
return { __sfc: !0, DEBOUNCE_TIME: e, props: t, emit: a, t: r, datePickerContainerId: m, labelId: c, descriptionId: p, errorId: k, dateErrorId: y, popoverAriaLabel: b, calendarContainerRef: i, inputContainerRef: _, isDateIncorrect: n, isDatePickerOpen: s, initialFocusOnDatePickerOpen: O, isReadOnly: A, isMonthVariant: T, dateDisplayValue: L, textInputValue: u, formatTextInputDisplayValue: I, dateErrorText: g, descriptionConditionalClasses: M, ariaDescribedBy: h, isDateEnabled: B, closeDatePicker: R, openDatePicker: S, onDateSelected: Y, clearDatePickerValue: V, onDateKeyDown: q, validateDate: C, validateDateDebounced: w, onDateInputChange: (l) => {
|
|
124
|
-
u.value = X(l), s.value ? w(u.value) : C(u.value);
|
|
125
|
-
}, onSpaceBarOrEnter: async (l) => {
|
|
126
|
-
var P;
|
|
127
|
-
s.value || (l.preventDefault(), S(), await j(), t.value || (I(/* @__PURE__ */ new Date()), a(d.INPUT, /* @__PURE__ */ new Date())), O.value = ((P = i.value) == null ? void 0 : P.$refs.calendarRef[0].focusOnDate(
|
|
128
|
-
t.variant === "month" ? U(t.value) : t.value,
|
|
129
|
-
!0
|
|
130
|
-
)) ?? void 0);
|
|
131
|
-
}, BentoPopover: G, BentoTypography: H, Calendar: z, ErrorMessage: re, FieldLabel: te, DropdownInputDefault: ee, vBentoClickOutsideDirective: ae };
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
var ue = function() {
|
|
135
|
-
var a = this, t = a._self._c, e = a._self._setupProxy;
|
|
136
|
-
return t("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.closeDatePicker, expression: "closeDatePicker" }], staticClass: "b-date-picker", on: { "!keydown": [function(r) {
|
|
137
|
-
return !r.type.indexOf("key") && a._k(r.keyCode, "space", 32, r.key, [" ", "Spacebar"]) ? null : e.onSpaceBarOrEnter.apply(null, arguments);
|
|
138
|
-
}, function(r) {
|
|
139
|
-
return !r.type.indexOf("key") && a._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : e.onSpaceBarOrEnter.apply(null, arguments);
|
|
140
|
-
}] } }, [a.label ? t(e.FieldLabel, { attrs: { id: e.labelId, label: a.label, "tooltip-text": a.tooltipText, optional: a.optional, required: a.required } }) : a._e(), t("div", [t(e.DropdownInputDefault, { ref: "inputContainerRef", attrs: { "always-combobox-is-input": "", ariaControls: e.datePickerContainerId, ariaExpanded: e.isDatePickerOpen, "aria-labelledby": a.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, disabled: a.disabled, "dynamic-filtering": "", "is-invalid": !!a.errorMessage || !!e.dateErrorText, open: e.isDatePickerOpen, value: e.textInputValue, "display-value": e.dateDisplayValue, "debounce-time": 0, readonly: e.isReadOnly }, on: { input: e.onDateInputChange, open: e.openDatePicker, keydown: e.onDateKeyDown, clear: e.clearDatePickerValue, close: e.closeDatePicker } })], 1), e.dateErrorText ? t(e.ErrorMessage, { staticClass: "b-date-picker__error-message", attrs: { id: e.dateErrorId, "error-message": e.dateErrorText } }) : a._e(), a.errorMessage ? t(e.ErrorMessage, { staticClass: "b-date-picker__error-message", attrs: { id: e.errorId, "error-message": a.errorMessage } }) : a._e(), a.description ? t(e.BentoTypography, { staticClass: "b-date-picker__description", class: e.descriptionConditionalClasses, attrs: { el: "span" } }, [a._v(" " + a._s(a.description) + " ")]) : a._e(), e.inputContainerRef ? t(e.BentoPopover, { staticClass: "b-date-picker__container", attrs: { id: e.datePickerContainerId, role: "dialog", open: e.isDatePickerOpen, "target-element": e.inputContainerRef, "aria-label": e.popoverAriaLabel, "aria-modal": !0, position: "bottom-start", "fit-content": "", "trap-all": "", "trap-all-options": {
|
|
141
|
-
initialFocus: e.initialFocusOnDatePickerOpen
|
|
142
|
-
} }, nativeOn: { keydown: function(r) {
|
|
143
|
-
return !r.type.indexOf("key") && a._k(r.keyCode, "esc", 27, r.key, ["Esc", "Escape"]) ? null : e.closeDatePicker.apply(null, arguments);
|
|
144
|
-
} } }, [t(e.Calendar, { ref: "calendarContainerRef", attrs: { "default-display-month": a.defaultDisplayMonth, "first-day-of-week": a.firstDayOfWeek, "is-date-disabled": a.isDateDisabled, "number-of-months": 1, value: a.value, min: a.min, max: a.max, variant: a.variant }, on: { input: e.onDateSelected } })], 1) : a._e()], 1);
|
|
145
|
-
}, de = [], ce = /* @__PURE__ */ le(
|
|
146
|
-
se,
|
|
147
|
-
ue,
|
|
148
|
-
de,
|
|
149
|
-
!1,
|
|
150
|
-
null,
|
|
151
|
-
"4c0574ca"
|
|
152
|
-
);
|
|
153
|
-
const Re = ce.exports;
|
|
154
|
-
export {
|
|
155
|
-
Re as B,
|
|
156
|
-
d as a
|
|
157
|
-
};
|
|
158
|
-
//# sourceMappingURL=date-picker.DImAYvoM.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.DImAYvoM.js","sources":["../../src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../src/components/date-picker/date-picker.types.ts","../../src/components/date-picker/date-picker.vue"],"sourcesContent":["import { computed, ref } from 'vue';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { type UseDateDisplayText } from './use-date-picker-single-calendar-text.types';\nimport { DateFormat } from '@/types/date-format';\nimport { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\nimport { format } from 'date-fns/format';\nimport { startOfMonth } from 'date-fns/startOfMonth';\nimport messages from '../messages.json';\n\ntype MessageSchema = (typeof messages)['en-US'];\n\n/**\n * Composable that sets and formats the date to be displayed in the input box of a Single Date Picker\n * @param {Ref<Date>} option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param {Ref<boolean>} option.isDateIncorrect Indicates if the date is correct or not\n * @param {?Ref<boolean>} option.isMonthVariant Indicates if the date picker has variant \"month\"\n */\nexport const useDatePickerSingleCalendarText: UseDateDisplayText<Date> = ({\n datePickerValue,\n isDateIncorrect,\n isMonthVariant,\n placeholder,\n}) => {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const locales = getDateLocale();\n\n const textInputValue = ref(datePickerValue.value?.toDateString());\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return textInputValue.value;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value) {\n return placeholder?.value || (t('selectDate') as string);\n }\n\n // Display the date in format \"dd MMM, yyyy (25 Jun, 2023)\" or \"MMMM yyyy (June 2023)\"\n // if there's a valid date selected\n return format(\n datePickerValue.value,\n isMonthVariant?.value ? DateFormat.LONG_MONTH_YEAR : DateFormat.FULL_DATE,\n {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n }\n );\n });\n\n /**\n * Formats the \"dateToFormat\" date value with the yyyy-MM-dd format and sets it as \"formatTextInputDisplayValue\" value\n * @param {Date} dateToFormat - Date to be assigned and formatted\n */\n const formatTextInputDisplayValue = (dateToFormat: Date = datePickerValue.value) => {\n // If date is incorrect, leave the textInputValue intact\n if (isDateIncorrect.value) {\n return;\n }\n\n const date = isMonthVariant?.value ? startOfMonth(dateToFormat) : dateToFormat;\n textInputValue.value = dateToFormat\n ? format(date, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n })\n : null;\n };\n\n return {\n // Values\n dateDisplayValue,\n textInputValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","import type { FormField } from '../../types/form-field';\nimport {\n CalendarFirstDayOfWeek as BentoDatePickerFirstDayOfWeek,\n type CalendarIsDateDisabled as BentoDatePickerIsDateDisabled,\n type CalendarSingleDateValue as BentoDatePickerValue,\n CalendarVariant as BentoDatePickerVariant,\n} from '@/internal';\n\nexport {\n BentoDatePickerFirstDayOfWeek,\n type BentoDatePickerIsDateDisabled,\n type BentoDatePickerValue,\n BentoDatePickerVariant,\n};\n\nexport enum BentoDatePickerEvent {\n INPUT = 'input',\n}\n\nexport interface BentoDatePickerProps extends FormField {\n /**\n * Default start date for the calendar pane.\n * Expected format: YYYY-MM-DD\n * @default null\n */\n defaultDisplayMonth?: string | null;\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * @default 1\n */\n firstDayOfWeek?: BentoDatePickerFirstDayOfWeek;\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled?: BentoDatePickerIsDateDisabled;\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n * @default null\n */\n min?: Date | null;\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n * @default null\n */\n max?: Date | null;\n\n /**\n * Selected date\n * @default null\n */\n value?: BentoDatePickerValue | null;\n\n /**\n * The type of calendar to display. Defaults to showing days.\n */\n variant?: `${BentoDatePickerVariant}`;\n}\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div\n v-bento-click-outside-directive=\"closeDatePicker\"\n class=\"b-date-picker\"\n @keydown.space.capture=\"onSpaceBarOrEnter\"\n @keydown.enter.capture=\"onSpaceBarOrEnter\"\n >\n <!-- Label -->\n <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n\n <!-- Input -->\n <div>\n <dropdown-input-default\n ref=\"inputContainerRef\"\n always-combobox-is-input\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n dynamic-filtering\n :is-invalid=\"!!errorMessage || !!dateErrorText\"\n :open=\"isDatePickerOpen\"\n :value=\"textInputValue\"\n :display-value=\"dateDisplayValue\"\n :debounce-time=\"0\"\n :readonly=\"isReadOnly\"\n @input=\"onDateInputChange\"\n @open=\"openDatePicker\"\n @keydown=\"onDateKeyDown\"\n @clear=\"clearDatePickerValue\"\n @close=\"closeDatePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"dateErrorText\"\n :id=\"dateErrorId\"\n :error-message=\"dateErrorText\"\n class=\"b-date-picker__error-message\"\n />\n <error-message\n v-if=\"errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n class=\"b-date-picker__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-picker__container\"\n role=\"dialog\"\n :open=\"isDatePickerOpen\"\n :target-element=\"inputContainerRef\"\n :aria-label=\"popoverAriaLabel\"\n :aria-modal=\"true\"\n position=\"bottom-start\"\n fit-content\n trap-all\n :trap-all-options=\"{\n initialFocus: initialFocusOnDatePickerOpen,\n }\"\n @keydown.esc.native=\"closeDatePicker\"\n >\n <calendar\n ref=\"calendarContainerRef\"\n :default-display-month=\"defaultDisplayMonth\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"value\"\n :min=\"min\"\n :max=\"max\"\n :variant=\"variant\"\n @input=\"onDateSelected\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, type Ref, ref, toRef, watch } from 'vue';\n import { startOfMonth } from 'date-fns/startOfMonth';\n\n // Components\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '../typography';\n import { Calendar, ErrorMessage, FieldLabel } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n\n // Utils\n import { debounce } from '@/utils/ts/debounce';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n // Directive\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives';\n\n // Types\n import { BentoDatePickerEvent, type BentoDatePickerProps } from './date-picker.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const DEBOUNCE_TIME = 1000;\n\n const props = defineProps({\n description: { default: undefined },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n label: { default: undefined },\n optional: { type: Boolean, default: false },\n placeholder: { default: null },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n defaultDisplayMonth: { default: null },\n firstDayOfWeek: { default: 1 },\n isDateDisabled: { default: undefined },\n min: { default: null },\n max: { default: null },\n value: { default: null },\n variant: { default: undefined }\n});\n\n const emit = defineEmits([BentoDatePickerEvent.INPUT]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const datePickerContainerId = generateUid('bento-date-picker-container');\n const labelId = generateUid('bento-date-picker-label');\n const descriptionId = generateUid('bento-date-picker-description');\n const errorId = generateUid('bento-date-picker-error');\n const dateErrorId = generateUid('bento-date-picker-date-error');\n const popoverAriaLabel = computed(() => props.label || t('datePicker', { name: datePickerContainerId }));\n\n // Refs\n const calendarContainerRef = ref(null);\n const inputContainerRef = ref(null);\n\n // Values\n const isDateIncorrect = ref(false);\n const isDatePickerOpen = ref(false);\n const initialFocusOnDatePickerOpen = ref(undefined);\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n watch(\n () => props.disabled,\n disabled => {\n // Close date picker popover if it's opened when it's disabled\n if (disabled && isDatePickerOpen.value) {\n isDatePickerOpen.value = false;\n }\n }\n );\n\n const isMonthVariant = computed(() => props.variant === 'month');\n\n const { dateDisplayValue, textInputValue, formatTextInputDisplayValue } = useDatePickerSingleCalendarText({\n datePickerValue: toRef(props, 'value') as Ref<Date>,\n isDateIncorrect,\n isMonthVariant,\n placeholder: toRef(props, 'placeholder'),\n });\n\n const dateErrorText = computed(() => {\n if (\n props.isDateDisabled &&\n textInputValue.value &&\n props.isDateDisabled(new Date(textInputValue.value)) &&\n !isDatePickerOpen.value\n ) {\n return t('selectedDateIsNotAvailable');\n }\n\n return isDateIncorrect.value ? t('provideDateInAFormat') : null;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-picker__description--error': props.errorMessage || dateErrorText.value,\n }));\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n dateErrorText.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const isDateEnabled = (date: Date) => {\n // Check if date is between min/max bounds, if there are any\n if ((props.min && date <= props.min) || (props.max && date >= props.max)) {\n return false;\n }\n\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n const closeDatePicker = () => {\n isDatePickerOpen.value = false;\n };\n\n const openDatePicker = () => {\n isDatePickerOpen.value = true;\n\n formatTextInputDisplayValue();\n };\n\n const onDateSelected = (selectedDate: Date) => {\n // Reset the error state when a valid date is selected\n isDateIncorrect.value = false;\n\n closeDatePicker();\n emit(BentoDatePickerEvent.INPUT, selectedDate);\n };\n\n const clearDatePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n textInputValue.value = null;\n }\n emit(BentoDatePickerEvent.INPUT, null);\n };\n\n const onDateKeyDown = (event: KeyboardEvent) => {\n validateDateInput(event);\n };\n\n const validateDate = (stringDate: string) => {\n // Validate only if the date is complete\n if (stringDate.length < 10) {\n return;\n }\n\n // Checks for YYYY-MM-DD format\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n const isValidDate = dateRegex.test(stringDate) && isDateEnabled(new Date(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emit(BentoDatePickerEvent.INPUT, new Date(stringDate));\n } else if (stringDate) {\n // Only set to true if the value exists (not null/undefined)\n isDateIncorrect.value = true;\n emit(BentoDatePickerEvent.INPUT, null);\n }\n };\n\n const validateDateDebounced = debounce(validateDate, DEBOUNCE_TIME);\n\n const onDateInputChange = (stringDate: string) => {\n textInputValue.value = formatDateInputValue(stringDate);\n // If we are closing the date picker, we should validate (and emit date inputs) immediately so the user doesn't have to wait for the debounce time.\n if (isDatePickerOpen.value) {\n validateDateDebounced(textInputValue.value);\n } else {\n validateDate(textInputValue.value);\n }\n };\n\n /**\n * Space bar and Enter keyDown event handler.\n *\n * * Opens the date picker dialog on the first keydown.\n * * Move focus to selected date, i.e., the date displayed in the date input text field. If no date has been selected, places focus on the current date.\n * @param {KeyboardEvent} event Event being triggered\n */\n const onSpaceBarOrEnter = async (event: KeyboardEvent) => {\n if (isDatePickerOpen.value) {\n return;\n }\n event.preventDefault();\n\n openDatePicker();\n\n // Wait for the date picker dialog to open\n await nextTick();\n\n // Set current date (today) if no date is selected\n if (!props.value) {\n // Format the opened date picker date to YYYY-MM-DD\n formatTextInputDisplayValue(new Date());\n emit(BentoDatePickerEvent.INPUT, new Date());\n }\n\n // Set initial focus\n initialFocusOnDatePickerOpen.value =\n calendarContainerRef.value?.$refs.calendarRef[0].focusOnDate(\n props.variant === 'month' ? startOfMonth(props.value) : props.value,\n true\n ) ?? undefined;\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Date picker selector.\n *\n * @example\n * import { BentoDatePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDatePicker },\n * template: `\n * <bento-date-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-date-picker',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-picker.scss\" />\n"],"names":["useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","isMonthVariant","placeholder","locale","t","useI18n","locales","getDateLocale","textInputValue","ref","_a","computed","format","DateFormat","dateToFormat","date","startOfMonth","BentoDatePickerEvent","BentoDatePickerEvent2","__default__","messages","DEBOUNCE_TIME","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","props","calendarContainerRef","inputContainerRef","isDatePickerOpen","initialFocusOnDatePickerOpen","isReadOnly","useFormLayoutFieldLoading","toRef","watch","disabled","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","closeDatePicker","openDatePicker","onDateSelected","selectedDate","emit","clearDatePickerValue","onDateKeyDown","event","validateDateInput","validateDate","stringDate","validateDateDebounced","debounce","formatDateInputValue","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiBOA,KAAA,CAAA;AAAA,EAAmE,iBAAAC;AAAA,EACtE,iBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAEJ,MAAA;;AACI,QAA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