@adyen/bento-vue2 1.12.0 → 1.13.1
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/components.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +10 -22
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +23 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-scroller/use-scroller.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +520 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +4 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/listbox-multi-select-chips.vue.d.ts +28 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +3 -4
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/composables/useListboxKeyboardNavigation.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +3 -2
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +22 -26
- package/dist/@types/packages/vue2/src/components/radio-group/index.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.keys.d.ts +1 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +5 -5
- package/dist/alert.js +17 -16
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +45 -52
- package/dist/button.js.map +1 -1
- package/dist/card.js +2 -2
- package/dist/checkbox.js +6 -6
- package/dist/chunks/arrow-left.2db60716.js.map +1 -1
- package/dist/chunks/{base-button.1f07b7c1.js → base-button.f9080a52.js} +2 -2
- package/dist/chunks/{base-button.1f07b7c1.js.map → base-button.f9080a52.js.map} +1 -1
- package/dist/chunks/{base-modal.9d63bdaf.js → base-modal.a580438d.js} +42 -40
- package/dist/chunks/base-modal.a580438d.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.4c5091f4.js → button-actions-with-menu.a9087340.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.4c5091f4.js.map → button-actions-with-menu.a9087340.js.map} +1 -1
- package/dist/chunks/{button.133f145e.js → button.bb0d7584.js} +7 -7
- package/dist/chunks/{button.133f145e.js.map → button.bb0d7584.js.map} +1 -1
- package/dist/chunks/{calendar.9a8605d1.js → calendar.17ab99de.js} +66 -66
- package/dist/chunks/{calendar.9a8605d1.js.map → calendar.17ab99de.js.map} +1 -1
- package/dist/chunks/{checkbox.d8b810c7.js → checkbox.51cdb397.js} +3 -3
- package/dist/chunks/checkbox.51cdb397.js.map +1 -0
- package/dist/chunks/checkmark-circle-fill.345311d2.js.map +1 -1
- package/dist/chunks/checkmark-small.520f01b1.js.map +1 -1
- package/dist/chunks/checkmark.a6ed8f47.js.map +1 -1
- package/dist/chunks/chevron-left.5edf02ac.js.map +1 -1
- package/dist/chunks/chevron-up.81185563.js.map +1 -1
- package/dist/chunks/{controls-group.bf152dea.js → controls-group.3716f4b4.js} +4 -4
- package/dist/chunks/{controls-group.bf152dea.js.map → controls-group.3716f4b4.js.map} +1 -1
- package/dist/chunks/{copy.68a7d416.js → copy.54cc3ab4.js} +4 -4
- package/dist/chunks/copy.54cc3ab4.js.map +1 -0
- package/dist/chunks/cross-circle-fill.27580c4b.js.map +1 -1
- package/dist/chunks/cross-small.e851e0de.js +26 -0
- package/dist/chunks/cross-small.e851e0de.js.map +1 -0
- package/dist/chunks/cross.04678d81.js.map +1 -1
- package/dist/chunks/{dropdown-default-textbox.c595fd31.js → dropdown-default-textbox.13b5054e.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.c595fd31.js.map → dropdown-default-textbox.13b5054e.js.map} +1 -1
- package/dist/chunks/{dropdown.eaee22a3.js → dropdown.4d800c61.js} +14 -14
- package/dist/chunks/dropdown.4d800c61.js.map +1 -0
- package/dist/chunks/{field-label.66f52c8f.js → field-label.7328b82b.js} +2 -2
- package/dist/chunks/{field-label.66f52c8f.js.map → field-label.7328b82b.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.01fc96f7.js → fixed-scroller.d6c11166.js} +2 -2
- package/dist/chunks/{fixed-scroller.01fc96f7.js.map → fixed-scroller.d6c11166.js.map} +1 -1
- package/dist/chunks/{footer-actions.38e99891.js → footer-actions.bc0cb7e0.js} +3 -3
- package/dist/chunks/{footer-actions.38e99891.js.map → footer-actions.bc0cb7e0.js.map} +1 -1
- package/dist/chunks/{index.d90c5838.js → index.170ac16b.js} +3 -3
- package/dist/chunks/{index.d90c5838.js.map → index.170ac16b.js.map} +1 -1
- package/dist/chunks/{index.18773b0b.js → index.339f15c4.js} +26 -26
- package/dist/chunks/{index.18773b0b.js.map → index.339f15c4.js.map} +1 -1
- package/dist/chunks/{index.3b7d40b7.js → index.541cce1c.js} +2 -2
- package/dist/chunks/{index.3b7d40b7.js.map → index.541cce1c.js.map} +1 -1
- package/dist/chunks/{index.9b669c12.js → index.5742fba4.js} +7 -7
- package/dist/chunks/index.5742fba4.js.map +1 -0
- package/dist/chunks/{index.99a2184a.js → index.6ac01113.js} +2 -2
- package/dist/chunks/{index.99a2184a.js.map → index.6ac01113.js.map} +1 -1
- package/dist/chunks/{index.b38a191d.js → index.772a5595.js} +2 -2
- package/dist/chunks/{index.b38a191d.js.map → index.772a5595.js.map} +1 -1
- package/dist/chunks/{index.14758ff7.js → index.82ff40be.js} +3 -3
- package/dist/chunks/{index.14758ff7.js.map → index.82ff40be.js.map} +1 -1
- package/dist/chunks/{index.eb527b75.js → index.a4a820fd.js} +6 -6
- package/dist/chunks/{index.eb527b75.js.map → index.a4a820fd.js.map} +1 -1
- package/dist/chunks/{index.2cfe4a09.js → index.af238ed6.js} +2 -2
- package/dist/chunks/{index.2cfe4a09.js.map → index.af238ed6.js.map} +1 -1
- package/dist/chunks/index.d1f65246.js +80 -0
- package/dist/chunks/index.d1f65246.js.map +1 -0
- package/dist/chunks/{index.45aa17fc.js → index.ec0743da.js} +5 -5
- package/dist/chunks/{index.45aa17fc.js.map → index.ec0743da.js.map} +1 -1
- package/dist/chunks/{info-filled.27bd4bfb.js → info-filled.c37e091d.js} +12 -33
- package/dist/chunks/{info-filled.27bd4bfb.js.map → info-filled.c37e091d.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.168c794c.js → listbox-option-tag.6f3e922c.js} +3 -3
- package/dist/chunks/{listbox-option-tag.168c794c.js.map → listbox-option-tag.6f3e922c.js.map} +1 -1
- package/dist/chunks/{listbox.23c6b393.js → listbox.e5d70b9b.js} +471 -422
- package/dist/chunks/listbox.e5d70b9b.js.map +1 -0
- package/dist/chunks/{loading-button.44d698b9.js → loading-button.7301cc2e.js} +2 -2
- package/dist/chunks/{loading-button.44d698b9.js.map → loading-button.7301cc2e.js.map} +1 -1
- package/dist/chunks/refresh.71a03998.js.map +1 -1
- package/dist/chunks/search.471270fe.js.map +1 -1
- package/dist/chunks/sidepanel.keys.3f8d69c1.js +7 -0
- package/dist/chunks/sidepanel.keys.3f8d69c1.js.map +1 -0
- package/dist/chunks/{tooltip.f91b2040.js → tooltip.46858ae6.js} +3 -3
- package/dist/chunks/{tooltip.f91b2040.js.map → tooltip.46858ae6.js.map} +1 -1
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +692 -683
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +18 -18
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +6 -6
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +477 -471
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +3 -3
- package/dist/index.js +208 -205
- package/dist/info-icon.js +3 -3
- package/dist/info-icon.js.map +1 -1
- package/dist/input-field.js +4 -4
- package/dist/internal.js +7 -7
- package/dist/link.js +3 -56
- package/dist/link.js.map +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +4 -4
- package/dist/pagination.js +4 -4
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +84 -101
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +1 -1
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +73 -71
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/stepper.js.map +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +3 -3
- package/dist/tag.js +3 -3
- package/dist/textarea.js +91 -87
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +6 -6
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +8 -7
- package/dist/toast.js.map +1 -1
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +4 -4
- package/dist/tutorial.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +139 -55
- package/package.json +2 -2
- package/dist/chunks/base-modal.9d63bdaf.js.map +0 -1
- package/dist/chunks/checkbox.d8b810c7.js.map +0 -1
- package/dist/chunks/copy.68a7d416.js.map +0 -1
- package/dist/chunks/dropdown.eaee22a3.js.map +0 -1
- package/dist/chunks/index.9b669c12.js.map +0 -1
- package/dist/chunks/listbox.23c6b393.js.map +0 -1
package/dist/textarea.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as
|
|
3
|
-
import { B as
|
|
4
|
-
import { n as
|
|
5
|
-
import { g as
|
|
6
|
-
import { o as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { E as
|
|
11
|
-
import "./assets/
|
|
12
|
-
let
|
|
13
|
-
const
|
|
1
|
+
import { defineComponent as K, useAttrs as Q, toRefs as O, ref as u, toRef as X, computed as o, watch as L, nextTick as ee, onMounted as te, onUnmounted as ae } from "vue";
|
|
2
|
+
import { a as le } from "./chunks/button.bb0d7584.js";
|
|
3
|
+
import { B as re } from "./chunks/index.6ac01113.js";
|
|
4
|
+
import { n as w } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
5
|
+
import { g as se } from "./chunks/unique-id.a2a2b458.js";
|
|
6
|
+
import { o as F } from "./chunks/resize.a041304d.js";
|
|
7
|
+
import { u as oe } from "./chunks/aria-label.ac9651a5.js";
|
|
8
|
+
import { u as ne } from "./chunks/i18n.eb5b985b.js";
|
|
9
|
+
import { u as ie } from "./chunks/use-form-layout-loading.d03e5d48.js";
|
|
10
|
+
import { E as ue, F as ce } from "./chunks/field-label.7328b82b.js";
|
|
11
|
+
import "./assets/index25.css";
|
|
12
|
+
let T = 0;
|
|
13
|
+
const de = {
|
|
14
14
|
beforeCreate() {
|
|
15
|
-
this.uuid =
|
|
15
|
+
this.uuid = T.toString(), T += 1;
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
var
|
|
18
|
+
var pe = function() {
|
|
19
19
|
var e = this, a = e._self._c;
|
|
20
20
|
return a("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? a("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), a("path", { attrs: { fill: "#00112C", d: "M2.25 8C2.25 4.82436 4.82436 2.25 8 2.25C11.1756 2.25 13.75 4.82436 13.75 8C13.75 11.1756 11.1756 13.75 8 13.75C4.82436 13.75 2.25 11.1756 2.25 8ZM7.00011 5.93945L5.93945 7.00011L6.93945 8.00011L5.93945 9.00011L7.00011 10.0608L8.00011 9.06077L9.00011 10.0608L10.0608 9.00011L9.06077 8.00011L10.0608 7.00011L9.00011 5.93945L8.00011 6.93945L7.00011 5.93945Z" } })]);
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
}, _e = [], fe = /* @__PURE__ */ w(
|
|
22
|
+
de,
|
|
23
|
+
pe,
|
|
24
|
+
_e,
|
|
25
25
|
!1,
|
|
26
26
|
null,
|
|
27
27
|
null,
|
|
28
28
|
null,
|
|
29
29
|
null
|
|
30
30
|
);
|
|
31
|
-
const
|
|
32
|
-
var
|
|
33
|
-
const
|
|
31
|
+
const be = fe.exports;
|
|
32
|
+
var E = /* @__PURE__ */ ((l) => (l.HORIZONTAL = "horizontal", l.VERTICAL = "vertical", l.BOTH = "both", l.NONE = "none", l))(E || {}), c = /* @__PURE__ */ ((l) => (l.CLEARABLE = "clearable", l.DISABLED = "disabled", l.ERROR = "error", l.READONLY = "readonly", l))(c || {}), i = /* @__PURE__ */ ((l) => (l.BLUR = "blur", l.CHANGE = "change", l.CLEAR = "clear", l.ESCAPE_PRESSED = "escape-pressed", l.FOCUS = "focus", l.INPUT = "input", l))(i || {});
|
|
33
|
+
const ve = {
|
|
34
34
|
"en-US": {
|
|
35
35
|
clearText: "Clear text",
|
|
36
36
|
textarea: "textarea",
|
|
37
37
|
yourTextCanBenAtMost: "Your text can be at most {characterLimit} characters"
|
|
38
38
|
}
|
|
39
|
-
},
|
|
40
|
-
i18n: { messages:
|
|
39
|
+
}, me = {
|
|
40
|
+
i18n: { messages: ve },
|
|
41
41
|
name: "bento-textarea"
|
|
42
|
-
},
|
|
43
|
-
...
|
|
42
|
+
}, ye = /* @__PURE__ */ K({
|
|
43
|
+
...me,
|
|
44
44
|
props: {
|
|
45
45
|
/**
|
|
46
46
|
* Text that labels an the input element
|
|
@@ -91,8 +91,8 @@ const _e = {
|
|
|
91
91
|
*/
|
|
92
92
|
resizable: {
|
|
93
93
|
type: String,
|
|
94
|
-
default:
|
|
95
|
-
validator: (
|
|
94
|
+
default: E.BOTH,
|
|
95
|
+
validator: (l) => Object.values(E).includes(l)
|
|
96
96
|
},
|
|
97
97
|
/**
|
|
98
98
|
* Highlights the textarea is required.
|
|
@@ -107,101 +107,105 @@ const _e = {
|
|
|
107
107
|
*/
|
|
108
108
|
value: { type: String, default: "" }
|
|
109
109
|
},
|
|
110
|
-
setup(
|
|
111
|
-
const a =
|
|
110
|
+
setup(l, { emit: e }) {
|
|
111
|
+
const a = l, t = Q(), { height: r } = O(a), M = se("textarea"), n = u(null), d = u(null), s = u(a.value), b = 44, v = u(a.height || `${b}px`), g = u("100%");
|
|
112
|
+
let p = null, _ = null;
|
|
113
|
+
const { t: S } = ne(), { isReadOnly: m } = ie(X(a, "readonly")), P = o(() => `${s.value.length} / ${a.characterLimit}`), x = o(
|
|
112
114
|
() => a.characterLimit && s.value.length > a.characterLimit
|
|
113
|
-
),
|
|
114
|
-
n.value && n.value.scrollHeight >
|
|
115
|
+
), y = () => {
|
|
116
|
+
n.value && n.value.scrollHeight > b && (v.value = `${n.value.scrollHeight + 3}px`);
|
|
115
117
|
};
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}),
|
|
118
|
+
L(r, () => {
|
|
119
|
+
r.value ? v.value = r.value : y();
|
|
120
|
+
}), L(
|
|
119
121
|
() => a.value,
|
|
120
122
|
() => {
|
|
121
123
|
s.value = a.value;
|
|
122
124
|
},
|
|
123
125
|
{ immediate: !0 }
|
|
124
|
-
),
|
|
126
|
+
), L(
|
|
125
127
|
() => s.value,
|
|
126
128
|
async () => {
|
|
127
|
-
if (!
|
|
128
|
-
if (
|
|
129
|
+
if (!r.value) {
|
|
130
|
+
if (v.value = `${b}px`, !s.value)
|
|
129
131
|
return;
|
|
130
|
-
await
|
|
132
|
+
await ee(), y();
|
|
131
133
|
}
|
|
132
134
|
},
|
|
133
135
|
{ immediate: !0 }
|
|
134
136
|
);
|
|
135
|
-
const
|
|
137
|
+
const R = o(() => !!a.errorMessage || x.value), H = o(() => ({
|
|
136
138
|
[`b-textarea--${c.DISABLED}`]: a.disabled
|
|
137
|
-
})),
|
|
139
|
+
})), N = o(() => ({
|
|
138
140
|
[`b-textarea__input--${c.CLEARABLE}`]: a.clearable,
|
|
139
|
-
[`b-textarea__input--${c.READONLY}`]:
|
|
140
|
-
[`b-textarea__input--${c.ERROR}`]:
|
|
141
|
-
["b-textarea__input--dynamic-height"]: !
|
|
142
|
-
})),
|
|
141
|
+
[`b-textarea__input--${c.READONLY}`]: m.value,
|
|
142
|
+
[`b-textarea__input--${c.ERROR}`]: R.value,
|
|
143
|
+
["b-textarea__input--dynamic-height"]: !r.value
|
|
144
|
+
})), $ = o(() => ({
|
|
143
145
|
["b-textarea__label-box--no-label"]: !a.label
|
|
144
|
-
})),
|
|
145
|
-
[`b-textarea__label-item--${c.ERROR}`]:
|
|
146
|
-
})),
|
|
147
|
-
ariaLabel:
|
|
146
|
+
})), U = o(() => ({
|
|
147
|
+
[`b-textarea__label-item--${c.ERROR}`]: x.value
|
|
148
|
+
})), W = o(() => S("yourTextCanBenAtMost", { characterLimit: a.characterLimit })), A = u(t["aria-label"]), { ariaLabel: I, label: B } = O(a), D = oe({
|
|
149
|
+
ariaLabel: A.value,
|
|
148
150
|
// TODO: take this line away when the aria-label props is removed
|
|
149
|
-
label:
|
|
150
|
-
defaultFallback:
|
|
151
|
-
}),
|
|
152
|
-
() => a.clearable && s.value && !a.disabled && !
|
|
153
|
-
),
|
|
151
|
+
label: I,
|
|
152
|
+
defaultFallback: B
|
|
153
|
+
}), z = o(
|
|
154
|
+
() => a.clearable && s.value && !a.disabled && !m.value
|
|
155
|
+
), q = () => {
|
|
154
156
|
s.value = "", e(i.CLEAR), e(i.INPUT, "");
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
},
|
|
157
|
+
}, V = (f) => {
|
|
158
|
+
f.stopImmediatePropagation(), !a.disabled && !m.value && (s.value = f.target.value, e(i.INPUT, s.value));
|
|
159
|
+
}, Y = () => {
|
|
158
160
|
n.value.scrollTop = 0, e(i.BLUR);
|
|
159
|
-
},
|
|
161
|
+
}, Z = () => {
|
|
160
162
|
n.value.focus(), e(i.FOCUS);
|
|
161
|
-
},
|
|
163
|
+
}, G = () => {
|
|
162
164
|
e(i.CHANGE);
|
|
163
|
-
},
|
|
165
|
+
}, j = () => {
|
|
164
166
|
e(i.ESCAPE_PRESSED);
|
|
165
|
-
},
|
|
166
|
-
var
|
|
167
|
-
const
|
|
168
|
-
if (
|
|
167
|
+
}, C = (f = !1) => {
|
|
168
|
+
var k;
|
|
169
|
+
const h = n.value.style.width;
|
|
170
|
+
if (f && !h)
|
|
169
171
|
return;
|
|
170
|
-
const
|
|
171
|
-
!
|
|
172
|
+
const J = (k = d == null ? void 0 : d.value) == null ? void 0 : k.offsetWidth;
|
|
173
|
+
!h || parseInt(h, 10) > J ? g.value = "100%" : g.value = h;
|
|
172
174
|
};
|
|
173
|
-
return
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}),
|
|
177
|
-
|
|
178
|
-
}),
|
|
179
|
-
}),
|
|
175
|
+
return te(() => {
|
|
176
|
+
p = F(n.value, () => {
|
|
177
|
+
C(!0);
|
|
178
|
+
}), _ = F(d.value, () => {
|
|
179
|
+
C();
|
|
180
|
+
}), r.value || y();
|
|
181
|
+
}), ae(() => {
|
|
182
|
+
p == null || p.disconnect(), _ == null || _.disconnect();
|
|
183
|
+
}), { __sfc: !0, attrs: t, props: a, emit: e, height: r, textareaId: M, textareaElement: n, textareaComponent: d, textareaValue: s, defaultTextareaHeight: b, textareaHeight: v, textareaWrapperWidth: g, textareaElementObserver: p, textareaComponentObserver: _, t: S, isReadOnly: m, counter: P, isOverCharacterLimit: x, calculateHeight: y, invalidInput: R, conditionalClasses: H, conditionalClassesInput: N, conditionalClassesLabelBox: $, conditionalClassesLabelItem: U, counterErrorText: W, ariaLabelAttribute: A, ariaLabel: I, label: B, computedAriaLabel: D, showClearButton: z, onClear: q, onInput: V, onBlur: Y, onFocus: Z, onChange: G, onPressEscape: j, resizeTextareaWrapper: C, BentoButton: le, BentoTypography: re, ErrorMessage: ue, FieldLabel: ce, CrossCircleFillSmallIcon: be };
|
|
180
184
|
}
|
|
181
185
|
});
|
|
182
|
-
var
|
|
186
|
+
var he = function() {
|
|
183
187
|
var e = this, a = e._self._c, t = e._self._setupProxy;
|
|
184
|
-
return a("div", { ref: "textareaComponent", staticClass: "b-textarea", class: t.conditionalClasses }, [a("div", { style: { width: t.textareaWrapperWidth } }, [a("div", { staticClass: "b-textarea__label-box", class: t.conditionalClassesLabelBox }, [t.label ? a(t.FieldLabel, { attrs: { for: t.textareaId, label: t.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), e.characterLimit ? a(t.BentoTypography, { staticClass: "b-textarea__label-item", class: t.conditionalClassesLabelItem, attrs: { el: "span" } }, [e._v(" " + e._s(t.counter) + " ")]) : e._e()], 1), a(t.BentoTypography, { staticClass: "b-textarea__input-box", attrs: { el: "div", "aria-disabled": e.disabled } }, [a("textarea", { ref: "textareaElement", staticClass: "b-textarea__input", class: t.conditionalClassesInput, style: { resize: e.resizable, height: t.textareaHeight }, attrs: { id: t.textareaId, "aria-label": t.computedAriaLabel, "aria-invalid": t.invalidInput, readonly: t.isReadOnly, disabled: e.disabled, placeholder: e.placeholder }, domProps: { value: t.textareaValue }, on: { blur: t.onBlur, change: t.onChange, focus: t.onFocus, input: t.onInput, keydown: function(
|
|
185
|
-
return !
|
|
186
|
-
} } }), t.showClearButton ? a("div", { staticClass: "b-textarea__clear-button" }, [a(t.BentoButton, { attrs: { variant: "tertiary", disabled: e.disabled }, on: { click: t.onClear, keypress: function(
|
|
187
|
-
return !
|
|
188
|
-
}, keyup: function(
|
|
189
|
-
return !
|
|
188
|
+
return a("div", { ref: "textareaComponent", staticClass: "b-textarea", class: t.conditionalClasses }, [a("div", { style: { width: t.textareaWrapperWidth } }, [a("div", { staticClass: "b-textarea__label-box", class: t.conditionalClassesLabelBox }, [t.label ? a(t.FieldLabel, { attrs: { for: t.textareaId, label: t.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), e.characterLimit ? a(t.BentoTypography, { staticClass: "b-textarea__label-item", class: t.conditionalClassesLabelItem, attrs: { el: "span" } }, [e._v(" " + e._s(t.counter) + " ")]) : e._e()], 1), a(t.BentoTypography, { staticClass: "b-textarea__input-box", attrs: { el: "div", "aria-disabled": e.disabled } }, [a("textarea", { ref: "textareaElement", staticClass: "b-textarea__input", class: t.conditionalClassesInput, style: { resize: e.resizable, height: t.textareaHeight }, attrs: { id: t.textareaId, "aria-label": t.computedAriaLabel, "aria-invalid": t.invalidInput, readonly: t.isReadOnly, disabled: e.disabled, placeholder: e.placeholder }, domProps: { value: t.textareaValue }, on: { blur: t.onBlur, change: t.onChange, focus: t.onFocus, input: t.onInput, keydown: function(r) {
|
|
189
|
+
return !r.type.indexOf("key") && e._k(r.keyCode, "esc", 27, r.key, ["Esc", "Escape"]) ? null : t.onPressEscape.apply(null, arguments);
|
|
190
|
+
} } }), t.showClearButton ? a("div", { staticClass: "b-textarea__clear-button" }, [a(t.BentoButton, { attrs: { variant: "tertiary", disabled: e.disabled }, on: { click: t.onClear, keypress: function(r) {
|
|
191
|
+
return !r.type.indexOf("key") && e._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : t.onClear.apply(null, arguments);
|
|
192
|
+
}, keyup: function(r) {
|
|
193
|
+
return !r.type.indexOf("key") && e._k(r.keyCode, "space", 32, r.key, [" ", "Spacebar"]) ? null : t.onClear.apply(null, arguments);
|
|
190
194
|
} }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
|
|
191
195
|
return [a(t.CrossCircleFillSmallIcon, { attrs: { "svg-title": t.t("clearText") } })];
|
|
192
196
|
}, proxy: !0 }], null, !1, 3119266621) })], 1) : e._e()]), t.isOverCharacterLimit ? a(t.ErrorMessage, { attrs: { "error-message": t.counterErrorText } }) : e._e(), e.errorMessage ? a(t.ErrorMessage, { attrs: { "error-message": e.errorMessage } }) : e._e(), e.description ? a(t.BentoTypography, { staticClass: "b-textarea__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.description) + " ")]) : e._e()], 1)]);
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
}, ge = [], xe = /* @__PURE__ */ w(
|
|
198
|
+
ye,
|
|
199
|
+
he,
|
|
200
|
+
ge,
|
|
197
201
|
!1,
|
|
198
202
|
null,
|
|
199
|
-
"
|
|
203
|
+
"23205346",
|
|
200
204
|
null,
|
|
201
205
|
null
|
|
202
206
|
);
|
|
203
|
-
const
|
|
207
|
+
const Fe = xe.exports;
|
|
204
208
|
export {
|
|
205
|
-
|
|
209
|
+
Fe as BentoTextarea
|
|
206
210
|
};
|
|
207
211
|
//# sourceMappingURL=textarea.js.map
|
package/dist/textarea.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","sources":["../node_modules/@adyen/ui-assets-icons-16/dist/vue/cross-circle-fill-small.vue","../src/components/textarea/textarea.types.ts","../src/components/textarea/textarea.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M2.25 8C2.25 4.82436 4.82436 2.25 8 2.25C11.1756 2.25 13.75 4.82436 13.75 8C13.75 11.1756 11.1756 13.75 8 13.75C4.82436 13.75 2.25 11.1756 2.25 8ZM7.00011 5.93945L5.93945 7.00011L6.93945 8.00011L5.93945 9.00011L7.00011 10.0608L8.00011 9.06077L9.00011 10.0608L10.0608 9.00011L9.06077 8.00011L10.0608 7.00011L9.00011 5.93945L8.00011 6.93945L7.00011 5.93945Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTextareaResizeOption {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n BOTH = 'both',\n NONE = 'none',\n}\n\nexport enum BentoTextareaStateClass {\n CLEARABLE = 'clearable',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum BentoTextareaEvent {\n BLUR = 'blur',\n CHANGE = 'change',\n CLEAR = 'clear',\n ESCAPE_PRESSED = 'escape-pressed',\n FOCUS = 'focus',\n INPUT = 'input',\n}\n","<template>\n <div ref=\"textareaComponent\" class=\"b-textarea\" :class=\"conditionalClasses\">\n <div :style=\"{ width: textareaWrapperWidth }\">\n <div class=\"b-textarea__label-box\" :class=\"conditionalClassesLabelBox\">\n <field-label\n v-if=\"label\"\n :for=\"textareaId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n <bento-typography\n v-if=\"characterLimit\"\n el=\"span\"\n class=\"b-textarea__label-item\"\n :class=\"conditionalClassesLabelItem\"\n >\n {{ counter }}\n </bento-typography>\n </div>\n <bento-typography el=\"div\" class=\"b-textarea__input-box\" :aria-disabled=\"disabled\">\n <textarea\n :id=\"textareaId\"\n ref=\"textareaElement\"\n :value=\"textareaValue\"\n class=\"b-textarea__input\"\n :class=\"conditionalClassesInput\"\n :aria-label=\"computedAriaLabel\"\n :aria-invalid=\"invalidInput\"\n :readonly=\"isReadOnly\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n :style=\"{ resize: resizable, height: textareaHeight }\"\n @blur=\"onBlur\"\n @change=\"onChange\"\n @focus=\"onFocus\"\n @input=\"onInput\"\n @keydown.esc=\"onPressEscape\"\n >\n </textarea>\n\n <div v-if=\"showClearButton\" class=\"b-textarea__clear-button\">\n <bento-button\n variant=\"tertiary\"\n :disabled=\"disabled\"\n @click=\"onClear\"\n @keypress.enter=\"onClear\"\n @keyup.space=\"onClear\"\n >\n <template #iconLeft>\n <cross-circle-fill-small-icon :svg-title=\"t('clearText')\" />\n </template>\n </bento-button>\n </div>\n </bento-typography>\n\n <error-message v-if=\"isOverCharacterLimit\" :error-message=\"counterErrorText\" />\n\n <error-message v-if=\"errorMessage\" :error-message=\"errorMessage\" />\n\n <bento-typography v-if=\"description\" class=\"b-textarea__description\" el=\"span\">\n {{ description }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, onMounted, PropType, ref, toRef, toRefs, useAttrs, watch } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n\n // Utils\n import { generateUid } from '@/utils/ts/unique-id';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n // Types\n import { BentoTextareaEvent, BentoTextareaResizeOption, BentoTextareaStateClass } from './textarea.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n\n const props = defineProps({\n /**\n * Text that labels an the input element\n */\n ariaLabel: { type: String, default: undefined },\n\n /**\n * Text that shows number of characters in textarea\n */\n characterLimit: { type: Number, default: undefined },\n\n /**\n * Text displayed as the help text of the textarea\n */\n description: { type: String, default: '' },\n\n /**\n * Disables the possibility of changing value in the textarea\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * If set to true, shows a button to clear all the text\n */\n clearable: { type: Boolean, default: false },\n\n /**\n * Adds error text\n */\n errorMessage: { type: String, default: '' },\n\n /**\n * Sets the height of the textarea, e.g 200px OR 20vh\n */\n height: { type: String, default: null },\n\n /**\n * Text displayed as the label of the textarea\n */\n label: { type: String, default: '' },\n\n /**\n * Highlights the textarea is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Text displayed as the placeholder of the textarea\n */\n placeholder: { type: String, default: '' },\n\n /**\n * Set the textarea to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the possibility of resize the textarea\n */\n resizable: {\n type: String as PropType<BentoTextareaResizeOption | `${BentoTextareaResizeOption}`>,\n default: BentoTextareaResizeOption.BOTH,\n validator: (value: BentoTextareaResizeOption) => Object.values(BentoTextareaResizeOption).includes(value),\n },\n\n /**\n * Highlights the textarea is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * Text displayed as the value of the textarea\n */\n value: { type: String, default: '' },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the element has lost focus\n */\n (e: BentoTextareaEvent.BLUR): void;\n\n /**\n * Emitted when the user modifies the element's value. Unlike the 'input' event, the change event is not necessarily fired for each alteration to an element's value\n */\n (e: BentoTextareaEvent.CHANGE): void;\n\n /**\n * Emitted when the \"Clear\" button was clicked\n */\n (e: BentoTextareaEvent.CLEAR): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed\n */\n (e: BentoTextareaEvent.ESCAPE_PRESSED): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: BentoTextareaEvent.FOCUS): void;\n\n /**\n * Emitted when the component's model changes\n */\n (e: BentoTextareaEvent.INPUT, value: string): void;\n }>();\n\n const { height } = toRefs(props);\n\n const textareaId = generateUid('textarea');\n const textareaElement = ref<HTMLTextAreaElement>(null);\n const textareaComponent = ref<HTMLDivElement>(null);\n const textareaValue = ref(props.value);\n const defaultTextareaHeight = 44;\n const textareaHeight = ref(props.height || `${defaultTextareaHeight}px`);\n const textareaWrapperWidth = ref('100%'); // The width set to the wrapper of the label, textarea and description\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const counter = computed(() => `${textareaValue.value.length} / ${props.characterLimit}`);\n const isOverCharacterLimit = computed(\n () => props.characterLimit && textareaValue.value.length > props.characterLimit\n );\n\n const calculateHeight = () => {\n const borderWidth = 3;\n if (textareaElement.value && textareaElement.value.scrollHeight > defaultTextareaHeight) {\n textareaHeight.value = `${textareaElement.value.scrollHeight + borderWidth}px`;\n }\n };\n\n watch(height, () => {\n if (!height.value) {\n calculateHeight();\n } else {\n textareaHeight.value = height.value;\n }\n });\n\n watch(\n () => props.value,\n () => {\n textareaValue.value = props.value;\n },\n { immediate: true }\n );\n\n watch(\n () => textareaValue.value,\n async () => {\n if (!height.value) {\n // Hack to make the textarea calculate its height properly\n // Set the textarea back to the original value before calculating the height\n textareaHeight.value = `${defaultTextareaHeight}px`;\n if (!textareaValue.value) {\n return;\n }\n\n await nextTick();\n calculateHeight();\n }\n },\n { immediate: true }\n );\n\n const invalidInput = computed(() => !!props.errorMessage || isOverCharacterLimit.value);\n\n const conditionalClasses = computed(() => ({\n [`b-textarea--${BentoTextareaStateClass.DISABLED}`]: props.disabled,\n }));\n\n const conditionalClassesInput = computed(() => ({\n [`b-textarea__input--${BentoTextareaStateClass.CLEARABLE}`]: props.clearable,\n [`b-textarea__input--${BentoTextareaStateClass.READONLY}`]: isReadOnly.value,\n [`b-textarea__input--${BentoTextareaStateClass.ERROR}`]: invalidInput.value,\n [`b-textarea__input--dynamic-height`]: !height.value,\n }));\n\n const conditionalClassesLabelBox = computed(() => ({\n [`b-textarea__label-box--no-label`]: !props.label,\n }));\n\n const conditionalClassesLabelItem = computed(() => ({\n [`b-textarea__label-item--${BentoTextareaStateClass.ERROR}`]: isOverCharacterLimit.value,\n }));\n\n const counterErrorText = computed(() => t('yourTextCanBenAtMost', { characterLimit: props.characterLimit }));\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, label } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: label,\n });\n\n const showClearButton = computed(\n () => props.clearable && textareaValue.value && !props.disabled && !isReadOnly.value\n );\n\n const onClear = () => {\n textareaValue.value = '';\n emit(BentoTextareaEvent.CLEAR);\n emit(BentoTextareaEvent.INPUT, '');\n };\n\n const onInput = (event: InputEvent) => {\n event.stopImmediatePropagation();\n\n if (!props.disabled && !isReadOnly.value) {\n textareaValue.value = (event.target as HTMLInputElement).value;\n /**\n * Triggered when input value is changed\n *\n * @event input\n * @property {String} inputValue - the updated textarea value\n */\n emit(BentoTextareaEvent.INPUT, textareaValue.value);\n }\n };\n\n const onBlur = () => {\n textareaElement.value.scrollTop = 0;\n emit(BentoTextareaEvent.BLUR);\n };\n\n const onFocus = () => {\n textareaElement.value.focus();\n emit(BentoTextareaEvent.FOCUS);\n };\n\n const onChange = () => {\n emit(BentoTextareaEvent.CHANGE);\n };\n\n const onPressEscape = () => {\n emit(BentoTextareaEvent.ESCAPE_PRESSED);\n };\n\n /**\n * Updates the textarea width depending if the container or the user update its size.\n * @param isTextareaElement - sets to true if the element being observed is the textarea HTML element.\n */\n const resizeTextareaWrapper = (isTextareaElement = false) => {\n // Width assigned by the browser whenever the textarea is manually resized. String of the format `<value>px`.\n const textareaStyleWidth = textareaElement.value.style.width;\n\n // If the textarea element observer is being triggered, but there's no textareaStyleWidth, we want to ignore it, as no manual resize as happened yet\n // The component wrapper will handle the resizing logic instead\n if (isTextareaElement && !textareaStyleWidth) {\n return;\n }\n\n // Width of the whole bento-textarea component\n const textareaComponentWidth = textareaComponent?.value?.offsetWidth;\n\n // If there is no textareaStyleWidth or the textareaStyleWidth is larger than the component container, the wrapper should be 100% of the container\n if (!textareaStyleWidth || parseInt(textareaStyleWidth, 10) > textareaComponentWidth) {\n textareaWrapperWidth.value = '100%';\n } else {\n // Else the wrapper should always be as wide as the textarea element itself\n textareaWrapperWidth.value = textareaStyleWidth;\n }\n };\n\n onMounted(() => {\n observeSizeOfElement(textareaElement.value, () => {\n resizeTextareaWrapper(true);\n });\n\n observeSizeOfElement(textareaComponent.value, () => {\n resizeTextareaWrapper();\n });\n\n if (!height.value) {\n calculateHeight();\n }\n });\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n name: 'bento-textarea',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./textarea.scss\" />\n"],"names":["uuid","_sfc_main$1","BentoTextareaResizeOption","BentoTextareaResizeOption2","BentoTextareaStateClass","BentoTextareaStateClass2","BentoTextareaEvent","BentoTextareaEvent2","__default__","messages","attrs","useAttrs","height","toRefs","props","textareaId","generateUid","textareaElement","ref","textareaComponent","textareaValue","defaultTextareaHeight","textareaHeight","textareaWrapperWidth","t","useI18n","isReadOnly","useFormLayoutFieldLoading","toRef","counter","computed","isOverCharacterLimit","calculateHeight","watch","nextTick","invalidInput","conditionalClasses","conditionalClassesInput","conditionalClassesLabelBox","conditionalClassesLabelItem","counterErrorText","ariaLabelAttribute","ariaLabel","label","computedAriaLabel","useAriaLabel","showClearButton","onClear","emit","onInput","event","onBlur","onFocus","onChange","onPressEscape","resizeTextareaWrapper","isTextareaElement","textareaStyleWidth","textareaComponentWidth","_a","onMounted","observeSizeOfElement"],"mappings":";;;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AF,KAAA,SAAAA,GAAA,EAAA,IAAAC,IACInC,EAAA,QAAA,SAGAA,EAAA,QAAAkC;AAAA,IACJ;AAGJ,WAAAG,EAAA,MAAA;AACI,MAAAC,EAAA5C,EAAA,OAAA,MAAA;AACI,QAAAsC,EAAA,EAAA;AAAA,MAA0B,CAAA,GAG9BM,EAAA1C,EAAA,OAAA,MAAA;AACI,QAAAoC,EAAA;AAAA,MAAsB,CAAA,GAG1B3C,EAAA,SACIoB,EAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"textarea.js","sources":["../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/cross-circle-fill-small.vue","../src/components/textarea/textarea.types.ts","../src/components/textarea/textarea.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M2.25 8C2.25 4.82436 4.82436 2.25 8 2.25C11.1756 2.25 13.75 4.82436 13.75 8C13.75 11.1756 11.1756 13.75 8 13.75C4.82436 13.75 2.25 11.1756 2.25 8ZM7.00011 5.93945L5.93945 7.00011L6.93945 8.00011L5.93945 9.00011L7.00011 10.0608L8.00011 9.06077L9.00011 10.0608L10.0608 9.00011L9.06077 8.00011L10.0608 7.00011L9.00011 5.93945L8.00011 6.93945L7.00011 5.93945Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTextareaResizeOption {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n BOTH = 'both',\n NONE = 'none',\n}\n\nexport enum BentoTextareaStateClass {\n CLEARABLE = 'clearable',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum BentoTextareaEvent {\n BLUR = 'blur',\n CHANGE = 'change',\n CLEAR = 'clear',\n ESCAPE_PRESSED = 'escape-pressed',\n FOCUS = 'focus',\n INPUT = 'input',\n}\n","<template>\n <div ref=\"textareaComponent\" class=\"b-textarea\" :class=\"conditionalClasses\">\n <div :style=\"{ width: textareaWrapperWidth }\">\n <div class=\"b-textarea__label-box\" :class=\"conditionalClassesLabelBox\">\n <field-label\n v-if=\"label\"\n :for=\"textareaId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n <bento-typography\n v-if=\"characterLimit\"\n el=\"span\"\n class=\"b-textarea__label-item\"\n :class=\"conditionalClassesLabelItem\"\n >\n {{ counter }}\n </bento-typography>\n </div>\n <bento-typography el=\"div\" class=\"b-textarea__input-box\" :aria-disabled=\"disabled\">\n <textarea\n :id=\"textareaId\"\n ref=\"textareaElement\"\n :value=\"textareaValue\"\n class=\"b-textarea__input\"\n :class=\"conditionalClassesInput\"\n :aria-label=\"computedAriaLabel\"\n :aria-invalid=\"invalidInput\"\n :readonly=\"isReadOnly\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n :style=\"{ resize: resizable, height: textareaHeight }\"\n @blur=\"onBlur\"\n @change=\"onChange\"\n @focus=\"onFocus\"\n @input=\"onInput\"\n @keydown.esc=\"onPressEscape\"\n >\n </textarea>\n\n <div v-if=\"showClearButton\" class=\"b-textarea__clear-button\">\n <bento-button\n variant=\"tertiary\"\n :disabled=\"disabled\"\n @click=\"onClear\"\n @keypress.enter=\"onClear\"\n @keyup.space=\"onClear\"\n >\n <template #iconLeft>\n <cross-circle-fill-small-icon :svg-title=\"t('clearText')\" />\n </template>\n </bento-button>\n </div>\n </bento-typography>\n\n <error-message v-if=\"isOverCharacterLimit\" :error-message=\"counterErrorText\" />\n\n <error-message v-if=\"errorMessage\" :error-message=\"errorMessage\" />\n\n <bento-typography v-if=\"description\" class=\"b-textarea__description\" el=\"span\">\n {{ description }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, onMounted, onUnmounted, PropType, ref, toRef, toRefs, useAttrs, watch } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n\n // Utils\n import { generateUid } from '@/utils/ts/unique-id';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n // Types\n import { BentoTextareaEvent, BentoTextareaResizeOption, BentoTextareaStateClass } from './textarea.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n\n const props = defineProps({\n /**\n * Text that labels an the input element\n */\n ariaLabel: { type: String, default: undefined },\n\n /**\n * Text that shows number of characters in textarea\n */\n characterLimit: { type: Number, default: undefined },\n\n /**\n * Text displayed as the help text of the textarea\n */\n description: { type: String, default: '' },\n\n /**\n * Disables the possibility of changing value in the textarea\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * If set to true, shows a button to clear all the text\n */\n clearable: { type: Boolean, default: false },\n\n /**\n * Adds error text\n */\n errorMessage: { type: String, default: '' },\n\n /**\n * Sets the height of the textarea, e.g 200px OR 20vh\n */\n height: { type: String, default: null },\n\n /**\n * Text displayed as the label of the textarea\n */\n label: { type: String, default: '' },\n\n /**\n * Highlights the textarea is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Text displayed as the placeholder of the textarea\n */\n placeholder: { type: String, default: '' },\n\n /**\n * Set the textarea to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the possibility of resize the textarea\n */\n resizable: {\n type: String as PropType<BentoTextareaResizeOption | `${BentoTextareaResizeOption}`>,\n default: BentoTextareaResizeOption.BOTH,\n validator: (value: BentoTextareaResizeOption) => Object.values(BentoTextareaResizeOption).includes(value),\n },\n\n /**\n * Highlights the textarea is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * Text displayed as the value of the textarea\n */\n value: { type: String, default: '' },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the element has lost focus\n */\n (e: BentoTextareaEvent.BLUR): void;\n\n /**\n * Emitted when the user modifies the element's value. Unlike the 'input' event, the change event is not necessarily fired for each alteration to an element's value\n */\n (e: BentoTextareaEvent.CHANGE): void;\n\n /**\n * Emitted when the \"Clear\" button was clicked\n */\n (e: BentoTextareaEvent.CLEAR): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed\n */\n (e: BentoTextareaEvent.ESCAPE_PRESSED): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: BentoTextareaEvent.FOCUS): void;\n\n /**\n * Emitted when the component's model changes\n */\n (e: BentoTextareaEvent.INPUT, value: string): void;\n }>();\n\n const { height } = toRefs(props);\n\n const textareaId = generateUid('textarea');\n const textareaElement = ref<HTMLTextAreaElement>(null);\n const textareaComponent = ref<HTMLDivElement>(null);\n const textareaValue = ref(props.value);\n const defaultTextareaHeight = 44;\n const textareaHeight = ref(props.height || `${defaultTextareaHeight}px`);\n const textareaWrapperWidth = ref('100%'); // The width set to the wrapper of the label, textarea and description\n let textareaElementObserver: ResizeObserver | null = null;\n let textareaComponentObserver: ResizeObserver | null = null;\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const counter = computed(() => `${textareaValue.value.length} / ${props.characterLimit}`);\n const isOverCharacterLimit = computed(\n () => props.characterLimit && textareaValue.value.length > props.characterLimit\n );\n\n const calculateHeight = () => {\n const borderWidth = 3;\n if (textareaElement.value && textareaElement.value.scrollHeight > defaultTextareaHeight) {\n textareaHeight.value = `${textareaElement.value.scrollHeight + borderWidth}px`;\n }\n };\n\n watch(height, () => {\n if (!height.value) {\n calculateHeight();\n } else {\n textareaHeight.value = height.value;\n }\n });\n\n watch(\n () => props.value,\n () => {\n textareaValue.value = props.value;\n },\n { immediate: true }\n );\n\n watch(\n () => textareaValue.value,\n async () => {\n if (!height.value) {\n // Hack to make the textarea calculate its height properly\n // Set the textarea back to the original value before calculating the height\n textareaHeight.value = `${defaultTextareaHeight}px`;\n if (!textareaValue.value) {\n return;\n }\n\n await nextTick();\n calculateHeight();\n }\n },\n { immediate: true }\n );\n\n const invalidInput = computed(() => !!props.errorMessage || isOverCharacterLimit.value);\n\n const conditionalClasses = computed(() => ({\n [`b-textarea--${BentoTextareaStateClass.DISABLED}`]: props.disabled,\n }));\n\n const conditionalClassesInput = computed(() => ({\n [`b-textarea__input--${BentoTextareaStateClass.CLEARABLE}`]: props.clearable,\n [`b-textarea__input--${BentoTextareaStateClass.READONLY}`]: isReadOnly.value,\n [`b-textarea__input--${BentoTextareaStateClass.ERROR}`]: invalidInput.value,\n [`b-textarea__input--dynamic-height`]: !height.value,\n }));\n\n const conditionalClassesLabelBox = computed(() => ({\n [`b-textarea__label-box--no-label`]: !props.label,\n }));\n\n const conditionalClassesLabelItem = computed(() => ({\n [`b-textarea__label-item--${BentoTextareaStateClass.ERROR}`]: isOverCharacterLimit.value,\n }));\n\n const counterErrorText = computed(() => t('yourTextCanBenAtMost', { characterLimit: props.characterLimit }));\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, label } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: label,\n });\n\n const showClearButton = computed(\n () => props.clearable && textareaValue.value && !props.disabled && !isReadOnly.value\n );\n\n const onClear = () => {\n textareaValue.value = '';\n emit(BentoTextareaEvent.CLEAR);\n emit(BentoTextareaEvent.INPUT, '');\n };\n\n const onInput = (event: InputEvent) => {\n event.stopImmediatePropagation();\n\n if (!props.disabled && !isReadOnly.value) {\n textareaValue.value = (event.target as HTMLInputElement).value;\n /**\n * Triggered when input value is changed\n *\n * @event input\n * @property {String} inputValue - the updated textarea value\n */\n emit(BentoTextareaEvent.INPUT, textareaValue.value);\n }\n };\n\n const onBlur = () => {\n textareaElement.value.scrollTop = 0;\n emit(BentoTextareaEvent.BLUR);\n };\n\n const onFocus = () => {\n textareaElement.value.focus();\n emit(BentoTextareaEvent.FOCUS);\n };\n\n const onChange = () => {\n emit(BentoTextareaEvent.CHANGE);\n };\n\n const onPressEscape = () => {\n emit(BentoTextareaEvent.ESCAPE_PRESSED);\n };\n\n /**\n * Updates the textarea width depending if the container or the user update its size.\n * @param isTextareaElement - sets to true if the element being observed is the textarea HTML element.\n */\n const resizeTextareaWrapper = (isTextareaElement = false) => {\n // Width assigned by the browser whenever the textarea is manually resized. String of the format `<value>px`.\n const textareaStyleWidth = textareaElement.value.style.width;\n\n // If the textarea element observer is being triggered, but there's no textareaStyleWidth, we want to ignore it, as no manual resize as happened yet\n // The component wrapper will handle the resizing logic instead\n if (isTextareaElement && !textareaStyleWidth) {\n return;\n }\n\n // Width of the whole bento-textarea component\n const textareaComponentWidth = textareaComponent?.value?.offsetWidth;\n\n // If there is no textareaStyleWidth or the textareaStyleWidth is larger than the component container, the wrapper should be 100% of the container\n if (!textareaStyleWidth || parseInt(textareaStyleWidth, 10) > textareaComponentWidth) {\n textareaWrapperWidth.value = '100%';\n } else {\n // Else the wrapper should always be as wide as the textarea element itself\n textareaWrapperWidth.value = textareaStyleWidth;\n }\n };\n\n onMounted(() => {\n textareaElementObserver = observeSizeOfElement(textareaElement.value, () => {\n resizeTextareaWrapper(true);\n });\n\n textareaComponentObserver = observeSizeOfElement(textareaComponent.value, () => {\n resizeTextareaWrapper();\n });\n\n if (!height.value) {\n calculateHeight();\n }\n });\n\n onUnmounted(() => {\n textareaElementObserver?.disconnect();\n textareaComponentObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n name: 'bento-textarea',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./textarea.scss\" />\n"],"names":["uuid","_sfc_main$1","BentoTextareaResizeOption","BentoTextareaResizeOption2","BentoTextareaStateClass","BentoTextareaStateClass2","BentoTextareaEvent","BentoTextareaEvent2","__default__","messages","attrs","useAttrs","height","toRefs","props","textareaId","generateUid","textareaElement","ref","textareaComponent","textareaValue","defaultTextareaHeight","textareaHeight","textareaWrapperWidth","textareaElementObserver","textareaComponentObserver","t","useI18n","isReadOnly","useFormLayoutFieldLoading","toRef","counter","computed","isOverCharacterLimit","calculateHeight","watch","nextTick","invalidInput","conditionalClasses","conditionalClassesInput","conditionalClassesLabelBox","conditionalClassesLabelItem","counterErrorText","ariaLabelAttribute","ariaLabel","label","computedAriaLabel","useAriaLabel","showClearButton","onClear","emit","onInput","event","onBlur","onFocus","onChange","onPressEscape","resizeTextareaWrapper","isTextareaElement","textareaStyleWidth","textareaComponentWidth","_a","onMounted","observeSizeOfElement","onUnmounted"],"mappings":";;;;;;;;;;;AAKA,IAAAA,IAAA;AAEA,MAAAC,KAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;ACTY,IAAAE,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YACAA,EAAA,OAAA,QACAA,EAAA,OAAA,QAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC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,QAAAA,EAAA,cACAC,KAAA,QAAAA,EAAA;AAAA,IAAsC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
package/dist/timeline.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { defineComponent as Y, computed as r, ref as N, toRefs as Z, provide as A, inject as D, onUnmounted as G } from "vue";
|
|
2
|
-
import { a as z } from "./chunks/button.
|
|
2
|
+
import { a as z } from "./chunks/button.bb0d7584.js";
|
|
3
3
|
import { BentoTextarea as Q } from "./textarea.js";
|
|
4
4
|
import { u as H } from "./chunks/i18n.eb5b985b.js";
|
|
5
5
|
import { BentoButtonActions as X } from "./button.js";
|
|
6
6
|
import { n as x } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
7
|
-
import { B as ee } from "./chunks/index.
|
|
8
|
-
import {
|
|
7
|
+
import { B as ee } from "./chunks/index.772a5595.js";
|
|
8
|
+
import { B as te } from "./chunks/index.d1f65246.js";
|
|
9
9
|
import { BentoTag as ie } from "./tag.js";
|
|
10
|
-
import { B as ae, d as se } from "./chunks/index.
|
|
11
|
-
import { B as ne, a as oe, S as re } from "./chunks/index.
|
|
10
|
+
import { B as ae, d as se } from "./chunks/index.6ac01113.js";
|
|
11
|
+
import { B as ne, a as oe, S as re } from "./chunks/index.a4a820fd.js";
|
|
12
12
|
import { g as le } from "./chunks/unique-id.a2a2b458.js";
|
|
13
13
|
import { u as me } from "./chunks/use-has-slot.fbeb19ec.js";
|
|
14
14
|
import { r as ce, e as de, t as w, g as k } from "./chunks/index.f55fdc32.js";
|
|
15
15
|
import { c as ue, a as _e } from "./chunks/index.86453263.js";
|
|
16
|
-
import "./assets/
|
|
16
|
+
import "./assets/index28.css";
|
|
17
17
|
var F = 1e3 * 60, M = 60 * 24, U = M * 30, j = M * 365;
|
|
18
18
|
function $(t, e) {
|
|
19
19
|
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|