@yuneta/gobj-ui 7.23.107 → 7.23.108
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/gobj-ui.cjs.js +2 -1
- package/dist/gobj-ui.es.js +2 -1
- package/package.json +1 -1
- package/src/c_yui_shell.css +6 -0
- package/src/shell_modals.js +10 -1
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -3112,10 +3112,11 @@ function yui_shell_show_modal(shell, content, opts) {
|
|
|
3112
3112
|
}]);
|
|
3113
3113
|
}
|
|
3114
3114
|
let logical = opts && opts.logical_class || "";
|
|
3115
|
+
let wide = !!(opts && opts.wide);
|
|
3115
3116
|
let $modal = (0, _yuneta_gobj_js.createElement2)([
|
|
3116
3117
|
"div",
|
|
3117
3118
|
{
|
|
3118
|
-
class: "MODAL" + (logical ? " " + logical : "") + " modal yui-modal" + (dialog ? " yui-dialog" : "") + " is-active",
|
|
3119
|
+
class: "MODAL" + (logical ? " " + logical : "") + " modal yui-modal" + (dialog ? " yui-dialog" : "") + (dialog && wide ? " yui-dialog-wide" : "") + " is-active",
|
|
3119
3120
|
role: "dialog",
|
|
3120
3121
|
"aria-modal": "true"
|
|
3121
3122
|
},
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -3107,10 +3107,11 @@ function yui_shell_show_modal(shell, content, opts) {
|
|
|
3107
3107
|
}]);
|
|
3108
3108
|
}
|
|
3109
3109
|
let logical = opts && opts.logical_class || "";
|
|
3110
|
+
let wide = !!(opts && opts.wide);
|
|
3110
3111
|
let $modal = createElement2([
|
|
3111
3112
|
"div",
|
|
3112
3113
|
{
|
|
3113
|
-
class: "MODAL" + (logical ? " " + logical : "") + " modal yui-modal" + (dialog ? " yui-dialog" : "") + " is-active",
|
|
3114
|
+
class: "MODAL" + (logical ? " " + logical : "") + " modal yui-modal" + (dialog ? " yui-dialog" : "") + (dialog && wide ? " yui-dialog-wide" : "") + " is-active",
|
|
3114
3115
|
role: "dialog",
|
|
3115
3116
|
"aria-modal": "true"
|
|
3116
3117
|
},
|
package/package.json
CHANGED
package/src/c_yui_shell.css
CHANGED
|
@@ -755,6 +755,12 @@ textarea::placeholder {
|
|
|
755
755
|
overflow: hidden;
|
|
756
756
|
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
|
|
757
757
|
}
|
|
758
|
+
/* A dialog holding a DOCUMENT (`opts.wide`): a json viewer, a record, a
|
|
759
|
+
* log. The cap above is a width for a question with two buttons. */
|
|
760
|
+
.yui-dialog.yui-dialog-wide .yui-dialog-content {
|
|
761
|
+
max-width: 1000px;
|
|
762
|
+
}
|
|
763
|
+
|
|
758
764
|
.yui-dialog-header {
|
|
759
765
|
display: flex;
|
|
760
766
|
align-items: center;
|
package/src/shell_modals.js
CHANGED
|
@@ -263,9 +263,18 @@ export function yui_shell_show_modal(shell, content, opts)
|
|
|
263
263
|
* only this tells one popup from another in the Inspector or a selector. */
|
|
264
264
|
let logical = (opts && opts.logical_class) || "";
|
|
265
265
|
|
|
266
|
+
/* `opts.wide`: a dialog that holds a DOCUMENT and not a form. The
|
|
267
|
+
* 640px of the standard card is a width for a question with two
|
|
268
|
+
* buttons; a json viewer, a log or a record read in it wraps every
|
|
269
|
+
* long value and pushes its own toolbar behind a scroll arrow. It
|
|
270
|
+
* only lifts the desktop cap -- on mobile a dialog is a full-screen
|
|
271
|
+
* sheet already, and the media query below still wins. */
|
|
272
|
+
let wide = !!(opts && opts.wide);
|
|
273
|
+
|
|
266
274
|
let $modal = createElement2(
|
|
267
275
|
["div", {class: "MODAL" + (logical ? " " + logical : "") +
|
|
268
|
-
" modal yui-modal" + (dialog ? " yui-dialog" : "") +
|
|
276
|
+
" modal yui-modal" + (dialog ? " yui-dialog" : "") +
|
|
277
|
+
(dialog && wide ? " yui-dialog-wide" : "") + " is-active",
|
|
269
278
|
role: "dialog", "aria-modal": "true"},
|
|
270
279
|
modal_children
|
|
271
280
|
]
|