@oscarpalmer/oui 0.41.0 → 0.43.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/grid.css +38 -0
- package/dist/js/color-picker/color-picker.constants.d.mts +1 -1
- package/dist/js/color-picker/color-picker.constants.mjs +1 -2
- package/dist/js/color-picker/color-picker.dom.d.mts +2 -4
- package/dist/js/color-picker/color-picker.dom.mjs +1 -2
- package/dist/js/color-picker/color-picker.event.d.mts +2 -4
- package/dist/js/color-picker/color-picker.event.mjs +8 -9
- package/dist/js/color-picker/color-picker.form.d.mts +2 -4
- package/dist/js/color-picker/color-picker.form.mjs +2 -3
- package/dist/js/color-picker/color-picker.misc.d.mts +1 -1
- package/dist/js/color-picker/color-picker.misc.mjs +1 -2
- package/dist/js/color-picker/color-picker.model.d.mts +1 -1
- package/dist/js/color-picker/color-picker.model.mjs +1 -2
- package/dist/js/color-picker/color-picker.output.d.mts +2 -4
- package/dist/js/color-picker/color-picker.output.mjs +4 -5
- package/dist/js/color-picker/color-picker.state.d.mts +2 -4
- package/dist/js/color-picker/color-picker.state.mjs +4 -5
- package/dist/js/color-picker/index.d.mts +5 -7
- package/dist/js/color-picker/index.mjs +3 -4
- package/dist/js/{color-picker.constants-BZgXQr5o.d.mts → color-picker.constants-DdttC4ab.d.mts} +3 -8
- package/dist/js/{color-picker.misc-BIS3R6jk.d.mts → color-picker.misc-BH_tFyWR.d.mts} +1 -3
- package/dist/js/combobox/combobox.constants.d.mts +2 -2
- package/dist/js/combobox/combobox.constants.mjs +3 -3
- package/dist/js/combobox/combobox.dom.d.mts +3 -4
- package/dist/js/combobox/combobox.dom.mjs +3 -3
- package/dist/js/combobox/combobox.event.d.mts +3 -5
- package/dist/js/combobox/combobox.event.mjs +1 -2
- package/dist/js/combobox/combobox.misc.d.mts +1 -1
- package/dist/js/combobox/combobox.misc.mjs +1 -2
- package/dist/js/combobox/combobox.model.d.mts +1 -1
- package/dist/js/combobox/combobox.state.d.mts +3 -5
- package/dist/js/combobox/combobox.state.mjs +1 -2
- package/dist/js/combobox/index.d.mts +7 -9
- package/dist/js/combobox/index.mjs +3 -4
- package/dist/js/{combobox.constants-Hb3bqqQJ.d.mts → combobox.constants-CDnBNJC0.d.mts} +3 -4
- package/dist/js/{combobox.misc-DRDFk6X8.d.mts → combobox.misc-Csh9lm9_.d.mts} +1 -3
- package/dist/js/{combobox.model-gjEI2VqZ.d.mts → combobox.model-BRGQDuRl.d.mts} +2 -4
- package/dist/js/{combobox.state-AstCICiH.mjs → combobox.state-Bjt0dwe3.mjs} +29 -29
- package/dist/js/dialog/dialog.model.d.mts +1 -1
- package/dist/js/dialog/dialog.model.mjs +1 -2
- package/dist/js/dialog/index.d.mts +1 -3
- package/dist/js/dialog/index.mjs +2 -3
- package/dist/js/{dialog.model-HVzYWoDo.d.mts → dialog.model-cYq7rTKL.d.mts} +2 -4
- package/dist/js/floatable/floatable.embedded.d.mts +1 -1
- package/dist/js/floatable/floatable.embedded.mjs +1 -2
- package/dist/js/floatable/floatable.model.d.mts +1 -1
- package/dist/js/floatable/floatable.model.mjs +1 -2
- package/dist/js/floatable/floatable.standalone.d.mts +2 -2
- package/dist/js/floatable/floatable.standalone.mjs +1 -2
- package/dist/js/{floatable.embedded-ncshL3Sa.d.mts → floatable.embedded-Cr1KX6GZ.d.mts} +1 -3
- package/dist/js/{floatable.model-DXsQgoU7.d.mts → floatable.model-jS5Ui5Av.d.mts} +0 -2
- package/dist/js/focus-trap/focus-trap.embedded.d.mts +1 -1
- package/dist/js/focus-trap/focus-trap.embedded.mjs +4 -5
- package/dist/js/focus-trap/focus-trap.model.d.mts +2 -2
- package/dist/js/focus-trap/focus-trap.model.mjs +3 -3
- package/dist/js/focus-trap/focus-trap.standalone.d.mts +2 -2
- package/dist/js/focus-trap/focus-trap.standalone.mjs +1 -2
- package/dist/js/{focus-trap.embedded-DpcPkP7c.d.mts → focus-trap.embedded-BVXcd4OO.d.mts} +1 -3
- package/dist/js/{focus-trap.model-CpltX5B5.d.mts → focus-trap.model-wg0iAZ7x.d.mts} +2 -3
- package/dist/js/grid/grid.dom.d.mts +7 -0
- package/dist/js/grid/grid.dom.mjs +171 -0
- package/dist/js/grid/grid.event.d.mts +7 -0
- package/dist/js/grid/grid.event.mjs +1 -0
- package/dist/js/grid/grid.misc.d.mts +6 -0
- package/dist/js/grid/grid.misc.mjs +1 -0
- package/dist/js/grid/grid.model.d.mts +2 -0
- package/dist/js/grid/grid.model.mjs +39 -0
- package/dist/js/grid/index.d.mts +22 -0
- package/dist/js/grid/index.mjs +48 -0
- package/dist/js/grid.event-K_pG2vmS.mjs +192 -0
- package/dist/js/grid.model-SiNst5db.d.mts +90 -0
- package/dist/js/index.d.mts +22 -21
- package/dist/js/index.mjs +5 -3
- package/dist/js/internal/attributable.d.mts +1 -3
- package/dist/js/internal/attributable.mjs +3 -3
- package/dist/js/internal/draggable/draggable.model.d.mts +2 -2
- package/dist/js/internal/draggable/draggable.model.mjs +3 -3
- package/dist/js/internal/draggable/index.d.mts +2 -4
- package/dist/js/internal/draggable/index.mjs +18 -14
- package/dist/js/internal/l10n/index.d.mts +2 -4
- package/dist/js/internal/l10n/index.mjs +30 -22
- package/dist/js/internal/l10n/l10n.model.d.mts +1 -1
- package/dist/js/internal/l10n/l10n.model.mjs +1 -2
- package/dist/js/internal/misc.d.mts +2 -3
- package/dist/js/internal/misc.mjs +5 -3
- package/dist/js/internal/navigable/index.d.mts +2 -4
- package/dist/js/internal/navigable/index.mjs +1 -2
- package/dist/js/internal/navigable/navigable.model.d.mts +1 -1
- package/dist/js/internal/navigable/navigable.model.mjs +1 -2
- package/dist/js/internal/option-list/option-list.constants.d.mts +3 -5
- package/dist/js/internal/option-list/option-list.constants.mjs +3 -4
- package/dist/js/internal/option-list/option-list.data.d.mts +3 -4
- package/dist/js/internal/option-list/option-list.data.mjs +1 -2
- package/dist/js/internal/option-list/option-list.dom.d.mts +3 -5
- package/dist/js/internal/option-list/option-list.dom.mjs +1 -2
- package/dist/js/internal/option-list/option-list.event.d.mts +3 -5
- package/dist/js/internal/option-list/option-list.event.mjs +4 -5
- package/dist/js/internal/option-list/option-list.form.d.mts +3 -5
- package/dist/js/internal/option-list/option-list.form.mjs +2 -3
- package/dist/js/internal/option-list/option-list.misc.d.mts +3 -5
- package/dist/js/internal/option-list/option-list.misc.mjs +1 -2
- package/dist/js/internal/option-list/option-list.model.d.mts +2 -2
- package/dist/js/internal/option-list/option-list.model.mjs +7 -1
- package/dist/js/internal/option-list/option-list.state.d.mts +3 -5
- package/dist/js/internal/option-list/option-list.state.mjs +2 -3
- package/dist/js/l10n/index.d.mts +1 -1
- package/dist/js/l10n/index.mjs +1 -2
- package/dist/js/{l10n.model-D1E1u35L.d.mts → l10n.model-DxwLXnFl.d.mts} +0 -2
- package/dist/js/listbox/index.d.mts +6 -8
- package/dist/js/listbox/index.mjs +3 -4
- package/dist/js/listbox/listbox.constants.d.mts +1 -1
- package/dist/js/listbox/listbox.constants.mjs +1 -2
- package/dist/js/listbox/listbox.dom.d.mts +2 -4
- package/dist/js/listbox/listbox.dom.mjs +1 -2
- package/dist/js/listbox/listbox.event.d.mts +3 -5
- package/dist/js/listbox/listbox.event.mjs +1 -2
- package/dist/js/listbox/listbox.misc.d.mts +1 -1
- package/dist/js/listbox/listbox.misc.mjs +1 -2
- package/dist/js/listbox/listbox.model.d.mts +1 -1
- package/dist/js/listbox/listbox.state.d.mts +3 -5
- package/dist/js/listbox/listbox.state.mjs +1 -2
- package/dist/js/{listbox.constants-DOBMwKup.d.mts → listbox.constants-1yMPRl2C.d.mts} +1 -3
- package/dist/js/{listbox.misc-DwfB4Mu_.d.mts → listbox.misc-CkW28nUS.d.mts} +1 -3
- package/dist/js/{listbox.model-C0MYWXZe.d.mts → listbox.model-CUA_DaR9.d.mts} +1 -3
- package/dist/js/{listbox.state-BrN296BM.mjs → listbox.state-DO58GDqc.mjs} +8 -12
- package/dist/js/menu/index.mjs +5 -6
- package/dist/js/menu/menu.model.d.mts +3 -5
- package/dist/js/menu/menu.model.mjs +1 -2
- package/dist/js/movable/movable.embedded.d.mts +1 -1
- package/dist/js/movable/movable.embedded.mjs +3 -4
- package/dist/js/movable/movable.model.d.mts +2 -2
- package/dist/js/movable/movable.model.mjs +3 -3
- package/dist/js/movable/movable.standalone.d.mts +2 -2
- package/dist/js/movable/movable.standalone.mjs +1 -2
- package/dist/js/{movable.embedded-C1bDTLGs.d.mts → movable.embedded-HjPPob-Z.d.mts} +1 -3
- package/dist/js/{movable.model-D9nnPWKk.d.mts → movable.model-CQ3AbTrq.d.mts} +13 -7
- package/dist/js/{navigable.model-BqoR6iBv.d.mts → navigable.model-CrzJqKE7.d.mts} +0 -2
- package/dist/js/{option-list.data-CgMyUwPc.mjs → option-list.data-Be6wopy9.mjs} +7 -10
- package/dist/js/{option-list.model-CCPUlPeX.d.mts → option-list.model-DNZq-X0d.d.mts} +7 -4
- package/dist/js/popover/index.d.mts +1 -3
- package/dist/js/popover/index.mjs +3 -4
- package/dist/js/popover/popover.model.d.mts +1 -1
- package/dist/js/popover/popover.model.mjs +1 -2
- package/dist/js/{popover.model-DiLdz0Hc.d.mts → popover.model-CrrIdSmS.d.mts} +2 -4
- package/dist/js/resizable/resizable.embedded.d.mts +2 -2
- package/dist/js/resizable/resizable.embedded.mjs +122 -38
- package/dist/js/resizable/resizable.model.d.mts +2 -2
- package/dist/js/resizable/resizable.model.mjs +11 -3
- package/dist/js/resizable/resizable.standalone.d.mts +3 -3
- package/dist/js/resizable/resizable.standalone.mjs +2 -1
- package/dist/js/{resizable.embedded-BemH-7Re.d.mts → resizable.embedded-DQclAEP-.d.mts} +3 -4
- package/dist/js/resizable.model-BOufXDXx.d.mts +67 -0
- package/dist/js/sortable/sortable.embedded.d.mts +1 -1
- package/dist/js/sortable/sortable.embedded.mjs +5 -6
- package/dist/js/sortable/sortable.model.d.mts +2 -2
- package/dist/js/sortable/sortable.model.mjs +4 -3
- package/dist/js/sortable/sortable.standalone.d.mts +2 -2
- package/dist/js/sortable/sortable.standalone.mjs +1 -2
- package/dist/js/{sortable.embedded-CrEGff9k.d.mts → sortable.embedded-B5LPz-c_.d.mts} +1 -3
- package/dist/js/splitter/index.d.mts +2 -4
- package/dist/js/splitter/index.mjs +5 -5
- package/dist/js/splitter/splitter.model.d.mts +1 -1
- package/dist/js/splitter/splitter.model.mjs +1 -2
- package/dist/js/{splitter.model-C24W6eZ7.d.mts → splitter.model-DQDbIe4P.d.mts} +0 -2
- package/dist/js/tabs/index.d.mts +2 -4
- package/dist/js/tabs/index.mjs +10 -11
- package/dist/js/tabs/tabs.model.d.mts +1 -1
- package/dist/js/tabs/tabs.model.mjs +1 -2
- package/dist/js/{tabs.model-BHPy7fPo.d.mts → tabs.model-CvylbR2o.d.mts} +1 -3
- package/dist/js/toolbar/index.mjs +1 -2
- package/dist/js/toolbar/toolbar.model.d.mts +2 -4
- package/dist/js/toolbar/toolbar.model.mjs +1 -2
- package/dist/js/tooltip/index.d.mts +1 -3
- package/dist/js/tooltip/index.mjs +2 -3
- package/dist/js/tooltip/tooltip.model.d.mts +1 -1
- package/dist/js/tooltip/tooltip.model.mjs +1 -2
- package/dist/js/{tooltip.model-BpNStw5z.d.mts → tooltip.model-BI3UK-VU.d.mts} +1 -3
- package/package.json +11 -8
- package/dist/js/resizable.model-YEtcC9li.d.mts +0 -46
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { C as setOptionListDisabled, D as setOptionListReadonly, O as setOptionListRequired, T as setOptionListLimit, a as setOptionListValue, o as setOptionListValues, w as setOptionListFilter } from "../option-list.data-
|
|
1
|
+
import { C as setOptionListDisabled, D as setOptionListReadonly, O as setOptionListRequired, T as setOptionListLimit, a as setOptionListValue, o as setOptionListValues, w as setOptionListFilter } from "../option-list.data-Be6wopy9.mjs";
|
|
2
2
|
import { attachOptionList, detachOptionList } from "../internal/option-list/option-list.state.mjs";
|
|
3
3
|
import { COMBOBOX_SYMBOL, COMBOBOX_TAGNAME } from "./combobox.constants.mjs";
|
|
4
|
-
import { D as setComboboxLocalizations, a as onDetachCombobox, i as onAttachCombobox, n as comboboxes, r as initializeCombobox } from "../combobox.state-
|
|
4
|
+
import { D as setComboboxLocalizations, a as onDetachCombobox, i as onAttachCombobox, n as comboboxes, r as initializeCombobox } from "../combobox.state-Bjt0dwe3.mjs";
|
|
5
5
|
import { getAttribute } from "@oscarpalmer/toretto/attribute";
|
|
6
6
|
import { parse } from "@oscarpalmer/atoms/string";
|
|
7
|
-
|
|
7
|
+
// src/js/combobox/index.ts
|
|
8
8
|
var OuiComboboxElement = class extends HTMLElement {
|
|
9
9
|
static formAssociated = true;
|
|
10
10
|
static observedAttributes = [
|
|
@@ -246,5 +246,4 @@ var OuiComboboxElement = class extends HTMLElement {
|
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
248
|
customElements.define(COMBOBOX_TAGNAME, OuiComboboxElement);
|
|
249
|
-
//#endregion
|
|
250
249
|
export { OuiComboboxElement, setComboboxLocalizations };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/js/combobox/combobox.constants.d.ts
|
|
1
|
+
import { h as OptionListAutoCompleteType, p as OptionListAttributes } from "./option-list.model-DNZq-X0d.mjs";
|
|
3
2
|
declare const COMBOBOX_TAGNAME = "oui-combobox";
|
|
4
3
|
declare const COMBOBOX_ATTRIBUTE_ANCHOR: string;
|
|
5
4
|
declare const COMBOBOX_ATTRIBUTE_SELECTION: string;
|
|
6
5
|
declare const COMBOBOX_ATTRIBUTE_SELECTION_ITEM: string;
|
|
7
6
|
declare const COMBOBOX_AUTOCOMPLETES: Set<OptionListAutoCompleteType>;
|
|
7
|
+
declare const COMBOBOX_SELECTOR_SELECTION_ITEM: string;
|
|
8
8
|
declare const COMBOBOX_SYMBOL: unique symbol;
|
|
9
9
|
declare const comboboxAttributes: OptionListAttributes;
|
|
10
10
|
declare const messageLabel: string;
|
|
@@ -15,5 +15,4 @@ declare const selectorContent: string;
|
|
|
15
15
|
declare const selectorOption: string;
|
|
16
16
|
declare const selectorSelectionItem: string;
|
|
17
17
|
declare const comboboxSelectors: Record<string, string>;
|
|
18
|
-
|
|
19
|
-
export { COMBOBOX_SYMBOL as a, comboboxMessages as c, messageSelect as d, selectorAnchor as f, selectorSelectionItem as h, COMBOBOX_AUTOCOMPLETES as i, comboboxSelectors as l, selectorOption as m, COMBOBOX_ATTRIBUTE_SELECTION as n, COMBOBOX_TAGNAME as o, selectorContent as p, COMBOBOX_ATTRIBUTE_SELECTION_ITEM as r, comboboxAttributes as s, COMBOBOX_ATTRIBUTE_ANCHOR as t, messageLabel as u };
|
|
18
|
+
export { COMBOBOX_SELECTOR_SELECTION_ITEM as a, comboboxAttributes as c, messageLabel as d, messageSelect as f, selectorSelectionItem as g, selectorOption as h, COMBOBOX_AUTOCOMPLETES as i, comboboxMessages as l, selectorContent as m, COMBOBOX_ATTRIBUTE_SELECTION as n, COMBOBOX_SYMBOL as o, selectorAnchor as p, COMBOBOX_ATTRIBUTE_SELECTION_ITEM as r, COMBOBOX_TAGNAME as s, COMBOBOX_ATTRIBUTE_ANCHOR as t, comboboxSelectors as u };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/js/combobox/combobox.misc.d.ts
|
|
1
|
+
import { m as OptionListAutoComplete, v as OptionListLocalizationValues } from "./option-list.model-DNZq-X0d.mjs";
|
|
3
2
|
declare function getComboboxAutoComplete(element: Element, select: boolean): OptionListAutoComplete;
|
|
4
3
|
declare function getComboboxId(): string;
|
|
5
4
|
declare function hasTextSelection(element: Element): element is HTMLInputElement;
|
|
@@ -22,5 +21,4 @@ declare function setComboboxLocalizations(localizations: Partial<OptionListLocal
|
|
|
22
21
|
* @param localizations Localizations for one or more languages
|
|
23
22
|
*/
|
|
24
23
|
declare function setComboboxLocalizations(localizations: Record<string, Partial<OptionListLocalizationValues>>): void;
|
|
25
|
-
//#endregion
|
|
26
24
|
export { setComboboxLocalizations as i, getComboboxId as n, hasTextSelection as r, getComboboxAutoComplete as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { c as OuiFloatable } from "./floatable.model-
|
|
2
|
-
import {
|
|
3
|
-
//#region src/js/combobox/combobox.model.d.ts
|
|
1
|
+
import { c as OuiFloatable } from "./floatable.model-jS5Ui5Av.mjs";
|
|
2
|
+
import { S as OptionListType, v as OptionListLocalizationValues, x as OptionListState } from "./option-list.model-DNZq-X0d.mjs";
|
|
4
3
|
type OuiComboboxAnchor = {
|
|
5
4
|
container?: Element;
|
|
6
5
|
element: HTMLElement;
|
|
@@ -42,5 +41,4 @@ type OuiComboboxValues = {
|
|
|
42
41
|
current: string[];
|
|
43
42
|
initial: string[];
|
|
44
43
|
};
|
|
45
|
-
//#endregion
|
|
46
44
|
export { OuiComboboxLocalizations as a, OuiComboboxSelectionItem as c, OuiComboboxValues as d, OuiComboboxLabel as i, OuiComboboxState as l, OuiComboboxFilter as n, OuiComboboxOptions as o, OuiComboboxGroup as r, OuiComboboxSelection as s, OuiComboboxAnchor as t, OuiComboboxStateExtras as u };
|
|
@@ -2,9 +2,10 @@ import { createEmbeddedFloatable } from "./floatable/floatable.embedded.mjs";
|
|
|
2
2
|
import { createDefaultLocalizations, createLocalizations } from "./internal/l10n/index.mjs";
|
|
3
3
|
import { getAttributeValue, getBooleanAriaValue } from "./internal/misc.mjs";
|
|
4
4
|
import { OPTION_LIST_KEYS_ACTIVATION, OPTION_LIST_TYPES } from "./internal/option-list/option-list.constants.mjs";
|
|
5
|
-
import { i as filterOptionListOptions, n as filterOptionList, o as setOptionListValues, r as filterOptionListOption, s as toggleOptionListOption, t as applyOptionListSelection, x as generateOptionListIds, y as updateOptionListPreview } from "./option-list.data-
|
|
5
|
+
import { i as filterOptionListOptions, n as filterOptionList, o as setOptionListValues, r as filterOptionListOption, s as toggleOptionListOption, t as applyOptionListSelection, x as generateOptionListIds, y as updateOptionListPreview } from "./option-list.data-Be6wopy9.mjs";
|
|
6
|
+
import { OPTION_LIST_TYPE_SELECT } from "./internal/option-list/option-list.model.mjs";
|
|
6
7
|
import { initializeOptionListState } from "./internal/option-list/option-list.state.mjs";
|
|
7
|
-
import {
|
|
8
|
+
import { COMBOBOX_AUTOCOMPLETES, COMBOBOX_SELECTOR_SELECTION_ITEM, COMBOBOX_SYMBOL, COMBOBOX_TAGNAME, comboboxAttributes, comboboxMessages, comboboxSelectors } from "./combobox/combobox.constants.mjs";
|
|
8
9
|
import { createComboboxAnchor, createComboboxContent, updateComboboxAutocomplete, updateComboboxSelection, updateComboboxTabindices } from "./combobox/combobox.dom.mjs";
|
|
9
10
|
import { processOptionListKeydown } from "./internal/option-list/option-list.event.mjs";
|
|
10
11
|
import { setAria } from "@oscarpalmer/toretto/aria";
|
|
@@ -14,7 +15,7 @@ import { findAncestor } from "@oscarpalmer/toretto/find";
|
|
|
14
15
|
import { clamp } from "@oscarpalmer/atoms/number";
|
|
15
16
|
import { noop } from "@oscarpalmer/atoms/function";
|
|
16
17
|
import { getData } from "@oscarpalmer/toretto/data";
|
|
17
|
-
|
|
18
|
+
// src/js/combobox/combobox.misc.ts
|
|
18
19
|
function getComboboxAutoComplete(element, select) {
|
|
19
20
|
let value;
|
|
20
21
|
if (select) value = "list";
|
|
@@ -39,8 +40,7 @@ function setComboboxLocalizations(first, second) {
|
|
|
39
40
|
else comboboxLocalizations.setLanguages(first, second);
|
|
40
41
|
}
|
|
41
42
|
let index = 0;
|
|
42
|
-
|
|
43
|
-
//#region src/js/combobox/combobox.event.ts
|
|
43
|
+
// src/js/combobox/combobox.event.ts
|
|
44
44
|
function onComboboxActivation(state) {
|
|
45
45
|
state.component.floatable.show();
|
|
46
46
|
}
|
|
@@ -64,28 +64,32 @@ function onComboboxClickDocument(event) {
|
|
|
64
64
|
onComboboxClickContent(event, state);
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
const { disabled, floatable, options, readonly } = state.component;
|
|
68
67
|
const label = findAncestor(event, "label");
|
|
69
68
|
if (label != null) {
|
|
70
|
-
|
|
71
|
-
state.component.anchor.element.focus();
|
|
72
|
-
if (!disabled) floatable.show();
|
|
73
|
-
}
|
|
69
|
+
onComboboxClickLabel(state, label);
|
|
74
70
|
return;
|
|
75
71
|
}
|
|
76
|
-
const selection = findAncestor(event,
|
|
72
|
+
const selection = findAncestor(event, COMBOBOX_SELECTOR_SELECTION_ITEM);
|
|
77
73
|
if (selection != null) {
|
|
78
|
-
|
|
79
|
-
if (disabled) state.component.anchor.element.focus();
|
|
80
|
-
else if (readonly) updateComboboxTabindices(state, option);
|
|
81
|
-
else toggleOptionListOption(state, option);
|
|
74
|
+
onComboboxClickSelection(state, selection);
|
|
82
75
|
return;
|
|
83
76
|
}
|
|
84
|
-
if (findAncestor(event, comboboxSelectors.anchor) != null && !disabled)
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
if (findAncestor(event, comboboxSelectors.anchor) != null && !state.component.disabled) state.component.floatable.show();
|
|
78
|
+
}
|
|
79
|
+
function onComboboxClickLabel(state, target) {
|
|
80
|
+
const { anchor, disabled, floatable, label, type } = state.component;
|
|
81
|
+
if (target === label.element && type === "select") {
|
|
82
|
+
anchor.element.focus();
|
|
83
|
+
if (!disabled) floatable.show();
|
|
87
84
|
}
|
|
88
85
|
}
|
|
86
|
+
function onComboboxClickSelection(state, selection) {
|
|
87
|
+
const { disabled, options, readonly } = state.component;
|
|
88
|
+
const option = options.selected.find((option) => option.id === getData(selection, "option", false));
|
|
89
|
+
if (disabled) state.component.anchor.element.focus();
|
|
90
|
+
else if (readonly) updateComboboxTabindices(state, option);
|
|
91
|
+
else toggleOptionListOption(state, option);
|
|
92
|
+
}
|
|
89
93
|
function onComboboxEnter(state) {
|
|
90
94
|
const { active, anchor, disabled, readonly } = state.component;
|
|
91
95
|
if (disabled || readonly) return;
|
|
@@ -121,7 +125,7 @@ function onComboboxFocusout(event) {
|
|
|
121
125
|
function onComboboxInput(event) {
|
|
122
126
|
const combobox = findAncestor(event, COMBOBOX_TAGNAME);
|
|
123
127
|
const state = combobox?.[COMBOBOX_SYMBOL];
|
|
124
|
-
if (combobox != null &&
|
|
128
|
+
if (combobox != null && event.target === state?.component.filter.element) filterOptionList(event.inputType, state);
|
|
125
129
|
}
|
|
126
130
|
function onComboboxKeydown(event) {
|
|
127
131
|
const combobox = findAncestor(event, COMBOBOX_TAGNAME);
|
|
@@ -205,21 +209,20 @@ on(document, "click", onComboboxClickDocument);
|
|
|
205
209
|
on(document, "focusout", onComboboxFocusout);
|
|
206
210
|
on(document, "input", onComboboxInput, { passive: false });
|
|
207
211
|
on(document, "keydown", onComboboxKeydown, { passive: false });
|
|
208
|
-
|
|
209
|
-
//#region src/js/combobox/combobox.state.ts
|
|
212
|
+
// src/js/combobox/combobox.state.ts
|
|
210
213
|
function createComponentState(element, state) {
|
|
211
214
|
const select = element.querySelector("select");
|
|
212
|
-
if (!(select instanceof HTMLSelectElement) || select.id === "") throw new
|
|
215
|
+
if (!(select instanceof HTMLSelectElement) || select.id === "") throw new TypeError(comboboxMessages.select);
|
|
213
216
|
const label = element.querySelector(`label[for="${select.id}"]`);
|
|
214
|
-
if (!(label instanceof HTMLLabelElement)) throw new
|
|
217
|
+
if (!(label instanceof HTMLLabelElement)) throw new TypeError(comboboxMessages.label);
|
|
215
218
|
element.id = select.id;
|
|
216
219
|
const disabled = getBooleanAriaValue(element, "disabled") || select.disabled;
|
|
217
220
|
const multiple = element.multiple || select.multiple;
|
|
218
221
|
const readonly = getBooleanAriaValue(element, "readonly");
|
|
219
222
|
const required = getBooleanAriaValue(element, "required") || select.required;
|
|
220
223
|
const id = getComboboxId();
|
|
221
|
-
const type = multiple ?
|
|
222
|
-
const autocomplete = getComboboxAutoComplete(element, type ===
|
|
224
|
+
const type = multiple ? OPTION_LIST_TYPE_SELECT : getAttributeValue(element, "type", OPTION_LIST_TYPES, OPTION_LIST_TYPE_SELECT);
|
|
225
|
+
const autocomplete = getComboboxAutoComplete(element, type === OPTION_LIST_TYPE_SELECT);
|
|
223
226
|
setAttributes(element, {
|
|
224
227
|
autocomplete: autocomplete.value,
|
|
225
228
|
name: select.name === "" ? select.id : select.name
|
|
@@ -325,9 +328,7 @@ function onAttachCombobox(state) {
|
|
|
325
328
|
function onDetachCombobox(state) {
|
|
326
329
|
const { content, floatable, label, select } = state.component;
|
|
327
330
|
floatable.destroy();
|
|
328
|
-
|
|
329
|
-
anchor.insertAdjacentElement("beforebegin", select);
|
|
330
|
-
anchor.remove();
|
|
331
|
+
(state.component.anchor.container ?? state.component.anchor.element).replaceWith(select);
|
|
331
332
|
content.remove();
|
|
332
333
|
label.element.htmlFor = select.id;
|
|
333
334
|
label.element.id = state.component.label.id;
|
|
@@ -364,5 +365,4 @@ const comboboxLocalizations = createDefaultLocalizations({
|
|
|
364
365
|
selected: (amount) => `${amount} selected`
|
|
365
366
|
});
|
|
366
367
|
const comboboxes = /* @__PURE__ */ new Set();
|
|
367
|
-
//#endregion
|
|
368
368
|
export { skipComboboxNavigation as C, setComboboxLocalizations as D, hasTextSelection as E, preventComboboxActivation as S, getComboboxId as T, onComboboxPreview as _, onDetachCombobox as a, onComboboxTab as b, onComboboxClickContent as c, onComboboxFilter as d, onComboboxFocusout as f, onComboboxNavigation as g, onComboboxKeydownSelection as h, onAttachCombobox as i, onComboboxEnter as l, onComboboxKeydown as m, comboboxes as n, onComboboxActivation as o, onComboboxInput as p, initializeCombobox as r, onComboboxApply as s, comboboxLocalizations as t, onComboboxEscape as u, onComboboxRemoveSelection as v, getComboboxAutoComplete as w, onComboboxToggle as x, onComboboxSelection as y };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DIALOG_SELECTOR_MOVER, c as OuiDialog, i as DIALOG_MESSAGE, l as OuiDialogState, n as DIALOG_ATTRIBUTE_CONTAINER, o as DIALOG_SELECTOR_RESIZER, r as DIALOG_ATTRIBUTE_OPEN, s as DIALOG_SYMBOL, t as DIALOG_ATTRIBUTE, u as dialogs } from "../dialog.model-
|
|
1
|
+
import { a as DIALOG_SELECTOR_MOVER, c as OuiDialog, i as DIALOG_MESSAGE, l as OuiDialogState, n as DIALOG_ATTRIBUTE_CONTAINER, o as DIALOG_SELECTOR_RESIZER, r as DIALOG_ATTRIBUTE_OPEN, s as DIALOG_SYMBOL, t as DIALOG_ATTRIBUTE, u as dialogs } from "../dialog.model-cYq7rTKL.mjs";
|
|
2
2
|
export { DIALOG_ATTRIBUTE, DIALOG_ATTRIBUTE_CONTAINER, DIALOG_ATTRIBUTE_OPEN, DIALOG_MESSAGE, DIALOG_SELECTOR_MOVER, DIALOG_SELECTOR_RESIZER, DIALOG_SYMBOL, OuiDialog, OuiDialogState, dialogs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/js/dialog/dialog.model.ts
|
|
2
2
|
const DIALOG_ATTRIBUTE = "oui-dialog";
|
|
3
3
|
const DIALOG_ATTRIBUTE_CONTAINER = `${DIALOG_ATTRIBUTE}-container`;
|
|
4
4
|
const DIALOG_ATTRIBUTE_OPEN = `${DIALOG_ATTRIBUTE}-open`;
|
|
@@ -7,5 +7,4 @@ const DIALOG_SELECTOR_MOVER = `[${DIALOG_ATTRIBUTE}-mover]`;
|
|
|
7
7
|
const DIALOG_SELECTOR_RESIZER = `[${DIALOG_ATTRIBUTE}-resizer]`;
|
|
8
8
|
const DIALOG_SYMBOL = Symbol(DIALOG_ATTRIBUTE);
|
|
9
9
|
const dialogs = /* @__PURE__ */ new WeakMap();
|
|
10
|
-
//#endregion
|
|
11
10
|
export { DIALOG_ATTRIBUTE, DIALOG_ATTRIBUTE_CONTAINER, DIALOG_ATTRIBUTE_OPEN, DIALOG_MESSAGE, DIALOG_SELECTOR_MOVER, DIALOG_SELECTOR_RESIZER, DIALOG_SYMBOL, dialogs };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { c as OuiDialog, l as OuiDialogState } from "../dialog.model-
|
|
2
|
-
//#region src/js/dialog/index.d.ts
|
|
1
|
+
import { c as OuiDialog, l as OuiDialogState } from "../dialog.model-cYq7rTKL.mjs";
|
|
3
2
|
declare function OuiDialog(this: OuiDialog, state: OuiDialogState): void;
|
|
4
3
|
/**
|
|
5
4
|
* Get the _OuiDialog_ for an element
|
|
@@ -8,5 +7,4 @@ declare function OuiDialog(this: OuiDialog, state: OuiDialogState): void;
|
|
|
8
7
|
* @returns _OuiDialog_ instance
|
|
9
8
|
*/
|
|
10
9
|
declare function getDialog(element: HTMLDialogElement): OuiDialog | undefined;
|
|
11
|
-
//#endregion
|
|
12
10
|
export { type OuiDialog, getDialog };
|
package/dist/js/dialog/index.mjs
CHANGED
|
@@ -3,14 +3,14 @@ import { attributable } from "../internal/attributable.mjs";
|
|
|
3
3
|
import { MOVABLE_ATTRIBUTE_HANDLE } from "../movable/movable.model.mjs";
|
|
4
4
|
import { createMovable } from "../movable/movable.embedded.mjs";
|
|
5
5
|
import "../movable/movable.standalone.mjs";
|
|
6
|
-
import { RESIZABLE_ATTRIBUTE_HANDLE } from "../resizable/resizable.model.mjs";
|
|
7
6
|
import { createResizable } from "../resizable/resizable.embedded.mjs";
|
|
7
|
+
import { RESIZABLE_ATTRIBUTE_HANDLE } from "../resizable/resizable.model.mjs";
|
|
8
8
|
import { DIALOG_ATTRIBUTE, DIALOG_ATTRIBUTE_CONTAINER, DIALOG_ATTRIBUTE_OPEN, DIALOG_MESSAGE, DIALOG_SELECTOR_MOVER, DIALOG_SELECTOR_RESIZER, DIALOG_SYMBOL, dialogs } from "./dialog.model.mjs";
|
|
9
9
|
import { getAria, setAria } from "@oscarpalmer/toretto/aria";
|
|
10
10
|
import { getAttribute, setAttribute } from "@oscarpalmer/toretto/attribute";
|
|
11
11
|
import { on } from "@oscarpalmer/toretto/event";
|
|
12
12
|
import { setStyles } from "@oscarpalmer/toretto/style";
|
|
13
|
-
|
|
13
|
+
// src/js/dialog/index.ts
|
|
14
14
|
function OuiDialog(state) {
|
|
15
15
|
this[DIALOG_SYMBOL] = state;
|
|
16
16
|
}
|
|
@@ -119,5 +119,4 @@ function showDialog(value) {
|
|
|
119
119
|
else element.show();
|
|
120
120
|
}
|
|
121
121
|
attributable(DIALOG_ATTRIBUTE, addDialog, removeDialog);
|
|
122
|
-
//#endregion
|
|
123
122
|
export { getDialog };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as OuiResizable } from "./resizable.model-
|
|
1
|
+
import { d as OuiMovable } from "./movable.model-CQ3AbTrq.mjs";
|
|
2
|
+
import { n as OuiResizable } from "./resizable.model-BOufXDXx.mjs";
|
|
3
3
|
import { RemovableEventListener } from "@oscarpalmer/toretto/models";
|
|
4
|
-
//#region src/js/dialog/dialog.model.d.ts
|
|
5
4
|
type OuiDialog = {
|
|
6
5
|
[DIALOG_SYMBOL]: OuiDialogState;
|
|
7
6
|
/**
|
|
@@ -41,5 +40,4 @@ declare const DIALOG_SELECTOR_MOVER: string;
|
|
|
41
40
|
declare const DIALOG_SELECTOR_RESIZER: string;
|
|
42
41
|
declare const DIALOG_SYMBOL: unique symbol;
|
|
43
42
|
declare const dialogs: WeakMap<Element, OuiDialogState>;
|
|
44
|
-
//#endregion
|
|
45
43
|
export { DIALOG_SELECTOR_MOVER as a, OuiDialog as c, DIALOG_MESSAGE as i, OuiDialogState as l, DIALOG_ATTRIBUTE_CONTAINER as n, DIALOG_SELECTOR_RESIZER as o, DIALOG_ATTRIBUTE_OPEN as r, DIALOG_SYMBOL as s, DIALOG_ATTRIBUTE as t, dialogs as u };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as removeFloatable, n as createFloatable, r as getOnBeforeToggleListener, t as createEmbeddedFloatable } from "../floatable.embedded-
|
|
1
|
+
import { i as removeFloatable, n as createFloatable, r as getOnBeforeToggleListener, t as createEmbeddedFloatable } from "../floatable.embedded-Cr1KX6GZ.mjs";
|
|
2
2
|
export { createEmbeddedFloatable, createFloatable, getOnBeforeToggleListener, removeFloatable };
|
|
@@ -5,7 +5,7 @@ import { on } from "@oscarpalmer/toretto/event";
|
|
|
5
5
|
import { isPlainObject } from "@oscarpalmer/atoms/is";
|
|
6
6
|
import { isHTMLOrSVGElement } from "@oscarpalmer/toretto/is";
|
|
7
7
|
import { setStyle, setStyles } from "@oscarpalmer/toretto/style";
|
|
8
|
-
|
|
8
|
+
// src/js/floatable/floatable.embedded.ts
|
|
9
9
|
function OuiFloatable(state, standalone) {
|
|
10
10
|
this[FLOATABLE_SYMBOL] = state;
|
|
11
11
|
initialize(state, standalone);
|
|
@@ -134,5 +134,4 @@ function updateFloatable(position) {
|
|
|
134
134
|
if (!state.destroyed) setPosition(state, position);
|
|
135
135
|
}
|
|
136
136
|
let index = 0;
|
|
137
|
-
//#endregion
|
|
138
137
|
export { createEmbeddedFloatable, createFloatable, getOnBeforeToggleListener, removeFloatable };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FLOATABLE_MESSAGE, c as OuiFloatable, d as OuiFloatableState, f as floatables, i as FLOATABLE_ATTRIBUTE_POSITION, l as OuiFloatableOptions, n as FLOATABLE_AREAS, o as FLOATABLE_POSITIONS, r as FLOATABLE_ATTRIBUTE, s as FLOATABLE_SYMBOL, t as CreateOuiFloatableOptions, u as OuiFloatablePosition } from "../floatable.model-
|
|
1
|
+
import { a as FLOATABLE_MESSAGE, c as OuiFloatable, d as OuiFloatableState, f as floatables, i as FLOATABLE_ATTRIBUTE_POSITION, l as OuiFloatableOptions, n as FLOATABLE_AREAS, o as FLOATABLE_POSITIONS, r as FLOATABLE_ATTRIBUTE, s as FLOATABLE_SYMBOL, t as CreateOuiFloatableOptions, u as OuiFloatablePosition } from "../floatable.model-jS5Ui5Av.mjs";
|
|
2
2
|
export { CreateOuiFloatableOptions, FLOATABLE_AREAS, FLOATABLE_ATTRIBUTE, FLOATABLE_ATTRIBUTE_POSITION, FLOATABLE_MESSAGE, FLOATABLE_POSITIONS, FLOATABLE_SYMBOL, OuiFloatable, OuiFloatableOptions, OuiFloatablePosition, OuiFloatableState, floatables };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/js/floatable/floatable.model.ts
|
|
2
2
|
const FLOATABLE_AREAS = {
|
|
3
3
|
above: "block-start",
|
|
4
4
|
"above-end": "start span-start",
|
|
@@ -19,5 +19,4 @@ const FLOATABLE_MESSAGE = "Anchor and content must be an HTMLElement or SVGEleme
|
|
|
19
19
|
const FLOATABLE_POSITIONS = Object.fromEntries(Object.entries(FLOATABLE_AREAS).map(([position, area]) => [area, position]));
|
|
20
20
|
const FLOATABLE_SYMBOL = Symbol(FLOATABLE_ATTRIBUTE);
|
|
21
21
|
const floatables = /* @__PURE__ */ new WeakMap();
|
|
22
|
-
//#endregion
|
|
23
22
|
export { FLOATABLE_AREAS, FLOATABLE_ATTRIBUTE, FLOATABLE_ATTRIBUTE_POSITION, FLOATABLE_MESSAGE, FLOATABLE_POSITIONS, FLOATABLE_SYMBOL, floatables };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as createFloatable } from "../floatable.embedded-Cr1KX6GZ.mjs";
|
|
2
|
+
import { c as OuiFloatable, t as CreateOuiFloatableOptions, u as OuiFloatablePosition } from "../floatable.model-jS5Ui5Av.mjs";
|
|
3
3
|
export { type CreateOuiFloatableOptions, type OuiFloatable, type OuiFloatablePosition, createFloatable };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { createFloatable };
|
|
1
|
+
export { createFloatable } from "./floatable.embedded.mjs";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { c as OuiFloatable, l as OuiFloatableOptions, t as CreateOuiFloatableOptions } from "./floatable.model-
|
|
1
|
+
import { c as OuiFloatable, l as OuiFloatableOptions, t as CreateOuiFloatableOptions } from "./floatable.model-jS5Ui5Av.mjs";
|
|
2
2
|
import { RemovableEventListener } from "@oscarpalmer/toretto/models";
|
|
3
|
-
//#region src/js/floatable/floatable.embedded.d.ts
|
|
4
3
|
declare function createEmbeddedFloatable(anchor: Element, content: Element, options: OuiFloatableOptions): OuiFloatable;
|
|
5
4
|
/**
|
|
6
5
|
* Create a _OuiFloatable_ for an anchor and content element
|
|
@@ -13,5 +12,4 @@ declare function createEmbeddedFloatable(anchor: Element, content: Element, opti
|
|
|
13
12
|
declare function createFloatable(anchor: Element, content: Element, options?: CreateOuiFloatableOptions): OuiFloatable;
|
|
14
13
|
declare function getOnBeforeToggleListener(element: Element): RemovableEventListener;
|
|
15
14
|
declare function removeFloatable(content: HTMLElement): void;
|
|
16
|
-
//#endregion
|
|
17
15
|
export { removeFloatable as i, createFloatable as n, getOnBeforeToggleListener as r, createEmbeddedFloatable as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/js/floatable/floatable.model.d.ts
|
|
2
1
|
type CreateOuiFloatableOptions = {
|
|
3
2
|
/**
|
|
4
3
|
* Open the floatable when created? _(defaults to `true`)_
|
|
@@ -58,5 +57,4 @@ declare const FLOATABLE_MESSAGE = "Anchor and content must be an HTMLElement or
|
|
|
58
57
|
declare const FLOATABLE_POSITIONS: Record<string, OuiFloatablePosition>;
|
|
59
58
|
declare const FLOATABLE_SYMBOL: unique symbol;
|
|
60
59
|
declare const floatables: WeakMap<HTMLElement, OuiFloatable>;
|
|
61
|
-
//#endregion
|
|
62
60
|
export { FLOATABLE_MESSAGE as a, OuiFloatable as c, OuiFloatableState as d, floatables as f, FLOATABLE_ATTRIBUTE_POSITION as i, OuiFloatableOptions as l, FLOATABLE_AREAS as n, FLOATABLE_POSITIONS as o, FLOATABLE_ATTRIBUTE as r, FLOATABLE_SYMBOL as s, CreateOuiFloatableOptions as t, OuiFloatablePosition as u };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as removeFocusTrap, t as createFocusTrap } from "../focus-trap.embedded-
|
|
1
|
+
import { n as removeFocusTrap, t as createFocusTrap } from "../focus-trap.embedded-BVXcd4OO.mjs";
|
|
2
2
|
export { createFocusTrap, removeFocusTrap };
|
|
@@ -7,7 +7,7 @@ import { isPlainObject } from "@oscarpalmer/atoms/is";
|
|
|
7
7
|
import { isHTMLOrSVGElement } from "@oscarpalmer/toretto/is";
|
|
8
8
|
import { clamp } from "@oscarpalmer/atoms/number";
|
|
9
9
|
import { getFocusable } from "@oscarpalmer/toretto/focusable";
|
|
10
|
-
|
|
10
|
+
// src/js/focus-trap/focus-trap.embedded.ts
|
|
11
11
|
function OuiFocusTrap(state) {
|
|
12
12
|
this[FOCUSTRAP_SYMBOL] = state;
|
|
13
13
|
state.element.tabIndex = -1;
|
|
@@ -148,7 +148,7 @@ function onPointerdown(event) {
|
|
|
148
148
|
function onTab(event) {
|
|
149
149
|
const element = findAncestor(event, FOCUSTRAP_SELECTOR);
|
|
150
150
|
const instance = element == null ? void 0 : focusTraps.get(element);
|
|
151
|
-
if (!(element instanceof HTMLElement) || instance == null || dispatch(element, "oui
|
|
151
|
+
if (!(element instanceof HTMLElement) || instance == null || dispatch(element, "oui-focus-trap:focus").defaultPrevented) return;
|
|
152
152
|
if (!instance.disabled) event.preventDefault();
|
|
153
153
|
const elements = getFocusable(element);
|
|
154
154
|
const index = elements.indexOf(event.target);
|
|
@@ -162,7 +162,7 @@ function removeFocusTrap(element) {
|
|
|
162
162
|
function setContain(value) {
|
|
163
163
|
const { element } = this[FOCUSTRAP_SYMBOL];
|
|
164
164
|
if (value === true) setAttribute(element, FOCUSTRAP_ATTRIBUTE_CONTAIN, "");
|
|
165
|
-
else if (value === false) setAttribute(element, FOCUSTRAP_ATTRIBUTE_CONTAIN
|
|
165
|
+
else if (value === false) setAttribute(element, FOCUSTRAP_ATTRIBUTE_CONTAIN);
|
|
166
166
|
}
|
|
167
167
|
function setDisabled(value) {
|
|
168
168
|
if (value === true) this.disable();
|
|
@@ -176,7 +176,7 @@ function setDisabledState(focusTrap, state, value) {
|
|
|
176
176
|
function setNoEscape(value) {
|
|
177
177
|
const { element } = this[FOCUSTRAP_SYMBOL];
|
|
178
178
|
if (value === true) setAttribute(element, FOCUSTRAP_ATTRIBUTE_NOESCAPE, "");
|
|
179
|
-
else if (value === false) setAttribute(element, FOCUSTRAP_ATTRIBUTE_NOESCAPE
|
|
179
|
+
else if (value === false) setAttribute(element, FOCUSTRAP_ATTRIBUTE_NOESCAPE);
|
|
180
180
|
}
|
|
181
181
|
function tabToElement(instance, elements, index, modifier) {
|
|
182
182
|
const { length } = elements;
|
|
@@ -212,5 +212,4 @@ on(document, "focusin", onFocusIn, FOCUSTRAP_EVENT_OPTIONS);
|
|
|
212
212
|
on(document, "keydown", onKeydown, FOCUSTRAP_EVENT_OPTIONS);
|
|
213
213
|
on(document, "mousedown", onPointerdown, FOCUSTRAP_EVENT_OPTIONS);
|
|
214
214
|
on(document, "touchstart", onPointerdown, FOCUSTRAP_EVENT_OPTIONS);
|
|
215
|
-
//#endregion
|
|
216
215
|
export { createFocusTrap, removeFocusTrap };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { FOCUSTRAP_ATTRIBUTE, FOCUSTRAP_ATTRIBUTE_CONTAIN, FOCUSTRAP_ATTRIBUTE_NOESCAPE, FOCUSTRAP_EVENT_OPTIONS, FOCUSTRAP_MESSAGE, FOCUSTRAP_SELECTOR, FOCUSTRAP_SYMBOL, OuiFocusTrap, OuiFocusTrapOptions, OuiFocusTrapState, disabledFocusTraps, focusTraps };
|
|
1
|
+
import { a as FOCUSTRAP_EVENT_OPTIONS, c as FOCUSTRAP_SYMBOL, d as OuiFocusTrapState, f as disabledFocusTraps, i as FOCUSTRAP_EVENT_NAME, l as OuiFocusTrap, n as FOCUSTRAP_ATTRIBUTE_CONTAIN, o as FOCUSTRAP_MESSAGE, p as focusTraps, r as FOCUSTRAP_ATTRIBUTE_NOESCAPE, s as FOCUSTRAP_SELECTOR, t as FOCUSTRAP_ATTRIBUTE, u as OuiFocusTrapOptions } from "../focus-trap.model-wg0iAZ7x.mjs";
|
|
2
|
+
export { FOCUSTRAP_ATTRIBUTE, FOCUSTRAP_ATTRIBUTE_CONTAIN, FOCUSTRAP_ATTRIBUTE_NOESCAPE, FOCUSTRAP_EVENT_NAME, FOCUSTRAP_EVENT_OPTIONS, FOCUSTRAP_MESSAGE, FOCUSTRAP_SELECTOR, FOCUSTRAP_SYMBOL, OuiFocusTrap, OuiFocusTrapOptions, OuiFocusTrapState, disabledFocusTraps, focusTraps };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// src/js/focus-trap/focus-trap.model.ts
|
|
2
2
|
const FOCUSTRAP_ATTRIBUTE = "oui-focus-trap";
|
|
3
3
|
const FOCUSTRAP_ATTRIBUTE_CONTAIN = `${FOCUSTRAP_ATTRIBUTE}-contain`;
|
|
4
4
|
const FOCUSTRAP_ATTRIBUTE_NOESCAPE = `${FOCUSTRAP_ATTRIBUTE}-noescape`;
|
|
5
|
+
const FOCUSTRAP_EVENT_NAME = `${FOCUSTRAP_ATTRIBUTE}:focus`;
|
|
5
6
|
const FOCUSTRAP_EVENT_OPTIONS = {
|
|
6
7
|
capture: true,
|
|
7
8
|
passive: false
|
|
@@ -11,5 +12,4 @@ const FOCUSTRAP_SELECTOR = `[${FOCUSTRAP_ATTRIBUTE}]`;
|
|
|
11
12
|
const FOCUSTRAP_SYMBOL = Symbol(FOCUSTRAP_ATTRIBUTE);
|
|
12
13
|
const disabledFocusTraps = /* @__PURE__ */ new Set();
|
|
13
14
|
const focusTraps = /* @__PURE__ */ new WeakMap();
|
|
14
|
-
|
|
15
|
-
export { FOCUSTRAP_ATTRIBUTE, FOCUSTRAP_ATTRIBUTE_CONTAIN, FOCUSTRAP_ATTRIBUTE_NOESCAPE, FOCUSTRAP_EVENT_OPTIONS, FOCUSTRAP_MESSAGE, FOCUSTRAP_SELECTOR, FOCUSTRAP_SYMBOL, disabledFocusTraps, focusTraps };
|
|
15
|
+
export { FOCUSTRAP_ATTRIBUTE, FOCUSTRAP_ATTRIBUTE_CONTAIN, FOCUSTRAP_ATTRIBUTE_NOESCAPE, FOCUSTRAP_EVENT_NAME, FOCUSTRAP_EVENT_OPTIONS, FOCUSTRAP_MESSAGE, FOCUSTRAP_SELECTOR, FOCUSTRAP_SYMBOL, disabledFocusTraps, focusTraps };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as createFocusTrap } from "../focus-trap.embedded-BVXcd4OO.mjs";
|
|
2
|
+
import { l as OuiFocusTrap, u as OuiFocusTrapOptions } from "../focus-trap.model-wg0iAZ7x.mjs";
|
|
3
3
|
export { type OuiFocusTrap, type OuiFocusTrapOptions, createFocusTrap };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { createFocusTrap };
|
|
1
|
+
export { createFocusTrap } from "./focus-trap.embedded.mjs";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/js/focus-trap/focus-trap.embedded.d.ts
|
|
1
|
+
import { l as OuiFocusTrap, u as OuiFocusTrapOptions } from "./focus-trap.model-wg0iAZ7x.mjs";
|
|
3
2
|
/**
|
|
4
3
|
* Creates _(or retrieves)_ a _focus trap_ for an element
|
|
5
4
|
*
|
|
@@ -9,5 +8,4 @@ import { c as OuiFocusTrap, l as OuiFocusTrapOptions } from "./focus-trap.model-
|
|
|
9
8
|
*/
|
|
10
9
|
declare function createFocusTrap(element: Element, options?: OuiFocusTrapOptions): OuiFocusTrap;
|
|
11
10
|
declare function removeFocusTrap(element: Element): void;
|
|
12
|
-
//#endregion
|
|
13
11
|
export { removeFocusTrap as n, createFocusTrap as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/js/focus-trap/focus-trap.model.d.ts
|
|
2
1
|
type OuiFocusTrap = {
|
|
3
2
|
[FOCUSTRAP_SYMBOL]: OuiFocusTrapState;
|
|
4
3
|
/**
|
|
@@ -64,11 +63,11 @@ type OuiFocusTrapState = {
|
|
|
64
63
|
declare const FOCUSTRAP_ATTRIBUTE = "oui-focus-trap";
|
|
65
64
|
declare const FOCUSTRAP_ATTRIBUTE_CONTAIN: string;
|
|
66
65
|
declare const FOCUSTRAP_ATTRIBUTE_NOESCAPE: string;
|
|
66
|
+
declare const FOCUSTRAP_EVENT_NAME: string;
|
|
67
67
|
declare const FOCUSTRAP_EVENT_OPTIONS: AddEventListenerOptions;
|
|
68
68
|
declare const FOCUSTRAP_MESSAGE = "Element must be an HTMLElement or SVGElement";
|
|
69
69
|
declare const FOCUSTRAP_SELECTOR: string;
|
|
70
70
|
declare const FOCUSTRAP_SYMBOL: unique symbol;
|
|
71
71
|
declare const disabledFocusTraps: Set<OuiFocusTrap>;
|
|
72
72
|
declare const focusTraps: WeakMap<Element, OuiFocusTrap>;
|
|
73
|
-
|
|
74
|
-
export { FOCUSTRAP_MESSAGE as a, OuiFocusTrap as c, disabledFocusTraps as d, focusTraps as f, FOCUSTRAP_EVENT_OPTIONS as i, OuiFocusTrapOptions as l, FOCUSTRAP_ATTRIBUTE_CONTAIN as n, FOCUSTRAP_SELECTOR as o, FOCUSTRAP_ATTRIBUTE_NOESCAPE as r, FOCUSTRAP_SYMBOL as s, FOCUSTRAP_ATTRIBUTE as t, OuiFocusTrapState as u };
|
|
73
|
+
export { FOCUSTRAP_EVENT_OPTIONS as a, FOCUSTRAP_SYMBOL as c, OuiFocusTrapState as d, disabledFocusTraps as f, FOCUSTRAP_EVENT_NAME as i, OuiFocusTrap as l, FOCUSTRAP_ATTRIBUTE_CONTAIN as n, FOCUSTRAP_MESSAGE as o, focusTraps as p, FOCUSTRAP_ATTRIBUTE_NOESCAPE as r, FOCUSTRAP_SELECTOR as s, FOCUSTRAP_ATTRIBUTE as t, OuiFocusTrapOptions as u };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { k as GridState } from "../grid.model-SiNst5db.mjs";
|
|
2
|
+
export declare function getGridElements(state: GridState): HTMLElement[];
|
|
3
|
+
export declare function getGridColumns(state: GridState): [number, number | undefined] | undefined;
|
|
4
|
+
export declare function getGridPlaceholder(original?: HTMLElement): HTMLElement;
|
|
5
|
+
export declare function setGridColumns(state: GridState, value: unknown): void;
|
|
6
|
+
export declare function updateGridPositions(state: GridState): void;
|
|
7
|
+
export declare function updateGridResizables(state: GridState): void;
|