energy-components 2.0.0-beta.3 → 2.0.0-beta.5
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/components/collapsable.es.js +1 -1
- package/dist/components/collapsable.scss_vue_type_style_index_0_src_true_lang-C_OxhT8v.js +105 -0
- package/dist/components/dropdown.es.js +252 -223
- package/dist/components/index.es.js +1 -1
- package/dist/components/indicator.es.js +137 -81
- package/dist/components/link.es.js +7 -7
- package/dist/components/multiselect.es.js +104 -51
- package/dist/components/style/actionButton.css +1 -1
- package/dist/components/style/button.css +1 -1
- package/dist/components/style/checkbox.css +1 -1
- package/dist/components/style/collapsable.css +1 -1
- package/dist/components/style/directAccess.css +1 -1
- package/dist/components/style/dropdown.css +1 -1
- package/dist/components/style/filterChip.css +1 -1
- package/dist/components/style/filterTag.css +1 -1
- package/dist/components/style/floatingActionButton.css +1 -1
- package/dist/components/style/indicator.css +1 -1
- package/dist/components/style/link.css +1 -1
- package/dist/components/style/multiselect.css +1 -1
- package/dist/components/style/multiselectcontentwrapper.css +1 -1
- package/dist/components/style/selectionChip.css +1 -1
- package/dist/components/style/switch.css +1 -1
- package/dist/components/style/tag.css +1 -1
- package/dist/components/style/textArea.css +1 -1
- package/dist/components/style/textField.css +1 -1
- package/dist/components/style/toggle.css +1 -1
- package/dist/components/tag.es.js +33 -22
- package/dist/components/textField.es.js +101 -97
- package/dist/components/toggle.es.js +31 -26
- package/dist/energy-components.css +1 -1
- package/dist/energy-components.es.js +5097 -4922
- package/dist/energy-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/src/components/buttons/action-button/action-button.vue.d.ts +3 -3
- package/dist/types/src/components/buttons/button/button.vue.d.ts +4 -4
- package/dist/types/src/components/buttons/floating-action-button/floating-action-button.vue.d.ts +3 -3
- package/dist/types/src/components/content/avatar/avatar.vue.d.ts +1 -1
- package/dist/types/src/components/content/collapsable/collapsable.vue.d.ts +2 -2
- package/dist/types/src/components/content/table/table.vue.d.ts +1 -1
- package/dist/types/src/components/content/tag/tag.vue.d.ts +23 -2
- package/dist/types/src/components/feedback/indicator/indicator.vue.d.ts +88 -1
- package/dist/types/src/components/feedback/loader/loader.vue.d.ts +1 -1
- package/dist/types/src/components/input/checkbox/checkbox.vue.d.ts +3 -3
- package/dist/types/src/components/input/datepicker/datepicker.vue.d.ts +3 -3
- package/dist/types/src/components/input/drag-and-drop/drag-and-drop.vue.d.ts +2 -2
- package/dist/types/src/components/input/dropdown/dropdown.vue.d.ts +7 -7
- package/dist/types/src/components/input/file-upload-item/file-upload-item.vue.d.ts +2 -2
- package/dist/types/src/components/input/filter-chip/filter-chip.vue.d.ts +4 -4
- package/dist/types/src/components/input/quantity-selector/quantity-selector.vue.d.ts +3 -3
- package/dist/types/src/components/input/radio-button/radio-button.vue.d.ts +1 -1
- package/dist/types/src/components/input/selection-chip/selection-chip.vue.d.ts +4 -4
- package/dist/types/src/components/input/switch/switch.vue.d.ts +1 -1
- package/dist/types/src/components/input/text-area/text-area.vue.d.ts +2 -2
- package/dist/types/src/components/input/text-field/text-field.vue.d.ts +7 -7
- package/dist/types/src/components/input/toggle/toggle.vue.d.ts +7 -0
- package/dist/types/src/components/navigation/direct-access/direct-access.vue.d.ts +4 -4
- package/dist/types/src/components/navigation/link/link.vue.d.ts +3 -3
- package/dist/types/src/components/navigation/pagination/pagination.vue.d.ts +2 -2
- package/dist/types/src/components/navigation/tab-bar/tab-bar.vue.d.ts +2 -2
- package/dist/types/src/components/overlay/modal/modal.vue.d.ts +1 -1
- package/dist/types/src/components/overlay/popover/popover.vue.d.ts +7 -7
- package/dist/types/src/components/overlay/popover-menu/popover-menu.vue.d.ts +5 -5
- package/dist/types/src/components/overlay/tooltip/tooltip.vue.d.ts +9 -9
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/llms/00-installation.md +14 -17
- package/llms/01-migration-v2.md +15 -247
- package/llms/rdsindicator.md +5 -0
- package/llms/rdstag.md +1 -0
- package/llms/rdstoggle.md +1 -0
- package/package.json +2 -2
- package/dist/components/collapsable.scss_vue_type_style_index_0_src_true_lang-CwEWYCf1.js +0 -86
- package/dist/components/collapsable.scss_vue_type_style_index_0_src_true_lang-DGVMcmcy.js +0 -86
- package/dist/components/icon-svg-9fQGq_1_.js +0 -869
- /package/llms/{llms.txt → index.md} +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { defineComponent as C, ref as i, computed as c, watch as y, nextTick as o, onMounted as N, onBeforeUnmount as R, createElementBlock as S, openBlock as g, normalizeClass as u, createElementVNode as s, withKeys as $, createBlock as I, createCommentVNode as L, createVNode as O, toDisplayString as x, renderSlot as V, createTextVNode as H } from "vue";
|
|
2
|
+
import { R as k } from "./icon-svg-CTR8GnC2.js";
|
|
3
|
+
import './style/collapsable.css';const D = ["id", "aria-expanded", "aria-controls", "disabled"], K = { class: "rds-e-collapsable__header-title" }, M = { class: "rds-e-collapsable__header-title-text" }, T = ["id", "aria-labelledby"], U = /* @__PURE__ */ C({
|
|
4
|
+
__name: "collapsable",
|
|
5
|
+
props: {
|
|
6
|
+
title: {},
|
|
7
|
+
content: { default: "" },
|
|
8
|
+
icon: { default: "" },
|
|
9
|
+
open: { type: Boolean, default: !1 },
|
|
10
|
+
disabled: { type: Boolean, default: !1 },
|
|
11
|
+
fullWidth: { type: Boolean, default: !1 },
|
|
12
|
+
id: { default: "" }
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:open"],
|
|
15
|
+
setup(a, { emit: z }) {
|
|
16
|
+
const d = a, B = z, e = i(d.open), p = i(null), n = i(null);
|
|
17
|
+
let r = null;
|
|
18
|
+
const v = () => {
|
|
19
|
+
e.value && o(() => t());
|
|
20
|
+
}, b = c(() => d.id || `rds-collapsable-${Math.random().toString(36).substr(2, 9)}`), f = c(() => `${b.value}-panel`), m = c(() => `${b.value}-header`);
|
|
21
|
+
function t() {
|
|
22
|
+
const l = p.value;
|
|
23
|
+
if (!l || !n.value) return;
|
|
24
|
+
const _ = n.value.scrollHeight;
|
|
25
|
+
l.style.overflow = "hidden";
|
|
26
|
+
const w = (E) => {
|
|
27
|
+
E.propertyName === "max-height" && (l.removeEventListener("transitionend", w), l.style.overflow = e.value ? "visible" : "hidden");
|
|
28
|
+
};
|
|
29
|
+
l.addEventListener("transitionend", w, { once: !0 }), l.style.maxHeight = e.value ? `${_}px` : "0px";
|
|
30
|
+
}
|
|
31
|
+
const h = () => {
|
|
32
|
+
d.disabled || (e.value = !e.value, B("update:open", e.value), o(() => {
|
|
33
|
+
t();
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
return y(() => d.open, (l) => {
|
|
37
|
+
e.value = l, o(() => {
|
|
38
|
+
t();
|
|
39
|
+
});
|
|
40
|
+
}), y(e, () => {
|
|
41
|
+
o(() => {
|
|
42
|
+
t();
|
|
43
|
+
});
|
|
44
|
+
}, { immediate: !0 }), N(() => {
|
|
45
|
+
"ResizeObserver" in window && (r = new ResizeObserver(() => {
|
|
46
|
+
e.value && t();
|
|
47
|
+
}), o(() => {
|
|
48
|
+
n.value && r?.observe(n.value);
|
|
49
|
+
})), window.addEventListener("resize", v, { passive: !0 });
|
|
50
|
+
}), R(() => {
|
|
51
|
+
window.removeEventListener("resize", v), r?.disconnect(), r = null;
|
|
52
|
+
}), (l, _) => (g(), S("div", {
|
|
53
|
+
class: u(["rds-e-collapsable", {
|
|
54
|
+
"rds-e-collapsable--open": e.value,
|
|
55
|
+
"rds-e-collapsable--disabled": a.disabled,
|
|
56
|
+
"rds-e-collapsable--full-width": a.fullWidth
|
|
57
|
+
}])
|
|
58
|
+
}, [
|
|
59
|
+
s("button", {
|
|
60
|
+
id: m.value,
|
|
61
|
+
class: "rds-e-collapsable__header",
|
|
62
|
+
type: "button",
|
|
63
|
+
"aria-expanded": e.value,
|
|
64
|
+
"aria-controls": f.value,
|
|
65
|
+
disabled: a.disabled,
|
|
66
|
+
onClick: h,
|
|
67
|
+
onKeydown: $(h, ["enter", "space"])
|
|
68
|
+
}, [
|
|
69
|
+
a.icon ? (g(), I(k, {
|
|
70
|
+
key: 0,
|
|
71
|
+
name: a.icon,
|
|
72
|
+
class: "rds-e-collapsable__header-icon"
|
|
73
|
+
}, null, 8, ["name"])) : L("", !0),
|
|
74
|
+
s("span", K, [
|
|
75
|
+
s("span", M, x(a.title), 1)
|
|
76
|
+
]),
|
|
77
|
+
O(k, {
|
|
78
|
+
class: u(["rds-e-collapsable__header-arrow", { "rds-e-collapsable__header-arrow--open": e.value }]),
|
|
79
|
+
name: "arrow_down"
|
|
80
|
+
}, null, 8, ["class"])
|
|
81
|
+
], 40, D),
|
|
82
|
+
s("div", {
|
|
83
|
+
id: f.value,
|
|
84
|
+
ref_key: "panel",
|
|
85
|
+
ref: p,
|
|
86
|
+
class: u(["rds-e-collapsable__panel", { "rds-e-collapsable__panel--open": e.value }]),
|
|
87
|
+
role: "region",
|
|
88
|
+
"aria-labelledby": m.value
|
|
89
|
+
}, [
|
|
90
|
+
s("div", {
|
|
91
|
+
ref_key: "panelContent",
|
|
92
|
+
ref: n,
|
|
93
|
+
class: "rds-e-collapsable__panel-content"
|
|
94
|
+
}, [
|
|
95
|
+
V(l.$slots, "default", {}, () => [
|
|
96
|
+
H(x(a.content), 1)
|
|
97
|
+
])
|
|
98
|
+
], 512)
|
|
99
|
+
], 10, T)
|
|
100
|
+
], 2));
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
export {
|
|
104
|
+
U as _
|
|
105
|
+
};
|