@design.estate/dees-catalog 3.71.0 → 3.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.
- package/dist_bundle/bundle.js +189 -31
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-layout/dees-stepper/dees-stepper.d.ts +37 -0
- package/dist_ts_web/elements/00group-layout/dees-stepper/dees-stepper.js +120 -24
- package/dist_ts_web/elements/00group-layout/dees-tile/dees-tile.js +13 -3
- package/dist_ts_web/elements/00group-overlay/dees-modal/dees-modal.demo.js +76 -1
- package/dist_ts_web/elements/00group-overlay/dees-modal/dees-modal.js +1 -8
- package/dist_watch/bundle.js +187 -29
- package/dist_watch/bundle.js.map +3 -3
- package/package.json +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-layout/dees-stepper/dees-stepper.ts +114 -23
- package/ts_web/elements/00group-layout/dees-tile/dees-tile.ts +12 -2
- package/ts_web/elements/00group-overlay/dees-modal/dees-modal.demo.ts +75 -0
- package/ts_web/elements/00group-overlay/dees-modal/dees-modal.ts +0 -7
package/dist_watch/bundle.js
CHANGED
|
@@ -144909,6 +144909,81 @@ var demoFunc9 = /* @__PURE__ */ __name(() => b2`
|
|
|
144909
144909
|
});
|
|
144910
144910
|
}}>Test Responsive</dees-button>
|
|
144911
144911
|
</div>
|
|
144912
|
+
|
|
144913
|
+
<div class="demo-section">
|
|
144914
|
+
<h3>Scrollable Content</h3>
|
|
144915
|
+
<p>When content exceeds the modal's max-height (<code>calc(100vh - 80px)</code>), the tile caps at that height and the content area scrolls inside. The heading and bottom buttons stay pinned.</p>
|
|
144916
|
+
<div class="button-grid">
|
|
144917
|
+
<dees-button @click=${() => {
|
|
144918
|
+
DeesModal.createAndShow({
|
|
144919
|
+
heading: "Long Article",
|
|
144920
|
+
width: "medium",
|
|
144921
|
+
content: b2`
|
|
144922
|
+
<h4 style="margin-top: 0;">Lorem ipsum dolor sit amet</h4>
|
|
144923
|
+
${Array.from({ length: 40 }, (_4, i11) => b2`
|
|
144924
|
+
<p>
|
|
144925
|
+
<strong>§ ${i11 + 1}.</strong>
|
|
144926
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do
|
|
144927
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
|
|
144928
|
+
enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
144929
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
|
|
144930
|
+
in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
144931
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident,
|
|
144932
|
+
sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
144933
|
+
</p>
|
|
144934
|
+
`)}
|
|
144935
|
+
`,
|
|
144936
|
+
menuOptions: [{
|
|
144937
|
+
name: "Cancel",
|
|
144938
|
+
action: /* @__PURE__ */ __name(async (modal) => modal.destroy(), "action")
|
|
144939
|
+
}, {
|
|
144940
|
+
name: "Accept",
|
|
144941
|
+
action: /* @__PURE__ */ __name(async (modal) => modal.destroy(), "action")
|
|
144942
|
+
}]
|
|
144943
|
+
});
|
|
144944
|
+
}}>Long Article</dees-button>
|
|
144945
|
+
|
|
144946
|
+
<dees-button @click=${() => {
|
|
144947
|
+
DeesModal.createAndShow({
|
|
144948
|
+
heading: "Long List",
|
|
144949
|
+
width: "small",
|
|
144950
|
+
content: b2`
|
|
144951
|
+
<p>Selected items:</p>
|
|
144952
|
+
<ul style="padding-left: 20px; margin: 0;">
|
|
144953
|
+
${Array.from({ length: 80 }, (_4, i11) => b2`
|
|
144954
|
+
<li style="padding: 4px 0;">Item ${i11 + 1} — option label</li>
|
|
144955
|
+
`)}
|
|
144956
|
+
</ul>
|
|
144957
|
+
`,
|
|
144958
|
+
menuOptions: [{
|
|
144959
|
+
name: "Done",
|
|
144960
|
+
action: /* @__PURE__ */ __name(async (modal) => modal.destroy(), "action")
|
|
144961
|
+
}]
|
|
144962
|
+
});
|
|
144963
|
+
}}>Long List</dees-button>
|
|
144964
|
+
|
|
144965
|
+
<dees-button @click=${() => {
|
|
144966
|
+
DeesModal.createAndShow({
|
|
144967
|
+
heading: "Tall Form",
|
|
144968
|
+
width: "medium",
|
|
144969
|
+
content: b2`
|
|
144970
|
+
<dees-form>
|
|
144971
|
+
${Array.from({ length: 25 }, (_4, i11) => b2`
|
|
144972
|
+
<dees-input-text .label=${`Field ${i11 + 1}`}></dees-input-text>
|
|
144973
|
+
`)}
|
|
144974
|
+
</dees-form>
|
|
144975
|
+
`,
|
|
144976
|
+
menuOptions: [{
|
|
144977
|
+
name: "Cancel",
|
|
144978
|
+
action: /* @__PURE__ */ __name(async (modal) => modal.destroy(), "action")
|
|
144979
|
+
}, {
|
|
144980
|
+
name: "Submit",
|
|
144981
|
+
action: /* @__PURE__ */ __name(async (modal) => modal.destroy(), "action")
|
|
144982
|
+
}]
|
|
144983
|
+
});
|
|
144984
|
+
}}>Tall Form</dees-button>
|
|
144985
|
+
</div>
|
|
144986
|
+
</div>
|
|
144912
144987
|
</div>
|
|
144913
144988
|
`, "demoFunc");
|
|
144914
144989
|
|
|
@@ -145060,14 +145135,24 @@ __publicField(_DeesTile, "styles", [
|
|
|
145060
145135
|
color: var(--dees-color-text-secondary);
|
|
145061
145136
|
}
|
|
145062
145137
|
|
|
145063
|
-
/* --- Content: the rounded inset ---
|
|
145138
|
+
/* --- Content: the rounded inset ---
|
|
145139
|
+
Uses overflow-y: auto so that when a consumer (e.g. dees-modal) caps
|
|
145140
|
+
the tile with max-height, long content scrolls inside the tile
|
|
145141
|
+
instead of being clipped. For consumers without max-height
|
|
145142
|
+
(e.g. dees-stepper), the tile grows with content and the scroll
|
|
145143
|
+
never activates. Horizontal overflow stays clipped to preserve the
|
|
145144
|
+
rounded corners. */
|
|
145064
145145
|
.tile-content {
|
|
145065
145146
|
flex: 1;
|
|
145066
145147
|
position: relative;
|
|
145067
145148
|
border-radius: 8px;
|
|
145068
145149
|
border-top: 1px solid var(--dees-color-border-subtle);
|
|
145069
145150
|
border-bottom: 1px solid var(--dees-color-border-subtle);
|
|
145070
|
-
overflow: hidden;
|
|
145151
|
+
overflow-x: hidden;
|
|
145152
|
+
overflow-y: auto;
|
|
145153
|
+
overscroll-behavior: contain;
|
|
145154
|
+
scrollbar-width: thin;
|
|
145155
|
+
scrollbar-color: var(--dees-color-scrollbar-thumb) transparent;
|
|
145071
145156
|
}
|
|
145072
145157
|
|
|
145073
145158
|
.tile-content.no-footer {
|
|
@@ -145394,13 +145479,6 @@ __publicField(_DeesModal, "styles", [
|
|
|
145394
145479
|
font-size: 14px;
|
|
145395
145480
|
}
|
|
145396
145481
|
|
|
145397
|
-
.content {
|
|
145398
|
-
overflow-y: auto;
|
|
145399
|
-
overflow-x: hidden;
|
|
145400
|
-
overscroll-behavior: contain;
|
|
145401
|
-
scrollbar-width: thin;
|
|
145402
|
-
scrollbar-color: var(--dees-color-scrollbar-thumb) transparent;
|
|
145403
|
-
}
|
|
145404
145482
|
.bottomButtons {
|
|
145405
145483
|
display: flex;
|
|
145406
145484
|
flex-direction: row;
|
|
@@ -192495,7 +192573,7 @@ var stepperDemo = /* @__PURE__ */ __name(() => b2`
|
|
|
192495
192573
|
init_dist_ts30();
|
|
192496
192574
|
init_dist_ts29();
|
|
192497
192575
|
init_theme();
|
|
192498
|
-
var _activeFormValid_dec, _activeForm_dec, _stepperZIndex_dec, _overlay_dec, _selectedStep_dec, _steps_dec, _a81, _DeesStepper_decorators, _init82, _steps, _selectedStep, _overlay, _stepperZIndex, _activeForm, _activeFormValid;
|
|
192576
|
+
var _activeFormValid_dec, _activeForm_dec, _stepperZIndex_dec, _cancelable_dec, _overlay_dec, _selectedStep_dec, _steps_dec, _a81, _DeesStepper_decorators, _init82, _steps, _selectedStep, _overlay, _cancelable, _stepperZIndex, _activeForm, _activeFormValid;
|
|
192499
192577
|
_DeesStepper_decorators = [customElement("dees-stepper")];
|
|
192500
192578
|
var _DeesStepper = class _DeesStepper extends (_a81 = DeesElement, _steps_dec = [n5({
|
|
192501
192579
|
type: Array
|
|
@@ -192504,31 +192582,43 @@ var _DeesStepper = class _DeesStepper extends (_a81 = DeesElement, _steps_dec =
|
|
|
192504
192582
|
})], _overlay_dec = [n5({
|
|
192505
192583
|
type: Boolean,
|
|
192506
192584
|
reflect: true
|
|
192585
|
+
})], _cancelable_dec = [n5({
|
|
192586
|
+
type: Boolean,
|
|
192587
|
+
reflect: true
|
|
192507
192588
|
})], _stepperZIndex_dec = [n5({ type: Number, attribute: false })], _activeForm_dec = [n5({ type: Object, attribute: false })], _activeFormValid_dec = [n5({ type: Boolean, attribute: false })], _a81) {
|
|
192508
192589
|
constructor() {
|
|
192509
192590
|
super();
|
|
192510
192591
|
__privateAdd(this, _steps, __runInitializers(_init82, 8, this, [])), __runInitializers(_init82, 11, this);
|
|
192511
192592
|
__privateAdd(this, _selectedStep, __runInitializers(_init82, 12, this)), __runInitializers(_init82, 15, this);
|
|
192512
192593
|
__privateAdd(this, _overlay, __runInitializers(_init82, 16, this, false)), __runInitializers(_init82, 19, this);
|
|
192513
|
-
__privateAdd(this,
|
|
192514
|
-
__privateAdd(this,
|
|
192515
|
-
__privateAdd(this,
|
|
192594
|
+
__privateAdd(this, _cancelable, __runInitializers(_init82, 20, this, true)), __runInitializers(_init82, 23, this);
|
|
192595
|
+
__privateAdd(this, _stepperZIndex, __runInitializers(_init82, 24, this, 1e3)), __runInitializers(_init82, 27, this);
|
|
192596
|
+
__privateAdd(this, _activeForm, __runInitializers(_init82, 28, this, null)), __runInitializers(_init82, 31, this);
|
|
192597
|
+
__privateAdd(this, _activeFormValid, __runInitializers(_init82, 32, this, true)), __runInitializers(_init82, 35, this);
|
|
192516
192598
|
__publicField(this, "activeFormSubscription");
|
|
192517
192599
|
__publicField(this, "windowLayer");
|
|
192518
192600
|
__publicField(this, "getIndexOfStep", /* @__PURE__ */ __name((stepArg) => {
|
|
192519
192601
|
return this.steps.findIndex((stepArg2) => stepArg === stepArg2);
|
|
192520
192602
|
}, "getIndexOfStep"));
|
|
192521
192603
|
__publicField(this, "scroller");
|
|
192604
|
+
/**
|
|
192605
|
+
* Currently-open confirmation modal (if any). Prevents double-stacking when
|
|
192606
|
+
* the user clicks the backdrop or the Cancel button while a confirm modal
|
|
192607
|
+
* is already visible. The reference may become stale (point to a destroyed
|
|
192608
|
+
* modal) if the user dismisses the confirm modal by clicking its own
|
|
192609
|
+
* backdrop — so handleCancelRequest() uses isConnected to detect that.
|
|
192610
|
+
*/
|
|
192611
|
+
__publicField(this, "cancelConfirmModal");
|
|
192522
192612
|
}
|
|
192523
192613
|
static async createAndShow(optionsArg) {
|
|
192524
192614
|
const body3 = document.body;
|
|
192525
192615
|
const stepper = new _DeesStepper();
|
|
192526
192616
|
stepper.steps = optionsArg.steps;
|
|
192527
192617
|
stepper.overlay = true;
|
|
192618
|
+
if (optionsArg.cancelable !== void 0) {
|
|
192619
|
+
stepper.cancelable = optionsArg.cancelable;
|
|
192620
|
+
}
|
|
192528
192621
|
stepper.windowLayer = await DeesWindowLayer.createAndShow({ blur: true });
|
|
192529
|
-
stepper.windowLayer.addEventListener("click", async () => {
|
|
192530
|
-
await stepper.destroy();
|
|
192531
|
-
});
|
|
192532
192622
|
body3.append(stepper.windowLayer);
|
|
192533
192623
|
body3.append(stepper);
|
|
192534
192624
|
stepper.stepperZIndex = zIndexRegistry.getNextZIndex();
|
|
@@ -192540,6 +192630,7 @@ var _DeesStepper = class _DeesStepper extends (_a81 = DeesElement, _steps_dec =
|
|
|
192540
192630
|
<div
|
|
192541
192631
|
class="stepperContainer ${this.overlay ? "overlay" : ""}"
|
|
192542
192632
|
style=${this.overlay ? `z-index: ${this.stepperZIndex};` : ""}
|
|
192633
|
+
@click=${this.handleOutsideClick}
|
|
192543
192634
|
>
|
|
192544
192635
|
${this.steps.map((stepArg, stepIndex) => {
|
|
192545
192636
|
const isSelected = stepArg === this.selectedStep;
|
|
@@ -192560,19 +192651,23 @@ var _DeesStepper = class _DeesStepper extends (_a81 = DeesElement, _steps_dec =
|
|
|
192560
192651
|
<div class="title">${stepArg.title}</div>
|
|
192561
192652
|
<div class="content">${stepArg.content}</div>
|
|
192562
192653
|
</div>
|
|
192563
|
-
|
|
192564
|
-
|
|
192565
|
-
|
|
192654
|
+
<div slot="footer" class="bottomButtons">
|
|
192655
|
+
${isSelected && this.activeForm !== null && !this.activeFormValid ? b2`<div class="stepHint">Complete form to continue</div>` : ""}
|
|
192656
|
+
${this.cancelable ? b2`<div
|
|
192657
|
+
class="bottomButton"
|
|
192658
|
+
@click=${() => this.handleCancelRequest()}
|
|
192659
|
+
>Cancel</div>` : ""}
|
|
192660
|
+
${stepArg.menuOptions?.map((actionArg, actionIndex) => {
|
|
192566
192661
|
const isPrimary = actionIndex === stepArg.menuOptions.length - 1;
|
|
192567
192662
|
const isDisabled = isPrimary && this.activeForm !== null && !this.activeFormValid;
|
|
192568
192663
|
return b2`
|
|
192569
|
-
|
|
192570
|
-
|
|
192571
|
-
|
|
192572
|
-
|
|
192573
|
-
|
|
192574
|
-
})}
|
|
192575
|
-
|
|
192664
|
+
<div
|
|
192665
|
+
class="bottomButton ${isPrimary ? "primary" : ""} ${isDisabled ? "disabled" : ""}"
|
|
192666
|
+
@click=${() => this.handleMenuOptionClick(actionArg, isPrimary)}
|
|
192667
|
+
>${actionArg.name}</div>
|
|
192668
|
+
`;
|
|
192669
|
+
}) ?? ""}
|
|
192670
|
+
</div>
|
|
192576
192671
|
</dees-tile>`;
|
|
192577
192672
|
})}
|
|
192578
192673
|
</div>
|
|
@@ -192714,6 +192809,65 @@ var _DeesStepper = class _DeesStepper extends (_a81 = DeesElement, _steps_dec =
|
|
|
192714
192809
|
}
|
|
192715
192810
|
await optionArg.action(this);
|
|
192716
192811
|
}
|
|
192812
|
+
/**
|
|
192813
|
+
* Click handler on .stepperContainer. Mirrors dees-modal.handleOutsideClick:
|
|
192814
|
+
* when the user clicks the empty backdrop area (target === stepperContainer,
|
|
192815
|
+
* not any descendant tile), trigger the cancel confirmation flow. Clicks
|
|
192816
|
+
* that originate inside a step tile have a different event.target and are
|
|
192817
|
+
* ignored here.
|
|
192818
|
+
*/
|
|
192819
|
+
handleOutsideClick(eventArg) {
|
|
192820
|
+
if (!this.overlay) return;
|
|
192821
|
+
if (!this.cancelable) return;
|
|
192822
|
+
eventArg.stopPropagation();
|
|
192823
|
+
const stepperContainer = this.shadowRoot.querySelector(".stepperContainer");
|
|
192824
|
+
if (eventArg.target === stepperContainer) {
|
|
192825
|
+
this.handleCancelRequest();
|
|
192826
|
+
}
|
|
192827
|
+
}
|
|
192828
|
+
/**
|
|
192829
|
+
* Shown by both the backdrop click and the Cancel button in the footer.
|
|
192830
|
+
* Presents a dees-modal asking the user to confirm cancellation. If they
|
|
192831
|
+
* confirm, the stepper and window layer are destroyed; otherwise the
|
|
192832
|
+
* confirm modal is dismissed and the stepper stays open.
|
|
192833
|
+
*
|
|
192834
|
+
* The isConnected check on the cached reference handles the case where the
|
|
192835
|
+
* user dismissed the previous confirm modal by clicking ITS OWN backdrop —
|
|
192836
|
+
* dees-modal.handleOutsideClick calls destroy() directly, bypassing our
|
|
192837
|
+
* action callbacks, so our cached reference would be stale without this
|
|
192838
|
+
* fallback check.
|
|
192839
|
+
*/
|
|
192840
|
+
async handleCancelRequest() {
|
|
192841
|
+
if (!this.cancelable) return;
|
|
192842
|
+
if (this.cancelConfirmModal && this.cancelConfirmModal.isConnected) return;
|
|
192843
|
+
this.cancelConfirmModal = void 0;
|
|
192844
|
+
this.cancelConfirmModal = await DeesModal.createAndShow({
|
|
192845
|
+
heading: "Cancel setup?",
|
|
192846
|
+
width: "small",
|
|
192847
|
+
content: b2`
|
|
192848
|
+
<p style="margin: 0;">
|
|
192849
|
+
Are you sure you want to cancel? Any progress on the current step will be lost.
|
|
192850
|
+
</p>
|
|
192851
|
+
`,
|
|
192852
|
+
menuOptions: [
|
|
192853
|
+
{
|
|
192854
|
+
name: "Continue setup",
|
|
192855
|
+
action: /* @__PURE__ */ __name(async (modal) => {
|
|
192856
|
+
this.cancelConfirmModal = void 0;
|
|
192857
|
+
await modal.destroy();
|
|
192858
|
+
}, "action")
|
|
192859
|
+
},
|
|
192860
|
+
{
|
|
192861
|
+
name: "Yes, cancel",
|
|
192862
|
+
action: /* @__PURE__ */ __name(async (modal) => {
|
|
192863
|
+
this.cancelConfirmModal = void 0;
|
|
192864
|
+
await modal.destroy();
|
|
192865
|
+
await this.destroy();
|
|
192866
|
+
}, "action")
|
|
192867
|
+
}
|
|
192868
|
+
]
|
|
192869
|
+
});
|
|
192870
|
+
}
|
|
192717
192871
|
async destroy() {
|
|
192718
192872
|
const domtools19 = await this.domtoolsPromise;
|
|
192719
192873
|
const container = this.shadowRoot.querySelector(".stepperContainer");
|
|
@@ -192735,12 +192889,14 @@ _init82 = __decoratorStart(_a81);
|
|
|
192735
192889
|
_steps = new WeakMap();
|
|
192736
192890
|
_selectedStep = new WeakMap();
|
|
192737
192891
|
_overlay = new WeakMap();
|
|
192892
|
+
_cancelable = new WeakMap();
|
|
192738
192893
|
_stepperZIndex = new WeakMap();
|
|
192739
192894
|
_activeForm = new WeakMap();
|
|
192740
192895
|
_activeFormValid = new WeakMap();
|
|
192741
192896
|
__decorateElement(_init82, 4, "steps", _steps_dec, _DeesStepper, _steps);
|
|
192742
192897
|
__decorateElement(_init82, 4, "selectedStep", _selectedStep_dec, _DeesStepper, _selectedStep);
|
|
192743
192898
|
__decorateElement(_init82, 4, "overlay", _overlay_dec, _DeesStepper, _overlay);
|
|
192899
|
+
__decorateElement(_init82, 4, "cancelable", _cancelable_dec, _DeesStepper, _cancelable);
|
|
192744
192900
|
__decorateElement(_init82, 4, "stepperZIndex", _stepperZIndex_dec, _DeesStepper, _stepperZIndex);
|
|
192745
192901
|
__decorateElement(_init82, 4, "activeForm", _activeForm_dec, _DeesStepper, _activeForm);
|
|
192746
192902
|
__decorateElement(_init82, 4, "activeFormValid", _activeFormValid_dec, _DeesStepper, _activeFormValid);
|
|
@@ -192931,15 +193087,17 @@ __publicField(_DeesStepper, "styles", [
|
|
|
192931
193087
|
transition: all 0.15s ease;
|
|
192932
193088
|
background: transparent;
|
|
192933
193089
|
border: none;
|
|
192934
|
-
border-left: 1px solid var(--dees-color-border-subtle);
|
|
192935
193090
|
color: var(--dees-color-text-muted);
|
|
192936
193091
|
white-space: nowrap;
|
|
192937
193092
|
display: flex;
|
|
192938
193093
|
align-items: center;
|
|
192939
193094
|
}
|
|
192940
193095
|
|
|
192941
|
-
|
|
192942
|
-
|
|
193096
|
+
/* Border-left separator on every button EXCEPT the first one.
|
|
193097
|
+
Uses general sibling so the stepHint (if rendered on the left) does
|
|
193098
|
+
not shift which button counts as "first" and create a phantom border. */
|
|
193099
|
+
.bottomButtons .bottomButton ~ .bottomButton {
|
|
193100
|
+
border-left: 1px solid var(--dees-color-border-subtle);
|
|
192943
193101
|
}
|
|
192944
193102
|
|
|
192945
193103
|
.bottomButtons .bottomButton:hover {
|