@oscarpalmer/oui 0.42.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 +6 -7
- 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 +2 -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 -1
- package/dist/js/combobox/combobox.misc.d.mts +1 -1
- package/dist/js/combobox/combobox.misc.mjs +1 -1
- 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 -1
- 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-Dv_h9Kns.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.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.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 +2 -4
- package/dist/js/internal/option-list/option-list.data.mjs +1 -1
- package/dist/js/internal/option-list/option-list.dom.d.mts +3 -5
- package/dist/js/internal/option-list/option-list.dom.mjs +1 -1
- 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 -1
- 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.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 -1
- package/dist/js/listbox/listbox.event.d.mts +3 -5
- package/dist/js/listbox/listbox.event.mjs +1 -1
- package/dist/js/listbox/listbox.misc.d.mts +1 -1
- package/dist/js/listbox/listbox.misc.mjs +1 -1
- 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 -1
- 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 +2 -3
- 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.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 +113 -38
- package/dist/js/resizable/resizable.model.d.mts +2 -2
- package/dist/js/resizable/resizable.model.mjs +8 -3
- package/dist/js/resizable/resizable.standalone.d.mts +3 -3
- package/dist/js/resizable/resizable.standalone.mjs +3 -1
- package/dist/js/{resizable.embedded-D9mb-Wm_.d.mts → resizable.embedded-DQclAEP-.d.mts} +3 -4
- package/dist/js/{resizable.model-vCxaFdOA.d.mts → resizable.model-BOufXDXx.d.mts} +18 -3
- 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.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 +4 -4
- 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 +1 -2
- 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
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { r as OuiListboxState, t as OuiListboxFooter } from "../listbox.model-
|
|
2
|
-
//#region src/js/listbox/listbox.dom.d.ts
|
|
1
|
+
import { r as OuiListboxState, t as OuiListboxFooter } from "../listbox.model-CUA_DaR9.mjs";
|
|
3
2
|
export declare function createListboxFooter(): OuiListboxFooter;
|
|
4
|
-
export declare function updateListboxFooter(state: OuiListboxState): void;
|
|
5
|
-
//#endregion
|
|
3
|
+
export declare function updateListboxFooter(state: OuiListboxState): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { p as createListboxFooter, m as updateListboxFooter } from "../listbox.state-
|
|
1
|
+
export { p as createListboxFooter, m as updateListboxFooter } from "../listbox.state-DO58GDqc.mjs";
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as OuiListboxState } from "../listbox.model-
|
|
3
|
-
//#region src/js/listbox/listbox.event.d.ts
|
|
1
|
+
import { b as OptionListPreview } from "../option-list.model-DNZq-X0d.mjs";
|
|
2
|
+
import { r as OuiListboxState } from "../listbox.model-CUA_DaR9.mjs";
|
|
4
3
|
export declare function onListboxApply(state: OuiListboxState): void;
|
|
5
4
|
export declare function onListboxEnter(state: OuiListboxState): void;
|
|
6
5
|
export declare function onListboxFilter(preview: OptionListPreview, state: OuiListboxState, _: boolean, active?: Element): void;
|
|
7
6
|
export declare function onListboxNavigation(preview: OptionListPreview, state: OuiListboxState, active?: HTMLElement): void;
|
|
8
|
-
export declare function onListboxToggle(state: OuiListboxState): void;
|
|
9
|
-
//#endregion
|
|
7
|
+
export declare function onListboxToggle(state: OuiListboxState): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { c as onListboxApply, l as onListboxEnter, u as onListboxFilter, d as onListboxNavigation, f as onListboxToggle } from "../listbox.state-
|
|
1
|
+
export { c as onListboxApply, l as onListboxEnter, u as onListboxFilter, d as onListboxNavigation, f as onListboxToggle } from "../listbox.state-DO58GDqc.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as setListboxLocalizations, t as getListboxId } from "../listbox.misc-
|
|
1
|
+
import { n as setListboxLocalizations, t as getListboxId } from "../listbox.misc-CkW28nUS.mjs";
|
|
2
2
|
export { getListboxId, setListboxLocalizations };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { o as getListboxId, s as setListboxLocalizations } from "../listbox.state-
|
|
1
|
+
export { o as getListboxId, s as setListboxLocalizations } from "../listbox.state-DO58GDqc.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as OuiListboxStateExtras, n as OuiListboxLocalizations, r as OuiListboxState, t as OuiListboxFooter } from "../listbox.model-
|
|
1
|
+
import { i as OuiListboxStateExtras, n as OuiListboxLocalizations, r as OuiListboxState, t as OuiListboxFooter } from "../listbox.model-CUA_DaR9.mjs";
|
|
2
2
|
export { OuiListboxFooter, OuiListboxLocalizations, OuiListboxState, OuiListboxStateExtras };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { u as OuiDefaultLocalizations } from "../l10n.model-
|
|
2
|
-
import { n as OuiListboxLocalizations, r as OuiListboxState } from "../listbox.model-
|
|
3
|
-
//#region src/js/listbox/listbox.state.d.ts
|
|
1
|
+
import { u as OuiDefaultLocalizations } from "../l10n.model-DxwLXnFl.mjs";
|
|
2
|
+
import { n as OuiListboxLocalizations, r as OuiListboxState } from "../listbox.model-CUA_DaR9.mjs";
|
|
4
3
|
export declare function initializeListbox(element: Element, state: OuiListboxState): void;
|
|
5
4
|
export declare function onAttachListbox(state: OuiListboxState): void;
|
|
6
5
|
export declare function onDetachListbox(state: OuiListboxState): void;
|
|
7
6
|
export declare const listboxLocalizations: OuiDefaultLocalizations<OuiListboxLocalizations>;
|
|
8
|
-
export declare const listboxes: Set<OuiListboxState>;
|
|
9
|
-
//#endregion
|
|
7
|
+
export declare const listboxes: Set<OuiListboxState>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as initializeListbox, n as listboxLocalizations, r as listboxes, i as onAttachListbox, a as onDetachListbox } from "../listbox.state-
|
|
1
|
+
export { t as initializeListbox, n as listboxLocalizations, r as listboxes, i as onAttachListbox, a as onDetachListbox } from "../listbox.state-DO58GDqc.mjs";
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/js/listbox/listbox.constants.d.ts
|
|
1
|
+
import { p as OptionListAttributes } from "./option-list.model-DNZq-X0d.mjs";
|
|
3
2
|
declare const LISTBOX_TAGNAME = "oui-listbox";
|
|
4
3
|
declare const LISTBOX_SYMBOL: unique symbol;
|
|
5
4
|
declare const listboxAttributes: OptionListAttributes;
|
|
6
5
|
declare const listboxMessages: Record<string, string>;
|
|
7
6
|
declare const listboxSelectors: Record<string, string>;
|
|
8
|
-
//#endregion
|
|
9
7
|
export { listboxSelectors as a, listboxMessages as i, LISTBOX_TAGNAME as n, listboxAttributes as r, LISTBOX_SYMBOL as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/js/listbox/listbox.misc.d.ts
|
|
1
|
+
import { v as OptionListLocalizationValues } from "./option-list.model-DNZq-X0d.mjs";
|
|
3
2
|
declare function getListboxId(): string;
|
|
4
3
|
/**
|
|
5
4
|
* Set listbox localizations for a specific language
|
|
@@ -20,5 +19,4 @@ declare function setListboxLocalizations(localizations: Partial<OptionListLocali
|
|
|
20
19
|
* @param localizations Localizations for one or more languages
|
|
21
20
|
*/
|
|
22
21
|
declare function setListboxLocalizations(localizations: Record<string, Partial<OptionListLocalizationValues>>): void;
|
|
23
|
-
//#endregion
|
|
24
22
|
export { setListboxLocalizations as n, getListboxId as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/js/listbox/listbox.model.d.ts
|
|
1
|
+
import { v as OptionListLocalizationValues, x as OptionListState } from "./option-list.model-DNZq-X0d.mjs";
|
|
3
2
|
type OuiListboxFooter = {
|
|
4
3
|
button: OuiListboxFooterButton;
|
|
5
4
|
container: Element;
|
|
@@ -16,5 +15,4 @@ type OuiListboxState = OptionListState<OuiListboxStateExtras, OuiListboxLocaliza
|
|
|
16
15
|
type OuiListboxStateExtras = {
|
|
17
16
|
footer: OuiListboxFooter;
|
|
18
17
|
};
|
|
19
|
-
//#endregion
|
|
20
18
|
export { OuiListboxStateExtras as i, OuiListboxLocalizations as n, OuiListboxState as r, OuiListboxFooter as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createDefaultLocalizations, createLocalizations } from "./internal/l10n/index.mjs";
|
|
2
2
|
import { getBooleanAriaValue } from "./internal/misc.mjs";
|
|
3
|
-
import { c as createOptionListContent, n as filterOptionList, o as setOptionListValues, s as toggleOptionListOption, t as applyOptionListSelection, x as generateOptionListIds, y as updateOptionListPreview } from "./option-list.data-
|
|
3
|
+
import { c as createOptionListContent, n as filterOptionList, o as setOptionListValues, s as toggleOptionListOption, t as applyOptionListSelection, x as generateOptionListIds, y as updateOptionListPreview } from "./option-list.data-Be6wopy9.mjs";
|
|
4
4
|
import { initializeOptionListState } from "./internal/option-list/option-list.state.mjs";
|
|
5
|
-
import { processOptionListKeydown } from "./internal/option-list/option-list.event.mjs";
|
|
6
5
|
import { LISTBOX_SYMBOL, LISTBOX_TAGNAME, listboxAttributes, listboxMessages, listboxSelectors } from "./listbox/listbox.constants.mjs";
|
|
6
|
+
import { processOptionListKeydown } from "./internal/option-list/option-list.event.mjs";
|
|
7
7
|
import { getAria, setAria } from "@oscarpalmer/toretto/aria";
|
|
8
8
|
import { setAttributes } from "@oscarpalmer/toretto/attribute";
|
|
9
9
|
import { on } from "@oscarpalmer/toretto/event";
|
|
@@ -11,7 +11,7 @@ import { findAncestor } from "@oscarpalmer/toretto/find";
|
|
|
11
11
|
import { noop } from "@oscarpalmer/atoms/function";
|
|
12
12
|
import { createElement } from "@oscarpalmer/toretto/create";
|
|
13
13
|
import { getData } from "@oscarpalmer/toretto/data";
|
|
14
|
-
|
|
14
|
+
// src/js/listbox/listbox.dom.ts
|
|
15
15
|
function createListboxFooter() {
|
|
16
16
|
const container = createElement("div", { attribute: { [`${LISTBOX_TAGNAME}-footer`]: "" } });
|
|
17
17
|
const clear = createElement("button", {
|
|
@@ -36,8 +36,7 @@ function updateListboxFooter(state) {
|
|
|
36
36
|
setAria(footer.button.clear, "disabled", disabled || readonly || options.selected.length === 0);
|
|
37
37
|
setAria(footer.button.select, "disabled", disabled || readonly || options.selected.length === options.all.length);
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
//#region src/js/listbox/listbox.event.ts
|
|
39
|
+
// src/js/listbox/listbox.event.ts
|
|
41
40
|
function onListboxApply(state) {
|
|
42
41
|
updateListboxFooter(state);
|
|
43
42
|
}
|
|
@@ -97,8 +96,7 @@ function onListboxToggle(state) {
|
|
|
97
96
|
on(document, "click", onListboxClick);
|
|
98
97
|
on(document, "input", onListboxInput);
|
|
99
98
|
on(document, "keydown", onListboxKeydown, { passive: false });
|
|
100
|
-
|
|
101
|
-
//#region src/js/listbox/listbox.misc.ts
|
|
99
|
+
// src/js/listbox/listbox.misc.ts
|
|
102
100
|
function getListboxId() {
|
|
103
101
|
index += 1;
|
|
104
102
|
return `oui_listbox_${index}`;
|
|
@@ -108,13 +106,12 @@ function setListboxLocalizations(first, second) {
|
|
|
108
106
|
else listboxLocalizations.setLanguages(first, second);
|
|
109
107
|
}
|
|
110
108
|
let index = 0;
|
|
111
|
-
|
|
112
|
-
//#region src/js/listbox/listbox.state.ts
|
|
109
|
+
// src/js/listbox/listbox.state.ts
|
|
113
110
|
function createComponentState(element, state) {
|
|
114
111
|
const select = element.querySelector("select");
|
|
115
|
-
if (!(select instanceof HTMLSelectElement)) throw new
|
|
112
|
+
if (!(select instanceof HTMLSelectElement)) throw new TypeError(listboxMessages.select);
|
|
116
113
|
const label = element.querySelector(`label[for="${select.id}"]`);
|
|
117
|
-
if (!(label instanceof HTMLLabelElement)) throw new
|
|
114
|
+
if (!(label instanceof HTMLLabelElement)) throw new TypeError(listboxMessages.label);
|
|
118
115
|
element.id = select.id;
|
|
119
116
|
const disabled = getBooleanAriaValue(element, "disabled") || select.disabled;
|
|
120
117
|
const multiple = element.multiple || select.multiple;
|
|
@@ -236,5 +233,4 @@ const listboxLocalizations = createDefaultLocalizations({
|
|
|
236
233
|
selected: (amount) => `${amount} selected`
|
|
237
234
|
});
|
|
238
235
|
const listboxes = /* @__PURE__ */ new Set();
|
|
239
|
-
//#endregion
|
|
240
236
|
export { onDetachListbox as a, onListboxApply as c, onListboxNavigation as d, onListboxToggle as f, onAttachListbox as i, onListboxEnter as l, updateListboxFooter as m, listboxLocalizations as n, getListboxId as o, createListboxFooter as p, listboxes as r, setListboxLocalizations as s, initializeListbox as t, onListboxFilter as u };
|
package/dist/js/menu/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createEmbeddedFloatable, getOnBeforeToggleListener } from "../floatable/floatable.embedded.mjs";
|
|
2
2
|
import { attributable } from "../internal/attributable.mjs";
|
|
3
|
-
import { NAVIGABLE_KEYS_HORIZONTAL, NAVIGABLE_KEYS_VERTICAL, NAVIGABLE_SYMBOL } from "../internal/navigable/navigable.model.mjs";
|
|
4
3
|
import { getNavigable, updateNavigableFocus } from "../internal/navigable/index.mjs";
|
|
4
|
+
import { NAVIGABLE_KEYS_HORIZONTAL, NAVIGABLE_KEYS_VERTICAL, NAVIGABLE_SYMBOL } from "../internal/navigable/navigable.model.mjs";
|
|
5
5
|
import { MENUBAR_ATTRIBUTE, MENUBAR_SELECTOR_ITEM, MENU_ATTRIBUTE, MENU_ATTRIBUTE_POSITION, MENU_MENUBAR_SELECTORS, MENU_SELECTOR_CONTENT, MENU_SELECTOR_ITEM, MENU_SELECTOR_TOGGLE, menubars, menus } from "./menu.model.mjs";
|
|
6
6
|
import { setAria, setRole } from "@oscarpalmer/toretto/aria";
|
|
7
7
|
import { setAttribute, setAttributes } from "@oscarpalmer/toretto/attribute";
|
|
8
8
|
import { on } from "@oscarpalmer/toretto/event";
|
|
9
9
|
import { findAncestor } from "@oscarpalmer/toretto/find";
|
|
10
|
-
|
|
10
|
+
// src/js/menu/index.ts
|
|
11
11
|
function OuiMenu(element, navigable) {
|
|
12
12
|
const state = navigable[NAVIGABLE_SYMBOL];
|
|
13
13
|
this.content = state.element;
|
|
@@ -167,5 +167,4 @@ function removeMenubar(element) {
|
|
|
167
167
|
let index = 0;
|
|
168
168
|
attributable(MENU_ATTRIBUTE, addMenu, removeMenu);
|
|
169
169
|
attributable(MENUBAR_ATTRIBUTE, addMenubar, removeMenubar);
|
|
170
|
-
//#endregion
|
|
171
170
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { c as OuiFloatable } from "../floatable.model-
|
|
2
|
-
import { d as OuiNavigable, m as OuiNavigableOptions } from "../navigable.model-
|
|
3
|
-
//#region src/js/menu/menu.model.d.ts
|
|
1
|
+
import { c as OuiFloatable } from "../floatable.model-jS5Ui5Av.mjs";
|
|
2
|
+
import { d as OuiNavigable, m as OuiNavigableOptions } from "../navigable.model-CrzJqKE7.mjs";
|
|
4
3
|
export type OuiBasicMenu = {
|
|
5
4
|
destroy(): void;
|
|
6
5
|
};
|
|
@@ -29,5 +28,4 @@ export declare const MENUBAR_SELECTOR: string;
|
|
|
29
28
|
export declare const MENUBAR_SELECTOR_ITEM: string;
|
|
30
29
|
export declare const MENU_MENUBAR_SELECTORS: string;
|
|
31
30
|
export declare const menubars: WeakMap<Element, OuiMenubar>;
|
|
32
|
-
export declare const menus: WeakMap<Element, OuiMenu>;
|
|
33
|
-
//#endregion
|
|
31
|
+
export declare const menus: WeakMap<Element, OuiMenu>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../internal/navigable/navigable.model.mjs";
|
|
2
|
-
|
|
2
|
+
// src/js/menu/menu.model.ts
|
|
3
3
|
const MENU_ATTRIBUTE = "oui-menu";
|
|
4
4
|
const MENU_ATTRIBUTE_POSITION = `${MENU_ATTRIBUTE}-position`;
|
|
5
5
|
const MENUBAR_ATTRIBUTE = "oui-menubar";
|
|
@@ -11,5 +11,4 @@ const MENUBAR_SELECTOR_ITEM = `:scope > [${MENUBAR_ATTRIBUTE}-item], :scope > *
|
|
|
11
11
|
const MENU_MENUBAR_SELECTORS = `${MENUBAR_SELECTOR}, ${MENU_SELECTOR_CONTENT}`;
|
|
12
12
|
const menubars = /* @__PURE__ */ new WeakMap();
|
|
13
13
|
const menus = /* @__PURE__ */ new WeakMap();
|
|
14
|
-
//#endregion
|
|
15
14
|
export { MENUBAR_ATTRIBUTE, MENUBAR_SELECTOR, MENUBAR_SELECTOR_ITEM, MENU_ATTRIBUTE, MENU_ATTRIBUTE_POSITION, MENU_MENUBAR_SELECTORS, MENU_SELECTOR_CONTENT, MENU_SELECTOR_ITEM, MENU_SELECTOR_TOGGLE, menubars, menus };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createMovable } from "../movable.embedded-
|
|
1
|
+
import { t as createMovable } from "../movable.embedded-HjPPob-Z.mjs";
|
|
2
2
|
export { createMovable };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { attributable } from "../internal/attributable.mjs";
|
|
2
2
|
import { DRAGGABLE_SYMBOL, draggableGlobals } from "../internal/draggable/draggable.model.mjs";
|
|
3
|
-
import { MOVABLE_ATTRIBUTE, MOVABLE_ATTRIBUTE_CONTAINER, MOVABLE_ATTRIBUTE_DIRECTION, MOVABLE_ATTRIBUTE_MOVING, MOVABLE_CONTAINERS, MOVABLE_MESSAGE, MOVABLE_MOVED, MOVABLE_SELECTOR_HANDLE } from "./movable.model.mjs";
|
|
4
3
|
import { addDraggable, destroyDraggable, getDraggableElement, getDraggableStates, initializeDraggable, removeDraggable } from "../internal/draggable/index.mjs";
|
|
4
|
+
import { MOVABLE_ATTRIBUTE, MOVABLE_ATTRIBUTE_CONTAINER, MOVABLE_ATTRIBUTE_DIRECTION, MOVABLE_ATTRIBUTE_MOVING, MOVABLE_CONTAINERS, MOVABLE_MESSAGE, MOVABLE_MOVED, MOVABLE_SELECTOR_HANDLE } from "./movable.model.mjs";
|
|
5
5
|
import { setAttribute } from "@oscarpalmer/toretto/attribute";
|
|
6
6
|
import { dispatch, getEventPosition, on } from "@oscarpalmer/toretto/event";
|
|
7
7
|
import { isHTMLOrSVGElement } from "@oscarpalmer/toretto/is";
|
|
8
8
|
import { getStyles, setStyle, setStyles } from "@oscarpalmer/toretto/style";
|
|
9
9
|
import { noop } from "@oscarpalmer/atoms/function";
|
|
10
|
-
|
|
10
|
+
// src/js/movable/movable.embedded.ts
|
|
11
11
|
function OuiMovable(element, options) {
|
|
12
12
|
const style = getStyles(element, ["inset", "position"]);
|
|
13
13
|
this[DRAGGABLE_SYMBOL] = initializeDraggable(this, "movable", "move", MOVABLE_ATTRIBUTE, element, {
|
|
@@ -109,7 +109,7 @@ function onEnd(event, item, reset) {
|
|
|
109
109
|
}
|
|
110
110
|
const container = state.container?.getBoundingClientRect();
|
|
111
111
|
if (container != null) setOffset(state, container);
|
|
112
|
-
if (dispatch(state.element, "oui
|
|
112
|
+
if (dispatch(state.element, "oui-movable:end", { detail: {
|
|
113
113
|
from: { ...draggableGlobals.original },
|
|
114
114
|
to: getEventPosition(event)
|
|
115
115
|
} }).defaultPrevented) onCancel(item);
|
|
@@ -158,5 +158,4 @@ const addMovable = addDraggable.bind(bound);
|
|
|
158
158
|
const removeMovable = removeDraggable.bind(bound);
|
|
159
159
|
on(document, "scroll", onScroll);
|
|
160
160
|
attributable(MOVABLE_ATTRIBUTE, addMovable, removeMovable);
|
|
161
|
-
//#endregion
|
|
162
161
|
export { createMovable };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MOVABLE_ATTRIBUTE_MOVING, c as
|
|
2
|
-
export { MOVABLE_ATTRIBUTE, MOVABLE_ATTRIBUTE_CONTAINER, MOVABLE_ATTRIBUTE_DIRECTION, MOVABLE_ATTRIBUTE_HANDLE, MOVABLE_ATTRIBUTE_MOVING, MOVABLE_CONTAINERS, MOVABLE_MESSAGE, MOVABLE_MOVED, MOVABLE_SELECTOR_HANDLE, OuiMovable, OuiMovableState, OuiMovableStyle };
|
|
1
|
+
import { a as MOVABLE_ATTRIBUTE_MOVING, c as MOVABLE_MESSAGE, d as OuiMovable, f as OuiMovableState, i as MOVABLE_ATTRIBUTE_HANDLE, l as MOVABLE_MOVED, n as MOVABLE_ATTRIBUTE_CONTAINER, o as MOVABLE_CONTAINERS, p as OuiMovableStyle, r as MOVABLE_ATTRIBUTE_DIRECTION, s as MOVABLE_EVENT_END, t as MOVABLE_ATTRIBUTE, u as MOVABLE_SELECTOR_HANDLE } from "../movable.model-CQ3AbTrq.mjs";
|
|
2
|
+
export { MOVABLE_ATTRIBUTE, MOVABLE_ATTRIBUTE_CONTAINER, MOVABLE_ATTRIBUTE_DIRECTION, MOVABLE_ATTRIBUTE_HANDLE, MOVABLE_ATTRIBUTE_MOVING, MOVABLE_CONTAINERS, MOVABLE_EVENT_END, MOVABLE_MESSAGE, MOVABLE_MOVED, MOVABLE_SELECTOR_HANDLE, OuiMovable, OuiMovableState, OuiMovableStyle };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
// src/js/movable/movable.model.ts
|
|
2
2
|
const MOVABLE_ATTRIBUTE = "oui-movable";
|
|
3
3
|
const MOVABLE_ATTRIBUTE_CONTAINER = `${MOVABLE_ATTRIBUTE}-container`;
|
|
4
4
|
const MOVABLE_ATTRIBUTE_DIRECTION = `${MOVABLE_ATTRIBUTE}-direction`;
|
|
5
5
|
const MOVABLE_ATTRIBUTE_HANDLE = `${MOVABLE_ATTRIBUTE}-handle`;
|
|
6
6
|
const MOVABLE_ATTRIBUTE_MOVING = `${MOVABLE_ATTRIBUTE}-moving`;
|
|
7
7
|
const MOVABLE_CONTAINERS = /* @__PURE__ */ new Map();
|
|
8
|
+
const MOVABLE_EVENT_END = `${MOVABLE_ATTRIBUTE}:end`;
|
|
8
9
|
const MOVABLE_MESSAGE = "The element must be an instance of HTMLElement or SVGElement";
|
|
9
10
|
const MOVABLE_MOVED = /* @__PURE__ */ new Set();
|
|
10
11
|
const MOVABLE_SELECTOR_HANDLE = `[${MOVABLE_ATTRIBUTE_HANDLE}]`;
|
|
11
|
-
|
|
12
|
-
export { MOVABLE_ATTRIBUTE, MOVABLE_ATTRIBUTE_CONTAINER, MOVABLE_ATTRIBUTE_DIRECTION, MOVABLE_ATTRIBUTE_HANDLE, MOVABLE_ATTRIBUTE_MOVING, MOVABLE_CONTAINERS, MOVABLE_MESSAGE, MOVABLE_MOVED, MOVABLE_SELECTOR_HANDLE };
|
|
12
|
+
export { MOVABLE_ATTRIBUTE, MOVABLE_ATTRIBUTE_CONTAINER, MOVABLE_ATTRIBUTE_DIRECTION, MOVABLE_ATTRIBUTE_HANDLE, MOVABLE_ATTRIBUTE_MOVING, MOVABLE_CONTAINERS, MOVABLE_EVENT_END, MOVABLE_MESSAGE, MOVABLE_MOVED, MOVABLE_SELECTOR_HANDLE };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as createMovable } from "../movable.embedded-
|
|
1
|
+
import { d as OuiMovable, m as CreateOuiDraggableOptions } from "../movable.model-CQ3AbTrq.mjs";
|
|
2
|
+
import { t as createMovable } from "../movable.embedded-HjPPob-Z.mjs";
|
|
3
3
|
export { type CreateOuiDraggableOptions as CreateOuiMovableOptions, type OuiMovable, createMovable };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/js/movable/movable.embedded.d.ts
|
|
1
|
+
import { d as OuiMovable, m as CreateOuiDraggableOptions } from "./movable.model-CQ3AbTrq.mjs";
|
|
3
2
|
/**
|
|
4
3
|
* Creates _(or retrieves)_ a _OuiMovable_ instance for an element
|
|
5
4
|
*
|
|
@@ -7,5 +6,4 @@ import { p as CreateOuiDraggableOptions, u as OuiMovable } from "./movable.model
|
|
|
7
6
|
* @returns _OuiMovable_ instance
|
|
8
7
|
*/
|
|
9
8
|
declare function createMovable(element: Element, options?: CreateOuiDraggableOptions): OuiMovable;
|
|
10
|
-
//#endregion
|
|
11
9
|
export { createMovable as t };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { StyleToggler } from "@oscarpalmer/toretto/style";
|
|
2
2
|
import { PlainObject } from "@oscarpalmer/atoms/models";
|
|
3
3
|
import { EventPosition } from "@oscarpalmer/toretto/models";
|
|
4
|
-
//#region src/js/sortable/sortable.model.d.ts
|
|
5
4
|
type OuiSortable = {
|
|
6
5
|
destroy(): void;
|
|
7
6
|
} & OuiDraggable<OuiSortableState>;
|
|
@@ -28,12 +27,12 @@ declare const SORTABLE_ATTRIBUTE_PLACEHOLDER_DRAG: string;
|
|
|
28
27
|
declare const SORTABLE_ATTRIBUTE_PLACEHOLDER_POSITION: string;
|
|
29
28
|
declare const SORTABLE_ATTRIBUTE_VERTICAL: string;
|
|
30
29
|
declare const SORTABLE_CONTAINERS: Map<HTMLElement, Set<OuiSortable>>;
|
|
30
|
+
declare const SORTABLE_EVENT_END: string;
|
|
31
|
+
declare const SORTABLE_EVENT_PLACEHOLDER: string;
|
|
31
32
|
declare const SORTABLE_MESSAGE = "The element must be an instance of HTMLElement or SVGElement";
|
|
32
33
|
declare const SORTABLE_SELECTOR: string;
|
|
33
34
|
declare const SORTABLE_SELECTOR_ITEM: string;
|
|
34
35
|
declare const sortablePlaceholder: OuiSortablePlaceholder;
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/js/internal/draggable/draggable.model.d.ts
|
|
37
36
|
type CreateOuiDraggableOptions = {
|
|
38
37
|
/**
|
|
39
38
|
* Container to hold the draggable element and restrict its movement within. Can be `body`, `document`, `window`, a _CSS_ selector, or an element. _(If not provided, the draggable element will not have any constraints)_
|
|
@@ -53,6 +52,15 @@ interface OuiDraggable<ExtraState extends PlainObject> {
|
|
|
53
52
|
type OuiDragBegin<State extends PlainObject> = (event: MouseEvent | TouchEvent, item: OuiDraggableItem<State>, element: Element, handle: Element, position: EventPosition) => void;
|
|
54
53
|
type OuiDragCancel<State extends PlainObject> = (item: OuiDraggableItem<State>) => void;
|
|
55
54
|
type OuiDragEnd<State extends PlainObject> = (event: MouseEvent | TouchEvent, item: OuiDraggableItem<State>, reset: () => void) => void;
|
|
55
|
+
declare class OuiDraggableEvent extends CustomEvent<OuiDraggableEventDetail> {}
|
|
56
|
+
type OuiDraggableEventDetail = {
|
|
57
|
+
element: Element;
|
|
58
|
+
position?: OuiDraggableEventDetailPosition;
|
|
59
|
+
};
|
|
60
|
+
type OuiDraggableEventDetailPosition = {
|
|
61
|
+
next?: EventPosition;
|
|
62
|
+
original: EventPosition;
|
|
63
|
+
};
|
|
56
64
|
type OuiDragMove<State extends PlainObject> = (event: MouseEvent | TouchEvent, item: OuiDraggableItem<State>, position: OuiDragMovePosition) => PlainObject | undefined;
|
|
57
65
|
type OuiDragMovePosition = {
|
|
58
66
|
calculated: EventPosition;
|
|
@@ -151,8 +159,6 @@ declare const draggableStyles: {
|
|
|
151
159
|
};
|
|
152
160
|
declare const draggableStyleToggler: StyleToggler;
|
|
153
161
|
declare const draggableVerticals: Set<OuiDraggableDirection>;
|
|
154
|
-
//#endregion
|
|
155
|
-
//#region src/js/movable/movable.model.d.ts
|
|
156
162
|
type OuiMovable = {
|
|
157
163
|
/**
|
|
158
164
|
* The movable element
|
|
@@ -179,8 +185,8 @@ declare const MOVABLE_ATTRIBUTE_DIRECTION: string;
|
|
|
179
185
|
declare const MOVABLE_ATTRIBUTE_HANDLE: string;
|
|
180
186
|
declare const MOVABLE_ATTRIBUTE_MOVING: string;
|
|
181
187
|
declare const MOVABLE_CONTAINERS: Map<Element, Set<OuiMovable>>;
|
|
188
|
+
declare const MOVABLE_EVENT_END: string;
|
|
182
189
|
declare const MOVABLE_MESSAGE = "The element must be an instance of HTMLElement or SVGElement";
|
|
183
190
|
declare const MOVABLE_MOVED: Set<OuiMovable>;
|
|
184
191
|
declare const MOVABLE_SELECTOR_HANDLE: string;
|
|
185
|
-
|
|
186
|
-
export { OuiSortable as $, OuiDraggableGlobals as A, OuiDraggableOptionsDrag as B, OuiDragCancel as C, OuiDraggable as D, OuiDragMovePosition as E, OuiDraggableOptionsContainer as F, OuiDraggableStates as G, OuiDraggableOptionsPositionGetOffset as H, OuiDraggableOptionsContainerOnDestroy as I, draggableHorizontals as J, draggableContainers as K, OuiDraggableOptionsContainerOnInitialize as L, OuiDraggableInstances as M, OuiDraggableItem as N, OuiDraggableBound as O, OuiDraggableOptions as P, draggableVerticals as Q, OuiDraggableOptionsDirection as R, OuiDragBegin as S, OuiDragMove as T, OuiDraggableOptionsPositionGetOriginal as U, OuiDraggableOptionsPosition as V, OuiDraggableState as W, draggableStyleToggler as X, draggableProperties as Y, draggableStyles as Z, DRAGGABLE_SELECTOR as _, sortablePlaceholder as _t, MOVABLE_ATTRIBUTE_MOVING as a, SORTABLE_ATTRIBUTE_CONNECTIONS as at, DRAGGABLE_SELECTOR_SORTABLE_ITEM as b, MOVABLE_MOVED as c, SORTABLE_ATTRIBUTE_HORIZONTAL as ct, OuiMovableState as d, SORTABLE_ATTRIBUTE_PLACEHOLDER_POSITION as dt, OuiSortablePlaceholder as et, OuiMovableStyle as f, SORTABLE_ATTRIBUTE_VERTICAL as ft, DRAGGABLE_KEY_ESCAPE as g, SORTABLE_SELECTOR_ITEM as gt, DRAGGABLE_ATTRIBUTE_SORTABLE as h, SORTABLE_SELECTOR as ht, MOVABLE_ATTRIBUTE_HANDLE as i, SORTABLE_ATTRIBUTE_ACTIVE as it, OuiDraggableGlobalsElement as j, OuiDraggableDirection as k, MOVABLE_SELECTOR_HANDLE as l, SORTABLE_ATTRIBUTE_ORIGIN as lt, DRAGGABLE_ATTRIBUTE_MOVABLE as m, SORTABLE_MESSAGE as mt, MOVABLE_ATTRIBUTE_CONTAINER as n, OuiSortableState as nt, MOVABLE_CONTAINERS as o, SORTABLE_ATTRIBUTE_CONTAINER as ot, CreateOuiDraggableOptions as p, SORTABLE_CONTAINERS as pt, draggableGlobals as q, MOVABLE_ATTRIBUTE_DIRECTION as r, SORTABLE_ATTRIBUTE as rt, MOVABLE_MESSAGE as s, SORTABLE_ATTRIBUTE_DIRECTION as st, MOVABLE_ATTRIBUTE as t, OuiSortablePlaceholderDrag as tt, OuiMovable as u, SORTABLE_ATTRIBUTE_PLACEHOLDER_DRAG as ut, DRAGGABLE_SELECTOR_MOVABLE_HANDLE as v, OuiDragEnd as w, DRAGGABLE_SYMBOL as x, DRAGGABLE_SELECTOR_SORTABLE_HANDLE as y, OuiDraggableOptionsDirectionOnAfter as z };
|
|
192
|
+
export { draggableStyleToggler as $, OuiDraggableDirection as A, OuiDraggableOptionsContainerOnInitialize as B, OuiDragBegin as C, OuiDragMovePosition as D, OuiDragMove as E, OuiDraggableInstances as F, OuiDraggableOptionsPositionGetOffset as G, OuiDraggableOptionsDirectionOnAfter as H, OuiDraggableItem as I, OuiDraggableStates as J, OuiDraggableOptionsPositionGetOriginal as K, OuiDraggableOptions as L, OuiDraggableEventDetail as M, OuiDraggableGlobals as N, OuiDraggable as O, OuiDraggableGlobalsElement as P, draggableProperties as Q, OuiDraggableOptionsContainer as R, DRAGGABLE_SYMBOL as S, sortablePlaceholder as St, OuiDragEnd as T, OuiDraggableOptionsDrag as U, OuiDraggableOptionsDirection as V, OuiDraggableOptionsPosition as W, draggableGlobals as X, draggableContainers as Y, draggableHorizontals as Z, DRAGGABLE_KEY_ESCAPE as _, SORTABLE_EVENT_END as _t, MOVABLE_ATTRIBUTE_MOVING as a, OuiSortableState as at, DRAGGABLE_SELECTOR_SORTABLE_HANDLE as b, SORTABLE_SELECTOR as bt, MOVABLE_MESSAGE as c, SORTABLE_ATTRIBUTE_CONNECTIONS as ct, OuiMovable as d, SORTABLE_ATTRIBUTE_HORIZONTAL as dt, draggableStyles as et, OuiMovableState as f, SORTABLE_ATTRIBUTE_ORIGIN as ft, DRAGGABLE_ATTRIBUTE_SORTABLE as g, SORTABLE_CONTAINERS as gt, DRAGGABLE_ATTRIBUTE_MOVABLE as h, SORTABLE_ATTRIBUTE_VERTICAL as ht, MOVABLE_ATTRIBUTE_HANDLE as i, OuiSortablePlaceholderDrag as it, OuiDraggableEvent as j, OuiDraggableBound as k, MOVABLE_MOVED as l, SORTABLE_ATTRIBUTE_CONTAINER as lt, CreateOuiDraggableOptions as m, SORTABLE_ATTRIBUTE_PLACEHOLDER_POSITION as mt, MOVABLE_ATTRIBUTE_CONTAINER as n, OuiSortable as nt, MOVABLE_CONTAINERS as o, SORTABLE_ATTRIBUTE as ot, OuiMovableStyle as p, SORTABLE_ATTRIBUTE_PLACEHOLDER_DRAG as pt, OuiDraggableState as q, MOVABLE_ATTRIBUTE_DIRECTION as r, OuiSortablePlaceholder as rt, MOVABLE_EVENT_END as s, SORTABLE_ATTRIBUTE_ACTIVE as st, MOVABLE_ATTRIBUTE as t, draggableVerticals as tt, MOVABLE_SELECTOR_HANDLE as u, SORTABLE_ATTRIBUTE_DIRECTION as ut, DRAGGABLE_SELECTOR as v, SORTABLE_EVENT_PLACEHOLDER as vt, OuiDragCancel as w, DRAGGABLE_SELECTOR_SORTABLE_ITEM as x, SORTABLE_SELECTOR_ITEM as xt, DRAGGABLE_SELECTOR_MOVABLE_HANDLE as y, SORTABLE_MESSAGE as yt, OuiDraggableOptionsContainerOnDestroy as z };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AriaRole, RemovableEventListener } from "@oscarpalmer/toretto/models";
|
|
2
|
-
//#region src/js/internal/navigable/navigable.model.d.ts
|
|
3
2
|
type OuiNavigable = {
|
|
4
3
|
[NAVIGABLE_SYMBOL]: OuiNavigableState;
|
|
5
4
|
destroy(): void;
|
|
@@ -40,5 +39,4 @@ declare const NAVIGABLE_ORIENTATION_HORIZONTAL: OuiNavigableOrientation;
|
|
|
40
39
|
declare const NAVIGABLE_ORIENTATION_VERTICAL: OuiNavigableOrientation;
|
|
41
40
|
declare const NAVIGABLE_ORIENTATIONS: Set<OuiNavigableOrientation>;
|
|
42
41
|
declare const NAVIGABLE_SYMBOL: unique symbol;
|
|
43
|
-
//#endregion
|
|
44
42
|
export { NAVIGABLE_KEYS_NEXT as a, NAVIGABLE_ORIENTATION_HORIZONTAL as c, OuiNavigable as d, OuiNavigableActive as f, OuiNavigableState as g, OuiNavigableOrientation as h, NAVIGABLE_KEYS_HORIZONTAL as i, NAVIGABLE_ORIENTATION_VERTICAL as l, OuiNavigableOptions as m, NAVIGABLE_KEYS_ACTIVATE as n, NAVIGABLE_KEYS_VERTICAL as o, OuiNavigableCallback as p, NAVIGABLE_KEYS_ALL as r, NAVIGABLE_ORIENTATIONS as s, NAVIGABLE_KEYS_ABSOLUTE as t, NAVIGABLE_SYMBOL as u };
|
|
@@ -4,10 +4,11 @@ import { setAria } from "@oscarpalmer/toretto/aria";
|
|
|
4
4
|
import { setAttribute } from "@oscarpalmer/toretto/attribute";
|
|
5
5
|
import { dispatch } from "@oscarpalmer/toretto/event";
|
|
6
6
|
import { filter } from "@oscarpalmer/atoms/array/filter";
|
|
7
|
+
import { getNumber } from "@oscarpalmer/atoms/number";
|
|
7
8
|
import { createElement } from "@oscarpalmer/toretto/create";
|
|
8
9
|
import { getString } from "@oscarpalmer/atoms/string";
|
|
9
10
|
import { getData } from "@oscarpalmer/toretto/data";
|
|
10
|
-
|
|
11
|
+
// src/js/internal/option-list/option-list.misc.ts
|
|
11
12
|
function generateOptionListIds(prefix, select) {
|
|
12
13
|
const elements = [...select.children].flatMap((child) => child instanceof HTMLOptGroupElement ? [child, ...filter([...child.children], (groupChild) => groupChild instanceof HTMLOptionElement)] : child instanceof HTMLOptionElement ? [child] : []);
|
|
13
14
|
const { length } = elements;
|
|
@@ -33,7 +34,7 @@ function setOptionListFilter(state, value) {
|
|
|
33
34
|
function setOptionListLimit(type, state, value) {
|
|
34
35
|
const { component } = state;
|
|
35
36
|
let actual = value;
|
|
36
|
-
if (typeof actual === "string") actual =
|
|
37
|
+
if (typeof actual === "string") actual = getNumber(actual);
|
|
37
38
|
if (typeof actual === "number" && !Number.isNaN(actual) && actual >= 0 ? actual !== component[type] : actual == null) {
|
|
38
39
|
component[type] = actual;
|
|
39
40
|
setAttribute(component.host, type, actual);
|
|
@@ -41,8 +42,7 @@ function setOptionListLimit(type, state, value) {
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
function setOptionListMultiple(element, value) {
|
|
44
|
-
|
|
45
|
-
else element.removeAttribute("multiple");
|
|
45
|
+
setAttribute(element, "multiple", value ? "" : void 0);
|
|
46
46
|
}
|
|
47
47
|
function setProperties(key, state, value) {
|
|
48
48
|
const { component } = state;
|
|
@@ -64,8 +64,7 @@ function setOptionListRequired(state, value) {
|
|
|
64
64
|
setProperties("required", state, value);
|
|
65
65
|
updateOptionListValidity(state);
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
//#region src/js/internal/option-list/option-list.dom.ts
|
|
67
|
+
// src/js/internal/option-list/option-list.dom.ts
|
|
69
68
|
function createOptionListContent(parameters) {
|
|
70
69
|
const element = createElement("div", { attribute: { [parameters.attributes.content]: "" } });
|
|
71
70
|
const filter = createOptionListFilter(parameters);
|
|
@@ -298,8 +297,7 @@ function updateOptionListValueLabel(state) {
|
|
|
298
297
|
else label = autocomplete.none && !listbox ? filter.element.value : options.selected[0]?.textContent ?? "";
|
|
299
298
|
values.label.textContent = label;
|
|
300
299
|
}
|
|
301
|
-
|
|
302
|
-
//#region src/js/internal/option-list/option-list.data.ts
|
|
300
|
+
// src/js/internal/option-list/option-list.data.ts
|
|
303
301
|
function applyOptionListSelection(parameters) {
|
|
304
302
|
const { added, emit, option, scroll, selected, state } = parameters;
|
|
305
303
|
const { component } = state;
|
|
@@ -335,7 +333,7 @@ function filterOptionList(type, state) {
|
|
|
335
333
|
}
|
|
336
334
|
function filterOptionListOption(state, value, textContent) {
|
|
337
335
|
const { options } = state.component;
|
|
338
|
-
const filterTextContent = textContent
|
|
336
|
+
const filterTextContent = textContent === true;
|
|
339
337
|
const filter = getString(value).toLocaleLowerCase();
|
|
340
338
|
filterOptionListOptions(state);
|
|
341
339
|
const { length } = options.all;
|
|
@@ -437,5 +435,4 @@ function toggleOptionListOption(state, option) {
|
|
|
437
435
|
});
|
|
438
436
|
callbacks.data.onToggle(state);
|
|
439
437
|
}
|
|
440
|
-
//#endregion
|
|
441
438
|
export { setOptionListDisabled as C, setOptionListReadonly as D, setOptionListMultiple as E, setOptionListRequired as O, getOptionListVisibleOptions as S, setOptionListLimit as T, createOptionListValueLabel as _, setOptionListValue as a, updateOptionListValueLabel as b, createOptionListContent as c, createOptionListHeader as d, createOptionListInput as f, createOptionListOptions as g, createOptionListOption as h, filterOptionListOptions as i, createOptionListFilter as l, createOptionListMessage as m, filterOptionList as n, setOptionListValues as o, createOptionListList as p, filterOptionListOption as r, toggleOptionListOption as s, applyOptionListSelection as t, createOptionListGroup as u, updateOptionListMessage as v, setOptionListFilter as w, generateOptionListIds as x, updateOptionListPreview as y };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { _ as OuiLocalizationsValues, p as OuiLocalizations } from "./l10n.model-
|
|
1
|
+
import { _ as OuiLocalizationsValues, p as OuiLocalizations } from "./l10n.model-DxwLXnFl.mjs";
|
|
2
2
|
import { PlainObject } from "@oscarpalmer/atoms/models";
|
|
3
3
|
import { RemovableEventListener } from "@oscarpalmer/toretto/models";
|
|
4
|
-
//#region src/js/internal/option-list/option-list.model.d.ts
|
|
5
4
|
type CreateOptionListContent = {
|
|
6
5
|
element: HTMLDivElement;
|
|
7
6
|
filter?: CreateOptionListFilter;
|
|
@@ -165,5 +164,9 @@ type OptionListValues = {
|
|
|
165
164
|
initial: string[];
|
|
166
165
|
label: Element;
|
|
167
166
|
};
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
declare const OPTION_LIST_PREVIEW_NONE: OptionListPreview;
|
|
168
|
+
declare const OPTION_LIST_PREVIEW_SET: OptionListPreview;
|
|
169
|
+
declare const OPTION_LIST_PREVIEW_TYPED: OptionListPreview;
|
|
170
|
+
declare const OPTION_LIST_TYPE_AUTOCOMPLETE: OptionListType;
|
|
171
|
+
declare const OPTION_LIST_TYPE_SELECT: OptionListType;
|
|
172
|
+
export { OptionListType as S, OptionListGroup as _, CreateOptionListList as a, OptionListPreview as b, OPTION_LIST_PREVIEW_NONE as c, OPTION_LIST_TYPE_AUTOCOMPLETE as d, OPTION_LIST_TYPE_SELECT as f, OptionListCallbacks as g, OptionListAutoCompleteType as h, CreateOptionListGroupParameters as i, OPTION_LIST_PREVIEW_SET as l, OptionListAutoComplete as m, CreateOptionListContentParameters as n, CreateOptionListOptionParameters as o, OptionListAttributes as p, CreateOptionListFilter as r, CreateOptionListOptionsParameters as s, CreateOptionListContent as t, OPTION_LIST_PREVIEW_TYPED as u, OptionListLocalizationValues as v, OptionListState as x, OptionListOptions as y };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { n as OuiPopoverState, t as OuiPopover } from "../popover.model-
|
|
2
|
-
//#region src/js/popover/index.d.ts
|
|
1
|
+
import { n as OuiPopoverState, t as OuiPopover } from "../popover.model-CrrIdSmS.mjs";
|
|
3
2
|
declare function OuiPopover(this: OuiPopover, state: OuiPopoverState): void;
|
|
4
3
|
/**
|
|
5
4
|
* Get the _OuiPopover_ for an element
|
|
@@ -8,5 +7,4 @@ declare function OuiPopover(this: OuiPopover, state: OuiPopoverState): void;
|
|
|
8
7
|
* @returns _OuiPopover_ instance
|
|
9
8
|
*/
|
|
10
9
|
export declare function getPopover(element: Element): OuiPopover | undefined;
|
|
11
|
-
//#endregion
|
|
12
10
|
export type { OuiPopover };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../floatable/floatable.model.mjs";
|
|
2
1
|
import { createEmbeddedFloatable, getOnBeforeToggleListener } from "../floatable/floatable.embedded.mjs";
|
|
3
|
-
import
|
|
2
|
+
import "../floatable/floatable.model.mjs";
|
|
4
3
|
import { createFocusTrap } from "../focus-trap/focus-trap.embedded.mjs";
|
|
4
|
+
import { attributable } from "../internal/attributable.mjs";
|
|
5
5
|
import { POPOVER_ATTRIBUTE, POPOVER_ATTRIBUTE_OPEN, POPOVER_SYMBOL, popoverFloatableOptions, popovers } from "./popover.model.mjs";
|
|
6
6
|
import { getAria, setAria } from "@oscarpalmer/toretto/aria";
|
|
7
7
|
import { setAttribute } from "@oscarpalmer/toretto/attribute";
|
|
8
8
|
import { on } from "@oscarpalmer/toretto/event";
|
|
9
9
|
import { isHTMLOrSVGElement } from "@oscarpalmer/toretto/is";
|
|
10
|
-
|
|
10
|
+
// src/js/popover/index.ts
|
|
11
11
|
function OuiPopover(state) {
|
|
12
12
|
this[POPOVER_SYMBOL] = state;
|
|
13
13
|
initialize(state);
|
|
@@ -109,5 +109,4 @@ let ignoreFocus = false;
|
|
|
109
109
|
let index = 0;
|
|
110
110
|
on(document, "pointerdown", onPointerdown, { capture: true });
|
|
111
111
|
attributable(POPOVER_ATTRIBUTE, addPopover, removePopover);
|
|
112
|
-
//#endregion
|
|
113
112
|
export { getPopover };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as POPOVER_SYMBOL, i as POPOVER_ATTRIBUTE_OPEN, n as OuiPopoverState, o as popoverFloatableOptions, r as POPOVER_ATTRIBUTE, s as popovers, t as OuiPopover } from "../popover.model-
|
|
1
|
+
import { a as POPOVER_SYMBOL, i as POPOVER_ATTRIBUTE_OPEN, n as OuiPopoverState, o as popoverFloatableOptions, r as POPOVER_ATTRIBUTE, s as popovers, t as OuiPopover } from "../popover.model-CrrIdSmS.mjs";
|
|
2
2
|
export { OuiPopover, OuiPopoverState, POPOVER_ATTRIBUTE, POPOVER_ATTRIBUTE_OPEN, POPOVER_SYMBOL, popoverFloatableOptions, popovers };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/js/popover/popover.model.ts
|
|
2
2
|
const POPOVER_ATTRIBUTE = "oui-popover";
|
|
3
3
|
const POPOVER_ATTRIBUTE_OPEN = `${POPOVER_ATTRIBUTE}-open`;
|
|
4
4
|
const POPOVER_SYMBOL = Symbol(POPOVER_ATTRIBUTE);
|
|
@@ -8,5 +8,4 @@ const popoverFloatableOptions = {
|
|
|
8
8
|
reusable: false
|
|
9
9
|
};
|
|
10
10
|
const popovers = /* @__PURE__ */ new WeakMap();
|
|
11
|
-
//#endregion
|
|
12
11
|
export { POPOVER_ATTRIBUTE, POPOVER_ATTRIBUTE_OPEN, POPOVER_SYMBOL, popoverFloatableOptions, popovers };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { c as OuiFloatable, l as OuiFloatableOptions } from "./floatable.model-
|
|
2
|
-
import {
|
|
1
|
+
import { c as OuiFloatable, l as OuiFloatableOptions } from "./floatable.model-jS5Ui5Av.mjs";
|
|
2
|
+
import { l as OuiFocusTrap } from "./focus-trap.model-wg0iAZ7x.mjs";
|
|
3
3
|
import { RemovableEventListener } from "@oscarpalmer/toretto/models";
|
|
4
|
-
//#region src/js/popover/popover.model.d.ts
|
|
5
4
|
type OuiPopover = {
|
|
6
5
|
[POPOVER_SYMBOL]: OuiPopoverState;
|
|
7
6
|
/**
|
|
@@ -34,5 +33,4 @@ declare const POPOVER_ATTRIBUTE_OPEN: string;
|
|
|
34
33
|
declare const POPOVER_SYMBOL: unique symbol;
|
|
35
34
|
declare const popoverFloatableOptions: OuiFloatableOptions;
|
|
36
35
|
declare const popovers: WeakMap<Element, OuiPopoverState>;
|
|
37
|
-
//#endregion
|
|
38
36
|
export { POPOVER_SYMBOL as a, POPOVER_ATTRIBUTE_OPEN as i, OuiPopoverState as n, popoverFloatableOptions as o, POPOVER_ATTRIBUTE as r, popovers as s, OuiPopover as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createResizable } from "../resizable.embedded-
|
|
2
|
-
export { createResizable };
|
|
1
|
+
import { n as getResizable, t as createResizable } from "../resizable.embedded-DQclAEP-.mjs";
|
|
2
|
+
export { createResizable, getResizable };
|