@dialpad/dialtone-vue 2.202.0-next.1 → 2.203.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/component-documentation.json +1 -1
  2. package/dist/dialtone-vue.cjs +1 -1
  3. package/dist/dialtone-vue.js +277 -283
  4. package/dist/dialtone-vue.js.map +1 -1
  5. package/dist/lib/hovercard/hovercard.cjs +1 -1
  6. package/dist/lib/hovercard/hovercard.cjs.map +1 -1
  7. package/dist/lib/hovercard/hovercard.js +29 -21
  8. package/dist/lib/hovercard/hovercard.js.map +1 -1
  9. package/dist/lib/keyboard-shortcut/keyboard-shortcut-constants.cjs +1 -1
  10. package/dist/lib/keyboard-shortcut/keyboard-shortcut-constants.cjs.map +1 -1
  11. package/dist/lib/keyboard-shortcut/keyboard-shortcut-constants.js +2 -1
  12. package/dist/lib/keyboard-shortcut/keyboard-shortcut-constants.js.map +1 -1
  13. package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
  14. package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs.map +1 -1
  15. package/dist/lib/keyboard-shortcut/keyboard-shortcut.js +65 -33
  16. package/dist/lib/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  17. package/dist/lib/pagination/pagination.cjs +1 -1
  18. package/dist/lib/pagination/pagination.cjs.map +1 -1
  19. package/dist/lib/pagination/pagination.js +8 -8
  20. package/dist/lib/pagination/pagination.js.map +1 -1
  21. package/dist/lib/popover/popover.cjs +1 -1
  22. package/dist/lib/popover/popover.cjs.map +1 -1
  23. package/dist/lib/popover/popover.js +33 -15
  24. package/dist/lib/popover/popover.js.map +1 -1
  25. package/dist/localization/en-US.cjs +0 -2
  26. package/dist/localization/en-US.cjs.map +1 -1
  27. package/dist/localization/en-US.js +0 -2
  28. package/dist/localization/en-US.js.map +1 -1
  29. package/dist/types/components/hovercard/hovercard.vue.d.ts.map +1 -1
  30. package/dist/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +2 -0
  31. package/dist/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
  32. package/dist/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
  33. package/dist/types/components/pagination/pagination.vue.d.ts.map +1 -1
  34. package/dist/types/components/popover/popover.vue.d.ts.map +1 -1
  35. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +1 -1
  36. package/dist/types/components/split_button/split_button.vue.d.ts +2 -2
  37. package/dist/types/index.d.ts +0 -2
  38. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  39. package/package.json +4 -4
  40. package/dist/lib/filter-pill/filter-pill.cjs +0 -2
  41. package/dist/lib/filter-pill/filter-pill.cjs.map +0 -1
  42. package/dist/lib/filter-pill/filter-pill.js +0 -245
  43. package/dist/lib/filter-pill/filter-pill.js.map +0 -1
  44. package/dist/lib/filter-pill/index.cjs +0 -2
  45. package/dist/lib/filter-pill/index.cjs.map +0 -1
  46. package/dist/lib/filter-pill/index.js +0 -5
  47. package/dist/lib/filter-pill/index.js.map +0 -1
  48. package/dist/lib/mode-island/index.cjs +0 -2
  49. package/dist/lib/mode-island/index.cjs.map +0 -1
  50. package/dist/lib/mode-island/index.js +0 -7
  51. package/dist/lib/mode-island/index.js.map +0 -1
  52. package/dist/lib/mode-island/mode-island-constants.cjs +0 -2
  53. package/dist/lib/mode-island/mode-island-constants.cjs.map +0 -1
  54. package/dist/lib/mode-island/mode-island-constants.js +0 -12
  55. package/dist/lib/mode-island/mode-island-constants.js.map +0 -1
  56. package/dist/lib/mode-island/mode-island.cjs +0 -2
  57. package/dist/lib/mode-island/mode-island.cjs.map +0 -1
  58. package/dist/lib/mode-island/mode-island.js +0 -124
  59. package/dist/lib/mode-island/mode-island.js.map +0 -1
  60. package/dist/lib/mode-island/utils.cjs +0 -2
  61. package/dist/lib/mode-island/utils.cjs.map +0 -1
  62. package/dist/lib/mode-island/utils.js +0 -32
  63. package/dist/lib/mode-island/utils.js.map +0 -1
  64. package/dist/lib/mode-island/validators.cjs +0 -2
  65. package/dist/lib/mode-island/validators.cjs.map +0 -1
  66. package/dist/lib/mode-island/validators.js +0 -12
  67. package/dist/lib/mode-island/validators.js.map +0 -1
  68. package/dist/types/components/filter_pill/filter_pill.vue.d.ts +0 -151
  69. package/dist/types/components/filter_pill/filter_pill.vue.d.ts.map +0 -1
  70. package/dist/types/components/filter_pill/index.d.ts +0 -2
  71. package/dist/types/components/filter_pill/index.d.ts.map +0 -1
  72. package/dist/types/components/mode_island/index.d.ts +0 -3
  73. package/dist/types/components/mode_island/index.d.ts.map +0 -1
  74. package/dist/types/components/mode_island/mode_island.vue.d.ts +0 -3
  75. package/dist/types/components/mode_island/mode_island.vue.d.ts.map +0 -1
  76. package/dist/types/components/mode_island/mode_island_constants.d.ts +0 -10
  77. package/dist/types/components/mode_island/mode_island_constants.d.ts.map +0 -1
  78. package/dist/types/components/mode_island/utils.d.ts +0 -12
  79. package/dist/types/components/mode_island/utils.d.ts.map +0 -1
  80. package/dist/types/components/mode_island/validators.d.ts +0 -6
  81. package/dist/types/components/mode_island/validators.d.ts.map +0 -1
