@design.estate/dees-catalog 21.36.1 → 21.36.2

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.
Files changed (31) hide show
  1. package/dist_bundle/bundle.js +817 -756
  2. package/dist_bundle/bundle.js.map +1 -1
  3. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-5UGXWLMH.js → chunk-5SHHYXWB.js} +2 -2
  4. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-ZCZ72OW4.js → chunk-UTEXL6ME.js} +38 -9
  5. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-ZCZ72OW4.js.map → chunk-UTEXL6ME.js.map} +1 -1
  6. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-4QORKLGX.js → dees-modal-AH4CADKZ.js} +2 -2
  7. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-7SYZG2AB.js → dees-workspace-terminal-PIUCRANN.js} +3 -3
  8. package/dist_ts_web/00_commitinfo_data.js +1 -1
  9. package/dist_ts_web/elements/00formgate.d.ts +13 -2
  10. package/dist_ts_web/elements/00formgate.js +26 -6
  11. package/dist_ts_web/elements/00group-form/dees-form/dees-form.js +3 -3
  12. package/dist_ts_web/elements/00group-layout/dees-stepper/dees-stepper.d.ts +25 -10
  13. package/dist_ts_web/elements/00group-layout/dees-stepper/dees-stepper.demo.js +44 -11
  14. package/dist_ts_web/elements/00group-layout/dees-stepper/dees-stepper.js +54 -27
  15. package/dist_ts_web/elements/00group-layout/dees-stepper/styles.js +23 -2
  16. package/dist_ts_web/elements/00group-overlay/dees-popover/dees-popover.d.ts +9 -2
  17. package/dist_ts_web/elements/00group-overlay/dees-popover/dees-popover.js +18 -4
  18. package/dist_ts_web/elements/00group-overlay/dees-speechbubble/dees-speechbubble.demo.js +4 -3
  19. package/package.json +1 -1
  20. package/readme.md +25 -14
  21. package/ts_web/00_commitinfo_data.ts +1 -1
  22. package/ts_web/elements/00formgate.ts +24 -5
  23. package/ts_web/elements/00group-form/dees-form/dees-form.ts +2 -2
  24. package/ts_web/elements/00group-layout/dees-stepper/dees-stepper.demo.ts +27 -8
  25. package/ts_web/elements/00group-layout/dees-stepper/dees-stepper.ts +55 -28
  26. package/ts_web/elements/00group-layout/dees-stepper/styles.ts +22 -1
  27. package/ts_web/elements/00group-overlay/dees-popover/dees-popover.ts +17 -3
  28. package/ts_web/elements/00group-overlay/dees-speechbubble/dees-speechbubble.demo.ts +3 -2
  29. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-5UGXWLMH.js.map → chunk-5SHHYXWB.js.map} +0 -0
  30. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-4QORKLGX.js.map → dees-modal-AH4CADKZ.js.map} +0 -0
  31. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-7SYZG2AB.js.map → dees-workspace-terminal-PIUCRANN.js.map} +0 -0
