@editora/ui-core 0.2.0 → 0.2.1
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/README.md +8 -0
- package/dist/accordion.cjs.js +1 -1
- package/dist/accordion.esm.js +1 -1
- package/dist/alert-dialog.cjs.js +32 -24
- package/dist/alert-dialog.esm.js +48 -40
- package/dist/alert.cjs.js +2 -2
- package/dist/alert.esm.js +2 -2
- package/dist/animated-text.cjs.js +5 -5
- package/dist/animated-text.esm.js +5 -5
- package/dist/app-header.cjs.js +12 -7
- package/dist/app-header.esm.js +12 -7
- package/dist/avatar.cjs.js +3 -3
- package/dist/avatar.esm.js +3 -3
- package/dist/{calendar-o273O28D.js → calendar-CzpWDxLc.js} +5 -4
- package/dist/{calendar-DmxiZrR7.mjs → calendar-DkSDFg33.mjs} +1 -0
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.esm.js +1 -1
- package/dist/chart.cjs.js +13 -7
- package/dist/chart.esm.js +13 -7
- package/dist/collapsible.cjs.js +2 -2
- package/dist/collapsible.esm.js +2 -2
- package/dist/color-picker.cjs.js +3 -3
- package/dist/color-picker.esm.js +3 -3
- package/dist/combobox.cjs.js +3 -3
- package/dist/combobox.esm.js +36 -36
- package/dist/components/ui-alert-dialog.d.ts.map +1 -1
- package/dist/components/ui-app-header.d.ts.map +1 -1
- package/dist/components/ui-calendar.d.ts.map +1 -1
- package/dist/components/ui-chart.d.ts.map +1 -1
- package/dist/components/ui-gantt.d.ts.map +1 -1
- package/dist/components/ui-hover-card.d.ts.map +1 -1
- package/dist/components/ui-inline-edit.d.ts.map +1 -1
- package/dist/components/ui-multi-select.d.ts.map +1 -1
- package/dist/components/ui-sidebar.d.ts.map +1 -1
- package/dist/components/ui-tabs.d.ts.map +1 -1
- package/dist/components/ui-wizard.d.ts.map +1 -1
- package/dist/context-menu.cjs.js +1 -1
- package/dist/context-menu.esm.js +1 -1
- package/dist/data-table.cjs.js +3 -3
- package/dist/data-table.esm.js +3 -3
- package/dist/date-field.cjs.js +2 -2
- package/dist/date-field.esm.js +14 -14
- package/dist/date-picker.cjs.js +3 -3
- package/dist/date-picker.esm.js +4 -4
- package/dist/date-range-picker.cjs.js +3 -3
- package/dist/date-range-picker.esm.js +59 -59
- package/dist/date-range-time-picker.cjs.js +2 -2
- package/dist/date-range-time-picker.esm.js +3 -3
- package/dist/date-time-picker.cjs.js +2 -2
- package/dist/date-time-picker.esm.js +3 -3
- package/dist/{date-time-utils-DdigV4hs.js → date-time-utils-C-4eHTyy.js} +1 -1
- package/dist/{date-time-utils-B4hAkt36.mjs → date-time-utils-zAx4ghvC.mjs} +1 -1
- package/dist/description.cjs.js +4 -4
- package/dist/description.esm.js +4 -4
- package/dist/dialog.cjs.js +2 -2
- package/dist/dialog.esm.js +2 -2
- package/dist/direction-provider.cjs.js +1 -1
- package/dist/direction-provider.esm.js +1 -1
- package/dist/dock.cjs.js +1 -1
- package/dist/dock.esm.js +1 -1
- package/dist/dropdown.cjs.js +1 -1
- package/dist/dropdown.esm.js +1 -1
- package/dist/field-error.cjs.js +1 -1
- package/dist/field-error.esm.js +7 -7
- package/dist/field.cjs.js +1 -1
- package/dist/field.esm.js +29 -29
- package/dist/fieldset.cjs.js +4 -4
- package/dist/fieldset.esm.js +3 -3
- package/dist/file-upload.cjs.js +2 -2
- package/dist/file-upload.esm.js +2 -2
- package/dist/flex.cjs.js +2 -2
- package/dist/flex.esm.js +8 -8
- package/dist/form.cjs.js +4 -4
- package/dist/form.esm.js +4 -4
- package/dist/gantt.cjs.js +7 -5
- package/dist/gantt.esm.js +7 -5
- package/dist/grid.cjs.js +1 -1
- package/dist/grid.esm.js +1 -1
- package/dist/hover-card.cjs.js +1 -1
- package/dist/hover-card.esm.js +11 -8
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/inline-edit.cjs.js +6 -6
- package/dist/inline-edit.esm.js +15 -15
- package/dist/input.cjs.js +1 -1
- package/dist/input.esm.js +1 -1
- package/dist/label.cjs.js +6 -6
- package/dist/label.esm.js +6 -6
- package/dist/masonry-grid.cjs.js +2 -2
- package/dist/masonry-grid.esm.js +11 -11
- package/dist/{menu-item-styles-IGSFLAHu.mjs → menu-item-styles-CdqxPUuw.mjs} +15 -15
- package/dist/{menu-item-styles-B4onAr4C.js → menu-item-styles-DUdyjQ7i.js} +10 -10
- package/dist/menu.cjs.js +1 -1
- package/dist/menu.esm.js +1 -1
- package/dist/menubar.cjs.js +1 -1
- package/dist/menubar.esm.js +1 -1
- package/dist/multi-select.cjs.js +7 -7
- package/dist/multi-select.esm.js +26 -26
- package/dist/number-field.cjs.js +1 -1
- package/dist/number-field.esm.js +1 -1
- package/dist/number-ticker.cjs.js +4 -4
- package/dist/number-ticker.esm.js +10 -10
- package/dist/odometer.cjs.js +7 -7
- package/dist/odometer.esm.js +14 -14
- package/dist/password-field.cjs.js +1 -1
- package/dist/password-field.esm.js +1 -1
- package/dist/pin-input.cjs.js +1 -1
- package/dist/pin-input.esm.js +1 -1
- package/dist/placement-grid.cjs.js +1 -1
- package/dist/placement-grid.esm.js +1 -1
- package/dist/portal.cjs.js +1 -1
- package/dist/portal.esm.js +1 -1
- package/dist/presence.cjs.js +1 -1
- package/dist/presence.esm.js +1 -1
- package/dist/quick-actions.cjs.js +1 -1
- package/dist/quick-actions.esm.js +1 -1
- package/dist/radio.cjs.js +1 -1
- package/dist/radio.esm.js +1 -1
- package/dist/{runtime-CQM6wZOc.mjs → runtime-BRT7E4A8.mjs} +377 -329
- package/dist/runtime-CXw4SGV9.js +5 -0
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.esm.js +1 -1
- package/dist/select.cjs.js +2 -2
- package/dist/select.esm.js +2 -2
- package/dist/separator.cjs.js +6 -6
- package/dist/separator.esm.js +7 -7
- package/dist/sidebar.cjs.js +7 -6
- package/dist/sidebar.esm.js +7 -6
- package/dist/slot.cjs.js +1 -1
- package/dist/slot.esm.js +1 -1
- package/dist/sortable.cjs.js +6 -6
- package/dist/sortable.esm.js +6 -6
- package/dist/split-button.cjs.js +2 -2
- package/dist/split-button.esm.js +2 -2
- package/dist/tabs.cjs.js +11 -6
- package/dist/tabs.esm.js +28 -23
- package/dist/tags-input.cjs.js +2 -2
- package/dist/tags-input.esm.js +2 -2
- package/dist/textarea.cjs.js +2 -2
- package/dist/textarea.esm.js +16 -16
- package/dist/theme.d.ts.map +1 -1
- package/dist/time-field.cjs.js +2 -2
- package/dist/time-field.esm.js +24 -24
- package/dist/time-picker.cjs.js +2 -2
- package/dist/time-picker.esm.js +3 -3
- package/dist/toast.cjs.js +2 -2
- package/dist/toast.esm.js +2 -2
- package/dist/transfer-list.cjs.js +9 -9
- package/dist/transfer-list.esm.js +4 -4
- package/dist/wizard.cjs.js +16 -7
- package/dist/wizard.esm.js +16 -7
- package/package.json +1 -1
- package/dist/runtime-DxCl0A5q.js +0 -5
package/dist/dock.esm.js
CHANGED
|
@@ -639,7 +639,7 @@ class G extends M {
|
|
|
639
639
|
const { el: i, iconEl: c, labelEl: o, badgeEl: l, sticky: h } = n;
|
|
640
640
|
i.setAttribute("data-ui-dock-item", ""), i.style.setProperty("position", "relative"), i.style.setProperty("display", "inline-flex"), i.style.setProperty("align-items", "center"), i.style.setProperty("justify-content", "center"), i.style.setProperty("inline-size", "var(--ui-dock-item-size)"), i.style.setProperty("block-size", "var(--ui-dock-item-size)"), i.style.setProperty("min-inline-size", "var(--ui-dock-item-size)"), i.style.setProperty("min-block-size", "var(--ui-dock-item-size)"), i.style.setProperty("flex", "0 0 var(--ui-dock-item-size)"), i.style.setProperty("box-sizing", "border-box"), i.style.setProperty("background", "transparent"), i.style.setProperty("border", "none"), i.style.setProperty("padding", "0"), i.style.setProperty("margin", "0"), i.style.setProperty("color", "inherit"), i.style.setProperty("text-decoration", "none"), i.style.setProperty("outline", "none"), i.style.setProperty("cursor", n.disabled ? "not-allowed" : "pointer"), i.style.setProperty("transform-origin", a === "horizontal" ? "center bottom" : "center center"), i.style.setProperty("touch-action", "manipulation"), i.hasAttribute("tabindex") || (i.tabIndex = -1);
|
|
641
641
|
const r = i.getAttribute("aria-label"), d = this._itemNames.get(i), u = d && d.composed === r ? d.base : r || o?.textContent?.trim() || i.getAttribute("data-label") || i.getAttribute("title") || "", m = l?.textContent?.trim() ?? "", f = u && m && !u.includes(m) ? `${u}, ${m}` : u;
|
|
642
|
-
f && (f !== r && i.setAttribute("aria-label", f), this._itemNames.set(i, { base: u, composed: f })), h ? i.setAttribute("data-dock-current", "true") : i.removeAttribute("data-dock-current"), c && (c.style.setProperty("display", "inline-flex"), c.style.setProperty("align-items", "center"), c.style.setProperty("justify-content", "center"), c.style.setProperty("inline-size", "100%"), c.style.setProperty("block-size", "100%"), c.style.setProperty("border-radius", "var(--ui-dock-item-radius)"), c.style.setProperty("background", "var(--ui-dock-item-bg)"), c.style.setProperty("border", "1px solid var(--ui-dock-item-border)"), c.style.setProperty("box-shadow", "var(--ui-dock-item-shadow)"), c.style.setProperty("backdrop-filter", "var(--ui-dock-item-backdrop)"), c.style.setProperty("font-size", "var(--ui-dock-icon-size)"), c.style.setProperty("color", "inherit"), c.style.setProperty("overflow", "hidden"), c.style.setProperty("box-sizing", "border-box")), o && (o.setAttribute("aria-hidden", "true"), o.style.setProperty("position", "absolute"), o.style.setProperty("pointer-events", "none"), o.style.setProperty("white-space", "nowrap"), o.style.setProperty("padding", "var(--ui-dock-label-padding)"), o.style.setProperty("border-radius", "var(--ui-dock-label-radius)"), o.style.setProperty("background", "var(--ui-dock-label-bg)"), o.style.setProperty("color", "var(--ui-dock-label-color)"), o.style.setProperty("border", "1px solid var(--ui-dock-label-border)"), o.style.setProperty("box-shadow", "var(--ui-dock-label-shadow)"), o.style.setProperty("backdrop-filter", "var(--ui-dock-label-backdrop)"), o.style.setProperty("font-size", "var(--ui-dock-label-font-size)"), o.style.setProperty("font-weight", "var(--ui-dock-label-font-weight)"), o.style.setProperty("line-height", "1.2"), o.style.setProperty("letter-spacing", "0.01em"), o.style.setProperty("min-inline-size", "max-content"), o.style.setProperty("z-index", "3"), o.style.setProperty("display", t === "none" ? "none" : "inline-flex"), o.style.removeProperty("top"), o.style.removeProperty("bottom"), o.style.removeProperty("left"), o.style.removeProperty("right"), e === "top" ? (o.style.setProperty("left", "50%"), o.style.setProperty("bottom", "calc(100% + var(--ui-dock-label-offset))")) : e === "bottom" ? (o.style.setProperty("left", "50%"), o.style.setProperty("top", "calc(100% + var(--ui-dock-label-offset))")) : e === "start" ? (o.style.setProperty("right", "calc(100% + var(--ui-dock-label-offset))"), o.style.setProperty("top", "50%")) : (o.style.setProperty("left", "calc(100% + var(--ui-dock-label-offset))"), o.style.setProperty("top", "50%"))), l && (l.setAttribute("aria-hidden", "true"), l.style.setProperty("position", "absolute"), l.style.setProperty("inset-inline-end", "-2px"), l.style.setProperty("inset-block-start", "-2px"), l.style.setProperty("display", "inline-flex"), l.style.setProperty("align-items", "center"), l.style.setProperty("justify-content", "center"), l.style.setProperty("min-inline-size", "18px"), l.style.setProperty("min-block-size", "18px"), l.style.setProperty("padding", "0 6px"), l.style.setProperty("border-radius", "999px"), l.style.setProperty("background", "var(--ui-dock-accent)"), l.style.setProperty("color", "#ffffff"), l.style.setProperty("font-size", "11px"), l.style.setProperty("font-weight", "700"), l.style.setProperty("box-shadow", "none"), l.style.setProperty("z-index", "4"));
|
|
642
|
+
f && (f !== r && i.setAttribute("aria-label", f), this._itemNames.set(i, { base: u, composed: f })), h ? i.setAttribute("data-dock-current", "true") : i.removeAttribute("data-dock-current"), c && (c.style.setProperty("display", "inline-flex"), c.style.setProperty("align-items", "center"), c.style.setProperty("justify-content", "center"), c.style.setProperty("inline-size", "100%"), c.style.setProperty("block-size", "100%"), c.style.setProperty("border-radius", "var(--ui-dock-item-radius)"), c.style.setProperty("background", "var(--ui-dock-item-bg)"), c.style.setProperty("border", "1px solid var(--ui-dock-item-border)"), c.style.setProperty("box-shadow", "var(--ui-dock-item-shadow)"), c.style.setProperty("backdrop-filter", "var(--ui-dock-item-backdrop)"), c.style.setProperty("font-size", "var(--ui-dock-icon-size)"), c.style.setProperty("color", "inherit"), c.style.setProperty("overflow", "hidden"), c.style.setProperty("box-sizing", "border-box")), o && (o.setAttribute("aria-hidden", "true"), o.style.setProperty("position", "absolute"), o.style.setProperty("pointer-events", "none"), o.style.setProperty("white-space", "nowrap"), o.style.setProperty("padding", "var(--ui-dock-label-padding)"), o.style.setProperty("border-radius", "var(--ui-dock-label-radius)"), o.style.setProperty("background", "var(--ui-dock-label-bg)"), o.style.setProperty("color", "var(--ui-dock-label-color)"), o.style.setProperty("border", "1px solid var(--ui-dock-label-border)"), o.style.setProperty("box-shadow", "var(--ui-dock-label-shadow)"), o.style.setProperty("backdrop-filter", "var(--ui-dock-label-backdrop)"), o.style.setProperty("font-size", "var(--ui-dock-label-font-size)"), o.style.setProperty("font-weight", "var(--ui-dock-label-font-weight)"), o.style.setProperty("line-height", "1.2"), o.style.setProperty("letter-spacing", "0.01em"), o.style.setProperty("min-inline-size", "max-content"), o.style.setProperty("z-index", "3"), o.style.setProperty("display", t === "none" ? "none" : "inline-flex"), o.style.removeProperty("top"), o.style.removeProperty("bottom"), o.style.removeProperty("left"), o.style.removeProperty("right"), e === "top" ? (o.style.setProperty("left", "50%"), o.style.setProperty("bottom", "calc(100% + var(--ui-dock-label-offset))")) : e === "bottom" ? (o.style.setProperty("left", "50%"), o.style.setProperty("top", "calc(100% + var(--ui-dock-label-offset))")) : e === "start" ? (o.style.setProperty("right", "calc(100% + var(--ui-dock-label-offset))"), o.style.setProperty("top", "50%")) : (o.style.setProperty("left", "calc(100% + var(--ui-dock-label-offset))"), o.style.setProperty("top", "50%"))), l && (l.setAttribute("aria-hidden", "true"), l.style.setProperty("position", "absolute"), l.style.setProperty("inset-inline-end", "-2px"), l.style.setProperty("inset-block-start", "-2px"), l.style.setProperty("display", "inline-flex"), l.style.setProperty("align-items", "center"), l.style.setProperty("justify-content", "center"), l.style.setProperty("min-inline-size", "18px"), l.style.setProperty("min-block-size", "18px"), l.style.setProperty("padding", "0 6px"), l.style.setProperty("border-radius", "999px"), l.style.setProperty("background", "var(--ui-dock-accent)"), l.style.setProperty("color", "var(--ui-color-foreground-on-primary, #ffffff)"), l.style.setProperty("font-size", "11px"), l.style.setProperty("font-weight", "700"), l.style.setProperty("box-shadow", "none"), l.style.setProperty("z-index", "4"));
|
|
643
643
|
});
|
|
644
644
|
}
|
|
645
645
|
_syncTabIndices() {
|
package/dist/dropdown.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("./ElementBase-DxbvhLJs.js"),w=require("./overlay-motion-B56x1GoY.js"),k=require("./trigger-DkPsKxsP.js"),A=require("./menu-item-styles-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("./ElementBase-DxbvhLJs.js"),w=require("./overlay-motion-B56x1GoY.js"),k=require("./trigger-DkPsKxsP.js"),A=require("./menu-item-styles-DUdyjQ7i.js"),l=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]',".item","[data-menu-item]"].join(", "),S=`
|
|
2
2
|
${w.OVERLAY_MOTION_CSS}
|
|
3
3
|
|
|
4
4
|
:host {
|
package/dist/dropdown.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as _ } from "./ElementBase-BeZT54Hj.mjs";
|
|
2
2
|
import { O as x, s as y } from "./overlay-motion-BX3dPLay.mjs";
|
|
3
3
|
import { r as k } from "./trigger-BjnxLCeQ.mjs";
|
|
4
|
-
import { c as A } from "./menu-item-styles-
|
|
4
|
+
import { c as A } from "./menu-item-styles-CdqxPUuw.mjs";
|
|
5
5
|
const l = [
|
|
6
6
|
'[role="menuitem"]',
|
|
7
7
|
'[role="menuitemcheckbox"]',
|
package/dist/field-error.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./ElementBase-DxbvhLJs.js"),u=`
|
|
2
2
|
:host {
|
|
3
|
-
--ui-field-error-color: var(--ui-color-danger, var(--ui-error, #c81e1e));
|
|
3
|
+
--ui-field-error-color: var(--ui-color-danger-text, var(--ui-color-danger, var(--ui-error, #c81e1e)));
|
|
4
4
|
--ui-field-error-size: 12px;
|
|
5
5
|
--ui-field-error-weight: 600;
|
|
6
6
|
--ui-field-error-line-height: 1.45;
|
package/dist/field-error.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as d } from "./ElementBase-BeZT54Hj.mjs";
|
|
2
2
|
const l = `
|
|
3
3
|
:host {
|
|
4
|
-
--ui-field-error-color: var(--ui-color-danger, var(--ui-error, #c81e1e));
|
|
4
|
+
--ui-field-error-color: var(--ui-color-danger-text, var(--ui-color-danger, var(--ui-error, #c81e1e)));
|
|
5
5
|
--ui-field-error-size: 12px;
|
|
6
6
|
--ui-field-error-weight: 600;
|
|
7
7
|
--ui-field-error-line-height: 1.45;
|
|
@@ -76,8 +76,8 @@ function u(e, r) {
|
|
|
76
76
|
function c(e) {
|
|
77
77
|
return Array.from(new Set(e.filter(Boolean)));
|
|
78
78
|
}
|
|
79
|
-
function a(e, r,
|
|
80
|
-
const o = (e.getAttribute(r) || "").split(/\s+/).filter(Boolean), s =
|
|
79
|
+
function a(e, r, t, i) {
|
|
80
|
+
const o = (e.getAttribute(r) || "").split(/\s+/).filter(Boolean), s = i ? c([...o, t]) : o.filter((n) => n !== t);
|
|
81
81
|
s.length ? e.setAttribute(r, s.join(" ")) : e.removeAttribute(r);
|
|
82
82
|
}
|
|
83
83
|
class f extends d {
|
|
@@ -93,8 +93,8 @@ class f extends d {
|
|
|
93
93
|
disconnectedCallback() {
|
|
94
94
|
this._clearAssociation(), super.disconnectedCallback();
|
|
95
95
|
}
|
|
96
|
-
attributeChangedCallback(r,
|
|
97
|
-
|
|
96
|
+
attributeChangedCallback(r, t, i) {
|
|
97
|
+
t !== i && (r === "for" || r === "active" || r === "hidden") && this._syncAssociation();
|
|
98
98
|
}
|
|
99
99
|
render() {
|
|
100
100
|
this.setContent(`
|
|
@@ -105,8 +105,8 @@ class f extends d {
|
|
|
105
105
|
_resolveTarget() {
|
|
106
106
|
const r = this.getAttribute("for");
|
|
107
107
|
if (!r) return null;
|
|
108
|
-
const
|
|
109
|
-
return
|
|
108
|
+
const t = this.getRootNode();
|
|
109
|
+
return t instanceof Document || t instanceof ShadowRoot ? t.getElementById(r) : document.getElementById(r);
|
|
110
110
|
}
|
|
111
111
|
_clearAssociation() {
|
|
112
112
|
this._target && this._errorId && (a(this._target, "aria-describedby", this._errorId, !1), this._target.getAttribute("aria-errormessage") === this._errorId && this._target.removeAttribute("aria-errormessage"), this._target.getAttribute("aria-invalid") === "true" && !this._target.hasAttribute("data-ui-invalid-persist") && this._target.removeAttribute("aria-invalid")), this._target = null;
|
package/dist/field.cjs.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
--ui-field-color: var(--ui-color-text, var(--ui-text, #0f172a));
|
|
10
10
|
--ui-field-label-color: var(--ui-color-text, var(--ui-text, #0f172a));
|
|
11
11
|
--ui-field-description-color: var(--ui-color-muted, var(--ui-muted, #526175));
|
|
12
|
-
--ui-field-error-color: var(--ui-color-danger, var(--ui-error, #c81e1e));
|
|
12
|
+
--ui-field-error-color: var(--ui-color-danger-text, var(--ui-color-danger, var(--ui-error, #c81e1e)));
|
|
13
13
|
--ui-field-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 72%, transparent);
|
|
14
14
|
--ui-field-border: 0;
|
|
15
15
|
--ui-field-shadow:
|
package/dist/field.esm.js
CHANGED
|
@@ -10,7 +10,7 @@ const N = `
|
|
|
10
10
|
--ui-field-color: var(--ui-color-text, var(--ui-text, #0f172a));
|
|
11
11
|
--ui-field-label-color: var(--ui-color-text, var(--ui-text, #0f172a));
|
|
12
12
|
--ui-field-description-color: var(--ui-color-muted, var(--ui-muted, #526175));
|
|
13
|
-
--ui-field-error-color: var(--ui-color-danger, var(--ui-error, #c81e1e));
|
|
13
|
+
--ui-field-error-color: var(--ui-color-danger-text, var(--ui-color-danger, var(--ui-error, #c81e1e)));
|
|
14
14
|
--ui-field-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 72%, transparent);
|
|
15
15
|
--ui-field-border: 0;
|
|
16
16
|
--ui-field-shadow:
|
|
@@ -386,13 +386,13 @@ function C(r) {
|
|
|
386
386
|
}
|
|
387
387
|
function A(r) {
|
|
388
388
|
if (!r) return !1;
|
|
389
|
-
const
|
|
390
|
-
return
|
|
389
|
+
const t = r.assignedNodes({ flatten: !0 });
|
|
390
|
+
return t.length ? t.some((i) => i.nodeType === Node.TEXT_NODE ? !!i.textContent?.trim() : i.nodeType === Node.ELEMENT_NODE) : !1;
|
|
391
391
|
}
|
|
392
392
|
function x(r) {
|
|
393
393
|
if (r.hasAttribute("disabled") || r.getAttribute("aria-disabled") === "true" || r.getAttribute("tabindex") === "-1") return !1;
|
|
394
|
-
const
|
|
395
|
-
return !(
|
|
394
|
+
const t = window.getComputedStyle(r);
|
|
395
|
+
return !(t.display === "none" || t.visibility === "hidden");
|
|
396
396
|
}
|
|
397
397
|
function D(r) {
|
|
398
398
|
return !!r.closest(
|
|
@@ -431,25 +431,25 @@ class M extends $ {
|
|
|
431
431
|
disconnectedCallback() {
|
|
432
432
|
this.root.removeEventListener("click", this._onRootClick), this.root.removeEventListener("slotchange", this._onSlotChange), super.disconnectedCallback();
|
|
433
433
|
}
|
|
434
|
-
attributeChangedCallback(
|
|
435
|
-
if (
|
|
436
|
-
if (
|
|
434
|
+
attributeChangedCallback(t, i, l) {
|
|
435
|
+
if (i !== l) {
|
|
436
|
+
if (t === "for" && this._invalidateControlCache(), t === "label-width") {
|
|
437
437
|
const o = this.getAttribute("label-width");
|
|
438
438
|
o ? this.style.setProperty("--ui-field-label-width", o) : this.style.removeProperty("--ui-field-label-width");
|
|
439
439
|
}
|
|
440
|
-
if (
|
|
440
|
+
if (t === "label" || t === "description" || t === "error" || t === "required" || t === "for") {
|
|
441
441
|
this.isConnected && this.requestRender();
|
|
442
442
|
return;
|
|
443
443
|
}
|
|
444
|
-
|
|
444
|
+
t === "invalid" && this._scheduleDerivedStateSync();
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
_onSlotChange() {
|
|
448
448
|
this._invalidateControlCache(), this._scheduleDerivedStateSync();
|
|
449
449
|
}
|
|
450
|
-
_onRootClick(
|
|
451
|
-
const
|
|
452
|
-
|
|
450
|
+
_onRootClick(t) {
|
|
451
|
+
const i = t.target;
|
|
452
|
+
i && i.closest(".label") && (D(i) || this._focusControl());
|
|
453
453
|
}
|
|
454
454
|
_invalidateControlCache() {
|
|
455
455
|
this._controlCache = null;
|
|
@@ -460,20 +460,20 @@ class M extends $ {
|
|
|
460
460
|
}));
|
|
461
461
|
}
|
|
462
462
|
_focusControl() {
|
|
463
|
-
const
|
|
464
|
-
if (
|
|
463
|
+
const t = this._resolveControlElement();
|
|
464
|
+
if (t)
|
|
465
465
|
try {
|
|
466
|
-
|
|
466
|
+
t.focus({ preventScroll: !0 });
|
|
467
467
|
} catch {
|
|
468
|
-
|
|
468
|
+
t.focus();
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
471
|
_resolveControlElement() {
|
|
472
472
|
if (this._controlCache && this._controlCache.isConnected && x(this._controlCache))
|
|
473
473
|
return this._controlCache;
|
|
474
|
-
const
|
|
475
|
-
if (
|
|
476
|
-
const e = document.getElementById(
|
|
474
|
+
const t = this.getAttribute("for");
|
|
475
|
+
if (t) {
|
|
476
|
+
const e = document.getElementById(t);
|
|
477
477
|
if (e instanceof HTMLElement && x(e))
|
|
478
478
|
return this._controlCache = e, e;
|
|
479
479
|
}
|
|
@@ -490,9 +490,9 @@ class M extends $ {
|
|
|
490
490
|
return o && x(o) ? (this._controlCache = o, o) : null;
|
|
491
491
|
}
|
|
492
492
|
_syncDerivedState() {
|
|
493
|
-
const
|
|
493
|
+
const t = this.root.querySelector('slot[name="label"]'), i = this.root.querySelector('slot[name="actions"]'), l = this.root.querySelector('slot[name="description"]'), o = this.root.querySelector('slot[name="error"]'), e = (this.getAttribute("label") || "").trim(), a = (this.getAttribute("description") || "").trim(), y = (this.getAttribute("error") || "").trim(), n = !!e || A(t), d = A(i), h = !!a || A(l), b = !!y || A(o), w = n || d || h, E = n || d, c = this.root.querySelector(".meta"), p = this.root.querySelector(".label-row"), g = this.root.querySelector(".label"), v = this.root.querySelector(".actions"), u = this.root.querySelector(".description"), m = this.root.querySelector(".error");
|
|
494
494
|
c && (w ? c.removeAttribute("hidden") : c.setAttribute("hidden", "")), p && (E ? p.removeAttribute("hidden") : p.setAttribute("hidden", "")), g && (n ? g.removeAttribute("hidden") : g.setAttribute("hidden", "")), v && (d ? v.removeAttribute("hidden") : v.setAttribute("hidden", "")), u && (h ? u.removeAttribute("hidden") : u.setAttribute("hidden", "")), m && (b ? m.removeAttribute("hidden") : m.setAttribute("hidden", ""));
|
|
495
|
-
const T =
|
|
495
|
+
const T = t ? t.assignedNodes({ flatten: !0 }).map((f) => f.textContent || "").join(" ") : "", s = (f) => f.replace(/\s+/g, " ").trim(), q = (f) => f ? f.assignedNodes({ flatten: !0 }).map((B) => B.textContent || "").join(" ") : "", I = h ? s(a || q(l)) : "", R = b ? s(y || q(o)) : "";
|
|
496
496
|
this._syncControlA11y(
|
|
497
497
|
n,
|
|
498
498
|
s(e || T),
|
|
@@ -500,13 +500,13 @@ class M extends $ {
|
|
|
500
500
|
b
|
|
501
501
|
);
|
|
502
502
|
}
|
|
503
|
-
_syncControlA11y(
|
|
503
|
+
_syncControlA11y(t, i, l, o) {
|
|
504
504
|
const e = this._resolveControlElement();
|
|
505
505
|
if (!e) return;
|
|
506
506
|
const a = `${this._uid}-label`, y = `${this._uid}-description`, n = `${this._uid}-error`, d = (e.getAttribute("aria-labelledby") || "").split(/\s+/).filter((s) => s && s !== a), h = e.getRootNode(), b = d.some((s) => !!h.getElementById?.(s)), w = k(d);
|
|
507
507
|
w.length ? e.setAttribute("aria-labelledby", w.join(" ")) : e.removeAttribute("aria-labelledby");
|
|
508
508
|
const E = e.hasAttribute("aria-label") && !e.hasAttribute(_), c = e.labels, p = (e.getAttribute("label") || "").trim().length > 0, g = (e.textContent || "").trim().length > 0, v = b || E || p || g || !!(c && c.length > 0);
|
|
509
|
-
|
|
509
|
+
t && i && !v ? (e.setAttribute("aria-label", i), e.setAttribute(_, "")) : e.hasAttribute(_) && (e.removeAttribute("aria-label"), e.removeAttribute(_));
|
|
510
510
|
const u = k(
|
|
511
511
|
(e.getAttribute("aria-describedby") || "").split(/\s+/).filter((s) => s && s !== y && s !== n)
|
|
512
512
|
);
|
|
@@ -515,20 +515,20 @@ class M extends $ {
|
|
|
515
515
|
l && !m ? (e.setAttribute("aria-description", l), e.setAttribute(S, "")) : e.hasAttribute(S) && (e.removeAttribute("aria-description"), e.removeAttribute(S)), this.hasAttribute("invalid") || o ? e.setAttribute("aria-invalid", "true") : e.removeAttribute("aria-invalid"), this.hasAttribute("required") ? e.setAttribute("aria-required", "true") : e.removeAttribute("aria-required");
|
|
516
516
|
}
|
|
517
517
|
render() {
|
|
518
|
-
const
|
|
518
|
+
const t = this.getAttribute("label") || "", i = this.getAttribute("description") || "", l = this.getAttribute("error") || "", o = this.hasAttribute("required"), e = this.getAttribute("for") || "";
|
|
519
519
|
this.setContent(`
|
|
520
520
|
<style>${N}</style>
|
|
521
521
|
<div class="frame" part="field">
|
|
522
522
|
<div class="meta" part="meta">
|
|
523
523
|
<div class="label-row" part="top">
|
|
524
524
|
<label class="label" id="${this._uid}-label" ${e ? `for="${C(e)}"` : ""}>
|
|
525
|
-
<slot name="label">${C(
|
|
525
|
+
<slot name="label">${C(t)}</slot>
|
|
526
526
|
${o ? '<span class="required" aria-hidden="true">*</span>' : ""}
|
|
527
527
|
</label>
|
|
528
528
|
<div class="actions" part="actions"><slot name="actions"></slot></div>
|
|
529
529
|
</div>
|
|
530
530
|
<p class="description" id="${this._uid}-description" part="description">
|
|
531
|
-
<slot name="description">${C(
|
|
531
|
+
<slot name="description">${C(i)}</slot>
|
|
532
532
|
</p>
|
|
533
533
|
</div>
|
|
534
534
|
|
|
@@ -543,8 +543,8 @@ class M extends $ {
|
|
|
543
543
|
</div>
|
|
544
544
|
`), this._invalidateControlCache(), this._scheduleDerivedStateSync();
|
|
545
545
|
}
|
|
546
|
-
shouldRenderOnAttributeChange(
|
|
547
|
-
return
|
|
546
|
+
shouldRenderOnAttributeChange(t, i, l) {
|
|
547
|
+
return t === "label" || t === "description" || t === "error" || t === "required" || t === "for";
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
typeof customElements < "u" && !customElements.get("ui-field") && customElements.define("ui-field", M);
|
package/dist/fieldset.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
--ui-fieldset-bg: transparent;
|
|
6
6
|
--ui-fieldset-color: var(--ui-color-text, var(--ui-text, #0f172a));
|
|
7
7
|
--ui-fieldset-muted: var(--ui-color-muted, var(--ui-muted, #526175));
|
|
8
|
-
--ui-fieldset-error: var(--ui-color-danger, var(--ui-error, #c81e1e));
|
|
8
|
+
--ui-fieldset-error: var(--ui-color-danger-text, var(--ui-color-danger, var(--ui-error, #c81e1e)));
|
|
9
9
|
--ui-fieldset-border-color: var(--ui-color-line-subtle, color-mix(in srgb, var(--ui-color-border, #cbd5e1) 68%, transparent));
|
|
10
10
|
--ui-fieldset-border: 0;
|
|
11
11
|
--ui-fieldset-shadow: none;
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
box-shadow: none;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
`;function a(
|
|
196
|
+
`;function a(r){return r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(r){if(!r)return!1;const e=r.assignedNodes({flatten:!0});return e.length?e.some(t=>t.nodeType===Node.TEXT_NODE?!!t.textContent?.trim():t.nodeType===Node.ELEMENT_NODE):!1}function d(r,e){return r.id||(r.id=`ui-fieldset-${e}-${Math.random().toString(36).slice(2,9)}`),r.id}function q(r){return Array.from(new Set(r.filter(Boolean)))}class m extends S.ElementBase{constructor(){super(...arguments),this._stateSyncQueued=!1,this._onSlotChange=()=>{this._updateVisibility(),this._scheduleStateSync()}}static get observedAttributes(){return["legend","description","error","required","invalid","orientation","variant","tone","density","shape","headless"]}connectedCallback(){super.connectedCallback(),this.root.addEventListener("slotchange",this._onSlotChange),this._scheduleStateSync()}disconnectedCallback(){this.root.removeEventListener("slotchange",this._onSlotChange),super.disconnectedCallback()}attributeChangedCallback(e,t,i){if(t!==i){if(e==="legend"||e==="description"||e==="error"||e==="required"){this.isConnected&&this.requestRender();return}e==="invalid"&&this._scheduleStateSync()}}render(){const e=this.getAttribute("legend")||"",t=this.getAttribute("description")||"",i=this.getAttribute("error")||"",o=this.hasAttribute("required");this.setContent(`
|
|
197
197
|
<style>${A}</style>
|
|
198
198
|
<fieldset class="frame" part="frame">
|
|
199
199
|
<div class="legend-row">
|
|
@@ -212,10 +212,10 @@
|
|
|
212
212
|
<slot></slot>
|
|
213
213
|
</div>
|
|
214
214
|
<p class="error" part="error">
|
|
215
|
-
<slot name="error">${
|
|
215
|
+
<slot name="error">${i?a(i):""}</slot>
|
|
216
216
|
</p>
|
|
217
217
|
<div class="footer" part="footer">
|
|
218
218
|
<slot name="footer"></slot>
|
|
219
219
|
</div>
|
|
220
220
|
</fieldset>
|
|
221
|
-
`),this._updateVisibility(),this._syncAria()}_scheduleStateSync(){this._stateSyncQueued||(this._stateSyncQueued=!0,queueMicrotask(()=>{this._stateSyncQueued=!1,this.isConnected&&this._syncAria()}))}_updateVisibility(){const e=this.root.querySelector('slot[name="legend"]'),t=this.root.querySelector('slot[name="description"]'),
|
|
221
|
+
`),this._updateVisibility(),this._syncAria()}_scheduleStateSync(){this._stateSyncQueued||(this._stateSyncQueued=!0,queueMicrotask(()=>{this._stateSyncQueued=!1,this.isConnected&&this._syncAria()}))}_updateVisibility(){const e=this.root.querySelector('slot[name="legend"]'),t=this.root.querySelector('slot[name="description"]'),i=this.root.querySelector('slot[name="actions"]'),o=this.root.querySelector('slot[name="error"]'),n=this.root.querySelector('slot[name="footer"]'),l=!!this.getAttribute("legend")||s(e),v=!!this.getAttribute("description")||s(t),c=s(i),y=!!this.getAttribute("error")||s(o),x=s(n),u=this.root.querySelector(".legend-row"),f=this.root.querySelector(".legend"),h=this.root.querySelector(".actions"),g=this.root.querySelector(".description"),p=this.root.querySelector(".error"),b=this.root.querySelector(".footer");u&&u.toggleAttribute("hidden",!l&&!c),f&&f.toggleAttribute("hidden",!l),h&&h.toggleAttribute("hidden",!c),g&&g.toggleAttribute("hidden",!v),p&&p.toggleAttribute("hidden",!y),b&&b.toggleAttribute("hidden",!x)}_syncAria(){const e=this.root.querySelector(".frame"),t=this.root.querySelector(".legend"),i=this.root.querySelector(".description"),o=this.root.querySelector(".error");if(!e)return;t&&!t.hasAttribute("hidden")?e.setAttribute("aria-labelledby",d(t,"legend")):e.removeAttribute("aria-labelledby");const n=q([i&&!i.hasAttribute("hidden")?d(i,"description"):"",o&&!o.hasAttribute("hidden")?d(o,"error"):""]);n.length?e.setAttribute("aria-describedby",n.join(" ")):e.removeAttribute("aria-describedby"),this.hasAttribute("invalid")||o&&!o.hasAttribute("hidden")?e.setAttribute("aria-invalid","true"):e.removeAttribute("aria-invalid")}}typeof customElements<"u"&&!customElements.get("ui-fieldset")&&customElements.define("ui-fieldset",m);exports.UIFieldset=m;
|
package/dist/fieldset.esm.js
CHANGED
|
@@ -6,7 +6,7 @@ const S = `
|
|
|
6
6
|
--ui-fieldset-bg: transparent;
|
|
7
7
|
--ui-fieldset-color: var(--ui-color-text, var(--ui-text, #0f172a));
|
|
8
8
|
--ui-fieldset-muted: var(--ui-color-muted, var(--ui-muted, #526175));
|
|
9
|
-
--ui-fieldset-error: var(--ui-color-danger, var(--ui-error, #c81e1e));
|
|
9
|
+
--ui-fieldset-error: var(--ui-color-danger-text, var(--ui-color-danger, var(--ui-error, #c81e1e)));
|
|
10
10
|
--ui-fieldset-border-color: var(--ui-color-line-subtle, color-mix(in srgb, var(--ui-color-border, #cbd5e1) 68%, transparent));
|
|
11
11
|
--ui-fieldset-border: 0;
|
|
12
12
|
--ui-fieldset-shadow: none;
|
|
@@ -280,8 +280,8 @@ class w extends x {
|
|
|
280
280
|
}));
|
|
281
281
|
}
|
|
282
282
|
_updateVisibility() {
|
|
283
|
-
const e = this.root.querySelector('slot[name="legend"]'), t = this.root.querySelector('slot[name="description"]'), i = this.root.querySelector('slot[name="actions"]'), o = this.root.querySelector('slot[name="error"]'), n = this.root.querySelector('slot[name="footer"]'), l = !!this.getAttribute("legend") || s(e), m = !!this.getAttribute("description") || s(t), c = s(i), v = !!this.getAttribute("error") || s(o), y = s(n), u = this.root.querySelector(".legend-row"), f = this.root.querySelector(".legend"), h = this.root.querySelector(".actions"),
|
|
284
|
-
u && u.toggleAttribute("hidden", !l && !c), f && f.toggleAttribute("hidden", !l), h && h.toggleAttribute("hidden", !c),
|
|
283
|
+
const e = this.root.querySelector('slot[name="legend"]'), t = this.root.querySelector('slot[name="description"]'), i = this.root.querySelector('slot[name="actions"]'), o = this.root.querySelector('slot[name="error"]'), n = this.root.querySelector('slot[name="footer"]'), l = !!this.getAttribute("legend") || s(e), m = !!this.getAttribute("description") || s(t), c = s(i), v = !!this.getAttribute("error") || s(o), y = s(n), u = this.root.querySelector(".legend-row"), f = this.root.querySelector(".legend"), h = this.root.querySelector(".actions"), g = this.root.querySelector(".description"), p = this.root.querySelector(".error"), b = this.root.querySelector(".footer");
|
|
284
|
+
u && u.toggleAttribute("hidden", !l && !c), f && f.toggleAttribute("hidden", !l), h && h.toggleAttribute("hidden", !c), g && g.toggleAttribute("hidden", !m), p && p.toggleAttribute("hidden", !v), b && b.toggleAttribute("hidden", !y);
|
|
285
285
|
}
|
|
286
286
|
_syncAria() {
|
|
287
287
|
const e = this.root.querySelector(".frame"), t = this.root.querySelector(".legend"), i = this.root.querySelector(".description"), o = this.root.querySelector(".error");
|
package/dist/file-upload.cjs.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
--ui-file-upload-text: var(--ui-color-text, #0f172a);
|
|
8
8
|
--ui-file-upload-muted: var(--ui-color-muted, #526175);
|
|
9
9
|
--ui-file-upload-focus: var(--ui-color-focus-ring, #2563eb);
|
|
10
|
-
--ui-file-upload-danger: var(--ui-color-danger, #dc2626);
|
|
11
|
-
--ui-file-upload-success: var(--ui-color-success, #15803d);
|
|
10
|
+
--ui-file-upload-danger: var(--ui-color-danger-text, var(--ui-color-danger, #dc2626));
|
|
11
|
+
--ui-file-upload-success: var(--ui-color-success-text, var(--ui-color-success, #15803d));
|
|
12
12
|
display: block;
|
|
13
13
|
inline-size: 100%;
|
|
14
14
|
min-inline-size: 0;
|
package/dist/file-upload.esm.js
CHANGED
|
@@ -8,8 +8,8 @@ const M = `
|
|
|
8
8
|
--ui-file-upload-text: var(--ui-color-text, #0f172a);
|
|
9
9
|
--ui-file-upload-muted: var(--ui-color-muted, #526175);
|
|
10
10
|
--ui-file-upload-focus: var(--ui-color-focus-ring, #2563eb);
|
|
11
|
-
--ui-file-upload-danger: var(--ui-color-danger, #dc2626);
|
|
12
|
-
--ui-file-upload-success: var(--ui-color-success, #15803d);
|
|
11
|
+
--ui-file-upload-danger: var(--ui-color-danger-text, var(--ui-color-danger, #dc2626));
|
|
12
|
+
--ui-file-upload-success: var(--ui-color-success-text, var(--ui-color-success, #15803d));
|
|
13
13
|
display: block;
|
|
14
14
|
inline-size: 100%;
|
|
15
15
|
min-inline-size: 0;
|
package/dist/flex.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
--ui-flex-gap: 0px;
|
|
9
9
|
--ui-flex-row-gap: var(--ui-flex-gap);
|
|
10
10
|
--ui-flex-column-gap: var(--ui-flex-gap);
|
|
11
|
-
--ui-flex-color:
|
|
11
|
+
--ui-flex-color: inherit;
|
|
12
12
|
color-scheme: light dark;
|
|
13
13
|
display: var(--ui-flex-display);
|
|
14
14
|
color: var(--ui-flex-color);
|
|
@@ -49,6 +49,6 @@
|
|
|
49
49
|
--ui-flex-color: CanvasText;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
`;function x(i){if(!i)return null;const e=i.trim();if(!e.startsWith("{"))return null;try{const s=JSON.parse(e);return!s||typeof s!="object"?null:s}catch{return null}}function f(i){return v[i]||i}function d(i,e){switch(i){case"display":return{"--ui-flex-display":e};case"direction":return{"--ui-flex-direction":e};case"align":return{"--ui-flex-align":e};case"justify":return{"--ui-flex-justify":e};case"wrap":return{"--ui-flex-wrap":e};case"gap":return{"--ui-flex-gap":f(e)};case"rowgap":return{"--ui-flex-row-gap":f(e)};case"columngap":return{"--ui-flex-column-gap":f(e)};default:return{}}}class m extends h.ElementBase{constructor(){super(...arguments),this._lastClassname="",this._appliedInlineProps=new Set}static get observedAttributes(){return["classname","headless",...p]}_syncLegacyClassname(){const e=this.getAttribute("classname")||"";e!==this._lastClassname&&(this._lastClassname&&this._lastClassname.split(/\s+/).forEach(s=>{s&&this.classList.remove(s)}),e&&e.split(/\s+/).forEach(s=>{s&&this.classList.add(s)}),this._lastClassname=e)}_applyInlineStyles(){this._appliedInlineProps.forEach(e=>this.style.removeProperty(e)),this._appliedInlineProps.clear(),p.forEach(e=>{const s=this.getAttribute(e);if(!s||x(s))return;const o=d(e,s);Object.entries(o).forEach(([
|
|
52
|
+
`;function x(i){if(!i)return null;const e=i.trim();if(!e.startsWith("{"))return null;try{const s=JSON.parse(e);return!s||typeof s!="object"?null:s}catch{return null}}function f(i){return v[i]||i}function d(i,e){switch(i){case"display":return{"--ui-flex-display":e};case"direction":return{"--ui-flex-direction":e};case"align":return{"--ui-flex-align":e};case"justify":return{"--ui-flex-justify":e};case"wrap":return{"--ui-flex-wrap":e};case"gap":return{"--ui-flex-gap":f(e)};case"rowgap":return{"--ui-flex-row-gap":f(e)};case"columngap":return{"--ui-flex-column-gap":f(e)};default:return{}}}class m extends h.ElementBase{constructor(){super(...arguments),this._lastClassname="",this._appliedInlineProps=new Set}static get observedAttributes(){return["classname","headless",...p]}_syncLegacyClassname(){const e=this.getAttribute("classname")||"";e!==this._lastClassname&&(this._lastClassname&&this._lastClassname.split(/\s+/).forEach(s=>{s&&this.classList.remove(s)}),e&&e.split(/\s+/).forEach(s=>{s&&this.classList.add(s)}),this._lastClassname=e)}_applyInlineStyles(){this._appliedInlineProps.forEach(e=>this.style.removeProperty(e)),this._appliedInlineProps.clear(),p.forEach(e=>{const s=this.getAttribute(e);if(!s||x(s))return;const o=d(e,s);Object.entries(o).forEach(([a,u])=>{this.style.setProperty(a,u),this._appliedInlineProps.add(a)})})}_buildResponsiveCss(){const e={},s={sm:{},md:{},lg:{},xl:{}};p.forEach(r=>{const l=this.getAttribute(r),t=x(l);if(!t)return;const n=(c,g)=>{Object.assign(c,d(r,g))};typeof t.initial=="string"&&n(e,t.initial),typeof t.sm=="string"&&n(s.sm,t.sm),typeof t.md=="string"&&n(s.md,t.md),typeof t.lg=="string"&&n(s.lg,t.lg),typeof t.xl=="string"&&n(s.xl,t.xl)});const o=(r,l)=>{const t=Object.entries(l);return t.length?`${r} { ${t.map(([n,c])=>`${n}: ${c};`).join(" ")} }`:""},a=[],u=o(":host",e);return u&&a.push(u),Object.keys(s).forEach(r=>{const l=o(":host",s[r]);l&&a.push(`@media (min-width: ${y[r]}) { ${l} }`)}),a.join(`
|
|
53
53
|
`)}render(){this._syncLegacyClassname(),this._applyInlineStyles();const e=this._buildResponsiveCss();this.setContent(`<style>${b}${e?`
|
|
54
54
|
${e}`:""}</style><slot></slot>`)}shouldRenderOnAttributeChange(e,s,o){return!0}}typeof customElements<"u"&&!customElements.get("ui-flex")&&customElements.define("ui-flex",m);exports.UIFlex=m;
|
package/dist/flex.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ const h = {
|
|
|
4
4
|
md: "var(--ui-breakpoint-md, 768px)",
|
|
5
5
|
lg: "var(--ui-breakpoint-lg, 1024px)",
|
|
6
6
|
xl: "var(--ui-breakpoint-xl, 1280px)"
|
|
7
|
-
},
|
|
7
|
+
}, c = ["display", "direction", "align", "justify", "wrap", "gap", "rowgap", "columngap"], y = {
|
|
8
8
|
xs: "var(--ui-space-xs, 4px)",
|
|
9
9
|
sm: "var(--ui-space-sm, 8px)",
|
|
10
10
|
md: "var(--ui-space-md, 12px)",
|
|
@@ -20,7 +20,7 @@ const h = {
|
|
|
20
20
|
--ui-flex-gap: 0px;
|
|
21
21
|
--ui-flex-row-gap: var(--ui-flex-gap);
|
|
22
22
|
--ui-flex-column-gap: var(--ui-flex-gap);
|
|
23
|
-
--ui-flex-color:
|
|
23
|
+
--ui-flex-color: inherit;
|
|
24
24
|
color-scheme: light dark;
|
|
25
25
|
display: var(--ui-flex-display);
|
|
26
26
|
color: var(--ui-flex-color);
|
|
@@ -103,7 +103,7 @@ class b extends g {
|
|
|
103
103
|
super(...arguments), this._lastClassname = "", this._appliedInlineProps = /* @__PURE__ */ new Set();
|
|
104
104
|
}
|
|
105
105
|
static get observedAttributes() {
|
|
106
|
-
return ["classname", "headless", ...
|
|
106
|
+
return ["classname", "headless", ...c];
|
|
107
107
|
}
|
|
108
108
|
_syncLegacyClassname() {
|
|
109
109
|
const e = this.getAttribute("classname") || "";
|
|
@@ -114,7 +114,7 @@ class b extends g {
|
|
|
114
114
|
}), this._lastClassname = e);
|
|
115
115
|
}
|
|
116
116
|
_applyInlineStyles() {
|
|
117
|
-
this._appliedInlineProps.forEach((e) => this.style.removeProperty(e)), this._appliedInlineProps.clear(),
|
|
117
|
+
this._appliedInlineProps.forEach((e) => this.style.removeProperty(e)), this._appliedInlineProps.clear(), c.forEach((e) => {
|
|
118
118
|
const s = this.getAttribute(e);
|
|
119
119
|
if (!s || x(s)) return;
|
|
120
120
|
const o = d(e, s);
|
|
@@ -130,17 +130,17 @@ class b extends g {
|
|
|
130
130
|
lg: {},
|
|
131
131
|
xl: {}
|
|
132
132
|
};
|
|
133
|
-
|
|
133
|
+
c.forEach((r) => {
|
|
134
134
|
const l = this.getAttribute(r), t = x(l);
|
|
135
135
|
if (!t) return;
|
|
136
|
-
const a = (
|
|
137
|
-
Object.assign(
|
|
136
|
+
const a = (p, m) => {
|
|
137
|
+
Object.assign(p, d(r, m));
|
|
138
138
|
};
|
|
139
139
|
typeof t.initial == "string" && a(e, t.initial), typeof t.sm == "string" && a(s.sm, t.sm), typeof t.md == "string" && a(s.md, t.md), typeof t.lg == "string" && a(s.lg, t.lg), typeof t.xl == "string" && a(s.xl, t.xl);
|
|
140
140
|
});
|
|
141
141
|
const o = (r, l) => {
|
|
142
142
|
const t = Object.entries(l);
|
|
143
|
-
return t.length ? `${r} { ${t.map(([a,
|
|
143
|
+
return t.length ? `${r} { ${t.map(([a, p]) => `${a}: ${p};`).join(" ")} }` : "";
|
|
144
144
|
}, n = [], u = o(":host", e);
|
|
145
145
|
return u && n.push(u), Object.keys(s).forEach((r) => {
|
|
146
146
|
const l = o(":host", s[r]);
|
package/dist/form.cjs.js
CHANGED
|
@@ -133,25 +133,25 @@
|
|
|
133
133
|
.status[data-tone="warning"] {
|
|
134
134
|
--ui-form-status-bg: color-mix(in srgb, var(--ui-color-warning, #b45309) 12%, transparent);
|
|
135
135
|
--ui-form-status-border: color-mix(in srgb, var(--ui-color-warning, #b45309) 44%, var(--ui-form-border-color));
|
|
136
|
-
--ui-form-status-text: color-mix(in srgb, var(--ui-color-warning, #b45309) 90%, #111827 10%);
|
|
136
|
+
--ui-form-status-text: var(--ui-color-warning-text, color-mix(in srgb, var(--ui-color-warning, #b45309) 90%, #111827 10%));
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
.status[data-tone="error"] {
|
|
140
140
|
--ui-form-status-bg: color-mix(in srgb, var(--ui-color-danger, #dc2626) 12%, transparent);
|
|
141
141
|
--ui-form-status-border: color-mix(in srgb, var(--ui-color-danger, #dc2626) 44%, var(--ui-form-border-color));
|
|
142
|
-
--ui-form-status-text: color-mix(in srgb, var(--ui-color-danger, #dc2626) 88%, #111827 12%);
|
|
142
|
+
--ui-form-status-text: var(--ui-color-danger-text, color-mix(in srgb, var(--ui-color-danger, #dc2626) 88%, #111827 12%));
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.status[data-tone="success"] {
|
|
146
146
|
--ui-form-status-bg: color-mix(in srgb, var(--ui-color-success, #15803d) 12%, transparent);
|
|
147
147
|
--ui-form-status-border: color-mix(in srgb, var(--ui-color-success, #15803d) 44%, var(--ui-form-border-color));
|
|
148
|
-
--ui-form-status-text: color-mix(in srgb, var(--ui-color-success, #15803d) 90%, #111827 10%);
|
|
148
|
+
--ui-form-status-text: var(--ui-color-success-text, color-mix(in srgb, var(--ui-color-success, #15803d) 90%, #111827 10%));
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
.status[data-tone="loading"] {
|
|
152
152
|
--ui-form-status-bg: color-mix(in srgb, var(--ui-form-accent) 12%, transparent);
|
|
153
153
|
--ui-form-status-border: color-mix(in srgb, var(--ui-form-accent) 44%, var(--ui-form-border-color));
|
|
154
|
-
--ui-form-status-text: color-mix(in srgb, var(--ui-form-accent)
|
|
154
|
+
--ui-form-status-text: color-mix(in srgb, var(--ui-form-accent) 45%, var(--ui-color-text-strong, #0f172a));
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
.footer {
|
package/dist/form.esm.js
CHANGED
|
@@ -174,25 +174,25 @@ const _ = /* @__PURE__ */ new Set(["heading", "title", "description", "state-tex
|
|
|
174
174
|
.status[data-tone="warning"] {
|
|
175
175
|
--ui-form-status-bg: color-mix(in srgb, var(--ui-color-warning, #b45309) 12%, transparent);
|
|
176
176
|
--ui-form-status-border: color-mix(in srgb, var(--ui-color-warning, #b45309) 44%, var(--ui-form-border-color));
|
|
177
|
-
--ui-form-status-text: color-mix(in srgb, var(--ui-color-warning, #b45309) 90%, #111827 10%);
|
|
177
|
+
--ui-form-status-text: var(--ui-color-warning-text, color-mix(in srgb, var(--ui-color-warning, #b45309) 90%, #111827 10%));
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
.status[data-tone="error"] {
|
|
181
181
|
--ui-form-status-bg: color-mix(in srgb, var(--ui-color-danger, #dc2626) 12%, transparent);
|
|
182
182
|
--ui-form-status-border: color-mix(in srgb, var(--ui-color-danger, #dc2626) 44%, var(--ui-form-border-color));
|
|
183
|
-
--ui-form-status-text: color-mix(in srgb, var(--ui-color-danger, #dc2626) 88%, #111827 12%);
|
|
183
|
+
--ui-form-status-text: var(--ui-color-danger-text, color-mix(in srgb, var(--ui-color-danger, #dc2626) 88%, #111827 12%));
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
.status[data-tone="success"] {
|
|
187
187
|
--ui-form-status-bg: color-mix(in srgb, var(--ui-color-success, #15803d) 12%, transparent);
|
|
188
188
|
--ui-form-status-border: color-mix(in srgb, var(--ui-color-success, #15803d) 44%, var(--ui-form-border-color));
|
|
189
|
-
--ui-form-status-text: color-mix(in srgb, var(--ui-color-success, #15803d) 90%, #111827 10%);
|
|
189
|
+
--ui-form-status-text: var(--ui-color-success-text, color-mix(in srgb, var(--ui-color-success, #15803d) 90%, #111827 10%));
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.status[data-tone="loading"] {
|
|
193
193
|
--ui-form-status-bg: color-mix(in srgb, var(--ui-form-accent) 12%, transparent);
|
|
194
194
|
--ui-form-status-border: color-mix(in srgb, var(--ui-form-accent) 44%, var(--ui-form-border-color));
|
|
195
|
-
--ui-form-status-text: color-mix(in srgb, var(--ui-form-accent)
|
|
195
|
+
--ui-form-status-text: color-mix(in srgb, var(--ui-form-accent) 45%, var(--ui-color-text-strong, #0f172a));
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
.footer {
|
package/dist/gantt.cjs.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
--ui-gantt-text: var(--ui-color-text, #0f172a);
|
|
8
8
|
--ui-gantt-muted: var(--ui-color-muted, #526175);
|
|
9
9
|
--ui-gantt-accent: var(--ui-color-primary, #2563eb);
|
|
10
|
+
--ui-gantt-accent-text: var(--ui-color-accent-text, var(--ui-gantt-accent));
|
|
10
11
|
--ui-gantt-selected: color-mix(in srgb, var(--ui-gantt-accent) 10%, transparent);
|
|
11
12
|
display: block;
|
|
12
13
|
min-inline-size: 0;
|
|
@@ -222,7 +223,7 @@
|
|
|
222
223
|
|
|
223
224
|
.head-button:hover,
|
|
224
225
|
.head-button[aria-sort]:not([aria-sort="none"]) {
|
|
225
|
-
color: var(--ui-gantt-accent);
|
|
226
|
+
color: var(--ui-gantt-accent-text);
|
|
226
227
|
}
|
|
227
228
|
|
|
228
229
|
.grid-head span:last-child,
|
|
@@ -312,7 +313,7 @@
|
|
|
312
313
|
}
|
|
313
314
|
|
|
314
315
|
.tick.today-cell {
|
|
315
|
-
color: var(--ui-gantt-accent);
|
|
316
|
+
color: var(--ui-gantt-accent-text);
|
|
316
317
|
background: color-mix(in srgb, var(--ui-gantt-accent) 9%, transparent);
|
|
317
318
|
}
|
|
318
319
|
|
|
@@ -511,7 +512,7 @@
|
|
|
511
512
|
|
|
512
513
|
.expander:hover {
|
|
513
514
|
background: color-mix(in srgb, var(--ui-gantt-accent) 9%, transparent);
|
|
514
|
-
color: var(--ui-gantt-accent);
|
|
515
|
+
color: var(--ui-gantt-accent-text);
|
|
515
516
|
}
|
|
516
517
|
|
|
517
518
|
.rename {
|
|
@@ -922,8 +923,8 @@
|
|
|
922
923
|
padding: 0 6px;
|
|
923
924
|
block-size: 14px;
|
|
924
925
|
border-radius: 7px;
|
|
925
|
-
background: var(--ui-color-danger, #dc2626);
|
|
926
|
-
color: #ffffff;
|
|
926
|
+
background: var(--ui-color-danger-solid, var(--ui-color-danger, #dc2626));
|
|
927
|
+
color: var(--ui-color-foreground-on-danger, #ffffff);
|
|
927
928
|
font-size: 10px;
|
|
928
929
|
font-weight: 750;
|
|
929
930
|
line-height: 14px;
|
|
@@ -991,6 +992,7 @@
|
|
|
991
992
|
--ui-gantt-text: #e2e8f0;
|
|
992
993
|
--ui-gantt-muted: #93a4bd;
|
|
993
994
|
--ui-gantt-accent: #60a5fa;
|
|
995
|
+
--ui-gantt-accent-text: #93c5fd;
|
|
994
996
|
--ui-gantt-selected: rgba(96, 165, 250, 0.13);
|
|
995
997
|
}
|
|
996
998
|
|
package/dist/gantt.esm.js
CHANGED
|
@@ -141,6 +141,7 @@ const D = 1440 * 60 * 1e3, S = 42, N = 62, Tt = 376, ce = "minmax(170px, 1fr) 82
|
|
|
141
141
|
--ui-gantt-text: var(--ui-color-text, #0f172a);
|
|
142
142
|
--ui-gantt-muted: var(--ui-color-muted, #526175);
|
|
143
143
|
--ui-gantt-accent: var(--ui-color-primary, #2563eb);
|
|
144
|
+
--ui-gantt-accent-text: var(--ui-color-accent-text, var(--ui-gantt-accent));
|
|
144
145
|
--ui-gantt-selected: color-mix(in srgb, var(--ui-gantt-accent) 10%, transparent);
|
|
145
146
|
display: block;
|
|
146
147
|
min-inline-size: 0;
|
|
@@ -356,7 +357,7 @@ const D = 1440 * 60 * 1e3, S = 42, N = 62, Tt = 376, ce = "minmax(170px, 1fr) 82
|
|
|
356
357
|
|
|
357
358
|
.head-button:hover,
|
|
358
359
|
.head-button[aria-sort]:not([aria-sort="none"]) {
|
|
359
|
-
color: var(--ui-gantt-accent);
|
|
360
|
+
color: var(--ui-gantt-accent-text);
|
|
360
361
|
}
|
|
361
362
|
|
|
362
363
|
.grid-head span:last-child,
|
|
@@ -446,7 +447,7 @@ const D = 1440 * 60 * 1e3, S = 42, N = 62, Tt = 376, ce = "minmax(170px, 1fr) 82
|
|
|
446
447
|
}
|
|
447
448
|
|
|
448
449
|
.tick.today-cell {
|
|
449
|
-
color: var(--ui-gantt-accent);
|
|
450
|
+
color: var(--ui-gantt-accent-text);
|
|
450
451
|
background: color-mix(in srgb, var(--ui-gantt-accent) 9%, transparent);
|
|
451
452
|
}
|
|
452
453
|
|
|
@@ -645,7 +646,7 @@ const D = 1440 * 60 * 1e3, S = 42, N = 62, Tt = 376, ce = "minmax(170px, 1fr) 82
|
|
|
645
646
|
|
|
646
647
|
.expander:hover {
|
|
647
648
|
background: color-mix(in srgb, var(--ui-gantt-accent) 9%, transparent);
|
|
648
|
-
color: var(--ui-gantt-accent);
|
|
649
|
+
color: var(--ui-gantt-accent-text);
|
|
649
650
|
}
|
|
650
651
|
|
|
651
652
|
.rename {
|
|
@@ -1056,8 +1057,8 @@ const D = 1440 * 60 * 1e3, S = 42, N = 62, Tt = 376, ce = "minmax(170px, 1fr) 82
|
|
|
1056
1057
|
padding: 0 6px;
|
|
1057
1058
|
block-size: 14px;
|
|
1058
1059
|
border-radius: 7px;
|
|
1059
|
-
background: var(--ui-color-danger, #dc2626);
|
|
1060
|
-
color: #ffffff;
|
|
1060
|
+
background: var(--ui-color-danger-solid, var(--ui-color-danger, #dc2626));
|
|
1061
|
+
color: var(--ui-color-foreground-on-danger, #ffffff);
|
|
1061
1062
|
font-size: 10px;
|
|
1062
1063
|
font-weight: 750;
|
|
1063
1064
|
line-height: 14px;
|
|
@@ -1125,6 +1126,7 @@ const D = 1440 * 60 * 1e3, S = 42, N = 62, Tt = 376, ce = "minmax(170px, 1fr) 82
|
|
|
1125
1126
|
--ui-gantt-text: #e2e8f0;
|
|
1126
1127
|
--ui-gantt-muted: #93a4bd;
|
|
1127
1128
|
--ui-gantt-accent: #60a5fa;
|
|
1129
|
+
--ui-gantt-accent-text: #93c5fd;
|
|
1128
1130
|
--ui-gantt-selected: rgba(96, 165, 250, 0.13);
|
|
1129
1131
|
}
|
|
1130
1132
|
|