@yuneta/gobj-ui 2.5.0 → 3.0.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/index.js CHANGED
@@ -14,14 +14,11 @@
14
14
  /*
15
15
  * Components
16
16
  */
17
- export { register_c_yui_main, display_volatil_modal, display_info_message, display_warning_message, display_error_message, get_yesnocancel, get_yesno, get_ok } from "./src/c_yui_main.js";
18
17
  export { register_c_yui_window } from "./src/c_yui_window.js";
19
18
  export { register_c_yui_window_manager } from "./src/c_yui_window_manager.js";
20
- export { register_c_yui_tabs } from "./src/c_yui_tabs.js";
21
19
  export { register_c_yui_pager } from "./src/c_yui_pager.js";
22
20
  export { register_c_yui_wizard } from "./src/c_yui_wizard.js";
23
21
  export { register_c_yui_form } from "./src/c_yui_form.js";
24
- export { register_c_yui_routing } from "./src/c_yui_routing.js";
25
22
  export { register_c_yui_map } from "./src/c_yui_map.js";
26
23
  export { register_c_yui_uplot } from "./src/c_yui_uplot.js";
27
24
  export { register_c_yui_json_graph } from "./src/c_yui_json_graph.js";
@@ -70,8 +67,6 @@ export { register_c_g6_nodes_tree } from "./src/c_g6_nodes_tree.js";
70
67
  export { addClasses, removeClasses, toggleClasses, removeChildElements, disableElements, enableElements, set_submit_state, set_cancel_state, set_active_state, getStrokeColor } from "./src/lib_graph.js";
71
68
  export { inject_svg_icons } from "./src/lib_icons.js";
72
69
  export { EditControl, MarkerControl } from "./src/lib_maplibre.js";
73
- export { themes } from "./src/themes.js";
74
- export { YTable, createYTable } from "./src/ytable.js";
75
70
  export { yui_toolbar } from "./src/yui_toolbar.js";
76
71
  export { attach_clear } from "./src/yui_inputs.js";
77
72
  export { info_traffic, setup_dev, build_dev_panel, apply_dev_traces, dev_window_was_open } from "./src/yui_dev.js";
@@ -79,11 +74,8 @@ export { info_traffic, setup_dev, build_dev_panel, apply_dev_traces, dev_window_
79
74
  /*
80
75
  * CSS - import these in your main entry point
81
76
  * Example:
82
- * import "gobj-ui/src/c_yui_main.css";
83
77
  * import "gobj-ui/src/c_yui_shell.css"; // declarative shell
84
78
  * import "gobj-ui/src/c_yui_map.css";
85
- * import "gobj-ui/src/c_yui_routing.css";
86
- * import "gobj-ui/src/ytable.css";
87
79
  * import "gobj-ui/src/yui_toolbar.css";
88
80
  * import "gobj-ui/src/lib_graph.css";
89
81
  * import "gobj-ui/src/yui_icons.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "2.5.0",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
@@ -48,3 +48,12 @@
48
48
  border-color: var(--bulma-border, #dbdbdb);
49
49
  cursor: default;
50
50
  }
51
+
52
+ /* Moved from c_yui_main.css (2.6.1): scroll containment for the fields area.
53
+ * Self-contained here so every consumer gets it without the
54
+ * legacy stack's stylesheet. */
55
+
56
+ .overscroll-contain {
57
+ overscroll-behavior: contain;
58
+ }
59
+
package/src/c_yui_form.js CHANGED
@@ -56,6 +56,7 @@ import TomSelect from "tom-select"; // Import Tom-Select JS
56
56
  import { createJSONEditor } from 'vanilla-jsoneditor';
57
57
  import "vanilla-jsoneditor/themes/jse-theme-dark.css";
58
58
  import "./c_yui_form.css";
59
+ import "./tabulator.css";
59
60
 
60
61
  import "tabulator-tables/dist/css/tabulator.min.css"; // Import Tabulator CSS
61
62
  import "tabulator-tables/dist/css/tabulator_bulma.css";
@@ -643,3 +643,90 @@
643
643
  display: none;
644
644
  }
645
645
  }