@@ -24,7 +24,7 @@ import {
24
24
  terminalFontFamily,
25
25
  terminalTheme,
26
26
  themeDefaultStyles
27
- } from "./chunk-ZCZ72OW4.js";
27
+ } from "./chunk-UTEXL6ME.js";
28
28
  import {
29
29
  dcMessages,
30
30
  dist_ts_exports2 as dist_ts_exports
@@ -5998,4 +5998,4 @@ export {
5998
5998
  WebContainerEnvironment,
5999
5999
  DeesWorkspaceTerminal
6000
6000
  };
6001
- //# sourceMappingURL=chunk-5UGXWLMH.js.map
6001
+ //# sourceMappingURL=chunk-5SHHYXWB.js.map
@@ -59812,6 +59812,9 @@ var ScrollEdgeShadowController = class {
59812
59812
  // ts_web/elements/00formgate.ts
59813
59813
  var formConnectEvent = "form-connect";
59814
59814
  var holders = /* @__PURE__ */ new WeakMap();
59815
+ var announceForm = /* @__PURE__ */ __name((form) => {
59816
+ form.dispatchEvent(new CustomEvent(formConnectEvent, { bubbles: true, composed: true, detail: { form } }));
59817
+ }, "announceForm");
59815
59818
  var drawnParent = /* @__PURE__ */ __name((node) => (node instanceof Element ? node.assignedSlot : null) ?? (node instanceof ShadowRoot ? node.host : node.parentNode), "drawnParent");
59816
59819
  var drawnAncestry = /* @__PURE__ */ __name((node) => {
59817
59820
  const ancestry = [];
@@ -59828,11 +59831,15 @@ var byDrawnOrder = /* @__PURE__ */ __name((a4, b4) => {
59828
59831
  return branchA.compareDocumentPosition(branchB) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
59829
59832
  }, "byDrawnOrder");
59830
59833
  var FormGate = class {
59831
- constructor(host) {
59834
+ /** `onClaim` is told of each form the gate claims, once the form is its own. */
59835
+ constructor(host, onClaim) {
59832
59836
  this.host = host;
59837
+ this.onClaim = onClaim;
59833
59838
  host.addEventListener(formConnectEvent, this.claim);
59839
+ for (const form of host.querySelectorAll("dees-form:defined")) if (form.isConnected) announceForm(form);
59834
59840
  }
59835
59841
  host;
59842
+ onClaim;
59836
59843
  static {
59837
59844
  __name(this, "FormGate");
59838
59845
  }
@@ -59842,10 +59849,16 @@ var FormGate = class {
59842
59849
  * field that refuses reports why and takes the focus, and the answer is `false`. For a footer's
59843
59850
  * `beforePrimary`.
59844
59851
  */
59845
- accept = /* @__PURE__ */ __name(() => {
59852
+ accept = /* @__PURE__ */ __name(() => this.held().every((form) => form.reportValidity()), "accept");
59853
+ /** The forms the gate holds, in the order they are drawn. */
59854
+ held() {
59846
59855
  this.release();
59847
- return [...this.forms].sort(byDrawnOrder).every((form) => form.reportValidity());
59848
- }, "accept");
59856
+ return [...this.forms].sort(byDrawnOrder);
59857
+ }
59858
+ /** Whether this form is one the gate holds: Enter in it is the host's to answer (`form-submit-request`). */
59859
+ holds(target) {
59860
+ return this.held().includes(target);
59861
+ }
59849
59862
  claim = /* @__PURE__ */ __name((eventArg) => {
59850
59863
  const { form } = eventArg.detail;
59851
59864
  eventArg.stopPropagation();
@@ -59853,6 +59866,7 @@ var FormGate = class {
59853
59866
  holders.set(form, this);
59854
59867
  this.forms.add(form);
59855
59868
  this.release();
59869
+ this.onClaim?.(form);
59856
59870
  }, "claim");
59857
59871
  /** Lets go of the forms no longer inside the host. */
59858
59872
  release() {
@@ -59957,7 +59971,7 @@ var _DeesPopover = class _DeesPopover extends (_a7 = DeesElement, _anchor_dec =
59957
59971
  }
59958
59972
  render() {
59959
59973
  return b3`
59960
- <div class="surface"><div class="content ${this.scrollEdges.fadeClasses()}"><slot></slot></div>${this.actions.length ? b3`<dees-actionfooter class="actions" .actions=${this.actions} .context=${this}
59974
+ <div class="surface" @form-submit-request=${this.handleFormSubmitRequest}><div class="content ${this.scrollEdges.fadeClasses()}"><slot></slot></div>${this.actions.length ? b3`<dees-actionfooter class="actions" .actions=${this.actions} .context=${this}
59961
59975
  .beforePrimary=${this.formGate.accept} source="popover-action"></dees-actionfooter>` : ""}</div>
59962
59976
  ${this.showTail ? b3`<span class="tail ${this.tailOnActions ? "onActions" : ""}" aria-hidden="true"></span>` : ""}
59963
59977
  <div class="overlayLayer"></div>
@@ -59978,6 +59992,19 @@ var _DeesPopover = class _DeesPopover extends (_a7 = DeesElement, _anchor_dec =
59978
59992
  close() {
59979
59993
  this.requestClose("explicit", true);
59980
59994
  }
59995
+ /**
59996
+ * Enter in the last field of a form in the bubble. A form the bubble holds runs the bubble's
59997
+ * primary, as a click on it would, and waits for the bubble's forms as the click does. The request
59998
+ * never leaves the bubble, so a dialog around it does not take it for its own; a form without a
59999
+ * primary to run (a bubble without actions, a form a host inside the bubble holds) submits itself.
60000
+ */
60001
+ handleFormSubmitRequest(eventArg) {
60002
+ eventArg.stopPropagation();
60003
+ const footer2 = this.shadowRoot?.querySelector("dees-actionfooter");
60004
+ if (!footer2?.primaryAction || !this.formGate.holds(eventArg.composedPath()[0])) return;
60005
+ eventArg.preventDefault();
60006
+ void footer2.runPrimary();
60007
+ }
59981
60008
  /** Focus an explicitly autofocused or first interactive slotted element. */
59982
60009
  async focusFirst() {
59983
60010
  await this.updateComplete;
@@ -60634,7 +60661,7 @@ popover.open = true; // placement 'auto': below or above, wherever it fits`)}
60634
60661
  ${placed("End", "end")}
60635
60662
  </div>
60636
60663
  `)}
60637
- ${demoSection("A form in the bubble", "The primary action waits for the bubble's form, as a dialog's does: a field that refuses its value says why and takes the focus. Clear never waits.", b3`
60664
+ ${demoSection("A form in the bubble", "The primary action waits for the bubble's form, as a dialog's does: a field that refuses its value says why and takes the focus. Enter in the last field runs the primary, as a click on it does. Clear never waits.", b3`
60638
60665
  <div class="dees-demo-row">
60639
60666
  <span>
60640
60667
  <dees-button type="outline" text="Note on booking" @clicked=${toggle}></dees-button>
@@ -60642,10 +60669,11 @@ popover.open = true; // placement 'auto': below or above, wherever it fits`)}
60642
60669
  <dees-form style="padding: var(--dees-spacing-lg)">
60643
60670
  <dees-input-textarea key="note" label="Note" .rows=${3} .maxLength=${80}
60644
60671
  .value=${"Paid by the customer in two parts: the deposit in March and the rest after delivery in April."}></dees-input-textarea>
60672
+ <dees-input-text key="reference" label="Reference" placeholder="INV-2026-0142"></dees-input-text>
60645
60673
  </dees-form>
60646
60674
  </dees-popover>
60647
60675
  </span>
60648
- </div>${demoOutput("Save the note: the bubble holds it until it fits in 80 characters.")}
60676
+ </div>${demoOutput("Save the note, or press Enter in Reference: the bubble holds it until it fits in 80 characters.")}
60649
60677
  ${demoCode(`popover.actions = [clear, { name: 'Save note', action: save }];
60650
60678
  // the primary waits until the form's fields accept their values
60651
60679
  popover.innerHTML = '<dees-form><dees-input-textarea key="note" maxlength="80"></dees-input-textarea></dees-form>';`)}
@@ -64171,7 +64199,8 @@ export {
64171
64199
  visibleRect,
64172
64200
  scrollAncestors,
64173
64201
  listenForScrollAround,
64174
- formConnectEvent,
64202
+ announceForm,
64203
+ FormGate,
64175
64204
  DeesSpinner,
64176
64205
  actionControlStyles,
64177
64206
  barActionStyles,
@@ -65985,4 +66014,4 @@ lucide/dist/esm/lucide.js:
65985
66014
  * See the LICENSE file in the root directory of this source tree.
65986
66015
  *)
65987
66016
  */
65988
- //# sourceMappingURL=chunk-ZCZ72OW4.js.map
66017
+ //# sourceMappingURL=chunk-UTEXL6ME.js.map