@leaflink/stash 50.0.6 → 50.0.7

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.
@@ -31,14 +31,6 @@ declare type __VLS_WithDefaults<P, D> = {
31
31
  declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TextEditorProps>, {
32
32
  modelValue: string;
33
33
  placeholder: string;
34
- isReadOnly: boolean;
35
- addBottomSpace: boolean;
36
- errorText: undefined;
37
- hintText: undefined;
38
- id: undefined;
39
- isRequired: boolean;
40
- label: undefined;
41
- showOptionalInLabel: boolean;
42
34
  controls: () => never[];
43
35
  handlers: () => {};
44
36
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -48,14 +40,6 @@ focus: (editor: default_3) => void;
48
40
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TextEditorProps>, {
49
41
  modelValue: string;
50
42
  placeholder: string;
51
- isReadOnly: boolean;
52
- addBottomSpace: boolean;
53
- errorText: undefined;
54
- hintText: undefined;
55
- id: undefined;
56
- isRequired: boolean;
57
- label: undefined;
58
- showOptionalInLabel: boolean;
59
43
  controls: () => never[];
60
44
  handlers: () => {};
61
45
  }>>> & Readonly<{
@@ -63,21 +47,66 @@ onBlur?: ((editor: default_3) => any) | undefined;
63
47
  onFocus?: ((editor: default_3) => any) | undefined;
64
48
  "onUpdate:model-value"?: ((value: string) => any) | undefined;
65
49
  }>, {
66
- label: string;
67
- id: string;
68
50
  controls: TextEditorControls;
69
- isRequired: boolean;
70
- addBottomSpace: boolean;
71
- errorText: string;
72
- hintText: string;
73
- isReadOnly: boolean;
74
- showOptionalInLabel: boolean;
75
51
  placeholder: string;
76
52
  modelValue: string;
77
53
  handlers: TextEditorControlHandlerMap;
78
54
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
79
55
  export default _default;
80
56
 
57
+ declare interface FieldProps {
58
+ /**
59
+ * Adds spacing under the field that is consistent whether hint/error text is displayed.
60
+ */
61
+ addBottomSpace?: boolean;
62
+ /**
63
+ * Error text to display. Replaces `hintText` (if provided) & adds error styling.
64
+ */
65
+ errorText?: string;
66
+ /**
67
+ * Displays text below the input; hidden when the isReadOnly prop is truthy.
68
+ */
69
+ hintText?: string;
70
+ /**
71
+ * ID for the Label and Input; must be unique
72
+ */
73
+ id?: string;
74
+ /**
75
+ * ID for the error text element; useful for aria-errormessage
76
+ */
77
+ errorId?: string;
78
+ /**
79
+ * Whether it's a readonly field.
80
+ */
81
+ isReadOnly?: boolean;
82
+ /**
83
+ * Whether the field is required.
84
+ */
85
+ isRequired?: boolean;
86
+ /**
87
+ * Label to render above the input.
88
+ */
89
+ label?: string;
90
+ /**
91
+ * Show "(optional)" to the right of the label text
92
+ */
93
+ showOptionalInLabel?: boolean;
94
+ /**
95
+ * Indicates wheter the field is a fieldset or not
96
+ */
97
+ fieldset?: boolean;
98
+ /**
99
+ * Indicates whether the field is disabled.
100
+ */
101
+ isDisabled?: boolean;
102
+ /**
103
+ * Indicates whether the field is disabled.
104
+ *
105
+ * @deprecated Use `isDisabled` instead.
106
+ */
107
+ disabled?: boolean;
108
+ }
109
+
81
110
  declare type IconName = (typeof iconNames)[number];
82
111
 
83
112
  declare const iconNames: readonly ["action-dots", "activity", "alert-bell", "archive", "arrow-down", "arrow-left", "arrow-right", "arrow-up", "badge-discount", "badge-seller-elite", "badge-seller-power", "badge-seller-verified", "book-customer", "building-office", "bulk-add", "calendar-reschedule", "calendar", "caret-down", "caret-up", "change-log", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "circle-check", "circle-close", "circle-dollar", "circle-empty", "circle-info", "circle-partial", "circle-percent", "circle-question-mark", "circle-status", "circle-warning", "clipboard-checkmark", "clipboard-inventory", "close", "combine", "compass", "contact", "contract", "copy", "credit-card", "credit-profile", "dashboard", "document-accept", "document-invoice", "document-recieved", "document-sent", "document-view", "document", "dolly", "download", "edit", "ellipsis", "envelope-open", "envelope", "equals", "export", "figma", "file-csv", "file", "filter-funnel", "filter-line", "flag", "folder", "folder-bar-graph", "folder-orders", "font-bold", "font-clear-format", "font-italic", "font-underline", "gear", "github", "globe", "graph-bar-chart", "graph-line-chart", "graph-pie-chart", "hazard", "hazard-outline", "headset-agent", "headset-mic", "heart-filled", "heart-outline", "help-question-mark", "hide", "history", "image", "import", "keyboard-return", "license-approved", "license-certificate", "lightbulb", "link-add", "link-unlink", "link", "list-bulleted", "list-items", "list-numbered", "loading-big", "loading-empty", "loading-small", "location", "lock-unlock", "lock", "logo-facebook", "logo-instagram", "logo-linkedin", "logo-ll", "logo-metrc", "logo-plaid", "logo-x", "logo-youtube", "logout", "medical", "megaphone-sound", "megaphone", "menu", "message-dispute", "message-reply", "message", "minus", "mj-leaf", "money", "note-add", "note", "open-in-new", "paperclip", "paper-plane", "performance", "phone", "plus", "preview", "print", "product-menu-manage", "product-menu-search", "product-menu", "queue-add", "queue", "recent", "refresh", "register", "reply", "report-download", "sample", "save", "scale-law", "scale-weight", "search", "seed-cycle", "share", "shop-bag-browse", "shop-bag-reorder", "shop-bag", "shop-basket", "shop-cart-add", "shop-cart", "show", "sign-dollar", "sign-percent", "sort", "split", "star-filled", "star-outline", "storefront", "submit", "swap-horizontal", "swap-vertical", "tag-star", "tag", "test-results", "ticket-star", "ticket", "tool-dropper", "tool-wrench", "transfer", "trashcan", "truck", "upload", "user-add", "user-admin", "user-check", "user", "view-card", "view-detailed", "view-list", "warehouse", "working"];
@@ -132,7 +161,7 @@ export declare type TextEditorIconMap = {
132
161
  };
133
162
  };
134
163
 
135
- export declare interface TextEditorProps {
164
+ export declare interface TextEditorProps extends FieldProps {
136
165
  /**
137
166
  * The model value.
138
167
  */
@@ -149,42 +178,6 @@ export declare interface TextEditorProps {
149
178
  * An object map of custom handlers to pass to the Quill editor.
150
179
  */
151
180
  handlers?: TextEditorControlHandlerMap;
152
- /**
153
- * Adds spacing under the field that is consistent whether hint/error text is displayed.
154
- */
155
- addBottomSpace?: boolean;
156
- /**
157
- * Error text to display. Replaces `hintText` (if provided) & adds error styling.
158
- */
159
- errorText?: string;
160
- /**
161
- * Displays text below the input; hidden when the isReadOnly prop is truthy.
162
- */
163
- hintText?: string;
164
- /**
165
- * ID for the Label and Input; must be unique
166
- */
167
- id?: string;
168
- /**
169
- * Whether it's a readonly field.
170
- */
171
- isReadOnly?: boolean;
172
- /**
173
- * Whether the field is required.
174
- */
175
- isRequired?: boolean;
176
- /**
177
- * Label to render above the input.
178
- */
179
- label?: string;
180
- /**
181
- * Show "(optional)" to the right of the label text
182
- */
183
- showOptionalInLabel?: boolean;
184
- /**
185
- * Whether the field is disabled.
186
- */
187
- isDisabled?: boolean;
188
181
  }
189
182
 
190
183
  export { }
package/dist/Textarea.js CHANGED
@@ -1,124 +1,127 @@
1
- import { defineComponent as S, useAttrs as k, useSlots as H, useCssModule as A, ref as _, computed as y, watch as I, onMounted as P, nextTick as V, onBeforeUnmount as $, openBlock as q, createBlock as j, mergeProps as g, unref as c, createSlots as D, withCtx as w, createElementVNode as F, renderSlot as L } from "vue";
2
- import N from "lodash-es/uniqueId";
3
- import { _ as U } from "./Field.vue_vue_type_script_setup_true_lang--tBfZB2K.js";
4
- import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const Y = ["id", "value", "placeholder", "disabled", "readonly"], G = /* @__PURE__ */ S({
1
+ import { defineComponent as S, useAttrs as M, useSlots as k, useCssModule as H, ref as _, computed as x, watch as A, onMounted as I, nextTick as P, onBeforeUnmount as V, openBlock as $, createBlock as q, mergeProps as y, unref as p, createSlots as D, withCtx as g, createElementVNode as j, renderSlot as F } from "vue";
2
+ import { _ as L } from "./Field.vue_vue_type_script_setup_true_lang-DEizIcDo.js";
3
+ import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const U = ["id", "value", "placeholder", "disabled", "readonly"], W = /* @__PURE__ */ S({
6
5
  name: "ll-textarea",
7
6
  __name: "Textarea",
8
7
  props: {
9
- label: { default: " " },
10
8
  modelValue: { default: "" },
11
9
  value: { default: null },
12
- errorText: { default: "" },
13
- hintText: { default: "" },
14
- showOptionalInLabel: { type: Boolean, default: !1 },
15
10
  resize: { type: [Boolean, Object], default: !1 },
16
11
  placeholder: { default: void 0 },
17
- disabled: { type: Boolean, default: !1 },
18
- isReadOnly: { type: Boolean, default: !1 }
12
+ addBottomSpace: { type: Boolean },
13
+ errorText: {},
14
+ hintText: {},
15
+ id: {},
16
+ errorId: {},
17
+ isReadOnly: { type: Boolean },
18
+ isRequired: { type: Boolean },
19
+ label: {},
20
+ showOptionalInLabel: { type: Boolean },
21
+ fieldset: { type: Boolean },
22
+ isDisabled: { type: Boolean },
23
+ disabled: { type: Boolean }
19
24
  },
20
25
  emits: ["update:model-value"],
21
- setup(b, { emit: z }) {
22
- const B = N("textarea-"), r = k(), R = H(), m = A(), o = b, T = z, f = _(), i = _(), h = y(() => o.isReadOnly || "readonly" in r && r.readonly !== !1), O = y(() => {
23
- const e = { ...r };
26
+ setup(w, { emit: b }) {
27
+ const d = M(), B = k(), m = H(), o = w, z = b, u = _(), l = _(), R = x(() => o.isReadOnly || "readonly" in d && d.readonly !== !1), T = x(() => {
28
+ const e = { ...d };
24
29
  return delete e["data-test"], delete e.class, e;
25
30
  });
26
- I(
31
+ A(
27
32
  () => o.resize,
28
33
  (e) => {
29
34
  var t;
30
- e ? v() : (t = i.value) == null || t.disconnect();
35
+ e ? h() : (t = l.value) == null || t.disconnect();
31
36
  }
32
37
  );
33
- const C = (e) => {
34
- T("update:model-value", e.target.value);
35
- }, v = () => {
36
- i.value || !f.value || (i.value = new ResizeObserver(([e]) => {
37
- const { target: t } = e, s = x(f.value) || document.documentElement, { scrollTop: a } = s;
38
+ const O = (e) => {
39
+ z("update:model-value", e.target.value);
40
+ }, h = () => {
41
+ l.value || !u.value || (l.value = new ResizeObserver(([e]) => {
42
+ const { target: t } = e, s = v(u.value) || document.documentElement, { scrollTop: a } = s;
38
43
  let n = 0;
39
44
  if (s === document.documentElement) {
40
- const { top: l, height: d } = E(t), { innerHeight: u } = window;
41
- n = Math.max(l + d - (u + a), 0);
45
+ const { top: r, height: i } = C(t), { innerHeight: c } = window;
46
+ n = Math.max(r + i - (c + a), 0);
42
47
  } else {
43
- const { top: l, height: d } = t.getBoundingClientRect(), { top: u } = s.getBoundingClientRect(), { offsetHeight: p } = s, M = l - u;
44
- n = Math.max(M + d - p, 0);
48
+ const { top: r, height: i } = t.getBoundingClientRect(), { top: c } = s.getBoundingClientRect(), { offsetHeight: f } = s, E = r - c;
49
+ n = Math.max(E + i - f, 0);
45
50
  }
46
51
  n && requestAnimationFrame(() => {
47
52
  s.scrollTop = a + n;
48
53
  });
49
- }), i.value.observe(f.value));
50
- }, x = (e) => {
54
+ }), l.value.observe(u.value));
55
+ }, v = (e) => {
51
56
  const t = e.parentElement;
52
57
  if (!t)
53
58
  return null;
54
59
  const { overflowY: s } = getComputedStyle(t);
55
- return s !== "visible" ? t : t === document.body ? document.documentElement : x(t);
56
- }, E = (e) => {
60
+ return s !== "visible" ? t : t === document.body ? document.documentElement : v(t);
61
+ }, C = (e) => {
57
62
  const { offsetWidth: t, offsetHeight: s } = e;
58
63
  let a = 0, n = 0;
59
- const l = function({ offsetLeft: d, offsetTop: u, offsetParent: p }) {
60
- a += d, n += u, p && l(p);
64
+ const r = function({ offsetLeft: i, offsetTop: c, offsetParent: f }) {
65
+ a += i, n += c, f && r(f);
61
66
  };
62
- return l(e), {
67
+ return r(e), {
63
68
  top: n,
64
69
  left: a,
65
70
  width: t,
66
71
  height: s
67
72
  };
68
73
  };
69
- return P(async () => {
74
+ return I(async () => {
70
75
  var e;
71
76
  if (o.value !== null)
72
77
  throw new Error("ll-input: use :model-value or v-model instead of :value.");
73
- if (r.onInput)
78
+ if (d.onInput)
74
79
  throw new Error("ll-input: use the @update:model-value event instead of @input");
75
- (typeof o.resize == "boolean" && o.resize || (e = o.resize) != null && e.forceBrowserScroll) && (await V(), v());
76
- }), $(() => {
80
+ (typeof o.resize == "boolean" && o.resize || (e = o.resize) != null && e.forceBrowserScroll) && (await P(), h());
81
+ }), V(() => {
77
82
  var e;
78
- (e = i.value) == null || e.disconnect();
79
- }), (e, t) => (q(), j(U, g(o, {
80
- id: c(B),
81
- "is-read-only": h.value,
82
- class: ["stash-textarea", [c(m).root, c(r).class]],
83
+ (e = l.value) == null || e.disconnect();
84
+ }), (e, t) => ($(), q(L, y(o, {
85
+ class: ["stash-textarea", [p(m).root]],
83
86
  "data-test": "stash-textarea"
84
87
  }), D({
85
- default: w(({ fieldId: s, hasError: a }) => [
86
- F("textarea", g({
88
+ default: g(({ fieldId: s, hasError: a }) => [
89
+ j("textarea", y({
87
90
  id: s,
88
91
  ref_key: "textareaRef",
89
- ref: f,
92
+ ref: u,
90
93
  class: [
91
- c(m).textarea,
94
+ p(m).textarea,
92
95
  { "stash-textarea--error": a, "tw-resize-y": o.resize, "tw-resize-none": !o.resize }
93
96
  ],
94
97
  value: o.modelValue,
95
98
  "data-test": "stash-textarea|textarea",
96
99
  placeholder: o.placeholder
97
- }, O.value, {
100
+ }, T.value, {
98
101
  disabled: o.disabled,
99
- readonly: h.value,
100
- onInput: C
101
- }), null, 16, Y)
102
+ readonly: R.value,
103
+ onInput: O
104
+ }), null, 16, U)
102
105
  ]),
103
106
  _: 2
104
107
  }, [
105
- c(R).hint ? {
108
+ p(B).hint ? {
106
109
  name: "hint",
107
- fn: w(() => [
108
- L(e.$slots, "hint")
110
+ fn: g(() => [
111
+ F(e.$slots, "hint")
109
112
  ]),
110
113
  key: "0"
111
114
  } : void 0
112
- ]), 1040, ["id", "is-read-only", "class"]));
115
+ ]), 1040, ["class"]));
113
116
  }
114
- }), J = "_root_1sns8_2", K = "_textarea_1sns8_7", Q = {
115
- root: J,
116
- textarea: K,
117
+ }), Y = "_root_1sns8_2", G = "_textarea_1sns8_7", J = {
118
+ root: Y,
119
+ textarea: G,
117
120
  "stash-textarea--error": "_stash-textarea--error_1sns8_28"
118
- }, X = {
119
- $style: Q
120
- }, se = /* @__PURE__ */ W(G, [["__cssModules", X]]);
121
+ }, K = {
122
+ $style: J
123
+ }, ee = /* @__PURE__ */ N(W, [["__cssModules", K]]);
121
124
  export {
122
- se as default
125
+ ee as default
123
126
  };
124
127
  //# sourceMappingURL=Textarea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.js","sources":["../src/components/Textarea/Textarea.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, nextTick, onBeforeUnmount, onMounted, ref, useAttrs, useCssModule, useSlots, watch } from 'vue';\n\n import Field from '../Field/Field.vue';\n\n export interface TextareaResizeOptions {\n /**\n * It will automatically scroll the page down when it reaches the bottom of the viewport/element\n */\n forceBrowserScroll: boolean;\n }\n\n export interface TextAreaProps {\n /**\n * Label text for the textarea element.\n */\n label?: string;\n\n /**\n * Value for the textarea element.\n */\n modelValue?: string;\n\n /**\n * Deprecated. Use :model-value or v-model instead of :value.\n * @deprecated Use :model-value or v-model instead of :value.\n */\n value?: string | number | null;\n\n /**\n * Error text for the textarea element.\n */\n errorText?: string;\n\n /**\n * Hint text for the textarea element.\n */\n hintText?: string;\n\n /**\n * Render \"(optional)\" to the right of the label text\n */\n showOptionalInLabel?: boolean;\n\n /**\n * Allow textarea to be resizable vertically.\n * Alternatively if you want to disable automatic scroll when resizing, you can set `{ forceBrowserScroll: false }`\n */\n resize?: boolean | TextareaResizeOptions;\n\n /**\n * Placeholder text for the textarea element.\n * **Note:** placeholders should be used to display examples; they should not be used as labels because they are not accessible as labels. If a real label cannot be used, use the `aria-label` attribute.\n */\n placeholder?: string;\n\n /**\n * Indicates whether the textarea is disabled.\n */\n disabled?: boolean;\n\n /**\n * Indicates whether the textarea is read-only.\n */\n isReadOnly?: boolean;\n }\n\n defineOptions({\n name: 'll-textarea',\n });\n\n /**\n * Unique ID for the textarea, required for accessibility purposes\n */\n const id = uniqueId('textarea-');\n\n const attrs = useAttrs();\n const slots = useSlots();\n const classes = useCssModule();\n\n const props = withDefaults(defineProps<TextAreaProps>(), {\n label: ' ',\n modelValue: '',\n value: null,\n errorText: '',\n hintText: '',\n showOptionalInLabel: false,\n resize: false,\n placeholder: undefined,\n disabled: false,\n isReadOnly: false,\n });\n\n const emits = defineEmits<{\n /**\n * Emitted when the model value changes.\n */\n (e: 'update:model-value', value: string): void;\n }>();\n\n const textareaRef = ref<HTMLTextAreaElement>();\n const observer = ref<ResizeObserver>();\n const isReadOnly = computed(() => props.isReadOnly || ('readonly' in attrs && attrs.readonly !== false));\n\n const inputAttrs = computed(() => {\n const allAttrs = { ...attrs };\n\n delete allAttrs['data-test'];\n delete allAttrs.class;\n\n return allAttrs;\n });\n\n watch(\n () => props.resize,\n (v) => {\n v ? setupResizeObserver() : observer.value?.disconnect();\n },\n );\n\n const onInput = (event: Event) => {\n emits('update:model-value', (event.target as HTMLTextAreaElement).value);\n };\n\n const setupResizeObserver = () => {\n if (observer.value || !textareaRef.value) {\n return;\n }\n\n // the ResizeObserver will be in charge to detect if page needs to scroll when resizing the component\n observer.value = new ResizeObserver(([entry]) => {\n const { target } = entry;\n const parent = findParentScrollable(textareaRef.value as HTMLTextAreaElement) || document.documentElement;\n\n const { scrollTop: scrollPosition } = parent;\n let offsetDiff = 0;\n\n // checks if the closest parent element scrollable is the document page\n if (parent === document.documentElement) {\n const { top, height } = getOffsetClipRect(target as HTMLElement);\n const { innerHeight: viewportHeight } = window;\n\n offsetDiff = Math.max(top + height - (viewportHeight + scrollPosition), 0);\n } else {\n const { top, height } = (target as HTMLElement).getBoundingClientRect();\n const { top: parentTop } = parent.getBoundingClientRect();\n const { offsetHeight: parentHeight } = parent;\n const offsetTop = top - parentTop;\n\n offsetDiff = Math.max(offsetTop + height - parentHeight, 0);\n }\n\n if (offsetDiff) {\n requestAnimationFrame(() => {\n parent.scrollTop = scrollPosition + offsetDiff;\n });\n }\n });\n\n observer.value.observe(textareaRef.value);\n };\n\n /**\n * Retrieve the closest parent that has a scroll. Defaults to the document page.\n */\n const findParentScrollable = (el: HTMLElement): HTMLElement | null => {\n const parent = el.parentElement as HTMLElement;\n if (!parent) {\n return null;\n }\n\n const { overflowY } = getComputedStyle(parent);\n if (overflowY !== 'visible') {\n return parent;\n }\n\n if (parent === document.body) {\n return document.documentElement;\n }\n\n return findParentScrollable(parent);\n };\n\n /**\n * Retrieve element absolute positioning relative to the page.\n */\n const getOffsetClipRect = (el: HTMLElement) => {\n const { offsetWidth: width, offsetHeight: height } = el;\n\n let left = 0;\n let top = 0;\n\n const findPos = function ({ offsetLeft, offsetTop, offsetParent }: HTMLElement) {\n left += offsetLeft;\n top += offsetTop;\n\n if (offsetParent) {\n findPos(offsetParent as HTMLElement);\n }\n };\n\n findPos(el);\n\n return {\n top,\n left,\n width,\n height,\n };\n };\n\n onMounted(async () => {\n if (props.value !== null) {\n throw new Error('ll-input: use :model-value or v-model instead of :value.');\n }\n\n if (attrs.onInput) {\n throw new Error('ll-input: use the @update:model-value event instead of @input');\n }\n\n if (\n (typeof props.resize === 'boolean' && props.resize) ||\n (props.resize as TextareaResizeOptions)?.forceBrowserScroll\n ) {\n await nextTick();\n setupResizeObserver();\n }\n });\n\n onBeforeUnmount(() => {\n observer.value?.disconnect();\n });\n</script>\n\n<template>\n <Field\n v-bind=\"props\"\n :id=\"id\"\n :is-read-only=\"isReadOnly\"\n class=\"stash-textarea\"\n :class=\"[classes.root, attrs.class]\"\n data-test=\"stash-textarea\"\n >\n <template #default=\"{ fieldId, hasError }\">\n <textarea\n :id=\"fieldId\"\n ref=\"textareaRef\"\n :class=\"[\n classes.textarea,\n { 'stash-textarea--error': hasError, 'tw-resize-y': props.resize, 'tw-resize-none': !props.resize },\n ]\"\n :value=\"props.modelValue\"\n data-test=\"stash-textarea|textarea\"\n :placeholder=\"props.placeholder\"\n v-bind=\"inputAttrs\"\n :disabled=\"props.disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n ></textarea>\n </template>\n <template v-if=\"slots.hint\" #hint>\n <!-- @slot Hint content -->\n <slot name=\"hint\"></slot>\n </template>\n </Field>\n</template>\n\n<style module>\n .root {\n position: relative;\n width: 100%;\n }\n\n .textarea {\n background: var(--color-white);\n border: 1px solid;\n border-color: var(--color-ice-500);\n border-radius: theme('borderRadius.DEFAULT');\n color: var(--color-ice-700);\n display: block;\n min-height: 100px;\n outline: none;\n padding: theme('spacing[1.5]');\n width: 100%;\n\n &:hover {\n border-color: var(--color-ice-500);\n }\n\n &:focus,\n &:active {\n border-color: var(--color-blue-500);\n }\n\n &.stash-textarea--error {\n border-color: var(--color-red-500);\n color: var(--color-red-500);\n }\n\n &::placeholder {\n color: var(--color-ice-500);\n opacity: 1;\n }\n\n &[disabled] {\n background-color: var(--color-ice-100);\n border-color: var(--color-ice-500);\n color: var(--color-ice-500);\n pointer-events: none;\n }\n\n &[disabled]:active,\n &[disabled]:focus {\n box-shadow: none;\n }\n\n &[disabled]::placeholder {\n text-transform: none;\n color: var(--color-ice-500);\n }\n\n &[readonly] {\n border-color: transparent;\n background-color: transparent;\n padding-left: 0;\n padding-right: 0;\n min-height: unset;\n }\n }\n</style>\n"],"names":["id","uniqueId","attrs","useAttrs","slots","useSlots","classes","useCssModule","props","__props","emits","__emit","textareaRef","ref","observer","isReadOnly","computed","inputAttrs","allAttrs","watch","v","setupResizeObserver","_a","onInput","event","entry","target","parent","findParentScrollable","scrollPosition","offsetDiff","top","height","getOffsetClipRect","viewportHeight","parentTop","parentHeight","offsetTop","el","overflowY","width","left","findPos","offsetLeft","offsetParent","onMounted","nextTick","onBeforeUnmount"],"mappings":"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"}
1
+ {"version":3,"file":"Textarea.js","sources":["../src/components/Textarea/Textarea.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, nextTick, onBeforeUnmount, onMounted, ref, useAttrs, useCssModule, useSlots, watch } from 'vue';\n\n import Field, { type FieldProps } from '../Field/Field.vue';\n\n export interface TextareaResizeOptions {\n /**\n * It will automatically scroll the page down when it reaches the bottom of the viewport/element\n */\n forceBrowserScroll: boolean;\n }\n\n export interface TextAreaProps extends FieldProps {\n /**\n * Value for the textarea element.\n */\n modelValue?: string;\n\n /**\n * Deprecated. Use :model-value or v-model instead of :value.\n * @deprecated Use :model-value or v-model instead of :value.\n */\n value?: string | number | null;\n\n /**\n * Allow textarea to be resizable vertically.\n * Alternatively if you want to disable automatic scroll when resizing, you can set `{ forceBrowserScroll: false }`\n */\n resize?: boolean | TextareaResizeOptions;\n\n /**\n * Placeholder text for the textarea element.\n * **Note:** placeholders should be used to display examples; they should not be used as labels because they are not accessible as labels. If a real label cannot be used, use the `aria-label` attribute.\n */\n placeholder?: string;\n }\n\n defineOptions({\n name: 'll-textarea',\n });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const classes = useCssModule();\n\n const props = withDefaults(defineProps<TextAreaProps>(), {\n modelValue: '',\n value: null,\n resize: false,\n placeholder: undefined,\n });\n\n const emits = defineEmits<{\n /**\n * Emitted when the model value changes.\n */\n (e: 'update:model-value', value: string): void;\n }>();\n\n const textareaRef = ref<HTMLTextAreaElement>();\n const observer = ref<ResizeObserver>();\n const isReadOnly = computed(() => props.isReadOnly || ('readonly' in attrs && attrs.readonly !== false));\n\n const inputAttrs = computed(() => {\n const allAttrs = { ...attrs };\n\n delete allAttrs['data-test'];\n delete allAttrs.class;\n\n return allAttrs;\n });\n\n watch(\n () => props.resize,\n (v) => {\n v ? setupResizeObserver() : observer.value?.disconnect();\n },\n );\n\n const onInput = (event: Event) => {\n emits('update:model-value', (event.target as HTMLTextAreaElement).value);\n };\n\n const setupResizeObserver = () => {\n if (observer.value || !textareaRef.value) {\n return;\n }\n\n // the ResizeObserver will be in charge to detect if page needs to scroll when resizing the component\n observer.value = new ResizeObserver(([entry]) => {\n const { target } = entry;\n const parent = findParentScrollable(textareaRef.value as HTMLTextAreaElement) || document.documentElement;\n\n const { scrollTop: scrollPosition } = parent;\n let offsetDiff = 0;\n\n // checks if the closest parent element scrollable is the document page\n if (parent === document.documentElement) {\n const { top, height } = getOffsetClipRect(target as HTMLElement);\n const { innerHeight: viewportHeight } = window;\n\n offsetDiff = Math.max(top + height - (viewportHeight + scrollPosition), 0);\n } else {\n const { top, height } = (target as HTMLElement).getBoundingClientRect();\n const { top: parentTop } = parent.getBoundingClientRect();\n const { offsetHeight: parentHeight } = parent;\n const offsetTop = top - parentTop;\n\n offsetDiff = Math.max(offsetTop + height - parentHeight, 0);\n }\n\n if (offsetDiff) {\n requestAnimationFrame(() => {\n parent.scrollTop = scrollPosition + offsetDiff;\n });\n }\n });\n\n observer.value.observe(textareaRef.value);\n };\n\n /**\n * Retrieve the closest parent that has a scroll. Defaults to the document page.\n */\n const findParentScrollable = (el: HTMLElement): HTMLElement | null => {\n const parent = el.parentElement as HTMLElement;\n if (!parent) {\n return null;\n }\n\n const { overflowY } = getComputedStyle(parent);\n if (overflowY !== 'visible') {\n return parent;\n }\n\n if (parent === document.body) {\n return document.documentElement;\n }\n\n return findParentScrollable(parent);\n };\n\n /**\n * Retrieve element absolute positioning relative to the page.\n */\n const getOffsetClipRect = (el: HTMLElement) => {\n const { offsetWidth: width, offsetHeight: height } = el;\n\n let left = 0;\n let top = 0;\n\n const findPos = function ({ offsetLeft, offsetTop, offsetParent }: HTMLElement) {\n left += offsetLeft;\n top += offsetTop;\n\n if (offsetParent) {\n findPos(offsetParent as HTMLElement);\n }\n };\n\n findPos(el);\n\n return {\n top,\n left,\n width,\n height,\n };\n };\n\n onMounted(async () => {\n if (props.value !== null) {\n throw new Error('ll-input: use :model-value or v-model instead of :value.');\n }\n\n if (attrs.onInput) {\n throw new Error('ll-input: use the @update:model-value event instead of @input');\n }\n\n if (\n (typeof props.resize === 'boolean' && props.resize) ||\n (props.resize as TextareaResizeOptions)?.forceBrowserScroll\n ) {\n await nextTick();\n setupResizeObserver();\n }\n });\n\n onBeforeUnmount(() => {\n observer.value?.disconnect();\n });\n</script>\n\n<template>\n <Field v-bind=\"props\" class=\"stash-textarea\" :class=\"[classes.root]\" data-test=\"stash-textarea\">\n <template #default=\"{ fieldId, hasError }\">\n <textarea\n :id=\"fieldId\"\n ref=\"textareaRef\"\n :class=\"[\n classes.textarea,\n { 'stash-textarea--error': hasError, 'tw-resize-y': props.resize, 'tw-resize-none': !props.resize },\n ]\"\n :value=\"props.modelValue\"\n data-test=\"stash-textarea|textarea\"\n :placeholder=\"props.placeholder\"\n v-bind=\"inputAttrs\"\n :disabled=\"props.disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n ></textarea>\n </template>\n <template v-if=\"slots.hint\" #hint>\n <!-- @slot Hint content -->\n <slot name=\"hint\"></slot>\n </template>\n </Field>\n</template>\n\n<style module>\n .root {\n position: relative;\n width: 100%;\n }\n\n .textarea {\n background: var(--color-white);\n border: 1px solid;\n border-color: var(--color-ice-500);\n border-radius: theme('borderRadius.DEFAULT');\n color: var(--color-ice-700);\n display: block;\n min-height: 100px;\n outline: none;\n padding: theme('spacing[1.5]');\n width: 100%;\n\n &:hover {\n border-color: var(--color-ice-500);\n }\n\n &:focus,\n &:active {\n border-color: var(--color-blue-500);\n }\n\n &.stash-textarea--error {\n border-color: var(--color-red-500);\n color: var(--color-red-500);\n }\n\n &::placeholder {\n color: var(--color-ice-500);\n opacity: 1;\n }\n\n &[disabled] {\n background-color: var(--color-ice-100);\n border-color: var(--color-ice-500);\n color: var(--color-ice-500);\n pointer-events: none;\n }\n\n &[disabled]:active,\n &[disabled]:focus {\n box-shadow: none;\n }\n\n &[disabled]::placeholder {\n text-transform: none;\n color: var(--color-ice-500);\n }\n\n &[readonly] {\n border-color: transparent;\n background-color: transparent;\n padding-left: 0;\n padding-right: 0;\n min-height: unset;\n }\n }\n</style>\n"],"names":["attrs","useAttrs","slots","useSlots","classes","useCssModule","props","__props","emits","__emit","textareaRef","ref","observer","isReadOnly","computed","inputAttrs","allAttrs","watch","v","setupResizeObserver","_a","onInput","event","entry","target","parent","findParentScrollable","scrollPosition","offsetDiff","top","height","getOffsetClipRect","viewportHeight","parentTop","parentHeight","offsetTop","el","overflowY","width","left","findPos","offsetLeft","offsetParent","onMounted","nextTick","onBeforeUnmount"],"mappings":"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"}
@@ -33,39 +33,21 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
33
33
  };
34
34
 
35
35
  declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TextAreaProps>, {
36
- label: string;
37
36
  modelValue: string;
38
37
  value: null;
39
- errorText: string;
40
- hintText: string;
41
- showOptionalInLabel: boolean;
42
38
  resize: boolean;
43
39
  placeholder: undefined;
44
- disabled: boolean;
45
- isReadOnly: boolean;
46
40
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
47
41
  "update:model-value": (value: string) => void;
48
42
  }, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TextAreaProps>, {
49
- label: string;
50
43
  modelValue: string;
51
44
  value: null;
52
- errorText: string;
53
- hintText: string;
54
- showOptionalInLabel: boolean;
55
45
  resize: boolean;
56
46
  placeholder: undefined;
57
- disabled: boolean;
58
- isReadOnly: boolean;
59
47
  }>>> & Readonly<{
60
48
  "onUpdate:model-value"?: ((value: string) => any) | undefined;
61
49
  }>, {
62
50
  resize: boolean | TextareaResizeOptions;
63
- disabled: boolean;
64
- label: string;
65
- errorText: string;
66
- hintText: string;
67
- isReadOnly: boolean;
68
- showOptionalInLabel: boolean;
69
51
  placeholder: string;
70
52
  modelValue: string;
71
53
  value: string | number | null;
@@ -74,32 +56,69 @@ value: string | number | null;
74
56
  }>;
75
57
  export default _default;
76
58
 
77
- export declare interface TextAreaProps {
59
+ declare interface FieldProps {
78
60
  /**
79
- * Label text for the textarea element.
61
+ * Adds spacing under the field that is consistent whether hint/error text is displayed.
80
62
  */
81
- label?: string;
63
+ addBottomSpace?: boolean;
82
64
  /**
83
- * Value for the textarea element.
65
+ * Error text to display. Replaces `hintText` (if provided) & adds error styling.
84
66
  */
85
- modelValue?: string;
67
+ errorText?: string;
86
68
  /**
87
- * Deprecated. Use :model-value or v-model instead of :value.
88
- * @deprecated Use :model-value or v-model instead of :value.
69
+ * Displays text below the input; hidden when the isReadOnly prop is truthy.
89
70
  */
90
- value?: string | number | null;
71
+ hintText?: string;
91
72
  /**
92
- * Error text for the textarea element.
73
+ * ID for the Label and Input; must be unique
93
74
  */
94
- errorText?: string;
75
+ id?: string;
95
76
  /**
96
- * Hint text for the textarea element.
77
+ * ID for the error text element; useful for aria-errormessage
97
78
  */
98
- hintText?: string;
79
+ errorId?: string;
99
80
  /**
100
- * Render "(optional)" to the right of the label text
81
+ * Whether it's a readonly field.
82
+ */
83
+ isReadOnly?: boolean;
84
+ /**
85
+ * Whether the field is required.
86
+ */
87
+ isRequired?: boolean;
88
+ /**
89
+ * Label to render above the input.
90
+ */
91
+ label?: string;
92
+ /**
93
+ * Show "(optional)" to the right of the label text
101
94
  */
102
95
  showOptionalInLabel?: boolean;
96
+ /**
97
+ * Indicates wheter the field is a fieldset or not
98
+ */
99
+ fieldset?: boolean;
100
+ /**
101
+ * Indicates whether the field is disabled.
102
+ */
103
+ isDisabled?: boolean;
104
+ /**
105
+ * Indicates whether the field is disabled.
106
+ *
107
+ * @deprecated Use `isDisabled` instead.
108
+ */
109
+ disabled?: boolean;
110
+ }
111
+
112
+ export declare interface TextAreaProps extends FieldProps {
113
+ /**
114
+ * Value for the textarea element.
115
+ */
116
+ modelValue?: string;
117
+ /**
118
+ * Deprecated. Use :model-value or v-model instead of :value.
119
+ * @deprecated Use :model-value or v-model instead of :value.
120
+ */
121
+ value?: string | number | null;
103
122
  /**
104
123
  * Allow textarea to be resizable vertically.
105
124
  * Alternatively if you want to disable automatic scroll when resizing, you can set `{ forceBrowserScroll: false }`
@@ -110,14 +129,6 @@ export declare interface TextAreaProps {
110
129
  * **Note:** placeholders should be used to display examples; they should not be used as labels because they are not accessible as labels. If a real label cannot be used, use the `aria-label` attribute.
111
130
  */
112
131
  placeholder?: string;
113
- /**
114
- * Indicates whether the textarea is disabled.
115
- */
116
- disabled?: boolean;
117
- /**
118
- * Indicates whether the textarea is read-only.
119
- */
120
- isReadOnly?: boolean;
121
132
  }
122
133
 
123
134
  export declare interface TextareaResizeOptions {