@oscarpalmer/oui 0.37.0 → 0.39.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.
- package/dist/css/a11y.css +1 -0
- package/dist/css/badge.css +12 -8
- package/dist/css/button.css +111 -14
- package/dist/css/color-picker.css +859 -0
- package/dist/css/color.css +86 -87
- package/dist/css/combobox.css +105 -4
- package/dist/css/content.css +8 -6
- package/dist/css/floatable.css +3 -3
- package/dist/css/form.css +106 -6
- package/dist/css/icon.css +99 -0
- package/dist/css/listbox.css +5 -0
- package/dist/css/message.css +6 -3
- package/dist/css/mixins/badge.mixins.css +2 -0
- package/dist/css/mixins/button.mixins.css +3 -0
- package/dist/css/mixins/message.mixins.css +1 -0
- package/dist/css/mixins/misc.mixins.css +2 -0
- package/dist/css/mixins/shadow.mixins.css +1 -0
- package/dist/css/reset.css +3 -3
- package/dist/css/splitter.css +1 -1
- package/dist/css/tabs.css +115 -23
- package/dist/css/typography.css +90 -0
- package/dist/js/color-picker/constants.color-picker.d.mts +2 -0
- package/dist/js/color-picker/constants.color-picker.mjs +59 -0
- package/dist/js/color-picker/dom.color-picker.d.mts +8 -0
- package/dist/js/color-picker/dom.color-picker.mjs +191 -0
- package/dist/js/color-picker/event.color-picker.d.mts +9 -0
- package/dist/js/color-picker/event.color-picker.mjs +2 -0
- package/dist/js/color-picker/form.color-picker.d.mts +5 -0
- package/dist/js/color-picker/form.color-picker.mjs +24 -0
- package/dist/js/color-picker/index.d.mts +2 -0
- package/dist/js/color-picker/index.mjs +303 -0
- package/dist/js/color-picker/misc.color-picker.d.mts +2 -0
- package/dist/js/color-picker/misc.color-picker.mjs +2 -0
- package/dist/js/color-picker/models.color-picker.d.mts +2 -0
- package/dist/js/color-picker/models.color-picker.mjs +24 -0
- package/dist/js/color-picker/output.color-picker.d.mts +8 -0
- package/dist/js/color-picker/output.color-picker.mjs +233 -0
- package/dist/js/color-picker/state.color-picker.d.mts +8 -0
- package/dist/js/color-picker/state.color-picker.mjs +2 -0
- package/dist/js/combobox/constants.combobox.d.mts +1 -1
- package/dist/js/combobox/dom.combobox.d.mts +12 -13
- package/dist/js/combobox/dom.combobox.mjs +12 -5
- package/dist/js/combobox/event.combobox.d.mts +20 -21
- package/dist/js/combobox/event.combobox.mjs +1 -1
- package/dist/js/combobox/index.d.mts +1 -1
- package/dist/js/combobox/index.mjs +56 -2
- package/dist/js/combobox/misc.combobox.d.mts +1 -1
- package/dist/js/combobox/misc.combobox.mjs +1 -1
- package/dist/js/combobox/models.combobox.d.mts +12 -13
- package/dist/js/combobox/state.combobox.d.mts +8 -9
- package/dist/js/combobox/state.combobox.mjs +1 -1
- package/dist/js/constants.color-picker-B-gFjL8m.d.mts +364 -0
- package/dist/js/constants.combobox-8EMRmv09.d.mts +18 -0
- package/dist/js/constants.listbox-DGnX32kv.d.mts +8 -0
- package/dist/js/dialog.d.mts +2 -2
- package/dist/js/dialog.mjs +1 -1
- package/dist/js/{draggable-a6w0J1OD.d.mts → draggable-B5-70SZm.d.mts} +5 -4
- package/dist/js/event.color-picker-BEpq0Adu.mjs +485 -0
- package/dist/js/floatable/floatable.embedded.d.mts +1 -1
- package/dist/js/floatable/floatable.embedded.mjs +11 -8
- package/dist/js/floatable/floatable.standalone.d.mts +1 -1
- package/dist/js/{floatable.embedded-Bct4U5Dm.d.mts → floatable.embedded-DQYkXt8X.d.mts} +1 -1
- package/dist/js/focus-trap/focus-trap.embedded.d.mts +1 -1
- package/dist/js/focus-trap/focus-trap.standalone.d.mts +1 -1
- package/dist/js/{focus-trap.embedded-DR8NpZfr.d.mts → focus-trap.embedded-CjyFQYow.d.mts} +2 -2
- package/dist/js/{index-EfkUSals.d.mts → index-C5D3-oiI.d.mts} +41 -3
- package/dist/js/index.d.mts +8 -7
- package/dist/js/index.mjs +6 -3
- package/dist/js/internal/attributable.d.mts +2 -3
- package/dist/js/internal/draggable.d.mts +1 -1
- package/dist/js/internal/draggable.mjs +1 -1
- package/dist/js/internal/listbox/listbox.constants.d.mts +7 -10
- package/dist/js/internal/listbox/listbox.constants.mjs +15 -16
- package/dist/js/internal/listbox/listbox.data.d.mts +9 -10
- package/dist/js/internal/listbox/listbox.data.mjs +1 -1
- package/dist/js/internal/listbox/listbox.dom.d.mts +19 -20
- package/dist/js/internal/listbox/listbox.dom.mjs +1 -1
- package/dist/js/internal/listbox/listbox.event.d.mts +3 -4
- package/dist/js/internal/listbox/listbox.event.mjs +4 -4
- package/dist/js/internal/listbox/listbox.form.d.mts +4 -5
- package/dist/js/internal/listbox/listbox.form.mjs +16 -15
- package/dist/js/internal/listbox/listbox.misc.d.mts +10 -11
- package/dist/js/internal/listbox/listbox.misc.mjs +1 -1
- package/dist/js/internal/listbox/listbox.model.d.mts +1 -1
- package/dist/js/internal/listbox/listbox.state.d.mts +5 -6
- package/dist/js/internal/listbox/listbox.state.mjs +3 -3
- package/dist/js/internal/misc.d.mts +4 -4
- package/dist/js/internal/misc.mjs +9 -1
- package/dist/js/internal/navigable.d.mts +9 -10
- package/dist/js/internal/navigable.mjs +1 -0
- package/dist/js/listbox/constants.listbox.d.mts +1 -1
- package/dist/js/listbox/event.listbox.d.mts +6 -7
- package/dist/js/listbox/event.listbox.mjs +1 -1
- package/dist/js/listbox/index.d.mts +43 -5
- package/dist/js/listbox/index.mjs +56 -2
- package/dist/js/listbox/misc.listbox.d.mts +1 -1
- package/dist/js/listbox/misc.listbox.mjs +1 -1
- package/dist/js/listbox/state.listbox.d.mts +7 -8
- package/dist/js/listbox/state.listbox.mjs +1 -1
- package/dist/js/{listbox.data-BWd0PCy7.mjs → listbox.data-DQ7-x2uY.mjs} +8 -7
- package/dist/js/{listbox.model-CRReGOmu.d.mts → listbox.model-BHPA7GM4.d.mts} +3 -3
- package/dist/js/menu.mjs +1 -1
- package/dist/js/{misc.listbox-BI-XsTOf.mjs → misc.listbox-DKB-j0UK.mjs} +4 -5
- package/dist/js/{misc.listbox-gnoJhrTr.d.mts → misc.listbox-mZMuYOxg.d.mts} +1 -1
- package/dist/js/movable/movable.embedded.d.mts +1 -1
- package/dist/js/movable/movable.standalone.d.mts +1 -1
- package/dist/js/popover.d.mts +2 -2
- package/dist/js/popover.mjs +1 -1
- package/dist/js/resizable/resizable.embedded.d.mts +1 -1
- package/dist/js/resizable/resizable.embedded.mjs +1 -1
- package/dist/js/resizable/resizable.standalone.d.mts +1 -1
- package/dist/js/{resizable.embedded-3qoR0Bjm.d.mts → resizable.embedded-dvhdfQgt.d.mts} +1 -1
- package/dist/js/sortable/sortable.embedded.d.mts +1 -1
- package/dist/js/sortable/sortable.standalone.d.mts +1 -1
- package/dist/js/splitter.d.mts +2 -3
- package/dist/js/splitter.mjs +2 -2
- package/dist/js/{state.combobox-4xq0FPCF.mjs → state.combobox-BWDFHwoi.mjs} +9 -9
- package/dist/js/tabs.d.mts +4 -5
- package/dist/js/tabs.mjs +4 -7
- package/dist/js/tooltip.d.mts +1 -1
- package/package.json +24 -22
- package/dist/js/constants.combobox-DmRAMC64.d.mts +0 -26
- package/dist/js/constants.listbox-DRsXUxd3.d.mts +0 -14
- package/src/css/a11y.scss +0 -13
- package/src/css/badge.scss +0 -62
- package/src/css/button.scss +0 -50
- package/src/css/color.scss +0 -115
- package/src/css/combobox.scss +0 -252
- package/src/css/content.scss +0 -180
- package/src/css/flex.scss +0 -107
- package/src/css/floatable.scss +0 -152
- package/src/css/form.scss +0 -573
- package/src/css/listbox.scss +0 -120
- package/src/css/message.scss +0 -73
- package/src/css/mixins.scss +0 -419
- package/src/css/reset.scss +0 -392
- package/src/css/splitter.scss +0 -89
- package/src/css/table.scss +0 -107
- package/src/css/tabs.scss +0 -85
- package/src/js/combobox/constants.combobox.ts +0 -83
- package/src/js/combobox/dom.combobox.ts +0 -407
- package/src/js/combobox/event.combobox.ts +0 -365
- package/src/js/combobox/index.ts +0 -320
- package/src/js/combobox/misc.combobox.ts +0 -104
- package/src/js/combobox/models.combobox.ts +0 -54
- package/src/js/combobox/state.combobox.ts +0 -246
- package/src/js/dialog.ts +0 -255
- package/src/js/floatable/floatable.embedded.ts +0 -332
- package/src/js/floatable/floatable.standalone.ts +0 -6
- package/src/js/focus-trap/focus-trap.embedded.ts +0 -411
- package/src/js/focus-trap/focus-trap.standalone.ts +0 -1
- package/src/js/index.ts +0 -15
- package/src/js/internal/attributable.ts +0 -73
- package/src/js/internal/draggable.ts +0 -657
- package/src/js/internal/listbox/listbox.constants.ts +0 -25
- package/src/js/internal/listbox/listbox.data.ts +0 -287
- package/src/js/internal/listbox/listbox.dom.ts +0 -445
- package/src/js/internal/listbox/listbox.event.ts +0 -129
- package/src/js/internal/listbox/listbox.form.ts +0 -115
- package/src/js/internal/listbox/listbox.misc.ts +0 -135
- package/src/js/internal/listbox/listbox.model.ts +0 -169
- package/src/js/internal/listbox/listbox.state.ts +0 -82
- package/src/js/internal/misc.ts +0 -27
- package/src/js/internal/navigable.ts +0 -315
- package/src/js/l10n.ts +0 -192
- package/src/js/listbox/constants.listbox.ts +0 -61
- package/src/js/listbox/event.listbox.ts +0 -106
- package/src/js/listbox/index.ts +0 -302
- package/src/js/listbox/misc.listbox.ts +0 -70
- package/src/js/listbox/state.listbox.ts +0 -196
- package/src/js/menu.ts +0 -348
- package/src/js/movable/movable.embedded.ts +0 -318
- package/src/js/movable/movable.standalone.ts +0 -2
- package/src/js/popover.ts +0 -229
- package/src/js/resizable/resizable.embedded.ts +0 -413
- package/src/js/resizable/resizable.standalone.ts +0 -5
- package/src/js/sortable/sortable.embedded.ts +0 -527
- package/src/js/sortable/sortable.standalone.ts +0 -2
- package/src/js/splitter.ts +0 -583
- package/src/js/tabs.ts +0 -447
- package/src/js/toolbar.ts +0 -63
- package/src/js/tooltip.ts +0 -367
- /package/dist/css/{mixins.css → mixins/input.mixins.css} +0 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { getLocalization, localize } from "../l10n.mjs";
|
|
2
|
+
import { COLOR_PICKER_ATTRIBUTE_OUTPUT_INPUT, COLOR_PICKER_TAGNAME, colorPickerLocalizations } from "./constants.color-picker.mjs";
|
|
3
|
+
import { setAria } from "@oscarpalmer/toretto/aria";
|
|
4
|
+
import { round } from "@oscarpalmer/atoms/math";
|
|
5
|
+
import { createElement } from "@oscarpalmer/toretto/create";
|
|
6
|
+
//#region src/js/color-picker/output.color-picker.ts
|
|
7
|
+
function createColorPickerOutput(parameters, copy) {
|
|
8
|
+
if (parameters.output === "none") return;
|
|
9
|
+
const container = createElement("div", { attribute: { [`${COLOR_PICKER_TAGNAME}-output`]: "" } });
|
|
10
|
+
let inputs;
|
|
11
|
+
let item;
|
|
12
|
+
let items;
|
|
13
|
+
let itemsContainer;
|
|
14
|
+
let toggle;
|
|
15
|
+
let toggleContainer;
|
|
16
|
+
if (parameters.output === "all") {
|
|
17
|
+
[toggleContainer, toggle] = createOutputFormat(parameters, copy?.button);
|
|
18
|
+
[itemsContainer, items, inputs] = createOutputItems(parameters, copy?.button);
|
|
19
|
+
container.append(toggleContainer, itemsContainer);
|
|
20
|
+
} else {
|
|
21
|
+
[item, inputs] = createOutputItem(parameters.output, parameters, copy?.button, true, false);
|
|
22
|
+
items = [item];
|
|
23
|
+
container.append(item);
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
container,
|
|
27
|
+
copy,
|
|
28
|
+
inputs,
|
|
29
|
+
items,
|
|
30
|
+
toggle
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function createOutputFormat(parameters, copy) {
|
|
34
|
+
const container = createElement("div", { attribute: { [`${COLOR_PICKER_TAGNAME}-output-format`]: "" } });
|
|
35
|
+
const toggle = createElement("div", { attribute: { [`${COLOR_PICKER_TAGNAME}-output-toggle`]: "" } });
|
|
36
|
+
const id = `${parameters.id}_output_format`;
|
|
37
|
+
const label = createElement("label", {
|
|
38
|
+
attribute: {
|
|
39
|
+
[`${COLOR_PICKER_TAGNAME}-output-label`]: "",
|
|
40
|
+
[`${COLOR_PICKER_TAGNAME}-output-format-label`]: ""
|
|
41
|
+
},
|
|
42
|
+
property: {
|
|
43
|
+
htmlFor: id,
|
|
44
|
+
textContent: colorPickerLocalizations.defaults.output
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const select = createElement("select", {
|
|
48
|
+
attribute: {
|
|
49
|
+
[`${COLOR_PICKER_TAGNAME}-output-format-value`]: "",
|
|
50
|
+
form: ""
|
|
51
|
+
},
|
|
52
|
+
property: { id }
|
|
53
|
+
});
|
|
54
|
+
select.append(...colors.map((color) => createElement("option", { property: {
|
|
55
|
+
textContent: colorPickerLocalizations.defaults[color],
|
|
56
|
+
value: color
|
|
57
|
+
} })));
|
|
58
|
+
toggle.append(label, select);
|
|
59
|
+
container.append(toggle);
|
|
60
|
+
if (copy != null) container.append(copy);
|
|
61
|
+
return [container, select];
|
|
62
|
+
}
|
|
63
|
+
function createOutputInput(color, property, value, parameters) {
|
|
64
|
+
const item = createElement("div", {});
|
|
65
|
+
const id = `${parameters.id}_output_${color}_${property}`;
|
|
66
|
+
const label = createElement("label", {
|
|
67
|
+
attribute: {
|
|
68
|
+
[`${COLOR_PICKER_TAGNAME}-output-label`]: "",
|
|
69
|
+
[`${COLOR_PICKER_ATTRIBUTE_OUTPUT_INPUT}-label`]: ""
|
|
70
|
+
},
|
|
71
|
+
data: { label: property },
|
|
72
|
+
property: {
|
|
73
|
+
htmlFor: id,
|
|
74
|
+
textContent: colorPickerLocalizations.defaults[property]
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
const input = createElement("input", {
|
|
78
|
+
attribute: {
|
|
79
|
+
[COLOR_PICKER_ATTRIBUTE_OUTPUT_INPUT]: "",
|
|
80
|
+
[`${COLOR_PICKER_TAGNAME}-output-${property}`]: "",
|
|
81
|
+
autocomplete: "off",
|
|
82
|
+
autocorrect: "off",
|
|
83
|
+
form: "",
|
|
84
|
+
inputmode: "text",
|
|
85
|
+
spellcheck: "false"
|
|
86
|
+
},
|
|
87
|
+
data: {
|
|
88
|
+
color,
|
|
89
|
+
property
|
|
90
|
+
},
|
|
91
|
+
property: {
|
|
92
|
+
id,
|
|
93
|
+
max: max[property],
|
|
94
|
+
min: "0",
|
|
95
|
+
type: "number",
|
|
96
|
+
valueAsNumber: value[property]
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
item.append(label, input);
|
|
100
|
+
return [item, input];
|
|
101
|
+
}
|
|
102
|
+
function createOutputItem(color, parameters, copy, single, hidden) {
|
|
103
|
+
const item = createElement("div", {
|
|
104
|
+
aria: { label: colorPickerLocalizations.defaults[color] },
|
|
105
|
+
data: { label: color },
|
|
106
|
+
attribute: {
|
|
107
|
+
[`${COLOR_PICKER_TAGNAME}-output-item`]: "",
|
|
108
|
+
[`${COLOR_PICKER_TAGNAME}-output-${color}`]: ""
|
|
109
|
+
},
|
|
110
|
+
property: { hidden }
|
|
111
|
+
});
|
|
112
|
+
const value = parameters.color[color];
|
|
113
|
+
const inputs = [];
|
|
114
|
+
for (const property of properties[color]) {
|
|
115
|
+
const [container, input] = createOutputInput(color, property, value, parameters);
|
|
116
|
+
inputs.push(input);
|
|
117
|
+
item.append(container);
|
|
118
|
+
}
|
|
119
|
+
if (single && copy != null) item.append(copy);
|
|
120
|
+
return [item, inputs];
|
|
121
|
+
}
|
|
122
|
+
function createOutputItems(parameters, copy) {
|
|
123
|
+
const container = createElement("div", {});
|
|
124
|
+
const inputs = [];
|
|
125
|
+
const items = [];
|
|
126
|
+
for (let index = 0; index < colors.length; index += 1) {
|
|
127
|
+
const color = colors[index];
|
|
128
|
+
const [item, itemInputs] = createOutputItem(color, parameters, copy, false, index > 0);
|
|
129
|
+
inputs.push(...itemInputs);
|
|
130
|
+
items.push(item);
|
|
131
|
+
}
|
|
132
|
+
container.append(...items);
|
|
133
|
+
return [
|
|
134
|
+
container,
|
|
135
|
+
items,
|
|
136
|
+
inputs
|
|
137
|
+
];
|
|
138
|
+
}
|
|
139
|
+
function getColorPickerOutputFormat(state) {
|
|
140
|
+
if (state.output === "none") return;
|
|
141
|
+
let color;
|
|
142
|
+
if (state.output === "all") color = state.content.output?.toggle?.value;
|
|
143
|
+
else color = state.output;
|
|
144
|
+
return color;
|
|
145
|
+
}
|
|
146
|
+
function updateColorPickerOutputCopyLabel(state, button) {
|
|
147
|
+
const { host, localizations } = state;
|
|
148
|
+
const prefix = localize(getLocalization(localizations.global, host, "copy", localizations.component), {}, []);
|
|
149
|
+
const color = getColorPickerOutputFormat(state);
|
|
150
|
+
let content;
|
|
151
|
+
if (color == null) content = prefix;
|
|
152
|
+
else content = `${prefix} ${localize(getLocalization(localizations.global, host, color, localizations.component), {}, [])}`;
|
|
153
|
+
setAria(button, "label", content);
|
|
154
|
+
button.textContent = prefix;
|
|
155
|
+
}
|
|
156
|
+
function updateColorPickerOutputInputs(state) {
|
|
157
|
+
const { content } = state;
|
|
158
|
+
if (content.output?.inputs == null) return;
|
|
159
|
+
const inputs = content.output.inputs;
|
|
160
|
+
const { length } = inputs;
|
|
161
|
+
for (let index = 0; index < length; index += 1) {
|
|
162
|
+
const input = inputs[index];
|
|
163
|
+
const color = input.dataset.color;
|
|
164
|
+
const property = input.dataset.property;
|
|
165
|
+
if (color != null && property != null) input.valueAsNumber = color in state.color.value && property in state.color.value[color] ? round(state.color.value[color][property]) : 0;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function updateColorPickerOutputLabels(state) {
|
|
169
|
+
const { content, host, localizations } = state;
|
|
170
|
+
if (content.output == null) return;
|
|
171
|
+
if (content.output.copy?.button != null) updateColorPickerOutputCopyLabel(state, content.output.copy.button);
|
|
172
|
+
for (let labelsIndex = 0; labelsIndex < labelsLength; labelsIndex += 1) {
|
|
173
|
+
const label = labels[labelsIndex];
|
|
174
|
+
const elements = [...content.element.querySelectorAll(`[data-label="${label}"]`)];
|
|
175
|
+
const elementsLength = elements.length;
|
|
176
|
+
if (elementsLength === 0) return;
|
|
177
|
+
const textContent = localize(getLocalization(localizations.global, host, label, localizations.component), {}, []);
|
|
178
|
+
for (let elementsIndex = 0; elementsIndex < elementsLength; elementsIndex += 1) {
|
|
179
|
+
const element = elements[elementsIndex];
|
|
180
|
+
if (element instanceof HTMLLabelElement) element.textContent = textContent;
|
|
181
|
+
else setAria(element, "label", textContent);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const colors = [
|
|
186
|
+
"hsl",
|
|
187
|
+
"hwb",
|
|
188
|
+
"rgb"
|
|
189
|
+
];
|
|
190
|
+
const labels = [
|
|
191
|
+
"blackness",
|
|
192
|
+
"blue",
|
|
193
|
+
"green",
|
|
194
|
+
"hsl",
|
|
195
|
+
"hue",
|
|
196
|
+
"hwb",
|
|
197
|
+
"lightness",
|
|
198
|
+
"output",
|
|
199
|
+
"red",
|
|
200
|
+
"rgb",
|
|
201
|
+
"saturation",
|
|
202
|
+
"whiteness"
|
|
203
|
+
];
|
|
204
|
+
const labelsLength = labels.length;
|
|
205
|
+
const max = {
|
|
206
|
+
blackness: "100",
|
|
207
|
+
blue: "255",
|
|
208
|
+
green: "255",
|
|
209
|
+
hue: "360",
|
|
210
|
+
lightness: "100",
|
|
211
|
+
red: "255",
|
|
212
|
+
saturation: "100",
|
|
213
|
+
whiteness: "100"
|
|
214
|
+
};
|
|
215
|
+
const properties = {
|
|
216
|
+
hsl: [
|
|
217
|
+
"hue",
|
|
218
|
+
"saturation",
|
|
219
|
+
"lightness"
|
|
220
|
+
],
|
|
221
|
+
hwb: [
|
|
222
|
+
"hue",
|
|
223
|
+
"whiteness",
|
|
224
|
+
"blackness"
|
|
225
|
+
],
|
|
226
|
+
rgb: [
|
|
227
|
+
"red",
|
|
228
|
+
"green",
|
|
229
|
+
"blue"
|
|
230
|
+
]
|
|
231
|
+
};
|
|
232
|
+
//#endregion
|
|
233
|
+
export { createColorPickerOutput, getColorPickerOutputFormat, updateColorPickerOutputCopyLabel, updateColorPickerOutputInputs, updateColorPickerOutputLabels };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { B as OuiColorPickerElement, L as OuiColorPickerState } from "../constants.color-picker-B-gFjL8m.mjs";
|
|
2
|
+
//#region src/js/color-picker/state.color-picker.d.ts
|
|
3
|
+
export declare function attachColorPicker(state: OuiColorPickerState): void;
|
|
4
|
+
export declare function detachColorPicker(state: OuiColorPickerState): void;
|
|
5
|
+
export declare function initializeColorPicker(element: OuiColorPickerElement, internals: ElementInternals): OuiColorPickerState;
|
|
6
|
+
export declare const colorPickerMap: WeakMap<OuiColorPickerElement, OuiColorPickerState>;
|
|
7
|
+
export declare const colorPickerSet: Set<OuiColorPickerState>;
|
|
8
|
+
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as COMBOBOX_AUTOCOMPLETES, c as COMBOBOX_TAGNAME, d as selectorAnchor, f as selectorContent, i as COMBOBOX_ATTRIBUTE_SELECTION_ITEM, l as messageLabel, m as selectorSelectionItem, n as COMBOBOX_ATTRIBUTE_ANCHOR, o as COMBOBOX_MESSAGES, p as selectorOption, r as COMBOBOX_ATTRIBUTE_SELECTION, s as COMBOBOX_SELECTORS, t as COMBOBOX_ATTRIBUTES, u as messageSelect } from "../constants.combobox-
|
|
1
|
+
import { a as COMBOBOX_AUTOCOMPLETES, c as COMBOBOX_TAGNAME, d as selectorAnchor, f as selectorContent, i as COMBOBOX_ATTRIBUTE_SELECTION_ITEM, l as messageLabel, m as selectorSelectionItem, n as COMBOBOX_ATTRIBUTE_ANCHOR, o as COMBOBOX_MESSAGES, p as selectorOption, r as COMBOBOX_ATTRIBUTE_SELECTION, s as COMBOBOX_SELECTORS, t as COMBOBOX_ATTRIBUTES, u as messageSelect } from "../constants.combobox-8EMRmv09.mjs";
|
|
2
2
|
export { COMBOBOX_ATTRIBUTES, COMBOBOX_ATTRIBUTE_ANCHOR, COMBOBOX_ATTRIBUTE_SELECTION, COMBOBOX_ATTRIBUTE_SELECTION_ITEM, COMBOBOX_AUTOCOMPLETES, COMBOBOX_MESSAGES, COMBOBOX_SELECTORS, COMBOBOX_TAGNAME, messageLabel, messageSelect, selectorAnchor, selectorContent, selectorOption, selectorSelectionItem };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as OuiListboxPreview } from "../listbox.model-
|
|
1
|
+
import { c as OuiListboxPreview } from "../listbox.model-BHPA7GM4.mjs";
|
|
2
2
|
import { CreateListboxContent, CreateListboxContentParameters } from "../internal/listbox/listbox.dom.mjs";
|
|
3
3
|
import { OuiComboboxSelection, OuiComboboxSelectionItem, OuiComboboxState } from "./models.combobox.mjs";
|
|
4
4
|
//#region src/js/combobox/dom.combobox.d.ts
|
|
@@ -13,15 +13,14 @@ type CreateSelectionItemsParameters = {
|
|
|
13
13
|
options: HTMLElement[];
|
|
14
14
|
state?: OuiComboboxState;
|
|
15
15
|
};
|
|
16
|
-
declare function createComboboxAnchor(parameters: CreateListboxContentParameters): CreateAnchor;
|
|
17
|
-
declare function createComboboxButton(parameters: CreateListboxContentParameters): CreateAnchor;
|
|
18
|
-
declare function createComboboxContent(parameters: CreateListboxContentParameters): CreateListboxContent;
|
|
19
|
-
declare function createComboboxSelection(id: string, select: HTMLSelectElement): OuiComboboxSelection;
|
|
20
|
-
declare function createComboboxSelectionItem(option: HTMLElement, state?: OuiComboboxState): OuiComboboxSelectionItem;
|
|
21
|
-
declare function createComboboxSelectionItems(parameters: CreateSelectionItemsParameters): void;
|
|
22
|
-
declare function updateComboboxTabindices(state: OuiComboboxState, active?: HTMLElement): void;
|
|
23
|
-
declare function updateComboboxAutocomplete(preview: OuiListboxPreview, state: OuiComboboxState, active?: HTMLElement): void;
|
|
24
|
-
declare function updateComboboxSelection(state: OuiComboboxState, active: HTMLElement | undefined, added: boolean, selected?: HTMLElement[]): void;
|
|
25
|
-
declare function updateComboboxSelectionItems(state: OuiComboboxState): void;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { createComboboxAnchor, createComboboxButton, createComboboxContent, createComboboxSelection, createComboboxSelectionItem, createComboboxSelectionItems, updateComboboxAutocomplete, updateComboboxSelection, updateComboboxSelectionItems, updateComboboxTabindices };
|
|
16
|
+
export declare function createComboboxAnchor(parameters: CreateListboxContentParameters): CreateAnchor;
|
|
17
|
+
export declare function createComboboxButton(parameters: CreateListboxContentParameters): CreateAnchor;
|
|
18
|
+
export declare function createComboboxContent(parameters: CreateListboxContentParameters): CreateListboxContent;
|
|
19
|
+
export declare function createComboboxSelection(id: string, select: HTMLSelectElement): OuiComboboxSelection;
|
|
20
|
+
export declare function createComboboxSelectionItem(option: HTMLElement, state?: OuiComboboxState): OuiComboboxSelectionItem;
|
|
21
|
+
export declare function createComboboxSelectionItems(parameters: CreateSelectionItemsParameters): void;
|
|
22
|
+
export declare function updateComboboxTabindices(state: OuiComboboxState, active?: HTMLElement): void;
|
|
23
|
+
export declare function updateComboboxAutocomplete(preview: OuiListboxPreview, state: OuiComboboxState, active?: HTMLElement): void;
|
|
24
|
+
export declare function updateComboboxSelection(state: OuiComboboxState, active: HTMLElement | undefined, added: boolean, selected?: HTMLElement[]): void;
|
|
25
|
+
export declare function updateComboboxSelectionItems(state: OuiComboboxState): void;
|
|
26
|
+
//#endregion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getLocalization, localize } from "../l10n.mjs";
|
|
2
|
-
import { _ as createListboxValueLabel, f as createListboxInput, l as createListboxFilter, m as createListboxMessage, p as createListboxList } from "../listbox.data-
|
|
2
|
+
import { _ as createListboxValueLabel, f as createListboxInput, l as createListboxFilter, m as createListboxMessage, p as createListboxList } from "../listbox.data-DQ7-x2uY.mjs";
|
|
3
3
|
import { COMBOBOX_ATTRIBUTE_ANCHOR, COMBOBOX_ATTRIBUTE_SELECTION, COMBOBOX_ATTRIBUTE_SELECTION_ITEM } from "./constants.combobox.mjs";
|
|
4
4
|
import { setAria } from "@oscarpalmer/toretto/aria";
|
|
5
5
|
import { setAttribute } from "@oscarpalmer/toretto/attribute";
|
|
6
|
-
import { getData } from "@oscarpalmer/toretto/data";
|
|
7
6
|
import { createElement } from "@oscarpalmer/toretto/create";
|
|
7
|
+
import { getData } from "@oscarpalmer/toretto/data";
|
|
8
8
|
//#region src/js/combobox/dom.combobox.ts
|
|
9
9
|
function createComboboxAnchor(parameters) {
|
|
10
10
|
const { select } = parameters;
|
|
@@ -29,7 +29,10 @@ function createComboboxButton(parameters) {
|
|
|
29
29
|
haspopup: "listbox",
|
|
30
30
|
labelledby: `${label.id} ${id}_value`
|
|
31
31
|
},
|
|
32
|
-
property: {
|
|
32
|
+
property: {
|
|
33
|
+
textContent: multiple ? "" : select.selectedOptions[0]?.textContent ?? "",
|
|
34
|
+
type: "button"
|
|
35
|
+
}
|
|
33
36
|
});
|
|
34
37
|
if (!multiple) return { element };
|
|
35
38
|
const container = createElement("div");
|
|
@@ -101,11 +104,15 @@ function createComboboxSelectionItem(option, state) {
|
|
|
101
104
|
[COMBOBOX_ATTRIBUTE_SELECTION_ITEM]: "",
|
|
102
105
|
tabindex: -1
|
|
103
106
|
},
|
|
104
|
-
data: { option: option.id }
|
|
107
|
+
data: { option: option.id },
|
|
108
|
+
property: { type: "button" }
|
|
105
109
|
});
|
|
106
110
|
const icon = createElement("span", {
|
|
107
111
|
aria: { hidden: true },
|
|
108
|
-
property: {
|
|
112
|
+
property: {
|
|
113
|
+
className: "oui-icon oui-icon--x",
|
|
114
|
+
innerHTML: ""
|
|
115
|
+
}
|
|
109
116
|
});
|
|
110
117
|
const label = createElement("span", { property: { textContent: option.textContent } });
|
|
111
118
|
button.append(icon, label);
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { c as OuiListboxPreview } from "../listbox.model-
|
|
1
|
+
import { c as OuiListboxPreview } from "../listbox.model-BHPA7GM4.mjs";
|
|
2
2
|
import { OuiComboboxState } from "./models.combobox.mjs";
|
|
3
3
|
//#region src/js/combobox/event.combobox.d.ts
|
|
4
|
-
declare function onComboboxActivation(state: OuiComboboxState): void;
|
|
5
|
-
declare function onComboboxApply(state: OuiComboboxState, option: HTMLElement | undefined, _: string[], added: boolean, selected?: HTMLElement[]): void;
|
|
6
|
-
declare function onComboboxClickContent(event: PointerEvent, state: OuiComboboxState): void;
|
|
7
|
-
declare function onComboboxEnter(state: OuiComboboxState): void;
|
|
8
|
-
declare function onComboboxEscape(state: OuiComboboxState): void;
|
|
9
|
-
declare function onComboboxFilter(preview: OuiListboxPreview, state: OuiComboboxState, update: boolean, active?: HTMLElement, emit?: boolean): void;
|
|
10
|
-
declare function onComboboxFocusout(event: FocusEvent): void;
|
|
11
|
-
declare function onComboboxInput(event: InputEvent): void;
|
|
12
|
-
declare function onComboboxKeydown(event: KeyboardEvent): void;
|
|
13
|
-
declare function onComboboxKeydownSelection(event: KeyboardEvent, state: OuiComboboxState, item: HTMLElement): void;
|
|
14
|
-
declare function onComboboxPreview(preview: OuiListboxPreview, state: OuiComboboxState, active?: HTMLElement): void;
|
|
15
|
-
declare function onComboboxRemoveSelection(state: OuiComboboxState, item: HTMLElement): void;
|
|
16
|
-
declare function onComboboxNavigation(preview: OuiListboxPreview, state: OuiComboboxState, active?: HTMLElement): void;
|
|
17
|
-
declare function onComboboxSelection(state: OuiComboboxState, hasSelection?: boolean): void;
|
|
18
|
-
declare function onComboboxTab(state: OuiComboboxState): void;
|
|
19
|
-
declare function onComboboxToggle(state: OuiComboboxState): void;
|
|
20
|
-
declare function preventComboboxActivation(state: OuiComboboxState): boolean;
|
|
21
|
-
declare function skipComboboxNavigation(state: OuiComboboxState): boolean;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { onComboboxActivation, onComboboxApply, onComboboxClickContent, onComboboxEnter, onComboboxEscape, onComboboxFilter, onComboboxFocusout, onComboboxInput, onComboboxKeydown, onComboboxKeydownSelection, onComboboxNavigation, onComboboxPreview, onComboboxRemoveSelection, onComboboxSelection, onComboboxTab, onComboboxToggle, preventComboboxActivation, skipComboboxNavigation };
|
|
4
|
+
export declare function onComboboxActivation(state: OuiComboboxState): void;
|
|
5
|
+
export declare function onComboboxApply(state: OuiComboboxState, option: HTMLElement | undefined, _: string[], added: boolean, selected?: HTMLElement[]): void;
|
|
6
|
+
export declare function onComboboxClickContent(event: PointerEvent, state: OuiComboboxState): void;
|
|
7
|
+
export declare function onComboboxEnter(state: OuiComboboxState): void;
|
|
8
|
+
export declare function onComboboxEscape(state: OuiComboboxState): void;
|
|
9
|
+
export declare function onComboboxFilter(preview: OuiListboxPreview, state: OuiComboboxState, update: boolean, active?: HTMLElement, emit?: boolean): void;
|
|
10
|
+
export declare function onComboboxFocusout(event: FocusEvent): void;
|
|
11
|
+
export declare function onComboboxInput(event: InputEvent): void;
|
|
12
|
+
export declare function onComboboxKeydown(event: KeyboardEvent): void;
|
|
13
|
+
export declare function onComboboxKeydownSelection(event: KeyboardEvent, state: OuiComboboxState, item: HTMLElement): void;
|
|
14
|
+
export declare function onComboboxPreview(preview: OuiListboxPreview, state: OuiComboboxState, active?: HTMLElement): void;
|
|
15
|
+
export declare function onComboboxRemoveSelection(state: OuiComboboxState, item: HTMLElement): void;
|
|
16
|
+
export declare function onComboboxNavigation(preview: OuiListboxPreview, state: OuiComboboxState, active?: HTMLElement): void;
|
|
17
|
+
export declare function onComboboxSelection(state: OuiComboboxState, hasSelection?: boolean): void;
|
|
18
|
+
export declare function onComboboxTab(state: OuiComboboxState): void;
|
|
19
|
+
export declare function onComboboxToggle(state: OuiComboboxState): void;
|
|
20
|
+
export declare function preventComboboxActivation(state: OuiComboboxState): boolean;
|
|
21
|
+
export declare function skipComboboxNavigation(state: OuiComboboxState): boolean;
|
|
22
|
+
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as skipComboboxNavigation, S as preventComboboxActivation, _ as onComboboxPreview, b as onComboboxTab, c as onComboboxClickContent, d as onComboboxFilter, f as onComboboxFocusout, g as onComboboxNavigation, h as onComboboxKeydownSelection, l as onComboboxEnter, m as onComboboxKeydown, o as onComboboxActivation, p as onComboboxInput, s as onComboboxApply, u as onComboboxEscape, v as onComboboxRemoveSelection, x as onComboboxToggle, y as onComboboxSelection } from "../state.combobox-
|
|
1
|
+
import { C as skipComboboxNavigation, S as preventComboboxActivation, _ as onComboboxPreview, b as onComboboxTab, c as onComboboxClickContent, d as onComboboxFilter, f as onComboboxFocusout, g as onComboboxNavigation, h as onComboboxKeydownSelection, l as onComboboxEnter, m as onComboboxKeydown, o as onComboboxActivation, p as onComboboxInput, s as onComboboxApply, u as onComboboxEscape, v as onComboboxRemoveSelection, x as onComboboxToggle, y as onComboboxSelection } from "../state.combobox-BWDFHwoi.mjs";
|
|
2
2
|
export { onComboboxActivation, onComboboxApply, onComboboxClickContent, onComboboxEnter, onComboboxEscape, onComboboxFilter, onComboboxFocusout, onComboboxInput, onComboboxKeydown, onComboboxKeydownSelection, onComboboxNavigation, onComboboxPreview, onComboboxRemoveSelection, onComboboxSelection, onComboboxTab, onComboboxToggle, preventComboboxActivation, skipComboboxNavigation };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as setComboboxLocalizations, t as OuiComboboxElement } from "../index-
|
|
1
|
+
import { a as setComboboxLocalizations, t as OuiComboboxElement } from "../index-C5D3-oiI.mjs";
|
|
2
2
|
export { OuiComboboxElement, setComboboxLocalizations };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { updateLocalizations } from "../l10n.mjs";
|
|
2
|
-
import { C as setListboxDisabled, D as setListboxReadonly, O as setListboxRequired, T as setListboxLimit, a as setListboxValue, o as setListboxValues, w as setListboxFilter } from "../listbox.data-
|
|
2
|
+
import { C as setListboxDisabled, D as setListboxReadonly, O as setListboxRequired, T as setListboxLimit, a as setListboxValue, o as setListboxValues, w as setListboxFilter } from "../listbox.data-DQ7-x2uY.mjs";
|
|
3
3
|
import { attachListbox, detachListbox } from "../internal/listbox/listbox.state.mjs";
|
|
4
4
|
import { COMBOBOX_TAGNAME } from "./constants.combobox.mjs";
|
|
5
|
-
import { D as setComboboxLocalizations, a as onDetachCombobox, i as onAttachCombobox, n as comboboxStates, r as createComboboxState } from "../state.combobox-
|
|
5
|
+
import { D as setComboboxLocalizations, a as onDetachCombobox, i as onAttachCombobox, n as comboboxStates, r as createComboboxState } from "../state.combobox-BWDFHwoi.mjs";
|
|
6
6
|
import { getAttribute } from "@oscarpalmer/toretto/attribute";
|
|
7
7
|
import { parse } from "@oscarpalmer/atoms/string";
|
|
8
8
|
//#region src/js/combobox/index.ts
|
|
@@ -42,6 +42,18 @@ var OuiComboboxElement = class extends HTMLElement {
|
|
|
42
42
|
setListboxFilter(this.#state, value);
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
+
* Form element associated with the combobox
|
|
46
|
+
*/
|
|
47
|
+
get form() {
|
|
48
|
+
return this.#internals.form;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Label elements associated with the combobox
|
|
52
|
+
*/
|
|
53
|
+
get labels() {
|
|
54
|
+
return this.#internals.labels;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
45
57
|
* Maximum number of selected options
|
|
46
58
|
*/
|
|
47
59
|
get max() {
|
|
@@ -114,6 +126,18 @@ var OuiComboboxElement = class extends HTMLElement {
|
|
|
114
126
|
return this.#state.type;
|
|
115
127
|
}
|
|
116
128
|
/**
|
|
129
|
+
* Validation message for the combobox
|
|
130
|
+
*/
|
|
131
|
+
get validationMessage() {
|
|
132
|
+
return this.#internals.validationMessage;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Validity state for the combobox
|
|
136
|
+
*/
|
|
137
|
+
get validity() {
|
|
138
|
+
return this.#internals.validity;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
117
141
|
* Current value
|
|
118
142
|
*/
|
|
119
143
|
get value() {
|
|
@@ -137,6 +161,12 @@ var OuiComboboxElement = class extends HTMLElement {
|
|
|
137
161
|
set values(values) {
|
|
138
162
|
setListboxValues(this.#state, values);
|
|
139
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* Can the combobox be validated?
|
|
166
|
+
*/
|
|
167
|
+
get willValidate() {
|
|
168
|
+
return this.#internals.willValidate;
|
|
169
|
+
}
|
|
140
170
|
constructor() {
|
|
141
171
|
super();
|
|
142
172
|
this.#internals = this.attachInternals();
|
|
@@ -155,6 +185,14 @@ var OuiComboboxElement = class extends HTMLElement {
|
|
|
155
185
|
}
|
|
156
186
|
}
|
|
157
187
|
/**
|
|
188
|
+
* Check if the combobox is valid
|
|
189
|
+
*
|
|
190
|
+
* @returns `true` if the combobox is valid, otherwise `false`
|
|
191
|
+
*/
|
|
192
|
+
checkValidity() {
|
|
193
|
+
return this.#internals.checkValidity();
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
158
196
|
* Clear all selected options
|
|
159
197
|
*/
|
|
160
198
|
clear() {
|
|
@@ -180,6 +218,22 @@ var OuiComboboxElement = class extends HTMLElement {
|
|
|
180
218
|
if (this.#state == null) this.#restored = parsed;
|
|
181
219
|
else setListboxValues(this.#state, parsed);
|
|
182
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* Check if the combobox is valid and report any validation errors
|
|
223
|
+
*
|
|
224
|
+
* @returns `true` if the combobox is valid, otherwise `false`
|
|
225
|
+
*/
|
|
226
|
+
reportValidity() {
|
|
227
|
+
return this.#internals.reportValidity();
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Set a custom validation message for the combobox
|
|
231
|
+
*
|
|
232
|
+
* @param message Validation message
|
|
233
|
+
*/
|
|
234
|
+
setCustomValidity(message) {
|
|
235
|
+
this.#internals.setValidity({ customError: message !== "" }, message, this);
|
|
236
|
+
}
|
|
183
237
|
setLocalizations(first, second) {
|
|
184
238
|
updateLocalizations(this.#state.localizations.global, typeof first === "string" ? { [first]: second } : first, this.#state.localizations.component);
|
|
185
239
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as setComboboxLocalizations, i as hasTextSelection, n as getComboboxAutoComplete, o as updateComboboxLocalizations, r as getComboboxId } from "../index-
|
|
1
|
+
import { a as setComboboxLocalizations, i as hasTextSelection, n as getComboboxAutoComplete, o as updateComboboxLocalizations, r as getComboboxId } from "../index-C5D3-oiI.mjs";
|
|
2
2
|
export { getComboboxAutoComplete, getComboboxId, hasTextSelection, setComboboxLocalizations, updateComboboxLocalizations };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { D as setComboboxLocalizations, E as hasTextSelection, O as updateComboboxLocalizations, T as getComboboxId, w as getComboboxAutoComplete } from "../state.combobox-
|
|
1
|
+
import { D as setComboboxLocalizations, E as hasTextSelection, O as updateComboboxLocalizations, T as getComboboxId, w as getComboboxAutoComplete } from "../state.combobox-BWDFHwoi.mjs";
|
|
2
2
|
export { getComboboxAutoComplete, getComboboxId, hasTextSelection, setComboboxLocalizations, updateComboboxLocalizations };
|
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { r as OuiFloatable } from "../floatable.embedded-DQYkXt8X.mjs";
|
|
2
|
+
import { d as OuiListboxType, l as OuiListboxState } from "../listbox.model-BHPA7GM4.mjs";
|
|
3
3
|
//#region src/js/combobox/models.combobox.d.ts
|
|
4
|
-
type OuiComboboxAnchor = {
|
|
4
|
+
export type OuiComboboxAnchor = {
|
|
5
5
|
container?: HTMLElement;
|
|
6
6
|
element: HTMLElement;
|
|
7
7
|
};
|
|
8
|
-
type OuiComboboxFilter = {
|
|
8
|
+
export type OuiComboboxFilter = {
|
|
9
9
|
element: HTMLInputElement;
|
|
10
10
|
value: string;
|
|
11
11
|
};
|
|
12
|
-
type OuiComboboxGroup = {
|
|
12
|
+
export type OuiComboboxGroup = {
|
|
13
13
|
element: HTMLElement;
|
|
14
14
|
header: HTMLElement;
|
|
15
15
|
options: HTMLElement[];
|
|
16
16
|
};
|
|
17
|
-
type OuiComboboxLabel = {
|
|
17
|
+
export type OuiComboboxLabel = {
|
|
18
18
|
element: HTMLLabelElement;
|
|
19
19
|
id: string;
|
|
20
20
|
};
|
|
21
|
-
type OuiComboboxOptions = {
|
|
21
|
+
export type OuiComboboxOptions = {
|
|
22
22
|
all: HTMLElement[];
|
|
23
23
|
selected: HTMLElement[];
|
|
24
24
|
};
|
|
25
|
-
type OuiComboboxSelection = {
|
|
25
|
+
export type OuiComboboxSelection = {
|
|
26
26
|
container: HTMLElement;
|
|
27
27
|
items: OuiComboboxSelectionItem[];
|
|
28
28
|
};
|
|
29
|
-
type OuiComboboxSelectionItem = {
|
|
29
|
+
export type OuiComboboxSelectionItem = {
|
|
30
30
|
button: HTMLButtonElement;
|
|
31
31
|
element: HTMLElement;
|
|
32
32
|
};
|
|
33
|
-
type OuiComboboxState = {
|
|
33
|
+
export type OuiComboboxState = {
|
|
34
34
|
anchor: OuiComboboxAnchor;
|
|
35
35
|
floatable: OuiFloatable;
|
|
36
36
|
selection?: OuiComboboxSelection;
|
|
37
37
|
type: OuiListboxType;
|
|
38
38
|
} & OuiListboxState;
|
|
39
|
-
type OuiComboboxValues = {
|
|
39
|
+
export type OuiComboboxValues = {
|
|
40
40
|
current: string[];
|
|
41
41
|
initial: string[];
|
|
42
42
|
};
|
|
43
|
-
//#endregion
|
|
44
|
-
export { OuiComboboxAnchor, OuiComboboxFilter, OuiComboboxGroup, OuiComboboxLabel, OuiComboboxOptions, OuiComboboxSelection, OuiComboboxSelectionItem, OuiComboboxState, OuiComboboxValues };
|
|
43
|
+
//#endregion
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { t as OuiLocalizations } from "../l10n-Bn-7RcwR.mjs";
|
|
2
|
-
import { o as OuiListboxLocalizations, u as OuiListboxStates } from "../listbox.model-
|
|
2
|
+
import { o as OuiListboxLocalizations, u as OuiListboxStates } from "../listbox.model-BHPA7GM4.mjs";
|
|
3
3
|
import { OuiComboboxState } from "./models.combobox.mjs";
|
|
4
|
-
import { t as OuiComboboxElement } from "../index-
|
|
4
|
+
import { t as OuiComboboxElement } from "../index-C5D3-oiI.mjs";
|
|
5
5
|
//#region src/js/combobox/state.combobox.d.ts
|
|
6
|
-
declare function createComboboxState(element: OuiComboboxElement, internals: ElementInternals): OuiComboboxState;
|
|
7
|
-
declare function onAttachCombobox(state: OuiComboboxState): void;
|
|
8
|
-
declare function onDetachCombobox(state: OuiComboboxState): void;
|
|
9
|
-
declare const comboboxLocalizations: OuiLocalizations<OuiListboxLocalizations>;
|
|
10
|
-
declare const comboboxStates: OuiListboxStates<OuiComboboxState>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { comboboxLocalizations, comboboxStates, createComboboxState, onAttachCombobox, onDetachCombobox };
|
|
6
|
+
export declare function createComboboxState(element: OuiComboboxElement, internals: ElementInternals): OuiComboboxState;
|
|
7
|
+
export declare function onAttachCombobox(state: OuiComboboxState): void;
|
|
8
|
+
export declare function onDetachCombobox(state: OuiComboboxState): void;
|
|
9
|
+
export declare const comboboxLocalizations: OuiLocalizations<OuiListboxLocalizations>;
|
|
10
|
+
export declare const comboboxStates: OuiListboxStates<OuiComboboxState>;
|
|
11
|
+
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as onDetachCombobox, i as onAttachCombobox, n as comboboxStates, r as createComboboxState, t as comboboxLocalizations } from "../state.combobox-
|
|
1
|
+
import { a as onDetachCombobox, i as onAttachCombobox, n as comboboxStates, r as createComboboxState, t as comboboxLocalizations } from "../state.combobox-BWDFHwoi.mjs";
|
|
2
2
|
export { comboboxLocalizations, comboboxStates, createComboboxState, onAttachCombobox, onDetachCombobox };
|