hyperclayjs 1.19.6 → 1.19.8
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/README.md +2 -2
- package/package.json +1 -1
- package/src/hyperclay.js +2 -2
- package/src/ui/theModal.js +23 -10
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ import 'hyperclayjs/presets/standard.js';
|
|
|
85
85
|
| Module | Size | Description |
|
|
86
86
|
|--------|------|-------------|
|
|
87
87
|
| dialogs | 7.7KB | ask(), consent(), tell(), snippet() dialog functions |
|
|
88
|
-
| the-modal | 21.
|
|
88
|
+
| the-modal | 21.5KB | Full modal window creation system - window.theModal |
|
|
89
89
|
| toast | 10.7KB | Success/error message notifications, toast(msg, msgType) |
|
|
90
90
|
|
|
91
91
|
### Utilities (Core utilities (often auto-included))
|
|
@@ -142,7 +142,7 @@ Standard feature set for most use cases
|
|
|
142
142
|
|
|
143
143
|
**Modules:** `save-core`, `snapshot`, `save-system`, `unsaved-warning`, `edit-mode-helpers`, `persist`, `option-visibility`, `event-attrs`, `dom-helpers`, `toast`, `save-toast`, `export-to-window`, `view-mode-excludes-edit-modules`
|
|
144
144
|
|
|
145
|
-
### Everything (~
|
|
145
|
+
### Everything (~209.1KB)
|
|
146
146
|
All available features
|
|
147
147
|
|
|
148
148
|
Includes all available modules across all categories.
|
package/package.json
CHANGED
package/src/hyperclay.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* DO NOT EDIT THIS FILE DIRECTLY — it is generated from build/hyperclay.template.js
|
|
3
3
|
*
|
|
4
|
-
* HyperclayJS v1.19.
|
|
4
|
+
* HyperclayJS v1.19.8 - Minimal Browser-Native Loader
|
|
5
5
|
*
|
|
6
6
|
* Modules auto-init when imported (no separate init call needed).
|
|
7
7
|
* Include `export-to-window` feature to export to window.hyperclay.
|
|
@@ -105,7 +105,7 @@ const PRESETS = {
|
|
|
105
105
|
},
|
|
106
106
|
"smooth-sailing": {
|
|
107
107
|
"name": "Smooth Sailing",
|
|
108
|
-
"description": "
|
|
108
|
+
"description": "Everything, without gotchas",
|
|
109
109
|
"modules": [
|
|
110
110
|
"save-core",
|
|
111
111
|
"save-system",
|
package/src/ui/theModal.js
CHANGED
|
@@ -368,17 +368,28 @@ const modalCss = `<style class="micromodal-css">
|
|
|
368
368
|
|
|
369
369
|
.micromodal__container {
|
|
370
370
|
position: relative;
|
|
371
|
-
|
|
371
|
+
width: 100%;
|
|
372
|
+
max-width: min(550px, calc(100vw - 2rem));
|
|
373
|
+
max-height: calc(100vh - 4rem);
|
|
374
|
+
max-height: calc(100dvh - 2rem);
|
|
372
375
|
box-sizing: border-box;
|
|
373
|
-
overflow
|
|
374
|
-
padding: 26px 40px 40px 40px;
|
|
376
|
+
overflow: hidden;
|
|
375
377
|
border: 2px solid #FFFFFF;
|
|
376
378
|
background-color: #11131E;
|
|
377
|
-
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.micromodal__inner {
|
|
382
|
+
overflow-x: hidden;
|
|
383
|
+
overflow-y: auto;
|
|
384
|
+
/* Must subtract container's 4px border (2px top + 2px bottom) from max-height,
|
|
385
|
+
otherwise inner overflows past container since box-sizing: border-box
|
|
386
|
+
makes the container's content area smaller than its max-height */
|
|
387
|
+
max-height: calc(100dvh - 2rem - 4px);
|
|
388
|
+
padding: 26px 40px 40px 40px;
|
|
378
389
|
}
|
|
379
390
|
|
|
380
391
|
@media (min-width: 640px) {
|
|
381
|
-
.micromodal .
|
|
392
|
+
.micromodal .micromodal__inner {
|
|
382
393
|
padding: 52px 64px 60px 64px;
|
|
383
394
|
}
|
|
384
395
|
}
|
|
@@ -418,7 +429,7 @@ const modalCss = `<style class="micromodal-css">
|
|
|
418
429
|
}
|
|
419
430
|
|
|
420
431
|
.micromodal .micromodal__input {
|
|
421
|
-
width:
|
|
432
|
+
width: min(calc(100vw - 100px), 420px);
|
|
422
433
|
padding: 6px 6px 7px;
|
|
423
434
|
font-size: var(--hyperclay-modal-input-font-size, 16px);
|
|
424
435
|
color: #000;
|
|
@@ -567,10 +578,12 @@ const modalCss = `<style class="micromodal-css">
|
|
|
567
578
|
const modalHtml = `<div class="micromodal" id="micromodal" aria-hidden="true">
|
|
568
579
|
<div class="micromodal__overlay" tabindex="-1">
|
|
569
580
|
<form class="micromodal__container" role="dialog" aria-modal="true">
|
|
570
|
-
<div class="
|
|
571
|
-
|
|
572
|
-
<
|
|
573
|
-
|
|
581
|
+
<div class="micromodal__inner">
|
|
582
|
+
<div class="micromodal__content"></div>
|
|
583
|
+
<div class="micromodal__buttons">
|
|
584
|
+
<button class="micromodal__no" type="button"></button>
|
|
585
|
+
<button class="micromodal__yes" type="submit"></button>
|
|
586
|
+
</div>
|
|
574
587
|
</div>
|
|
575
588
|
<button class="micromodal__close" type="button" aria-label="Close modal"></button>
|
|
576
589
|
</form>
|