@adyen/bento-vue3 1.74.0 → 1.76.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.
Files changed (138) hide show
  1. package/dist/@types/index.d.ts +1660 -614
  2. package/dist/assets/accordion-item.css +1 -1
  3. package/dist/assets/action-bar.css +1 -1
  4. package/dist/assets/base-modal.css +1 -1
  5. package/dist/assets/button-actions.css +1 -1
  6. package/dist/assets/calendar.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/data-grid-template.css +1 -1
  9. package/dist/assets/data-grid.css +1 -1
  10. package/dist/assets/date-picker.css +1 -1
  11. package/dist/assets/date-range-picker.css +1 -1
  12. package/dist/assets/dialog-page.css +1 -1
  13. package/dist/assets/dropdown-tag.css +1 -1
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/filter-bar.css +1 -1
  16. package/dist/assets/header-meta.css +1 -1
  17. package/dist/assets/input-field-password.css +1 -1
  18. package/dist/assets/input-field.css +1 -1
  19. package/dist/assets/inspector.css +1 -1
  20. package/dist/assets/modal-fullscreen.css +1 -1
  21. package/dist/assets/selection-card-group.css +1 -1
  22. package/dist/assets/sidepanel.css +1 -1
  23. package/dist/assets/timeline-item.css +1 -1
  24. package/dist/assets/use-cached-selected-values.css +1 -1
  25. package/dist/checkbox.js +2 -2
  26. package/dist/chunks/calendar.Tm7Cvpwu.js +2001 -0
  27. package/dist/chunks/calendar.Tm7Cvpwu.js.map +1 -0
  28. package/dist/chunks/{checkbox-group.8ebmaHsA.js → checkbox-group.8J29fVna.js} +2 -2
  29. package/dist/chunks/{checkbox-group.8ebmaHsA.js.map → checkbox-group.8J29fVna.js.map} +1 -1
  30. package/dist/chunks/{checkbox.BI0dqARY.js → checkbox.CfNYUty6.js} +18 -18
  31. package/dist/chunks/{checkbox.BI0dqARY.js.map → checkbox.CfNYUty6.js.map} +1 -1
  32. package/dist/chunks/{code-snippet.CO78Nfj0.js → code-snippet.EeIcRV20.js} +2 -2
  33. package/dist/chunks/{code-snippet.CO78Nfj0.js.map → code-snippet.EeIcRV20.js.map} +1 -1
  34. package/dist/chunks/constructNow.CHWWeLPc.js +8 -0
  35. package/dist/chunks/constructNow.CHWWeLPc.js.map +1 -0
  36. package/dist/chunks/{dashboard-section.CVttsom5.js → dashboard-section.Cqi0PWeJ.js} +2 -2
  37. package/dist/chunks/{dashboard-section.CVttsom5.js.map → dashboard-section.Cqi0PWeJ.js.map} +1 -1
  38. package/dist/chunks/{data-grid-template.CFt1NV_4.js → data-grid-template.D7kB3S1u.js} +2 -2
  39. package/dist/chunks/{data-grid-template.CFt1NV_4.js.map → data-grid-template.D7kB3S1u.js.map} +1 -1
  40. package/dist/chunks/data-grid.DJIxBwCa.js +4143 -0
  41. package/dist/chunks/data-grid.DJIxBwCa.js.map +1 -0
  42. package/dist/chunks/{date-picker.DSkvT_CA.js → date-picker.CobmiKaJ.js} +16 -16
  43. package/dist/chunks/date-picker.CobmiKaJ.js.map +1 -0
  44. package/dist/chunks/date-range-picker.B6UKl1_N.js +1114 -0
  45. package/dist/chunks/date-range-picker.B6UKl1_N.js.map +1 -0
  46. package/dist/chunks/{get-date-locale.CAyOIbcp.js → differenceInMonths.C8FyCrav.js} +580 -364
  47. package/dist/chunks/differenceInMonths.C8FyCrav.js.map +1 -0
  48. package/dist/chunks/dropdown-tag.CMjilUQb.js +242 -0
  49. package/dist/chunks/dropdown-tag.CMjilUQb.js.map +1 -0
  50. package/dist/chunks/{dropdown.bLsoTZbw.js → dropdown.DG_EnV8g.js} +18 -18
  51. package/dist/chunks/{dropdown.bLsoTZbw.js.map → dropdown.DG_EnV8g.js.map} +1 -1
  52. package/dist/chunks/es6.MoTTyETW.js.map +1 -1
  53. package/dist/chunks/{filter-bar.nX73NKNC.js → filter-bar.dmC284Po.js} +737 -710
  54. package/dist/chunks/filter-bar.dmC284Po.js.map +1 -0
  55. package/dist/chunks/getRoundingMethod.C3eaeGLR.js +10 -0
  56. package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -0
  57. package/dist/chunks/{index.BrH1t1iu.js → getTimezoneOffsetInMilliseconds.BW7U6PxE.js} +254 -177
  58. package/dist/chunks/getTimezoneOffsetInMilliseconds.BW7U6PxE.js.map +1 -0
  59. package/dist/chunks/header-meta.BE6QfUNi.js +221 -0
  60. package/dist/chunks/header-meta.BE6QfUNi.js.map +1 -0
  61. package/dist/chunks/{header-with-views.BLW817ZC.js → header-with-views.BZ16v5-m.js} +4 -4
  62. package/dist/chunks/{header-with-views.BLW817ZC.js.map → header-with-views.BZ16v5-m.js.map} +1 -1
  63. package/dist/chunks/{header.DARVAeE9.js → header.3It50Clh.js} +2 -2
  64. package/dist/chunks/{header.DARVAeE9.js.map → header.3It50Clh.js.map} +1 -1
  65. package/dist/chunks/{input-field-password.BtM3-txc.js → input-field-password.BVnZWBAV.js} +185 -167
  66. package/dist/chunks/input-field-password.BVnZWBAV.js.map +1 -0
  67. package/dist/chunks/{input-field-phone-number.oaNB69nM.js → input-field-phone-number.CWhPGQ1U.js} +3 -3
  68. package/dist/chunks/{input-field-phone-number.oaNB69nM.js.map → input-field-phone-number.CWhPGQ1U.js.map} +1 -1
  69. package/dist/chunks/{input-field.D_tADgPG.js → input-field.A-dEZZfC.js} +124 -119
  70. package/dist/chunks/input-field.A-dEZZfC.js.map +1 -0
  71. package/dist/chunks/{pagination.D1Gdo5to.js → pagination.B4qBK4pM.js} +2 -2
  72. package/dist/chunks/{pagination.D1Gdo5to.js.map → pagination.B4qBK4pM.js.map} +1 -1
  73. package/dist/chunks/radio-group.DWNqrkZ3.js.map +1 -1
  74. package/dist/chunks/{rich-text-editor.BK9AivIm.js → rich-text-editor.BA6_k4Vv.js} +354 -352
  75. package/dist/chunks/{rich-text-editor.BK9AivIm.js.map → rich-text-editor.BA6_k4Vv.js.map} +1 -1
  76. package/dist/chunks/{search-bar.BD_R-vgA.js → search-bar.dZ7UCMxb.js} +3 -3
  77. package/dist/chunks/{search-bar.BD_R-vgA.js.map → search-bar.dZ7UCMxb.js.map} +1 -1
  78. package/dist/chunks/{secondary-nav.Du2PL7Ok.js → secondary-nav.CE082cQ_.js} +2 -2
  79. package/dist/chunks/{secondary-nav.Du2PL7Ok.js.map → secondary-nav.CE082cQ_.js.map} +1 -1
  80. package/dist/chunks/selection-card-group.NnTbPQjj.js +412 -0
  81. package/dist/chunks/{selection-card-group._RgLiMyQ.js.map → selection-card-group.NnTbPQjj.js.map} +1 -1
  82. package/dist/chunks/textarea.C1jkfowf.js.map +1 -1
  83. package/dist/chunks/timeline-item.DNjubXL2.js +556 -0
  84. package/dist/chunks/timeline-item.DNjubXL2.js.map +1 -0
  85. package/dist/chunks/{use-cached-selected-values.C32tjNKy.js → use-cached-selected-values.8MdrR9wt.js} +501 -467
  86. package/dist/chunks/use-cached-selected-values.8MdrR9wt.js.map +1 -0
  87. package/dist/code-snippet.js +1 -1
  88. package/dist/dashboard-template.js +1 -1
  89. package/dist/data-grid-template.js +1 -1
  90. package/dist/data-grid.js +1 -1
  91. package/dist/date-picker.js +2 -2
  92. package/dist/date-range-picker.js +2 -2
  93. package/dist/dropdown.js +3 -3
  94. package/dist/filter-bar.js +1 -1
  95. package/dist/header-with-views.js +1 -1
  96. package/dist/header.js +1 -1
  97. package/dist/index.js +24 -24
  98. package/dist/input-field-password.js +1 -1
  99. package/dist/input-field-phone-number.js +1 -1
  100. package/dist/input-field.js +1 -1
  101. package/dist/internal.js +3 -3
  102. package/dist/pagination.js +1 -1
  103. package/dist/rich-text-editor.js +1 -1
  104. package/dist/search-bar.js +2 -2
  105. package/dist/secondary-nav.js +1 -1
  106. package/dist/selection-card.js +1 -1
  107. package/dist/styles/bento-dark.css +7 -5
  108. package/dist/styles/bento-light.css +7 -5
  109. package/dist/styles/bento.css +7 -5
  110. package/dist/styles/legacy.css +7 -5
  111. package/dist/styles/styleguide.css +7 -5
  112. package/dist/timeline.js +1 -1
  113. package/dist/web-types.json +1 -1
  114. package/package.json +8 -23
  115. package/dist/chunks/_commonjsHelpers.C6fGbg64.js +0 -7
  116. package/dist/chunks/_commonjsHelpers.C6fGbg64.js.map +0 -1
  117. package/dist/chunks/calendar.Cqjyxc69.js +0 -2223
  118. package/dist/chunks/calendar.Cqjyxc69.js.map +0 -1
  119. package/dist/chunks/data-grid.BjPdbx50.js +0 -4071
  120. package/dist/chunks/data-grid.BjPdbx50.js.map +0 -1
  121. package/dist/chunks/date-picker.DSkvT_CA.js.map +0 -1
  122. package/dist/chunks/date-range-picker.cmg75lC-.js +0 -1117
  123. package/dist/chunks/date-range-picker.cmg75lC-.js.map +0 -1
  124. package/dist/chunks/dropdown-tag.DvQQIJsw.js +0 -308
  125. package/dist/chunks/dropdown-tag.DvQQIJsw.js.map +0 -1
  126. package/dist/chunks/filter-bar.nX73NKNC.js.map +0 -1
  127. package/dist/chunks/get-date-locale.CAyOIbcp.js.map +0 -1
  128. package/dist/chunks/header-meta.C4iaUsfq.js +0 -236
  129. package/dist/chunks/header-meta.C4iaUsfq.js.map +0 -1
  130. package/dist/chunks/index.BrH1t1iu.js.map +0 -1
  131. package/dist/chunks/index.BxBB1rsx.js +0 -15
  132. package/dist/chunks/index.BxBB1rsx.js.map +0 -1
  133. package/dist/chunks/input-field-password.BtM3-txc.js.map +0 -1
  134. package/dist/chunks/input-field.D_tADgPG.js.map +0 -1
  135. package/dist/chunks/selection-card-group._RgLiMyQ.js +0 -474
  136. package/dist/chunks/timeline-item.C8PA_w7m.js +0 -568
  137. package/dist/chunks/timeline-item.C8PA_w7m.js.map +0 -1
  138. package/dist/chunks/use-cached-selected-values.C32tjNKy.js.map +0 -1
