@editora/ui-core 0.1.20 → 0.1.22
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/accordion.cjs.js +3 -3
- package/dist/accordion.esm.js +3 -3
- package/dist/alert-dialog.cjs.js +32 -32
- package/dist/alert-dialog.esm.js +95 -75
- package/dist/alert.cjs.js +6 -6
- package/dist/alert.esm.js +6 -6
- package/dist/animated-list.cjs.js +4 -4
- package/dist/animated-list.esm.js +4 -4
- package/dist/animated-text.cjs.js +4 -4
- package/dist/animated-text.esm.js +4 -4
- package/dist/app-header.cjs.js +3 -3
- package/dist/app-header.esm.js +3 -3
- package/dist/aspect-ratio.cjs.js +3 -3
- package/dist/aspect-ratio.esm.js +3 -3
- package/dist/avatar.cjs.js +14 -14
- package/dist/avatar.esm.js +31 -29
- package/dist/badge.cjs.js +4 -4
- package/dist/badge.esm.js +4 -4
- package/dist/block-controls.cjs.js +4 -4
- package/dist/block-controls.esm.js +4 -4
- package/dist/box.cjs.js +2 -2
- package/dist/box.esm.js +2 -2
- package/dist/breadcrumb.cjs.js +5 -5
- package/dist/breadcrumb.esm.js +5 -5
- package/dist/button.cjs.js +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/{calendar-DLY4acgn.mjs → calendar-DbxYRdlv.mjs} +227 -183
- package/dist/{calendar-Dkof-FTK.js → calendar-Qa-cFOp3.js} +74 -35
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.esm.js +1 -1
- package/dist/card.cjs.js +8 -8
- package/dist/card.esm.js +63 -20
- package/dist/chart.cjs.js +4 -4
- package/dist/chart.esm.js +6 -6
- package/dist/checkbox.cjs.js +2 -2
- package/dist/checkbox.esm.js +2 -2
- package/dist/collapsible.cjs.js +7 -7
- package/dist/collapsible.esm.js +7 -7
- package/dist/collection.cjs.js +1 -1
- package/dist/collection.esm.js +27 -23
- package/dist/color-picker.cjs.js +34 -14
- package/dist/color-picker.esm.js +89 -67
- package/dist/combobox.cjs.js +29 -27
- package/dist/combobox.esm.js +51 -45
- package/dist/command.cjs.js +2 -2
- package/dist/command.esm.js +2 -2
- package/dist/components/ui-alert-dialog.d.ts +1 -0
- package/dist/components/ui-alert-dialog.d.ts.map +1 -1
- package/dist/components/ui-avatar.d.ts +1 -0
- package/dist/components/ui-avatar.d.ts.map +1 -1
- package/dist/components/ui-button.d.ts +1 -0
- package/dist/components/ui-button.d.ts.map +1 -1
- package/dist/components/ui-calendar.d.ts.map +1 -1
- package/dist/components/ui-card.d.ts +3 -0
- package/dist/components/ui-card.d.ts.map +1 -1
- package/dist/components/ui-checkbox.d.ts.map +1 -1
- package/dist/components/ui-collection.d.ts.map +1 -1
- package/dist/components/ui-color-picker.d.ts.map +1 -1
- package/dist/components/ui-combobox.d.ts.map +1 -1
- package/dist/components/ui-data-table.d.ts.map +1 -1
- package/dist/components/ui-date-field.d.ts.map +1 -1
- package/dist/components/ui-date-picker.d.ts.map +1 -1
- package/dist/components/ui-date-range-picker.d.ts.map +1 -1
- package/dist/components/ui-date-range-time-picker.d.ts.map +1 -1
- package/dist/components/ui-date-time-picker.d.ts.map +1 -1
- package/dist/components/ui-dock.d.ts +1 -0
- package/dist/components/ui-dock.d.ts.map +1 -1
- package/dist/components/ui-drawer.d.ts.map +1 -1
- package/dist/components/ui-dropdown.d.ts.map +1 -1
- package/dist/components/ui-field.d.ts.map +1 -1
- package/dist/components/ui-file-upload.d.ts.map +1 -1
- package/dist/components/ui-gantt.d.ts.map +1 -1
- package/dist/components/ui-input.d.ts.map +1 -1
- package/dist/components/ui-menu.d.ts.map +1 -1
- package/dist/components/ui-multi-select.d.ts.map +1 -1
- package/dist/components/ui-number-field.d.ts.map +1 -1
- package/dist/components/ui-password-field.d.ts.map +1 -1
- package/dist/components/ui-pin-input.d.ts +1 -0
- package/dist/components/ui-pin-input.d.ts.map +1 -1
- package/dist/components/ui-placement-grid.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-progress.d.ts.map +1 -1
- package/dist/components/ui-radio.d.ts.map +1 -1
- package/dist/components/ui-rating.d.ts +1 -0
- package/dist/components/ui-rating.d.ts.map +1 -1
- package/dist/components/ui-select.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-switch.d.ts.map +1 -1
- package/dist/components/ui-table.d.ts.map +1 -1
- package/dist/components/ui-tabs.d.ts +1 -0
- package/dist/components/ui-tabs.d.ts.map +1 -1
- package/dist/components/ui-tags-input.d.ts +1 -0
- package/dist/components/ui-tags-input.d.ts.map +1 -1
- package/dist/components/ui-textarea.d.ts.map +1 -1
- package/dist/components/ui-time-field.d.ts.map +1 -1
- package/dist/components/ui-toggle-group.d.ts.map +1 -1
- package/dist/components/ui-toggle.d.ts.map +1 -1
- package/dist/components/ui-tree.d.ts.map +1 -1
- package/dist/components/ui-wizard.d.ts.map +1 -1
- package/dist/context-menu.cjs.js +3 -3
- package/dist/context-menu.esm.js +4 -4
- package/dist/control-name-BmoI1m3a.js +1 -0
- package/dist/control-name-Bpj7F34X.mjs +48 -0
- package/dist/data-table.cjs.js +5 -2
- package/dist/data-table.esm.js +145 -142
- package/dist/date-field.cjs.js +5 -5
- package/dist/date-field.esm.js +34 -31
- package/dist/date-picker.cjs.js +16 -16
- package/dist/date-picker.esm.js +48 -44
- package/dist/date-range-picker.cjs.js +5 -5
- package/dist/date-range-picker.esm.js +120 -118
- package/dist/date-range-time-picker.cjs.js +22 -22
- package/dist/date-range-time-picker.esm.js +88 -84
- package/dist/date-time-picker.cjs.js +26 -26
- package/dist/date-time-picker.esm.js +105 -101
- package/dist/{date-time-utils-Dmost5Ee.js → date-time-utils-BzfTpeU-.js} +1 -1
- package/dist/{date-time-utils-y1N2gvG2.mjs → date-time-utils-Cps2aSu2.mjs} +1 -1
- package/dist/description.cjs.js +3 -3
- package/dist/description.esm.js +3 -3
- package/dist/dialog.cjs.js +2 -2
- package/dist/dialog.esm.js +2 -2
- package/dist/dock.cjs.js +12 -12
- package/dist/dock.esm.js +72 -74
- package/dist/drawer.cjs.js +19 -19
- package/dist/drawer.esm.js +58 -58
- package/dist/dropdown.cjs.js +13 -13
- package/dist/dropdown.esm.js +49 -48
- package/dist/empty-state.cjs.js +3 -3
- package/dist/empty-state.esm.js +3 -3
- package/dist/field-error.cjs.js +1 -1
- package/dist/field-error.esm.js +1 -1
- package/dist/field.cjs.js +12 -12
- package/dist/field.esm.js +84 -75
- package/dist/fieldset.cjs.js +4 -4
- package/dist/fieldset.esm.js +4 -4
- package/dist/file-upload.cjs.js +3 -3
- package/dist/file-upload.esm.js +5 -3
- package/dist/floating-toolbar.cjs.js +8 -8
- package/dist/floating-toolbar.esm.js +9 -9
- package/dist/form.cjs.js +11 -11
- package/dist/form.esm.js +11 -11
- package/dist/gantt.cjs.js +43 -32
- package/dist/gantt.esm.js +99 -88
- package/dist/icon-cloud.cjs.js +3 -3
- package/dist/icon-cloud.esm.js +3 -3
- 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 +121 -118
- package/dist/inline-edit.cjs.js +1 -1
- package/dist/inline-edit.esm.js +1 -1
- package/dist/input.cjs.js +14 -14
- package/dist/input.esm.js +39 -32
- package/dist/label.cjs.js +3 -3
- package/dist/label.esm.js +3 -3
- package/dist/{listbox-B6QgECax.js → listbox-CTpRpuF7.js} +1 -1
- package/dist/{listbox-DJamVeFj.mjs → listbox-hMVOhKHC.mjs} +1 -1
- package/dist/listbox.cjs.js +1 -1
- package/dist/listbox.esm.js +1 -1
- package/dist/marquee.cjs.js +3 -3
- package/dist/marquee.esm.js +3 -3
- package/dist/{menu-item-styles-CbNUEwP2.js → menu-item-styles-B4onAr4C.js} +3 -3
- package/dist/{menu-item-styles-CZiPwPwl.mjs → menu-item-styles-IGSFLAHu.mjs} +3 -3
- package/dist/menu.cjs.js +7 -7
- package/dist/menu.esm.js +29 -28
- package/dist/menubar.cjs.js +1 -1
- package/dist/menubar.esm.js +2 -2
- package/dist/meter.cjs.js +1 -1
- package/dist/meter.esm.js +1 -1
- package/dist/multi-select.cjs.js +18 -18
- package/dist/multi-select.esm.js +82 -66
- package/dist/navigation-menu.cjs.js +1 -1
- package/dist/navigation-menu.esm.js +1 -1
- package/dist/number-field.cjs.js +11 -13
- package/dist/number-field.esm.js +29 -27
- package/dist/number-ticker.cjs.js +4 -4
- package/dist/number-ticker.esm.js +4 -4
- package/dist/odometer.cjs.js +2 -2
- package/dist/odometer.esm.js +2 -2
- package/dist/orbiter.cjs.js +3 -3
- package/dist/orbiter.esm.js +3 -3
- package/dist/pagination.cjs.js +1 -1
- package/dist/pagination.esm.js +1 -1
- package/dist/password-field.cjs.js +23 -23
- package/dist/password-field.esm.js +48 -47
- package/dist/pin-input.cjs.js +8 -6
- package/dist/pin-input.esm.js +21 -15
- package/dist/placement-grid.cjs.js +4 -4
- package/dist/placement-grid.esm.js +58 -58
- package/dist/plugin-panel.cjs.js +1 -1
- package/dist/plugin-panel.esm.js +1 -1
- package/dist/popover.cjs.js +5 -5
- package/dist/popover.esm.js +4 -4
- package/dist/portal.cjs.js +3 -3
- package/dist/portal.esm.js +11 -10
- package/dist/positioner.cjs.js +2 -2
- package/dist/positioner.esm.js +15 -14
- package/dist/primitives/auto-scroll.d.ts +9 -0
- package/dist/primitives/auto-scroll.d.ts.map +1 -0
- package/dist/primitives/control-name.d.ts +30 -0
- package/dist/primitives/control-name.d.ts.map +1 -0
- package/dist/primitives/selector.d.ts +4 -0
- package/dist/primitives/selector.d.ts.map +1 -0
- package/dist/primitives/trigger.d.ts +2 -0
- package/dist/primitives/trigger.d.ts.map +1 -0
- package/dist/progress.cjs.js +4 -4
- package/dist/progress.esm.js +20 -18
- package/dist/quick-actions.cjs.js +3 -3
- package/dist/quick-actions.esm.js +3 -3
- package/dist/radio-group.cjs.js +1 -1
- package/dist/radio-group.esm.js +1 -1
- package/dist/radio.cjs.js +2 -2
- package/dist/radio.esm.js +2 -2
- package/dist/rating.cjs.js +17 -16
- package/dist/rating.esm.js +91 -92
- package/dist/{runtime-D1gFh1fS.mjs → runtime-CFnK53iC.mjs} +133 -94
- package/dist/runtime-DwE-tizc.js +1 -0
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.esm.js +29 -26
- package/dist/select.cjs.js +20 -19
- package/dist/select.esm.js +36 -32
- package/dist/selection-popup.cjs.js +2 -2
- package/dist/selection-popup.esm.js +2 -2
- package/dist/selector-BvAh35ve.js +1 -0
- package/dist/selector-WI8pD7YO.mjs +18 -0
- package/dist/separator.cjs.js +7 -7
- package/dist/separator.esm.js +7 -7
- package/dist/sidebar.cjs.js +7 -7
- package/dist/sidebar.esm.js +7 -7
- package/dist/skeleton.cjs.js +7 -7
- package/dist/skeleton.esm.js +7 -7
- package/dist/slider.cjs.js +3 -3
- package/dist/slider.esm.js +3 -3
- package/dist/slot.cjs.js +3 -3
- package/dist/slot.esm.js +3 -3
- package/dist/sortable.cjs.js +61 -48
- package/dist/sortable.esm.js +636 -554
- package/dist/spinning-text.cjs.js +3 -3
- package/dist/spinning-text.esm.js +3 -3
- package/dist/split-button.cjs.js +1 -1
- package/dist/split-button.esm.js +1 -1
- package/dist/stepper.cjs.js +1 -1
- package/dist/stepper.esm.js +1 -1
- package/dist/switch.cjs.js +10 -12
- package/dist/switch.esm.js +10 -12
- package/dist/table.cjs.js +9 -6
- package/dist/table.esm.js +46 -43
- package/dist/tabs.cjs.js +22 -23
- package/dist/tabs.esm.js +116 -112
- package/dist/tags-input.cjs.js +9 -9
- package/dist/tags-input.esm.js +32 -25
- package/dist/textarea.cjs.js +13 -13
- package/dist/textarea.esm.js +46 -31
- package/dist/theme.d.ts +18 -0
- package/dist/theme.d.ts.map +1 -1
- package/dist/time-field.cjs.js +5 -5
- package/dist/time-field.esm.js +21 -18
- package/dist/time-picker.cjs.js +4 -4
- package/dist/time-picker.esm.js +5 -5
- package/dist/timeline.cjs.js +2 -2
- package/dist/timeline.esm.js +4 -4
- package/dist/toast.cjs.js +6 -6
- package/dist/toast.esm.js +13 -13
- package/dist/toggle-group.cjs.js +5 -6
- package/dist/toggle-group.esm.js +63 -60
- package/dist/toggle.cjs.js +18 -18
- package/dist/toggle.esm.js +32 -31
- package/dist/tooltip.cjs.js +4 -4
- package/dist/tooltip.esm.js +4 -4
- package/dist/transfer-list.cjs.js +32 -32
- package/dist/transfer-list.esm.js +57 -57
- package/dist/tree-7qbVnpGp.js +39 -0
- package/dist/{tree-B3kE8ESs.mjs → tree-Deoft-kO.mjs} +34 -33
- package/dist/tree.cjs.js +1 -1
- package/dist/tree.esm.js +1 -1
- package/dist/trigger-BjnxLCeQ.mjs +9 -0
- package/dist/trigger-DkPsKxsP.js +1 -0
- package/dist/{ui-button-rXQOS9QJ.js → ui-button-BInsgSbr.js} +27 -26
- package/dist/{ui-button-Q0GNNWKC.mjs → ui-button-rfiuUnUD.mjs} +65 -48
- package/dist/{ui-icon-YI6lyuqU.mjs → ui-icon-BSi_GtqO.mjs} +2 -2
- package/dist/{ui-icon-BzVNC_lr.js → ui-icon-Bvt9oIIR.js} +5 -5
- package/dist/wizard.cjs.js +12 -13
- package/dist/wizard.esm.js +17 -15
- package/package.json +1 -1
- package/dist/runtime-CTaOSmBj.js +0 -1
- package/dist/tree-Dx_kv_ih.js +0 -39
package/dist/toggle-group.esm.js
CHANGED
|
@@ -118,24 +118,24 @@ const w = `
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
`, S = /* @__PURE__ */ new Set(["multiple", "orientation", "aria-label", "required", "disabled"]);
|
|
121
|
-
function E(
|
|
122
|
-
return String(
|
|
121
|
+
function E(u) {
|
|
122
|
+
return String(u).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
123
123
|
}
|
|
124
|
-
function C(
|
|
124
|
+
function C(u) {
|
|
125
125
|
try {
|
|
126
|
-
return JSON.parse(
|
|
126
|
+
return JSON.parse(u);
|
|
127
127
|
} catch {
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
function I(
|
|
132
|
-
if (!t) return
|
|
133
|
-
if (!
|
|
134
|
-
const e = C(
|
|
135
|
-
return Array.isArray(e) ? Array.from(new Set(e.map((i) => String(i)).filter(Boolean))) :
|
|
131
|
+
function I(u, t) {
|
|
132
|
+
if (!t) return u || "";
|
|
133
|
+
if (!u) return [];
|
|
134
|
+
const e = C(u);
|
|
135
|
+
return Array.isArray(e) ? Array.from(new Set(e.map((i) => String(i)).filter(Boolean))) : u.includes(",") ? Array.from(new Set(u.split(",").map((i) => i.trim()).filter(Boolean))) : [u];
|
|
136
136
|
}
|
|
137
|
-
function A(
|
|
138
|
-
return t ? JSON.stringify(Array.isArray(
|
|
137
|
+
function A(u, t) {
|
|
138
|
+
return t ? JSON.stringify(Array.isArray(u) ? u : [String(u)]) : String(u || "");
|
|
139
139
|
}
|
|
140
140
|
class k extends _ {
|
|
141
141
|
constructor() {
|
|
@@ -222,8 +222,8 @@ class k extends _ {
|
|
|
222
222
|
return Array.isArray(t) ? new Set(t.map((e) => String(e))) : t ? /* @__PURE__ */ new Set([String(t)]) : /* @__PURE__ */ new Set();
|
|
223
223
|
}
|
|
224
224
|
_setGroupValue(t, e = !0) {
|
|
225
|
-
const i = A(t, this.multiple),
|
|
226
|
-
if (!this.multiple && !i && !
|
|
225
|
+
const i = A(t, this.multiple), l = this.getAttribute("value") || "";
|
|
226
|
+
if (!this.multiple && !i && !l || l === i) {
|
|
227
227
|
this._syncChildren();
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
@@ -236,27 +236,27 @@ class k extends _ {
|
|
|
236
236
|
this.dispatchEvent(new CustomEvent("input", { detail: r, bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("change", { detail: r, bubbles: !0, composed: !0 }));
|
|
237
237
|
}
|
|
238
238
|
_syncChildren() {
|
|
239
|
-
const t = this._toggles(), e = this.hasAttribute("disabled"), i = this._selectedSet(),
|
|
240
|
-
const
|
|
241
|
-
o && !
|
|
242
|
-
},
|
|
243
|
-
|
|
239
|
+
const t = this._toggles(), e = this.hasAttribute("disabled"), i = this._selectedSet(), l = this.multiple, r = (g, s, o) => {
|
|
240
|
+
const a = g.hasAttribute(s);
|
|
241
|
+
o && !a && g.setAttribute(s, ""), !o && a && g.removeAttribute(s);
|
|
242
|
+
}, c = (g, s, o) => {
|
|
243
|
+
g.getAttribute(s) !== o && g.setAttribute(s, o);
|
|
244
244
|
};
|
|
245
|
-
let
|
|
245
|
+
let d = -1, n = -1;
|
|
246
246
|
this._isSyncing = !0;
|
|
247
247
|
try {
|
|
248
248
|
t.forEach((s, o) => {
|
|
249
|
-
const
|
|
249
|
+
const a = this._toggleValue(s, o), h = s.hasAttribute("data-disabled") || s.getAttribute("aria-disabled") === "true", y = e || h;
|
|
250
250
|
r(s, "data-group-item", !0), y ? (r(s, "disabled", !0), r(s, "data-group-disabled", e && !h)) : s.hasAttribute("data-group-disabled") && (r(s, "disabled", !1), r(s, "data-group-disabled", !1));
|
|
251
|
-
const b = i.has(
|
|
252
|
-
r(s, "pressed", b),
|
|
251
|
+
const b = i.has(a);
|
|
252
|
+
r(s, "pressed", b), c(s, "role", l ? "checkbox" : "radio"), c(s, "aria-checked", b ? "true" : "false"), b && n < 0 && (n = o), !s.hasAttribute("disabled") && d < 0 && (d = o);
|
|
253
253
|
});
|
|
254
|
-
const
|
|
254
|
+
const g = m(t, {
|
|
255
255
|
activeIndex: this._focusIndex,
|
|
256
|
-
selectedIndex:
|
|
256
|
+
selectedIndex: n >= 0 ? n : d,
|
|
257
257
|
getDisabled: (s) => s.hasAttribute("disabled")
|
|
258
258
|
});
|
|
259
|
-
this._focusIndex =
|
|
259
|
+
this._focusIndex = g, p(t, t[g] || null, { activeAttribute: null });
|
|
260
260
|
} finally {
|
|
261
261
|
this._isSyncing = !1;
|
|
262
262
|
}
|
|
@@ -264,78 +264,79 @@ class k extends _ {
|
|
|
264
264
|
_onToggleEvent(t) {
|
|
265
265
|
const e = t.target;
|
|
266
266
|
if (!e || e.tagName.toLowerCase() !== "ui-toggle" || this.hasAttribute("disabled")) return;
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
269
|
-
const r = this._toggleValue(e,
|
|
270
|
-
if (this._focusIndex =
|
|
271
|
-
const
|
|
272
|
-
|
|
267
|
+
const l = this._toggles().indexOf(e);
|
|
268
|
+
if (l < 0) return;
|
|
269
|
+
const r = this._toggleValue(e, l), c = t.detail?.pressed ?? e.hasAttribute("pressed");
|
|
270
|
+
if (this._focusIndex = l, this.multiple) {
|
|
271
|
+
const n = this._selectedSet();
|
|
272
|
+
c ? n.add(r) : n.delete(r), this._setGroupValue(Array.from(n), !0);
|
|
273
273
|
return;
|
|
274
274
|
}
|
|
275
|
-
const
|
|
276
|
-
if (
|
|
275
|
+
const d = this.hasAttribute("allow-empty") && !this.hasAttribute("required");
|
|
276
|
+
if (c) {
|
|
277
277
|
this._setGroupValue(r, !0);
|
|
278
278
|
return;
|
|
279
279
|
}
|
|
280
|
-
if (
|
|
280
|
+
if (d) this._setGroupValue("", !0);
|
|
281
281
|
else {
|
|
282
|
-
const
|
|
283
|
-
this._setGroupValue(
|
|
282
|
+
const n = String(this.value || "");
|
|
283
|
+
this._setGroupValue(n || r, !1);
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
_onKeyDown(t) {
|
|
287
287
|
const e = t.target;
|
|
288
288
|
if (!e || e.tagName.toLowerCase() !== "ui-toggle") return;
|
|
289
|
-
const i = this.getAttribute("orientation") === "vertical" ? "vertical" : "horizontal",
|
|
289
|
+
const i = this.getAttribute("orientation") === "vertical" ? "vertical" : "horizontal", l = this.getAttribute("activation") === "manual" ? "manual" : "auto", r = this._toggles().filter((o) => !o.hasAttribute("disabled"));
|
|
290
290
|
if (r.length < 2) return;
|
|
291
|
-
const
|
|
292
|
-
if (
|
|
293
|
-
const
|
|
294
|
-
const
|
|
291
|
+
const c = r.indexOf(e);
|
|
292
|
+
if (c < 0) return;
|
|
293
|
+
const d = this._isHorizontalRtl(), n = (o) => {
|
|
294
|
+
const a = x(r, c, o, {
|
|
295
295
|
wrap: !0,
|
|
296
|
-
fallbackIndex: m(r, { activeIndex:
|
|
296
|
+
fallbackIndex: m(r, { activeIndex: c, getDisabled: () => !1 }),
|
|
297
297
|
getDisabled: () => !1
|
|
298
298
|
});
|
|
299
|
-
if (
|
|
300
|
-
const h = r[
|
|
301
|
-
this._focusIndex = this._toggles().indexOf(h), p(r, h, { activeAttribute: null }), f(h),
|
|
302
|
-
},
|
|
303
|
-
if (
|
|
304
|
-
t.preventDefault(),
|
|
299
|
+
if (a < 0) return;
|
|
300
|
+
const h = r[a];
|
|
301
|
+
this._focusIndex = this._toggles().indexOf(h), p(r, h, { activeAttribute: null }), f(h), l === "auto" && h.toggle?.(!0);
|
|
302
|
+
}, g = i === "horizontal" && (t.key === "ArrowRight" && !d || t.key === "ArrowLeft" && d) || i === "vertical" && t.key === "ArrowDown", s = i === "horizontal" && (t.key === "ArrowLeft" && !d || t.key === "ArrowRight" && d) || i === "vertical" && t.key === "ArrowUp";
|
|
303
|
+
if (g) {
|
|
304
|
+
t.preventDefault(), n(1);
|
|
305
305
|
return;
|
|
306
306
|
}
|
|
307
307
|
if (s) {
|
|
308
|
-
t.preventDefault(),
|
|
308
|
+
t.preventDefault(), n(-1);
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
311
|
if (t.key === "Home") {
|
|
312
312
|
t.preventDefault();
|
|
313
313
|
const o = v(r, "first", () => !1);
|
|
314
314
|
if (o < 0) return;
|
|
315
|
-
const
|
|
316
|
-
this._focusIndex = this._toggles().indexOf(
|
|
315
|
+
const a = r[o];
|
|
316
|
+
this._focusIndex = this._toggles().indexOf(a), p(r, a, { activeAttribute: null }), f(a), l === "auto" && a.toggle?.(!0);
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
319
|
if (t.key === "End") {
|
|
320
320
|
t.preventDefault();
|
|
321
321
|
const o = v(r, "last", () => !1);
|
|
322
322
|
if (o < 0) return;
|
|
323
|
-
const
|
|
324
|
-
this._focusIndex = this._toggles().indexOf(
|
|
323
|
+
const a = r[o];
|
|
324
|
+
this._focusIndex = this._toggles().indexOf(a), p(r, a, { activeAttribute: null }), f(a), l === "auto" && a.toggle?.(!0);
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
render() {
|
|
328
|
-
const t = this.multiple ? "group" : "radiogroup"
|
|
328
|
+
const t = this.multiple ? "group" : "radiogroup";
|
|
329
|
+
this.getAttribute("orientation");
|
|
330
|
+
const e = this.getAttribute("aria-label") || "Toggle group", i = this.hasAttribute("required"), l = this.hasAttribute("disabled");
|
|
329
331
|
this.setContent(`
|
|
330
332
|
<style>${w}</style>
|
|
331
333
|
<div
|
|
332
334
|
class="group"
|
|
333
335
|
part="group"
|
|
334
336
|
role="${t}"
|
|
335
|
-
aria-label="${E(
|
|
336
|
-
aria-
|
|
337
|
-
aria-
|
|
338
|
-
aria-required="${a ? "true" : "false"}"
|
|
337
|
+
aria-label="${E(e)}"
|
|
338
|
+
aria-disabled="${l ? "true" : "false"}"
|
|
339
|
+
aria-required="${i ? "true" : "false"}"
|
|
339
340
|
>
|
|
340
341
|
<slot></slot>
|
|
341
342
|
</div>
|
|
@@ -344,8 +345,10 @@ class k extends _ {
|
|
|
344
345
|
_syncGroupA11y() {
|
|
345
346
|
const t = this.root.querySelector(".group");
|
|
346
347
|
if (!t) return;
|
|
347
|
-
const e = this.multiple ? "group" : "radiogroup"
|
|
348
|
-
|
|
348
|
+
const e = this.multiple ? "group" : "radiogroup";
|
|
349
|
+
this.getAttribute("orientation");
|
|
350
|
+
const i = this.getAttribute("aria-label") || "Toggle group", l = this.hasAttribute("required"), r = this.hasAttribute("disabled");
|
|
351
|
+
t.getAttribute("role") !== e && t.setAttribute("role", e), t.getAttribute("aria-label") !== i && t.setAttribute("aria-label", i), t.removeAttribute("aria-orientation"), t.setAttribute("aria-disabled", r ? "true" : "false"), t.setAttribute("aria-required", l ? "true" : "false");
|
|
349
352
|
}
|
|
350
353
|
_isHorizontalRtl() {
|
|
351
354
|
if (this.getAttribute("orientation") === "vertical") return !1;
|
package/dist/toggle.cjs.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./ElementBase-EV6mVBUV.js"),c=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-toggle-radius: 10px;
|
|
4
4
|
--ui-toggle-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 74%, transparent);
|
|
5
5
|
--ui-toggle-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
|
|
6
6
|
--ui-toggle-color: var(--ui-color-text, #0f172a);
|
|
7
7
|
--ui-toggle-active-bg: var(--ui-color-primary, #2563eb);
|
|
8
|
-
--ui-toggle-active-color: var(--ui-color-primary-foreground, #ffffff);
|
|
8
|
+
--ui-toggle-active-color: var(--ui-color-primary-foreground, var(--ui-color-foreground-on-primary, #ffffff));
|
|
9
9
|
--ui-toggle-active-border: color-mix(in srgb, var(--ui-toggle-active-bg) 72%, #0f172a 28%);
|
|
10
|
-
--ui-toggle-muted: var(--ui-color-muted, #
|
|
10
|
+
--ui-toggle-muted: var(--ui-color-muted, #526175);
|
|
11
11
|
--ui-toggle-focus: var(--ui-color-focus-ring, #2563eb);
|
|
12
12
|
--ui-toggle-shadow:
|
|
13
13
|
none;
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
|
|
67
67
|
:host([pressed]) .control,
|
|
68
68
|
.control[aria-pressed="true"] {
|
|
69
|
-
background:
|
|
69
|
+
background: var(--ui-toggle-active-bg);
|
|
70
70
|
border-color: var(--ui-toggle-active-border);
|
|
71
71
|
color: var(--ui-toggle-active-color);
|
|
72
72
|
}
|
|
@@ -160,17 +160,22 @@
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
:host([tone="success"]) {
|
|
163
|
-
--ui-toggle-active-bg: var(--ui-color-success, #
|
|
163
|
+
--ui-toggle-active-bg: var(--ui-color-success, #15803d);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
:host([tone="warning"]) {
|
|
167
|
-
--ui-toggle-active-bg: var(--ui-color-warning, #
|
|
167
|
+
--ui-toggle-active-bg: var(--ui-color-warning, #b45309);
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
:host([tone="danger"]) {
|
|
171
171
|
--ui-toggle-active-bg: var(--ui-color-danger, #dc2626);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
+
/* The contrast variant draws dark text on its pressed fill, so the tones need light fills there. */
|
|
175
|
+
:host([variant="contrast"][tone="success"]) { --ui-toggle-active-bg: #86efac; }
|
|
176
|
+
:host([variant="contrast"][tone="warning"]) { --ui-toggle-active-bg: #fcd34d; }
|
|
177
|
+
:host([variant="contrast"][tone="danger"]) { --ui-toggle-active-bg: #fca5a5; }
|
|
178
|
+
|
|
174
179
|
:host([disabled]) .control,
|
|
175
180
|
:host([loading]) .control {
|
|
176
181
|
opacity: 0.56;
|
|
@@ -218,20 +223,15 @@
|
|
|
218
223
|
--ui-toggle-shadow: none;
|
|
219
224
|
}
|
|
220
225
|
}
|
|
221
|
-
`,
|
|
226
|
+
`,a=new Set(["icon-on","icon-off","aria-label"]);function u(o){if(o==null)return!1;const e=String(o).toLowerCase();return e!=="false"&&e!=="0"&&e!=="off"}function n(o){return String(o).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}class l extends g.ElementBase{constructor(){super(),this._control=null,this._onClick=this._onClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this)}static get observedAttributes(){return["pressed","disabled","loading","headless","size","variant","tone","shape","elevation","name","value","required","icon-on","icon-off","aria-label","tabindex"]}connectedCallback(){super.connectedCallback(),this.root.addEventListener("click",this._onClick),this.root.addEventListener("keydown",this._onKeyDown),this._syncAria()}disconnectedCallback(){this.root.removeEventListener("click",this._onClick),this.root.removeEventListener("keydown",this._onKeyDown),super.disconnectedCallback()}attributeChangedCallback(e,t,i){if(t!==i){if(a.has(e)){super.attributeChangedCallback(e,t,i);return}this._syncAria()}}get pressed(){return this.hasAttribute("pressed")}set pressed(e){e?this.setAttribute("pressed",""):this.removeAttribute("pressed")}get disabled(){return this.hasAttribute("disabled")||this.hasAttribute("loading")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}toggle(e){if(this.disabled)return;const t=typeof e=="boolean"?e:!this.pressed;if(t===this.pressed){this._syncAria();return}this.pressed=t,this._syncAria();const i={pressed:t,value:this.getAttribute("value")||"",name:this.getAttribute("name")||"",required:u(this.getAttribute("required"))};this.dispatchEvent(new CustomEvent("input",{detail:i,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:i,bubbles:!0,composed:!0}))}_syncAria(){const e=this.pressed,t=this.disabled,i=this.hasAttribute("loading");this.hasAttribute("data-group-item")?this.hasAttribute("aria-pressed")&&this.removeAttribute("aria-pressed"):(this.setAttribute("role","button"),this.setAttribute("aria-pressed",e?"true":"false")),this.setAttribute("aria-disabled",t?"true":"false"),this.setAttribute("aria-busy",i?"true":"false");const r=this.getAttribute("tabindex");if(t)this.hasAttribute("data-ui-prev-tabindex")||this.setAttribute("data-ui-prev-tabindex",r??""),r!=="-1"&&this.setAttribute("tabindex","-1");else{const s=this.getAttribute("data-ui-prev-tabindex");s!=null?(s?this.setAttribute("tabindex",s):this.removeAttribute("tabindex"),this.removeAttribute("data-ui-prev-tabindex")):r==null&&this.setAttribute("tabindex","0")}this._control&&this._control.toggleAttribute("data-disabled",t)}_onClick(e){const t=e.target;t&&t.closest(".control")&&this.toggle()}_onKeyDown(e){this.disabled||(e.key===" "||e.key==="Enter")&&(e.preventDefault(),this.toggle())}render(){this.pressed;const e=this.disabled,t=this.getAttribute("icon-on")||"●",i=this.getAttribute("icon-off")||"○";this.getAttribute("aria-label"),this.setContent(`
|
|
222
227
|
<style>${c}</style>
|
|
223
|
-
<
|
|
224
|
-
type="button"
|
|
228
|
+
<span
|
|
225
229
|
class="control"
|
|
226
230
|
part="control"
|
|
227
|
-
|
|
228
|
-
aria-pressed="${e?"true":"false"}"
|
|
229
|
-
aria-disabled="${t?"true":"false"}"
|
|
230
|
-
tabindex="-1"
|
|
231
|
-
${t?"disabled":""}
|
|
231
|
+
${e?"data-disabled":""}
|
|
232
232
|
>
|
|
233
|
-
<span class="icon icon-off" part="icon-off" aria-hidden="true">${n(
|
|
234
|
-
<span class="icon icon-on" part="icon-on" aria-hidden="true">${n(
|
|
233
|
+
<span class="icon icon-off" part="icon-off" aria-hidden="true">${n(i)}</span>
|
|
234
|
+
<span class="icon icon-on" part="icon-on" aria-hidden="true">${n(t)}</span>
|
|
235
235
|
<span class="label" part="label"><slot></slot></span>
|
|
236
|
-
</
|
|
237
|
-
`),this._control=this.root.querySelector(".control"),this._syncAria()}shouldRenderOnAttributeChange(e,t,i){return
|
|
236
|
+
</span>
|
|
237
|
+
`),this._control=this.root.querySelector(".control"),this._syncAria()}shouldRenderOnAttributeChange(e,t,i){return a.has(e)}}typeof customElements<"u"&&!customElements.get("ui-toggle")&&customElements.define("ui-toggle",l);exports.UIToggle=l;
|
package/dist/toggle.esm.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
const
|
|
1
|
+
import { E as l } from "./ElementBase-YlTLMsGk.mjs";
|
|
2
|
+
const g = `
|
|
3
3
|
:host {
|
|
4
4
|
--ui-toggle-radius: 10px;
|
|
5
5
|
--ui-toggle-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 74%, transparent);
|
|
6
6
|
--ui-toggle-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
|
|
7
7
|
--ui-toggle-color: var(--ui-color-text, #0f172a);
|
|
8
8
|
--ui-toggle-active-bg: var(--ui-color-primary, #2563eb);
|
|
9
|
-
--ui-toggle-active-color: var(--ui-color-primary-foreground, #ffffff);
|
|
9
|
+
--ui-toggle-active-color: var(--ui-color-primary-foreground, var(--ui-color-foreground-on-primary, #ffffff));
|
|
10
10
|
--ui-toggle-active-border: color-mix(in srgb, var(--ui-toggle-active-bg) 72%, #0f172a 28%);
|
|
11
|
-
--ui-toggle-muted: var(--ui-color-muted, #
|
|
11
|
+
--ui-toggle-muted: var(--ui-color-muted, #526175);
|
|
12
12
|
--ui-toggle-focus: var(--ui-color-focus-ring, #2563eb);
|
|
13
13
|
--ui-toggle-shadow:
|
|
14
14
|
none;
|
|
@@ -67,7 +67,7 @@ const u = `
|
|
|
67
67
|
|
|
68
68
|
:host([pressed]) .control,
|
|
69
69
|
.control[aria-pressed="true"] {
|
|
70
|
-
background:
|
|
70
|
+
background: var(--ui-toggle-active-bg);
|
|
71
71
|
border-color: var(--ui-toggle-active-border);
|
|
72
72
|
color: var(--ui-toggle-active-color);
|
|
73
73
|
}
|
|
@@ -161,17 +161,22 @@ const u = `
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
:host([tone="success"]) {
|
|
164
|
-
--ui-toggle-active-bg: var(--ui-color-success, #
|
|
164
|
+
--ui-toggle-active-bg: var(--ui-color-success, #15803d);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
:host([tone="warning"]) {
|
|
168
|
-
--ui-toggle-active-bg: var(--ui-color-warning, #
|
|
168
|
+
--ui-toggle-active-bg: var(--ui-color-warning, #b45309);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
:host([tone="danger"]) {
|
|
172
172
|
--ui-toggle-active-bg: var(--ui-color-danger, #dc2626);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
/* The contrast variant draws dark text on its pressed fill, so the tones need light fills there. */
|
|
176
|
+
:host([variant="contrast"][tone="success"]) { --ui-toggle-active-bg: #86efac; }
|
|
177
|
+
:host([variant="contrast"][tone="warning"]) { --ui-toggle-active-bg: #fcd34d; }
|
|
178
|
+
:host([variant="contrast"][tone="danger"]) { --ui-toggle-active-bg: #fca5a5; }
|
|
179
|
+
|
|
175
180
|
:host([disabled]) .control,
|
|
176
181
|
:host([loading]) .control {
|
|
177
182
|
opacity: 0.56;
|
|
@@ -219,7 +224,7 @@ const u = `
|
|
|
219
224
|
--ui-toggle-shadow: none;
|
|
220
225
|
}
|
|
221
226
|
}
|
|
222
|
-
`,
|
|
227
|
+
`, a = /* @__PURE__ */ new Set(["icon-on", "icon-off", "aria-label"]);
|
|
223
228
|
function c(o) {
|
|
224
229
|
if (o == null) return !1;
|
|
225
230
|
const e = String(o).toLowerCase();
|
|
@@ -228,7 +233,7 @@ function c(o) {
|
|
|
228
233
|
function n(o) {
|
|
229
234
|
return String(o).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
230
235
|
}
|
|
231
|
-
class
|
|
236
|
+
class u extends l {
|
|
232
237
|
constructor() {
|
|
233
238
|
super(), this._control = null, this._onClick = this._onClick.bind(this), this._onKeyDown = this._onKeyDown.bind(this);
|
|
234
239
|
}
|
|
@@ -260,7 +265,7 @@ class d extends g {
|
|
|
260
265
|
}
|
|
261
266
|
attributeChangedCallback(e, t, i) {
|
|
262
267
|
if (t !== i) {
|
|
263
|
-
if (
|
|
268
|
+
if (a.has(e)) {
|
|
264
269
|
super.attributeChangedCallback(e, t, i);
|
|
265
270
|
return;
|
|
266
271
|
}
|
|
@@ -296,16 +301,16 @@ class d extends g {
|
|
|
296
301
|
this.dispatchEvent(new CustomEvent("input", { detail: i, bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("change", { detail: i, bubbles: !0, composed: !0 }));
|
|
297
302
|
}
|
|
298
303
|
_syncAria() {
|
|
299
|
-
const e = this.pressed, t = this.disabled, i = this.hasAttribute("loading")
|
|
300
|
-
|
|
304
|
+
const e = this.pressed, t = this.disabled, i = this.hasAttribute("loading");
|
|
305
|
+
this.hasAttribute("data-group-item") ? this.hasAttribute("aria-pressed") && this.removeAttribute("aria-pressed") : (this.setAttribute("role", "button"), this.setAttribute("aria-pressed", e ? "true" : "false")), this.setAttribute("aria-disabled", t ? "true" : "false"), this.setAttribute("aria-busy", i ? "true" : "false");
|
|
301
306
|
const r = this.getAttribute("tabindex");
|
|
302
307
|
if (t)
|
|
303
308
|
this.hasAttribute("data-ui-prev-tabindex") || this.setAttribute("data-ui-prev-tabindex", r ?? ""), r !== "-1" && this.setAttribute("tabindex", "-1");
|
|
304
309
|
else {
|
|
305
|
-
const
|
|
306
|
-
|
|
310
|
+
const s = this.getAttribute("data-ui-prev-tabindex");
|
|
311
|
+
s != null ? (s ? this.setAttribute("tabindex", s) : this.removeAttribute("tabindex"), this.removeAttribute("data-ui-prev-tabindex")) : r == null && this.setAttribute("tabindex", "0");
|
|
307
312
|
}
|
|
308
|
-
this._control &&
|
|
313
|
+
this._control && this._control.toggleAttribute("data-disabled", t);
|
|
309
314
|
}
|
|
310
315
|
_onClick(e) {
|
|
311
316
|
const t = e.target;
|
|
@@ -315,30 +320,26 @@ class d extends g {
|
|
|
315
320
|
this.disabled || (e.key === " " || e.key === "Enter") && (e.preventDefault(), this.toggle());
|
|
316
321
|
}
|
|
317
322
|
render() {
|
|
318
|
-
|
|
319
|
-
this.
|
|
320
|
-
|
|
321
|
-
<
|
|
322
|
-
|
|
323
|
+
this.pressed;
|
|
324
|
+
const e = this.disabled, t = this.getAttribute("icon-on") || "●", i = this.getAttribute("icon-off") || "○";
|
|
325
|
+
this.getAttribute("aria-label"), this.setContent(`
|
|
326
|
+
<style>${g}</style>
|
|
327
|
+
<span
|
|
323
328
|
class="control"
|
|
324
329
|
part="control"
|
|
325
|
-
|
|
326
|
-
aria-pressed="${e ? "true" : "false"}"
|
|
327
|
-
aria-disabled="${t ? "true" : "false"}"
|
|
328
|
-
tabindex="-1"
|
|
329
|
-
${t ? "disabled" : ""}
|
|
330
|
+
${e ? "data-disabled" : ""}
|
|
330
331
|
>
|
|
331
|
-
<span class="icon icon-off" part="icon-off" aria-hidden="true">${n(
|
|
332
|
-
<span class="icon icon-on" part="icon-on" aria-hidden="true">${n(
|
|
332
|
+
<span class="icon icon-off" part="icon-off" aria-hidden="true">${n(i)}</span>
|
|
333
|
+
<span class="icon icon-on" part="icon-on" aria-hidden="true">${n(t)}</span>
|
|
333
334
|
<span class="label" part="label"><slot></slot></span>
|
|
334
|
-
</
|
|
335
|
+
</span>
|
|
335
336
|
`), this._control = this.root.querySelector(".control"), this._syncAria();
|
|
336
337
|
}
|
|
337
338
|
shouldRenderOnAttributeChange(e, t, i) {
|
|
338
|
-
return
|
|
339
|
+
return a.has(e);
|
|
339
340
|
}
|
|
340
341
|
}
|
|
341
|
-
typeof customElements < "u" && !customElements.get("ui-toggle") && customElements.define("ui-toggle",
|
|
342
|
+
typeof customElements < "u" && !customElements.get("ui-toggle") && customElements.define("ui-toggle", u);
|
|
342
343
|
export {
|
|
343
|
-
|
|
344
|
+
u as UIToggle
|
|
344
345
|
};
|
package/dist/tooltip.cjs.js
CHANGED
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.tooltip[data-tone="success"] {
|
|
80
|
-
--ui-tooltip-bg: color-mix(in srgb, var(--ui-color-success, #
|
|
81
|
-
--ui-tooltip-border: color-mix(in srgb, var(--ui-color-success, #
|
|
80
|
+
--ui-tooltip-bg: color-mix(in srgb, var(--ui-color-success, #15803d) 84%, #052e16 16%);
|
|
81
|
+
--ui-tooltip-border: color-mix(in srgb, var(--ui-color-success, #15803d) 42%, transparent);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
.tooltip[data-tone="warning"] {
|
|
85
|
-
--ui-tooltip-bg: color-mix(in srgb, var(--ui-color-warning, #
|
|
86
|
-
--ui-tooltip-border: color-mix(in srgb, var(--ui-color-warning, #
|
|
85
|
+
--ui-tooltip-bg: color-mix(in srgb, var(--ui-color-warning, #b45309) 84%, #451a03 16%);
|
|
86
|
+
--ui-tooltip-border: color-mix(in srgb, var(--ui-color-warning, #b45309) 42%, transparent);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.tooltip[data-tone="danger"] {
|
package/dist/tooltip.esm.js
CHANGED
|
@@ -79,13 +79,13 @@ const d = 140, w = 120, m = `
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.tooltip[data-tone="success"] {
|
|
82
|
-
--ui-tooltip-bg: color-mix(in srgb, var(--ui-color-success, #
|
|
83
|
-
--ui-tooltip-border: color-mix(in srgb, var(--ui-color-success, #
|
|
82
|
+
--ui-tooltip-bg: color-mix(in srgb, var(--ui-color-success, #15803d) 84%, #052e16 16%);
|
|
83
|
+
--ui-tooltip-border: color-mix(in srgb, var(--ui-color-success, #15803d) 42%, transparent);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.tooltip[data-tone="warning"] {
|
|
87
|
-
--ui-tooltip-bg: color-mix(in srgb, var(--ui-color-warning, #
|
|
88
|
-
--ui-tooltip-border: color-mix(in srgb, var(--ui-color-warning, #
|
|
87
|
+
--ui-tooltip-bg: color-mix(in srgb, var(--ui-color-warning, #b45309) 84%, #451a03 16%);
|
|
88
|
+
--ui-tooltip-border: color-mix(in srgb, var(--ui-color-warning, #b45309) 42%, transparent);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.tooltip[data-tone="danger"] {
|