@@ -1,245 +0,0 @@
1
- import { DtIconChevronDown as o, DtIconClose as n } from "@dialpad/dialtone-icons/vue2";
2
- import { DialtoneLocalization as s } from "../../localization/index.js";
3
- import { n as p } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
4
- import c from "../button/button.js";
5
- import d from "../popover/popover.js";
6
- import u from "../checkbox/checkbox.js";
7
- import f from "../checkbox-group/checkbox-group.js";
8
- import { BUTTON_SIZE_MODIFIERS as m } from "../button/button-constants.js";
9
- import { POPOVER_PADDING_CLASSES as v, POPOVER_APPEND_TO_VALUES as _ } from "../popover/popover-constants.js";
10
- const h = {
11
- name: "DtFilterPill",
12
- components: {
13
- DtCheckboxGroup: f,
14
- DtCheckbox: u,
15
- DtPopover: d,
16
- DtButton: c,
17
- DtIconClose: n,
18
- DtIconChevronDown: o
19
- },
20
- inheritAttrs: !1,
21
- props: {
22
- /**
23
- * Array of filters to display in the popover,
24
- * should be an array of objects with `name` and `active` properties
25
- */
26
- value: {
27
- type: Array,
28
- default: () => []
29
- },
30
- /**
31
- * Text shown in tooltip when you hover the alpha button,
32
- * required if no content is passed to default slot
33
- */
34
- alphaTooltipText: {
35
- type: String,
36
- default: ""
37
- },
38
- /**
39
- * HTML disabled attribute
40
- */
41
- disabled: {
42
- type: Boolean,
43
- default: !1
44
- },
45
- /**
46
- * Toggles the clear button visibility
47
- * @values true, false
48
- */
49
- hideClear: {
50
- type: Boolean,
51
- default: !1
52
- },
53
- /**
54
- * Label of the button
55
- */
56
- label: {
57
- type: String,
58
- default: void 0
59
- },
60
- /**
61
- * Text shown in tooltip when you hover the omega button,
62
- * required as it is an icon only button
63
- */
64
- omegaTooltipText: {
65
- type: String,
66
- default: ""
67
- },
68
- /**
69
- * Sets the element to which the
70
- * <a class="d-link" href="https://dialtone.dialpad.com/components/popover.html#vue-api" target="_blank">popover component</a>
71
- * is going to append to
72
- * @values body, parent, root, HTMLElement
73
- */
74
- popoverAppendTo: {
75
- type: [HTMLElement, String],
76
- default: "body",
77
- validator: (e) => _.includes(e) || e instanceof HTMLElement
78
- },
79
- /**
80
- * If the dropdown does not fit in the direction described by "popoverPlacement",
81
- * it will attempt to change it's direction to the "popoverFallbackPlacements".
82
- *
83
- * @values top, top-start, top-end,
84
- * right, right-start, right-end,
85
- * left, left-start, left-end,
86
- * bottom, bottom-start, bottom-end,
87
- * auto, auto-start, auto-end
88
- * */
89
- popoverFallbackPlacements: {
90
- type: Array,
91
- default: () => ["auto"]
92
- },
93
- /**
94
- * Determines maximum height for the popover before overflow.
95
- * Possible units rem|px|em
96
- */
97
- popoverMaxHeight: {
98
- type: String,
99
- default: ""
100
- },
101
- /**
102
- * Determines maximum width for the popover before overflow.
103
- * Possible units rem|px|%|em
104
- */
105
- popoverMaxWidth: {
106
- type: String,
107
- default: ""
108
- },
109
- /**
110
- * Padding size class for the popover content.
111
- * @values none, small, medium, large
112
- */
113
- popoverPadding: {
114
- type: String,
115
- default: "large",
116
- validator: (e) => Object.keys(v).some((t) => t === e)
117
- },
118
- /**
119
- * The direction the popover displays relative to the anchor.
120
- * <a class="d-link" href="https://atomiks.github.io/tippyjs/v6/all-props/#placement" target="_blank">Tippy.js docs</a>
121
- * @values top, top-start, top-end, right, right-start, right-end, left, left-start, left-end, bottom, bottom-start, bottom-end, auto, auto-start, auto-end
122
- */
123
- popoverPlacement: {
124
- type: String,
125
- default: "bottom-start"
126
- },
127
- /**
128
- * The size of the button.
129
- * @values xs, sm, md, lg, xl
130
- */
131
- size: {
132
- type: String,
133
- default: "sm",
134
- validator: (e) => Object.keys(m).includes(e)
135
- }
136
- },
137
- emits: [
138
- /**
139
- * Emitted when clicking the clear button
140
- *
141
- * @event clear
142
- * @type {Boolean | Array}
143
- */
144
- "clear",
145
- /**
146
- * Emitted when popover is shown or hidden
147
- *
148
- * @event opened
149
- * @type {Boolean | Array}
150
- */
151
- "open",
152
- /**
153
- * Emitted when the active filters change
154
- * @type {Array}
155
- */
156
- "update:value"
157
- ],
158
- data() {
159
- return {
160
- isOpen: !1,
161
- i18n: new s(),
162
- filters: this.value
163
- };
164
- },
165
- computed: {
166
- buttonKind() {
167
- return this.isActive ? "default" : "muted";
168
- },
169
- clearButtonAriaLabel() {
170
- return this.omegaTooltipText || this.i18n.$t("DIALTONE_FILTER_PILL_CLEAR_BUTTON_LABEL");
171
- },
172
- clearButtonTitle() {
173
- if (!this.omegaTooltipText)
174
- return this.clearButtonAriaLabel;
175
- },
176
- activeFilters() {
177
- return this.filters.filter((e) => e.active).map((e) => e.name);
178
- },
179
- activeFilterList() {
180
- return this.activeFilters.length <= 2 ? this.activeFilters.join(", ") : this.activeFilters.slice(0, 2).join(", ") + ", + " + (this.activeFilters.length - 2);
181
- },
182
- isActive() {
183
- return this.activeFilterList.length > 0;
184
- },
185
- hasClear() {
186
- return !this.hideClear && this.activeFilterList.length > 0;
187
- }
188
- },
189
- watch: {
190
- isOpen(e) {
191
- this.$emit("open", e);
192
- },
193
- filters(e) {
194
- this.$emit("update:value", e);
195
- }
196
- },
197
- methods: {
198
- clearFilter(e) {
199
- this.filters = this.filters.map((t) => (delete t.active, t)), this.$emit("clear", e);
200
- },
201
- updateFilters(e, t) {
202
- this.filters = this.filters.map((i) => i.name !== e.name ? i : { ...i, active: t });
203
- }
204
- }
205
- };
206
- var b = function() {
207
- var t = this, i = t._self._c;
208
- return i("div", { staticClass: "d-filter-pill", attrs: { "data-qa": "dt-filter-pill" } }, [i("dt-popover", { attrs: { "append-to": t.popoverAppendTo, "fallback-placements": t.popoverFallbackPlacements, "max-height": t.popoverMaxHeight, "max-width": t.popoverMaxWidth, modal: !1, padding: t.popoverPadding, placement: t.popoverPlacement }, scopedSlots: t._u([{ key: "anchor", fn: function({ attrs: l }) {
209
- return [i("dt-button", t._b({ directives: [{ name: "dt-tooltip", rawName: "v-dt-tooltip", value: t.alphaTooltipText, expression: "alphaTooltipText" }], class: [
210
- "d-filter-pill__primary",
211
- {
212
- "d-filter-pill--selected": t.isActive,
213
- "d-filter-pill__primary--has-clear": t.hasClear
214
- }
215
- ], attrs: { active: t.isActive, disabled: t.disabled, kind: t.buttonKind, size: t.size, "data-qa": "dt-filter-pill__button", "icon-position": "right", importance: "outlined" }, on: { click: function(a) {
216
- t.isOpen = !0;
217
- } }, scopedSlots: t._u([{ key: "icon", fn: function({ iconSize: a }) {
218
- return [i("dt-icon-chevron-down", { staticClass: "d-filter-pill__icon", attrs: { size: a, "data-qa": "dt-filter-pill__icon" } })];
219
- } }], null, !0) }, "dt-button", l, !1), [i("span", { staticClass: "d-filter-pill__label" }, [t._t("default", function() {
220
- return [i("span", { staticClass: "d-filter-pill__label-alpha", domProps: { textContent: t._s(t.label) } }), t.activeFilterList ? i("span", { staticClass: "d-filter-pill__label-omega", domProps: { textContent: t._s(t.activeFilterList) } }) : t._e()];
221
- })], 2)])];
222
- } }, { key: "content", fn: function({ close: l }) {
223
- return [t._t("content", function() {
224
- return [t.value.length ? i("dt-checkbox-group", { attrs: { "selected-values": t.activeFilters, "aria-label": t.label, name: "contact-centers" } }, t._l(t.filters, function(a) {
225
- return i("dt-checkbox", { key: a.name, attrs: { label: a.name, value: a.name }, on: { input: (r) => t.updateFilters(a, r) } });
226
- }), 1) : t._e()];
227
- }, { close: l })];
228
- } }], null, !0), model: { value: t.isOpen, callback: function(l) {
229
- t.isOpen = l;
230
- }, expression: "isOpen" } }), t.hasClear ? i("dt-button", { directives: [{ name: "dt-tooltip", rawName: "v-dt-tooltip", value: t.omegaTooltipText, expression: "omegaTooltipText" }], class: [
231
- "d-filter-pill__clear",
232
- { "d-filter-pill__clear--selected": t.isActive }
233
- ], attrs: { active: t.isActive, "aria-label": t.clearButtonAriaLabel, disabled: t.disabled, kind: t.buttonKind, size: t.size, title: t.clearButtonTitle, "data-qa": "dt-filter-pill__clear-button", importance: "outlined" }, on: { click: t.clearFilter }, scopedSlots: t._u([{ key: "icon", fn: function({ iconSize: l }) {
234
- return [i("dt-icon-close", { attrs: { size: l } })];
235
- } }], null, !1, 2924703597) }) : t._e()], 1);
236
- }, g = [], T = /* @__PURE__ */ p(
237
- h,
238
- b,
239
- g
240
- );
241
- const O = T.exports;
242
- export {
243
- O as default
244
- };
245
- //# sourceMappingURL=filter-pill.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filter-pill.js","sources":["../../../components/filter_pill/filter_pill.vue"],"sourcesContent":["<template>\n <div\n class=\"d-filter-pill\"\n data-qa=\"dt-filter-pill\"\n >\n <dt-popover\n v-model=\"isOpen\"\n :append-to=\"popoverAppendTo\"\n :fallback-placements=\"popoverFallbackPlacements\"\n :max-height=\"popoverMaxHeight\"\n :max-width=\"popoverMaxWidth\"\n :modal=\"false\"\n :padding=\"popoverPadding\"\n :placement=\"popoverPlacement\"\n >\n <template #anchor=\"{ attrs }\">\n <dt-button\n v-dt-tooltip=\"alphaTooltipText\"\n v-bind=\"attrs\"\n :active=\"isActive\"\n :class=\"[\n 'd-filter-pill__primary',\n {\n 'd-filter-pill--selected': isActive,\n 'd-filter-pill__primary--has-clear': hasClear,\n },\n ]\"\n :disabled=\"disabled\"\n :kind=\"buttonKind\"\n :size=\"size\"\n data-qa=\"dt-filter-pill__button\"\n icon-position=\"right\"\n importance=\"outlined\"\n @click=\"isOpen = true\"\n >\n <span class=\"d-filter-pill__label\">\n <!-- @slot Allows you to override the label behavior -->\n <slot>\n <span\n class=\"d-filter-pill__label-alpha\"\n v-text=\"label\"\n />\n <span\n v-if=\"activeFilterList\"\n class=\"d-filter-pill__label-omega\"\n v-text=\"activeFilterList\"\n />\n </slot>\n </span>\n <template #icon=\"{ iconSize }\">\n <dt-icon-chevron-down\n :size=\"iconSize\"\n class=\"d-filter-pill__icon\"\n data-qa=\"dt-filter-pill__icon\"\n />\n </template>\n </dt-button>\n </template>\n <template #content=\"{ close }\">\n <!-- @slot Allows you to override the popover content, only use this if you need custom behavior -->\n <slot\n :close=\"close\"\n name=\"content\"\n >\n <dt-checkbox-group\n v-if=\"value.length\"\n :selected-values=\"activeFilters\"\n :aria-label=\"label\"\n name=\"contact-centers\"\n >\n <dt-checkbox\n v-for=\"filter in filters\"\n :key=\"filter.name\"\n :label=\"filter.name\"\n :value=\"filter.name\"\n @input=\"$event => updateFilters(filter, $event)\"\n />\n </dt-checkbox-group>\n </slot>\n </template>\n </dt-popover>\n <dt-button\n v-if=\"hasClear\"\n v-dt-tooltip=\"omegaTooltipText\"\n :active=\"isActive\"\n :aria-label=\"clearButtonAriaLabel\"\n :class=\"[\n 'd-filter-pill__clear',\n { 'd-filter-pill__clear--selected': isActive },\n ]\"\n :disabled=\"disabled\"\n :kind=\"buttonKind\"\n :size=\"size\"\n :title=\"clearButtonTitle\"\n data-qa=\"dt-filter-pill__clear-button\"\n importance=\"outlined\"\n @click=\"clearFilter\"\n >\n <template #icon=\"{ iconSize }\">\n <dt-icon-close :size=\"iconSize\" />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtPopover, POPOVER_APPEND_TO_VALUES, POPOVER_PADDING_CLASSES } from '@/components/popover';\nimport { BUTTON_SIZE_MODIFIERS, DtButton } from '@/components/button';\nimport { DtIconChevronDown, DtIconClose } from '@dialpad/dialtone-icons/vue2';\nimport { DialtoneLocalization } from '@/localization';\nimport { DtCheckbox } from '@/components/checkbox';\nimport { DtCheckboxGroup } from '@/components/checkbox_group';\n\nexport default {\n name: 'DtFilterPill',\n\n components: {\n DtCheckboxGroup,\n DtCheckbox,\n DtPopover,\n DtButton,\n DtIconClose,\n DtIconChevronDown,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Array of filters to display in the popover,\n * should be an array of objects with `name` and `active` properties\n */\n value: {\n type: Array,\n default: () => [],\n },\n\n /**\n * Text shown in tooltip when you hover the alpha button,\n * required if no content is passed to default slot\n */\n alphaTooltipText: {\n type: String,\n default: '',\n },\n\n /**\n * HTML disabled attribute\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Toggles the clear button visibility\n * @values true, false\n */\n hideClear: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Label of the button\n */\n label: {\n type: String,\n default: undefined,\n },\n\n /**\n * Text shown in tooltip when you hover the omega button,\n * required as it is an icon only button\n */\n omegaTooltipText: {\n type: String,\n default: '',\n },\n\n /**\n * Sets the element to which the\n * <a class=\"d-link\" href=\"https://dialtone.dialpad.com/components/popover.html#vue-api\" target=\"_blank\">popover component</a>\n * is going to append to\n * @values body, parent, root, HTMLElement\n */\n popoverAppendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * If the dropdown does not fit in the direction described by \"popoverPlacement\",\n * it will attempt to change it's direction to the \"popoverFallbackPlacements\".\n *\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n * */\n popoverFallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n popoverMaxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n popoverMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n popoverPadding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * <a class=\"d-link\" href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\" target=\"_blank\">Tippy.js docs</a>\n * @values top, top-start, top-end, right, right-start, right-end, left, left-start, left-end, bottom, bottom-start, bottom-end, auto, auto-start, auto-end\n */\n popoverPlacement: {\n type: String,\n default: 'bottom-start',\n },\n\n /**\n * The size of the button.\n * @values xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: 'sm',\n validator: (s) => Object.keys(BUTTON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n emits: [\n /**\n * Emitted when clicking the clear button\n *\n * @event clear\n * @type {Boolean | Array}\n */\n 'clear',\n\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'open',\n\n /**\n * Emitted when the active filters change\n * @type {Array}\n */\n 'update:value',\n ],\n\n data () {\n return {\n isOpen: false,\n i18n: new DialtoneLocalization(),\n filters: this.value,\n };\n },\n\n computed: {\n buttonKind () {\n return this.isActive ? 'default': 'muted';\n },\n\n clearButtonAriaLabel () {\n return this.omegaTooltipText || this.i18n.$t('DIALTONE_FILTER_PILL_CLEAR_BUTTON_LABEL');\n },\n\n clearButtonTitle () {\n if (this.omegaTooltipText) return;\n\n return this.clearButtonAriaLabel\n },\n\n activeFilters () {\n return this.filters.filter(filter => filter.active).map(filter => filter.name);\n },\n\n activeFilterList () {\n if (this.activeFilters.length <= 2) {\n return this.activeFilters.join(', ');\n }\n\n return this.activeFilters.slice(0, 2).join(', ') + ', + ' + (this.activeFilters.length - 2);\n },\n\n isActive () {\n return this.activeFilterList.length > 0;\n },\n\n hasClear () {\n return !this.hideClear && this.activeFilterList.length > 0;\n },\n },\n\n watch: {\n isOpen (isOpen) {\n this.$emit('open', isOpen);\n },\n\n filters (filters) {\n this.$emit('update:value', filters);\n },\n },\n\n methods: {\n clearFilter ($event) {\n this.filters = this.filters.map(filter => {\n delete filter.active\n return filter;\n });\n this.$emit('clear', $event)\n },\n\n updateFilters (filter, isActive) {\n this.filters = this.filters.map(f => {\n if (f.name !== filter.name) return f;\n\n return {...f, active: isActive};\n })\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtCheckboxGroup","DtCheckbox","DtPopover","DtButton","DtIconClose","DtIconChevronDown","appendTo","POPOVER_APPEND_TO_VALUES","padding","POPOVER_PADDING_CLASSES","item","s","BUTTON_SIZE_MODIFIERS","DialtoneLocalization","filter","isOpen","filters","$event","isActive","f"],"mappings":";;;;;;;;;AAiHA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAAC;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA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CAAAC,MACAA,EAAA,SAAAL,EAAA,OAAAK,IAEA,EAAA,GAAAA,GAAA,QAAAD,EAAA,CACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./filter-pill.cjs");exports.DtFilterPill=l.default;
2
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import { default as e } from "./filter-pill.js";
2
- export {
3
- e as DtFilterPill
4
- };
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mode-island.cjs"),d=require("./mode-island-constants.cjs");exports.DtModeIsland=e.default;exports.DT_MODE_ISLAND_TYPES=d.DT_MODE_ISLAND_TYPES;
2
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import { default as r } from "./mode-island.js";
2
- import { DT_MODE_ISLAND_TYPES as D } from "./mode-island-constants.js";
3
- export {
4
- D as DT_MODE_ISLAND_TYPES,
5
- r as DtModeIsland
6
- };
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={INVERTED:"inverted",LIGHT:"light",DARK:"dark"},t={DT_MODE_ISLAND_TYPES:e};exports.DT_MODE_ISLAND_TYPES=e;exports.default=t;
2
- //# sourceMappingURL=mode-island-constants.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mode-island-constants.cjs","sources":["../../../components/mode_island/mode_island_constants.js"],"sourcesContent":["export const DT_MODE_ISLAND_TYPES = {\n INVERTED: 'inverted',\n LIGHT: 'light',\n DARK: 'dark',\n};\n\nexport default {\n DT_MODE_ISLAND_TYPES,\n};"],"names":["DT_MODE_ISLAND_TYPES","mode_island_constants"],"mappings":"4GAAY,MAACA,EAAuB,CAClC,SAAU,WACV,MAAO,QACP,KAAM,MACR,EAEAC,EAAe,CACb,qBAAAD,CACF"}
@@ -1,12 +0,0 @@
1
- const t = {
2
- INVERTED: "inverted",
3
- LIGHT: "light",
4
- DARK: "dark"
5
- }, n = {
6
- DT_MODE_ISLAND_TYPES: t
7
- };
8
- export {
9
- t as DT_MODE_ISLAND_TYPES,
10
- n as default
11
- };
12
- //# sourceMappingURL=mode-island-constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mode-island-constants.js","sources":["../../../components/mode_island/mode_island_constants.js"],"sourcesContent":["export const DT_MODE_ISLAND_TYPES = {\n INVERTED: 'inverted',\n LIGHT: 'light',\n DARK: 'dark',\n};\n\nexport default {\n DT_MODE_ISLAND_TYPES,\n};"],"names":["DT_MODE_ISLAND_TYPES","mode_island_constants"],"mappings":"AAAY,MAACA,IAAuB;AAAA,EAClC,UAAU;AAAA,EACV,OAAO;AAAA,EACP,MAAM;AACR,GAEAC,IAAe;AAAA,EACb,sBAAAD;AACF;"}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./mode-island-constants.cjs"),a=require("./validators.cjs"),r=require("./utils.cjs"),i=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),l={name:"DtModeIsland",provide(){return{dtModeIslandMode:()=>this.computedMode}},inject:{parentModeIslandMode:{from:"dtModeIslandMode",default:null}},inheritAttrs:!1,props:{as:{type:String,default:"div"},mode:{type:String,default:s.DT_MODE_ISLAND_TYPES.INVERTED,validator:a.modeValidator}},data(){return{currentContrast:r.getRootContrast(),contrastObserver:null,modeObserver:null,elementRef:null,calculatedMode:null}},computed:{isInverted(){return this.mode===s.DT_MODE_ISLAND_TYPES.INVERTED},invertedAttribute(){return this.isInverted?"":null},computedMode(){return this.mode===s.DT_MODE_ISLAND_TYPES.LIGHT||this.mode===s.DT_MODE_ISLAND_TYPES.DARK?this.mode:this.mode===s.DT_MODE_ISLAND_TYPES.INVERTED&&this.calculatedMode?this.calculatedMode:this.calculateInvertedMode()}},beforeCreate(){if(this.$attrs&&this.$attrs["data-dt-brand"])throw new Error("[DtModeIsland] The data-dt-brand attribute is not allowed on mode islands. Brand should only be set at the root level.")},mounted(){this.elementRef=this.$el,this.setupContrastObserver(),this.isInverted&&(this.calculatedMode=this.calculateInvertedMode(),this.setupModeObserver()),this.currentContrast=r.getRootContrast()},beforeDestroy(){this.contrastObserver&&(this.contrastObserver.disconnect(),this.contrastObserver=null),this.modeObserver&&(this.modeObserver.disconnect(),this.modeObserver=null)},methods:{calculateInvertedMode(){if(this.parentModeIslandMode){const t=typeof this.parentModeIslandMode=="function"?this.parentModeIslandMode():this.parentModeIslandMode;return r.getOppositeMode(t)}if(this.elementRef){const t=r.findParentMode(this.elementRef);return r.getOppositeMode(t)}return r.getOppositeMode(r.getRootMode())},setupContrastObserver(){this.contrastObserver=new MutationObserver(t=>{for(const e of t)e.type==="attributes"&&e.attributeName==="data-dt-contrast"&&(this.currentContrast=r.getRootContrast())}),this.contrastObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-dt-contrast"]})},setupModeObserver(){var o;const t={attributes:!0,attributeFilter:["data-dt-mode"],subtree:!1};this.modeObserver=new MutationObserver(n=>{for(const d of n)d.type==="attributes"&&d.attributeName==="data-dt-mode"&&(this.calculatedMode=this.calculateInvertedMode())}),this.modeObserver.observe(document.documentElement,t);let e=(o=this.elementRef)==null?void 0:o.parentElement;for(;e;)e.hasAttribute("data-dt-mode")&&this.modeObserver.observe(e,t),e=e.parentElement}}};var u=function(){var e=this,o=e._self._c;return o(e.as,e._b({tag:"component",staticClass:"d-mode-island",attrs:{"data-dt-mode":e.computedMode,"data-mode-island-inverted":e.invertedAttribute,"data-dt-contrast":e.currentContrast}},"component",e.$attrs,!1),[e._t("default")],2)},c=[],m=i.n(l,u,c);const h=m.exports;exports.default=h;
2
- //# sourceMappingURL=mode-island.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mode-island.cjs","sources":["../../../components/mode_island/mode_island.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n class=\"d-mode-island\"\n v-bind=\"$attrs\"\n :data-dt-mode=\"computedMode\"\n :data-mode-island-inverted=\"invertedAttribute\"\n :data-dt-contrast=\"currentContrast\"\n >\n <!-- @slot Slot for main content -->\n <slot />\n </component>\n</template>\n\n<script>\nimport { DT_MODE_ISLAND_TYPES } from './mode_island_constants';\nimport { modeValidator } from './validators';\nimport {\n getOppositeMode,\n getRootMode,\n getRootContrast,\n findParentMode,\n} from './utils';\n\nexport default {\n name: 'DtModeIsland',\n\n provide () {\n return {\n dtModeIslandMode: () => this.computedMode,\n };\n },\n\n inject: {\n parentModeIslandMode: {\n from: 'dtModeIslandMode',\n default: null,\n },\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Set this prop to render the mode island as a specific HTML element.\n * @type {String}\n * @values div, section, nav, article, aside, header, footer, main\n */\n as: {\n type: String,\n default: 'div',\n },\n\n /**\n * The mode to apply to the island.\n * - 'inverted': Opposite of parent or root mode\n * - 'light': Always light mode\n * - 'dark': Always dark mode\n * @type {String}\n * @values inverted, light, dark\n */\n mode: {\n type: String,\n default: DT_MODE_ISLAND_TYPES.INVERTED,\n validator: modeValidator,\n },\n },\n\n data () {\n return {\n currentContrast: getRootContrast(),\n contrastObserver: null,\n modeObserver: null,\n elementRef: null,\n calculatedMode: null, // Store calculated mode as reactive data\n };\n },\n\n computed: {\n isInverted () {\n return this.mode === DT_MODE_ISLAND_TYPES.INVERTED;\n },\n\n invertedAttribute () {\n return this.isInverted ? '' : null;\n },\n\n computedMode () {\n // If mode is explicitly light or dark, use it directly\n if (this.mode === DT_MODE_ISLAND_TYPES.LIGHT || this.mode === DT_MODE_ISLAND_TYPES.DARK) {\n return this.mode;\n }\n\n // If mode is inverted, use the calculated mode if available\n if (this.mode === DT_MODE_ISLAND_TYPES.INVERTED && this.calculatedMode) {\n return this.calculatedMode;\n }\n\n // Otherwise calculate it now\n return this.calculateInvertedMode();\n },\n },\n\n beforeCreate () {\n // Throw error if data-dt-brand is manually set\n if (this.$attrs && this.$attrs['data-dt-brand']) {\n throw new Error('[DtModeIsland] The data-dt-brand attribute is not allowed on mode islands. Brand should only be set at the root level.');\n }\n },\n\n mounted () {\n // Store element reference\n this.elementRef = this.$el;\n\n // Setup MutationObserver to watch for contrast changes on root\n this.setupContrastObserver();\n\n // Setup MutationObserver to watch for mode changes (only if inverted)\n if (this.isInverted) {\n // Initialize the calculated mode\n this.calculatedMode = this.calculateInvertedMode();\n this.setupModeObserver();\n }\n\n // Initial contrast value\n this.currentContrast = getRootContrast();\n },\n\n beforeDestroy () {\n // Cleanup observers\n if (this.contrastObserver) {\n this.contrastObserver.disconnect();\n this.contrastObserver = null;\n }\n if (this.modeObserver) {\n this.modeObserver.disconnect();\n this.modeObserver = null;\n }\n },\n\n methods: {\n calculateInvertedMode () {\n // First check if there's a parent mode island\n if (this.parentModeIslandMode) {\n const parentMode = typeof this.parentModeIslandMode === 'function'\n ? this.parentModeIslandMode()\n : this.parentModeIslandMode;\n return getOppositeMode(parentMode);\n }\n\n // Otherwise, find the nearest parent with data-dt-mode\n if (this.elementRef) {\n const parentMode = findParentMode(this.elementRef);\n return getOppositeMode(parentMode);\n }\n\n // Default fallback\n return getOppositeMode(getRootMode());\n },\n\n setupContrastObserver () {\n this.contrastObserver = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'attributes' && mutation.attributeName === 'data-dt-contrast') {\n this.currentContrast = getRootContrast();\n }\n }\n });\n\n this.contrastObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['data-dt-contrast'],\n });\n },\n\n setupModeObserver () {\n const config = {\n attributes: true,\n attributeFilter: ['data-dt-mode'],\n subtree: false,\n };\n\n this.modeObserver = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'attributes' && mutation.attributeName === 'data-dt-mode') {\n // Recalculate and update the reactive data property\n this.calculatedMode = this.calculateInvertedMode();\n }\n }\n });\n\n // Observe root element\n this.modeObserver.observe(document.documentElement, config);\n\n // Also observe all parent elements with data-dt-mode\n let parent = this.elementRef?.parentElement;\n while (parent) {\n if (parent.hasAttribute('data-dt-mode')) {\n this.modeObserver.observe(parent, config);\n }\n parent = parent.parentElement;\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DT_MODE_ISLAND_TYPES","modeValidator","getRootContrast","parentMode","getOppositeMode","findParentMode","getRootMode","mutationsList","mutation","config","parent","_a"],"mappings":"0QAwBAA,EAAA,CACA,KAAA,eAEA,SAAA,CACA,MAAA,CACA,iBAAA,IAAA,KAAA,YACA,CACA,EAEA,OAAA,CACA,qBAAA,CACA,KAAA,mBACA,QAAA,IACA,CACA,EAEA,aAAA,GAEA,MAAA,CAMA,GAAA,CACA,KAAA,OACA,QAAA,KACA,EAUA,KAAA,CACA,KAAA,OACA,QAAAC,EAAAA,qBAAA,SACA,UAAAC,EAAAA,aACA,CACA,EAEA,MAAA,CACA,MAAA,CACA,gBAAAC,EAAAA,gBAAA,EACA,iBAAA,KACA,aAAA,KACA,WAAA,KACA,eAAA,IACA,CACA,EAEA,SAAA,CACA,YAAA,CACA,OAAA,KAAA,OAAAF,EAAAA,qBAAA,QACA,EAEA,mBAAA,CACA,OAAA,KAAA,WAAA,GAAA,IACA,EAEA,cAAA,CAEA,OAAA,KAAA,OAAAA,uBAAA,OAAA,KAAA,OAAAA,EAAAA,qBAAA,KAC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GA,KAAA,aAAA,QAAA,SAAA,gBAAAC,CAAA,EAGA,IAAAC,GAAAC,EAAA,KAAA,aAAA,YAAAA,EAAA,cACA,KAAAD,GACAA,EAAA,aAAA,cAAA,GACA,KAAA,aAAA,QAAAA,EAAAD,CAAA,EAEAC,EAAAA,EAAA,aAEA,CACA,CACA"}
@@ -1,124 +0,0 @@
1
- import { DT_MODE_ISLAND_TYPES as r } from "./mode-island-constants.js";
2
- import { modeValidator as i } from "./validators.js";
3
- import { getRootContrast as s, getOppositeMode as d, findParentMode as l, getRootMode as u } from "./utils.js";
4
- import { n as c } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
5
- const m = {
6
- name: "DtModeIsland",
7
- provide() {
8
- return {
9
- dtModeIslandMode: () => this.computedMode
10
- };
11
- },
12
- inject: {
13
- parentModeIslandMode: {
14
- from: "dtModeIslandMode",
15
- default: null
16
- }
17
- },
18
- inheritAttrs: !1,
19
- props: {
20
- /**
21
- * Set this prop to render the mode island as a specific HTML element.
22
- * @type {String}
23
- * @values div, section, nav, article, aside, header, footer, main
24
- */
25
- as: {
26
- type: String,
27
- default: "div"
28
- },
29
- /**
30
- * The mode to apply to the island.
31
- * - 'inverted': Opposite of parent or root mode
32
- * - 'light': Always light mode
33
- * - 'dark': Always dark mode
34
- * @type {String}
35
- * @values inverted, light, dark
36
- */
37
- mode: {
38
- type: String,
39
- default: r.INVERTED,
40
- validator: i
41
- }
42
- },
43
- data() {
44
- return {
45
- currentContrast: s(),
46
- contrastObserver: null,
47
- modeObserver: null,
48
- elementRef: null,
49
- calculatedMode: null
50
- // Store calculated mode as reactive data
51
- };
52
- },
53
- computed: {
54
- isInverted() {
55
- return this.mode === r.INVERTED;
56
- },
57
- invertedAttribute() {
58
- return this.isInverted ? "" : null;
59
- },
60
- computedMode() {
61
- return this.mode === r.LIGHT || this.mode === r.DARK ? this.mode : this.mode === r.INVERTED && this.calculatedMode ? this.calculatedMode : this.calculateInvertedMode();
62
- }
63
- },
64
- beforeCreate() {
65
- if (this.$attrs && this.$attrs["data-dt-brand"])
66
- throw new Error("[DtModeIsland] The data-dt-brand attribute is not allowed on mode islands. Brand should only be set at the root level.");
67
- },
68
- mounted() {
69
- this.elementRef = this.$el, this.setupContrastObserver(), this.isInverted && (this.calculatedMode = this.calculateInvertedMode(), this.setupModeObserver()), this.currentContrast = s();
70
- },
71
- beforeDestroy() {
72
- this.contrastObserver && (this.contrastObserver.disconnect(), this.contrastObserver = null), this.modeObserver && (this.modeObserver.disconnect(), this.modeObserver = null);
73
- },
74
- methods: {
75
- calculateInvertedMode() {
76
- if (this.parentModeIslandMode) {
77
- const e = typeof this.parentModeIslandMode == "function" ? this.parentModeIslandMode() : this.parentModeIslandMode;
78
- return d(e);
79
- }
80
- if (this.elementRef) {
81
- const e = l(this.elementRef);
82
- return d(e);
83
- }
84
- return d(u());
85
- },
86
- setupContrastObserver() {
87
- this.contrastObserver = new MutationObserver((e) => {
88
- for (const t of e)
89
- t.type === "attributes" && t.attributeName === "data-dt-contrast" && (this.currentContrast = s());
90
- }), this.contrastObserver.observe(document.documentElement, {
91
- attributes: !0,
92
- attributeFilter: ["data-dt-contrast"]
93
- });
94
- },
95
- setupModeObserver() {
96
- var o;
97
- const e = {
98
- attributes: !0,
99
- attributeFilter: ["data-dt-mode"],
100
- subtree: !1
101
- };
102
- this.modeObserver = new MutationObserver((a) => {
103
- for (const n of a)
104
- n.type === "attributes" && n.attributeName === "data-dt-mode" && (this.calculatedMode = this.calculateInvertedMode());
105
- }), this.modeObserver.observe(document.documentElement, e);
106
- let t = (o = this.elementRef) == null ? void 0 : o.parentElement;
107
- for (; t; )
108
- t.hasAttribute("data-dt-mode") && this.modeObserver.observe(t, e), t = t.parentElement;
109
- }
110
- }
111
- };
112
- var h = function() {
113
- var t = this, o = t._self._c;
114
- return o(t.as, t._b({ tag: "component", staticClass: "d-mode-island", attrs: { "data-dt-mode": t.computedMode, "data-mode-island-inverted": t.invertedAttribute, "data-dt-contrast": t.currentContrast } }, "component", t.$attrs, !1), [t._t("default")], 2);
115
- }, f = [], b = /* @__PURE__ */ c(
116
- m,
117
- h,
118
- f
119
- );
120
- const O = b.exports;
121
- export {
122
- O as default
123
- };
124
- //# sourceMappingURL=mode-island.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mode-island.js","sources":["../../../components/mode_island/mode_island.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n class=\"d-mode-island\"\n v-bind=\"$attrs\"\n :data-dt-mode=\"computedMode\"\n :data-mode-island-inverted=\"invertedAttribute\"\n :data-dt-contrast=\"currentContrast\"\n >\n <!-- @slot Slot for main content -->\n <slot />\n </component>\n</template>\n\n<script>\nimport { DT_MODE_ISLAND_TYPES } from './mode_island_constants';\nimport { modeValidator } from './validators';\nimport {\n getOppositeMode,\n getRootMode,\n getRootContrast,\n findParentMode,\n} from './utils';\n\nexport default {\n name: 'DtModeIsland',\n\n provide () {\n return {\n dtModeIslandMode: () => this.computedMode,\n };\n },\n\n inject: {\n parentModeIslandMode: {\n from: 'dtModeIslandMode',\n default: null,\n },\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Set this prop to render the mode island as a specific HTML element.\n * @type {String}\n * @values div, section, nav, article, aside, header, footer, main\n */\n as: {\n type: String,\n default: 'div',\n },\n\n /**\n * The mode to apply to the island.\n * - 'inverted': Opposite of parent or root mode\n * - 'light': Always light mode\n * - 'dark': Always dark mode\n * @type {String}\n * @values inverted, light, dark\n */\n mode: {\n type: String,\n default: DT_MODE_ISLAND_TYPES.INVERTED,\n validator: modeValidator,\n },\n },\n\n data () {\n return {\n currentContrast: getRootContrast(),\n contrastObserver: null,\n modeObserver: null,\n elementRef: null,\n calculatedMode: null, // Store calculated mode as reactive data\n };\n },\n\n computed: {\n isInverted () {\n return this.mode === DT_MODE_ISLAND_TYPES.INVERTED;\n },\n\n invertedAttribute () {\n return this.isInverted ? '' : null;\n },\n\n computedMode () {\n // If mode is explicitly light or dark, use it directly\n if (this.mode === DT_MODE_ISLAND_TYPES.LIGHT || this.mode === DT_MODE_ISLAND_TYPES.DARK) {\n return this.mode;\n }\n\n // If mode is inverted, use the calculated mode if available\n if (this.mode === DT_MODE_ISLAND_TYPES.INVERTED && this.calculatedMode) {\n return this.calculatedMode;\n }\n\n // Otherwise calculate it now\n return this.calculateInvertedMode();\n },\n },\n\n beforeCreate () {\n // Throw error if data-dt-brand is manually set\n if (this.$attrs && this.$attrs['data-dt-brand']) {\n throw new Error('[DtModeIsland] The data-dt-brand attribute is not allowed on mode islands. Brand should only be set at the root level.');\n }\n },\n\n mounted () {\n // Store element reference\n this.elementRef = this.$el;\n\n // Setup MutationObserver to watch for contrast changes on root\n this.setupContrastObserver();\n\n // Setup MutationObserver to watch for mode changes (only if inverted)\n if (this.isInverted) {\n // Initialize the calculated mode\n this.calculatedMode = this.calculateInvertedMode();\n this.setupModeObserver();\n }\n\n // Initial contrast value\n this.currentContrast = getRootContrast();\n },\n\n beforeDestroy () {\n // Cleanup observers\n if (this.contrastObserver) {\n this.contrastObserver.disconnect();\n this.contrastObserver = null;\n }\n if (this.modeObserver) {\n this.modeObserver.disconnect();\n this.modeObserver = null;\n }\n },\n\n methods: {\n calculateInvertedMode () {\n // First check if there's a parent mode island\n if (this.parentModeIslandMode) {\n const parentMode = typeof this.parentModeIslandMode === 'function'\n ? this.parentModeIslandMode()\n : this.parentModeIslandMode;\n return getOppositeMode(parentMode);\n }\n\n // Otherwise, find the nearest parent with data-dt-mode\n if (this.elementRef) {\n const parentMode = findParentMode(this.elementRef);\n return getOppositeMode(parentMode);\n }\n\n // Default fallback\n return getOppositeMode(getRootMode());\n },\n\n setupContrastObserver () {\n this.contrastObserver = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'attributes' && mutation.attributeName === 'data-dt-contrast') {\n this.currentContrast = getRootContrast();\n }\n }\n });\n\n this.contrastObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['data-dt-contrast'],\n });\n },\n\n setupModeObserver () {\n const config = {\n attributes: true,\n attributeFilter: ['data-dt-mode'],\n subtree: false,\n };\n\n this.modeObserver = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'attributes' && mutation.attributeName === 'data-dt-mode') {\n // Recalculate and update the reactive data property\n this.calculatedMode = this.calculateInvertedMode();\n }\n }\n });\n\n // Observe root element\n this.modeObserver.observe(document.documentElement, config);\n\n // Also observe all parent elements with data-dt-mode\n let parent = this.elementRef?.parentElement;\n while (parent) {\n if (parent.hasAttribute('data-dt-mode')) {\n this.modeObserver.observe(parent, config);\n }\n parent = parent.parentElement;\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DT_MODE_ISLAND_TYPES","modeValidator","getRootContrast","parentMode","getOppositeMode","findParentMode","getRootMode","mutationsList","mutation","config","parent","_a"],"mappings":";;;;AAwBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,UAAA;AACA,WAAA;AAAA,MACA,kBAAA,MAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA;AAAA,IACA,sBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAAC,EAAA;AAAA,MACA,WAAAC;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,iBAAAC,EAAA;AAAA,MACA,kBAAA;AAAA,MACA,cAAA;AAAA,MACA,YAAA;AAAA,MACA,gBAAA;AAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,aAAA;AACA,aAAA,KAAA,SAAAF,EAAA;AAAA,IACA;AAAA,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IAEA,oBAAA;;AACA,YAAAO,IAAA;AAAA,QACA,YAAA;AAAA,QACA,iBAAA,CAAA,cAAA;AAAA,QACA,SAAA;AAAA,MACA;AAEA,WAAA,eAAA,IAAA,iBAAA,CAAAF,MAAA;AACA,mBAAAC,KAAAD;AACA,UAAAC,EAAA,SAAA,gBAAAA,EAAA,kBAAA,mBAEA,KAAA,iBAAA,KAAA,sBAAA;AAAA,MAGA,CAAA,GAGA,KAAA,aAAA,QAAA,SAAA,iBAAAC,CAAA;AAGA,UAAAC,KAAAC,IAAA,KAAA,eAAA,gBAAAA,EAAA;AACA,aAAAD;AACA,QAAAA,EAAA,aAAA,cAAA,KACA,KAAA,aAAA,QAAAA,GAAAD,CAAA,GAEAC,IAAAA,EAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;"}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function n(t){return t==="light"?"dark":"light"}function o(){return document.documentElement.getAttribute("data-dt-mode")||"light"}function r(){return document.documentElement.getAttribute("data-dt-contrast")||"default"}function d(t){let e=t==null?void 0:t.parentElement;for(;e&&e!==document.documentElement;){if(e.hasAttribute("data-dt-mode"))return e.getAttribute("data-dt-mode");e=e.parentElement}return o()}const u={getOppositeMode:n,getRootMode:o,getRootContrast:r,findParentMode:d};exports.default=u;exports.findParentMode=d;exports.getOppositeMode=n;exports.getRootContrast=r;exports.getRootMode=o;
2
- //# sourceMappingURL=utils.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.cjs","sources":["../../../components/mode_island/utils.js"],"sourcesContent":["/**\n * Get the opposite mode (light <-> dark)\n * @param {string} currentMode - The current mode\n * @returns {string} The opposite mode\n */\nexport function getOppositeMode (currentMode) {\n return currentMode === 'light' ? 'dark' : 'light';\n}\n\n/**\n * Get the mode from the root HTML element\n * @returns {string} The root mode or 'light' as default\n */\nexport function getRootMode () {\n const rootMode = document.documentElement.getAttribute('data-dt-mode');\n return rootMode || 'light';\n}\n\n/**\n * Get the contrast from the root HTML element\n * @returns {string} The root contrast or 'default' as default\n */\nexport function getRootContrast () {\n const rootContrast = document.documentElement.getAttribute('data-dt-contrast');\n return rootContrast || 'default';\n}\n\n/**\n * Find the mode from the nearest parent element with data-dt-mode attribute\n * @param {HTMLElement} el - The starting element\n * @returns {string} The parent mode or root mode\n */\nexport function findParentMode (el) {\n let parent = el?.parentElement;\n while (parent && parent !== document.documentElement) {\n if (parent.hasAttribute('data-dt-mode')) {\n return parent.getAttribute('data-dt-mode');\n }\n parent = parent.parentElement;\n }\n return getRootMode();\n}\n\nexport default {\n getOppositeMode,\n getRootMode,\n getRootContrast,\n findParentMode,\n};"],"names":["getOppositeMode","currentMode","getRootMode","getRootContrast","findParentMode","el","parent","utils"],"mappings":"4GAKO,SAASA,EAAiBC,EAAa,CAC5C,OAAOA,IAAgB,QAAU,OAAS,OAC5C,CAMO,SAASC,GAAe,CAE7B,OADiB,SAAS,gBAAgB,aAAa,cAAc,GAClD,OACrB,CAMO,SAASC,GAAmB,CAEjC,OADqB,SAAS,gBAAgB,aAAa,kBAAkB,GACtD,SACzB,CAOO,SAASC,EAAgBC,EAAI,CAClC,IAAIC,EAASD,GAAA,YAAAA,EAAI,cACjB,KAAOC,GAAUA,IAAW,SAAS,iBAAiB,CACpD,GAAIA,EAAO,aAAa,cAAc,EACpC,OAAOA,EAAO,aAAa,cAAc,EAE3CA,EAASA,EAAO,aAClB,CACA,OAAOJ,EAAW,CACpB,CAEA,MAAAK,EAAe,CACb,gBAAAP,EACA,YAAAE,EACA,gBAAAC,EACA,eAAAC,CACF"}
@@ -1,32 +0,0 @@
1
- function n(t) {
2
- return t === "light" ? "dark" : "light";
3
- }
4
- function o() {
5
- return document.documentElement.getAttribute("data-dt-mode") || "light";
6
- }
7
- function r() {
8
- return document.documentElement.getAttribute("data-dt-contrast") || "default";
9
- }
10
- function d(t) {
11
- let e = t == null ? void 0 : t.parentElement;
12
- for (; e && e !== document.documentElement; ) {
13
- if (e.hasAttribute("data-dt-mode"))
14
- return e.getAttribute("data-dt-mode");
15
- e = e.parentElement;
16
- }
17
- return o();
18
- }
19
- const u = {
20
- getOppositeMode: n,
21
- getRootMode: o,
22
- getRootContrast: r,
23
- findParentMode: d
24
- };
25
- export {
26
- u as default,
27
- d as findParentMode,
28
- n as getOppositeMode,
29
- r as getRootContrast,
30
- o as getRootMode
31
- };
32
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sources":["../../../components/mode_island/utils.js"],"sourcesContent":["/**\n * Get the opposite mode (light <-> dark)\n * @param {string} currentMode - The current mode\n * @returns {string} The opposite mode\n */\nexport function getOppositeMode (currentMode) {\n return currentMode === 'light' ? 'dark' : 'light';\n}\n\n/**\n * Get the mode from the root HTML element\n * @returns {string} The root mode or 'light' as default\n */\nexport function getRootMode () {\n const rootMode = document.documentElement.getAttribute('data-dt-mode');\n return rootMode || 'light';\n}\n\n/**\n * Get the contrast from the root HTML element\n * @returns {string} The root contrast or 'default' as default\n */\nexport function getRootContrast () {\n const rootContrast = document.documentElement.getAttribute('data-dt-contrast');\n return rootContrast || 'default';\n}\n\n/**\n * Find the mode from the nearest parent element with data-dt-mode attribute\n * @param {HTMLElement} el - The starting element\n * @returns {string} The parent mode or root mode\n */\nexport function findParentMode (el) {\n let parent = el?.parentElement;\n while (parent && parent !== document.documentElement) {\n if (parent.hasAttribute('data-dt-mode')) {\n return parent.getAttribute('data-dt-mode');\n }\n parent = parent.parentElement;\n }\n return getRootMode();\n}\n\nexport default {\n getOppositeMode,\n getRootMode,\n getRootContrast,\n findParentMode,\n};"],"names":["getOppositeMode","currentMode","getRootMode","getRootContrast","findParentMode","el","parent","utils"],"mappings":"AAKO,SAASA,EAAiBC,GAAa;AAC5C,SAAOA,MAAgB,UAAU,SAAS;AAC5C;AAMO,SAASC,IAAe;AAE7B,SADiB,SAAS,gBAAgB,aAAa,cAAc,KAClD;AACrB;AAMO,SAASC,IAAmB;AAEjC,SADqB,SAAS,gBAAgB,aAAa,kBAAkB,KACtD;AACzB;AAOO,SAASC,EAAgBC,GAAI;AAClC,MAAIC,IAASD,KAAA,gBAAAA,EAAI;AACjB,SAAOC,KAAUA,MAAW,SAAS,mBAAiB;AACpD,QAAIA,EAAO,aAAa,cAAc;AACpC,aAAOA,EAAO,aAAa,cAAc;AAE3C,IAAAA,IAASA,EAAO;AAAA,EAClB;AACA,SAAOJ,EAAW;AACpB;AAEA,MAAAK,IAAe;AAAA,EACb,iBAAAP;AAAA,EACA,aAAAE;AAAA,EACA,iBAAAC;AAAA,EACA,gBAAAC;AACF;"}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./mode-island-constants.cjs");function e(t){return Object.values(o.DT_MODE_ISLAND_TYPES).includes(t)}const a={modeValidator:e};exports.default=a;exports.modeValidator=e;
2
- //# sourceMappingURL=validators.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validators.cjs","sources":["../../../components/mode_island/validators.js"],"sourcesContent":["import { DT_MODE_ISLAND_TYPES } from './mode_island_constants';\n\nexport function modeValidator (mode) {\n return Object.values(DT_MODE_ISLAND_TYPES).includes(mode);\n}\n\nexport default {\n modeValidator,\n};"],"names":["modeValidator","mode","DT_MODE_ISLAND_TYPES","validators"],"mappings":"2JAEO,SAASA,EAAeC,EAAM,CACnC,OAAO,OAAO,OAAOC,EAAAA,oBAAoB,EAAE,SAASD,CAAI,CAC1D,CAEA,MAAAE,EAAe,CACb,cAAAH,CACF"}
@@ -1,12 +0,0 @@
1
- import { DT_MODE_ISLAND_TYPES as o } from "./mode-island-constants.js";
2
- function a(t) {
3
- return Object.values(o).includes(t);
4
- }
5
- const r = {
6
- modeValidator: a
7
- };
8
- export {
9
- r as default,
10
- a as modeValidator
11
- };
12
- //# sourceMappingURL=validators.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validators.js","sources":["../../../components/mode_island/validators.js"],"sourcesContent":["import { DT_MODE_ISLAND_TYPES } from './mode_island_constants';\n\nexport function modeValidator (mode) {\n return Object.values(DT_MODE_ISLAND_TYPES).includes(mode);\n}\n\nexport default {\n modeValidator,\n};"],"names":["modeValidator","mode","DT_MODE_ISLAND_TYPES","validators"],"mappings":";AAEO,SAASA,EAAeC,GAAM;AACnC,SAAO,OAAO,OAAOC,CAAoB,EAAE,SAASD,CAAI;AAC1D;AAEA,MAAAE,IAAe;AAAA,EACb,eAAAH;AACF;"}