@avakhula/ui 0.1.22 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/App.js +23 -0
  2. package/dist/EventEmmiter.js +33 -0
  3. package/dist/chunks/_commonjsHelpers-DaMA6jEr.js +8 -0
  4. package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  5. package/dist/chunks/floating-ui.dom-D8OVFdyL.js +861 -0
  6. package/dist/chunks/vue-quill.esm-bundler-FvTqp_xR.js +9070 -0
  7. package/dist/components/Accordion/Accordion.js +81 -0
  8. package/dist/components/Alert/Alert.js +121 -0
  9. package/dist/components/Alert/constants.js +10 -0
  10. package/dist/components/Avatar/Avatar.js +75 -0
  11. package/dist/components/Avatar/constants.js +12 -0
  12. package/dist/components/Badge/Badge.js +29 -0
  13. package/dist/components/Breadcrumbs/Breadcrumbs.js +117 -0
  14. package/dist/components/Button/Button.js +140 -0
  15. package/dist/components/Button/constants.js +11 -0
  16. package/dist/components/ButtonGroup/ButtonGroup.js +14 -0
  17. package/dist/components/Chips/Chips.js +65 -0
  18. package/dist/components/Dropdown/Dropdown.js +228 -0
  19. package/dist/components/Dropdown/DropdownDivider.js +10 -0
  20. package/dist/components/Dropdown/DropdownItem.js +50 -0
  21. package/dist/components/Dropdown/DropdownList.js +104 -0
  22. package/dist/components/Dropdown/constants.js +12 -0
  23. package/dist/components/Form/CharactersCount.js +33 -0
  24. package/dist/components/Form/Checkbox/Checkbox.js +171 -0
  25. package/dist/components/Form/CheckboxGroup/CheckboxGroup.js +81 -0
  26. package/dist/components/Form/DatePicker/DatePicker.js +1782 -0
  27. package/dist/components/Form/DatePicker/Icons/chevron-back.js +8 -0
  28. package/dist/components/Form/DatePicker/Icons/chevron-forward.js +8 -0
  29. package/dist/components/Form/FormGroup/FormGroup.js +30 -0
  30. package/dist/components/Form/FormGroup/FormGroupSet.js +44 -0
  31. package/dist/components/Form/Input/Input.js +375 -0
  32. package/dist/components/Form/Input/constants.js +9 -0
  33. package/dist/components/Form/Label/Label.js +87 -0
  34. package/dist/components/Form/PhoneInput/PhoneInput.js +3811 -0
  35. package/dist/components/Form/Radio/Radio.js +91 -0
  36. package/dist/components/Form/TextEditor/TextEditor.js +422 -0
  37. package/dist/components/Form/TextEditor/Toolbar.js +291 -0
  38. package/dist/components/Form/TextEditor/icons/toolbarIcons.js +109 -0
  39. package/dist/components/Form/TextEditor/plugins/alphabetList.js +31 -0
  40. package/dist/components/Form/TextEditor/plugins/imageBlot.js +16 -0
  41. package/dist/components/Form/TextEditor/setupTextEditor.js +27 -0
  42. package/dist/components/Form/Textarea/Textarea.js +121 -0
  43. package/dist/components/Form/Toggle/Toggle.js +134 -0
  44. package/dist/components/Icon.js +37 -0
  45. package/dist/components/IconButton/IconButton.js +93 -0
  46. package/dist/components/IconButton/constants.js +15 -0
  47. package/dist/components/List.js +66 -0
  48. package/dist/components/Modal/Modal.js +198 -0
  49. package/dist/components/Modal/constants.js +9 -0
  50. package/dist/components/Pagination/LimitSelector.js +73 -0
  51. package/dist/components/Pagination/Pagination.js +226 -0
  52. package/dist/components/Panel/Panel.js +107 -0
  53. package/dist/components/Popover/Popover.js +105 -0
  54. package/dist/components/Popover/constants.js +17 -0
  55. package/dist/components/ProgressBar/ProgressBar.js +63 -0
  56. package/dist/components/ProgressBar/constants.js +10 -0
  57. package/dist/components/Sorting/Sorting.js +182 -0
  58. package/dist/components/Sorting/constants.js +12 -0
  59. package/dist/components/SplitButton/SplitButton.js +145 -0
  60. package/dist/components/SplitButton/SplitButtonItem.js +34 -0
  61. package/dist/components/SplitButton/constants.js +7 -0
  62. package/dist/components/StatusIndicator/StatusIndicator.js +29 -0
  63. package/dist/components/StatusIndicator/constants.js +13 -0
  64. package/dist/components/StatusIndicator/icons.js +44 -0
  65. package/dist/components/Table/Cells/Cell.js +39 -0
  66. package/dist/components/Table/Cells/CheckboxCell.js +37 -0
  67. package/dist/components/Table/Row.js +14 -0
  68. package/dist/components/Table/Table.js +24 -0
  69. package/dist/components/Tabs/Tab.js +47 -0
  70. package/dist/components/Tabs/TabDropdown.js +94 -0
  71. package/dist/components/Tabs/Tabs.js +128 -0
  72. package/dist/components/TagPill/TagPill.js +61 -0
  73. package/dist/components/TagPill/constants.js +12 -0
  74. package/dist/components/ToggleTip/ToggleTip.js +91 -0
  75. package/dist/components/ToggleTip/constants.js +17 -0
  76. package/dist/components/Tooltip/Tooltip.js +46 -0
  77. package/dist/components/TreeSelect/Option.js +302 -0
  78. package/dist/components/TreeSelect/Select.js +1867 -0
  79. package/dist/components/TreeSelect/mixins/InfinityLoaderMixin.js +32 -0
  80. package/dist/constants/events.js +5 -0
  81. package/dist/constants/keyCodes.js +12 -0
  82. package/dist/directives/outside/outside.js +37 -0
  83. package/dist/directives/tooltip/TooltipController.js +116 -0
  84. package/dist/directives/tooltip/textOverflowTooltip.js +23 -0
  85. package/dist/directives/tooltip/tooltip.js +48 -0
  86. package/dist/helpers/debounce.js +14 -0
  87. package/dist/helpers/generateUID.js +6 -0
  88. package/dist/helpers/getHrefFromID.js +6 -0
  89. package/dist/helpers/multiLineOverflows.js +6 -0
  90. package/dist/helpers/removeEvents.js +8 -0
  91. package/dist/helpers/stripHtml.js +6 -0
  92. package/dist/index.css +1 -1
  93. package/dist/index.js +103 -22665
  94. package/dist/main.js +10 -0
  95. package/dist/mixins/expandAnimation.js +24 -0
  96. package/package.json +7 -4
  97. package/src/components/Form/Textarea/Textarea.vue +8 -4
  98. package/src/components/TreeSelect/Select.vue +11 -11
  99. package/.babelrc.json +0 -14
  100. package/.eslintrc.cjs +0 -22
  101. package/.nvmrc +0 -1
  102. package/.prettierrc.json +0 -1
  103. package/.storybook/intelliboardTheme.js +0 -10
  104. package/.storybook/main.js +0 -25
  105. package/.storybook/manager.js +0 -7
  106. package/.storybook/preview-head.html +0 -12
  107. package/.storybook/preview.js +0 -25
  108. package/.storybook/scss-loader.scss +0 -6
  109. package/.storybook/withSource.js +0 -97
  110. package/dist/index.umd.cjs +0 -238
  111. package/index.html +0 -21
  112. package/static/Logo.svg +0 -25
  113. package/static/docks/button.pdf +0 -147566
  114. package/static/favicon.ico +0 -0
  115. package/vite.config.js +0 -47