@@ -1,474 +0,0 @@
1
- import { defineComponent as ae, useSlots as le, computed as o, inject as re, ref as V, createElementBlock as E, openBlock as i, normalizeClass as k, createElementVNode as q, createBlock as f, createCommentVNode as $, unref as t, renderSlot as y, withModifiers as ie, createVNode as de, withCtx as u, createTextVNode as Y, toDisplayString as Q, watch as se, provide as ue, onMounted as ce, Fragment as Z, renderList as W, mergeProps as m, createSlots as F } from "vue";
2
- import { b as fe } from "./index.E60QniEu.js";
3
- import { a as ve, b as ye } from "./es6.MoTTyETW.js";
4
- import { B as I } from "./typography.yBEME_Gu.js";
5
- import { C as be } from "./checkbox-input.BXNGT9U0.js";
6
- import { u as me } from "./aria-label.CaUURpnB.js";
7
- import { g as H } from "./generate-uid.NJ8tVoha.js";
8
- import { u as pe } from "./use-has-slot.B7eQSabc.js";
9
- import { a as he } from "./radio-input.CBNE-AkM.js";
10
- import { _ as te } from "./_plugin-vue_export-helper.CHgC5LLL.js";
11
- import { C as ge } from "./controls-group.cbGiHr7n.js";
12
- import { G as ke } from "./grid-layout.DDaRNz4-.js";
13
- import { E as Ce } from "./field-label.C97CrBI_.js";
14
- import "../assets/selection-card-group.css";
15
- var G = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.READONLY = "readonly", e.ERROR = "error", e))(G || {});
16
- const oe = Symbol("selection card radio input injection key"), Se = {
17
- key: 0,
18
- class: "b-selection-card__icon",
19
- role: "presentation"
20
- }, Re = ["for"], $e = {
21
- name: "bento-selection-card"
22
- }, Ve = /* @__PURE__ */ ae({
23
- ...$e,
24
- props: {
25
- /**
26
- * The description of the selection card
27
- */
28
- description: {
29
- type: String,
30
- default: void 0
31
- },
32
- /**
33
- * Disables the selection card
34
- */
35
- disabled: { type: Boolean, default: !1 },
36
- /**
37
- * Makes the entire selection card clickable. Clicking over interactive elements inside the card with this prop enabled will not be possible.
38
- */
39
- fullyClickable: { type: Boolean, default: !1 },
40
- /**
41
- * Shows the selection card in error state
42
- */
43
- hasError: { type: Boolean, default: !1 },
44
- /**
45
- * This property should not be used directly.
46
- * It will be used by v-model directive on selection card component.
47
- *
48
- * When handling a single input, use a string or a number.
49
- *
50
- * When handling multiple inputs, use an array of keys.
51
- * These keys exist as a set "value" prop for each input.
52
- */
53
- modelValue: {
54
- type: [Boolean, String, Array],
55
- default: null
56
- },
57
- /**
58
- * Sets the selection card to readonly
59
- */
60
- readonly: { type: Boolean, default: !1 },
61
- /**
62
- * The subtitle of the selection card
63
- */
64
- subtitle: {
65
- type: String,
66
- default: void 0
67
- },
68
- /**
69
- * The title of the selection card
70
- */
71
- title: {
72
- type: String,
73
- required: !0
74
- },
75
- /**
76
- * Indicates the value of the input that will be returned when it's checked.
77
- */
78
- value: {
79
- type: [String, Number],
80
- required: !0
81
- }
82
- },
83
- emits: ["input", "update:model-value"],
84
- setup(e, { emit: j }) {
85
- const a = e, x = j, z = le(), c = pe(z), B = H("selection-card-input-id"), p = H("selection-card-description"), L = o(
86
- () => a.modelValue
87
- ), C = o(
88
- () => a.modelValue
89
- ), N = o(() => ({
90
- "b-selection-card--checked": S.value,
91
- "b-selection-card--fully-clickable": a.fullyClickable
92
- })), _ = o(() => ({
93
- [`b-selection-card--${G.DISABLED}`]: a.disabled,
94
- [`b-selection-card--${G.ERROR}`]: a.hasError,
95
- [`b-selection-card--${G.READONLY}`]: a.readonly,
96
- "b-selection-card--center-aligned": R.value
97
- })), O = o(() => ({
98
- "b-selection-card__checkbox-container--center-aligned": R.value
99
- })), U = o(() => ({
100
- "b-selection-card__checkbox-container-text--center-aligned": R.value
101
- })), h = o(() => ({
102
- "b-selection-card__slot--with-icon": c("icon")
103
- })), n = me({
104
- ariaLabel: a.title,
105
- label: a.value
106
- }), D = o(() => Array.isArray(a.modelValue)), S = o(() => w.value ? a.value === a.modelValue : D.value ? a.modelValue.some((r) => r === a.value) : a.modelValue), w = re(oe, V(!1)), R = o(() => !a.subtitle && !a.description), b = V(null), l = V(null), v = V(null), d = (r) => {
107
- var g, A, J, K, P, X;
108
- if (b.value.$refs.inputRef === r.target) {
109
- const ne = T();
110
- s(ne);
111
- return;
112
- }
113
- if (a.disabled && a.readonly || !a.fullyClickable && (l.value && ((A = (g = l.value) == null ? void 0 : g.$el) != null && A.contains(r.target)) || v.value && ((K = (J = v.value) == null ? void 0 : J.$el) != null && K.contains(r.target)) || b.value && ((X = (P = b.value) == null ? void 0 : P.$el) != null && X.contains(r.target))))
114
- return;
115
- const M = T();
116
- s(M);
117
- }, T = () => {
118
- var M;
119
- const r = ((M = b.value) == null ? void 0 : M.$refs.inputRef).checked;
120
- if (D.value) {
121
- const g = [...a.modelValue], A = g.indexOf(a.value);
122
- return A === -1 ? g.push(a.value) : g.splice(A, 1), g;
123
- }
124
- return w.value ? a.value : r;
125
- }, s = (r) => {
126
- !a.disabled && !a.readonly && (x("update:model-value", r), x("input", r));
127
- };
128
- return (r, M) => (i(), E("div", {
129
- class: k(["b-selection-card", N.value]),
130
- onClick: d
131
- }, [
132
- q("div", {
133
- class: k(["b-selection-card__container", _.value])
134
- }, [
135
- q("div", {
136
- class: k(["b-selection-card__checkbox-container", O.value])
137
- }, [
138
- q("div", {
139
- class: k(["b-selection-card__checkbox-container-text", U.value])
140
- }, [
141
- t(c)("icon") ? (i(), E("div", Se, [
142
- y(r.$slots, "icon", {}, void 0, !0)
143
- ])) : $("", !0),
144
- q("label", {
145
- for: t(B),
146
- class: "b-selection-card__text",
147
- onClick: ie(d, ["stop", "prevent"])
148
- }, [
149
- e.subtitle ? (i(), f(t(I), {
150
- key: 0,
151
- class: "b-selection-card__description",
152
- el: "span",
153
- variant: "caption"
154
- }, {
155
- default: u(() => [
156
- Y(Q(e.subtitle), 1)
157
- ]),
158
- _: 1
159
- })) : $("", !0),
160
- de(t(I), {
161
- el: "span",
162
- variant: "title"
163
- }, {
164
- default: u(() => [
165
- Y(Q(e.title), 1)
166
- ]),
167
- _: 1
168
- }),
169
- e.description ? (i(), f(t(I), {
170
- key: 1,
171
- id: "descriptionId",
172
- class: "b-selection-card__description",
173
- el: "span",
174
- variant: "body"
175
- }, {
176
- default: u(() => [
177
- Y(Q(e.description), 1)
178
- ]),
179
- _: 1
180
- })) : $("", !0)
181
- ], 8, Re)
182
- ], 2),
183
- t(w) ? (i(), f(t(he), {
184
- key: 0,
185
- id: t(B),
186
- ref_key: "inputRef",
187
- ref: b,
188
- "aria-label": t(n),
189
- "aria-describedby": e.description ? t(p) : void 0,
190
- disabled: e.disabled,
191
- "has-error": e.hasError,
192
- "aria-readonly": e.readonly ?? void 0,
193
- value: e.value,
194
- readonly: e.readonly,
195
- "model-value": L.value
196
- }, null, 8, ["id", "aria-label", "aria-describedby", "disabled", "has-error", "aria-readonly", "value", "readonly", "model-value"])) : (i(), f(t(be), {
197
- key: 1,
198
- id: t(B),
199
- ref_key: "inputRef",
200
- ref: b,
201
- "aria-label": t(n),
202
- "aria-describedby": e.description ? t(p) : void 0,
203
- disabled: e.disabled,
204
- "has-error": e.hasError,
205
- "aria-readonly": e.readonly ?? void 0,
206
- value: e.value,
207
- readonly: e.readonly,
208
- "model-value": C.value
209
- }, null, 8, ["id", "aria-label", "aria-describedby", "disabled", "has-error", "aria-readonly", "value", "readonly", "model-value"]))
210
- ], 2),
211
- t(c)("content") ? (i(), f(t(I), {
212
- key: 0,
213
- ref_key: "slotRef",
214
- ref: l,
215
- el: "div",
216
- class: k(["b-selection-card__slot", h.value])
217
- }, {
218
- default: u(() => [
219
- y(r.$slots, "content", {}, void 0, !0)
220
- ]),
221
- _: 3
222
- }, 8, ["class"])) : $("", !0),
223
- t(c)("dynamicContent") && S.value ? (i(), f(t(I), {
224
- key: 1,
225
- ref_key: "dynamicSlotRef",
226
- ref: v,
227
- el: "div",
228
- class: k(["b-selection-card__slot", h.value])
229
- }, {
230
- default: u(() => [
231
- y(r.$slots, "dynamicContent", {}, void 0, !0)
232
- ]),
233
- _: 3
234
- }, 8, ["class"])) : $("", !0)
235
- ], 2)
236
- ], 2));
237
- }
238
- }), ee = /* @__PURE__ */ te(Ve, [["__scopeId", "data-v-925457bd"]]), Ee = {}, xe = /* @__PURE__ */ ae({
239
- ...Ee,
240
- __name: "selection-card-group",
241
- props: {
242
- /**
243
- * Descriptive supporting text visbile underneath the label.
244
- */
245
- description: { type: String, default: null },
246
- /**
247
- * If set to true, renders all cards in the group in a disabled state.
248
- */
249
- disabled: { type: Boolean, default: !1 },
250
- /**
251
- * Renders all cards in an error state with an error message.
252
- */
253
- errorMessage: { type: String, default: null },
254
- /**
255
- * The form id the selection card group is associated with. Defaults to null, as a selection card group can also be used standalone.
256
- */
257
- formId: { type: String, default: null },
258
- /**
259
- * Shows/hides the group label.
260
- */
261
- hideLabel: { type: Boolean, default: null },
262
- /**
263
- * Label of the group. Required for accessibility purposes, even if it's not shown
264
- */
265
- label: {
266
- type: String,
267
- required: !0
268
- },
269
- /**
270
- * The selection card group's layout. It can be vertical or horizontal. Defaults to vertical.
271
- * @values horizontal, vertical
272
- */
273
- layout: {
274
- type: String,
275
- default: "vertical"
276
- },
277
- /**
278
- * The selection card group's items.
279
- */
280
- items: {
281
- type: Array,
282
- required: !0
283
- },
284
- /**
285
- * Sets the responsive number of items rendered in each row.
286
- */
287
- itemsPerRow: {
288
- type: Object,
289
- default: void 0
290
- },
291
- /**
292
- * Determines the initially selected value of the group. Corresponds to the BentoSelectionCardItem's value.
293
- * Defaults to no value selected.
294
- */
295
- modelValue: {
296
- type: [Array, String, Number],
297
- default: null
298
- },
299
- /**
300
- * Indicates the field is optional.
301
- */
302
- optional: { type: Boolean, default: !1 },
303
- /**
304
- * Indicates the field is required.
305
- */
306
- required: { type: Boolean, default: !1 },
307
- /**
308
- * Tooltip message.
309
- */
310
- tooltipText: { type: String, default: null },
311
- /**
312
- * If set to true, renders all cards in the group in a readonly state.
313
- */
314
- readonly: { type: Boolean, default: !1 },
315
- /**
316
- * Renders the cards with a checkbox or a radio input. Selection logic will also apply in accordance.
317
- * @values checkbox, radio
318
- */
319
- variant: { type: String, default: "checkbox" }
320
- },
321
- emits: ["input", "update:model-value"],
322
- setup(e, { emit: j }) {
323
- const a = e, x = j, z = le(), c = (l) => !!z[l], B = o(() => ({
324
- "b-selection-card-group__items--horizontal": a.layout === "horizontal"
325
- })), p = V(a.modelValue);
326
- se(
327
- () => a.modelValue,
328
- () => {
329
- p.value = a.modelValue;
330
- }
331
- );
332
- const L = H("error"), C = o(() => !a.disabled && !a.readonly && !!a.errorMessage), N = V(null), { width: _ } = fe(N), O = o(() => ve.split("px")[0]), U = o(() => ye.split("px")[0]), h = o(() => _.value < O.value ? "small" : _.value >= O.value && _.value < U.value ? "medium" : "large"), n = o(() => {
333
- var l;
334
- return ((l = a.itemsPerRow) == null ? void 0 : l[h == null ? void 0 : h.value]) || a.items.length;
335
- }), D = o(() => {
336
- if (!a.itemsPerRow)
337
- return [];
338
- const l = [];
339
- for (let v = 0; v < a.items.length; v += n == null ? void 0 : n.value)
340
- l.push(a.items.slice(v, v + (n == null ? void 0 : n.value)));
341
- return l;
342
- }), S = o(() => 12 / (n == null ? void 0 : n.value)), w = o(() => n != null && n.value ? new Array(n == null ? void 0 : n.value).fill({
343
- // Instead of passing the actual screen sizes values, passing the same values per each screen size and recomputing it makes sure visually the change is smoother and not laggy
344
- small: S.value,
345
- medium: S.value,
346
- large: S.value
347
- }) : []), R = (l) => {
348
- p.value = l, x("update:model-value", l), x("input", l);
349
- }, b = o(() => a.variant === "radio");
350
- return ue(oe, b), ce(() => {
351
- a.itemsPerRow && Object.values(a.itemsPerRow).forEach((l) => {
352
- if (l && (l < 2 || l > 6))
353
- throw new Error(
354
- "itemsPerRow values must have a value between 2 and 6 items per row. Read the documentation for more information."
355
- );
356
- });
357
- }), (l, v) => (i(), f(t(ge), {
358
- ref_key: "containerRef",
359
- ref: N,
360
- "aria-describedby": C.value ? t(L) : null,
361
- label: e.label,
362
- "hide-label": e.hideLabel,
363
- description: e.description,
364
- disabled: e.disabled,
365
- "tooltip-text": e.tooltipText,
366
- readonly: e.readonly,
367
- required: e.required,
368
- optional: e.optional,
369
- class: "b-selection-card-group",
370
- "component-name": "selection-card-group"
371
- }, {
372
- default: u(() => [
373
- !e.itemsPerRow || e.layout === "vertical" ? (i(), E("div", {
374
- key: 0,
375
- class: k(["b-selection-card-group__items", B.value])
376
- }, [
377
- (i(!0), E(Z, null, W(e.items, (d) => (i(), f(ee, m({
378
- key: `selection-card-${d.value}`,
379
- class: "b-selection-card-group__item",
380
- ref_for: !0
381
- }, d, {
382
- "model-value": p.value,
383
- readonly: e.readonly || d.readonly,
384
- "has-error": C.value,
385
- disabled: e.disabled || d.disabled,
386
- "onUpdate:modelValue": R
387
- }), F({ _: 2 }, [
388
- c("icon") && d.icon ? {
389
- name: "icon",
390
- fn: u(() => [
391
- y(l.$slots, "icon", m({ ref_for: !0 }, d), void 0, !0)
392
- ]),
393
- key: "0"
394
- } : void 0,
395
- c("content") && d.content ? {
396
- name: "content",
397
- fn: u(() => [
398
- y(l.$slots, "content", m({ ref_for: !0 }, d), void 0, !0)
399
- ]),
400
- key: "1"
401
- } : void 0,
402
- c("dynamicContent") && d.dynamicContent ? {
403
- name: "dynamicContent",
404
- fn: u(() => [
405
- y(l.$slots, "dynamicContent", m({ ref_for: !0 }, d), void 0, !0)
406
- ]),
407
- key: "2"
408
- } : void 0
409
- ]), 1040, ["model-value", "readonly", "has-error", "disabled"]))), 128))
410
- ], 2)) : (i(), E("div", {
411
- key: `selection-card-group-layout-breakpoint-${h.value}`
412
- }, [
413
- (i(!0), E(Z, null, W(D.value, (d, T) => (i(), f(t(ke), {
414
- key: `selection-card-group-row-${T}-cols-${n.value}`,
415
- class: "b-selection-card-group__items--wrap",
416
- "column-width": w.value
417
- }, F({ _: 2 }, [
418
- W(d, (s, r) => ({
419
- name: `col-${r + 1}`,
420
- fn: u(() => [
421
- (i(), f(ee, m({
422
- key: `selection-card-${s.value}`,
423
- class: "b-selection-card-group__item b-selection-card-group__item--full-height",
424
- ref_for: !0
425
- }, s, {
426
- "model-value": p.value,
427
- readonly: e.readonly || s.readonly,
428
- "has-error": C.value,
429
- disabled: e.disabled || s.disabled,
430
- "onUpdate:modelValue": R
431
- }), F({ _: 2 }, [
432
- c("icon") && s.icon ? {
433
- name: "icon",
434
- fn: u(() => [
435
- y(l.$slots, "icon", m({ ref_for: !0 }, s), void 0, !0)
436
- ]),
437
- key: "0"
438
- } : void 0,
439
- c("content") && s.content ? {
440
- name: "content",
441
- fn: u(() => [
442
- y(l.$slots, "content", m({ ref_for: !0 }, s), void 0, !0)
443
- ]),
444
- key: "1"
445
- } : void 0,
446
- c("dynamicContent") && s.dynamicContent ? {
447
- name: "dynamicContent",
448
- fn: u(() => [
449
- y(l.$slots, "dynamicContent", m({ ref_for: !0 }, s), void 0, !0)
450
- ]),
451
- key: "2"
452
- } : void 0
453
- ]), 1040, ["model-value", "readonly", "has-error", "disabled"]))
454
- ])
455
- }))
456
- ]), 1032, ["column-width"]))), 128))
457
- ])),
458
- C.value ? (i(), f(t(Ce), {
459
- key: 2,
460
- id: t(L),
461
- "error-message": e.errorMessage,
462
- class: "b-selection-card-group__error-message"
463
- }, null, 8, ["id", "error-message"])) : $("", !0)
464
- ]),
465
- _: 3
466
- }, 8, ["aria-describedby", "label", "hide-label", "description", "disabled", "tooltip-text", "readonly", "required", "optional"]));
467
- }
468
- }), je = /* @__PURE__ */ te(xe, [["__scopeId", "data-v-e9577916"]]);
469
- export {
470
- ee as B,
471
- G as a,
472
- je as s
473
- };
474
- //# sourceMappingURL=selection-card-group._RgLiMyQ.js.map