@editora/ui-core 0.1.19 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ElementBase-1b301e7f.js → ElementBase-EV6mVBUV.js} +1 -1
- package/dist/{ElementBase-909688f3.mjs → ElementBase-YlTLMsGk.mjs} +3 -3
- package/dist/accordion.cjs.js +3 -3
- package/dist/accordion.esm.js +39 -62
- package/dist/alert-dialog.cjs.js +19 -19
- package/dist/alert-dialog.esm.js +69 -87
- package/dist/alert.cjs.js +1 -1
- package/dist/alert.esm.js +4 -7
- package/dist/anchor.cjs.js +2 -2
- package/dist/anchor.esm.js +3 -3
- package/dist/animated-beam.cjs.js +83 -83
- package/dist/animated-beam.esm.js +250 -277
- package/dist/animated-list.cjs.js +4 -4
- package/dist/animated-list.esm.js +47 -61
- package/dist/animated-text.cjs.js +2 -2
- package/dist/animated-text.esm.js +13 -24
- package/dist/app-header.cjs.js +3 -3
- package/dist/app-header.esm.js +11 -13
- package/dist/aspect-ratio.cjs.js +1 -1
- package/dist/aspect-ratio.esm.js +4 -7
- package/dist/avatar.cjs.js +1 -1
- package/dist/avatar.esm.js +7 -13
- package/dist/badge.cjs.js +1 -1
- package/dist/badge.esm.js +4 -7
- package/dist/block-controls.cjs.js +2 -2
- package/dist/block-controls.esm.js +19 -35
- package/dist/box.cjs.js +1 -1
- package/dist/box.esm.js +8 -15
- package/dist/breadcrumb.cjs.js +2 -2
- package/dist/breadcrumb.esm.js +20 -37
- package/dist/button.cjs.js +1 -521
- package/dist/button.esm.js +2 -671
- package/dist/{calendar-2c11b824.mjs → calendar-DLY4acgn.mjs} +293 -342
- package/dist/{calendar-a8735e40.js → calendar-Dkof-FTK.js} +25 -25
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.esm.js +8 -9
- package/dist/card.cjs.js +4 -4
- package/dist/card.esm.js +13 -19
- package/dist/chart.cjs.js +64 -64
- package/dist/chart.esm.js +223 -254
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.esm.js +2 -3
- package/dist/collapsible.cjs.js +1 -1
- package/dist/collapsible.esm.js +5 -9
- package/dist/{collection-a1aac0c6.mjs → collection-C7URGjEI.mjs} +8 -14
- package/dist/collection.cjs.js +1 -1
- package/dist/collection.esm.js +30 -29
- package/dist/color-picker.cjs.js +10 -10
- package/dist/color-picker.esm.js +190 -253
- package/dist/combobox.cjs.js +13 -13
- package/dist/combobox.esm.js +93 -126
- package/dist/command-palette.cjs.js +3 -3
- package/dist/command-palette.esm.js +19 -30
- package/dist/command.cjs.js +4 -4
- package/dist/command.esm.js +41 -53
- package/dist/components/ui-collection.d.ts.map +1 -1
- package/dist/components/ui-multi-select.d.ts.map +1 -1
- package/dist/components/ui-orbiter.d.ts.map +1 -1
- package/dist/components/ui-portal.d.ts.map +1 -1
- package/dist/components/ui-positioner.d.ts.map +1 -1
- package/dist/components/ui-skeleton.d.ts.map +1 -1
- package/dist/components/ui-sortable.d.ts +8 -0
- package/dist/components/ui-sortable.d.ts.map +1 -1
- package/dist/components/ui-split-button.d.ts +1 -0
- package/dist/components/ui-split-button.d.ts.map +1 -1
- package/dist/components/ui-tabs.d.ts.map +1 -1
- package/dist/components/ui-textarea.d.ts.map +1 -1
- package/dist/components/ui-time-picker.d.ts.map +1 -1
- package/dist/container.cjs.js +2 -2
- package/dist/container.esm.js +2 -3
- package/dist/context-menu.cjs.js +8 -8
- package/dist/context-menu.esm.js +157 -219
- package/dist/control-group.cjs.js +1 -1
- package/dist/control-group.esm.js +2 -3
- package/dist/data-table.cjs.js +4 -4
- package/dist/data-table.esm.js +299 -381
- package/dist/date-field.cjs.js +3 -3
- package/dist/date-field.esm.js +68 -80
- package/dist/date-picker.cjs.js +9 -9
- package/dist/date-picker.esm.js +69 -97
- package/dist/date-range-picker.cjs.js +3 -3
- package/dist/date-range-picker.esm.js +32 -56
- package/dist/date-range-time-picker.cjs.js +9 -9
- package/dist/date-range-time-picker.esm.js +111 -140
- package/dist/date-time-picker.cjs.js +7 -7
- package/dist/date-time-picker.esm.js +115 -147
- package/dist/date-time-utils-Dmost5Ee.js +1 -0
- package/dist/date-time-utils-y1N2gvG2.mjs +268 -0
- package/dist/description.cjs.js +1 -1
- package/dist/description.esm.js +3 -5
- package/dist/dialog.cjs.js +12 -12
- package/dist/dialog.esm.js +44 -63
- package/dist/direction-provider.cjs.js +1 -1
- package/dist/direction-provider.esm.js +2 -3
- package/dist/{dismissable-layer-9c7e6b58.mjs → dismissable-layer-BmPIoK80.mjs} +29 -33
- package/dist/dismissable-layer-DNfrKA20.js +1 -0
- package/dist/dismissable-layer.cjs.js +2 -2
- package/dist/dismissable-layer.esm.js +4 -6
- package/dist/dock.cjs.js +5 -5
- package/dist/dock.esm.js +134 -155
- package/dist/drawer.cjs.js +2 -2
- package/dist/drawer.esm.js +18 -35
- package/dist/dropdown.cjs.js +2 -2
- package/dist/dropdown.esm.js +119 -149
- package/dist/dropzone.cjs.js +1 -1
- package/dist/dropzone.esm.js +0 -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 +3 -5
- package/dist/field.cjs.js +5 -5
- package/dist/field.esm.js +27 -34
- package/dist/fieldset.cjs.js +4 -4
- package/dist/fieldset.esm.js +19 -24
- package/dist/file-upload.cjs.js +4 -4
- package/dist/file-upload.esm.js +69 -93
- package/dist/flex.cjs.js +1 -1
- package/dist/flex.esm.js +5 -9
- package/dist/floating-toolbar.cjs.js +4 -4
- package/dist/floating-toolbar.esm.js +60 -85
- package/dist/focus-scope-Bwug2gDv.js +1 -0
- package/dist/{focus-scope-103833ee.mjs → focus-scope-CmEsG5UZ.mjs} +39 -48
- package/dist/focus-scope.cjs.js +2 -2
- package/dist/focus-scope.esm.js +15 -20
- package/dist/form.cjs.js +2 -2
- package/dist/form.esm.js +26 -53
- package/dist/gantt.cjs.js +43 -43
- package/dist/gantt.esm.js +295 -322
- package/dist/grid.cjs.js +1 -1
- package/dist/grid.esm.js +5 -9
- package/dist/hover-card.cjs.js +4 -4
- package/dist/hover-card.esm.js +22 -28
- package/dist/icon-cloud.cjs.js +7 -7
- package/dist/icon-cloud.esm.js +48 -62
- package/dist/icon.cjs.js +1 -1
- package/dist/icon.esm.js +2 -4
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +378 -390
- package/dist/inline-edit.cjs.js +11 -11
- package/dist/inline-edit.esm.js +32 -36
- package/dist/input.cjs.js +17 -17
- package/dist/input.esm.js +50 -63
- package/dist/label.cjs.js +2 -2
- package/dist/label.esm.js +8 -17
- package/dist/layout.cjs.js +2 -2
- package/dist/layout.esm.js +20 -26
- package/dist/listbox-B6QgECax.js +46 -0
- package/dist/listbox-DJamVeFj.mjs +200 -0
- package/dist/listbox.cjs.js +1 -1
- package/dist/listbox.esm.js +2 -4
- package/dist/marquee.cjs.js +5 -5
- package/dist/marquee.esm.js +33 -50
- package/dist/masonry-grid.cjs.js +1 -1
- package/dist/masonry-grid.esm.js +5 -9
- package/dist/menu.cjs.js +3 -3
- package/dist/menu.esm.js +106 -126
- package/dist/menubar.cjs.js +5 -5
- package/dist/menubar.esm.js +118 -164
- package/dist/meter.cjs.js +2 -2
- package/dist/meter.esm.js +4 -4
- package/dist/multi-select.cjs.js +5 -5
- package/dist/multi-select.esm.js +125 -137
- package/dist/navigation-menu.cjs.js +4 -4
- package/dist/navigation-menu.esm.js +44 -55
- package/dist/number-field.cjs.js +2 -2
- package/dist/number-field.esm.js +73 -98
- package/dist/number-ticker.cjs.js +3 -3
- package/dist/number-ticker.esm.js +22 -43
- package/dist/odometer.cjs.js +1 -1
- package/dist/odometer.esm.js +5 -9
- package/dist/orbiter.cjs.js +13 -13
- package/dist/orbiter.esm.js +79 -90
- package/dist/{overlayManager-5bbd4dc3.mjs → overlayManager-BJjU1VA8.mjs} +4 -5
- package/dist/{overlayManager-0eda4e08.js → overlayManager-CSy3fJmJ.js} +1 -1
- package/dist/pagination.cjs.js +2 -2
- package/dist/pagination.esm.js +14 -18
- package/dist/{panel-group-a376cc5e.mjs → panel-group-8sVNnGxg.mjs} +24 -46
- package/dist/panel-group-CaD0_KQf.js +36 -0
- package/dist/panel-group.cjs.js +1 -1
- package/dist/panel-group.esm.js +2 -5
- package/dist/panel.cjs.js +4 -4
- package/dist/panel.esm.js +8 -10
- package/dist/password-field.cjs.js +9 -9
- package/dist/password-field.esm.js +62 -82
- package/dist/pin-input.cjs.js +3 -3
- package/dist/pin-input.esm.js +33 -39
- package/dist/placement-grid.cjs.js +4 -4
- package/dist/placement-grid.esm.js +108 -131
- package/dist/plugin-panel.cjs.js +7 -7
- package/dist/plugin-panel.esm.js +13 -15
- package/dist/popover.cjs.js +2 -2
- package/dist/popover.esm.js +21 -31
- package/dist/portal-DgpQ3Jo1.js +1 -0
- package/dist/{portal-fe73e5cc.mjs → portal-bR42gHvG.mjs} +43 -48
- package/dist/portal.cjs.js +3 -3
- package/dist/portal.esm.js +20 -28
- package/dist/{positioner-e9770c66.mjs → positioner-D0VGxtYU.mjs} +189 -209
- package/dist/positioner-D_fqyx_j.js +1 -0
- package/dist/positioner.cjs.js +2 -2
- package/dist/positioner.esm.js +22 -28
- package/dist/presence.cjs.js +1 -1
- package/dist/presence.esm.js +7 -13
- package/dist/primitives/auto-scroll.d.ts +9 -0
- package/dist/primitives/auto-scroll.d.ts.map +1 -0
- package/dist/primitives/selector.d.ts +4 -0
- package/dist/primitives/selector.d.ts.map +1 -0
- package/dist/progress.cjs.js +1 -1
- package/dist/progress.esm.js +5 -9
- package/dist/quick-actions.cjs.js +6 -6
- package/dist/quick-actions.esm.js +52 -62
- package/dist/radio-group.cjs.js +13 -13
- package/dist/radio-group.esm.js +39 -51
- package/dist/radio.cjs.js +1 -1
- package/dist/radio.esm.js +5 -9
- package/dist/rating.cjs.js +1 -1
- package/dist/rating.esm.js +12 -23
- package/dist/{roving-focus-group-4350c9a7.mjs → roving-focus-group-Dbm1Jko_.mjs} +3 -6
- package/dist/roving-focus-group.cjs.js +1 -1
- package/dist/roving-focus-group.esm.js +3 -5
- package/dist/runtime-CTaOSmBj.js +1 -0
- package/dist/{runtime-161f68a2.mjs → runtime-D1gFh1fS.mjs} +338 -366
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.esm.js +6 -6
- package/dist/scroll-area.cjs.js +3 -3
- package/dist/scroll-area.esm.js +38 -46
- package/dist/{scroll-lock-31da444f.mjs → scroll-lock-LfqXXqsu.mjs} +5 -9
- package/dist/section.cjs.js +1 -1
- package/dist/section.esm.js +1 -1
- package/dist/select.cjs.js +7 -7
- package/dist/select.esm.js +67 -97
- package/dist/selection-popup.cjs.js +1 -1
- package/dist/selection-popup.esm.js +8 -15
- package/dist/selector-BvAh35ve.js +1 -0
- package/dist/selector-WI8pD7YO.mjs +18 -0
- package/dist/separator.cjs.js +1 -1
- package/dist/separator.esm.js +1 -1
- package/dist/sidebar.cjs.js +18 -18
- package/dist/sidebar.esm.js +117 -139
- package/dist/skeleton.cjs.js +11 -11
- package/dist/skeleton.esm.js +27 -24
- package/dist/slider.cjs.js +1 -1
- package/dist/slider.esm.js +6 -11
- package/dist/slot.cjs.js +4 -4
- package/dist/slot.esm.js +16 -19
- package/dist/sortable.cjs.js +79 -65
- package/dist/sortable.esm.js +714 -734
- package/dist/spinning-text.cjs.js +12 -12
- package/dist/spinning-text.esm.js +80 -92
- package/dist/split-button.cjs.js +4 -4
- package/dist/split-button.esm.js +77 -62
- package/dist/splitter.cjs.js +1 -1
- package/dist/splitter.esm.js +1 -1
- package/dist/stepper.cjs.js +8 -8
- package/dist/stepper.esm.js +32 -52
- package/dist/switch.cjs.js +7 -7
- package/dist/switch.esm.js +23 -31
- package/dist/table.cjs.js +2 -2
- package/dist/table.esm.js +46 -56
- package/dist/tabs.cjs.js +8 -8
- package/dist/tabs.esm.js +89 -109
- package/dist/tags-input.cjs.js +4 -4
- package/dist/tags-input.esm.js +45 -62
- package/dist/textarea.cjs.js +10 -10
- package/dist/textarea.esm.js +49 -52
- package/dist/time-field.cjs.js +4 -4
- package/dist/time-field.esm.js +70 -84
- package/dist/time-picker.cjs.js +22 -22
- package/dist/time-picker.esm.js +88 -110
- package/dist/timeline.cjs.js +1 -1
- package/dist/timeline.esm.js +3 -5
- package/dist/toast.cjs.js +2 -2
- package/dist/toast.esm.js +33 -47
- package/dist/toggle-group.cjs.js +6 -6
- package/dist/toggle-group.esm.js +85 -105
- package/dist/toggle.cjs.js +1 -1
- package/dist/toggle.esm.js +3 -5
- package/dist/toolbar.cjs.js +1 -1
- package/dist/toolbar.esm.js +13 -24
- package/dist/tooltip.cjs.js +2 -2
- package/dist/tooltip.esm.js +31 -42
- package/dist/transfer-list.cjs.js +31 -31
- package/dist/transfer-list.esm.js +114 -127
- package/dist/{tree-dcd74a4a.mjs → tree-B3kE8ESs.mjs} +55 -62
- package/dist/tree-Dx_kv_ih.js +39 -0
- package/dist/tree-item.cjs.js +2 -2
- package/dist/tree-item.esm.js +2 -3
- package/dist/tree.cjs.js +1 -1
- package/dist/tree.esm.js +2 -5
- package/dist/ui-button-Q0GNNWKC.mjs +665 -0
- package/dist/ui-button-rXQOS9QJ.js +521 -0
- package/dist/{icon-9e9da03b.js → ui-icon-BzVNC_lr.js} +4 -4
- package/dist/{icon-e2a85cc1.mjs → ui-icon-YI6lyuqU.mjs} +58 -65
- package/dist/visually-hidden.cjs.js +1 -1
- package/dist/visually-hidden.esm.js +1 -1
- package/dist/wizard.cjs.js +14 -14
- package/dist/wizard.esm.js +85 -105
- package/package.json +2 -2
- package/dist/date-time-utils-66480de4.js +0 -1
- package/dist/date-time-utils-a2c7af25.mjs +0 -307
- package/dist/dismissable-layer-193e3bed.js +0 -1
- package/dist/focus-scope-2b12b4e7.js +0 -1
- package/dist/listbox-308789a0.mjs +0 -210
- package/dist/listbox-ef2f708e.js +0 -46
- package/dist/panel-group-40254cdd.js +0 -36
- package/dist/portal-c69756c0.js +0 -1
- package/dist/positioner-33529bb8.js +0 -1
- package/dist/runtime-3f13807b.js +0 -1
- package/dist/tree-0a7a8d05.js +0 -39
- /package/dist/{collection-a2969ad2.js → collection-qv8A8rq4.js} +0 -0
- /package/dist/{menu-item-styles-27fdbac4.mjs → menu-item-styles-CZiPwPwl.mjs} +0 -0
- /package/dist/{menu-item-styles-83ad1e22.js → menu-item-styles-CbNUEwP2.js} +0 -0
- /package/dist/{roving-focus-group-5c059bf9.js → roving-focus-group-BdJ_4Njm.js} +0 -0
- /package/dist/{scroll-lock-d7b0df21.js → scroll-lock-BX6e3Ced.js} +0 -0
package/dist/aspect-ratio.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as o } from "./ElementBase-
|
|
1
|
+
import { E as o } from "./ElementBase-YlTLMsGk.mjs";
|
|
2
2
|
const c = `
|
|
3
3
|
:host {
|
|
4
4
|
display: block;
|
|
@@ -273,11 +273,9 @@ const c = `
|
|
|
273
273
|
`;
|
|
274
274
|
function p(n) {
|
|
275
275
|
const e = { width: 16, height: 9, ratio: 1.7777777777777777, padding: 56.25, text: "16/9" };
|
|
276
|
-
if (!n)
|
|
277
|
-
return e;
|
|
276
|
+
if (!n) return e;
|
|
278
277
|
const t = n.trim();
|
|
279
|
-
if (!t)
|
|
280
|
-
return e;
|
|
278
|
+
if (!t) return e;
|
|
281
279
|
const i = t.includes("/") ? t.split("/") : t.includes(":") ? t.split(":") : [];
|
|
282
280
|
if (i.length === 2) {
|
|
283
281
|
const r = Number(i[0]), a = Number(i[1]);
|
|
@@ -321,8 +319,7 @@ class d extends o {
|
|
|
321
319
|
];
|
|
322
320
|
}
|
|
323
321
|
_normalizeRadius(e) {
|
|
324
|
-
if (e == null)
|
|
325
|
-
return "var(--base-aspect-ratio-radius, var(--ui-radius, 4px))";
|
|
322
|
+
if (e == null) return "var(--base-aspect-ratio-radius, var(--ui-radius, 4px))";
|
|
326
323
|
const t = e.trim().toLowerCase();
|
|
327
324
|
return t ? t === "full" || t === "pill" ? "999px" : /^-?\d+(\.\d+)?$/.test(t) ? `${t}px` : e : "var(--base-aspect-ratio-radius, var(--ui-radius, 4px))";
|
|
328
325
|
}
|
package/dist/avatar.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("./ElementBase-EV6mVBUV.js"),f=`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
--ui-avatar-size: var(--base-avatar-size-md, 40px);
|
package/dist/avatar.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as g } from "./ElementBase-
|
|
1
|
+
import { E as g } from "./ElementBase-YlTLMsGk.mjs";
|
|
2
2
|
const p = `
|
|
3
3
|
:host {
|
|
4
4
|
display: inline-block;
|
|
@@ -361,22 +361,18 @@ function l(r) {
|
|
|
361
361
|
return a.length === 0 ? "?" : a.length === 1 ? a[0].slice(0, 2).toUpperCase() : `${a[0][0] || ""}${a[1][0] || ""}`.toUpperCase();
|
|
362
362
|
}
|
|
363
363
|
function v(r) {
|
|
364
|
-
if (!r)
|
|
365
|
-
return "";
|
|
364
|
+
if (!r) return "";
|
|
366
365
|
const a = r.trim().toLowerCase();
|
|
367
366
|
return a ? /^\d+(\.\d+)?$/.test(a) ? `${a}px` : a === "xs" ? "24px" : a === "sm" ? "30px" : a === "md" ? "36px" : a === "lg" ? "44px" : a === "xl" ? "56px" : a === "2xl" ? "64px" : r : "";
|
|
368
367
|
}
|
|
369
368
|
function c(r) {
|
|
370
|
-
if (!r)
|
|
371
|
-
return "";
|
|
369
|
+
if (!r) return "";
|
|
372
370
|
const a = r.trim().toLowerCase();
|
|
373
371
|
return a ? a === "full" || a === "pill" || a === "circle" ? "999px" : /^\d+(\.\d+)?$/.test(a) ? `${a}px` : r : "";
|
|
374
372
|
}
|
|
375
373
|
function f(r) {
|
|
376
|
-
if (r === "eager")
|
|
377
|
-
|
|
378
|
-
if (r === "lazy" || !r)
|
|
379
|
-
return "lazy";
|
|
374
|
+
if (r === "eager") return "eager";
|
|
375
|
+
if (r === "lazy" || !r) return "lazy";
|
|
380
376
|
const a = r.toLowerCase();
|
|
381
377
|
return a === "true" || a === "1" ? "eager" : "lazy";
|
|
382
378
|
}
|
|
@@ -456,15 +452,13 @@ class m extends g {
|
|
|
456
452
|
!this.hasAttribute("interactive") || this.hasAttribute("disabled") || a.key !== "Enter" && a.key !== " " || (a.preventDefault(), this.click());
|
|
457
453
|
}
|
|
458
454
|
_onImageLoad() {
|
|
459
|
-
if (this._imgLoaded && !this._imgFailed)
|
|
460
|
-
return;
|
|
455
|
+
if (this._imgLoaded && !this._imgFailed) return;
|
|
461
456
|
this._imgLoaded = !0, this._imgFailed = !1, this.requestRender();
|
|
462
457
|
const a = { src: this.getAttribute("src") || "" };
|
|
463
458
|
this.dispatchEvent(new CustomEvent("avatar-load", { detail: a, bubbles: !0 })), this.dispatchEvent(new CustomEvent("load", { detail: a, bubbles: !0 }));
|
|
464
459
|
}
|
|
465
460
|
_onImageError() {
|
|
466
|
-
if (this._imgFailed)
|
|
467
|
-
return;
|
|
461
|
+
if (this._imgFailed) return;
|
|
468
462
|
this._imgLoaded = !1, this._imgFailed = !0, this.requestRender();
|
|
469
463
|
const a = { src: this.getAttribute("src") || "" };
|
|
470
464
|
this.dispatchEvent(new CustomEvent("avatar-error", { detail: a, bubbles: !0 })), this.dispatchEvent(new CustomEvent("error", { detail: a, bubbles: !0 }));
|
package/dist/badge.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-EV6mVBUV.js"),g=`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
--ui-badge-font-size: var(--base-badge-font-size, 12px);
|
package/dist/badge.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as l } from "./ElementBase-
|
|
1
|
+
import { E as l } from "./ElementBase-YlTLMsGk.mjs";
|
|
2
2
|
const u = `
|
|
3
3
|
:host {
|
|
4
4
|
display: inline-flex;
|
|
@@ -412,8 +412,7 @@ function g(t) {
|
|
|
412
412
|
return String(t).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
413
413
|
}
|
|
414
414
|
function o(t) {
|
|
415
|
-
if (!t)
|
|
416
|
-
return "";
|
|
415
|
+
if (!t) return "";
|
|
417
416
|
const e = t.trim().toLowerCase();
|
|
418
417
|
return e ? e === "none" ? "0px" : e === "sm" ? "8px" : e === "md" || e === "large" ? "12px" : e === "lg" ? "16px" : e === "full" || e === "pill" ? "9999px" : /^\d+(\.\d+)?$/.test(e) ? `${e}px` : t : "";
|
|
419
418
|
}
|
|
@@ -508,14 +507,12 @@ class c extends l {
|
|
|
508
507
|
this._removeBtn && (this._removeBtn.removeEventListener("click", this._onRemoveClick), this._removeBtn = null);
|
|
509
508
|
}
|
|
510
509
|
_onHostKeyDown(e) {
|
|
511
|
-
if (!this.hasAttribute("interactive") || this.hasAttribute("disabled"))
|
|
512
|
-
return;
|
|
510
|
+
if (!this.hasAttribute("interactive") || this.hasAttribute("disabled")) return;
|
|
513
511
|
const i = e.target;
|
|
514
512
|
i && typeof i.closest == "function" && i.closest(".remove-btn") || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), this.click());
|
|
515
513
|
}
|
|
516
514
|
_onRemoveClick(e) {
|
|
517
|
-
if (e.preventDefault(), e.stopPropagation(), this.hasAttribute("disabled") || this.getAttribute("state") === "loading")
|
|
518
|
-
return;
|
|
515
|
+
if (e.preventDefault(), e.stopPropagation(), this.hasAttribute("disabled") || this.getAttribute("state") === "loading") return;
|
|
519
516
|
const i = {
|
|
520
517
|
text: this._lastLabelText,
|
|
521
518
|
source: "button"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("./ElementBase-EV6mVBUV.js"),v=`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
min-inline-size: 0;
|
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
box-shadow: none;
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
`,u=["button:not([disabled])","a[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[role="button"]','[role="menuitem"]'].join(", ");function m(i){return String(i).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function f(i){if(!i)return"";const o=i.trim().toLowerCase();return o?o==="none"?"0px":o==="sm"?"8px":o==="md"||o==="large"?"12px":o==="lg"?"16px":o==="full"||o==="pill"?"9999px":/^\d+(\.\d+)?$/.test(o)?`${o}px`:i:""}function b(i){if(i.hasAttribute("disabled"))return!0;const o=i.getAttribute("aria-disabled");return o==="true"||o==="1"}function d(i){return i.hidden||i.getAttribute("aria-hidden")==="true"||i.closest('[hidden], [aria-hidden="true"]')?!0:i.getClientRects().length===0}function y(i){if(!(i instanceof HTMLElement))return!1;if(i.isContentEditable||i.closest('[contenteditable="true"], textarea, select, [role="textbox"]'))return!0;const o=i.closest("input");if(!o)return!1;const t=(o.type||"").toLowerCase();return!["button","submit","reset","checkbox","radio"].includes(t)}class g extends k.ElementBase{constructor(){super(),this._slots=[],this._onKeyDown=this._onKeyDown.bind(this),this._onFocusIn=this._onFocusIn.bind(this),this._onSlotChange=this._onSlotChange.bind(this)}static get observedAttributes(){return["orientation","headless","density","size","variant","tone","state","elevation","radius","wrap","loop","no-loop","disabled","active-index","aria-label"]}connectedCallback(){super.connectedCallback(),this.root.addEventListener("keydown",this._onKeyDown),this.root.addEventListener("focusin",this._onFocusIn),this._syncBusyState(),this._syncDisabledState();const o=f(this.getAttribute("radius"));o&&this.style.setProperty("--ui-block-controls-radius",o)}disconnectedCallback(){this.root.removeEventListener("keydown",this._onKeyDown),this.root.removeEventListener("focusin",this._onFocusIn),this._detachSlotListeners(),super.disconnectedCallback()}attributeChangedCallback(o,t,e){if(t!==e){if(o==="disabled"&&this._syncDisabledState(),o==="state"&&this._syncBusyState(),o==="active-index"&&this._applyRovingTabIndex(),o==="radius"){const r=f(e);r?this.style.setProperty("--ui-block-controls-radius",r):this.style.removeProperty("--ui-block-controls-radius")}this.isConnected&&["orientation","headless","aria-label"].includes(o)&&this.requestRender()}}_orientation(){return this.getAttribute("orientation")==="vertical"?"vertical":"horizontal"}_direction(){const o=this.getAttribute("dir");if(o==="rtl"||o==="ltr")return o;const
|
|
334
|
+
`,u=["button:not([disabled])","a[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[role="button"]','[role="menuitem"]'].join(", ");function m(i){return String(i).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function f(i){if(!i)return"";const o=i.trim().toLowerCase();return o?o==="none"?"0px":o==="sm"?"8px":o==="md"||o==="large"?"12px":o==="lg"?"16px":o==="full"||o==="pill"?"9999px":/^\d+(\.\d+)?$/.test(o)?`${o}px`:i:""}function b(i){if(i.hasAttribute("disabled"))return!0;const o=i.getAttribute("aria-disabled");return o==="true"||o==="1"}function d(i){return i.hidden||i.getAttribute("aria-hidden")==="true"||i.closest('[hidden], [aria-hidden="true"]')?!0:i.getClientRects().length===0}function y(i){if(!(i instanceof HTMLElement))return!1;if(i.isContentEditable||i.closest('[contenteditable="true"], textarea, select, [role="textbox"]'))return!0;const o=i.closest("input");if(!o)return!1;const t=(o.type||"").toLowerCase();return!["button","submit","reset","checkbox","radio"].includes(t)}class g extends k.ElementBase{constructor(){super(),this._slots=[],this._onKeyDown=this._onKeyDown.bind(this),this._onFocusIn=this._onFocusIn.bind(this),this._onSlotChange=this._onSlotChange.bind(this)}static get observedAttributes(){return["orientation","headless","density","size","variant","tone","state","elevation","radius","wrap","loop","no-loop","disabled","active-index","aria-label"]}connectedCallback(){super.connectedCallback(),this.root.addEventListener("keydown",this._onKeyDown),this.root.addEventListener("focusin",this._onFocusIn),this._syncBusyState(),this._syncDisabledState();const o=f(this.getAttribute("radius"));o&&this.style.setProperty("--ui-block-controls-radius",o)}disconnectedCallback(){this.root.removeEventListener("keydown",this._onKeyDown),this.root.removeEventListener("focusin",this._onFocusIn),this._detachSlotListeners(),super.disconnectedCallback()}attributeChangedCallback(o,t,e){if(t!==e){if(o==="disabled"&&this._syncDisabledState(),o==="state"&&this._syncBusyState(),o==="active-index"&&this._applyRovingTabIndex(),o==="radius"){const r=f(e);r?this.style.setProperty("--ui-block-controls-radius",r):this.style.removeProperty("--ui-block-controls-radius")}this.isConnected&&["orientation","headless","aria-label"].includes(o)&&this.requestRender()}}_orientation(){return this.getAttribute("orientation")==="vertical"?"vertical":"horizontal"}_direction(){const o=this.getAttribute("dir");if(o==="rtl"||o==="ltr")return o;const e=this.closest("[dir]")?.getAttribute("dir");return e==="rtl"||e==="ltr"?e:getComputedStyle(this).direction==="rtl"?"rtl":"ltr"}_loops(){return!this.hasAttribute("no-loop")}_syncBusyState(){this.getAttribute("state")==="loading"?this.setAttribute("aria-busy","true"):this.removeAttribute("aria-busy")}_syncDisabledState(){this.hasAttribute("disabled")?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}_resolveFocusable(o){if(!o||b(o)||d(o)||o.hasAttribute("data-separator")||o.tagName.toLowerCase()==="hr")return null;if(o.matches(u)||o.tabIndex>=0)return o;const e=o.shadowRoot?.querySelector(u);if(e&&!b(e)&&!d(e))return e;const r=o.querySelector(u);return r&&!b(r)&&!d(r)?r:null}_focusEntries(){const o=this._slots;if(o.length===0)return[];const t=o.flatMap(n=>n.assignedElements({flatten:!0})),e=new Set,r=[];return t.forEach(n=>{const a=this._resolveFocusable(n);!a||e.has(a)||(e.add(a),r.push({root:n,focusTarget:a}))}),r}_parseActiveIndex(o){const t=Number(this.getAttribute("active-index")||"");return!Number.isFinite(t)||o<=0||t<0?0:t>o-1?o-1:Math.floor(t)}_applyRovingTabIndex(o){const t=this._focusEntries();if(t.length===0)return;if(this.hasAttribute("disabled")){t.forEach(r=>r.focusTarget.setAttribute("tabindex","-1"));return}let e=t.findIndex(r=>r.focusTarget===o);e<0&&(e=t.findIndex(r=>r.focusTarget.getAttribute("tabindex")==="0")),e<0&&(e=this._parseActiveIndex(t.length)),t.forEach((r,n)=>{r.focusTarget.setAttribute("tabindex",n===e?"0":"-1")})}_attachSlotListeners(){this._detachSlotListeners(),this._slots=Array.from(this.root.querySelectorAll("slot")),this._slots.forEach(o=>o.addEventListener("slotchange",this._onSlotChange))}_detachSlotListeners(){this._slots.forEach(o=>o.removeEventListener("slotchange",this._onSlotChange)),this._slots=[]}_onSlotChange(){this._applyRovingTabIndex()}_onFocusIn(o){const t=o.target;if(!t)return;const r=this._focusEntries().find(n=>t===n.focusTarget||n.root.contains(t));r&&this._applyRovingTabIndex(r.focusTarget)}_onKeyDown(o){if(this.hasAttribute("disabled")||o.defaultPrevented||o.altKey||o.ctrlKey||o.metaKey||y(o.target))return;const t=this._focusEntries();if(t.length<2)return;const e=o.composedPath(),r=t.findIndex(p=>e.includes(p.root)||e.includes(p.focusTarget));if(r<0)return;const n=this._orientation()==="horizontal",a=this._direction()==="rtl",x=this._loops();let s=r,l=!1;if(n?o.key==="ArrowRight"?(s=a?r-1:r+1,l=!0):o.key==="ArrowLeft"&&(s=a?r+1:r-1,l=!0):o.key==="ArrowDown"?(s=r+1,l=!0):o.key==="ArrowUp"&&(s=r-1,l=!0),o.key==="Home"?(s=0,l=!0):o.key==="End"&&(s=t.length-1,l=!0),!l)return;if(x?s=(s+t.length)%t.length:(s<0&&(s=0),s>t.length-1&&(s=t.length-1)),s===r){o.preventDefault();return}o.preventDefault();const c=t[s].focusTarget;this._applyRovingTabIndex(c);try{c.focus({preventScroll:!0})}catch{c.focus()}const h={fromIndex:r,toIndex:s,total:t.length,key:o.key,orientation:this._orientation()};this.dispatchEvent(new CustomEvent("ui-navigate",{detail:h,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("navigate",{detail:h,bubbles:!0,composed:!0}))}render(){const o=this._orientation(),t=m(this.getAttribute("aria-label")||"Block controls"),e=this.getAttribute("state")==="loading"?"true":"false",r=this.hasAttribute("disabled")?"true":"false";this.setContent(`
|
|
335
335
|
<style>${v}</style>
|
|
336
336
|
<div
|
|
337
337
|
class="toolbar"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as x } from "./ElementBase-
|
|
1
|
+
import { E as x } from "./ElementBase-YlTLMsGk.mjs";
|
|
2
2
|
const k = `
|
|
3
3
|
:host {
|
|
4
4
|
display: inline-flex;
|
|
@@ -346,14 +346,12 @@ function v(i) {
|
|
|
346
346
|
return String(i).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
347
347
|
}
|
|
348
348
|
function f(i) {
|
|
349
|
-
if (!i)
|
|
350
|
-
return "";
|
|
349
|
+
if (!i) return "";
|
|
351
350
|
const o = i.trim().toLowerCase();
|
|
352
351
|
return o ? o === "none" ? "0px" : o === "sm" ? "8px" : o === "md" || o === "large" ? "12px" : o === "lg" ? "16px" : o === "full" || o === "pill" ? "9999px" : /^\d+(\.\d+)?$/.test(o) ? `${o}px` : i : "";
|
|
353
352
|
}
|
|
354
353
|
function b(i) {
|
|
355
|
-
if (i.hasAttribute("disabled"))
|
|
356
|
-
return !0;
|
|
354
|
+
if (i.hasAttribute("disabled")) return !0;
|
|
357
355
|
const o = i.getAttribute("aria-disabled");
|
|
358
356
|
return o === "true" || o === "1";
|
|
359
357
|
}
|
|
@@ -361,13 +359,10 @@ function d(i) {
|
|
|
361
359
|
return i.hidden || i.getAttribute("aria-hidden") === "true" || i.closest('[hidden], [aria-hidden="true"]') ? !0 : i.getClientRects().length === 0;
|
|
362
360
|
}
|
|
363
361
|
function m(i) {
|
|
364
|
-
if (!(i instanceof HTMLElement))
|
|
365
|
-
|
|
366
|
-
if (i.isContentEditable || i.closest('[contenteditable="true"], textarea, select, [role="textbox"]'))
|
|
367
|
-
return !0;
|
|
362
|
+
if (!(i instanceof HTMLElement)) return !1;
|
|
363
|
+
if (i.isContentEditable || i.closest('[contenteditable="true"], textarea, select, [role="textbox"]')) return !0;
|
|
368
364
|
const o = i.closest("input");
|
|
369
|
-
if (!o)
|
|
370
|
-
return !1;
|
|
365
|
+
if (!o) return !1;
|
|
371
366
|
const t = (o.type || "").toLowerCase();
|
|
372
367
|
return !["button", "submit", "reset", "checkbox", "radio"].includes(t);
|
|
373
368
|
}
|
|
@@ -416,9 +411,8 @@ class y extends x {
|
|
|
416
411
|
}
|
|
417
412
|
_direction() {
|
|
418
413
|
const o = this.getAttribute("dir");
|
|
419
|
-
if (o === "rtl" || o === "ltr")
|
|
420
|
-
|
|
421
|
-
const t = this.closest("[dir]"), e = t == null ? void 0 : t.getAttribute("dir");
|
|
414
|
+
if (o === "rtl" || o === "ltr") return o;
|
|
415
|
+
const e = this.closest("[dir]")?.getAttribute("dir");
|
|
422
416
|
return e === "rtl" || e === "ltr" ? e : getComputedStyle(this).direction === "rtl" ? "rtl" : "ltr";
|
|
423
417
|
}
|
|
424
418
|
_loops() {
|
|
@@ -431,20 +425,16 @@ class y extends x {
|
|
|
431
425
|
this.hasAttribute("disabled") ? this.setAttribute("aria-disabled", "true") : this.removeAttribute("aria-disabled");
|
|
432
426
|
}
|
|
433
427
|
_resolveFocusable(o) {
|
|
434
|
-
if (!o || b(o) || d(o) || o.hasAttribute("data-separator") || o.tagName.toLowerCase() === "hr")
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
const t = o.shadowRoot, e = t == null ? void 0 : t.querySelector(u);
|
|
439
|
-
if (e && !b(e) && !d(e))
|
|
440
|
-
return e;
|
|
428
|
+
if (!o || b(o) || d(o) || o.hasAttribute("data-separator") || o.tagName.toLowerCase() === "hr") return null;
|
|
429
|
+
if (o.matches(u) || o.tabIndex >= 0) return o;
|
|
430
|
+
const e = o.shadowRoot?.querySelector(u);
|
|
431
|
+
if (e && !b(e) && !d(e)) return e;
|
|
441
432
|
const r = o.querySelector(u);
|
|
442
433
|
return r && !b(r) && !d(r) ? r : null;
|
|
443
434
|
}
|
|
444
435
|
_focusEntries() {
|
|
445
436
|
const o = this._slots;
|
|
446
|
-
if (o.length === 0)
|
|
447
|
-
return [];
|
|
437
|
+
if (o.length === 0) return [];
|
|
448
438
|
const t = o.flatMap((n) => n.assignedElements({ flatten: !0 })), e = /* @__PURE__ */ new Set(), r = [];
|
|
449
439
|
return t.forEach((n) => {
|
|
450
440
|
const a = this._resolveFocusable(n);
|
|
@@ -457,8 +447,7 @@ class y extends x {
|
|
|
457
447
|
}
|
|
458
448
|
_applyRovingTabIndex(o) {
|
|
459
449
|
const t = this._focusEntries();
|
|
460
|
-
if (t.length === 0)
|
|
461
|
-
return;
|
|
450
|
+
if (t.length === 0) return;
|
|
462
451
|
if (this.hasAttribute("disabled")) {
|
|
463
452
|
t.forEach((r) => r.focusTarget.setAttribute("tabindex", "-1"));
|
|
464
453
|
return;
|
|
@@ -479,24 +468,19 @@ class y extends x {
|
|
|
479
468
|
}
|
|
480
469
|
_onFocusIn(o) {
|
|
481
470
|
const t = o.target;
|
|
482
|
-
if (!t)
|
|
483
|
-
return;
|
|
471
|
+
if (!t) return;
|
|
484
472
|
const r = this._focusEntries().find((n) => t === n.focusTarget || n.root.contains(t));
|
|
485
473
|
r && this._applyRovingTabIndex(r.focusTarget);
|
|
486
474
|
}
|
|
487
475
|
_onKeyDown(o) {
|
|
488
|
-
if (this.hasAttribute("disabled") || o.defaultPrevented || o.altKey || o.ctrlKey || o.metaKey || m(o.target))
|
|
489
|
-
return;
|
|
476
|
+
if (this.hasAttribute("disabled") || o.defaultPrevented || o.altKey || o.ctrlKey || o.metaKey || m(o.target)) return;
|
|
490
477
|
const t = this._focusEntries();
|
|
491
|
-
if (t.length < 2)
|
|
492
|
-
return;
|
|
478
|
+
if (t.length < 2) return;
|
|
493
479
|
const e = o.composedPath(), r = t.findIndex((p) => e.includes(p.root) || e.includes(p.focusTarget));
|
|
494
|
-
if (r < 0)
|
|
495
|
-
return;
|
|
480
|
+
if (r < 0) return;
|
|
496
481
|
const n = this._orientation() === "horizontal", a = this._direction() === "rtl", g = this._loops();
|
|
497
482
|
let s = r, l = !1;
|
|
498
|
-
if (n ? o.key === "ArrowRight" ? (s = a ? r - 1 : r + 1, l = !0) : o.key === "ArrowLeft" && (s = a ? r + 1 : r - 1, l = !0) : o.key === "ArrowDown" ? (s = r + 1, l = !0) : o.key === "ArrowUp" && (s = r - 1, l = !0), o.key === "Home" ? (s = 0, l = !0) : o.key === "End" && (s = t.length - 1, l = !0), !l)
|
|
499
|
-
return;
|
|
483
|
+
if (n ? o.key === "ArrowRight" ? (s = a ? r - 1 : r + 1, l = !0) : o.key === "ArrowLeft" && (s = a ? r + 1 : r - 1, l = !0) : o.key === "ArrowDown" ? (s = r + 1, l = !0) : o.key === "ArrowUp" && (s = r - 1, l = !0), o.key === "Home" ? (s = 0, l = !0) : o.key === "End" && (s = t.length - 1, l = !0), !l) return;
|
|
500
484
|
if (g ? s = (s + t.length) % t.length : (s < 0 && (s = 0), s > t.length - 1 && (s = t.length - 1)), s === r) {
|
|
501
485
|
o.preventDefault();
|
|
502
486
|
return;
|
package/dist/box.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-EV6mVBUV.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)"},d=["p","px","py","pt","pr","pb","pl","m","mx","my","mt","mr","mb","ml","width","w","minwidth","minw","maxwidth","maxw","height","h","minheight","minh","maxheight","maxh","background","bg","color","opacity","overflow","overflowx","overflowy","zindex","display","position","inset","top","right","bottom","left","justify","align","alignself","aligncontent","flexbasis","flexgrow","flexshrink","gap","rowgap","columngap","gridarea","gridcolumn","gridcolumnstart","gridcolumnend","gridrow","gridrowstart","gridrowend"],_={none:"0",xxs:"var(--ui-space-2xs, 2px)",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)","2xl":"var(--ui-space-2xl, 40px)"},A=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-box-bg: transparent;
|
|
4
4
|
--ui-box-color: inherit;
|
package/dist/box.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as v } from "./ElementBase-
|
|
1
|
+
import { E as v } from "./ElementBase-YlTLMsGk.mjs";
|
|
2
2
|
const y = {
|
|
3
3
|
sm: "var(--ui-breakpoint-sm, 640px)",
|
|
4
4
|
md: "var(--ui-breakpoint-md, 768px)",
|
|
@@ -297,15 +297,12 @@ const y = {
|
|
|
297
297
|
}
|
|
298
298
|
`;
|
|
299
299
|
function f(i) {
|
|
300
|
-
if (!i)
|
|
301
|
-
return null;
|
|
300
|
+
if (!i) return null;
|
|
302
301
|
const t = i.trim();
|
|
303
|
-
if (!t.startsWith("{"))
|
|
304
|
-
return null;
|
|
302
|
+
if (!t.startsWith("{")) return null;
|
|
305
303
|
try {
|
|
306
304
|
const r = JSON.parse(t);
|
|
307
|
-
if (!r || typeof r != "object")
|
|
308
|
-
return null;
|
|
305
|
+
if (!r || typeof r != "object") return null;
|
|
309
306
|
const a = {};
|
|
310
307
|
return Object.keys(r).forEach((s) => {
|
|
311
308
|
const n = r[s];
|
|
@@ -323,8 +320,7 @@ function e(i) {
|
|
|
323
320
|
return w[i] || i;
|
|
324
321
|
}
|
|
325
322
|
function h(i) {
|
|
326
|
-
if (!i)
|
|
327
|
-
return "";
|
|
323
|
+
if (!i) return "";
|
|
328
324
|
const t = i.trim().toLowerCase();
|
|
329
325
|
return t ? t === "none" ? "0px" : t === "sm" ? "8px" : t === "md" ? "12px" : t === "lg" ? "18px" : t === "xl" ? "24px" : t === "full" ? "9999px" : /^\d+(\.\d+)?$/.test(t) ? `${t}px` : i : "";
|
|
330
326
|
}
|
|
@@ -333,8 +329,7 @@ function l(i, t) {
|
|
|
333
329
|
}
|
|
334
330
|
function p(i, t) {
|
|
335
331
|
const r = A(t);
|
|
336
|
-
if (!r)
|
|
337
|
-
return {};
|
|
332
|
+
if (!r) return {};
|
|
338
333
|
switch (i) {
|
|
339
334
|
case "p":
|
|
340
335
|
return { padding: e(r) };
|
|
@@ -505,8 +500,7 @@ class k extends v {
|
|
|
505
500
|
_applyInlineStyles() {
|
|
506
501
|
this._appliedInlineProps.forEach((t) => this.style.removeProperty(t)), this._appliedInlineProps.clear(), d.forEach((t) => {
|
|
507
502
|
const r = this.getAttribute(t);
|
|
508
|
-
if (!r || f(r))
|
|
509
|
-
return;
|
|
503
|
+
if (!r || f(r)) return;
|
|
510
504
|
const a = p(t, r);
|
|
511
505
|
Object.entries(a).forEach(([s, n]) => {
|
|
512
506
|
n && (this.style.setProperty(s, n), this._appliedInlineProps.add(s));
|
|
@@ -522,8 +516,7 @@ class k extends v {
|
|
|
522
516
|
};
|
|
523
517
|
d.forEach((c) => {
|
|
524
518
|
const b = this.getAttribute(c), o = f(b);
|
|
525
|
-
if (!o)
|
|
526
|
-
return;
|
|
519
|
+
if (!o) return;
|
|
527
520
|
const u = (x, m) => {
|
|
528
521
|
const g = p(c, m);
|
|
529
522
|
Object.assign(x, g);
|
package/dist/breadcrumb.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-EV6mVBUV.js"),A=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
--ui-breadcrumb-gap: var(--base-breadcrumb-gap, 8px);
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
--ui-breadcrumb-separator-bg: CanvasText;
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
|
-
`;function v(n){if(!n)return"";const e=n.trim().toLowerCase();return e?e==="none"?"0px":e==="sm"?"8px":e==="md"?"12px":e==="lg"?"16px":e==="full"?"9999px":/^\d+(\.\d+)?$/.test(e)?`${e}px`:n:""}function k(n){if(!n)return"";const e=n.trim().toLowerCase();return e==="1"?"sm":e==="2"?"md":e==="3"?"lg":e==="sm"||e==="md"||e==="lg"?e:""}function b(n){return String(n).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function h(n){if(n==null)return!1;const e=n.trim().toLowerCase();return e===""||e==="true"||e==="1"||e==="yes"}function S(n){return h(n.getAttribute("disabled"))||h(n.getAttribute("data-disabled"))||n.getAttribute("aria-disabled")==="true"}function C(n){const e=n.getAttribute("aria-current");return e&&e!=="false"?!0:h(n.getAttribute("current"))||h(n.getAttribute("data-current"))}class x extends _.ElementBase{constructor(){super(),this._slots=[],this._onRootClick=this._onRootClick.bind(this),this._onRootKeyDown=this._onRootKeyDown.bind(this),this._onSlotChange=this._onSlotChange.bind(this)}static get observedAttributes(){return["separator","max-items","current-index","size","variant","radius","elevation","tone","state","disabled","aria-label","headless"]}connectedCallback(){super.connectedCallback(),this.root.addEventListener("click",this._onRootClick),this.root.addEventListener("keydown",this._onRootKeyDown),this._syncBusyState(),this._syncDisabledState(),this._syncSizeState();const e=v(this.getAttribute("radius"));e&&this.style.setProperty("--ui-breadcrumb-radius",e)}disconnectedCallback(){this.root.removeEventListener("click",this._onRootClick),this.root.removeEventListener("keydown",this._onRootKeyDown),this._detachSlotListeners(),super.disconnectedCallback()}attributeChangedCallback(e,i,r){if(i!==r){if(e==="state"&&this._syncBusyState(),e==="disabled"&&this._syncDisabledState(),e==="size"&&this._syncSizeState(),e==="radius"){const t=v(r);t?this.style.setProperty("--ui-breadcrumb-radius",t):this.style.removeProperty("--ui-breadcrumb-radius")}this.isConnected&&this.shouldRenderOnAttributeChange(e,i,r)&&this.requestRender()}}get headless(){return this.hasAttribute("headless")}set headless(e){e!==this.headless&&(e?this.setAttribute("headless",""):this.removeAttribute("headless"))}_syncBusyState(){this.getAttribute("state")==="loading"?this.setAttribute("aria-busy","true"):this.removeAttribute("aria-busy")}_syncDisabledState(){this.hasAttribute("disabled")?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}_syncSizeState(){const e=k(this.getAttribute("size"));if(e==="sm"){this.style.setProperty("--ui-breadcrumb-gap","6px"),this.style.setProperty("--ui-breadcrumb-font-size","13px"),this.style.setProperty("--ui-breadcrumb-item-padding-block","3px"),this.style.setProperty("--ui-breadcrumb-item-padding-inline","7px");return}if(e==="lg"){this.style.setProperty("--ui-breadcrumb-gap","10px"),this.style.setProperty("--ui-breadcrumb-font-size","15px"),this.style.setProperty("--ui-breadcrumb-item-padding-block","5px"),this.style.setProperty("--ui-breadcrumb-item-padding-inline","11px");return}this.style.removeProperty("--ui-breadcrumb-gap"),this.style.removeProperty("--ui-breadcrumb-font-size"),this.style.removeProperty("--ui-breadcrumb-item-padding-block"),this.style.removeProperty("--ui-breadcrumb-item-padding-inline")}_attachSlotListeners(){this._detachSlotListeners(),this._slots=Array.from(this.root.querySelectorAll("slot")),this._slots.forEach(e=>e.addEventListener("slotchange",this._onSlotChange))}_detachSlotListeners(){this._slots.forEach(e=>e.removeEventListener("slotchange",this._onSlotChange)),this._slots=[]}_onSlotChange(){this.requestRender()}_direction(){const e=this.getAttribute("dir");if(e==="rtl"||e==="ltr")return e;const
|
|
279
|
+
`;function v(n){if(!n)return"";const e=n.trim().toLowerCase();return e?e==="none"?"0px":e==="sm"?"8px":e==="md"?"12px":e==="lg"?"16px":e==="full"?"9999px":/^\d+(\.\d+)?$/.test(e)?`${e}px`:n:""}function k(n){if(!n)return"";const e=n.trim().toLowerCase();return e==="1"?"sm":e==="2"?"md":e==="3"?"lg":e==="sm"||e==="md"||e==="lg"?e:""}function b(n){return String(n).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function h(n){if(n==null)return!1;const e=n.trim().toLowerCase();return e===""||e==="true"||e==="1"||e==="yes"}function S(n){return h(n.getAttribute("disabled"))||h(n.getAttribute("data-disabled"))||n.getAttribute("aria-disabled")==="true"}function C(n){const e=n.getAttribute("aria-current");return e&&e!=="false"?!0:h(n.getAttribute("current"))||h(n.getAttribute("data-current"))}class x extends _.ElementBase{constructor(){super(),this._slots=[],this._onRootClick=this._onRootClick.bind(this),this._onRootKeyDown=this._onRootKeyDown.bind(this),this._onSlotChange=this._onSlotChange.bind(this)}static get observedAttributes(){return["separator","max-items","current-index","size","variant","radius","elevation","tone","state","disabled","aria-label","headless"]}connectedCallback(){super.connectedCallback(),this.root.addEventListener("click",this._onRootClick),this.root.addEventListener("keydown",this._onRootKeyDown),this._syncBusyState(),this._syncDisabledState(),this._syncSizeState();const e=v(this.getAttribute("radius"));e&&this.style.setProperty("--ui-breadcrumb-radius",e)}disconnectedCallback(){this.root.removeEventListener("click",this._onRootClick),this.root.removeEventListener("keydown",this._onRootKeyDown),this._detachSlotListeners(),super.disconnectedCallback()}attributeChangedCallback(e,i,r){if(i!==r){if(e==="state"&&this._syncBusyState(),e==="disabled"&&this._syncDisabledState(),e==="size"&&this._syncSizeState(),e==="radius"){const t=v(r);t?this.style.setProperty("--ui-breadcrumb-radius",t):this.style.removeProperty("--ui-breadcrumb-radius")}this.isConnected&&this.shouldRenderOnAttributeChange(e,i,r)&&this.requestRender()}}get headless(){return this.hasAttribute("headless")}set headless(e){e!==this.headless&&(e?this.setAttribute("headless",""):this.removeAttribute("headless"))}_syncBusyState(){this.getAttribute("state")==="loading"?this.setAttribute("aria-busy","true"):this.removeAttribute("aria-busy")}_syncDisabledState(){this.hasAttribute("disabled")?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}_syncSizeState(){const e=k(this.getAttribute("size"));if(e==="sm"){this.style.setProperty("--ui-breadcrumb-gap","6px"),this.style.setProperty("--ui-breadcrumb-font-size","13px"),this.style.setProperty("--ui-breadcrumb-item-padding-block","3px"),this.style.setProperty("--ui-breadcrumb-item-padding-inline","7px");return}if(e==="lg"){this.style.setProperty("--ui-breadcrumb-gap","10px"),this.style.setProperty("--ui-breadcrumb-font-size","15px"),this.style.setProperty("--ui-breadcrumb-item-padding-block","5px"),this.style.setProperty("--ui-breadcrumb-item-padding-inline","11px");return}this.style.removeProperty("--ui-breadcrumb-gap"),this.style.removeProperty("--ui-breadcrumb-font-size"),this.style.removeProperty("--ui-breadcrumb-item-padding-block"),this.style.removeProperty("--ui-breadcrumb-item-padding-inline")}_attachSlotListeners(){this._detachSlotListeners(),this._slots=Array.from(this.root.querySelectorAll("slot")),this._slots.forEach(e=>e.addEventListener("slotchange",this._onSlotChange))}_detachSlotListeners(){this._slots.forEach(e=>e.removeEventListener("slotchange",this._onSlotChange)),this._slots=[]}_onSlotChange(){this.requestRender()}_direction(){const e=this.getAttribute("dir");if(e==="rtl"||e==="ltr")return e;const r=this.closest("[dir]")?.getAttribute("dir");return r==="rtl"||r==="ltr"?r:getComputedStyle(this).direction==="rtl"?"rtl":"ltr"}_getSourceItems(){const e=Array.from(this.querySelectorAll('[slot="item"]'));return e.length>0?e:Array.from(this.children).filter(i=>i instanceof HTMLElement)}_maxItems(){const e=Number(this.getAttribute("max-items"));return Number.isFinite(e)?Math.max(3,Math.floor(e)):Number.POSITIVE_INFINITY}_currentIndex(e){const i=this.getAttribute("current-index");if(i!=null&&i!==""){const t=Number(i);if(Number.isFinite(t)){const a=Math.floor(t);if(a>=0&&a<e.length)return a}}const r=e.findIndex(t=>C(t));return r>=0?r:e.length>0?e.length-1:-1}_visibleIndices(e,i){const r=this._maxItems();if(!Number.isFinite(r)||e.length<=r)return e.map((c,l)=>l);const t=e.length-1,a=i>=0?i:t,s=new Set([0,t,a]);let o=a-1,u=a+1;for(;s.size<r&&(o>0||u<t)&&!(o>0&&(s.add(o),s.size>=r));)u<t&&s.add(u),o-=1,u+=1;for(let c=1;s.size<r&&c<t;c+=1)s.add(c);return Array.from(s).sort((c,l)=>c-l)}_getDisplayTokens(e){const i=this._currentIndex(e),r=this._visibleIndices(e,i),t=[];let a=null;return r.forEach(s=>{a!=null&&s-a>1&&t.push({kind:"ellipsis",key:`ellipsis-${a}-${s}`});const o=e[s];t.push({kind:"item",item:o,sourceIndex:s,current:s===i,disabled:S(o)}),a=s}),t}_renderLabel(e){const i=e.getAttribute("data-label");if(i)return b(i);const r=(e.innerHTML||"").trim();return r||b((e.textContent||"").trim())}_emitSelect(e,i){const t=this._getSourceItems()[e];if(!t)return null;const a=(t.getAttribute("data-label")||t.textContent||"").trim(),s=t.getAttribute("href")||void 0,o={index:e,label:a,href:s,source:i},u=new CustomEvent("select",{detail:o,bubbles:!0,cancelable:!0,composed:!0});return this.dispatchEvent(u),this.dispatchEvent(new CustomEvent("ui-select",{detail:o,bubbles:!0,composed:!0})),u}_onRootClick(e){const r=e.target.closest(".crumb-action");if(!r)return;if(this.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"){e.preventDefault();return}const t=Number(r.getAttribute("data-source-index"));if(Number.isNaN(t))return;this._emitSelect(t,"click")?.defaultPrevented&&e.preventDefault()}_onRootKeyDown(e){const r=e.target.closest(".crumb-action");if(!r||this.hasAttribute("disabled"))return;if(e.key===" "&&r.tagName.toLowerCase()==="a"){e.preventDefault();const u=Number(r.getAttribute("data-source-index"));if(!Number.isNaN(u)&&this._emitSelect(u,"keyboard")?.defaultPrevented)return}if(!["ArrowRight","ArrowLeft","Home","End"].includes(e.key))return;const t=Array.from(this.root.querySelectorAll('.crumb-action:not([aria-disabled="true"])'));if(t.length===0)return;const a=t.indexOf(r);if(a<0)return;const s=this._direction()==="rtl";let o=a;e.key==="ArrowRight"&&(o=s?a-1:a+1),e.key==="ArrowLeft"&&(o=s?a+1:a-1),e.key==="Home"&&(o=0),e.key==="End"&&(o=t.length-1),o=(o+t.length)%t.length,t[o].focus(),e.preventDefault()}render(){const e=this._getSourceItems(),i=b(this.getAttribute("separator")||"/"),r=b(this.getAttribute("aria-label")||"Breadcrumb"),t=this._getDisplayTokens(e),a=this.hasAttribute("disabled"),s=this.getAttribute("state")==="loading",o=t.map((u,c)=>{const l=c===t.length-1;let d="";if(u.kind==="ellipsis")d='<span class="crumb-ellipsis" aria-hidden="true">…</span>';else{const m=this._renderLabel(u.item),f=u.item.getAttribute("href"),g=u.item.getAttribute("rel"),p=u.item.getAttribute("target");u.current?d=`<span class="crumb-current" aria-current="page">${m}</span>`:a||u.disabled||s?d=`<span class="crumb-disabled" aria-disabled="true">${m}</span>`:f?d=`<a class="crumb-action crumb-link" data-source-index="${u.sourceIndex}" href="${b(f)}"${p?` target="${b(p)}"`:""}${g?` rel="${b(g)}"`:""}>${m}</a>`:d=`<button type="button" class="crumb-action crumb-btn" data-source-index="${u.sourceIndex}">${m}</button>`}const y=l?"":`<span class="separator" aria-hidden="true" title="${i}">${i}</span>`;return`<li part="item">${d}${y}</li>`}).join("");this.setContent(`
|
|
280
280
|
<style>${A}</style>
|
|
281
281
|
<nav role="navigation" aria-label="${r}">
|
|
282
282
|
<ol part="list">
|
package/dist/breadcrumb.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as y } from "./ElementBase-
|
|
1
|
+
import { E as y } from "./ElementBase-YlTLMsGk.mjs";
|
|
2
2
|
const _ = `
|
|
3
3
|
:host {
|
|
4
4
|
display: block;
|
|
@@ -279,14 +279,12 @@ const _ = `
|
|
|
279
279
|
}
|
|
280
280
|
`;
|
|
281
281
|
function v(n) {
|
|
282
|
-
if (!n)
|
|
283
|
-
return "";
|
|
282
|
+
if (!n) return "";
|
|
284
283
|
const e = n.trim().toLowerCase();
|
|
285
284
|
return e ? e === "none" ? "0px" : e === "sm" ? "8px" : e === "md" ? "12px" : e === "lg" ? "16px" : e === "full" ? "9999px" : /^\d+(\.\d+)?$/.test(e) ? `${e}px` : n : "";
|
|
286
285
|
}
|
|
287
286
|
function A(n) {
|
|
288
|
-
if (!n)
|
|
289
|
-
return "";
|
|
287
|
+
if (!n) return "";
|
|
290
288
|
const e = n.trim().toLowerCase();
|
|
291
289
|
return e === "1" ? "sm" : e === "2" ? "md" : e === "3" ? "lg" : e === "sm" || e === "md" || e === "lg" ? e : "";
|
|
292
290
|
}
|
|
@@ -294,8 +292,7 @@ function b(n) {
|
|
|
294
292
|
return String(n).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
295
293
|
}
|
|
296
294
|
function h(n) {
|
|
297
|
-
if (n == null)
|
|
298
|
-
return !1;
|
|
295
|
+
if (n == null) return !1;
|
|
299
296
|
const e = n.trim().toLowerCase();
|
|
300
297
|
return e === "" || e === "true" || e === "1" || e === "yes";
|
|
301
298
|
}
|
|
@@ -378,9 +375,8 @@ class S extends y {
|
|
|
378
375
|
}
|
|
379
376
|
_direction() {
|
|
380
377
|
const e = this.getAttribute("dir");
|
|
381
|
-
if (e === "rtl" || e === "ltr")
|
|
382
|
-
|
|
383
|
-
const i = this.closest("[dir]"), r = i == null ? void 0 : i.getAttribute("dir");
|
|
378
|
+
if (e === "rtl" || e === "ltr") return e;
|
|
379
|
+
const r = this.closest("[dir]")?.getAttribute("dir");
|
|
384
380
|
return r === "rtl" || r === "ltr" ? r : getComputedStyle(this).direction === "rtl" ? "rtl" : "ltr";
|
|
385
381
|
}
|
|
386
382
|
_getSourceItems() {
|
|
@@ -397,8 +393,7 @@ class S extends y {
|
|
|
397
393
|
const t = Number(i);
|
|
398
394
|
if (Number.isFinite(t)) {
|
|
399
395
|
const a = Math.floor(t);
|
|
400
|
-
if (a >= 0 && a < e.length)
|
|
401
|
-
return a;
|
|
396
|
+
if (a >= 0 && a < e.length) return a;
|
|
402
397
|
}
|
|
403
398
|
}
|
|
404
399
|
const r = e.findIndex((t) => C(t));
|
|
@@ -433,15 +428,13 @@ class S extends y {
|
|
|
433
428
|
}
|
|
434
429
|
_renderLabel(e) {
|
|
435
430
|
const i = e.getAttribute("data-label");
|
|
436
|
-
if (i)
|
|
437
|
-
return b(i);
|
|
431
|
+
if (i) return b(i);
|
|
438
432
|
const r = (e.innerHTML || "").trim();
|
|
439
433
|
return r || b((e.textContent || "").trim());
|
|
440
434
|
}
|
|
441
435
|
_emitSelect(e, i) {
|
|
442
436
|
const t = this._getSourceItems()[e];
|
|
443
|
-
if (!t)
|
|
444
|
-
return null;
|
|
437
|
+
if (!t) return null;
|
|
445
438
|
const a = (t.getAttribute("data-label") || t.textContent || "").trim(), s = t.getAttribute("href") || void 0, o = { index: e, label: a, href: s, source: i }, u = new CustomEvent("select", {
|
|
446
439
|
detail: o,
|
|
447
440
|
bubbles: !0,
|
|
@@ -452,39 +445,29 @@ class S extends y {
|
|
|
452
445
|
}
|
|
453
446
|
_onRootClick(e) {
|
|
454
447
|
const r = e.target.closest(".crumb-action");
|
|
455
|
-
if (!r)
|
|
456
|
-
return;
|
|
448
|
+
if (!r) return;
|
|
457
449
|
if (this.hasAttribute("disabled") || r.getAttribute("aria-disabled") === "true") {
|
|
458
450
|
e.preventDefault();
|
|
459
451
|
return;
|
|
460
452
|
}
|
|
461
453
|
const t = Number(r.getAttribute("data-source-index"));
|
|
462
|
-
if (Number.isNaN(t))
|
|
463
|
-
|
|
464
|
-
const a = this._emitSelect(t, "click");
|
|
465
|
-
a != null && a.defaultPrevented && e.preventDefault();
|
|
454
|
+
if (Number.isNaN(t)) return;
|
|
455
|
+
this._emitSelect(t, "click")?.defaultPrevented && e.preventDefault();
|
|
466
456
|
}
|
|
467
457
|
_onRootKeyDown(e) {
|
|
468
458
|
const r = e.target.closest(".crumb-action");
|
|
469
|
-
if (!r || this.hasAttribute("disabled"))
|
|
470
|
-
return;
|
|
459
|
+
if (!r || this.hasAttribute("disabled")) return;
|
|
471
460
|
if (e.key === " " && r.tagName.toLowerCase() === "a") {
|
|
472
461
|
e.preventDefault();
|
|
473
462
|
const u = Number(r.getAttribute("data-source-index"));
|
|
474
|
-
if (!Number.isNaN(u))
|
|
475
|
-
|
|
476
|
-
if (c != null && c.defaultPrevented)
|
|
477
|
-
return;
|
|
478
|
-
}
|
|
463
|
+
if (!Number.isNaN(u) && this._emitSelect(u, "keyboard")?.defaultPrevented)
|
|
464
|
+
return;
|
|
479
465
|
}
|
|
480
|
-
if (!["ArrowRight", "ArrowLeft", "Home", "End"].includes(e.key))
|
|
481
|
-
return;
|
|
466
|
+
if (!["ArrowRight", "ArrowLeft", "Home", "End"].includes(e.key)) return;
|
|
482
467
|
const t = Array.from(this.root.querySelectorAll('.crumb-action:not([aria-disabled="true"])'));
|
|
483
|
-
if (t.length === 0)
|
|
484
|
-
return;
|
|
468
|
+
if (t.length === 0) return;
|
|
485
469
|
const a = t.indexOf(r);
|
|
486
|
-
if (a < 0)
|
|
487
|
-
return;
|
|
470
|
+
if (a < 0) return;
|
|
488
471
|
const s = this._direction() === "rtl";
|
|
489
472
|
let o = a;
|
|
490
473
|
e.key === "ArrowRight" && (o = s ? a - 1 : a + 1), e.key === "ArrowLeft" && (o = s ? a + 1 : a - 1), e.key === "Home" && (o = 0), e.key === "End" && (o = t.length - 1), o = (o + t.length) % t.length, t[o].focus(), e.preventDefault();
|
|
@@ -496,8 +479,8 @@ class S extends y {
|
|
|
496
479
|
if (u.kind === "ellipsis")
|
|
497
480
|
d = '<span class="crumb-ellipsis" aria-hidden="true">…</span>';
|
|
498
481
|
else {
|
|
499
|
-
const m = this._renderLabel(u.item), f = u.item.getAttribute("href"),
|
|
500
|
-
u.current ? d = `<span class="crumb-current" aria-current="page">${m}</span>` : a || u.disabled || s ? d = `<span class="crumb-disabled" aria-disabled="true">${m}</span>` : f ? d = `<a class="crumb-action crumb-link" data-source-index="${u.sourceIndex}" href="${b(f)}"${
|
|
482
|
+
const m = this._renderLabel(u.item), f = u.item.getAttribute("href"), p = u.item.getAttribute("rel"), g = u.item.getAttribute("target");
|
|
483
|
+
u.current ? d = `<span class="crumb-current" aria-current="page">${m}</span>` : a || u.disabled || s ? d = `<span class="crumb-disabled" aria-disabled="true">${m}</span>` : f ? d = `<a class="crumb-action crumb-link" data-source-index="${u.sourceIndex}" href="${b(f)}"${g ? ` target="${b(g)}"` : ""}${p ? ` rel="${b(p)}"` : ""}>${m}</a>` : d = `<button type="button" class="crumb-action crumb-btn" data-source-index="${u.sourceIndex}">${m}</button>`;
|
|
501
484
|
}
|
|
502
485
|
const x = l ? "" : `<span class="separator" aria-hidden="true" title="${i}">${i}</span>`;
|
|
503
486
|
return `<li part="item">${d}${x}</li>`;
|