@@ -0,0 +1,81 @@
1
+ import d from "../../helpers/generateUID.js";
2
+ import l from "../../mixins/expandAnimation.js";
3
+ import p from "../Icon.js";
4
+ import { resolveComponent as m, createElementBlock as u, openBlock as v, normalizeClass as f, createElementVNode as o, createVNode as c, withModifiers as h, renderSlot as r, Transition as A, withCtx as _, withDirectives as b, vShow as w } from "vue";
5
+ import { _ as C } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const E = {
7
+ name: "IbAccordion",
8
+ mixins: [l],
9
+ props: {
10
+ isOpen: {
11
+ type: Boolean,
12
+ default: !1
13
+ }
14
+ },
15
+ watch: {
16
+ isOpen(e) {
17
+ this.isActive = e;
18
+ }
19
+ },
20
+ data() {
21
+ return {
22
+ isActive: this.isOpen,
23
+ uuid: d()
24
+ };
25
+ },
26
+ methods: {
27
+ onClick() {
28
+ this.isActive = !this.isActive, this.isActive ? this.$emit("open", this.isActive) : this.$emit("close", this.isActive);
29
+ }
30
+ },
31
+ components: {
32
+ IbIcon: p
33
+ }
34
+ }, k = ["id", "aria-controls", "aria-expanded"], I = ["id", "aria-labelledby"], x = { class: "accordion-content-wrapper" };
35
+ function y(e, n, B, O, i, t) {
36
+ const s = m("ib-icon");
37
+ return v(), u("div", {
38
+ class: f(["ib-accordion", { active: i.isActive }])
39
+ }, [
40
+ o("button", {
41
+ class: "accordion-title",
42
+ id: "accordion" + i.uuid,
43
+ "aria-controls": "accordion-section-" + i.uuid,
44
+ "aria-expanded": i.isActive,
45
+ type: "button",
46
+ onClick: n[0] || (n[0] = h((...a) => t.onClick && t.onClick(...a), ["prevent"]))
47
+ }, [
48
+ r(e.$slots, "title", {}, void 0, !0),
49
+ c(s, {
50
+ class: "chevron-icon",
51
+ name: "chevron-down-outline"
52
+ })
53
+ ], 8, k),
54
+ c(A, {
55
+ name: "expand",
56
+ onEnter: e.enter,
57
+ onAfterEnter: e.afterEnter,
58
+ onLeave: e.leave
59
+ }, {
60
+ default: _(() => [
61
+ b(o("div", {
62
+ role: "region",
63
+ class: "accordion-content",
64
+ id: "accordion-section-" + i.uuid,
65
+ "aria-labelledby": "accordion" + i.uuid
66
+ }, [
67
+ o("div", x, [
68
+ r(e.$slots, "default", {}, void 0, !0)
69
+ ])
70
+ ], 8, I), [
71
+ [w, i.isActive]
72
+ ])
73
+ ]),
74
+ _: 3
75
+ }, 8, ["onEnter", "onAfterEnter", "onLeave"])
76
+ ], 2);
77
+ }
78
+ const V = /* @__PURE__ */ C(E, [["render", y], ["__scopeId", "data-v-e6e815cc"]]);
79
+ export {
80
+ V as default
81
+ };
@@ -0,0 +1,121 @@
1
+ import p from "../Icon.js";
2
+ import b from "../IconButton/IconButton.js";
3
+ import { alertTypeOptions as s } from "./constants.js";
4
+ import { resolveComponent as d, createElementBlock as u, openBlock as n, normalizeClass as _, createElementVNode as o, createBlock as f, createCommentVNode as l, renderSlot as r, toDisplayString as k, withCtx as g, createVNode as v } from "vue";
5
+ import { _ as y } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const w = {
7
+ name: "IbAlert",
8
+ props: {
9
+ type: {
10
+ type: String,
11
+ default: s.alert,
12
+ validator: (e) => Object.keys(s).includes(e)
13
+ },
14
+ showIcon: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ showCloseButton: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
22
+ title: {
23
+ type: String,
24
+ default: ""
25
+ },
26
+ additionalTitleText: {
27
+ type: String,
28
+ default: ""
29
+ }
30
+ },
31
+ mounted() {
32
+ this.checkHeight(), this.$refs.content && (this.contentObserver = new ResizeObserver(() => {
33
+ this.checkHeight();
34
+ }), this.contentObserver.observe(this.$refs.content)), window.addEventListener("resize", () => this.checkHeight());
35
+ },
36
+ data() {
37
+ return {
38
+ contentObserver: null
39
+ };
40
+ },
41
+ methods: {
42
+ close() {
43
+ this.$emit("close");
44
+ },
45
+ checkHeight() {
46
+ var t;
47
+ if (!this.$refs.content)
48
+ return;
49
+ const e = getComputedStyle(this.$refs.content), i = (t = this.$refs.content) == null ? void 0 : t.parentElement.offsetWidth;
50
+ !i || !e || (parseInt(e.width) <= i && this.$refs.content.classList.remove("large"), parseInt(e.height) > 37 && this.showIcon && (this.title.length ? this.$refs.content.classList.add("large") : this.$refs.content.classList.add("medium")));
51
+ }
52
+ },
53
+ computed: {
54
+ classes() {
55
+ const e = ["ib-alert"];
56
+ return e.push(`ib-alert-${this.type}`), this.title.length && e.push("has-title"), this.showIcon && e.push("has-icon"), this.showCloseButton && e.push("has-close-button"), this.$slots.link && e.push("has-link"), e;
57
+ },
58
+ iconName() {
59
+ return this.type === s.info ? "information-circle-outline" : this.type === s.success ? "checkmark-circle-outline" : "alert-circle-outline";
60
+ }
61
+ },
62
+ beforeUnmount() {
63
+ var e;
64
+ (e = this.contentObserver) == null || e.disconnect(), window.removeEventListener("resize", () => this.checkHeight());
65
+ },
66
+ components: {
67
+ IbIcon: p,
68
+ IbIconButton: b
69
+ }
70
+ }, I = {
71
+ ref: "content",
72
+ class: "content"
73
+ }, $ = { class: "content-head" }, C = {
74
+ key: 1,
75
+ class: "ib-alert-title"
76
+ }, B = { class: "text-content" }, O = { class: "link" };
77
+ function S(e, i, t, L, E, c) {
78
+ var h;
79
+ const a = d("ib-icon"), m = d("ib-icon-button");
80
+ return n(), u("div", {
81
+ role: "alert",
82
+ class: _(c.classes)
83
+ }, [
84
+ o("div", I, [
85
+ o("span", $, [
86
+ t.showIcon ? (n(), f(a, {
87
+ key: 0,
88
+ class: "ib-alert-icon",
89
+ name: c.iconName
90
+ }, null, 8, ["name"])) : l("", !0),
91
+ (h = t.title) != null && h.length ? (n(), u("b", C, k(t.title), 1)) : l("", !0),
92
+ r(e.$slots, "title", {}, void 0, !0)
93
+ ]),
94
+ o("span", B, [
95
+ r(e.$slots, "default", {}, void 0, !0)
96
+ ]),
97
+ o("div", O, [
98
+ r(e.$slots, "link", {}, void 0, !0)
99
+ ])
100
+ ], 512),
101
+ t.showCloseButton ? (n(), f(m, {
102
+ key: 0,
103
+ class: "close-button",
104
+ kind: "ghost",
105
+ "prevent-default": !0,
106
+ onClick: c.close
107
+ }, {
108
+ default: g(() => [
109
+ v(a, {
110
+ class: "close-button-icon",
111
+ name: "close-outline"
112
+ })
113
+ ]),
114
+ _: 1
115
+ }, 8, ["onClick"])) : l("", !0)
116
+ ], 2);
117
+ }
118
+ const V = /* @__PURE__ */ y(w, [["render", S], ["__scopeId", "data-v-017f43e9"]]);
119
+ export {
120
+ V as default
121
+ };
@@ -0,0 +1,10 @@
1
+ const r = {
2
+ alert: "alert",
3
+ error: "error",
4
+ warning: "warning",
5
+ info: "info",
6
+ success: "success"
7
+ };
8
+ export {
9
+ r as alertTypeOptions
10
+ };
@@ -0,0 +1,75 @@
1
+ import n from "../Icon.js";
2
+ import { avatarTypes as m, avatarSizes as o } from "./constants.js";
3
+ import { resolveComponent as u, createElementBlock as s, openBlock as r, normalizeClass as i, normalizeStyle as d, createVNode as f, toDisplayString as v } from "vue";
4
+ import { _ as y } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const _ = {
6
+ name: "IbAvatar",
7
+ props: {
8
+ firstName: {
9
+ type: String,
10
+ default: ""
11
+ },
12
+ lastName: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ src: {
17
+ type: String,
18
+ default: ""
19
+ },
20
+ userAvatar: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ size: {
25
+ type: String,
26
+ default: o.M
27
+ },
28
+ type: {
29
+ type: String,
30
+ default: m.CIRCLE
31
+ }
32
+ },
33
+ computed: {
34
+ classList() {
35
+ return ["avatar", `avatar-size-${this.size}`, `avatar-type-${this.type}`];
36
+ },
37
+ validateName() {
38
+ var e, l;
39
+ return ((e = this.firstName) == null ? void 0 : e.trim().length) !== 0 && ((l = this.lastName) == null ? void 0 : l.trim().length) !== 0;
40
+ },
41
+ initials() {
42
+ return this.firstName[0].toUpperCase() + this.lastName[0].toUpperCase();
43
+ }
44
+ },
45
+ components: {
46
+ IbIcon: n
47
+ }
48
+ }, p = ["src", "alt"];
49
+ function g(e, l, a, N, h, t) {
50
+ const c = u("ib-icon");
51
+ return a.src && !a.userAvatar ? (r(), s("img", {
52
+ key: 0,
53
+ class: i(t.classList),
54
+ src: a.src,
55
+ alt: a.firstName + "" + a.lastName
56
+ }, null, 10, p)) : a.src && a.userAvatar ? (r(), s("div", {
57
+ key: 1,
58
+ class: i(["user-avatar", t.classList]),
59
+ style: d({
60
+ backgroundImage: "url(" + a.src + ")"
61
+ })
62
+ }, null, 6)) : t.validateName ? (r(), s("div", {
63
+ key: 3,
64
+ class: i([t.classList, "default-avatar"])
65
+ }, v(t.initials), 3)) : (r(), s("div", {
66
+ key: 2,
67
+ class: i(["empty-avatar", t.classList])
68
+ }, [
69
+ f(c, { name: "camera-outline" })
70
+ ], 2));
71
+ }
72
+ const C = /* @__PURE__ */ y(_, [["render", g], ["__scopeId", "data-v-1e3762d5"]]);
73
+ export {
74
+ C as default
75
+ };
@@ -0,0 +1,12 @@
1
+ const a = {
2
+ M: "m",
3
+ L: "l",
4
+ XL: "xl"
5
+ }, e = {
6
+ SQUARE: "square",
7
+ CIRCLE: "circle"
8
+ };
9
+ export {
10
+ a as avatarSizes,
11
+ e as avatarTypes
12
+ };
@@ -0,0 +1,29 @@
1
+ import { createElementBlock as n, openBlock as s, normalizeClass as r, toDisplayString as a } from "vue";
2
+ import { _ as o } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const c = {
4
+ name: "IbBadge",
5
+ props: {
6
+ content: {
7
+ type: [String, Number],
8
+ default: ""
9
+ }
10
+ },
11
+ computed: {
12
+ classes() {
13
+ const t = ["ib-badge"];
14
+ return this.content.toString().length && t.push("ib-badge-large"), t;
15
+ },
16
+ normalizeContent() {
17
+ return this.content > 99 ? "99+" : this.content;
18
+ }
19
+ }
20
+ };
21
+ function i(t, l, p, d, m, e) {
22
+ return s(), n("span", {
23
+ class: r(e.classes)
24
+ }, a(e.normalizeContent), 3);
25
+ }
26
+ const _ = /* @__PURE__ */ o(c, [["render", i], ["__scopeId", "data-v-5ac18f0d"]]);
27
+ export {
28
+ _ as default
29
+ };
@@ -0,0 +1,117 @@
1
+ import T from "../Icon.js";
2
+ import B from "../IconButton/IconButton.js";
3
+ import D from "../Dropdown/DropdownList.js";
4
+ import M from "../Dropdown/DropdownItem.js";
5
+ import N from "../Tooltip/Tooltip.js";
6
+ import { TextOverflowTooltipDirective as V } from "../../directives/tooltip/textOverflowTooltip.js";
7
+ import { resolveComponent as l, resolveDirective as z, createElementBlock as r, openBlock as t, createElementVNode as b, Fragment as _, renderList as p, normalizeClass as E, createCommentVNode as s, withDirectives as L, createBlock as c, toDisplayString as m, withCtx as a, createTextVNode as f, createVNode as h } from "vue";
8
+ import { _ as O } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
9
+ const S = {
10
+ name: "IbBreadcrumbs",
11
+ props: {
12
+ items: {
13
+ type: Array,
14
+ default: () => []
15
+ },
16
+ tooltipTextContext: {
17
+ type: String
18
+ }
19
+ },
20
+ computed: {
21
+ last() {
22
+ return this.items.length ? this.items.length - 1 : null;
23
+ },
24
+ initContextMenu() {
25
+ return this.items.length > 4;
26
+ },
27
+ setItemsContextMenu() {
28
+ return this.items.slice(0, -3);
29
+ }
30
+ },
31
+ components: {
32
+ IbIcon: T,
33
+ IbIconButton: B,
34
+ IbDropdownItem: M,
35
+ IbDropdownList: D,
36
+ IbTooltip: N
37
+ },
38
+ directives: {
39
+ OverflowTooltip: V
40
+ }
41
+ }, A = { "aria-label": "breadcrumb" }, F = { class: "breadcrumb" }, j = ["href"], q = { key: 1 }, G = ["href"];
42
+ function H(k, J, n, K, P, i) {
43
+ const v = l("router-link"), u = l("ib-icon"), y = l("ib-tooltip"), g = l("ib-icon-button"), w = l("ib-dropdown-item"), C = l("ib-dropdown-list"), I = z("overflow-tooltip");
44
+ return t(), r("nav", A, [
45
+ b("ul", F, [
46
+ (t(!0), r(_, null, p(n.items, (o, e) => (t(), r("li", {
47
+ class: E(["breadcrumb-item", e === i.last ? "active" : ""]),
48
+ "aria-current": "page",
49
+ key: e
50
+ }, [
51
+ e !== i.last && e > n.items.length - 4 || e === 0 ? (t(), r(_, { key: 0 }, [
52
+ o.url ? (t(), r("a", {
53
+ key: 0,
54
+ class: "ib-link",
55
+ href: o.url
56
+ }, m(o.title), 9, j)) : (t(), c(v, {
57
+ key: 1,
58
+ class: "ib-link",
59
+ to: o.to
60
+ }, {
61
+ default: a(() => [
62
+ f(m(o.title), 1)
63
+ ]),
64
+ _: 2
65
+ }, 1032, ["to"]))
66
+ ], 64)) : s("", !0),
67
+ e === i.last && o.title ? L((t(), r("p", q, [
68
+ f(m(o.title), 1)
69
+ ])), [
70
+ [
71
+ I,
72
+ o.title,
73
+ void 0,
74
+ { bottomCenter: !0 }
75
+ ]
76
+ ]) : s("", !0),
77
+ i.initContextMenu && e === n.items.length - 4 ? (t(), c(C, {
78
+ key: 2,
79
+ horizontal: "center"
80
+ }, {
81
+ trigger: a(() => [
82
+ h(g, { kind: "ghost" }, {
83
+ default: a(() => [
84
+ h(u, { name: "ellipsis-horizontal-sharp" }),
85
+ n.tooltipTextContext ? (t(), c(y, {
86
+ key: 0,
87
+ text: n.tooltipTextContext
88
+ }, null, 8, ["text"])) : s("", !0)
89
+ ]),
90
+ _: 1
91
+ })
92
+ ]),
93
+ body: a(() => [
94
+ (t(!0), r(_, null, p(i.setItemsContextMenu, (d, x) => (t(), c(w, { key: x }, {
95
+ default: a(() => [
96
+ b("a", {
97
+ class: "context-breadcrums",
98
+ href: d.url
99
+ }, m(d.title), 9, G)
100
+ ]),
101
+ _: 2
102
+ }, 1024))), 128))
103
+ ]),
104
+ _: 2
105
+ }, 1024)) : s("", !0),
106
+ e !== i.last && e > n.items.length - 5 || e === 0 ? (t(), c(u, {
107
+ key: 3,
108
+ name: "chevron-forward-outline"
109
+ })) : s("", !0)
110
+ ], 2))), 128))
111
+ ])
112
+ ]);
113
+ }
114
+ const tt = /* @__PURE__ */ O(S, [["render", H], ["__scopeId", "data-v-224b4a21"]]);
115
+ export {
116
+ tt as default
117
+ };
@@ -0,0 +1,140 @@
1
+ import { buttonKindOptions as u } from "./constants.js";
2
+ import d from "../../helpers/removeEvents.js";
3
+ import { createBlock as f, openBlock as n, resolveDynamicComponent as c, mergeProps as m, withCtx as b, renderSlot as r, withDirectives as p, createCommentVNode as k, createElementBlock as o, createElementVNode as a, Fragment as v, renderList as y, vShow as M } from "vue";
4
+ import { _ as g } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const D = {
6
+ name: "IbButton",
7
+ props: {
8
+ kind: {
9
+ type: String,
10
+ default: u.primary
11
+ },
12
+ disabled: {
13
+ type: Boolean,
14
+ required: !1,
15
+ default: !1
16
+ },
17
+ preventDefault: {
18
+ type: Boolean,
19
+ default: null
20
+ },
21
+ confirmMessage: {
22
+ type: String,
23
+ default: ""
24
+ },
25
+ block: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ href: {
30
+ type: String,
31
+ default: ""
32
+ },
33
+ to: {
34
+ type: [String, Object]
35
+ },
36
+ linkMethod: {
37
+ type: String,
38
+ default: "get"
39
+ },
40
+ disableAfterClick: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ postOptions: {
45
+ type: Object,
46
+ default: () => ({})
47
+ }
48
+ },
49
+ data() {
50
+ return {
51
+ isDisabled: this.disabled
52
+ };
53
+ },
54
+ watch: {
55
+ disabled(e) {
56
+ this.isDisabled = e;
57
+ }
58
+ },
59
+ methods: {
60
+ onMouseenter(e) {
61
+ this.$emit("mouseenter", e);
62
+ },
63
+ onMouseleave(e) {
64
+ this.$emit("mouseleave", e);
65
+ },
66
+ onClick(e) {
67
+ if ((this.preventDefault || this.isDisabled) && e.preventDefault(), this.confirmMessage.length > 0 && !confirm(this.confirmMessage)) {
68
+ e.preventDefault();
69
+ return;
70
+ }
71
+ !this.isDisabled && this.href.length && !this.preventDefault && this.linkMethod.toUpperCase() !== "GET" && (e.preventDefault(), this.$refs.form.submit()), this.isDisabled || this.$emit("click", e), this.disableAfterClick && !this.disabled && (this.isDisabled = !0);
72
+ }
73
+ },
74
+ computed: {
75
+ component() {
76
+ return this.href.length ? "a" : this.to ? "router-link" : "button";
77
+ },
78
+ classes() {
79
+ const e = ["ib-button"];
80
+ return e.push(`ib-btn-${this.kind}`), this.isDisabled && e.push("ib-btn-disabled"), this.block && e.push("ib-btn-block"), (this.href.length || this.to) && e.push("ib-btn-link"), this.hasIcon && e.push("ib-btn-has-icon"), e;
81
+ },
82
+ attrs() {
83
+ const e = d({ ...this.$attrs }, ["onClick"]);
84
+ return e.class = [...this.classes, e.class], e.disabled = this.isDisabled, this.href.length && (e.href = this.href), this.to && (e.to = this.to), e;
85
+ },
86
+ hasIcon() {
87
+ return !!this.$slots.icon;
88
+ },
89
+ formMethod() {
90
+ return this.linkMethod === "GET" ? "GET" : "POST";
91
+ },
92
+ token() {
93
+ var e;
94
+ return (e = document.head.querySelector('meta[name="csrf-token"]')) == null ? void 0 : e.content;
95
+ }
96
+ },
97
+ inheritAttrs: !1
98
+ }, _ = ["method", "action"], C = ["value"], B = ["value"], S = ["name", "value"];
99
+ function O(e, l, s, E, T, t) {
100
+ return n(), f(c(t.component), m(t.attrs, {
101
+ onClick: l[0] || (l[0] = (i) => t.onClick(i)),
102
+ onMouseenter: t.onMouseenter,
103
+ onMouseleave: t.onMouseleave
104
+ }), {
105
+ default: b(() => [
106
+ r(e.$slots, "icon"),
107
+ r(e.$slots, "default"),
108
+ s.href.length && s.linkMethod.toUpperCase() !== "GET" ? p((n(), o("form", {
109
+ key: 0,
110
+ ref: "form",
111
+ method: t.formMethod,
112
+ action: s.href
113
+ }, [
114
+ a("input", {
115
+ type: "hidden",
116
+ name: "_method",
117
+ value: s.linkMethod
118
+ }, null, 8, C),
119
+ a("input", {
120
+ type: "hidden",
121
+ name: "_token",
122
+ value: t.token
123
+ }, null, 8, B),
124
+ (n(!0), o(v, null, y(Object.keys(s.postOptions), (i, h) => (n(), o("input", {
125
+ key: h,
126
+ type: "hidden",
127
+ name: i,
128
+ value: s.postOptions[i]
129
+ }, null, 8, S))), 128))
130
+ ], 8, _)), [
131
+ [M, !1]
132
+ ]) : k("", !0)
133
+ ]),
134
+ _: 3
135
+ }, 16, ["onMouseenter", "onMouseleave"]);
136
+ }
137
+ const A = /* @__PURE__ */ g(D, [["render", O]]);
138
+ export {
139
+ A as default
140
+ };
@@ -0,0 +1,11 @@
1
+ const r = {
2
+ primary: "primary",
3
+ secondary: "secondary",
4
+ tertiary: "tertiary",
5
+ ghost: "ghost",
6
+ danger: "danger",
7
+ ghostDanger: "ghostDanger"
8
+ };
9
+ export {
10
+ r as buttonKindOptions
11
+ };
@@ -0,0 +1,14 @@
1
+ import { createElementBlock as t, openBlock as e, renderSlot as r } from "vue";
2
+ import { _ as n } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const s = {
4
+ name: "IbButtonGroup"
5
+ }, c = { class: "ib-button-group" };
6
+ function p(o, a, u, _, d, f) {
7
+ return e(), t("div", c, [
8
+ r(o.$slots, "default")
9
+ ]);
10
+ }
11
+ const m = /* @__PURE__ */ n(s, [["render", p]]);
12
+ export {
13
+ m as default
14
+ };
@@ -0,0 +1,65 @@
1
+ import l from "../Icon.js";
2
+ import { resolveComponent as r, createElementBlock as s, openBlock as t, normalizeClass as d, createCommentVNode as c, renderSlot as n, createVNode as p } from "vue";
3
+ import { _ as u } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const f = {
5
+ props: {
6
+ showCloseIcon: {
7
+ type: Boolean,
8
+ default: !1
9
+ },
10
+ active: {
11
+ type: Boolean,
12
+ default: !1
13
+ },
14
+ error: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ disabled: {
19
+ type: Boolean,
20
+ default: !1
21
+ }
22
+ },
23
+ computed: {
24
+ hasIcon() {
25
+ var e;
26
+ return (e = this.$slots) == null ? void 0 : e.icon;
27
+ }
28
+ },
29
+ components: {
30
+ Icon: l
31
+ }
32
+ }, h = ["disabled"], _ = {
33
+ key: 0,
34
+ class: "ib-chips-icon-wrapper"
35
+ }, b = {
36
+ key: 1,
37
+ class: "ib-chips-close-wrapper"
38
+ };
39
+ function m(e, I, o, y, B, a) {
40
+ const i = r("icon");
41
+ return t(), s("button", {
42
+ class: d({
43
+ "ib-chips": !0,
44
+ "ib-chips-active": o.active,
45
+ "ib-chips-error": o.error,
46
+ "ib-chips-disabled": o.disabled
47
+ }),
48
+ disabled: o.disabled
49
+ }, [
50
+ a.hasIcon ? (t(), s("span", _, [
51
+ n(e.$slots, "icon", { class: "ib-chips-icon" }, void 0, !0)
52
+ ])) : c("", !0),
53
+ n(e.$slots, "default", {}, void 0, !0),
54
+ o.showCloseIcon ? (t(), s("span", b, [
55
+ p(i, {
56
+ class: "ib-chips-icon",
57
+ name: "close-outline"
58
+ })
59
+ ])) : c("", !0)
60
+ ], 10, h);
61
+ }
62
+ const w = /* @__PURE__ */ u(f, [["render", m], ["__scopeId", "data-v-0a159535"]]);
63
+ export {
64
+ w as default
65
+ };