@design.estate/dees-catalog 3.70.0 → 3.71.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.
@@ -145391,9 +145391,7 @@ __publicField(_DeesModal, "styles", [
145391
145391
  }
145392
145392
 
145393
145393
  .heading .header-button dees-icon {
145394
- width: 14px;
145395
- height: 14px;
145396
- display: block;
145394
+ font-size: 14px;
145397
145395
  }
145398
145396
 
145399
145397
  .content {
@@ -170805,7 +170803,7 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
170805
170803
  const key2 = String(col.key);
170806
170804
  if (col.filterable === false) return b2`<th></th>`;
170807
170805
  return b2`<th>
170808
- <input type="text" placeholder="Filter..." .value=${this.columnFilters[key2] || ""}
170806
+ <input type="text" placeholder="Filter..." data-col-key=${key2} .value=${this.columnFilters[key2] || ""}
170809
170807
  @input=${(e11) => this.setColumnFilter(key2, e11.target.value)} />
170810
170808
  </th>`;
170811
170809
  })}
@@ -170927,6 +170925,79 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
170927
170925
  const fh = this.__floatingHeaderEl;
170928
170926
  if (fh) fh.classList.remove("active");
170929
170927
  }
170928
+ /**
170929
+ * If a filter `<input>` inside the floating-header clone currently has
170930
+ * focus, copy its value, caret, and selection range onto the matching
170931
+ * input in the real header, then focus that real input. This lets the
170932
+ * user keep typing uninterrupted when filter input causes the table to
170933
+ * shrink below the viewport stick line and the floating header has to
170934
+ * unmount.
170935
+ *
170936
+ * Safe to call at any time — it is a no-op unless an input inside the
170937
+ * floating header is focused and has a `data-col-key` attribute that
170938
+ * matches a real-header input.
170939
+ */
170940
+ __transferFocusToRealHeader() {
170941
+ const fh = this.__floatingHeaderEl;
170942
+ if (!fh) return;
170943
+ const active = this.shadowRoot?.activeElement;
170944
+ if (!active || !fh.contains(active)) return;
170945
+ const colKey = active.getAttribute("data-col-key");
170946
+ if (!colKey) return;
170947
+ const fromInput = active;
170948
+ const real = this.shadowRoot?.querySelector(
170949
+ `.tableScroll > table > thead input[data-col-key="${CSS.escape(colKey)}"]`
170950
+ );
170951
+ if (!real || real === fromInput) return;
170952
+ const selStart = fromInput.selectionStart;
170953
+ const selEnd = fromInput.selectionEnd;
170954
+ const selDir = fromInput.selectionDirection;
170955
+ real.focus({ preventScroll: true });
170956
+ try {
170957
+ if (selStart != null && selEnd != null) {
170958
+ real.setSelectionRange(selStart, selEnd, selDir || void 0);
170959
+ }
170960
+ } catch {
170961
+ }
170962
+ }
170963
+ /**
170964
+ * Symmetric counterpart to `__transferFocusToRealHeader`. When the
170965
+ * floating header has just activated and a real-header filter input
170966
+ * was focused (and is now scrolled off-screen behind the floating
170967
+ * clone), move focus to the clone's matching input so the user keeps
170968
+ * typing in the visible one.
170969
+ *
170970
+ * Called from `__syncFloatingHeader` inside the post-activation
170971
+ * `updateComplete` callback — by then the clone subtree exists in the
170972
+ * DOM and can receive focus.
170973
+ */
170974
+ __transferFocusToFloatingHeader() {
170975
+ const fh = this.__floatingHeaderEl;
170976
+ if (!fh || !this.__floatingActive) return;
170977
+ const active = this.shadowRoot?.activeElement;
170978
+ if (!active) return;
170979
+ const realThead = this.shadowRoot?.querySelector(
170980
+ ".tableScroll > table > thead"
170981
+ );
170982
+ if (!realThead || !realThead.contains(active)) return;
170983
+ const colKey = active.getAttribute("data-col-key");
170984
+ if (!colKey) return;
170985
+ const fromInput = active;
170986
+ const clone = fh.querySelector(
170987
+ `input[data-col-key="${CSS.escape(colKey)}"]`
170988
+ );
170989
+ if (!clone || clone === fromInput) return;
170990
+ const selStart = fromInput.selectionStart;
170991
+ const selEnd = fromInput.selectionEnd;
170992
+ const selDir = fromInput.selectionDirection;
170993
+ clone.focus({ preventScroll: true });
170994
+ try {
170995
+ if (selStart != null && selEnd != null) {
170996
+ clone.setSelectionRange(selStart, selEnd, selDir || void 0);
170997
+ }
170998
+ } catch {
170999
+ }
171000
+ }
170930
171001
  // ─── Virtualization ─────────────────────────────────────────────────