646
+
647
+ /* Moved from c_yui_main.css (2.6.1): mobile Bulma columns edge-to-edge.
648
+ * Self-contained here so every consumer gets it without the
649
+ * legacy stack's stylesheet. */
650
+
651
+ @media screen and (max-width: 768px) {
652
+ .column {
653
+ padding: 0 !important;
654
+ margin-bottom: 16px !important;
655
+ }
656
+ }
657
+
658
+
659
+ /*============================================================
660
+ * Shell confirm dialogs (yui_shell_confirm_*):
661
+ * icon-centric layout ported from the legacy volatil
662
+ * modals (2.5.0 redesign; c_yui_main.js removed in 3.0.0).
663
+ * A narrow rounded card with a tinted round icon of the
664
+ * type; everything maps to Bulma vars so one rule set
665
+ * follows light and dark.
666
+ *============================================================*/
667
+ .modal.yui-confirm .modal-background {
668
+ background-color: color-mix(in srgb, var(--bulma-scheme-invert, #000) 45%, transparent);
669
+ }
670
+ .modal.yui-confirm .modal-card {
671
+ position: relative;
672
+ width: min(26rem, calc(100vw - 2rem));
673
+ border-radius: 0.75rem;
674
+ background: var(--bulma-scheme-main, #fff);
675
+ box-shadow: 0 12px 40px color-mix(in srgb, var(--bulma-scheme-invert, #000) 30%, transparent);
676
+ padding: 1.5rem 1.5rem 1.25rem;
677
+ }
678
+ .modal.yui-confirm .modal-card-body {
679
+ background: transparent;
680
+ padding: 0;
681
+ }
682
+ .modal.yui-confirm .modal-card-foot {
683
+ background: transparent;
684
+ border-top: none;
685
+ padding: 1rem 0 0;
686
+ justify-content: center;
687
+ }
688
+ .yui-confirm-icon {
689
+ width: 3.25rem;
690
+ height: 3.25rem;
691
+ border-radius: 9999px;
692
+ display: flex;
693
+ align-items: center;
694
+ justify-content: center;
695
+ margin: 0 auto 0.75rem;
696
+ font-size: 1.5rem;
697
+ background: color-mix(in srgb, var(--yui-confirm-base, var(--bulma-info, #3e8ed0)) 15%, transparent);
698
+ color: var(--yui-confirm-ink, var(--bulma-info, #3e8ed0));
699
+ }
700
+ .modal.yui-confirm.is-info,
701
+ .modal.yui-confirm.is-question {
702
+ --yui-confirm-base: var(--bulma-info, #3e8ed0);
703
+ --yui-confirm-ink: var(--bulma-info-on-scheme, #3e8ed0);
704
+ }
705
+ .modal.yui-confirm.is-success {
706
+ --yui-confirm-base: var(--bulma-success, #48c78e);
707
+ --yui-confirm-ink: var(--bulma-success-on-scheme, #257953);
708
+ }
709
+ .modal.yui-confirm.is-warning {
710
+ --yui-confirm-base: var(--bulma-warning, #ffe08a);
711
+ --yui-confirm-ink: var(--bulma-warning-on-scheme, #946c00);
712
+ }
713
+ .modal.yui-confirm.is-error {
714
+ --yui-confirm-base: var(--bulma-danger, #f14668);
715
+ --yui-confirm-ink: var(--bulma-danger-on-scheme, #cc0f35);
716
+ }
717
+ .yui-confirm-title {
718
+ font-size: 1.15rem;
719
+ font-weight: 600;
720
+ text-transform: capitalize;
721
+ margin-bottom: 0.25rem;
722
+ color: var(--bulma-text-strong, inherit);
723
+ }
724
+ .yui-confirm-x {
725
+ position: absolute;
726
+ top: 0.75rem;
727
+ right: 0.75rem;
728
+ }
729
+ .yui-confirm-msg {
730
+ font-size: 1.05rem;
731
+ color: var(--bulma-text, inherit);
732
+ }
@@ -34,6 +34,8 @@ import {
34
34
  gclass_create, log_error, log_warning,
35
35
  gobj_create, gobj_destroy,
36
36
  gobj_start, gobj_stop,
37
+ gobj_parent,
38
+ gobj_gclass_name,
37
39
  gobj_publish_event,
38
40
  gobj_send_event,
39
41
  gobj_subscribe_event,
@@ -68,6 +70,12 @@ import {
68
70
  ***************************************************************/
69
71
  const GCLASS_NAME = "C_YUI_SHELL";
70
72
 
73
+ /* Last shell created on the page — fallback for yui_shell_of()
74
+ * when the caller is not a shell descendant (e.g. a floating
75
+ * C_YUI_WINDOW parented to the app gobj). Real apps have exactly
76
+ * one shell; tests that create several get the most recent. */
77
+ let __last_shell__ = null;
78
+
71
79
  /* Zones rendered inside the base layer. */
72
80
  const ZONE_IDS = ["top", "top-sub", "left", "center", "right", "bottom-sub", "bottom"];
73
81
 
@@ -166,6 +174,8 @@ function mt_create(gobj)
166
174
  active_dropdown: null
167
175
  });
168
176
 
177
+ __last_shell__ = gobj;
178
+
169
179
  build_ui(gobj);
170
180
  }
171
181
 
@@ -318,6 +328,10 @@ function mt_destroy(gobj)
318
328
  }
319
329
  gobj_write_attr(gobj, "$container", null);
320
330
  gobj_write_attr(gobj, "priv", null);
331
+
332
+ if(__last_shell__ === gobj) {
333
+ __last_shell__ = null;
334
+ }
321
335
  }
322
336
 
323
337
 
@@ -2408,6 +2422,25 @@ function register_c_yui_shell()
2408
2422
  * bottom of the file to keep the skeleton layout intact.
2409
2423
  ***************************************************************/
2410
2424
 
2425
+ /************************************************************
2426
+ * Resolve the shell that governs `gobj`: the nearest
2427
+ * C_YUI_SHELL ancestor, else the last shell created on the
2428
+ * page (apps have exactly one). Null when no shell exists —
2429
+ * callers must degrade loudly (shell_modals logs a warning
2430
+ * and resolves the safe default).
2431
+ ************************************************************/
2432
+ function yui_shell_of(gobj)
2433
+ {
2434
+ let g = gobj;
2435
+ while(g) {
2436
+ if(gobj_gclass_name(g) === GCLASS_NAME) {
2437
+ return g;
2438
+ }
2439
+ g = gobj_parent(g);
2440
+ }
2441
+ return __last_shell__;
2442
+ }
2443
+
2411
2444
  /************************************************************
2412
2445
  * Programmatic navigation (bypass hash).
2413
2446
  ************************************************************/
@@ -2552,6 +2585,7 @@ function yui_shell_close_dropdown(shell_gobj)
2552
2585
 
2553
2586
  export {
2554
2587
  register_c_yui_shell,
2588
+ yui_shell_of,
2555
2589
  yui_shell_navigate,
2556
2590
  yui_shell_open_drawer,
2557
2591
  yui_shell_close_drawer,
@@ -80,7 +80,8 @@ import {
80
80
  set_submit_state,
81
81
  set_active_state,
82
82
  } from "./lib_graph.js";
83
- import {display_error_message} from "./c_yui_main.js";
83
+ import {yui_shell_show_error} from "./shell_modals.js";
84
+ import {yui_shell_of} from "./c_yui_shell.js";
84
85
 
85
86
  import {t} from "i18next";
86
87
 
@@ -941,7 +942,7 @@ function ac_mt_command_answer(gobj, event, kw, src)
941
942
  * app-modal that wedges the whole SPA behind an empty tab. */
942
943
  show_load_error(gobj, t(comment));
943
944
  } else {
944
- display_error_message("Error", t(comment));
945
+ yui_shell_show_error(yui_shell_of(gobj), comment, {t: t});
945
946
  }
946
947
  // HACK don't return for non-descs, pass errors when need it.
947
948
  }
@@ -45,3 +45,56 @@
45
45
  .toolbar_tabulator_table .control.has-icons-left {
46
46
  min-width: 0;
47
47
  }
48
+
49
+ /* Moved from c_yui_main.css (2.6.1): the responsive edit-dialog card
50
+ * and the utilities this gclass tags on its DOM.
51
+ * Self-contained here so every consumer gets it without the
52
+ * legacy stack's stylesheet. */
53
+
54
+ /* Custom class to adjust the modal width */
55
+ .modal-card.modal-is-responsive {
56
+ width: 100%;
57
+ max-width: 100%;
58
+ }
59
+
60
+ @media screen and (min-width: 768px) {
61
+ .modal-card.modal-is-responsive {
62
+ width: 50rem;
63
+ max-width: 50rem;
64
+ }
65
+ }
66
+
67
+ /*
68
+ * Mobile (< 768px, dovetails with the desktop rule above): a
69
+ * `modal-is-responsive` card (the C_YUI_TREEDB edit/delete form
70
+ * popup, and any other consumer of this opt-in class) takes the
71
+ * WHOLE screen instead of a centred sheet — more room to edit on a
72
+ * phone. Confirm dialogs do not carry `modal-is-responsive`, so
73
+ * they stay compact. Edge-to-edge: full size, no margin, flat
74
+ * corners; the body keeps Bulma's own scroll.
75
+ */
76
+ @media screen and (max-width: 767px) {
77
+ .modal-card.modal-is-responsive {
78
+ width: 100%;
79
+ max-width: 100%;
80
+ height: 100%;
81
+ max-height: 100%;
82
+ margin: 0;
83
+ border-radius: 0;
84
+ }
85
+ .modal-card.modal-is-responsive .modal-card-head,
86
+ .modal-card.modal-is-responsive .modal-card-foot {
87
+ border-radius: 0;
88
+ }
89
+ .modal-card.modal-is-responsive .modal-card-body {
90
+ flex: 1 1 auto;
91
+ overflow-y: auto;
92
+ }
93
+ }
94
+
95
+ .without-border {
96
+ border: none !important;
97
+ box-shadow: none !important;
98
+ background: transparent !important;
99
+ }
100
+
@@ -57,15 +57,23 @@ import {
57
57
  } from "@yuneta/gobj-js";
58
58
 
59
59
  import {
60
- get_yesnocancel,
61
- get_ok,
62
- } from "./c_yui_main.js";
60
+ yui_shell_confirm_yesnocancel,
61
+ yui_shell_confirm_ok,
62
+ yui_shell_popup_layer,
63
+ } from "./shell_modals.js";
64
+
65
+ import {
66
+ yui_shell_of,
67
+ yui_shell_push_escape,
68
+ yui_shell_pop_escape,
69
+ } from "./c_yui_shell.js";
63
70
 
64
71
  import {register_c_yui_form} from "./c_yui_form.js";
65
72
 
66
73
  import {t} from "i18next";
67
74
 
68
75
  import "./c_yui_treedb_topic_with_form.css";
76
+ import "./tabulator.css";
69
77
 
70
78
  import { TabulatorFull as Tabulator } from "tabulator-tables";
71
79
 
@@ -132,17 +140,26 @@ let PRIVATE_DATA = {
132
140
  tabulator: null,
133
141
  form: null, // hosted C_YUI_FORM child (while dialog open)
134
142
  $popup: null, // dialog DOM element
135
- on_keydown: null, // document Escape handler (while dialog open)
143
+ on_keydown: null, // document Escape handler (no-shell fallback)
144
+ escape_shell: null, // shell whose Escape chain holds escape_handler
145
+ escape_handler: null, // close handler pushed on the shell chain
136
146
  };
137
147
 
138
148
  let __gclass__ = null;
139
149
 
140
- /* Where to mount the edit/delete modal. The legacy C_YUI_MAIN
141
- * shell provided a "#popup-layer" element; the new C_YUI_SHELL does
142
- * not. Bulma `.modal` is position:fixed, so document.body is a
143
- * correct universal fallback (works under any host). */
144
- function popup_mount_layer()
150
+ /* Where to mount the edit/delete modal. Under a C_YUI_SHELL use
151
+ * its popup layer (z 20): the shell confirms live on the modal
152
+ * layer (z 99), so they always paint above this dialog — a
153
+ * body-mounted Bulma `.modal` would cover them (the shell is a
154
+ * stacking context below body-level modals). The legacy
155
+ * C_YUI_MAIN "#popup-layer" and document.body (Bulma `.modal` is
156
+ * position:fixed) remain the shell-less fallbacks. */
157
+ function popup_mount_layer(gobj)
145
158
  {
159
+ let $layer = yui_shell_popup_layer(yui_shell_of(gobj));
160
+ if($layer) {
161
+ return $layer;
162
+ }
146
163
  return document.getElementById("popup-layer") || document.body;
147
164
  }
148
165
 
@@ -200,6 +217,11 @@ function mt_stop(gobj)
200
217
  ***************************************************************/
201
218
  function mt_destroy(gobj)
202
219
  {
220
+ /* A destroy with the edit dialog open (e.g. the hosted view is
221
+ * rebuilt on a transport rebind) must tear the dialog down too:
222
+ * it unhooks the Escape handler (shell chain or document
223
+ * listener) and removes the dialog DOM. */
224
+ close_form_dialog(gobj);
203
225
  destroy_ui(gobj);
204
226
  }
205
227
 
@@ -1181,17 +1203,30 @@ function open_form_dialog(gobj, mode, record)
1181
1203
  $form_container.style.minHeight = "0";
1182
1204
  }
1183
1205
 
1184
- popup_mount_layer().appendChild($element);
1206
+ popup_mount_layer(gobj).appendChild($element);
1185
1207
  refresh_language($element, t);
1186
1208
 
1187
- /* Escape closes through the same unsaved-changes guard as the X. */
1188
- priv.on_keydown = function(evt) {
1189
- if(evt.key === "Escape") {
1190
- evt.stopPropagation();
1209
+ /* Escape closes through the same unsaved-changes guard as the X.
1210
+ * Under a shell, ride its Escape priority chain — LIFO with the
1211
+ * shell confirm dialogs, so Escape on an open confirm never
1212
+ * reaches this dialog and stacks a second one. Without a shell
1213
+ * (bare unit tests) fall back to a document listener. */
1214
+ let shell = yui_shell_of(gobj);
1215
+ if(shell) {
1216
+ priv.escape_shell = shell;
1217
+ priv.escape_handler = function() {
1191
1218
  request_close_form_dialog(gobj);
1192
- }
1193
- };
1194
- document.addEventListener("keydown", priv.on_keydown);
1219
+ };
1220
+ yui_shell_push_escape(shell, "popup", priv.escape_handler);
1221
+ } else {
1222
+ priv.on_keydown = function(evt) {
1223
+ if(evt.key === "Escape") {
1224
+ evt.stopPropagation();
1225
+ request_close_form_dialog(gobj);
1226
+ }
1227
+ };
1228
+ document.addEventListener("keydown", priv.on_keydown);
1229
+ }
1195
1230
 
1196
1231
  gobj_start(form); // mt_start loads `record` into the form
1197
1232
 
@@ -1219,8 +1254,12 @@ function request_close_form_dialog(gobj)
1219
1254
  let kw = {};
1220
1255
  gobj_send_event(priv.form, "EV_WINDOW_TO_CLOSE", kw, gobj);
1221
1256
  if(kw.abort_close) {
1222
- get_yesnocancel(t('All changes will be lost. Are you sure?'), function(evt) {
1223
- if(evt === "yes") {
1257
+ yui_shell_confirm_yesnocancel(
1258
+ yui_shell_of(gobj),
1259
+ 'All changes will be lost. Are you sure?',
1260
+ {t: t, yes_label: "yes", no_label: "no", cancel_label: "cancel"}
1261
+ ).then(function(answer) {
1262
+ if(answer === "yes") {
1224
1263
  close_form_dialog(gobj);
1225
1264
  }
1226
1265
  });
@@ -1236,6 +1275,11 @@ function request_close_form_dialog(gobj)
1236
1275
  function close_form_dialog(gobj)
1237
1276
  {
1238
1277
  let priv = gobj.priv;
1278
+ if(priv.escape_handler) {
1279
+ yui_shell_pop_escape(priv.escape_shell, priv.escape_handler);
1280
+ priv.escape_shell = null;
1281
+ priv.escape_handler = null;
1282
+ }
1239
1283
  if(priv.on_keydown) {
1240
1284
  document.removeEventListener("keydown", priv.on_keydown);
1241
1285
  priv.on_keydown = null;
@@ -1640,7 +1684,7 @@ function show_dropdown_popup_menu(gobj, x, y, items, callback)
1640
1684
  /*
1641
1685
  * Add to popup layer
1642
1686
  */
1643
- popup_mount_layer().appendChild($element);
1687
+ popup_mount_layer(gobj).appendChild($element);
1644
1688
 
1645
1689
  /*
1646
1690
  * Set position
@@ -1929,12 +1973,18 @@ function ac_delete_rows(gobj, event, kw, src)
1929
1973
  *----------------------------*/
1930
1974
  let rows = tabulator.getSelectedData();
1931
1975
  if (!rows.length) {
1932
- get_ok(t('please select some row'));
1976
+ yui_shell_confirm_ok(
1977
+ yui_shell_of(gobj), 'please select some row',
1978
+ {t: t, ok_label: "accept"}
1979
+ );
1933
1980
  return 0;
1934
1981
  }
1935
1982
 
1936
- get_yesnocancel(t('are you sure'), function(evt) {
1937
- if(evt === "yes") {
1983
+ yui_shell_confirm_yesnocancel(
1984
+ yui_shell_of(gobj), 'are you sure',
1985
+ {t: t, yes_label: "yes", no_label: "no", cancel_label: "cancel"}
1986
+ ).then(function(answer) {
1987
+ if(answer === "yes") {
1938
1988
  for(let row of rows) {
1939
1989
  // TODO why don't send once EV_DELETE_RECORD(S)
1940
1990
  gobj_publish_event(
@@ -1954,8 +2004,11 @@ function ac_delete_rows(gobj, event, kw, src)
1954
2004
  * Delete one row
1955
2005
  * {index: , row: }
1956
2006
  *----------------------------*/
1957
- get_yesnocancel(t('are you sure'), function(evt) {
1958
- if(evt === "yes") {
2007
+ yui_shell_confirm_yesnocancel(
2008
+ yui_shell_of(gobj), 'are you sure',
2009
+ {t: t, yes_label: "yes", no_label: "no", cancel_label: "cancel"}
2010
+ ).then(function(answer) {
2011
+ if(answer === "yes") {
1959
2012
  gobj_publish_event(
1960
2013
  gobj,
1961
2014
  "EV_DELETE_RECORD",
@@ -1983,7 +2036,10 @@ function ac_copy_rows(gobj, event, kw, src)
1983
2036
  *----------------------------*/
1984
2037
  let rows = tabulator.getSelectedData();
1985
2038
  if (!rows.length) {
1986
- get_ok(t('please select some row'));
2039
+ yui_shell_confirm_ok(
2040
+ yui_shell_of(gobj), 'please select some row',
2041
+ {t: t, ok_label: "accept"}
2042
+ );
1987
2043
  return 0;
1988
2044
  }
1989
2045
 
@@ -41,9 +41,8 @@ import {
41
41
  refresh_language,
42
42
  } from "@yuneta/gobj-js";
43
43
 
44
- import {
45
- display_error_message
46
- } from "./c_yui_main.js";
44
+ import {yui_shell_show_error} from "./shell_modals.js";
45
+ import {yui_shell_of} from "./c_yui_shell.js";
47
46
 
48
47
  import {t} from "i18next";
49
48
 
@@ -819,7 +818,7 @@ function ac_mt_command_answer(gobj, event, kw, src)
819
818
  * app-modal that wedges the whole SPA behind an empty tab. */
820
819
  show_load_error(gobj, t(comment));
821
820
  } else {
822
- display_error_message("Error", t(comment));
821
+ yui_shell_show_error(yui_shell_of(gobj), comment, {t: t});
823
822
  }
824
823
  return 0;
825
824
  }
@@ -0,0 +1,22 @@
1
+ /***********************************************************************
2
+ * c_yui_window.css
3
+ *
4
+ * Styles C_YUI_WINDOW tags on its chrome. Moved from
5
+ * c_yui_main.css (2.6.1) so windows are self-contained and no
6
+ * longer depend on the legacy stack's stylesheet.
7
+ *
8
+ * Copyright (c) 2026, ArtGins.
9
+ * All Rights Reserved.
10
+ ***********************************************************************/
11
+
12
+ .strong-shadow {
13
+ box-shadow:
14
+ 0 1em 2em -0.125em hsla(var(--bulma-shadow-h), var(--bulma-shadow-s), var(--bulma-shadow-l), 0.3),
15
+ 0 0 0 2px hsla(var(--bulma-shadow-h), var(--bulma-shadow-s), var(--bulma-shadow-l), 0.1) !important;
16
+ }
17
+
18
+ .without-border {
19
+ border: none !important;
20
+ box-shadow: none !important;
21
+ background: transparent !important;
22
+ }
@@ -44,7 +44,10 @@ import {
44
44
 
45
45
  import {t} from "i18next";
46
46
 
47
- import {get_yesnocancel} from "./c_yui_main.js";
47
+ import {yui_shell_confirm_yesnocancel} from "./shell_modals.js";
48
+ import {yui_shell_of} from "./c_yui_shell.js";
49
+
50
+ import "./c_yui_window.css";
48
51
 
49
52
  /***************************************************************
50
53
  * Constants
@@ -672,8 +675,11 @@ function close_window(gobj)
672
675
  gobj_stop_children(gobj);
673
676
  gobj_destroy(gobj);
674
677
  } else if(kw_close.warning) {
675
- get_yesnocancel(kw_close.warning, function(resp) {
676
- if(resp === "yes") {
678
+ yui_shell_confirm_yesnocancel(
679
+ yui_shell_of(gobj), kw_close.warning,
680
+ {t: t, yes_label: "yes", no_label: "no", cancel_label: "cancel"}
681
+ ).then(function(answer) {
682
+ if(answer === "yes") {
677
683
  if(on_close) {
678
684
  on_close();
679
685
  }