@editora/ui-core 0.1.22 → 0.1.23
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 +292 -221
- package/dist/{ElementBase-YlTLMsGk.mjs → ElementBase-BeZT54Hj.mjs} +3 -2
- package/dist/ElementBase-DxbvhLJs.js +1 -0
- package/dist/ElementBase.d.ts +2 -1
- package/dist/ElementBase.d.ts.map +1 -1
- package/dist/__tests__/setup.d.ts +0 -2
- package/dist/__tests__/setup.d.ts.map +1 -1
- package/dist/accordion.cjs.js +1 -1
- package/dist/accordion.esm.js +1 -1
- package/dist/alert-dialog.cjs.js +1 -1
- package/dist/alert-dialog.esm.js +1 -1
- package/dist/alert.cjs.js +1 -1
- package/dist/alert.esm.js +1 -1
- package/dist/anchor.cjs.js +3 -3
- package/dist/anchor.esm.js +6 -5
- package/dist/animated-beam.cjs.js +1 -1
- package/dist/animated-beam.esm.js +1 -1
- package/dist/animated-list.cjs.js +1 -1
- package/dist/animated-list.esm.js +1 -1
- package/dist/animated-text.cjs.js +1 -1
- package/dist/animated-text.esm.js +1 -1
- package/dist/app-header.cjs.js +1 -1
- package/dist/app-header.esm.js +1 -1
- package/dist/aspect-ratio.cjs.js +1 -1
- package/dist/aspect-ratio.esm.js +1 -1
- package/dist/avatar.cjs.js +1 -1
- package/dist/avatar.esm.js +1 -1
- package/dist/badge.cjs.js +1 -1
- package/dist/badge.esm.js +1 -1
- package/dist/block-controls.cjs.js +1 -1
- package/dist/block-controls.esm.js +1 -1
- package/dist/box.cjs.js +1 -1
- package/dist/box.esm.js +1 -1
- package/dist/breadcrumb.cjs.js +1 -1
- package/dist/breadcrumb.esm.js +1 -1
- package/dist/button.cjs.js +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/{calendar-DbxYRdlv.mjs → calendar-B3PUKHQm.mjs} +1 -1
- package/dist/{calendar-Qa-cFOp3.js → calendar-D-mXMgqc.js} +1 -1
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.esm.js +1 -1
- package/dist/card.cjs.js +1 -1
- package/dist/card.esm.js +1 -1
- package/dist/chart.cjs.js +1 -1
- package/dist/chart.esm.js +1 -1
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.esm.js +1 -1
- package/dist/collapsible.cjs.js +1 -1
- package/dist/collapsible.esm.js +1 -1
- package/dist/collection.cjs.js +1 -1
- package/dist/collection.esm.js +9 -8
- package/dist/color-picker.cjs.js +4 -4
- package/dist/color-picker.esm.js +3 -3
- package/dist/combobox.cjs.js +1 -1
- package/dist/combobox.esm.js +1 -1
- package/dist/command-palette.cjs.js +1 -1
- package/dist/command-palette.esm.js +1 -1
- package/dist/command.cjs.js +1 -1
- package/dist/command.esm.js +1 -1
- package/dist/components/ui-anchor.d.ts +2 -1
- package/dist/components/ui-anchor.d.ts.map +1 -1
- package/dist/components/ui-button.d.ts.map +1 -1
- package/dist/components/ui-collection.d.ts +2 -1
- package/dist/components/ui-collection.d.ts.map +1 -1
- package/dist/components/ui-form.d.ts +1 -0
- package/dist/components/ui-form.d.ts.map +1 -1
- package/dist/components/ui-roving-focus-group.d.ts +2 -1
- package/dist/components/ui-roving-focus-group.d.ts.map +1 -1
- package/dist/components/ui-sortable.d.ts.map +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/context-menu.cjs.js +1 -1
- package/dist/context-menu.esm.js +1 -1
- package/dist/control-group.cjs.js +1 -1
- package/dist/control-group.esm.js +1 -1
- package/dist/data-table.cjs.js +1 -1
- package/dist/data-table.esm.js +1 -1
- package/dist/date-field.cjs.js +1 -1
- package/dist/date-field.esm.js +3 -3
- package/dist/date-picker.cjs.js +1 -1
- package/dist/date-picker.esm.js +3 -3
- package/dist/date-range-picker.cjs.js +1 -1
- package/dist/date-range-picker.esm.js +3 -3
- package/dist/date-range-time-picker.cjs.js +1 -1
- package/dist/date-range-time-picker.esm.js +3 -3
- package/dist/date-time-picker.cjs.js +1 -1
- package/dist/date-time-picker.esm.js +3 -3
- package/dist/{date-time-utils-Cps2aSu2.mjs → date-time-utils-BTlxnz5j.mjs} +1 -1
- package/dist/{date-time-utils-BzfTpeU-.js → date-time-utils-y3AvNvGe.js} +1 -1
- package/dist/description.cjs.js +1 -1
- package/dist/description.esm.js +1 -1
- package/dist/dialog.cjs.js +1 -1
- package/dist/dialog.esm.js +1 -1
- package/dist/direction-provider.cjs.js +1 -1
- package/dist/direction-provider.esm.js +1 -1
- package/dist/dismissable-layer.cjs.js +1 -1
- package/dist/dismissable-layer.esm.js +1 -1
- package/dist/dock.cjs.js +1 -1
- package/dist/dock.esm.js +1 -1
- package/dist/domElement-DazSZBjV.js +1 -0
- package/dist/domElement-ZlSGVP0l.mjs +5 -0
- package/dist/domElement.d.ts +2 -0
- package/dist/domElement.d.ts.map +1 -0
- package/dist/drawer.cjs.js +1 -1
- package/dist/drawer.esm.js +1 -1
- package/dist/dropdown.cjs.js +1 -1
- package/dist/dropdown.esm.js +1 -1
- package/dist/empty-state.cjs.js +1 -1
- package/dist/empty-state.esm.js +1 -1
- package/dist/field-error.cjs.js +1 -1
- package/dist/field-error.esm.js +1 -1
- package/dist/field.cjs.js +1 -1
- package/dist/field.esm.js +1 -1
- package/dist/fieldset.cjs.js +1 -1
- package/dist/fieldset.esm.js +1 -1
- package/dist/file-upload.cjs.js +1 -1
- package/dist/file-upload.esm.js +1 -1
- package/dist/flex.cjs.js +1 -1
- package/dist/flex.esm.js +1 -1
- package/dist/floating-toolbar.cjs.js +1 -1
- package/dist/floating-toolbar.esm.js +1 -1
- package/dist/focus-scope.cjs.js +1 -1
- package/dist/focus-scope.esm.js +1 -1
- package/dist/form.cjs.js +2 -2
- package/dist/form.esm.js +12 -2
- package/dist/gantt.cjs.js +1 -1
- package/dist/gantt.esm.js +1 -1
- 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 +1 -1
- package/dist/icon-cloud.cjs.js +1 -1
- package/dist/icon-cloud.esm.js +1 -1
- package/dist/icon.cjs.js +1 -1
- package/dist/icon.esm.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +6 -6
- package/dist/inline-edit.cjs.js +1 -1
- package/dist/inline-edit.esm.js +1 -1
- package/dist/input.cjs.js +1 -1
- package/dist/input.esm.js +1 -1
- package/dist/label.cjs.js +1 -1
- package/dist/label.esm.js +1 -1
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.esm.js +1 -1
- package/dist/marquee.cjs.js +1 -1
- package/dist/marquee.esm.js +1 -1
- package/dist/masonry-grid.cjs.js +1 -1
- package/dist/masonry-grid.esm.js +1 -1
- 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/meter.cjs.js +1 -1
- package/dist/meter.esm.js +1 -1
- package/dist/multi-select.cjs.js +1 -1
- package/dist/multi-select.esm.js +1 -1
- package/dist/navigation-menu.cjs.js +1 -1
- package/dist/navigation-menu.esm.js +1 -1
- package/dist/number-field.cjs.js +2 -2
- package/dist/number-field.esm.js +2 -2
- package/dist/number-ticker.cjs.js +1 -1
- package/dist/number-ticker.esm.js +1 -1
- package/dist/odometer.cjs.js +1 -1
- package/dist/odometer.esm.js +1 -1
- package/dist/orbiter.cjs.js +1 -1
- package/dist/orbiter.esm.js +1 -1
- package/dist/pagination.cjs.js +1 -1
- package/dist/pagination.esm.js +1 -1
- package/dist/{panel-group-CaD0_KQf.js → panel-group-BVHJEdfx.js} +1 -1
- package/dist/{panel-group-8sVNnGxg.mjs → panel-group-BxO_eNW6.mjs} +1 -1
- package/dist/panel-group.cjs.js +1 -1
- package/dist/panel-group.esm.js +1 -1
- package/dist/panel.cjs.js +1 -1
- package/dist/panel.esm.js +1 -1
- 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/plugin-panel.cjs.js +1 -1
- package/dist/plugin-panel.esm.js +1 -1
- package/dist/popover.cjs.js +1 -1
- package/dist/popover.esm.js +1 -1
- package/dist/portal.cjs.js +1 -1
- package/dist/portal.esm.js +1 -1
- package/dist/positioner.cjs.js +1 -1
- package/dist/positioner.esm.js +1 -1
- package/dist/presence.cjs.js +1 -1
- package/dist/presence.esm.js +1 -1
- package/dist/progress.cjs.js +1 -1
- package/dist/progress.esm.js +1 -1
- package/dist/quick-actions.cjs.js +1 -1
- package/dist/quick-actions.esm.js +1 -1
- package/dist/radio-group.cjs.js +1 -1
- package/dist/radio-group.esm.js +1 -1
- package/dist/radio.cjs.js +1 -1
- package/dist/radio.esm.js +1 -1
- package/dist/rating.cjs.js +1 -1
- package/dist/rating.esm.js +1 -1
- package/dist/roving-focus-group.cjs.js +1 -1
- package/dist/roving-focus-group.esm.js +11 -10
- package/dist/scroll-area.cjs.js +1 -1
- package/dist/scroll-area.esm.js +1 -1
- package/dist/section.cjs.js +1 -1
- package/dist/section.esm.js +1 -1
- package/dist/select.cjs.js +1 -1
- package/dist/select.esm.js +1 -1
- package/dist/selection-popup.cjs.js +1 -1
- package/dist/selection-popup.esm.js +1 -1
- package/dist/separator.cjs.js +1 -1
- package/dist/separator.esm.js +1 -1
- package/dist/sidebar.cjs.js +2 -2
- package/dist/sidebar.esm.js +9 -9
- package/dist/skeleton.cjs.js +1 -1
- package/dist/skeleton.esm.js +1 -1
- package/dist/slider.cjs.js +1 -1
- package/dist/slider.esm.js +1 -1
- package/dist/slot.cjs.js +1 -1
- package/dist/slot.esm.js +1 -1
- package/dist/sortable.cjs.js +2 -2
- package/dist/sortable.esm.js +2 -2
- package/dist/spinning-text.cjs.js +1 -1
- package/dist/spinning-text.esm.js +1 -1
- package/dist/split-button.cjs.js +1 -1
- package/dist/split-button.esm.js +1 -1
- package/dist/splitter.cjs.js +1 -1
- package/dist/splitter.esm.js +1 -1
- package/dist/stepper.cjs.js +1 -1
- package/dist/stepper.esm.js +1 -1
- package/dist/switch.cjs.js +1 -1
- package/dist/switch.esm.js +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.esm.js +1 -1
- package/dist/tabs.cjs.js +1 -1
- package/dist/tabs.esm.js +1 -1
- package/dist/tags-input.cjs.js +1 -1
- package/dist/tags-input.esm.js +1 -1
- package/dist/textarea.cjs.js +1 -1
- package/dist/textarea.esm.js +1 -1
- package/dist/time-field.cjs.js +1 -1
- package/dist/time-field.esm.js +2 -2
- package/dist/time-picker.cjs.js +1 -1
- package/dist/time-picker.esm.js +3 -3
- package/dist/timeline.cjs.js +1 -1
- package/dist/timeline.esm.js +1 -1
- package/dist/toast.cjs.js +1 -1
- package/dist/toast.esm.js +1 -1
- package/dist/toggle-group.cjs.js +1 -1
- package/dist/toggle-group.esm.js +1 -1
- package/dist/toggle.cjs.js +1 -1
- package/dist/toggle.esm.js +1 -1
- package/dist/toolbar.cjs.js +1 -1
- package/dist/toolbar.esm.js +1 -1
- package/dist/tooltip.cjs.js +1 -1
- package/dist/tooltip.esm.js +1 -1
- package/dist/transfer-list.cjs.js +1 -1
- package/dist/transfer-list.esm.js +1 -1
- package/dist/{tree-Deoft-kO.mjs → tree-B_oQput6.mjs} +1 -1
- package/dist/{tree-7qbVnpGp.js → tree-SivHxcAy.js} +1 -1
- package/dist/tree-item.cjs.js +1 -1
- package/dist/tree-item.esm.js +1 -1
- package/dist/tree.cjs.js +1 -1
- package/dist/tree.esm.js +1 -1
- package/dist/{ui-button-BInsgSbr.js → ui-button-BPrzJScZ.js} +5 -5
- package/dist/{ui-button-rfiuUnUD.mjs → ui-button-Co8Sid6t.mjs} +11 -7
- package/dist/{ui-icon-Bvt9oIIR.js → ui-icon-D3avtxX_.js} +1 -1
- package/dist/{ui-icon-BSi_GtqO.mjs → ui-icon-DLhB08Fo.mjs} +1 -1
- package/dist/visually-hidden.cjs.js +1 -1
- package/dist/visually-hidden.esm.js +1 -1
- package/dist/wizard.cjs.js +1 -1
- package/dist/wizard.esm.js +1 -1
- package/package.json +2 -2
- package/dist/ElementBase-EV6mVBUV.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { E as W } from "./ElementBase-
|
|
1
|
+
import { E as W } from "./ElementBase-BeZT54Hj.mjs";
|
|
2
2
|
import { s as Y, a as J } from "./control-name-Bpj7F34X.mjs";
|
|
3
3
|
import { c as G } from "./dismissable-layer-BmPIoK80.mjs";
|
|
4
|
-
import { r as Q } from "./calendar-
|
|
5
|
-
import { r as X, e as tt, i as v, s as et, b as it, f as st, t as rt, n as E, d as nt, p as F, o as N, a as at, m as R, j as Z, k as j, q as y, l as ot, c as lt } from "./date-time-utils-
|
|
4
|
+
import { r as Q } from "./calendar-B3PUKHQm.mjs";
|
|
5
|
+
import { r as X, e as tt, i as v, s as et, b as it, f as st, t as rt, n as E, d as nt, p as F, o as N, a as at, m as R, j as Z, k as j, q as y, l as ot, c as lt } from "./date-time-utils-BTlxnz5j.mjs";
|
|
6
6
|
let dt = 0;
|
|
7
7
|
const ut = `
|
|
8
8
|
<svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as T, c as b, a as N, s as v, e as F } from "./calendar-
|
|
1
|
+
import { p as T, c as b, a as N, s as v, e as F } from "./calendar-B3PUKHQm.mjs";
|
|
2
2
|
import { a as L } from "./scroll-lock-LfqXXqsu.mjs";
|
|
3
3
|
import { c as U } from "./positioner-D0VGxtYU.mjs";
|
|
4
4
|
const C = /* @__PURE__ */ new Map(), I = 24;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("./calendar-
|
|
1
|
+
"use strict";const l=require("./calendar-D-mXMgqc.js"),C=require("./scroll-lock-BX6e3Ced.js"),I=require("./positioner-D_fqyx_j.js"),w=new Map,v=24;function y(t,e,n){return Math.max(e,Math.min(n,t))}function u(t){return String(t).padStart(2,"0")}function b(t){if(!/^-?\d+$/.test(t))return null;const e=Number(t);return Number.isFinite(e)?Math.trunc(e):null}function N(t){return t.replace(/[.\-]/g,"/").replace(/\s+/g," ").trim()}function O(t){const e=[];for(let n=0;n<12;n+=1)e.push(new Intl.DateTimeFormat(t,{month:"short",timeZone:"UTC"}).format(new Date(Date.UTC(2024,n,1))));return e}function L(t){const e=[];for(let n=0;n<12;n+=1)e.push(new Intl.DateTimeFormat(t,{month:"long",timeZone:"UTC"}).format(new Date(Date.UTC(2024,n,1))));return e}function U(t,e=!1){if(t==null)return e;const n=t.trim().toLowerCase();return n?n!=="false"&&n!=="0"&&n!=="off"&&n!=="no":!0}function F(t,e){const n=typeof t.composedPath=="function"?t.composedPath():[];for(const o of e)if(o&&n.includes(o))return!0;const r=t.target;if(!(r instanceof Node))return!1;for(const o of e)if(o instanceof Node&&o.contains(r))return!0;return!1}function P(t){const e=(t||"").trim();return e||(typeof navigator<"u"&&navigator.language?navigator.language:"en-US")}function m(t){if(!t)return null;const e=l.parseISO(t);return e?`${e.y}-${u(e.m)}-${u(e.d)}`:null}function g(t){if(!t)return null;const e=/^(\d{4}-\d{2}-\d{2})[T ](\d{1,2}:\d{2}(?::\d{2})?)$/.exec(t.trim());if(!e)return null;const n=m(e[1]);if(!n)return null;const r=d(e[2]);if(!r)return null;const o=e[2].split(":").length===3;return{date:n,time:M(r,o)}}function z(t,e){if(!t||!e)return null;const n=m(t),r=d(e);return!n||!r?null:`${n}T${M(r,e.split(":").length>=3)}`}function A(t){if(!t)return null;const e=m(t);return e||g(t)?.date||null}function Y(t){if(!t)return null;const e=g(t);if(e)return e;const n=m(t);return n?{date:n,time:"00:00"}:null}function k(t,e,n){const r=l.parseISO(t);if(!r)return t;const o=`${e}::${JSON.stringify({})}`;let i=w.get(o);return i||(i=new Intl.DateTimeFormat(e,{year:"numeric",month:"short",day:"2-digit",timeZone:"UTC"}),w.set(o,i)),i.format(new Date(Date.UTC(r.y,r.m-1,r.d)))}function q(t,e,n,r){if(!t)return"";if(n==="iso")return t;if(n==="custom"&&r){const o=l.parseISO(t);if(!o)return t;const i=O(e),s=L(e);return r.replace(/YYYY/g,String(o.y)).replace(/MMM/g,i[o.m-1]||"").replace(/MMMM/g,s[o.m-1]||"").replace(/MM/g,u(o.m)).replace(/DD/g,u(o.d))}return k(t,e)}function B(t,e){const n=m(t.trim());if(n)return n;const r=N(t);if(!r)return null;const o=m(r);if(o)return o;const i=r.split("/").map($=>$.trim()).filter(Boolean);if(i.length!==3)return null;const s=b(i[0]),a=b(i[1]),h=b(i[2]);if(s==null||a==null||h==null)return null;let f=h;f<100&&(f+=f>=70?1900:2e3);const p=e.toLowerCase().startsWith("en-us"),c=p?s:a,D=p?a:s;if(f<1e3||c<1||c>12||D<1||D>31)return null;const T=`${f}-${u(c)}-${u(D)}`;return m(T)}function d(t,e){const n=t.trim().toLowerCase();if(!n)return null;const r=/^(\d{1,2})(?::|\.|h)?(\d{1,2})?(?::|\.|m)?(\d{1,2})?\s*(am|pm)?$/.exec(n);if(!r)return null;let o=Number(r[1]);const i=Number(r[2]??"0"),s=Number(r[3]??"0");if(!Number.isFinite(o)||!Number.isFinite(i)||!Number.isFinite(s)||i<0||i>59||s<0||s>59)return null;const a=r[4];if(a){if(o<1||o>12)return null;a==="pm"&&o<12&&(o+=12),a==="am"&&o===12&&(o=0)}return o<0||o>23?null:{hours:o,minutes:i,seconds:s}}function M(t,e=!1){if(!t)return"";const n=u(y(t.hours,0,23)),r=u(y(t.minutes,0,59));if(!e)return`${n}:${r}`;const o=u(y(t.seconds,0,59));return`${n}:${r}:${o}`}function x(t,e){const n=d(t);if(!n)return t;const r=new Date;return r.setHours(n.hours,n.minutes,n.seconds,0),new Intl.DateTimeFormat(e,{hour:"numeric",minute:"2-digit",second:t.split(":").length>2?"2-digit":void 0,hour12:!0}).format(r)}function S(t,e){const n=d(t),r=d(e);if(!n||!r)return t.localeCompare(e);const o=n.hours*3600+n.minutes*60+n.seconds,i=r.hours*3600+r.minutes*60+r.seconds;return o-i}function H(t,e,n){const r=d(t);if(!r)return t;let o=M(r,t.split(":").length>=3);return e&&S(o,e)<0&&(o=e),n&&S(o,n)>0&&(o=n),o}function E(t,e,n){let r=t;return e&&l.compareISO(r,e)<0&&(r=e),n&&l.compareISO(r,n)>0&&(r=n),r}function W(t,e){const n=g(t),r=g(e);if(!n||!r)return t.localeCompare(e);const o=l.compareISO(n.date,r.date);return o!==0?o:S(n.time,r.time)}function Z(t){const e=l.parseISO(t);if(!e)return{start:t,end:t};const n=l.startOfMonth(e.y,e.m),r=l.endOfMonth(e.y,e.m);return{start:`${n.y}-${u(n.m)}-${u(n.d)}`,end:`${r.y}-${u(r.m)}-${u(r.d)}`}}function _(t,e){const n=y(e,1,366);return{start:l.addDaysISO(t,-(n-1)),end:t}}function R(t,e,n=8,r=8,o=null){const s=(typeof window<"u"?window.innerHeight:800)-t.bottom-r-n,a=t.top-r-n,h=s>=e.height,f=a>=e.height,p=o==="top"?"top":"bottom";let c;if(h&&!f)c="bottom";else if(f&&!h)c="top";else if(f&&h)c=p;else{const T=p==="bottom"?s:a,$=p==="bottom"?a:s;T>0&&$<=T+v?c=p:c=s>=a?"bottom":"top"}const D=I.computePositionState(t,e,{placement:`${c}-start`,strategy:"fixed",offset:r,shift:!1,flip:!1,boundaryPadding:n});return{top:Math.round(D.y),left:Math.round(D.x),placement:c}}function G(t){let e=0;return{run:()=>{e||(e=requestAnimationFrame(()=>{e=0,t()}))},cancel:()=>{e&&(cancelAnimationFrame(e),e=0)}}}function J(t){return(t||"popover")==="inline"||typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(max-width: 639px)").matches}function K(){return C.acquireBodyScrollLock()}exports.clampDateIso=E;exports.clampTime=H;exports.combineDateTime=z;exports.compareDateTimes=W;exports.compareTimes=S;exports.computeLastDaysRange=_;exports.computeMonthRange=Z;exports.computePopoverPosition=R;exports.eventOriginatesWithin=F;exports.formatDateForDisplay=q;exports.formatTime=M;exports.isTruthyAttr=U;exports.lockBodyScroll=K;exports.normalizeDateIso=m;exports.normalizeLocale=P;exports.parseConstraintDate=A;exports.parseConstraintDateTime=Y;exports.parseTimeInput=d;exports.parseUserDateInput=B;exports.rafThrottle=G;exports.shouldUseMobileSheet=J;exports.splitDateTime=g;exports.to12hDisplay=x;
|
package/dist/description.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./ElementBase-DxbvhLJs.js"),u=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-description-color: var(--ui-color-muted, var(--ui-muted, #526175));
|
|
4
4
|
--ui-description-size: 12px;
|
package/dist/description.esm.js
CHANGED
package/dist/dialog.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const z=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const z=require("./ElementBase-DxbvhLJs.js"),S=require("./scroll-lock-BX6e3Ced.js"),M=require("./dismissable-layer-DNfrKA20.js"),I=require("./focus-scope-Bwug2gDv.js"),R=`
|
|
2
2
|
:host {
|
|
3
3
|
position: fixed;
|
|
4
4
|
inset: 0;
|
package/dist/dialog.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as z } from "./ElementBase-
|
|
1
|
+
import { E as z } from "./ElementBase-BeZT54Hj.mjs";
|
|
2
2
|
import { a as B, r as I } from "./scroll-lock-LfqXXqsu.mjs";
|
|
3
3
|
import { c as M } from "./dismissable-layer-BmPIoK80.mjs";
|
|
4
4
|
import { c as R } from "./focus-scope-CmEsG5UZ.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./ElementBase-DxbvhLJs.js"),n=`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
color-scheme: light dark;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("./ElementBase-DxbvhLJs.js"),a=require("./dismissable-layer-DNfrKA20.js"),u=`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
color-scheme: light dark;
|
package/dist/dock.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("./ElementBase-DxbvhLJs.js"),F=1.92,C=148,R=1,D=20,k=.18,_="12px",x="12px 14px",v="56px",O=56,z={xs:{gap:"8px",padding:"8px 10px",itemSize:40,iconSize:18,itemRadius:14},sm:{gap:"10px",padding:"10px 12px",itemSize:48,iconSize:20,itemRadius:16},md:{gap:_,padding:x,itemSize:56,iconSize:24,itemRadius:18},lg:{gap:"14px",padding:"14px 16px",itemSize:64,iconSize:28,itemRadius:20},xl:{gap:"18px",padding:"16px 20px",itemSize:74,iconSize:32,itemRadius:24}},P={calm:{response:.11,damping:.82,spread:.62,lift:.82},smooth:{response:.16,damping:.78,spread:.82,lift:1},snappy:{response:.22,damping:.74,spread:.92,lift:1.06},bouncy:{response:.24,damping:.66,spread:1,lift:1.12}},E=new Set(["gap","padding","radius","item-size","variant","tone","size","elevation"]),N=new Set(["orientation","magnification","distance","idle-scale","lift","smoothing","animation","gap","padding","item-size"]),I=new Set(["label-mode","label-placement"]),V=new Set(["none","sm","md","lg","full"]),q=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-dock-gap: ${_};
|
|
4
4
|
--ui-dock-padding: ${x};
|
package/dist/dock.esm.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=typeof HTMLElement<"u"?HTMLElement:class{};exports.DOMElement=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domElement.d.ts","sourceRoot":"","sources":["../src/domElement.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,EAAE,OAAO,WACgE,CAAC"}
|
package/dist/drawer.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("./ElementBase-DxbvhLJs.js"),v=require("./overlayManager-CSy3fJmJ.js");function k(i){return typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>i()):window.setTimeout(i,16)}function F(i){if(i){if(typeof cancelAnimationFrame=="function"){cancelAnimationFrame(i);return}window.clearTimeout(i)}}const L='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',D=new Set(["side","dismissible","headless","variant","density","shape","elevation","tone","size","inset","close-on-overlay","close-on-esc","lock-while-loading","show-close","state","role","aria-label","aria-labelledby","aria-describedby","initial-focus"]),$=`
|
|
2
2
|
:host {
|
|
3
3
|
position: fixed;
|
|
4
4
|
inset: 0;
|
package/dist/drawer.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as O } from "./ElementBase-
|
|
1
|
+
import { E as O } from "./ElementBase-BeZT54Hj.mjs";
|
|
2
2
|
import { O as v } from "./overlayManager-BJjU1VA8.mjs";
|
|
3
3
|
function k(i) {
|
|
4
4
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => i()) : window.setTimeout(i, 16);
|
package/dist/dropdown.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("./ElementBase-DxbvhLJs.js"),y=require("./trigger-DkPsKxsP.js"),k=require("./menu-item-styles-B4onAr4C.js"),l=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]',".item","[data-menu-item]"].join(", "),A=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-dropdown-bg: var(
|
|
4
4
|
--ui-dropdown-menu-bg,
|
package/dist/dropdown.esm.js
CHANGED
package/dist/empty-state.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./ElementBase-DxbvhLJs.js"),c=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
--ui-empty-bg: linear-gradient(180deg, var(--ui-color-surface, #ffffff), var(--ui-color-surface-alt, #f8fafc));
|
package/dist/empty-state.esm.js
CHANGED
package/dist/field-error.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./ElementBase-DxbvhLJs.js"),u=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-field-error-color: var(--ui-color-danger, var(--ui-error, #c81e1e));
|
|
4
4
|
--ui-field-error-size: 12px;
|
package/dist/field-error.esm.js
CHANGED
package/dist/field.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const M=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const M=require("./ElementBase-DxbvhLJs.js"),N=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-field-gap: 8px;
|
|
4
4
|
--ui-field-label-width: 192px;
|
package/dist/field.esm.js
CHANGED
package/dist/fieldset.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("./ElementBase-DxbvhLJs.js"),A=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-fieldset-gap: 10px;
|
|
4
4
|
--ui-fieldset-radius: 16px;
|
package/dist/fieldset.esm.js
CHANGED
package/dist/file-upload.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const $=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const $=require("./ElementBase-DxbvhLJs.js"),j=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-file-upload-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 78%, transparent);
|
|
4
4
|
--ui-file-upload-border: 1px solid var(--ui-file-upload-border-color);
|
package/dist/file-upload.esm.js
CHANGED
package/dist/flex.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./ElementBase-DxbvhLJs.js"),y={sm:"var(--ui-breakpoint-sm, 640px)",md:"var(--ui-breakpoint-md, 768px)",lg:"var(--ui-breakpoint-lg, 1024px)",xl:"var(--ui-breakpoint-xl, 1280px)"},p=["display","direction","align","justify","wrap","gap","rowgap","columngap"],v={xs:"var(--ui-space-xs, 4px)",sm:"var(--ui-space-sm, 8px)",md:"var(--ui-space-md, 12px)",lg:"var(--ui-space-lg, 20px)",xl:"var(--ui-space-xl, 28px)"},b=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-flex-display: flex;
|
|
4
4
|
--ui-flex-direction: row;
|
package/dist/flex.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./ElementBase-DxbvhLJs.js"),d=require("./positioner-D_fqyx_j.js"),b=`
|
|
2
2
|
:host {
|
|
3
3
|
position: fixed;
|
|
4
4
|
inset: 0;
|
package/dist/focus-scope.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./ElementBase-DxbvhLJs.js"),n=require("./focus-scope-Bwug2gDv.js"),u=`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
color-scheme: light dark;
|
package/dist/focus-scope.esm.js
CHANGED
package/dist/form.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./ElementBase-DxbvhLJs.js");class _{constructor(){this.fields=new Map}registerField(t,e){if(!t)throw new Error("Field must have a name to register with the form");return this.fields.set(t,e),()=>{this.fields.delete(t)}}getValues(){const t={};for(const[e,i]of this.fields)t[e]=i.getValue();return t}setValue(t,e){const i=this.fields.get(t);i&&typeof i.setValue=="function"&&i.setValue(e)}async validateField(t){const e=this.fields.get(t);if(!e)return{valid:!0};if(typeof e.validate=="function"){const i=await e.validate();return e.setError&&e.setError(i.valid?void 0:i.message),i}return{valid:!0}}async validateAll(){const t={};let e=!0;const i=Array.from(this.fields.entries());for(const[r,s]of i){const n=await this.validateField(r);n.valid||(e=!1,t[r]=n.message||"invalid")}return{valid:e,errors:t}}}const v=new Set(["heading","title","description","state-text","loading-text"]),y=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-form-gap: 12px;
|
|
4
4
|
--ui-form-radius: 14px;
|
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
border-color: CanvasText;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
`;function m(o){return o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function u(o){if(!o)return!1;const t=o.assignedNodes({flatten:!0});return t.length?t.some(e=>e.nodeType===Node.TEXT_NODE?!!e.textContent?.trim():e.nodeType===Node.ELEMENT_NODE):!1}function x(o){const t=o.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"}function h(o){if(o==null)return o;if(o instanceof Date)return o.toISOString();if(typeof File<"u"&&o instanceof File)return{__file:!0,name:o.name,size:o.size,type:o.type,lastModified:o.lastModified};if(Array.isArray(o))return o.map(t=>h(t));if(typeof o=="object"){const t=Object.entries(o).sort(([i],[r])=>i.localeCompare(r)),e={};return t.forEach(([i,r])=>{e[i]=h(r)}),e}return o}function c(o){if(Array.isArray(o))return o.map(t=>c(t));if(o&&typeof o=="object"){if(typeof File<"u"&&o instanceof File)return o;if(o instanceof Date)return new Date(o.getTime());const t={};return Object.entries(o).forEach(([e,i])=>{t[e]=c(i)}),t}return o}function A(o){return o==="success"||o==="warning"||o==="error"?o:"default"}class b extends g.ElementBase{constructor(){super(),this._controller=new _,this._submitting=!1,this._autosaveTimer=null,this._readyFrame=null,this._dirtyFrame=null,this._initialSnapshot="",this._cleanValues={},this._baselineReady=!1,this._dirty=!1,this._dirtyAttrSyncing=!1,this._uid=Math.random().toString(36).slice(2,10),this._formEl=null,this._headerEl=null,this._headingEl=null,this._titleEl=null,this._descriptionEl=null,this._titleTextEl=null,this._descriptionTextEl=null,this._actionsEl=null,this._statusEl=null,this._statusTextEl=null,this._footerEl=null,this._titleSlot=null,this._headingSlot=null,this._descriptionSlot=null,this._actionsSlot=null,this._statusSlot=null,this._footerSlot=null,this._descriptionVisible=!1,this._statusVisible=!1,this._onNativeSubmit=this._onNativeSubmit.bind(this),this._onValueEvent=this._onValueEvent.bind(this),this._onBeforeUnload=this._onBeforeUnload.bind(this),this._onSlotChange=this._onSlotChange.bind(this)}static get observedAttributes(){return["novalidate","variant","tone","density","shape","elevation","gap","headless","loading","autosave","autosave-delay","guard-unsaved","dirty","disabled","heading","title","description","state","state-text","loading-text","aria-label","aria-labelledby"]}connectedCallback(){if(super.connectedCallback(),this.hasAttribute("title")&&!this.hasAttribute("heading")){const t=this.getAttribute("title");t!=null&&this.setAttribute("heading",t),this.removeAttribute("title")}this.root.addEventListener("submit",this._onNativeSubmit),this.root.addEventListener("slotchange",this._onSlotChange),this.addEventListener("input",this._onValueEvent),this.addEventListener("change",this._onValueEvent),this.hasAttribute("guard-unsaved")&&typeof window<"u"&&window.addEventListener("beforeunload",this._onBeforeUnload),queueMicrotask(()=>{!this.isConnected||this._baselineReady||this._setBaseline(this.getValues(),!1)}),this.hasAttribute("data-ui-ready")||(typeof requestAnimationFrame=="function"?this._readyFrame=requestAnimationFrame(()=>{this._readyFrame=null,this.setAttribute("data-ui-ready","")}):this._readyFrame=window.setTimeout(()=>{this._readyFrame=null,this.setAttribute("data-ui-ready","")},16))}disconnectedCallback(){this.root.removeEventListener("submit",this._onNativeSubmit),this.root.removeEventListener("slotchange",this._onSlotChange),this.removeEventListener("input",this._onValueEvent),this.removeEventListener("change",this._onValueEvent),this._readyFrame!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this._readyFrame),clearTimeout(this._readyFrame),this._readyFrame=null),this._autosaveTimer&&(clearTimeout(this._autosaveTimer),this._autosaveTimer=null),this._dirtyFrame!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this._dirtyFrame),clearTimeout(this._dirtyFrame),this._dirtyFrame=null),typeof window<"u"&&window.removeEventListener("beforeunload",this._onBeforeUnload),super.disconnectedCallback()}_onNativeSubmit(t){t.target?.classList.contains("form")&&(t.preventDefault(),t.stopPropagation(),!this.hasAttribute("disabled")&&this.submit())}registerField(t,e){return this._controller.registerField(t,e)}setValue(t,e){this._controller.setValue(t,e),this._setNativeValue(t,e,this._groupNativeControls({includeDisabled:!0})),this._scheduleDirtyRefresh()}setValues(t){if(!t||typeof t!="object")return;const e=this._groupNativeControls({includeDisabled:!0});Object.entries(t).forEach(([i,r])=>{this._controller.setValue(i,r),this._setNativeValue(i,r,e)}),this._scheduleDirtyRefresh()}getValues(){const t={...this._controller.getValues()},e=new Set(Object.keys(t)),i=this._collectNativeValues(e,this._groupNativeControls());return Object.assign(t,i),t}_queryNativeControls(t={}){const{includeDisabled:e=!1}=t;return Array.from(this.querySelectorAll("input[name],textarea[name],select[name]")).filter(r=>!(!x(r)||r.closest("ui-form")!==this||!e&&r.matches(":disabled")))}_groupNativeControls(t={}){const e=new Map;return this._queryNativeControls(t).forEach(i=>{const r=i.getAttribute("name")||"";if(!r)return;const s=e.get(r)||[];s.push(i),e.set(r,s)}),e}_collectNativeValues(t,e){const i={};return e.forEach((r,s)=>{if(t.has(s))return;const n=r[0];if(n){if(n instanceof HTMLInputElement&&n.type==="radio"){const a=r.find(l=>l instanceof HTMLInputElement&&l.checked);i[s]=a?a.value:"";return}if(n instanceof HTMLInputElement&&n.type==="checkbox"){if(r.length===1){i[s]=n.checked;return}i[s]=r.filter(a=>a instanceof HTMLInputElement&&a.checked).map(a=>a.value||"on");return}if(n instanceof HTMLSelectElement&&n.multiple){i[s]=Array.from(n.selectedOptions).map(a=>a.value);return}if(n instanceof HTMLInputElement&&n.type==="file"){i[s]=Array.from(n.files||[]);return}i[s]=n.value}}),i}_setNativeValue(t,e,i){const r=(i||this._groupNativeControls({includeDisabled:!0})).get(t)||[];if(!r.length)return;const s=r[0];if(s){if(s instanceof HTMLInputElement&&s.type==="radio"){const n=String(e??"");r.forEach(a=>{a instanceof HTMLInputElement&&(a.checked=a.value===n)});return}if(s instanceof HTMLInputElement&&s.type==="checkbox"){if(r.length===1){const a=typeof e=="boolean"?e:!!e;s.checked=a;return}const n=Array.isArray(e)?e.map(a=>String(a)):[];r.forEach(a=>{a instanceof HTMLInputElement&&(a.checked=n.includes(a.value||"on"))});return}if(s instanceof HTMLSelectElement&&s.multiple){const n=Array.isArray(e)?e.map(a=>String(a)):[];Array.from(s.options).forEach(a=>{a.selected=n.includes(a.value)});return}s instanceof HTMLInputElement&&s.type==="file"||(s.value=String(e??""))}}async validate(){const t=await this._controller.validateAll(),e=this._validateNativeControls(),i={valid:t.valid&&e.valid,errors:{...e.errors,...t.errors}};return this.dispatchEvent(new CustomEvent("validate",{bubbles:!0,composed:!0,detail:i})),i}_validateNativeControls(){const t={};let e=null,i=!0;return this._groupNativeControls().forEach((s,n)=>{for(const a of s)if(!(!a.willValidate||a.checkValidity())){i=!1,t[n]||(t[n]=a.validationMessage||"invalid"),e||(e=a);break}}),{valid:i,errors:t,firstInvalid:e}}async submit(){if(this._submitting||this.hasAttribute("loading")||this.hasAttribute("disabled"))return!1;this._submitting=!0;const t=this.hasAttribute("loading");t||this.setAttribute("loading","");try{const e=this.getValues();if(!this.hasAttribute("novalidate")){const r=await this._controller.validateAll(),s=this._validateNativeControls(),n={...s.errors,...r.errors},a=r.valid&&s.valid;if(this.dispatchEvent(new CustomEvent("validate",{bubbles:!0,composed:!0,detail:{valid:a,errors:n}})),!a)return this.dispatchEvent(new CustomEvent("invalid",{bubbles:!0,composed:!0,detail:{errors:n,values:e}})),this._focusFirstInvalid(s.firstInvalid,n),!1}return this.dispatchEvent(new CustomEvent("submit",{bubbles:!0,composed:!0,detail:{values:e}})),this.markClean(e),!0}finally{this._submitting=!1,t||this.removeAttribute("loading")}}_focusFirstInvalid(t,e){if(t){t.focus();return}const i=Object.entries(e).find(([,n])=>!!n)?.[0];if(!i)return;const r=i.replace(/"/g,'\\"'),s=this.querySelector(`[name="${r}"]`);!s||typeof s.focus!="function"||s.focus()}async requestSubmit(){return this.submit()}reset(t){if(t&&typeof t=="object"){this.setValues(t),this.markClean(t);return}this.setValues(this._cleanValues),this.markClean(this._cleanValues)}get dirty(){return this._dirty}isDirty(){return this._dirty}markClean(t){if(t&&typeof t=="object"){this._setBaseline(t);return}this._setBaseline(this.getValues())}_setBaseline(t,e=!0){this._cleanValues=c(t||{}),this._initialSnapshot=this._snapshot(this._cleanValues),this._baselineReady=!0,this._setDirty(!1,e)}_snapshot(t){const e=t&&typeof t=="object"?t:this.getValues();try{return JSON.stringify(h(e||{}))}catch{return""}}_setDirty(t,e=!0){this._dirty!==t&&(this._dirty=t,this._dirtyAttrSyncing=!0,t?this.setAttribute("dirty",""):this.hasAttribute("dirty")&&this.removeAttribute("dirty"),this._dirtyAttrSyncing=!1,this._syncStatus(),this._syncFormAttrs(),e&&this.dispatchEvent(new CustomEvent("dirty-change",{bubbles:!0,composed:!0,detail:{dirty:t,values:this.getValues()}})))}_scheduleDirtyRefresh(){if(this._dirtyFrame!=null)return;const t=typeof window<"u"?window.setTimeout.bind(window):setTimeout;this._dirtyFrame=t(()=>{this._dirtyFrame=null,this._refreshDirtyState()},0)}_refreshDirtyState(){if(!this._baselineReady)return;const t=this._snapshot()!==this._initialSnapshot;if(this._setDirty(t),!this.hasAttribute("autosave"))return;if(!t||this.hasAttribute("loading")){this._autosaveTimer&&(clearTimeout(this._autosaveTimer),this._autosaveTimer=null);return}const e=Number(this.getAttribute("autosave-delay")||800),i=Number.isFinite(e)&&e>=0?e:800;this._autosaveTimer&&clearTimeout(this._autosaveTimer),this._autosaveTimer=setTimeout(()=>{this._autosaveTimer=null,this._dirty&&this.dispatchEvent(new CustomEvent("autosave",{bubbles:!0,composed:!0,detail:{values:this.getValues(),dirty:this._dirty}}))},i)}_onValueEvent(t){const e=t.target;if(!e||e===this)return;const i=e.closest("ui-form");i&&i!==this||this._scheduleDirtyRefresh()}_onBeforeUnload(t){!this.hasAttribute("guard-unsaved")||!this._dirty||(t.preventDefault(),t.returnValue="")}_onSlotChange(){this._syncStructure(),this._syncStatus(),this._syncFormAttrs(),this._scheduleDirtyRefresh()}_syncGap(){const t=this.getAttribute("gap");t?this.style.setProperty("--ui-form-gap",t):this.style.removeProperty("--ui-form-gap")}_syncFormAttrs(){const t=this._formEl;if(!t)return;t.setAttribute("aria-busy",this.hasAttribute("loading")?"true":"false");const e=this.hasAttribute("disabled");t.setAttribute("aria-disabled",e?"true":"false"),e?t.setAttribute("inert",""):t.removeAttribute("inert"),this.hasAttribute("novalidate")?t.setAttribute("novalidate",""):t.removeAttribute("novalidate");const i=this.getAttribute("aria-label"),r=this.getAttribute("aria-labelledby");i?t.setAttribute("aria-label",i):t.removeAttribute("aria-label"),r?t.setAttribute("aria-labelledby",r):t.removeAttribute("aria-labelledby");const s=[];this._descriptionVisible&&s.push(`${this._uid}-description`),this._statusVisible&&s.push(`${this._uid}-status`),s.length?t.setAttribute("aria-describedby",s.join(" ")):t.removeAttribute("aria-describedby")}_syncStructure(){const t=(this.getAttribute("heading")||this.getAttribute("title")||"").trim(),e=(this.getAttribute("description")||"").trim(),i=u(this._headingSlot),r=u(this._titleSlot),s=u(this._descriptionSlot),n=u(this._actionsSlot),a=u(this._footerSlot),l=!!t||i||r,d=!!e||s,f=l||d,p=f||n;this._titleTextEl&&(this._titleTextEl.textContent=t,!t||i||r?this._titleTextEl.setAttribute("hidden",""):this._titleTextEl.removeAttribute("hidden")),this._descriptionTextEl&&(this._descriptionTextEl.textContent=e,!e||s?this._descriptionTextEl.setAttribute("hidden",""):this._descriptionTextEl.removeAttribute("hidden")),this._titleEl&&(l?this._titleEl.removeAttribute("hidden"):this._titleEl.setAttribute("hidden","")),this._descriptionEl&&(d?this._descriptionEl.removeAttribute("hidden"):this._descriptionEl.setAttribute("hidden","")),this._headingEl&&(f?this._headingEl.removeAttribute("hidden"):this._headingEl.setAttribute("hidden","")),this._actionsEl&&(n?this._actionsEl.removeAttribute("hidden"):this._actionsEl.setAttribute("hidden","")),this._headerEl&&(p?this._headerEl.removeAttribute("hidden"):this._headerEl.setAttribute("hidden","")),this._footerEl&&(a?this._footerEl.removeAttribute("hidden"):this._footerEl.setAttribute("hidden","")),this._descriptionVisible=d}_deriveStatusTextAndTone(){const t=this.hasAttribute("loading"),e=A(this.getAttribute("state")),i=(this.getAttribute("state-text")||"").trim(),r=(this.getAttribute("loading-text")||"").trim()||"Saving changes...";return t?{text:r,tone:"loading"}:i?{text:i,tone:e}:e==="success"?{text:"Saved",tone:"success"}:e==="warning"?{text:"Needs attention",tone:"warning"}:e==="error"?{text:"Validation errors present",tone:"error"}:this._dirty?{text:"Unsaved changes",tone:"warning"}:{text:"",tone:"default"}}_syncStatus(){if(!this._statusEl||!this._statusTextEl)return;const t=u(this._statusSlot),e=this._deriveStatusTextAndTone();t?this._statusTextEl.setAttribute("hidden",""):(this._statusTextEl.textContent=e.text,e.text?this._statusTextEl.removeAttribute("hidden"):this._statusTextEl.setAttribute("hidden",""));const i=t||!!e.text;i?this._statusEl.removeAttribute("hidden"):this._statusEl.setAttribute("hidden",""),this._statusEl.setAttribute("data-tone",e.tone),this._statusVisible=i}attributeChangedCallback(t,e,i){if(e!==i){if(t==="title"){i!=null&&!this.hasAttribute("heading")&&this.setAttribute("heading",i),this.hasAttribute("title")&&this.removeAttribute("title");return}if(v.has(t)){this._syncStructure(),this._syncStatus(),this._syncFormAttrs();return}if(t==="gap"){this._syncGap();return}if(t==="dirty"){if(!this._dirtyAttrSyncing){const r=this.hasAttribute("dirty");this._dirty=r,this._syncStatus(),this._syncFormAttrs()}return}if(t==="loading"||t==="novalidate"||t==="state"||t==="state-text"||t==="loading-text"||t==="disabled"){this._syncStatus(),this._syncFormAttrs();return}if(t==="guard-unsaved"){if(typeof window>"u")return;this.hasAttribute("guard-unsaved")?window.addEventListener("beforeunload",this._onBeforeUnload):window.removeEventListener("beforeunload",this._onBeforeUnload);return}(t==="aria-label"||t==="aria-labelledby")&&this._syncFormAttrs()}}render(){this._syncGap();const t=this.getAttribute("heading")||this.getAttribute("title")||"",e=this.getAttribute("description")||"";this.setContent(`
|
|
345
|
+
`;function m(o){return o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function u(o){if(!o)return!1;const t=o.assignedNodes({flatten:!0});return t.length?t.some(e=>e.nodeType===Node.TEXT_NODE?!!e.textContent?.trim():e.nodeType===Node.ELEMENT_NODE):!1}function x(o){const t=o.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"}function h(o){if(o==null)return o;if(o instanceof Date)return o.toISOString();if(typeof File<"u"&&o instanceof File)return{__file:!0,name:o.name,size:o.size,type:o.type,lastModified:o.lastModified};if(Array.isArray(o))return o.map(t=>h(t));if(typeof o=="object"){const t=Object.entries(o).sort(([i],[r])=>i.localeCompare(r)),e={};return t.forEach(([i,r])=>{e[i]=h(r)}),e}return o}function c(o){if(Array.isArray(o))return o.map(t=>c(t));if(o&&typeof o=="object"){if(typeof File<"u"&&o instanceof File)return o;if(o instanceof Date)return new Date(o.getTime());const t={};return Object.entries(o).forEach(([e,i])=>{t[e]=c(i)}),t}return o}function A(o){return o==="success"||o==="warning"||o==="error"?o:"default"}class b extends g.ElementBase{constructor(){super(),this._controller=new _,this._submitting=!1,this._autosaveTimer=null,this._readyFrame=null,this._dirtyFrame=null,this._initialSnapshot="",this._cleanValues={},this._baselineReady=!1,this._dirty=!1,this._dirtyAttrSyncing=!1,this._uid=Math.random().toString(36).slice(2,10),this._formEl=null,this._headerEl=null,this._headingEl=null,this._titleEl=null,this._descriptionEl=null,this._titleTextEl=null,this._descriptionTextEl=null,this._actionsEl=null,this._statusEl=null,this._statusTextEl=null,this._footerEl=null,this._titleSlot=null,this._headingSlot=null,this._descriptionSlot=null,this._actionsSlot=null,this._statusSlot=null,this._footerSlot=null,this._descriptionVisible=!1,this._statusVisible=!1,this._onNativeSubmit=this._onNativeSubmit.bind(this),this._onValueEvent=this._onValueEvent.bind(this),this._onBeforeUnload=this._onBeforeUnload.bind(this),this._onSlotChange=this._onSlotChange.bind(this)}static get observedAttributes(){return["novalidate","variant","tone","density","shape","elevation","gap","headless","loading","autosave","autosave-delay","guard-unsaved","dirty","disabled","heading","title","description","state","state-text","loading-text","aria-label","aria-labelledby"]}connectedCallback(){if(super.connectedCallback(),this.hasAttribute("title")&&!this.hasAttribute("heading")){const t=this.getAttribute("title");t!=null&&this.setAttribute("heading",t),this.removeAttribute("title")}this.root.addEventListener("submit",this._onNativeSubmit),this.root.addEventListener("slotchange",this._onSlotChange),this.addEventListener("input",this._onValueEvent),this.addEventListener("change",this._onValueEvent),this.hasAttribute("guard-unsaved")&&typeof window<"u"&&window.addEventListener("beforeunload",this._onBeforeUnload),this._adoptControls(),queueMicrotask(()=>{!this.isConnected||this._baselineReady||this._setBaseline(this.getValues(),!1)}),this.hasAttribute("data-ui-ready")||(typeof requestAnimationFrame=="function"?this._readyFrame=requestAnimationFrame(()=>{this._readyFrame=null,this.setAttribute("data-ui-ready","")}):this._readyFrame=window.setTimeout(()=>{this._readyFrame=null,this.setAttribute("data-ui-ready","")},16))}disconnectedCallback(){this.root.removeEventListener("submit",this._onNativeSubmit),this.root.removeEventListener("slotchange",this._onSlotChange),this.removeEventListener("input",this._onValueEvent),this.removeEventListener("change",this._onValueEvent),this._readyFrame!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this._readyFrame),clearTimeout(this._readyFrame),this._readyFrame=null),this._autosaveTimer&&(clearTimeout(this._autosaveTimer),this._autosaveTimer=null),this._dirtyFrame!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this._dirtyFrame),clearTimeout(this._dirtyFrame),this._dirtyFrame=null),typeof window<"u"&&window.removeEventListener("beforeunload",this._onBeforeUnload),super.disconnectedCallback()}_onNativeSubmit(t){t.target?.classList.contains("form")&&(t.preventDefault(),t.stopPropagation(),!this.hasAttribute("disabled")&&this.submit())}_adoptControls(){this.querySelectorAll("[name]").forEach(t=>{const e=t._registerWithForm;typeof e=="function"&&t.closest("ui-form")===this&&e.call(t)})}registerField(t,e){return this._controller.registerField(t,e)}setValue(t,e){this._controller.setValue(t,e),this._setNativeValue(t,e,this._groupNativeControls({includeDisabled:!0})),this._scheduleDirtyRefresh()}setValues(t){if(!t||typeof t!="object")return;const e=this._groupNativeControls({includeDisabled:!0});Object.entries(t).forEach(([i,r])=>{this._controller.setValue(i,r),this._setNativeValue(i,r,e)}),this._scheduleDirtyRefresh()}getValues(){const t={...this._controller.getValues()},e=new Set(Object.keys(t)),i=this._collectNativeValues(e,this._groupNativeControls());return Object.assign(t,i),t}_queryNativeControls(t={}){const{includeDisabled:e=!1}=t;return Array.from(this.querySelectorAll("input[name],textarea[name],select[name]")).filter(r=>!(!x(r)||r.closest("ui-form")!==this||!e&&r.matches(":disabled")))}_groupNativeControls(t={}){const e=new Map;return this._queryNativeControls(t).forEach(i=>{const r=i.getAttribute("name")||"";if(!r)return;const s=e.get(r)||[];s.push(i),e.set(r,s)}),e}_collectNativeValues(t,e){const i={};return e.forEach((r,s)=>{if(t.has(s))return;const n=r[0];if(n){if(n instanceof HTMLInputElement&&n.type==="radio"){const a=r.find(l=>l instanceof HTMLInputElement&&l.checked);i[s]=a?a.value:"";return}if(n instanceof HTMLInputElement&&n.type==="checkbox"){if(r.length===1){i[s]=n.checked;return}i[s]=r.filter(a=>a instanceof HTMLInputElement&&a.checked).map(a=>a.value||"on");return}if(n instanceof HTMLSelectElement&&n.multiple){i[s]=Array.from(n.selectedOptions).map(a=>a.value);return}if(n instanceof HTMLInputElement&&n.type==="file"){i[s]=Array.from(n.files||[]);return}i[s]=n.value}}),i}_setNativeValue(t,e,i){const r=(i||this._groupNativeControls({includeDisabled:!0})).get(t)||[];if(!r.length)return;const s=r[0];if(s){if(s instanceof HTMLInputElement&&s.type==="radio"){const n=String(e??"");r.forEach(a=>{a instanceof HTMLInputElement&&(a.checked=a.value===n)});return}if(s instanceof HTMLInputElement&&s.type==="checkbox"){if(r.length===1){const a=typeof e=="boolean"?e:!!e;s.checked=a;return}const n=Array.isArray(e)?e.map(a=>String(a)):[];r.forEach(a=>{a instanceof HTMLInputElement&&(a.checked=n.includes(a.value||"on"))});return}if(s instanceof HTMLSelectElement&&s.multiple){const n=Array.isArray(e)?e.map(a=>String(a)):[];Array.from(s.options).forEach(a=>{a.selected=n.includes(a.value)});return}s instanceof HTMLInputElement&&s.type==="file"||(s.value=String(e??""))}}async validate(){const t=await this._controller.validateAll(),e=this._validateNativeControls(),i={valid:t.valid&&e.valid,errors:{...e.errors,...t.errors}};return this.dispatchEvent(new CustomEvent("validate",{bubbles:!0,composed:!0,detail:i})),i}_validateNativeControls(){const t={};let e=null,i=!0;return this._groupNativeControls().forEach((s,n)=>{for(const a of s)if(!(!a.willValidate||a.checkValidity())){i=!1,t[n]||(t[n]=a.validationMessage||"invalid"),e||(e=a);break}}),{valid:i,errors:t,firstInvalid:e}}async submit(){if(this._submitting||this.hasAttribute("loading")||this.hasAttribute("disabled"))return!1;this._submitting=!0;const t=this.hasAttribute("loading");t||this.setAttribute("loading","");try{const e=this.getValues();if(!this.hasAttribute("novalidate")){const r=await this._controller.validateAll(),s=this._validateNativeControls(),n={...s.errors,...r.errors},a=r.valid&&s.valid;if(this.dispatchEvent(new CustomEvent("validate",{bubbles:!0,composed:!0,detail:{valid:a,errors:n}})),!a)return this.dispatchEvent(new CustomEvent("invalid",{bubbles:!0,composed:!0,detail:{errors:n,values:e}})),this._focusFirstInvalid(s.firstInvalid,n),!1}return this.dispatchEvent(new CustomEvent("submit",{bubbles:!0,composed:!0,detail:{values:e}})),this.markClean(e),!0}finally{this._submitting=!1,t||this.removeAttribute("loading")}}_focusFirstInvalid(t,e){if(t){t.focus();return}const i=Object.entries(e).find(([,n])=>!!n)?.[0];if(!i)return;const r=i.replace(/"/g,'\\"'),s=this.querySelector(`[name="${r}"]`);!s||typeof s.focus!="function"||s.focus()}async requestSubmit(){return this.submit()}reset(t){if(t&&typeof t=="object"){this.setValues(t),this.markClean(t);return}this.setValues(this._cleanValues),this.markClean(this._cleanValues)}get dirty(){return this._dirty}isDirty(){return this._dirty}markClean(t){if(t&&typeof t=="object"){this._setBaseline(t);return}this._setBaseline(this.getValues())}_setBaseline(t,e=!0){this._cleanValues=c(t||{}),this._initialSnapshot=this._snapshot(this._cleanValues),this._baselineReady=!0,this._setDirty(!1,e)}_snapshot(t){const e=t&&typeof t=="object"?t:this.getValues();try{return JSON.stringify(h(e||{}))}catch{return""}}_setDirty(t,e=!0){this._dirty!==t&&(this._dirty=t,this._dirtyAttrSyncing=!0,t?this.setAttribute("dirty",""):this.hasAttribute("dirty")&&this.removeAttribute("dirty"),this._dirtyAttrSyncing=!1,this._syncStatus(),this._syncFormAttrs(),e&&this.dispatchEvent(new CustomEvent("dirty-change",{bubbles:!0,composed:!0,detail:{dirty:t,values:this.getValues()}})))}_scheduleDirtyRefresh(){if(this._dirtyFrame!=null)return;const t=typeof window<"u"?window.setTimeout.bind(window):setTimeout;this._dirtyFrame=t(()=>{this._dirtyFrame=null,this._refreshDirtyState()},0)}_refreshDirtyState(){if(!this._baselineReady)return;const t=this._snapshot()!==this._initialSnapshot;if(this._setDirty(t),!this.hasAttribute("autosave"))return;if(!t||this.hasAttribute("loading")){this._autosaveTimer&&(clearTimeout(this._autosaveTimer),this._autosaveTimer=null);return}const e=Number(this.getAttribute("autosave-delay")||800),i=Number.isFinite(e)&&e>=0?e:800;this._autosaveTimer&&clearTimeout(this._autosaveTimer),this._autosaveTimer=setTimeout(()=>{this._autosaveTimer=null,this._dirty&&this.dispatchEvent(new CustomEvent("autosave",{bubbles:!0,composed:!0,detail:{values:this.getValues(),dirty:this._dirty}}))},i)}_onValueEvent(t){const e=t.target;if(!e||e===this)return;const i=e.closest("ui-form");i&&i!==this||this._scheduleDirtyRefresh()}_onBeforeUnload(t){!this.hasAttribute("guard-unsaved")||!this._dirty||(t.preventDefault(),t.returnValue="")}_onSlotChange(){this._syncStructure(),this._syncStatus(),this._syncFormAttrs(),this._scheduleDirtyRefresh()}_syncGap(){const t=this.getAttribute("gap");t?this.style.setProperty("--ui-form-gap",t):this.style.removeProperty("--ui-form-gap")}_syncFormAttrs(){const t=this._formEl;if(!t)return;t.setAttribute("aria-busy",this.hasAttribute("loading")?"true":"false");const e=this.hasAttribute("disabled");t.setAttribute("aria-disabled",e?"true":"false"),e?t.setAttribute("inert",""):t.removeAttribute("inert"),this.hasAttribute("novalidate")?t.setAttribute("novalidate",""):t.removeAttribute("novalidate");const i=this.getAttribute("aria-label"),r=this.getAttribute("aria-labelledby");i?t.setAttribute("aria-label",i):t.removeAttribute("aria-label"),r?t.setAttribute("aria-labelledby",r):t.removeAttribute("aria-labelledby");const s=[];this._descriptionVisible&&s.push(`${this._uid}-description`),this._statusVisible&&s.push(`${this._uid}-status`),s.length?t.setAttribute("aria-describedby",s.join(" ")):t.removeAttribute("aria-describedby")}_syncStructure(){const t=(this.getAttribute("heading")||this.getAttribute("title")||"").trim(),e=(this.getAttribute("description")||"").trim(),i=u(this._headingSlot),r=u(this._titleSlot),s=u(this._descriptionSlot),n=u(this._actionsSlot),a=u(this._footerSlot),l=!!t||i||r,d=!!e||s,f=l||d,p=f||n;this._titleTextEl&&(this._titleTextEl.textContent=t,!t||i||r?this._titleTextEl.setAttribute("hidden",""):this._titleTextEl.removeAttribute("hidden")),this._descriptionTextEl&&(this._descriptionTextEl.textContent=e,!e||s?this._descriptionTextEl.setAttribute("hidden",""):this._descriptionTextEl.removeAttribute("hidden")),this._titleEl&&(l?this._titleEl.removeAttribute("hidden"):this._titleEl.setAttribute("hidden","")),this._descriptionEl&&(d?this._descriptionEl.removeAttribute("hidden"):this._descriptionEl.setAttribute("hidden","")),this._headingEl&&(f?this._headingEl.removeAttribute("hidden"):this._headingEl.setAttribute("hidden","")),this._actionsEl&&(n?this._actionsEl.removeAttribute("hidden"):this._actionsEl.setAttribute("hidden","")),this._headerEl&&(p?this._headerEl.removeAttribute("hidden"):this._headerEl.setAttribute("hidden","")),this._footerEl&&(a?this._footerEl.removeAttribute("hidden"):this._footerEl.setAttribute("hidden","")),this._descriptionVisible=d}_deriveStatusTextAndTone(){const t=this.hasAttribute("loading"),e=A(this.getAttribute("state")),i=(this.getAttribute("state-text")||"").trim(),r=(this.getAttribute("loading-text")||"").trim()||"Saving changes...";return t?{text:r,tone:"loading"}:i?{text:i,tone:e}:e==="success"?{text:"Saved",tone:"success"}:e==="warning"?{text:"Needs attention",tone:"warning"}:e==="error"?{text:"Validation errors present",tone:"error"}:this._dirty?{text:"Unsaved changes",tone:"warning"}:{text:"",tone:"default"}}_syncStatus(){if(!this._statusEl||!this._statusTextEl)return;const t=u(this._statusSlot),e=this._deriveStatusTextAndTone();t?this._statusTextEl.setAttribute("hidden",""):(this._statusTextEl.textContent=e.text,e.text?this._statusTextEl.removeAttribute("hidden"):this._statusTextEl.setAttribute("hidden",""));const i=t||!!e.text;i?this._statusEl.removeAttribute("hidden"):this._statusEl.setAttribute("hidden",""),this._statusEl.setAttribute("data-tone",e.tone),this._statusVisible=i}attributeChangedCallback(t,e,i){if(e!==i){if(t==="title"){i!=null&&!this.hasAttribute("heading")&&this.setAttribute("heading",i),this.hasAttribute("title")&&this.removeAttribute("title");return}if(v.has(t)){this._syncStructure(),this._syncStatus(),this._syncFormAttrs();return}if(t==="gap"){this._syncGap();return}if(t==="dirty"){if(!this._dirtyAttrSyncing){const r=this.hasAttribute("dirty");this._dirty=r,this._syncStatus(),this._syncFormAttrs()}return}if(t==="loading"||t==="novalidate"||t==="state"||t==="state-text"||t==="loading-text"||t==="disabled"){this._syncStatus(),this._syncFormAttrs();return}if(t==="guard-unsaved"){if(typeof window>"u")return;this.hasAttribute("guard-unsaved")?window.addEventListener("beforeunload",this._onBeforeUnload):window.removeEventListener("beforeunload",this._onBeforeUnload);return}(t==="aria-label"||t==="aria-labelledby")&&this._syncFormAttrs()}}render(){this._syncGap();const t=this.getAttribute("heading")||this.getAttribute("title")||"",e=this.getAttribute("description")||"";this.setContent(`
|
|
346
346
|
<style>${y}</style>
|
|
347
347
|
<form
|
|
348
348
|
class="form"
|
package/dist/form.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as p } from "./ElementBase-
|
|
1
|
+
import { E as p } from "./ElementBase-BeZT54Hj.mjs";
|
|
2
2
|
class g {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.fields = /* @__PURE__ */ new Map();
|
|
@@ -466,7 +466,7 @@ class A extends p {
|
|
|
466
466
|
const t = this.getAttribute("title");
|
|
467
467
|
t != null && this.setAttribute("heading", t), this.removeAttribute("title");
|
|
468
468
|
}
|
|
469
|
-
this.root.addEventListener("submit", this._onNativeSubmit), this.root.addEventListener("slotchange", this._onSlotChange), this.addEventListener("input", this._onValueEvent), this.addEventListener("change", this._onValueEvent), this.hasAttribute("guard-unsaved") && typeof window < "u" && window.addEventListener("beforeunload", this._onBeforeUnload), queueMicrotask(() => {
|
|
469
|
+
this.root.addEventListener("submit", this._onNativeSubmit), this.root.addEventListener("slotchange", this._onSlotChange), this.addEventListener("input", this._onValueEvent), this.addEventListener("change", this._onValueEvent), this.hasAttribute("guard-unsaved") && typeof window < "u" && window.addEventListener("beforeunload", this._onBeforeUnload), this._adoptControls(), queueMicrotask(() => {
|
|
470
470
|
!this.isConnected || this._baselineReady || this._setBaseline(this.getValues(), !1);
|
|
471
471
|
}), this.hasAttribute("data-ui-ready") || (typeof requestAnimationFrame == "function" ? this._readyFrame = requestAnimationFrame(() => {
|
|
472
472
|
this._readyFrame = null, this.setAttribute("data-ui-ready", "");
|
|
@@ -480,6 +480,16 @@ class A extends p {
|
|
|
480
480
|
_onNativeSubmit(t) {
|
|
481
481
|
t.target?.classList.contains("form") && (t.preventDefault(), t.stopPropagation(), !this.hasAttribute("disabled") && this.submit());
|
|
482
482
|
}
|
|
483
|
+
// Markup that is on the page before the script that defines the elements is upgraded in the order the elements were
|
|
484
|
+
// defined, not in document order. A control defined before <ui-form> (ui-input, say) is upgraded first, finds no
|
|
485
|
+
// registerField() on the form yet, and skips registration for good: the form then has no values and validates
|
|
486
|
+
// nothing. Now that the form is upgraded, ask the controls inside it to register again.
|
|
487
|
+
_adoptControls() {
|
|
488
|
+
this.querySelectorAll("[name]").forEach((t) => {
|
|
489
|
+
const e = t._registerWithForm;
|
|
490
|
+
typeof e == "function" && t.closest("ui-form") === this && e.call(t);
|
|
491
|
+
});
|
|
492
|
+
}
|
|
483
493
|
registerField(t, e) {
|
|
484
494
|
return this._controller.registerField(t, e);
|
|
485
495
|
}
|
package/dist/gantt.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const At=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const At=require("./ElementBase-DxbvhLJs.js"),I=1440*60*1e3,y=42,V=62,J=376,N=28,Lt=15,vt=Lt*Math.SQRT2/2,gt={day:36,week:13,month:4.4,quarter:2.2,year:1.15},ht=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-gantt-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
|
|
4
4
|
--ui-gantt-panel: var(--ui-color-surface, #ffffff);
|
package/dist/gantt.esm.js
CHANGED
package/dist/grid.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("./ElementBase-DxbvhLJs.js"),w={sm:"var(--ui-breakpoint-sm, 640px)",md:"var(--ui-breakpoint-md, 768px)",lg:"var(--ui-breakpoint-lg, 1024px)",xl:"var(--ui-breakpoint-xl, 1280px)"},g=["display","columns","rows","gap","rowgap","columngap","autoflow","autorows","autocolumns","align","justify","place","aligncontent","justifycontent","placecontent"],v={xs:"var(--ui-space-xs, 4px)",sm:"var(--ui-space-sm, 8px)",md:"var(--ui-space-md, 12px)",lg:"var(--ui-space-lg, 20px)",xl:"var(--ui-space-xl, 28px)"},b=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-grid-display: grid;
|
|
4
4
|
--ui-grid-columns: 1fr;
|
package/dist/grid.esm.js
CHANGED
package/dist/hover-card.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./ElementBase-DxbvhLJs.js"),p=require("./positioner-D_fqyx_j.js"),v=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-hover-card-z: 1700;
|
|
4
4
|
--ui-hover-card-radius: var(--base-card-radius, var(--ui-radius, 4px));
|
package/dist/hover-card.esm.js
CHANGED
package/dist/icon-cloud.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("./ElementBase-DxbvhLJs.js"),z="920px",x=.86,R=1,$="20px",S="118px",E="40px",A="118px",N="30px",D=new Set(["clockwise","counterclockwise"]),I=new Set(["surface","soft","solid","glass","contrast","minimal"]),X=new Set(["brand","neutral","info","success","warning","danger"]),Y=new Set(["sm","md","lg","xl","1","2","3","4"]),q=new Set(["none","low","high"]),c={sm:{radius:"90px",radiusPx:90,itemSize:"32px",itemSizePx:32,centerSize:"84px",padding:"14px",shellRadius:"24px"},md:{radius:S,radiusPx:118,itemSize:E,itemSizePx:40,centerSize:A,padding:"18px",shellRadius:"28px"},lg:{radius:"140px",radiusPx:140,itemSize:"46px",itemSizePx:46,centerSize:"132px",padding:"22px",shellRadius:"32px"},xl:{radius:"164px",radiusPx:164,itemSize:"54px",itemSizePx:54,centerSize:"152px",padding:"26px",shellRadius:"36px"}},U=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-icon-cloud-radius: ${S};
|
|
4
4
|
--ui-icon-cloud-item-size: ${E};
|
package/dist/icon-cloud.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as C } from "./ElementBase-
|
|
1
|
+
import { E as C } from "./ElementBase-BeZT54Hj.mjs";
|
|
2
2
|
const z = "920px", x = 0.86, O = 1, R = "20px", S = "118px", E = "40px", A = "118px", $ = "30px", N = /* @__PURE__ */ new Set(["clockwise", "counterclockwise"]), D = /* @__PURE__ */ new Set(["surface", "soft", "solid", "glass", "contrast", "minimal"]), I = /* @__PURE__ */ new Set(["brand", "neutral", "info", "success", "warning", "danger"]), X = /* @__PURE__ */ new Set(["sm", "md", "lg", "xl", "1", "2", "3", "4"]), Y = /* @__PURE__ */ new Set(["none", "low", "high"]), c = {
|
|
3
3
|
sm: {
|
|
4
4
|
radius: "90px",
|
package/dist/icon.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ui-icon-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ui-icon-D3avtxX_.js");exports.UIIcon=e.UIIcon;
|
package/dist/icon.esm.js
CHANGED