@oscarpalmer/oui 0.33.0 → 0.35.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/js/combobox/constants.combobox.d.mts +2 -0
- package/dist/js/combobox/constants.combobox.mjs +46 -0
- package/dist/js/combobox/data.combobox.d.mts +18 -0
- package/dist/js/combobox/data.combobox.mjs +2 -0
- package/dist/js/combobox/dom.combobox.d.mts +110 -0
- package/dist/js/combobox/dom.combobox.mjs +2 -0
- package/dist/js/combobox/event.combobox.d.mts +17 -0
- package/dist/js/combobox/event.combobox.mjs +2 -0
- package/dist/js/combobox/form.combobox.d.mts +6 -0
- package/dist/js/combobox/form.combobox.mjs +2 -0
- package/dist/js/combobox/index.d.mts +2 -0
- package/dist/js/combobox/index.mjs +195 -0
- package/dist/js/combobox/misc.combobox.d.mts +2 -0
- package/dist/js/combobox/misc.combobox.mjs +2 -0
- package/dist/js/combobox/models.combobox.d.mts +2 -0
- package/dist/js/combobox/models.combobox.mjs +1 -0
- package/dist/js/combobox/state.combobox.d.mts +13 -0
- package/dist/js/combobox/state.combobox.mjs +2 -0
- package/dist/js/constants.combobox-h_kyDegw.d.mts +248 -0
- package/dist/js/data.combobox-B8HMkDOh.mjs +1030 -0
- package/dist/js/dialog.mjs +3 -2
- package/dist/js/floatable/floatable.embedded.mjs +4 -4
- package/dist/js/focus-trap/focus-trap.embedded.mjs +3 -3
- package/dist/js/index.d.mts +14 -643
- package/dist/js/index.mjs +19 -4875
- package/dist/js/internal/draggable.mjs +6 -6
- package/dist/js/internal/navigable.mjs +3 -3
- package/dist/js/l10n.d.mts +20 -0
- package/dist/js/l10n.mjs +80 -0
- package/dist/js/menu.d.mts +1 -1
- package/dist/js/menu.mjs +3 -2
- package/dist/js/movable/movable.embedded.mjs +3 -3
- package/dist/js/popover.mjs +1 -1
- package/dist/js/resizable/resizable.embedded.mjs +7 -7
- package/dist/js/sortable/sortable.embedded.mjs +7 -6
- package/dist/js/splitter.mjs +7 -13
- package/dist/js/toolbar.d.mts +1 -1
- package/dist/js/tooltip.mjs +3 -3
- package/package.json +4 -4
- package/src/js/combobox/constants.combobox.ts +62 -0
- package/src/js/combobox/data.combobox.ts +236 -0
- package/src/js/combobox/dom.combobox.ts +825 -0
- package/src/js/combobox/event.combobox.ts +454 -0
- package/src/js/combobox/form.combobox.ts +116 -0
- package/src/js/combobox/index.ts +313 -0
- package/src/js/combobox/misc.combobox.ts +188 -0
- package/src/js/combobox/models.combobox.ts +94 -0
- package/src/js/combobox/state.combobox.ts +247 -0
- package/src/js/index.ts +1 -1
- package/src/js/internal/draggable.ts +3 -3
- package/src/js/l10n.ts +192 -0
- package/src/js/movable/movable.embedded.ts +2 -2
- package/src/js/resizable/resizable.embedded.ts +3 -3
- package/src/js/sortable/sortable.embedded.ts +2 -2
- package/src/js/splitter.ts +2 -2
- package/dist/js/combobox.d.mts +0 -91
- package/dist/js/combobox.mjs +0 -797
- package/src/js/combobox.ts +0 -2410
package/dist/js/dialog.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { ATTRIBUTE_MOVABLE_HANDLE, createMovable } from "./movable/movable.embed
|
|
|
4
4
|
import "./movable/movable.standalone.mjs";
|
|
5
5
|
import { RESIZABLE_ATTRIBUTE_HANDLE, createResizable } from "./resizable/resizable.embedded.mjs";
|
|
6
6
|
import { getAria, setAria } from "@oscarpalmer/toretto/aria";
|
|
7
|
-
import { getAttribute, setAttribute } from "@oscarpalmer/toretto/attribute";
|
|
8
7
|
import { on } from "@oscarpalmer/toretto/event";
|
|
8
|
+
import { getAttribute, setAttribute } from "@oscarpalmer/toretto/attribute";
|
|
9
9
|
import { setStyles } from "@oscarpalmer/toretto/style";
|
|
10
10
|
//#region src/js/dialog.ts
|
|
11
11
|
var OuiDialog = class {
|
|
@@ -88,7 +88,8 @@ function getState(element) {
|
|
|
88
88
|
listeners: [getOnBeforeToggleListener(element), on(element, "toggle", (event) => {
|
|
89
89
|
const { source } = event;
|
|
90
90
|
if (element.open) {
|
|
91
|
-
|
|
91
|
+
const modal = source instanceof HTMLButtonElement && source.command === "show-modal" || element.matches(":modal");
|
|
92
|
+
setAria(element, "modal", modal);
|
|
92
93
|
setAttribute(element, ATTRIBUTE_OPEN, "");
|
|
93
94
|
element.focus();
|
|
94
95
|
setTimeout(() => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getAria } from "@oscarpalmer/toretto/aria";
|
|
2
|
-
import { getAttribute, setAttribute } from "@oscarpalmer/toretto/attribute";
|
|
3
2
|
import { on } from "@oscarpalmer/toretto/event";
|
|
4
|
-
import { setStyle, setStyles } from "@oscarpalmer/toretto/style";
|
|
5
3
|
import { isPlainObject } from "@oscarpalmer/atoms/is";
|
|
4
|
+
import { getAttribute, setAttribute } from "@oscarpalmer/toretto/attribute";
|
|
6
5
|
import { isHTMLOrSVGElement } from "@oscarpalmer/toretto/is";
|
|
6
|
+
import { setStyle, setStyles } from "@oscarpalmer/toretto/style";
|
|
7
7
|
//#region src/js/floatable/floatable.embedded.ts
|
|
8
8
|
var OuiFloatable = class {
|
|
9
9
|
#destroyed = false;
|
|
@@ -111,7 +111,7 @@ function getOptions(input) {
|
|
|
111
111
|
position: object.position != null && object.position in AREAS ? object.position : "below"
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
function getPosition
|
|
114
|
+
function getPosition(state, override) {
|
|
115
115
|
if (override != null && override in AREAS) return override;
|
|
116
116
|
const { anchor, options } = state;
|
|
117
117
|
if (options.attribute == null) return options.position;
|
|
@@ -131,7 +131,7 @@ function removeFloatable(content) {
|
|
|
131
131
|
instances.delete(content);
|
|
132
132
|
}
|
|
133
133
|
function setPosition(state, override) {
|
|
134
|
-
const position = getPosition
|
|
134
|
+
const position = getPosition(state, override);
|
|
135
135
|
const area = AREAS[position];
|
|
136
136
|
setAttribute(state.content, ATTRIBUTE_POSITION, POSITIONS[area]);
|
|
137
137
|
setStyles(state.content, {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { attributable } from "../internal/attributable.mjs";
|
|
2
|
-
import { clamp } from "@oscarpalmer/atoms/number";
|
|
3
|
-
import { setAttribute } from "@oscarpalmer/toretto/attribute";
|
|
4
2
|
import { dispatch, on } from "@oscarpalmer/toretto/event";
|
|
5
|
-
import { findAncestor } from "@oscarpalmer/toretto/find";
|
|
6
3
|
import { isPlainObject } from "@oscarpalmer/atoms/is";
|
|
4
|
+
import { setAttribute } from "@oscarpalmer/toretto/attribute";
|
|
7
5
|
import { isHTMLOrSVGElement } from "@oscarpalmer/toretto/is";
|
|
6
|
+
import { clamp } from "@oscarpalmer/atoms/number";
|
|
7
|
+
import { findAncestor } from "@oscarpalmer/toretto/find";
|
|
8
8
|
import { getFocusable } from "@oscarpalmer/toretto/focusable";
|
|
9
9
|
//#region src/js/focus-trap/focus-trap.embedded.ts
|
|
10
10
|
var OuiFocusTrap = class {
|