170931
171002
  /**
170932
171003
  * Computes the visible row range based on the table's position in its
@@ -171014,6 +171085,9 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
171014
171085
  const distance = tableRect.bottom - stick.top;
171015
171086
  const shouldBeActive = tableRect.top < stick.top && distance > 0;
171016
171087
  if (shouldBeActive !== this.__floatingActive) {
171088
+ if (!shouldBeActive) {
171089
+ this.__transferFocusToRealHeader();
171090
+ }
171017
171091
  this.__floatingActive = shouldBeActive;
171018
171092
  fh.classList.toggle("active", shouldBeActive);
171019
171093
  if (!shouldBeActive) {
@@ -171022,7 +171096,10 @@ var _DeesTable = class _DeesTable extends (_a42 = DeesElement, _heading1_dec = [
171022
171096
  if (ft) ft.style.transform = "";
171023
171097
  }
171024
171098
  if (shouldBeActive) {
171025
- this.updateComplete.then(() => this.__syncFloatingHeader());
171099
+ this.updateComplete.then(() => {
171100
+ this.__syncFloatingHeader();
171101
+ this.__transferFocusToFloatingHeader();
171102
+ });
171026
171103
  return;
171027
171104
  }
171028
171105
  }
@@ -192281,175 +192358,223 @@ var DeesPagination = _DeesPagination;
192281
192358
 
192282
192359
  // ts_web/elements/00group-layout/dees-stepper/dees-stepper.demo.ts
192283
192360
  init_dist_ts30();
192284
- var stepperDemo = /* @__PURE__ */ __name(() => b2`
192285
- <dees-stepper
192286
- .steps=${[
192361
+ var demoSteps = [
192287
192362
  {
192288
192363
  title: "Account Setup",
192289
192364
  content: b2`
192290
- <dees-form>
192291
- <dees-input-text key="email" label="Work Email" required></dees-input-text>
192292
- <dees-input-text key="password" label="Create Password" type="password" required></dees-input-text>
192293
- <dees-form-submit>Continue</dees-form-submit>
192294
- </dees-form>
192295
- `,
192296
- validationFunc: /* @__PURE__ */ __name(async (stepperArg, elementArg) => {
192297
- const deesForm = elementArg.querySelector("dees-form");
192298
- deesForm.addEventListener("formData", () => stepperArg.goNext(), { once: true });
192299
- }, "validationFunc")
192365
+ <dees-form>
192366
+ <dees-input-text key="email" label="Work Email" required></dees-input-text>
192367
+ <dees-input-text key="password" label="Create Password" type="password" required></dees-input-text>
192368
+ </dees-form>
192369
+ `,
192370
+ menuOptions: [
192371
+ { name: "Continue", action: /* @__PURE__ */ __name(async (stepper) => stepper.goNext(), "action") }
192372
+ ]
192300
192373
  },
192301
192374
  {
192302
192375
  title: "Profile Details",
192303
192376
  content: b2`
192304
- <dees-form>
192305
- <dees-input-text key="firstName" label="First Name" required></dees-input-text>
192306
- <dees-input-text key="lastName" label="Last Name" required></dees-input-text>
192307
- <dees-form-submit>Continue</dees-form-submit>
192308
- </dees-form>
192309
- `,
192310
- validationFunc: /* @__PURE__ */ __name(async (stepperArg, elementArg) => {
192311
- const deesForm = elementArg.querySelector("dees-form");
192312
- deesForm.addEventListener("formData", () => stepperArg.goNext(), { once: true });
192313
- }, "validationFunc")
192377
+ <dees-form>
192378
+ <dees-input-text key="firstName" label="First Name" required></dees-input-text>
192379
+ <dees-input-text key="lastName" label="Last Name" required></dees-input-text>
192380
+ </dees-form>
192381
+ `,
192382
+ menuOptions: [
192383
+ { name: "Continue", action: /* @__PURE__ */ __name(async (stepper) => stepper.goNext(), "action") }
192384
+ ]
192314
192385
  },
192315
192386
  {
192316
192387
  title: "Contact Information",
192317
192388
  content: b2`
192318
- <dees-form>
192319
- <dees-input-phone key="phone" label="Mobile Number" required></dees-input-phone>
192320
- <dees-input-text key="company" label="Company"></dees-input-text>
192321
- <dees-form-submit>Continue</dees-form-submit>
192322
- </dees-form>
192323
- `,
192324
- validationFunc: /* @__PURE__ */ __name(async (stepperArg, elementArg) => {
192325
- const deesForm = elementArg.querySelector("dees-form");
192326
- deesForm.addEventListener("formData", () => stepperArg.goNext(), { once: true });
192327
- }, "validationFunc")
192389
+ <dees-form>
192390
+ <dees-input-phone key="phone" label="Mobile Number" required></dees-input-phone>
192391
+ <dees-input-text key="company" label="Company"></dees-input-text>
192392
+ </dees-form>
192393
+ `,
192394
+ menuOptions: [
192395
+ { name: "Continue", action: /* @__PURE__ */ __name(async (stepper) => stepper.goNext(), "action") }
192396
+ ]
192328
192397
  },
