@brad-frost-web/eddie-recipes 0.71.0 → 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,7 +3,7 @@ import "../../../chunks/button.CRZcpcb5.js";
|
|
|
3
3
|
import "../../../chunks/icon.CkGhv9DG.js";
|
|
4
4
|
import "../../../chunks/accordion-panel.BrflJCE5.js";
|
|
5
5
|
import { E as de } from "../../../chunks/EdFormElement.BHTo4Ifh.js";
|
|
6
|
-
import { a as
|
|
6
|
+
import { a as h, r as E, A as b, b as l, o as _, n as c, e as j } from "../../../chunks/lit.BJDcdeQB.js";
|
|
7
7
|
import { u as B } from "../../../chunks/uid.ChSzTghf.js";
|
|
8
8
|
import "../../../chunks/field-note.CK3ikewY.js";
|
|
9
9
|
import "../../../chunks/select-field.1Ec3iQwv.js";
|
|
@@ -271,18 +271,18 @@ x([
|
|
|
271
271
|
j(".ed-c-color-picker__hex")
|
|
272
272
|
], w.prototype, "hexField", 2);
|
|
273
273
|
x([
|
|
274
|
-
|
|
274
|
+
h()
|
|
275
275
|
], w.prototype, "customActive", 2);
|
|
276
276
|
customElements.get("ed-color-picker") === void 0 && customElements.define("ed-color-picker", w);
|
|
277
|
-
const Oe = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}html{scroll-padding-block-start:var(--ed-site-header-block-size, 0px)}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-tag{font-family:var(--ed-theme-typography-label-sm-font-family);font-weight:var(--ed-theme-typography-label-sm-font-weight);font-size:var(--ed-theme-typography-label-sm-font-size);line-height:var(--ed-theme-typography-label-sm-line-height);letter-spacing:var(--ed-theme-typography-label-sm-letter-spacing);text-transform:var(--ed-theme-typography-label-sm-text-transform);display:inline-flex;align-items:center;gap:var(--ed-theme-spacing-xs);padding:var(--ed-theme-spacing-xs) .5rem;border:var(--ed-theme-border-width-sm) solid var(--ed-theme-color-border-default);border-radius:var(--ed-theme-border-radius-md);background:var(--ed-theme-color-background-subtle);color:var(--ed-theme-color-content-default)}.ed-c-tag__label{white-space:nowrap}ed-icon{--ed-icon-height: .875rem;--ed-icon-width: .875rem}.ed-c-tag--brand{background:var(--ed-theme-color-background-subtle);border-color:var(--ed-theme-color-border-brand);color:var(--ed-theme-color-content-brand)}.ed-c-tag--info{background:var(--ed-theme-color-background-utility-info);border-color:var(--ed-theme-color-border-utility-info);color:var(--ed-theme-color-content-utility-info)}.ed-c-tag--success{background:var(--ed-theme-color-background-utility-success);border-color:var(--ed-theme-color-border-utility-success);color:var(--ed-theme-color-content-utility-success)}.ed-c-tag--warning{background:var(--ed-theme-color-background-utility-warning);border-color:var(--ed-theme-color-border-utility-warning);color:var(--ed-theme-color-content-utility-warning)}.ed-c-tag--error{background:var(--ed-theme-color-background-utility-error);border-color:var(--ed-theme-color-border-utility-error);color:var(--ed-theme-color-content-utility-error)}.ed-c-tag--solid{border-color:transparent;background:var(--ed-theme-color-background-knockout);color:var(--ed-theme-color-content-knockout)}.ed-c-tag--solid.ed-c-tag--brand{background:var(--ed-theme-color-background-brand-knockout)}.ed-c-tag--solid.ed-c-tag--info{background:var(--ed-theme-color-background-utility-info-knockout);color:var(--ed-theme-color-content-on-utility-info, var(--ed-theme-color-content-knockout))}.ed-c-tag--solid.ed-c-tag--success{background:var(--ed-theme-color-background-utility-success-knockout);color:var(--ed-theme-color-content-on-utility-success, var(--ed-theme-color-content-knockout))}.ed-c-tag--solid.ed-c-tag--warning{background:var(--ed-theme-color-background-utility-warning-knockout);color:var(--ed-theme-color-content-on-utility-warning, var(--ed-theme-color-content-knockout))}.ed-c-tag--solid.ed-c-tag--error{background:var(--ed-theme-color-background-utility-error-knockout);color:var(--ed-theme-color-content-on-utility-error, var(--ed-theme-color-content-knockout))}.ed-c-tag--md{font-family:var(--ed-theme-typography-label-default-font-family);font-weight:var(--ed-theme-typography-label-default-font-weight);font-size:var(--ed-theme-typography-label-default-font-size);line-height:var(--ed-theme-typography-label-default-line-height);letter-spacing:var(--ed-theme-typography-label-default-letter-spacing);text-transform:var(--ed-theme-typography-label-default-text-transform);padding:var(--ed-theme-spacing-xs) .75rem}.ed-c-tag--md ed-icon{--ed-icon-height: 1rem;--ed-icon-width: 1rem}::slotted(a),::slotted(button){font:inherit;color:inherit;text-decoration:none;background:none;border:none;padding:0;margin:0;cursor:pointer}::slotted(a:hover),::slotted(button:hover){text-decoration:underline}.ed-c-tag--selectable
|
|
278
|
-
var Ee = Object.defineProperty,
|
|
277
|
+
const Oe = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}html{scroll-padding-block-start:var(--ed-site-header-block-size, 0px)}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-tag{font-family:var(--ed-theme-typography-label-sm-font-family);font-weight:var(--ed-theme-typography-label-sm-font-weight);font-size:var(--ed-theme-typography-label-sm-font-size);line-height:var(--ed-theme-typography-label-sm-line-height);letter-spacing:var(--ed-theme-typography-label-sm-letter-spacing);text-transform:var(--ed-theme-typography-label-sm-text-transform);display:inline-flex;align-items:center;gap:var(--ed-theme-spacing-xs);padding:var(--ed-theme-spacing-xs) .5rem;border:var(--ed-theme-border-width-sm) solid var(--ed-theme-color-border-default);border-radius:var(--ed-theme-border-radius-md);background:var(--ed-theme-color-background-subtle);color:var(--ed-theme-color-content-default)}.ed-c-tag__label{white-space:nowrap}ed-icon{--ed-icon-height: .875rem;--ed-icon-width: .875rem}.ed-c-tag--brand{background:var(--ed-theme-color-background-subtle);border-color:var(--ed-theme-color-border-brand);color:var(--ed-theme-color-content-brand)}.ed-c-tag--info{background:var(--ed-theme-color-background-utility-info);border-color:var(--ed-theme-color-border-utility-info);color:var(--ed-theme-color-content-utility-info)}.ed-c-tag--success{background:var(--ed-theme-color-background-utility-success);border-color:var(--ed-theme-color-border-utility-success);color:var(--ed-theme-color-content-utility-success)}.ed-c-tag--warning{background:var(--ed-theme-color-background-utility-warning);border-color:var(--ed-theme-color-border-utility-warning);color:var(--ed-theme-color-content-utility-warning)}.ed-c-tag--error{background:var(--ed-theme-color-background-utility-error);border-color:var(--ed-theme-color-border-utility-error);color:var(--ed-theme-color-content-utility-error)}.ed-c-tag--solid{border-color:transparent;background:var(--ed-theme-color-background-knockout);color:var(--ed-theme-color-content-knockout)}.ed-c-tag--solid.ed-c-tag--brand{background:var(--ed-theme-color-background-brand-knockout)}.ed-c-tag--solid.ed-c-tag--info{background:var(--ed-theme-color-background-utility-info-knockout);color:var(--ed-theme-color-content-on-utility-info, var(--ed-theme-color-content-knockout))}.ed-c-tag--solid.ed-c-tag--success{background:var(--ed-theme-color-background-utility-success-knockout);color:var(--ed-theme-color-content-on-utility-success, var(--ed-theme-color-content-knockout))}.ed-c-tag--solid.ed-c-tag--warning{background:var(--ed-theme-color-background-utility-warning-knockout);color:var(--ed-theme-color-content-on-utility-warning, var(--ed-theme-color-content-knockout))}.ed-c-tag--solid.ed-c-tag--error{background:var(--ed-theme-color-background-utility-error-knockout);color:var(--ed-theme-color-content-on-utility-error, var(--ed-theme-color-content-knockout))}.ed-c-tag--md{font-family:var(--ed-theme-typography-label-default-font-family);font-weight:var(--ed-theme-typography-label-default-font-weight);font-size:var(--ed-theme-typography-label-default-font-size);line-height:var(--ed-theme-typography-label-default-line-height);letter-spacing:var(--ed-theme-typography-label-default-letter-spacing);text-transform:var(--ed-theme-typography-label-default-text-transform);padding:var(--ed-theme-spacing-xs) .75rem}.ed-c-tag--md ed-icon{--ed-icon-height: 1rem;--ed-icon-width: 1rem}::slotted(a),::slotted(button){font:inherit;color:inherit;text-decoration:none;background:none;border:none;padding:0;margin:0;cursor:pointer}::slotted(a:hover),::slotted(button:hover){text-decoration:underline}.ed-c-tag--selectable.ed-is-pressed{border-color:var(--ed-theme-color-border-selected);background:var(--ed-theme-color-background-selected);color:var(--ed-theme-color-content-on-selected)}.ed-c-tag__dismiss{display:inline-flex;align-items:center;padding:0;border:none;background:none;color:inherit;cursor:pointer}.ed-c-tag__dismiss:focus-visible{outline:var(--ed-theme-border-width-lg) solid var(--ed-theme-focus-ring-color-border-default);outline-offset:var(--ed-theme-focus-ring-offset, .25rem)}';
|
|
278
|
+
var Ee = Object.defineProperty, C = (d, e, t, r) => {
|
|
279
279
|
for (var o = void 0, s = d.length - 1, i; s >= 0; s--)
|
|
280
280
|
(i = d[s]) && (o = i(e, t, o) || o);
|
|
281
281
|
return o && Ee(e, t, o), o;
|
|
282
282
|
};
|
|
283
283
|
class S extends L {
|
|
284
284
|
constructor() {
|
|
285
|
-
super(...arguments), this.behavior = "static", this.dismissed = !1, this.onDismiss = () => {
|
|
285
|
+
super(...arguments), this.behavior = "static", this.dismissed = !1, this.pressed = !1, this.pressedObserver = new MutationObserver(() => this.readPressed()), this.onDismiss = () => {
|
|
286
286
|
this.dispatch({
|
|
287
287
|
eventName: "ed-tag-dismiss",
|
|
288
288
|
detailObj: { text: this.label },
|
|
@@ -300,6 +300,9 @@ class S extends L {
|
|
|
300
300
|
static get styles() {
|
|
301
301
|
return E(Oe);
|
|
302
302
|
}
|
|
303
|
+
readPressed() {
|
|
304
|
+
this.pressed = this.querySelector(":scope > button")?.getAttribute("aria-pressed") === "true";
|
|
305
|
+
}
|
|
303
306
|
/**
|
|
304
307
|
* List semantics live on the host, not inside the shadow root.
|
|
305
308
|
*
|
|
@@ -325,7 +328,10 @@ class S extends L {
|
|
|
325
328
|
* the claim. Here the tag handles light-DOM lists only.
|
|
326
329
|
*/
|
|
327
330
|
connectedCallback() {
|
|
328
|
-
super.connectedCallback(), !this.hasAttribute("role") && this.hasListParent() && this.setAttribute("role", "listitem");
|
|
331
|
+
super.connectedCallback(), !this.hasAttribute("role") && this.hasListParent() && this.setAttribute("role", "listitem"), this.readPressed(), this.pressedObserver.observe(this, { childList: !0, subtree: !0, attributeFilter: ["aria-pressed"] });
|
|
332
|
+
}
|
|
333
|
+
disconnectedCallback() {
|
|
334
|
+
super.disconnectedCallback(), this.pressedObserver.disconnect();
|
|
329
335
|
}
|
|
330
336
|
/**
|
|
331
337
|
* Whether this tag's parent is a list in the light DOM. `ed-tag-list` is
|
|
@@ -349,7 +355,8 @@ class S extends L {
|
|
|
349
355
|
"ed-c-tag--error": this.variant === "error",
|
|
350
356
|
"ed-c-tag--solid": this.appearance === "solid",
|
|
351
357
|
"ed-c-tag--md": this.size === "md",
|
|
352
|
-
[`ed-c-tag--${this.behavior}`]: this.behavior !== "static"
|
|
358
|
+
[`ed-c-tag--${this.behavior}`]: this.behavior !== "static",
|
|
359
|
+
"ed-is-pressed": this.behavior === "selectable" && this.pressed
|
|
353
360
|
});
|
|
354
361
|
return l`
|
|
355
362
|
<div class="${e}" @click=${this.onHostClick}>
|
|
@@ -369,27 +376,30 @@ class S extends L {
|
|
|
369
376
|
`;
|
|
370
377
|
}
|
|
371
378
|
}
|
|
372
|
-
|
|
379
|
+
C([
|
|
373
380
|
c()
|
|
374
381
|
], S.prototype, "behavior");
|
|
375
|
-
|
|
382
|
+
C([
|
|
376
383
|
c()
|
|
377
384
|
], S.prototype, "variant");
|
|
378
|
-
|
|
385
|
+
C([
|
|
379
386
|
c()
|
|
380
387
|
], S.prototype, "appearance");
|
|
381
|
-
|
|
388
|
+
C([
|
|
382
389
|
c()
|
|
383
390
|
], S.prototype, "size");
|
|
384
|
-
|
|
391
|
+
C([
|
|
385
392
|
c()
|
|
386
393
|
], S.prototype, "iconName");
|
|
387
|
-
|
|
394
|
+
C([
|
|
388
395
|
c()
|
|
389
396
|
], S.prototype, "text");
|
|
390
|
-
|
|
397
|
+
C([
|
|
391
398
|
c({ type: Boolean })
|
|
392
399
|
], S.prototype, "dismissed");
|
|
400
|
+
C([
|
|
401
|
+
h()
|
|
402
|
+
], S.prototype, "pressed");
|
|
393
403
|
customElements.get("ed-tag") === void 0 && customElements.define("ed-tag", S);
|
|
394
404
|
const Fe = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}html{scroll-padding-block-start:var(--ed-site-header-block-size, 0px)}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-tag-list{display:flex;flex-wrap:wrap;margin:-.5rem 0 0 -.5rem;padding:0;list-style:none}::slotted(ed-tag){margin-inline-start:.5rem;margin-block-start:.5rem}';
|
|
395
405
|
var Ae = Object.defineProperty, De = (d, e, t, r) => {
|
|
@@ -428,12 +438,12 @@ De([
|
|
|
428
438
|
], le.prototype, "label");
|
|
429
439
|
customElements.get("ed-tag-list") === void 0 && customElements.define("ed-tag-list", le);
|
|
430
440
|
const Ne = '@charset "UTF-8";:root,:host{--size-base-unit: .5rem}*,::slotted(*),*:before,*:after{box-sizing:border-box}html{scroll-padding-block-start:var(--ed-site-header-block-size, 0px)}h1,h2,h3,h4,h5,h6{margin:0}.ed-c-combobox{position:relative}.ed-c-combobox__label{font-family:var(--ed-theme-typography-label-default-font-family);font-weight:var(--ed-theme-typography-label-default-font-weight);font-size:var(--ed-theme-typography-label-default-font-size);line-height:var(--ed-theme-typography-label-default-line-height);letter-spacing:var(--ed-theme-typography-label-default-letter-spacing);text-transform:var(--ed-theme-typography-label-default-text-transform);display:block;font-size:var(--ed-field-label-font-size, var(--ed-theme-typography-label-default-font-size));margin-block-end:var(--ed-field-label-gap, .25rem)}.ed-c-combobox__shell{position:relative}.ed-c-combobox__input{-webkit-appearance:none;width:100%;border-width:var(--ed-theme-border-width-sm);border-style:solid;border-color:var(--ed-theme-form-color-border-default);border-radius:var(--ed-theme-form-border-radius, var(--ed-theme-border-radius-sm));outline:none;padding:var(--ed-field-padding-block, .8125rem) var(--ed-field-padding-inline, .5rem);font-family:var(--ed-theme-typography-body-default-font-family);font-weight:var(--ed-theme-typography-body-default-font-weight);font-size:var(--ed-theme-typography-body-default-font-size);line-height:var(--ed-theme-typography-body-default-line-height);letter-spacing:var(--ed-theme-typography-body-default-letter-spacing);text-transform:var(--ed-theme-typography-body-default-text-transform);font-size:var(--ed-field-font-size, var(--ed-theme-typography-body-default-font-size));line-height:var(--ed-field-line-height, var(--ed-theme-typography-body-default-line-height));color:var(--ed-theme-form-color-content-default);background-color:var(--ed-theme-form-color-background-default);transition:border-color var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease),background-color var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease),box-shadow var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-c-combobox__input:hover{border-color:var(--ed-theme-color-border-brand);background-color:var(--ed-theme-form-color-background-hover)}.ed-c-combobox__input:focus:not(:disabled){border-color:var(--ed-theme-form-color-border-focus)}.ed-c-combobox__input:not(:placeholder-shown):focus:not(:disabled){border-color:var(--ed-theme-form-color-border-focus);background-color:var(--ed-theme-form-color-background-hover)}.ed-is-error .ed-c-combobox__input:not(:placeholder-shown):focus:not(:disabled){background-color:var(--ed-theme-color-background-utility-error)}.ed-is-success .ed-c-combobox__input:not(:placeholder-shown):focus:not(:disabled){background-color:var(--ed-theme-color-background-utility-success)}.ed-c-combobox__input:active:not(:disabled){border-color:var(--ed-theme-form-color-border-default)}.ed-c-combobox__input:disabled{background-color:var(--ed-theme-color-background-subtle);border-color:var(--ed-theme-color-border-disabled);color:var(--ed-theme-color-content-disabled);cursor:not-allowed}.ed-c-combobox__input:disabled~.ed-c-text-field__label,.ed-c-combobox__input:disabled:hover~.ed-c-text-field__label,.ed-c-combobox__input:disabled::placeholder{color:var(--ed-theme-color-content-disabled)}.ed-c-combobox__input:focus-visible{outline:var(--ed-theme-border-width-lg) solid var(--ed-theme-focus-ring-color-border-default);outline-offset:var(--ed-theme-focus-ring-offset, .25rem)}.ed-c-combobox__input::placeholder{font-family:var(--ed-theme-typography-body-sm-font-family);font-weight:var(--ed-theme-typography-body-sm-font-weight);font-size:var(--ed-theme-typography-body-sm-font-size);line-height:var(--ed-theme-typography-body-sm-line-height);letter-spacing:var(--ed-theme-typography-body-sm-letter-spacing);text-transform:var(--ed-theme-typography-body-sm-text-transform);color:var(--ed-theme-form-color-content-subtle);transition:color var(--ed-theme-animation-fade-quick) var(--ed-theme-animation-ease)}.ed-is-error .ed-c-combobox__input::placeholder{color:var(--ed-theme-color-content-utility-error)}.ed-is-error .ed-c-combobox__input:hover::placeholder{color:var(--ed-theme-color-content-utility-error)}.ed-is-error .ed-c-combobox__input{color:var(--ed-theme-color-content-default);border-color:var(--ed-theme-color-border-utility-error);background-color:var(--ed-theme-color-background-utility-error)}.ed-is-error .ed-c-combobox__input:hover,.ed-is-error .ed-c-combobox__input:focus{background-color:var(--ed-theme-color-background-utility-error)}.ed-is-error .ed-c-combobox__input:not(:focus){color:var(--ed-theme-color-content-default)}.ed-is-success .ed-c-combobox__input{color:var(--ed-theme-color-content-default);border-color:var(--ed-theme-color-border-utility-success);background-color:var(--ed-theme-color-background-utility-success)}.ed-is-success .ed-c-combobox__input:hover,.ed-is-success .ed-c-combobox__input:focus{background-color:var(--ed-theme-color-background-utility-success)}.ed-c-combobox__list{position:absolute;z-index:var(--ed-theme-layer-dropdown);inset-inline:0;inset-block-start:100%;max-block-size:15rem;margin:0;padding:0;overflow-y:auto;list-style:none;border:var(--ed-theme-border-width-sm) solid var(--ed-theme-color-border-default);border-radius:var(--ed-theme-border-radius-sm);background:var(--ed-theme-color-background-default);box-shadow:var(--ed-theme-box-shadow-md)}.ed-c-combobox__list[hidden]{display:none}.ed-c-combobox__option{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem;padding:var(--ed-field-padding-block, .375rem) var(--ed-field-padding-inline, .5rem);cursor:pointer;color:var(--ed-theme-color-content-default)}.ed-c-combobox__option.ed-is-active{background:var(--ed-theme-color-background-subtle)}.ed-c-combobox__option[aria-selected=true]{font-weight:var(--ed-theme-typography-label-default-font-weight)}.ed-c-combobox__option[aria-selected=true].ed-is-active{background:var(--ed-theme-color-background-subtle)}.ed-c-combobox__option-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ed-c-combobox__option-description{flex-shrink:0;font-size:var(--ed-theme-typography-body-sm-font-size);color:var(--ed-theme-color-content-subtle)}.ed-c-combobox__empty{padding:var(--ed-field-padding-block, .375rem) var(--ed-field-padding-inline, .5rem);color:var(--ed-theme-color-content-subtle)}.ed-c-combobox__status{position:absolute;inline-size:1px;block-size:1px;margin:-1px;padding:0;overflow:hidden;white-space:nowrap;clip-path:inset(50%)}.ed-c-combobox--sm{--ed-field-padding-block: .375rem;--ed-field-padding-inline: .375rem;--ed-field-font-size: var(--ed-theme-typography-body-sm-font-size);--ed-field-line-height: var(--ed-theme-typography-body-sm-line-height);--ed-field-label-font-size: var(--ed-theme-typography-label-sm-font-size, var(--ed-theme-typography-body-sm-font-size));--ed-field-label-gap: .125rem;--ed-field-note-gap: .125rem;--ed-control-box-size: 1.125rem}.ed-c-combobox--lg{--ed-field-padding-block: 1.125rem;--ed-field-padding-inline: .75rem;--ed-field-font-size: var(--ed-theme-typography-body-lg-font-size, var(--ed-theme-typography-body-default-font-size));--ed-field-line-height: var(--ed-theme-typography-body-lg-line-height, var(--ed-theme-typography-body-default-line-height));--ed-field-label-gap: .375rem;--ed-field-note-gap: .375rem;--ed-control-box-size: 2rem}.ed-c-combobox.ed-is-disabled{cursor:not-allowed;opacity:var(--ed-theme-opacity-disabled, .6)}';
|
|
431
|
-
var
|
|
441
|
+
var Pe = Object.defineProperty, g = (d, e, t, r) => {
|
|
432
442
|
for (var o = void 0, s = d.length - 1, i; s >= 0; s--)
|
|
433
443
|
(i = d[s]) && (o = i(e, t, o) || o);
|
|
434
|
-
return o &&
|
|
444
|
+
return o && Pe(e, t, o), o;
|
|
435
445
|
};
|
|
436
|
-
const
|
|
446
|
+
const Ie = (d) => typeof d == "string" ? { value: d, label: d } : d;
|
|
437
447
|
class v extends de {
|
|
438
448
|
constructor() {
|
|
439
449
|
super(...arguments), this.type = "combobox", this.label = "Choose", this.items = [], this.disabled = !1, this.required = !1, this.emptyText = "No matches.", this.maxVisible = 100, this.open = !1, this.query = "", this.activeIndex = -1, this.listId = "", this.onInput = (e) => {
|
|
@@ -496,7 +506,7 @@ class v extends de {
|
|
|
496
506
|
}
|
|
497
507
|
/** Every item, normalised. */
|
|
498
508
|
get allItems() {
|
|
499
|
-
return this.items.map(
|
|
509
|
+
return this.items.map(Ie);
|
|
500
510
|
}
|
|
501
511
|
/**
|
|
502
512
|
* Everything matching the current query, before the render cap.
|
|
@@ -675,13 +685,13 @@ g([
|
|
|
675
685
|
c({ attribute: !1 })
|
|
676
686
|
], v.prototype, "filter");
|
|
677
687
|
g([
|
|
678
|
-
|
|
688
|
+
h()
|
|
679
689
|
], v.prototype, "open");
|
|
680
690
|
g([
|
|
681
|
-
|
|
691
|
+
h()
|
|
682
692
|
], v.prototype, "query");
|
|
683
693
|
g([
|
|
684
|
-
|
|
694
|
+
h()
|
|
685
695
|
], v.prototype, "activeIndex");
|
|
686
696
|
g([
|
|
687
697
|
j("input")
|
|
@@ -998,7 +1008,7 @@ var Ke = Object.defineProperty, u = (d, e, t, r) => {
|
|
|
998
1008
|
(i = d[s]) && (o = i(e, t, o) || o);
|
|
999
1009
|
return o && Ke(e, t, o), o;
|
|
1000
1010
|
};
|
|
1001
|
-
const
|
|
1011
|
+
const P = [
|
|
1002
1012
|
{ id: "bfw", label: "BFW" },
|
|
1003
1013
|
{ id: "bfw-dark", label: "BFW Dark" },
|
|
1004
1014
|
{ id: "bfw-v9", label: "BFW v9" },
|
|
@@ -1121,7 +1131,7 @@ const I = [
|
|
|
1121
1131
|
], Ye = "400;500;600;700", G = ["display", "serif", "handwriting"], V = ["sans-serif", "serif", "monospace"], oe = "ed-r-theme-customizer:catalog:v1", Ue = 1e3 * 60 * 60 * 24 * 7, H = [
|
|
1122
1132
|
{ key: "--ed-theme-border-radius-sm", label: "radius-sm", max: 1.5 },
|
|
1123
1133
|
{ key: "--ed-theme-border-radius-md", label: "radius-md", max: 2.5 }
|
|
1124
|
-
],
|
|
1134
|
+
], I = [
|
|
1125
1135
|
{ key: "--ed-theme-border-width-sm", label: "width-sm", max: 0.5 },
|
|
1126
1136
|
{ key: "--ed-theme-border-width-md", label: "width-md", max: 0.75 },
|
|
1127
1137
|
{ key: "--ed-theme-border-width-lg", label: "width-lg", max: 1 },
|
|
@@ -1183,7 +1193,7 @@ const I = [
|
|
|
1183
1193
|
}, D = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("color", "contrast-color(red)"), Ze = /^contrast-color\(\s*(#[0-9a-f]{3}(?:[0-9a-f]{3})?)\s*\)$/i, et = (d) => /^contrast-color\(/i.test(d.trim()), tt = (d) => {
|
|
1184
1194
|
const e = Ze.exec(d.trim()), t = e && he(e[1]);
|
|
1185
1195
|
return t ? U(t, "#000000") >= U(t, "#ffffff") ? "#000000" : "#ffffff" : null;
|
|
1186
|
-
},
|
|
1196
|
+
}, m = class ce extends L {
|
|
1187
1197
|
constructor() {
|
|
1188
1198
|
super(...arguments), this.position = "inline", this.deriveEndpoint = "/derive", this.behavior = "both", this.transport = "local", this.room = "", this.remoteTransport = null, this.syncLocked = !1, this.syncNotice = "", this.syncTransport = null, this.syncUnsubscribe = null, this.syncState = new W(), this.syncWritten = /* @__PURE__ */ new Set(), this.syncPublished = {}, this.syncApplyDamper = J((e) => this.applyRoomChanges(e), ke), this.syncPublishDamper = J((e) => this.sendToRoom("set", e), we), this.isOpen = !1, this.currentThemeId = "bfw", this.colorOverrides = {}, this.fontOverrides = {}, this.borderOverrides = {}, this.motionOverrides = {}, this.deriveAvailable = !1, this.deriveProbed = !1, this.deriveSource = "vibe", this.derivePrompt = "", this.deriveDocument = "", this.deriveCss = "", this.provenance = null, this.gradientOverrides = {}, this.environment = Object.fromEntries(
|
|
1189
1199
|
O.map((e) => [e.key, e.defaultValue])
|
|
@@ -1279,8 +1289,8 @@ const I = [
|
|
|
1279
1289
|
}
|
|
1280
1290
|
if (e("borders")) {
|
|
1281
1291
|
const o = 0.0625 + Math.random() * 0.4375;
|
|
1282
|
-
|
|
1283
|
-
const a = (i + 1) /
|
|
1292
|
+
I.forEach((s, i) => {
|
|
1293
|
+
const a = (i + 1) / I.length;
|
|
1284
1294
|
this.setBorderValue(s.key, this.roundToStep(a * o, 0.0625));
|
|
1285
1295
|
});
|
|
1286
1296
|
}
|
|
@@ -1423,7 +1433,7 @@ const I = [
|
|
|
1423
1433
|
}
|
|
1424
1434
|
detectCurrentTheme() {
|
|
1425
1435
|
const e = document.documentElement;
|
|
1426
|
-
for (const t of
|
|
1436
|
+
for (const t of P)
|
|
1427
1437
|
if (e.classList.contains(t.id))
|
|
1428
1438
|
return t.id;
|
|
1429
1439
|
return "bfw";
|
|
@@ -1447,7 +1457,7 @@ const I = [
|
|
|
1447
1457
|
r && (this.resolvedButtonColors[t.id] = this.normalizeColor(r));
|
|
1448
1458
|
}
|
|
1449
1459
|
this.resolvedDisplayFont = this.firstFamily(e.getPropertyValue(ee[0]).trim()), this.resolvedBodyFont = this.firstFamily(e.getPropertyValue(te[0]).trim()), this.resolvedBorders = {};
|
|
1450
|
-
for (const { key: t } of [...H, ...
|
|
1460
|
+
for (const { key: t } of [...H, ...I]) {
|
|
1451
1461
|
const r = e.getPropertyValue(t).trim(), o = this.toRem(r);
|
|
1452
1462
|
o !== null && (this.resolvedBorders[t] = o);
|
|
1453
1463
|
}
|
|
@@ -1888,11 +1898,11 @@ const I = [
|
|
|
1888
1898
|
this.persistSandbox();
|
|
1889
1899
|
}
|
|
1890
1900
|
themeLabel(e) {
|
|
1891
|
-
return
|
|
1901
|
+
return P.find((t) => t.id === e)?.label ?? e;
|
|
1892
1902
|
}
|
|
1893
1903
|
applyThemeClass(e) {
|
|
1894
1904
|
const t = document.documentElement;
|
|
1895
|
-
for (const r of
|
|
1905
|
+
for (const r of P) t.classList.remove(r.id);
|
|
1896
1906
|
t.classList.add(e);
|
|
1897
1907
|
}
|
|
1898
1908
|
setColor(e, t) {
|
|
@@ -1998,11 +2008,11 @@ const I = [
|
|
|
1998
2008
|
return `0rem 0rem ${n}rem ${p}rem ${i()}`;
|
|
1999
2009
|
}
|
|
2000
2010
|
case "stacked": {
|
|
2001
|
-
const n = i(), p = i(), f = a(0.15, 0.3), y = s(o * 0.3, o * 0.6), k = s(o * 0.7, o * 1.1),
|
|
2011
|
+
const n = i(), p = i(), f = a(0.15, 0.3), y = s(o * 0.3, o * 0.6), k = s(o * 0.7, o * 1.1), z = s(o * 1.1, o * 1.6);
|
|
2002
2012
|
return [
|
|
2003
2013
|
`0rem ${y}rem 0rem ${-y * 0.4}rem ${n}`,
|
|
2004
2014
|
`0rem ${k}rem 0rem ${-k * 0.4}rem ${p}`,
|
|
2005
|
-
`0rem ${
|
|
2015
|
+
`0rem ${z}rem ${o * 0.5}rem ${-z * 0.4}rem ${f}`
|
|
2006
2016
|
].join(", ");
|
|
2007
2017
|
}
|
|
2008
2018
|
default: {
|
|
@@ -2075,7 +2085,7 @@ const I = [
|
|
|
2075
2085
|
const e = [
|
|
2076
2086
|
{
|
|
2077
2087
|
optGroupLabel: "Published",
|
|
2078
|
-
options:
|
|
2088
|
+
options: P.map((t) => ({
|
|
2079
2089
|
label: t.label,
|
|
2080
2090
|
value: t.id,
|
|
2081
2091
|
selected: t.id === this.currentThemeId
|
|
@@ -2263,7 +2273,7 @@ const I = [
|
|
|
2263
2273
|
.filter=${(n, p) => {
|
|
2264
2274
|
const f = p.trim().toLowerCase();
|
|
2265
2275
|
if (!f) {
|
|
2266
|
-
const y = n.filter((
|
|
2276
|
+
const y = n.filter((z) => s.has(z.description)), k = n.filter((z) => !s.has(z.description));
|
|
2267
2277
|
return [...y, ...k];
|
|
2268
2278
|
}
|
|
2269
2279
|
return n.filter((y) => y.label.toLowerCase().includes(f));
|
|
@@ -2566,7 +2576,7 @@ Paper: #F4EFE6` : ":root { --gray-0: #f8f9fa; --blue-6: #4dabf7; }"}
|
|
|
2566
2576
|
<ed-accordion-panel>
|
|
2567
2577
|
<ed-heading slot="header" tagName="h4" variant="title-sm">Corners & borders</ed-heading>
|
|
2568
2578
|
<div class="ed-r-theme-customizer__stack">
|
|
2569
|
-
${[...H, ...
|
|
2579
|
+
${[...H, ...I].map((e) => {
|
|
2570
2580
|
const t = this.borderOverrides[e.key], r = t !== void 0 ? this.toRem(t) ?? 0 : this.resolvedBorders[e.key] ?? 0;
|
|
2571
2581
|
return this.renderSlider({
|
|
2572
2582
|
label: e.label,
|
|
@@ -3041,124 +3051,124 @@ Paper: #F4EFE6` : ":root { --gray-0: #f8f9fa; --blue-6: #4dabf7; }"}
|
|
|
3041
3051
|
};
|
|
3042
3052
|
u([
|
|
3043
3053
|
c({ reflect: !0 })
|
|
3044
|
-
],
|
|
3054
|
+
], m.prototype, "position");
|
|
3045
3055
|
u([
|
|
3046
3056
|
c({ attribute: "derive-endpoint" })
|
|
3047
|
-
],
|
|
3057
|
+
], m.prototype, "deriveEndpoint");
|
|
3048
3058
|
u([
|
|
3049
3059
|
c()
|
|
3050
|
-
],
|
|
3060
|
+
], m.prototype, "behavior");
|
|
3051
3061
|
u([
|
|
3052
3062
|
c()
|
|
3053
|
-
],
|
|
3063
|
+
], m.prototype, "transport");
|
|
3054
3064
|
u([
|
|
3055
3065
|
c()
|
|
3056
|
-
],
|
|
3066
|
+
], m.prototype, "room");
|
|
3057
3067
|
u([
|
|
3058
3068
|
c({ attribute: !1 })
|
|
3059
|
-
],
|
|
3069
|
+
], m.prototype, "remoteTransport");
|
|
3060
3070
|
u([
|
|
3061
|
-
|
|
3062
|
-
],
|
|
3071
|
+
h()
|
|
3072
|
+
], m.prototype, "syncLocked");
|
|
3063
3073
|
u([
|
|
3064
|
-
|
|
3065
|
-
],
|
|
3074
|
+
h()
|
|
3075
|
+
], m.prototype, "syncNotice");
|
|
3066
3076
|
u([
|
|
3067
|
-
|
|
3068
|
-
],
|
|
3077
|
+
h()
|
|
3078
|
+
], m.prototype, "isOpen");
|
|
3069
3079
|
u([
|
|
3070
|
-
|
|
3071
|
-
],
|
|
3080
|
+
h()
|
|
3081
|
+
], m.prototype, "currentThemeId");
|
|
3072
3082
|
u([
|
|
3073
|
-
|
|
3074
|
-
],
|
|
3083
|
+
h()
|
|
3084
|
+
], m.prototype, "colorOverrides");
|
|
3075
3085
|
u([
|
|
3076
|
-
|
|
3077
|
-
],
|
|
3086
|
+
h()
|
|
3087
|
+
], m.prototype, "fontOverrides");
|
|
3078
3088
|
u([
|
|
3079
|
-
|
|
3080
|
-
],
|
|
3089
|
+
h()
|
|
3090
|
+
], m.prototype, "borderOverrides");
|
|
3081
3091
|
u([
|
|
3082
|
-
|
|
3083
|
-
],
|
|
3092
|
+
h()
|
|
3093
|
+
], m.prototype, "motionOverrides");
|
|
3084
3094
|
u([
|
|
3085
|
-
|
|
3086
|
-
],
|
|
3095
|
+
h()
|
|
3096
|
+
], m.prototype, "deriveAvailable");
|
|
3087
3097
|
u([
|
|
3088
|
-
|
|
3089
|
-
],
|
|
3098
|
+
h()
|
|
3099
|
+
], m.prototype, "deriveSource");
|
|
3090
3100
|
u([
|
|
3091
|
-
|
|
3092
|
-
],
|
|
3101
|
+
h()
|
|
3102
|
+
], m.prototype, "derivePrompt");
|
|
3093
3103
|
u([
|
|
3094
|
-
|
|
3095
|
-
],
|
|
3104
|
+
h()
|
|
3105
|
+
], m.prototype, "deriveDocument");
|
|
3096
3106
|
u([
|
|
3097
|
-
|
|
3098
|
-
],
|
|
3107
|
+
h()
|
|
3108
|
+
], m.prototype, "deriveCss");
|
|
3099
3109
|
u([
|
|
3100
|
-
|
|
3101
|
-
],
|
|
3110
|
+
h()
|
|
3111
|
+
], m.prototype, "provenance");
|
|
3102
3112
|
u([
|
|
3103
|
-
|
|
3104
|
-
],
|
|
3113
|
+
h()
|
|
3114
|
+
], m.prototype, "gradientOverrides");
|
|
3105
3115
|
u([
|
|
3106
|
-
|
|
3107
|
-
],
|
|
3116
|
+
h()
|
|
3117
|
+
], m.prototype, "environment");
|
|
3108
3118
|
u([
|
|
3109
|
-
|
|
3110
|
-
],
|
|
3119
|
+
h()
|
|
3120
|
+
], m.prototype, "randomFacets");
|
|
3111
3121
|
u([
|
|
3112
|
-
|
|
3113
|
-
],
|
|
3122
|
+
h()
|
|
3123
|
+
], m.prototype, "deriveState");
|
|
3114
3124
|
u([
|
|
3115
|
-
|
|
3116
|
-
],
|
|
3125
|
+
h()
|
|
3126
|
+
], m.prototype, "deriveError");
|
|
3117
3127
|
u([
|
|
3118
|
-
|
|
3119
|
-
],
|
|
3128
|
+
h()
|
|
3129
|
+
], m.prototype, "derived");
|
|
3120
3130
|
u([
|
|
3121
|
-
|
|
3122
|
-
],
|
|
3131
|
+
h()
|
|
3132
|
+
], m.prototype, "buttonGroupColors");
|
|
3123
3133
|
u([
|
|
3124
|
-
|
|
3125
|
-
],
|
|
3134
|
+
h()
|
|
3135
|
+
], m.prototype, "shadowScales");
|
|
3126
3136
|
u([
|
|
3127
|
-
|
|
3128
|
-
],
|
|
3137
|
+
h()
|
|
3138
|
+
], m.prototype, "shadowOverrides");
|
|
3129
3139
|
u([
|
|
3130
|
-
|
|
3131
|
-
],
|
|
3140
|
+
h()
|
|
3141
|
+
], m.prototype, "displayFontFamily");
|
|
3132
3142
|
u([
|
|
3133
|
-
|
|
3134
|
-
],
|
|
3143
|
+
h()
|
|
3144
|
+
], m.prototype, "bodyFontFamily");
|
|
3135
3145
|
u([
|
|
3136
|
-
|
|
3137
|
-
],
|
|
3146
|
+
h()
|
|
3147
|
+
], m.prototype, "sandbox");
|
|
3138
3148
|
u([
|
|
3139
|
-
|
|
3140
|
-
],
|
|
3149
|
+
h()
|
|
3150
|
+
], m.prototype, "savedThemes");
|
|
3141
3151
|
u([
|
|
3142
|
-
|
|
3143
|
-
],
|
|
3152
|
+
h()
|
|
3153
|
+
], m.prototype, "saveDraftName");
|
|
3144
3154
|
u([
|
|
3145
|
-
|
|
3146
|
-
],
|
|
3155
|
+
h()
|
|
3156
|
+
], m.prototype, "cycleActive");
|
|
3147
3157
|
u([
|
|
3148
|
-
|
|
3149
|
-
],
|
|
3158
|
+
h()
|
|
3159
|
+
], m.prototype, "cycleSpeed");
|
|
3150
3160
|
u([
|
|
3151
|
-
|
|
3152
|
-
],
|
|
3161
|
+
h()
|
|
3162
|
+
], m.prototype, "exportFeedback");
|
|
3153
3163
|
u([
|
|
3154
|
-
|
|
3155
|
-
],
|
|
3164
|
+
h()
|
|
3165
|
+
], m.prototype, "catalog");
|
|
3156
3166
|
u([
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
],
|
|
3161
|
-
let ot =
|
|
3167
|
+
h(),
|
|
3168
|
+
h(),
|
|
3169
|
+
h()
|
|
3170
|
+
], m.prototype, "loadedFonts");
|
|
3171
|
+
let ot = m;
|
|
3162
3172
|
customElements.get("ed-r-theme-customizer") === void 0 && customElements.define("ed-r-theme-customizer", ot);
|
|
3163
3173
|
export {
|
|
3164
3174
|
ot as EdRThemeCustomizer
|