192329
192398
  {
192330
192399
  title: "Team Size",
192331
192400
  content: b2`
192332
- <dees-form>
192333
- <dees-input-dropdown
192334
- key="teamSize"
192335
- label="How big is your team?"
192336
- .options=${[
192401
+ <dees-form>
192402
+ <dees-input-dropdown
192403
+ key="teamSize"
192404
+ label="How big is your team?"
192405
+ .options=${[
192337
192406
  { label: "1-5", value: "1-5" },
192338
192407
  { label: "6-20", value: "6-20" },
192339
192408
  { label: "21-50", value: "21-50" },
192340
192409
  { label: "51+", value: "51+" }
192341
192410
  ]}
192342
- required
192343
- ></dees-input-dropdown>
192344
- <dees-form-submit>Continue</dees-form-submit>
192345
- </dees-form>
192346
- `,
192347
- validationFunc: /* @__PURE__ */ __name(async (stepperArg, elementArg) => {
192348
- const deesForm = elementArg.querySelector("dees-form");
192349
- deesForm.addEventListener("formData", () => stepperArg.goNext(), { once: true });
192350
- }, "validationFunc")
192411
+ required
192412
+ ></dees-input-dropdown>
192413
+ </dees-form>
192414
+ `,
192415
+ menuOptions: [
192416
+ { name: "Continue", action: /* @__PURE__ */ __name(async (stepper) => stepper.goNext(), "action") }
192417
+ ]
192351
192418
  },
192352
192419
  {
192353
192420
  title: "Goals",
192354
192421
  content: b2`
192355
- <dees-form>
192356
- <dees-input-multitoggle
192357
- key="goal"
192358
- label="Main objective"
192359
- .options=${[
192422
+ <dees-form>
192423
+ <dees-input-multitoggle
192424
+ key="goal"
192425
+ label="Main objective"
192426
+ .options=${[
192360
192427
  { label: "Onboarding", value: "onboarding" },
192361
192428
  { label: "Analytics", value: "analytics" },
192362
192429
  { label: "Automation", value: "automation" }
192363
192430
  ]}
192364
- required
192365
- ></dees-input-multitoggle>
192366
- <dees-form-submit>Continue</dees-form-submit>
192367
- </dees-form>
192368
- `,
192369
- validationFunc: /* @__PURE__ */ __name(async (stepperArg, elementArg) => {
192370
- const deesForm = elementArg.querySelector("dees-form");
192371
- deesForm.addEventListener("formData", () => stepperArg.goNext(), { once: true });
192372
- }, "validationFunc")
192431
+ required
192432
+ ></dees-input-multitoggle>
192433
+ </dees-form>
192434
+ `,
192435
+ menuOptions: [
192436
+ { name: "Continue", action: /* @__PURE__ */ __name(async (stepper) => stepper.goNext(), "action") }
192437
+ ]
192373
192438
  },
192374
192439
  {
192375
192440
  title: "Brand Preferences",
192376
192441
  content: b2`
192377
- <dees-form>
192378
- <dees-input-text key="brandColor" label="Primary brand color"></dees-input-text>
192379
- <dees-input-text key="tone" label="Preferred tone (e.g. friendly, formal)"></dees-input-text>
192380
- <dees-form-submit>Continue</dees-form-submit>
192381
- </dees-form>
192382
- `,
192383
- validationFunc: /* @__PURE__ */ __name(async (stepperArg, elementArg) => {
192384
- const deesForm = elementArg.querySelector("dees-form");
192385
- deesForm.addEventListener("formData", () => stepperArg.goNext(), { once: true });
192386
- }, "validationFunc")
192442
+ <dees-form>
192443
+ <dees-input-text key="brandColor" label="Primary brand color"></dees-input-text>
192444
+ <dees-input-text key="tone" label="Preferred tone (e.g. friendly, formal)"></dees-input-text>
192445
+ </dees-form>
192446
+ `,
192447
+ menuOptions: [
192448
+ { name: "Continue", action: /* @__PURE__ */ __name(async (stepper) => stepper.goNext(), "action") }
192449
+ ]
192387
192450
  },
192388
192451
  {
192389
192452
  title: "Integrations",
192390
192453
  content: b2`
192391
- <dees-form>
192392
- <dees-input-list
192393
- key="integrations"
192394
- label="Integrations in use"
192395
- placeholder="Add integration"
192396
- ></dees-input-list>
192397
- <dees-form-submit>Continue</dees-form-submit>
192398
- </dees-form>
192399
- `,
192400
- validationFunc: /* @__PURE__ */ __name(async (stepperArg, elementArg) => {
192401
- const deesForm = elementArg.querySelector("dees-form");
192402
- deesForm.addEventListener("formData", () => stepperArg.goNext(), { once: true });
192403
- }, "validationFunc")
192454
+ <dees-form>
192455
+ <dees-input-list
192456
+ key="integrations"
192457
+ label="Integrations in use"
192458
+ placeholder="Add integration"
192459
+ ></dees-input-list>
192460
+ </dees-form>
192461
+ `,
192462
+ menuOptions: [
192463
+ { name: "Continue", action: /* @__PURE__ */ __name(async (stepper) => stepper.goNext(), "action") }
192464
+ ]
192404
192465
  },
192405
192466
  {
192406
192467
  title: "Review & Launch",
192407
192468
  content: b2`
192408
- <dees-panel>
192409
- <p>Almost there! Review your selections and launch whenever you're ready.</p>
192410
- </dees-panel>
192411
- `
192469
+ <dees-panel>
192470
+ <p>Almost there! Review your selections and launch whenever you're ready.</p>
192471
+ </dees-panel>
192472
+ `,
192473
+ menuOptions: [
192474
+ { name: "Launch", action: /* @__PURE__ */ __name(async (stepper) => stepper.goNext(), "action") }
192475
+ ]
192412
192476
  }
192413
- ]}
192414
- ></dees-stepper>
192477
+ ];
192478
+ var cloneSteps = /* @__PURE__ */ __name(() => demoSteps.map((step) => ({ ...step })), "cloneSteps");
192479
+ var stepperDemo = /* @__PURE__ */ __name(() => b2`
192480
+ <div style="position: absolute; inset: 0;">
192481
+ <div
192482
+ style="position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 10;"
192483
+ >
192484
+ <dees-button
192485
+ @click=${async () => {
192486
+ await DeesStepper.createAndShow({ steps: cloneSteps() });
192487
+ }}
192488
+ >Open stepper as overlay</dees-button>
192489
+ </div>
192490
+ <dees-stepper .steps=${cloneSteps()}></dees-stepper>
192491
+ </div>
192415
192492
  `, "stepperDemo");
192416
192493
 
192417
192494
  // ts_web/elements/00group-layout/dees-stepper/dees-stepper.ts
192418
192495
  init_dist_ts30();
192419
192496
  init_dist_ts29();
192420
192497
  init_theme();
192421
- var _selectedStep_dec, _steps_dec, _a81, _DeesStepper_decorators, _init82, _steps, _selectedStep;
192498
+ var _activeFormValid_dec, _activeForm_dec, _stepperZIndex_dec, _overlay_dec, _selectedStep_dec, _steps_dec, _a81, _DeesStepper_decorators, _init82, _steps, _selectedStep, _overlay, _stepperZIndex, _activeForm, _activeFormValid;
192422
192499
  _DeesStepper_decorators = [customElement("dees-stepper")];
192423
192500
  var _DeesStepper = class _DeesStepper extends (_a81 = DeesElement, _steps_dec = [n5({
192424
192501
  type: Array
192425
192502
  })], _selectedStep_dec = [n5({
192426
192503
  type: Object
192427
- })], _a81) {
192504
+ })], _overlay_dec = [n5({
192505
+ type: Boolean,
192506
+ reflect: true
192507
+ })], _stepperZIndex_dec = [n5({ type: Number, attribute: false })], _activeForm_dec = [n5({ type: Object, attribute: false })], _activeFormValid_dec = [n5({ type: Boolean, attribute: false })], _a81) {
192428
192508
  constructor() {
192429
192509
  super();
192430
192510
  __privateAdd(this, _steps, __runInitializers(_init82, 8, this, [])), __runInitializers(_init82, 11, this);
192431
192511
  __privateAdd(this, _selectedStep, __runInitializers(_init82, 12, this)), __runInitializers(_init82, 15, this);
192512
+ __privateAdd(this, _overlay, __runInitializers(_init82, 16, this, false)), __runInitializers(_init82, 19, this);
192513
+ __privateAdd(this, _stepperZIndex, __runInitializers(_init82, 20, this, 1e3)), __runInitializers(_init82, 23, this);
192514
+ __privateAdd(this, _activeForm, __runInitializers(_init82, 24, this, null)), __runInitializers(_init82, 27, this);
192515
+ __privateAdd(this, _activeFormValid, __runInitializers(_init82, 28, this, true)), __runInitializers(_init82, 31, this);
192516
+ __publicField(this, "activeFormSubscription");
192517
+ __publicField(this, "windowLayer");
192432
192518
  __publicField(this, "getIndexOfStep", /* @__PURE__ */ __name((stepArg) => {
192433
192519
  return this.steps.findIndex((stepArg2) => stepArg === stepArg2);
192434
192520
  }, "getIndexOfStep"));
192435
192521
  __publicField(this, "scroller");
192436
192522
  }
192523
+ static async createAndShow(optionsArg) {
192524
+ const body3 = document.body;
192525
+ const stepper = new _DeesStepper();
192526
+ stepper.steps = optionsArg.steps;
192527
+ stepper.overlay = true;
192528
+ stepper.windowLayer = await DeesWindowLayer.createAndShow({ blur: true });
192529
+ stepper.windowLayer.addEventListener("click", async () => {
192530
+ await stepper.destroy();
192531
+ });
192532
+ body3.append(stepper.windowLayer);
192533
+ body3.append(stepper);
192534
+ stepper.stepperZIndex = zIndexRegistry.getNextZIndex();
192535
+ zIndexRegistry.register(stepper, stepper.stepperZIndex);
192536
+ return stepper;
192537
+ }
192437
192538
  render() {
192438
192539
  return b2`
192439
- <div class="stepperContainer">
192440
- ${this.steps.map(
192441
- (stepArg) => b2`<div
192442
- class="step ${stepArg === this.selectedStep ? "selected" : null} ${this.getIndexOfStep(stepArg) > this.getIndexOfStep(this.selectedStep) ? "hiddenStep" : ""} ${this.getIndexOfStep(stepArg) === 0 ? "entrance" : ""}"
192443
- >
192444
- ${this.getIndexOfStep(stepArg) > 0 ? b2`<div class="goBack" @click=${this.goBack}><span style="font-family: Inter"><-</span> go to previous step</div>` : ``}
192540
+ <div
192541
+ class="stepperContainer ${this.overlay ? "overlay" : ""}"
192542
+ style=${this.overlay ? `z-index: ${this.stepperZIndex};` : ""}
192543
+ >
192544
+ ${this.steps.map((stepArg, stepIndex) => {
192545
+ const isSelected = stepArg === this.selectedStep;
192546
+ const isHidden = this.getIndexOfStep(stepArg) > this.getIndexOfStep(this.selectedStep);
192547
+ const isFirst = stepIndex === 0;
192548
+ return b2`<dees-tile
192549
+ class="step ${isSelected ? "selected" : ""} ${isHidden ? "hiddenStep" : ""} ${isFirst ? "entrance" : ""}"
192550
+ >
192551
+ <div slot="header" class="step-header">
192552
+ ${!isFirst ? b2`<div class="goBack" @click=${this.goBack}>
192553
+ <span style="font-family: Inter"><-</span> go to previous step
192554
+ </div>` : b2`<div class="goBack-spacer"></div>`}
192445
192555
  <div class="stepCounter">
192446
- Step ${this.steps.findIndex((elementArg) => elementArg === stepArg) + 1} of
192447
- ${this.steps.length}
192556
+ Step ${stepIndex + 1} of ${this.steps.length}
192448
192557
  </div>
192558
+ </div>
192559
+ <div class="step-body">
192449
192560
  <div class="title">${stepArg.title}</div>
192450
192561
  <div class="content">${stepArg.content}</div>
192451
- </div> `
192452
- )}
192562
+ </div>
192563
+ ${stepArg.menuOptions && stepArg.menuOptions.length > 0 ? b2`<div slot="footer" class="bottomButtons">
192564
+ ${isSelected && this.activeForm !== null && !this.activeFormValid ? b2`<div class="stepHint">Complete form to continue</div>` : ""}
192565
+ ${stepArg.menuOptions.map((actionArg, actionIndex) => {
192566
+ const isPrimary = actionIndex === stepArg.menuOptions.length - 1;
192567
+ const isDisabled = isPrimary && this.activeForm !== null && !this.activeFormValid;
192568
+ return b2`
192569
+ <div
192570
+ class="bottomButton ${isPrimary ? "primary" : ""} ${isDisabled ? "disabled" : ""}"
192571
+ @click=${() => this.handleMenuOptionClick(actionArg, isPrimary)}
192572
+ >${actionArg.name}</div>
192573
+ `;
192574
+ })}
192575
+ </div>` : ""}
192576
+ </dees-tile>`;
192577
+ })}
192453
192578
  </div>
192454
192579
  `;
192455
192580
  }
@@ -192471,6 +192596,7 @@ var _DeesStepper = class _DeesStepper extends (_a81 = DeesElement, _steps_dec =
192471
192596
  if (!selectedStepElement) {
192472
192597
  return;
192473
192598
  }
192599
+ this.scanActiveForm(selectedStepElement);
192474
192600
  if (!stepperContainer.style.paddingTop) {
192475
192601
  stepperContainer.style.paddingTop = `${stepperContainer.offsetHeight / 2 - selectedStepElement.offsetHeight / 2}px`;
192476
192602
  }
@@ -192528,14 +192654,99 @@ var _DeesStepper = class _DeesStepper extends (_a81 = DeesElement, _steps_dec =
192528
192654
  nextStep.validationFuncCalled = false;
192529
192655
  this.selectedStep = nextStep;
192530
192656
  }
192657
+ /**
192658
+ * Scans the currently selected step for a <dees-form> in its content. When
192659
+ * found, subscribes to the form's RxJS changeSubject so the primary
192660
+ * menuOption button can auto-enable/disable as required fields are filled.
192661
+ *
192662
+ * If the form reference is the same as the previous activation (e.g. on a
192663
+ * same-step re-render), we just recompute validity without re-subscribing.
192664
+ */
192665
+ scanActiveForm(selectedStepElement) {
192666
+ const form = selectedStepElement.querySelector("dees-form");
192667
+ if (form === this.activeForm) {
192668
+ this.recomputeFormValid();
192669
+ return;
192670
+ }
192671
+ this.activeFormSubscription?.unsubscribe();
192672
+ this.activeFormSubscription = void 0;
192673
+ this.activeForm = form;
192674
+ if (!form) {
192675
+ this.activeFormValid = true;
192676
+ return;
192677
+ }
192678
+ this.recomputeFormValid();
192679
+ this.activeFormSubscription = form.changeSubject.subscribe(() => {
192680
+ this.recomputeFormValid();
192681
+ });
192682
+ }
192683
+ /**
192684
+ * Recomputes activeFormValid by checking every required field in the active
192685
+ * form for a non-empty value. Mirrors dees-form.updateRequiredStatus's logic
192686
+ * but stores the result on the stepper instead of mutating a submit button.
192687
+ */
192688
+ recomputeFormValid() {
192689
+ const form = this.activeForm;
192690
+ if (!form) {
192691
+ this.activeFormValid = true;
192692
+ return;
192693
+ }
192694
+ const fields = form.getFormElements();
192695
+ this.activeFormValid = fields.every(
192696
+ (field) => !field.required || field.value !== null && field.value !== void 0 && field.value !== ""
192697
+ );
192698
+ }
192699
+ /**
192700
+ * Click handler for menuOption buttons in the footer. For the primary (last)
192701
+ * button, if an active form is present, gates on required-field validity and
192702
+ * triggers the form's gatherAndDispatch() before running the action. The
192703
+ * action is awaited so any async work (e.g. goNext → scroll animation)
192704
+ * completes before the click handler returns.
192705
+ */
192706
+ async handleMenuOptionClick(optionArg, isPrimary) {
192707
+ const form = this.activeForm;
192708
+ if (isPrimary && form) {
192709
+ if (!this.activeFormValid) return;
192710
+ await new Promise((resolve2) => {
192711
+ form.addEventListener("formData", () => resolve2(), { once: true });
192712
+ form.gatherAndDispatch();
192713
+ });
192714
+ }
192715
+ await optionArg.action(this);
192716
+ }
192717
+ async destroy() {
192718
+ const domtools19 = await this.domtoolsPromise;
192719
+ const container = this.shadowRoot.querySelector(".stepperContainer");
192720
+ container?.classList.add("predestroy");
192721
+ await domtools19.convenience.smartdelay.delayFor(200);
192722
+ if (this.parentElement) {
192723
+ this.parentElement.removeChild(this);
192724
+ }
192725
+ if (this.windowLayer) {
192726
+ await this.windowLayer.destroy();
192727
+ }
192728
+ this.activeFormSubscription?.unsubscribe();
192729
+ this.activeFormSubscription = void 0;
192730
+ this.activeForm = null;
192731
+ zIndexRegistry.unregister(this);
192732
+ }
192531
192733
  };
192532
192734
  _init82 = __decoratorStart(_a81);
192533
192735
  _steps = new WeakMap();
192534
192736
  _selectedStep = new WeakMap();
192737
+ _overlay = new WeakMap();
192738
+ _stepperZIndex = new WeakMap();
192739
+ _activeForm = new WeakMap();
192740
+ _activeFormValid = new WeakMap();
192535
192741
  __decorateElement(_init82, 4, "steps", _steps_dec, _DeesStepper, _steps);
192536
192742
  __decorateElement(_init82, 4, "selectedStep", _selectedStep_dec, _DeesStepper, _selectedStep);
192743
+ __decorateElement(_init82, 4, "overlay", _overlay_dec, _DeesStepper, _overlay);
192744
+ __decorateElement(_init82, 4, "stepperZIndex", _stepperZIndex_dec, _DeesStepper, _stepperZIndex);
192745
+ __decorateElement(_init82, 4, "activeForm", _activeForm_dec, _DeesStepper, _activeForm);
192746
+ __decorateElement(_init82, 4, "activeFormValid", _activeFormValid_dec, _DeesStepper, _activeFormValid);
192537
192747
  _DeesStepper = __decorateElement(_init82, 0, "DeesStepper", _DeesStepper_decorators, _DeesStepper);
192538
192748
  __name(_DeesStepper, "DeesStepper");
192749
+ // STATIC
192539
192750
  __publicField(_DeesStepper, "demo", stepperDemo);
192540
192751
  __publicField(_DeesStepper, "demoGroups", ["Layout", "Form"]);
192541
192752
  __publicField(_DeesStepper, "styles", [
@@ -192547,7 +192758,24 @@ __publicField(_DeesStepper, "styles", [
192547
192758
  position: absolute;
192548
192759
  width: 100%;
192549
192760
  height: 100%;
192761
+ font-family: ${cssGeistFontFamily};
192762
+ color: var(--dees-color-text-primary);
192763
+ }
192764
+
192765
+ /*
192766
+ * In overlay mode the host is "transparent" to layout — the inner
192767
+ * .stepperContainer.overlay is what pins to the viewport and carries the
192768
+ * z-index. Keeping :host unpositioned avoids nesting the stacking context
192769
+ * under an auto-z-index parent (which was trapping .stepperContainer
192770
+ * below DeesWindowLayer's sibling layers). This mirrors how dees-modal
192771
+ * keeps its own :host unpositioned and lets .modalContainer drive layout.
192772
+ */
192773
+ :host([overlay]) {
192774
+ position: static;
192775
+ width: 0;
192776
+ height: 0;
192550
192777
  }
192778
+
192551
192779
  .stepperContainer {
192552
192780
  position: absolute;
192553
192781
  width: 100%;
@@ -192555,101 +192783,120 @@ __publicField(_DeesStepper, "styles", [
192555
192783
  overflow: hidden;
192556
192784
  }
192557
192785
 
192558
- .step {
192786
+ .stepperContainer.overlay {
192787
+ position: fixed;
192788
+ top: 0;
192789
+ left: 0;
192790
+ width: 100vw;
192791
+ height: 100vh;
192792
+ }
192793
+
192794
+ .stepperContainer.predestroy {
192795
+ opacity: 0;
192796
+ transition: opacity 0.2s ease-in;
192797
+ }
192798
+
192799
+ dees-tile.step {
192559
192800
  position: relative;
192560
192801
  pointer-events: none;
192561
- overflow: hidden;
192562
- transition: transform 0.7s cubic-bezier(0.87, 0, 0.13, 1), box-shadow 0.7s cubic-bezier(0.87, 0, 0.13, 1), filter 0.7s cubic-bezier(0.87, 0, 0.13, 1), border 0.7s cubic-bezier(0.87, 0, 0.13, 1);
192563
192802
  max-width: 500px;
192564
192803
  min-height: 300px;
192565
- border-radius: 12px;
192566
- background: ${cssManager.bdTheme("#ffffff", "#0f0f11")};
192567
- border: 1px solid ${cssManager.bdTheme("#e2e8f0", "#272729")};
192568
- color: ${cssManager.bdTheme("#0f172a", "#f5f5f5")};
192569
192804
  margin: auto;
192570
192805
  margin-bottom: 20px;
192571
192806
  filter: opacity(0.55) saturate(0.85);
192572
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
192807
+ transition: transform 0.7s cubic-bezier(0.87, 0, 0.13, 1), filter 0.7s cubic-bezier(0.87, 0, 0.13, 1);
192573
192808
  user-select: none;
192574
192809
  }
192575
192810
 
192576
- .step.selected {
192811
+ dees-tile.step.selected {
192577
192812
  pointer-events: all;
192578
192813
  filter: opacity(1) saturate(1);
192579
192814
  user-select: auto;
192580
192815
  }
192581
192816
 
192582
- .step.hiddenStep {
192817
+ dees-tile.step.hiddenStep {
192583
192818
  filter: opacity(0);
192584
192819
  }
192585
192820
 
192586
- .step.entrance {
192587
- transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease, border 0.35s ease;
192821
+ dees-tile.step.entrance {
192822
+ transition: transform 0.35s ease, filter 0.35s ease;
192588
192823
  }
192589
192824
 
192590
- .step.entrance.hiddenStep {
192825
+ dees-tile.step.entrance.hiddenStep {
192591
192826
  transform: translateY(16px);
192592
192827
  }
192593
192828
 
192594
- .step:last-child {
192829
+ dees-tile.step:last-child {
192595
192830
  margin-bottom: 100vh;
192596
192831
  }
192597
192832
 
192598
- .step .stepCounter {
192599
- color: ${cssManager.bdTheme("#64748b", "#a1a1aa")};
192600
- position: absolute;
192601
- top: 12px;
192602
- right: 12px;
192603
- padding: 6px 14px;
192604
- font-size: 12px;
192605
- border-radius: 999px;
192606
- background: ${cssManager.bdTheme("rgba(226, 232, 240, 0.5)", "rgba(63, 63, 70, 0.45)")};
192607
- border: 1px solid ${cssManager.bdTheme("rgba(226, 232, 240, 0.7)", "rgba(63, 63, 70, 0.6)")};
192833
+ .stepperContainer.overlay dees-tile.step::part(outer) {
192834
+ box-shadow:
192835
+ 0 0 0 1px ${cssManager.bdTheme("hsl(0 0% 0% / 0.03)", "hsl(0 0% 100% / 0.03)")},
192836
+ 0 8px 40px ${cssManager.bdTheme("hsl(0 0% 0% / 0.12)", "hsl(0 0% 0% / 0.5)")},
192837
+ 0 2px 8px ${cssManager.bdTheme("hsl(0 0% 0% / 0.06)", "hsl(0 0% 0% / 0.25)")};
192608
192838
  }
192609
192839
 
192610
- .step .goBack {
192611
- position: absolute;
192612
- top: 12px;
192613
- left: 12px;
192840
+ .step-header {
192841
+ height: 36px;
192842
+ display: flex;
192843
+ align-items: center;
192844
+ justify-content: space-between;
192845
+ padding: 0 8px 0 12px;
192846
+ gap: 12px;
192847
+ }
192848
+
192849
+ .goBack-spacer {
192850
+ width: 1px;
192851
+ }
192852
+
192853
+ .step-header .goBack {
192614
192854
  display: inline-flex;
192615
192855
  align-items: center;
192616
192856
  gap: 6px;
192617
- padding: 6px 12px;
192857
+ height: 24px;
192858
+ padding: 0 8px;
192618
192859
  font-size: 12px;
192619
192860
  font-weight: 500;
192620
- border-radius: 999px;
192621
- border: 1px solid ${cssManager.bdTheme("rgba(226, 232, 240, 0.9)", "rgba(63, 63, 70, 0.85)")};
192622
- background: ${cssManager.bdTheme("rgba(255, 255, 255, 0.9)", "rgba(39, 39, 42, 0.85)")};
192623
- color: ${cssManager.bdTheme("#475569", "#d4d4d8")};
192861
+ line-height: 1;
192862
+ border: none;
192863
+ background: transparent;
192864
+ color: var(--dees-color-text-muted);
192865
+ border-radius: 4px;
192624
192866
  cursor: pointer;
192625
- transition: border 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
192867
+ transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease;
192626
192868
  }
192627
192869
 
192628
- .step .goBack:hover {
192629
- color: ${cssManager.bdTheme("#0f172a", "#fafafa")};
192630
- border-color: ${cssManager.bdTheme(dark.blue, dark.blue)};
192631
- background: ${cssManager.bdTheme("rgba(226, 232, 240, 0.95)", "rgba(63, 63, 70, 0.7)")};
192870
+ .step-header .goBack:hover {
192871
+ background: var(--dees-color-hover);
192872
+ color: var(--dees-color-text-secondary);
192632
192873
  transform: translateX(-2px);
192633
192874
  }
192634
192875
 
192635
- .step .goBack:active {
192636
- color: ${cssManager.bdTheme("#0f172a", "#fafafa")};
192637
- border-color: ${cssManager.bdTheme(dark.blueActive, dark.blueActive)};
192638
- background: ${cssManager.bdTheme("rgba(226, 232, 240, 0.85)", "rgba(63, 63, 70, 0.6)")};
192876
+ .step-header .goBack:active {
192877
+ background: ${cssManager.bdTheme("hsl(0 0% 90%)", "hsl(0 0% 15%)")};
192639
192878
  }
192640
192879
 
192641
- .step .goBack span {
192880
+ .step-header .goBack span {
192642
192881
  transition: transform 0.2s ease;
192643
192882
  display: inline-block;
192644
192883
  }
192645
192884
 
192646
- .step .goBack:hover span {
192885
+ .step-header .goBack:hover span {
192647
192886
  transform: translateX(-2px);
192648
192887
  }
192649
192888
 
192650
- .step .title {
192889
+ .step-header .stepCounter {
192890
+ color: var(--dees-color-text-muted);
192891
+ font-size: 12px;
192892
+ font-weight: 500;
192893
+ letter-spacing: -0.01em;
192894
+ padding: 0 8px;
192895
+ }
192896
+
192897
+ .step-body .title {
192651
192898
  text-align: center;
192652
- padding-top: 64px;
192899
+ padding-top: 32px;
192653
192900
  font-family: 'Geist Sans', sans-serif;
192654
192901
  font-size: 24px;
192655
192902
  font-weight: 600;
@@ -192657,9 +192904,92 @@ __publicField(_DeesStepper, "styles", [
192657
192904
  color: inherit;
192658
192905
  }
192659
192906
 
192660
- .step .content {
192907
+ .step-body .content {
192661
192908
  padding: 32px;
192662
192909
  }
192910
+
192911
+ /* --- Footer: modal-style bottom buttons --- */
192912
+ .bottomButtons {
192913
+ display: flex;
192914
+ flex-direction: row;
192915
+ justify-content: flex-end;
192916
+ align-items: center;
192917
+ gap: 0;
192918
+ height: 36px;
192919
+ width: 100%;
192920
+ box-sizing: border-box;
192921
+ }
192922
+
192923
+ .bottomButtons .bottomButton {
192924
+ padding: 0 16px;
192925
+ height: 100%;
192926
+ text-align: center;
192927
+ font-size: 12px;
192928
+ font-weight: 500;
192929
+ cursor: pointer;
192930
+ user-select: none;
192931
+ transition: all 0.15s ease;
192932
+ background: transparent;
192933
+ border: none;
192934
+ border-left: 1px solid var(--dees-color-border-subtle);
192935
+ color: var(--dees-color-text-muted);
192936
+ white-space: nowrap;
192937
+ display: flex;
192938
+ align-items: center;
192939
+ }
192940
+
192941
+ .bottomButtons .bottomButton:first-child {
192942
+ border-left: none;
192943
+ }
192944
+
192945
+ .bottomButtons .bottomButton:hover {
192946
+ background: var(--dees-color-hover);
192947
+ color: var(--dees-color-text-primary);
192948
+ }
192949
+
192950
+ .bottomButtons .bottomButton:active {
192951
+ background: ${cssManager.bdTheme("hsl(0 0% 92%)", "hsl(0 0% 13%)")};
192952
+ }
192953
+
192954
+ .bottomButtons .bottomButton.primary {
192955
+ color: ${cssManager.bdTheme("hsl(217.2 91.2% 59.8%)", "hsl(213.1 93.9% 67.8%)")};
192956
+ font-weight: 600;
192957
+ }
192958
+
192959
+ .bottomButtons .bottomButton.primary:hover {
192960
+ background: ${cssManager.bdTheme("hsl(217.2 91.2% 59.8% / 0.08)", "hsl(213.1 93.9% 67.8% / 0.08)")};
192961
+ color: ${cssManager.bdTheme("hsl(217.2 91.2% 50%)", "hsl(213.1 93.9% 75%)")};
192962
+ }
192963
+
192964
+ .bottomButtons .bottomButton.primary:active {
192965
+ background: ${cssManager.bdTheme("hsl(217.2 91.2% 59.8% / 0.12)", "hsl(213.1 93.9% 67.8% / 0.12)")};
192966
+ }
192967
+
192968
+ .bottomButtons .bottomButton.disabled {
192969
+ pointer-events: none;
192970
+ opacity: 0.4;
192971
+ cursor: not-allowed;
192972
+ }
192973
+
192974
+ .bottomButtons .bottomButton.disabled:hover {
192975
+ background: transparent;
192976
+ color: var(--dees-color-text-muted);
192977
+ }
192978
+
192979
+ /* Hint shown on the left of the footer when the active step's form has
192980
+ unfilled required fields. Uses margin-right: auto to push right-aligned
192981
+ buttons to the right while keeping the hint flush-left. */
192982
+ .bottomButtons .stepHint {
192983
+ margin-right: auto;
192984
+ padding: 0 16px;
192985
+ font-size: 11px;
192986
+ line-height: 1;
192987
+ letter-spacing: -0.01em;
192988
+ color: var(--dees-color-text-muted);
192989
+ display: flex;
192990
+ align-items: center;
192991
+ user-select: none;
192992
+ }
192663
192993
  `
192664
192994
  ]);
192665
192995
  __runInitializers(_init82, 1, _DeesStepper);