@jsenv/navi 0.12.2 → 0.12.4

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.
@@ -2199,121 +2199,122 @@ const ARROW_SPACING = 8;
2199
2199
 
2200
2200
  import.meta.css = /* css */ `
2201
2201
  @layer navi {
2202
- :root {
2203
- --navi-callout-background-color: white;
2204
- --navi-callout-padding: 8px;
2205
- }
2206
-
2207
2202
  .navi_callout {
2208
- position: absolute;
2209
- top: 0;
2210
- left: 0;
2211
- z-index: 1;
2212
- display: block;
2213
- height: auto;
2214
- opacity: 0;
2215
- /* will be positioned with transform: translate */
2216
- transition: opacity 0.2s ease-in-out;
2217
- overflow: visible;
2203
+ --background-color: white;
2204
+ --padding: 8px;
2218
2205
  }
2206
+ }
2219
2207
 
2220
- .navi_callout_frame {
2221
- position: absolute;
2222
- filter: drop-shadow(4px 4px 3px rgba(0, 0, 0, 0.2));
2223
- pointer-events: none;
2224
- }
2225
- .navi_callout[data-level="info"] .navi_callout_border {
2226
- fill: var(--navi-info-color);
2227
- }
2228
- .navi_callout[data-level="warning"] .navi_callout_border {
2229
- fill: var(--navi-warning-color);
2230
- }
2231
- .navi_callout[data-level="error"] .navi_callout_border {
2232
- fill: var(--navi-error-color);
2233
- }
2234
- .navi_callout_frame svg {
2235
- position: absolute;
2236
- inset: 0;
2237
- overflow: visible;
2238
- }
2239
- .navi_callout_background {
2240
- fill: var(--navi-callout-background-color);
2241
- }
2208
+ .navi_callout {
2209
+ position: absolute;
2210
+ top: 0;
2211
+ left: 0;
2212
+ z-index: 1;
2213
+ display: block;
2214
+ height: auto;
2215
+ opacity: 0;
2216
+ /* will be positioned with transform: translate */
2217
+ transition: opacity 0.2s ease-in-out;
2218
+ overflow: visible;
2242
2219
 
2243
- .navi_callout_box {
2244
- position: relative;
2245
- border-style: solid;
2246
- border-color: transparent;
2247
- }
2248
- .navi_callout_body {
2249
- position: relative;
2250
- display: flex;
2251
- max-width: 47vw;
2252
- padding: var(--navi-callout-padding);
2253
- flex-direction: row;
2254
- gap: 10px;
2255
- }
2256
- .navi_callout_icon {
2257
- display: flex;
2258
- width: 22px;
2259
- height: 22px;
2260
- flex-shrink: 0;
2261
- align-items: center;
2262
- align-self: flex-start;
2263
- justify-content: center;
2264
- border-radius: 2px;
2265
- }
2266
- .navi_callout_icon_svg {
2267
- width: 16px;
2268
- height: 12px;
2269
- color: white;
2270
- }
2271
- .navi_callout[data-level="info"] .navi_callout_icon {
2272
- background-color: var(--navi-info-color);
2273
- }
2274
- .navi_callout[data-level="warning"] .navi_callout_icon {
2275
- background-color: var(--navi-warning-color);
2276
- }
2277
- .navi_callout[data-level="error"] .navi_callout_icon {
2278
- background-color: var(--navi-error-color);
2279
- }
2280
- .navi_callout_message {
2281
- min-width: 0;
2282
- align-self: center;
2283
- word-break: break-word;
2284
- overflow-wrap: anywhere;
2285
- }
2286
- .navi_callout_message iframe {
2287
- display: block;
2288
- margin: 0;
2289
- }
2290
- .navi_callout_close_button_column {
2291
- display: flex;
2292
- height: 22px;
2293
- }
2294
- .navi_callout_close_button {
2295
- width: 1em;
2296
- height: 1em;
2297
- padding: 0;
2298
- align-self: center;
2299
- color: currentColor;
2300
- font-size: inherit;
2301
- background: none;
2302
- border: none;
2303
- border-radius: 0.2em;
2304
- cursor: pointer;
2305
- }
2306
- .navi_callout_close_button:hover {
2307
- background: rgba(0, 0, 0, 0.1);
2308
- }
2309
- .navi_callout_close_button_svg {
2310
- width: 100%;
2311
- height: 100%;
2312
- }
2313
- .navi_callout_error_stack {
2314
- max-height: 200px;
2315
- overflow: auto;
2316
- }
2220
+ --x-border-color: var(--x-level-color);
2221
+ --x-icon-color: var(--x-level-color);
2222
+ --x-background-color: var(--background-color);
2223
+ }
2224
+
2225
+ .navi_callout_frame {
2226
+ position: absolute;
2227
+ filter: drop-shadow(4px 4px 3px rgba(0, 0, 0, 0.2));
2228
+ pointer-events: none;
2229
+ }
2230
+ .navi_callout .navi_callout_border {
2231
+ fill: var(--x-border-color);
2232
+ }
2233
+ .navi_callout[data-level="info"] {
2234
+ --x-level-color: var(--navi-info-color);
2235
+ }
2236
+ .navi_callout[data-level="warning"] {
2237
+ --x-level-color: var(--navi-warning-color);
2238
+ }
2239
+ .navi_callout[data-level="error"] {
2240
+ --x-level-color: var(--navi-error-color);
2241
+ }
2242
+
2243
+ .navi_callout_frame svg {
2244
+ position: absolute;
2245
+ inset: 0;
2246
+ overflow: visible;
2247
+ }
2248
+ .navi_callout_background {
2249
+ fill: var(--x-background-color);
2250
+ }
2251
+
2252
+ .navi_callout_box {
2253
+ position: relative;
2254
+ border-style: solid;
2255
+ border-color: transparent;
2256
+ }
2257
+ .navi_callout_body {
2258
+ position: relative;
2259
+ display: flex;
2260
+ max-width: 47vw;
2261
+ padding: var(--padding);
2262
+ flex-direction: row;
2263
+ gap: 10px;
2264
+ }
2265
+ .navi_callout_icon {
2266
+ display: flex;
2267
+ width: 22px;
2268
+ height: 22px;
2269
+ flex-shrink: 0;
2270
+ align-items: center;
2271
+ align-self: flex-start;
2272
+ justify-content: center;
2273
+ background-color: var(--x-icon-color);
2274
+ border-radius: 2px;
2275
+ }
2276
+ .navi_callout_icon_svg {
2277
+ width: 16px;
2278
+ height: 12px;
2279
+ color: white;
2280
+ }
2281
+
2282
+ .navi_callout_message {
2283
+ min-width: 0;
2284
+ align-self: center;
2285
+ word-break: break-word;
2286
+ overflow-wrap: anywhere;
2287
+ }
2288
+ .navi_callout_message iframe {
2289
+ display: block;
2290
+ margin: 0;
2291
+ }
2292
+ .navi_callout_close_button_column {
2293
+ display: flex;
2294
+ height: 22px;
2295
+ }
2296
+ .navi_callout_close_button {
2297
+ width: 1em;
2298
+ height: 1em;
2299
+ padding: 0;
2300
+ align-self: center;
2301
+ color: currentColor;
2302
+ font-size: inherit;
2303
+ background: none;
2304
+ border: none;
2305
+ border-radius: 0.2em;
2306
+ cursor: pointer;
2307
+ }
2308
+ .navi_callout_close_button:hover {
2309
+ background: rgba(0, 0, 0, 0.1);
2310
+ }
2311
+ .navi_callout_close_button_svg {
2312
+ width: 100%;
2313
+ height: 100%;
2314
+ }
2315
+ .navi_callout_error_stack {
2316
+ max-height: 200px;
2317
+ overflow: auto;
2317
2318
  }
2318
2319
  `;
2319
2320
 
@@ -14037,12 +14038,6 @@ const useUIState = (uiStateController) => {
14037
14038
 
14038
14039
  installImportMetaCss(import.meta);import.meta.css = /* css */`
14039
14040
  @layer navi {
14040
- :root {
14041
- --navi-checkbox-color: light-dark(#4476ff, #3b82f6);
14042
- --navi-checkmark-color-light: white;
14043
- --navi-checkmark-color-dark: rgb(55, 55, 55);
14044
- }
14045
-
14046
14041
  .navi_checkbox {
14047
14042
  --outline-offset: 1px;
14048
14043
  --outline-width: 2px;
@@ -14054,8 +14049,10 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
14054
14049
  --outline-color: light-dark(#4476ff, #3b82f6);
14055
14050
  --border-color: light-dark(#767676, #8e8e93);
14056
14051
  --background-color: white;
14057
- --color: var(--navi-checkbox-color);
14058
- --checkmark-color: var(--navi-checkmark-color-light);
14052
+ --color: light-dark(#4476ff, #3b82f6);
14053
+ --checkmark-color-light: white;
14054
+ --checkmark-color-dark: rgb(55, 55, 55);
14055
+ --checkmark-color: var(--checkmark-color-light);
14059
14056
 
14060
14057
  --color-mix-light: black;
14061
14058
  --color-mix-dark: white;
@@ -14319,8 +14316,8 @@ const InputCheckboxBasic = props => {
14319
14316
  const renderCheckboxMemoized = useCallback(renderCheckbox, [innerName, checked, innerRequired]);
14320
14317
  useLayoutEffect(() => {
14321
14318
  const naviCheckbox = ref.current;
14322
- const lightColor = "var(--navi-checkmark-color-light)";
14323
- const darkColor = "var(--navi-checkmark-color-dark)";
14319
+ const lightColor = "var(--checkmark-color-light)";
14320
+ const darkColor = "var(--checkmark-color-dark)";
14324
14321
  const colorPicked = pickLightOrDark("var(--color)", lightColor, darkColor, naviCheckbox);
14325
14322
  if (colorPicked === lightColor) {
14326
14323
  naviCheckbox.removeAttribute("data-dark");
@@ -14432,10 +14429,6 @@ const InputCheckboxInsideForm = InputCheckboxBasic;
14432
14429
 
14433
14430
  installImportMetaCss(import.meta);import.meta.css = /* css */`
14434
14431
  @layer navi {
14435
- :root {
14436
- --navi-radiomark-color: light-dark(#4476ff, #3b82f6);
14437
- }
14438
-
14439
14432
  .navi_radio {
14440
14433
  --outline-offset: 1px;
14441
14434
  --outline-width: 2px;
@@ -14445,7 +14438,7 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
14445
14438
  --outline-color: light-dark(#4476ff, #3b82f6);
14446
14439
  --border-color: light-dark(#767676, #8e8e93);
14447
14440
  --background-color: white;
14448
- --color: var(--navi-radiomark-color);
14441
+ --color: light-dark(#4476ff, #3b82f6);
14449
14442
  --radiomark-color: var(--color);
14450
14443
  --border-color-checked: var(--color);
14451
14444
 
@@ -14827,8 +14820,6 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
14827
14820
  --border-width: 1px;
14828
14821
  --outline-width: 1px;
14829
14822
  --outer-width: calc(var(--border-width) + var(--outline-width));
14830
- --padding-x: 2px;
14831
- --padding-y: 1px;
14832
14823
 
14833
14824
  /* Default */
14834
14825
  --outline-color: light-dark(#4476ff, #3b82f6);
@@ -14888,10 +14879,13 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
14888
14879
 
14889
14880
  .navi_input .navi_native_input {
14890
14881
  box-sizing: border-box;
14891
- padding-top: var(--padding-top, var(--padding-y, var(--padding)));
14892
- padding-right: var(--padding-right, var(--padding-x, var(--padding)));
14893
- padding-bottom: var(--padding-bottom, var(--padding-y, var(--padding)));
14894
- padding-left: var(--padding-left, var(--padding-x, var(--padding)));
14882
+ padding-top: var(--padding-top, var(--padding-y, var(--padding, 1px)));
14883
+ padding-right: var(--padding-right, var(--padding-x, var(--padding, 2px)));
14884
+ padding-bottom: var(
14885
+ --padding-bottom,
14886
+ var(--padding-y, var(--padding, 1px))
14887
+ );
14888
+ padding-left: var(--padding-left, var(--padding-x, var(--padding, 2px)));
14895
14889
  color: var(--x-color);
14896
14890
  background-color: var(--x-background-color);
14897
14891
  border-width: var(--x-outer-width);
@@ -15430,8 +15424,6 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
15430
15424
  --outline-width: 1px;
15431
15425
  --border-width: 1px;
15432
15426
  --border-radius: 2px;
15433
- --padding-x: 6px;
15434
- --padding-y: 1px;
15435
15427
  /* default */
15436
15428
  --outline-color: light-dark(#4476ff, #3b82f6);
15437
15429
  --border-color: light-dark(#767676, #8e8e93);
@@ -15491,10 +15483,13 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
15491
15483
  }
15492
15484
  .navi_button_content {
15493
15485
  position: relative;
15494
- padding-top: var(--padding-top, var(--padding-y, var(--padding)));
15495
- padding-right: var(--padding-right, var(--padding-x, var(--padding)));
15496
- padding-bottom: var(--padding-bottom, var(--padding-y, var(--padding)));
15497
- padding-left: var(--padding-left, var(--padding-x, var(--padding)));
15486
+ padding-top: var(--padding-top, var(--padding-y, var(--padding, 1px)));
15487
+ padding-right: var(--padding-right, var(--padding-x, var(--padding, 6px)));
15488
+ padding-bottom: var(
15489
+ --padding-bottom,
15490
+ var(--padding-y, var(--padding, 1px))
15491
+ );
15492
+ padding-left: var(--padding-left, var(--padding-x, var(--padding, 6px)));
15498
15493
  color: var(--x-color);
15499
15494
  background-color: var(--x-background-color);
15500
15495
  border-width: var(--x-outer-width);
@@ -17585,9 +17580,11 @@ const ROW_MAX_HEIGHT = 100;
17585
17580
  const COLUMN_MIN_WIDTH = 50;
17586
17581
  const COLUMN_MAX_WIDTH = 500;
17587
17582
  import.meta.css = /* css */`
17588
- body {
17589
- --table-resizer-handle-color: #063b7c;
17590
- --table-resizer-color: #387ec9;
17583
+ @layer navi {
17584
+ .navi_table {
17585
+ --table-resizer-handle-color: #063b7c;
17586
+ --table-resizer-color: #387ec9;
17587
+ }
17591
17588
  }
17592
17589
 
17593
17590
  .navi_table_cell {
@@ -17603,10 +17600,10 @@ import.meta.css = /* css */`
17603
17600
  }
17604
17601
  .navi_table_cell_resize_handle[data-left],
17605
17602
  .navi_table_cell_resize_handle[data-right] {
17606
- cursor: ew-resize;
17607
17603
  top: 0;
17608
17604
  bottom: 0;
17609
17605
  width: 8px;
17606
+ cursor: ew-resize;
17610
17607
  }
17611
17608
  .navi_table_cell_resize_handle[data-left] {
17612
17609
  left: 0;
@@ -17617,10 +17614,10 @@ import.meta.css = /* css */`
17617
17614
 
17618
17615
  .navi_table_cell_resize_handle[data-top],
17619
17616
  .navi_table_cell_resize_handle[data-bottom] {
17620
- cursor: ns-resize;
17621
- left: 0;
17622
17617
  right: 0;
17618
+ left: 0;
17623
17619
  height: 8px;
17620
+ cursor: ns-resize;
17624
17621
  }
17625
17622
  .navi_table_cell_resize_handle[data-top] {
17626
17623
  top: 0;
@@ -17630,25 +17627,25 @@ import.meta.css = /* css */`
17630
17627
  }
17631
17628
 
17632
17629
  .navi_table_column_resizer {
17633
- pointer-events: none;
17634
17630
  position: absolute;
17631
+ top: var(--table-visual-top);
17635
17632
  left: var(--table-column-resizer-left);
17636
17633
  width: 10px;
17637
- top: var(--table-visual-top);
17638
17634
  height: var(--table-visual-height);
17639
17635
  opacity: 0;
17636
+ pointer-events: none;
17640
17637
  }
17641
17638
  .navi_table_column_resize_handle {
17642
17639
  position: absolute;
17643
- height: 100%;
17644
17640
  top: 50%;
17645
- transform: translateY(-50%);
17646
- border-radius: 15px;
17647
- background: var(--table-resizer-handle-color);
17648
17641
  /* opacity: 0.5; */
17649
17642
  width: 5px;
17643
+ height: 100%;
17650
17644
  height: 26px;
17651
17645
  max-height: 80%;
17646
+ background: var(--table-resizer-handle-color);
17647
+ border-radius: 15px;
17648
+ transform: translateY(-50%);
17652
17649
  }
17653
17650
  .navi_table_column_resize_handle[data-left] {
17654
17651
  left: 2px;
@@ -17659,16 +17656,16 @@ import.meta.css = /* css */`
17659
17656
  .navi_table_column_resize_handle_container {
17660
17657
  position: absolute;
17661
17658
  top: 0;
17662
- left: -10px;
17663
17659
  right: 0;
17660
+ left: -10px;
17664
17661
  height: var(--table-cell-height);
17665
17662
  }
17666
17663
  .navi_table_column_resizer_line {
17667
17664
  position: absolute;
17668
17665
  top: 0;
17669
17666
  bottom: 0;
17670
- width: 5px;
17671
17667
  left: -3px;
17668
+ width: 5px;
17672
17669
  background: var(--table-resizer-color);
17673
17670
  opacity: 0;
17674
17671
  transition: opacity 0.1s ease;
@@ -17685,25 +17682,25 @@ import.meta.css = /* css */`
17685
17682
  }
17686
17683
 
17687
17684
  .navi_table_row_resizer {
17688
- pointer-events: none;
17689
17685
  position: absolute;
17686
+ top: var(--table-row-resizer-top);
17690
17687
  left: var(--table-visual-left);
17691
17688
  width: var(--table-visual-width);
17692
- top: var(--table-row-resizer-top);
17693
17689
  height: 10px;
17694
17690
  opacity: 0;
17691
+ pointer-events: none;
17695
17692
  }
17696
17693
  .navi_table_row_resize_handle {
17697
17694
  position: absolute;
17698
- width: 100%;
17699
17695
  left: 50%;
17700
- transform: translateX(-50%);
17701
- border-radius: 15px;
17702
- background: var(--table-resizer-handle-color);
17696
+ width: 100%;
17703
17697
  /* opacity: 0.5; */
17704
17698
  width: 26px;
17705
- height: 5px;
17706
17699
  max-width: 80%;
17700
+ height: 5px;
17701
+ background: var(--table-resizer-handle-color);
17702
+ border-radius: 15px;
17703
+ transform: translateX(-50%);
17707
17704
  }
17708
17705
  .navi_table_row_resize_handle[data-top] {
17709
17706
  top: 2px;
@@ -17713,17 +17710,17 @@ import.meta.css = /* css */`
17713
17710
  }
17714
17711
  .navi_table_row_resize_handle_container {
17715
17712
  position: absolute;
17716
- left: 0;
17717
17713
  top: -10px;
17718
17714
  bottom: 0;
17715
+ left: 0;
17719
17716
  width: var(--table-cell-width);
17720
17717
  }
17721
17718
  .navi_table_row_resizer_line {
17722
17719
  position: absolute;
17723
- left: 0;
17720
+ top: -3px;
17724
17721
  right: 0;
17722
+ left: 0;
17725
17723
  height: 5px;
17726
- top: -3px;
17727
17724
  background: var(--table-resizer-color);
17728
17725
  opacity: 0;
17729
17726
  transition: opacity 0.1s ease;
@@ -18205,9 +18202,14 @@ const findPreviousTableRow = currentRow => {
18205
18202
  };
18206
18203
 
18207
18204
  installImportMetaCss(import.meta);import.meta.css = /* css */`
18208
- body {
18209
- --selection-border-color: #0078d4;
18210
- --selection-background-color: #eaf1fd;
18205
+ @layer navi {
18206
+ .navi_table {
18207
+ --selection-border-color: var(--navi-selection-border-color, #0078d4);
18208
+ --selection-background-color: var(
18209
+ --navi-selection-background-color,
18210
+ #eaf1fd
18211
+ );
18212
+ }
18211
18213
  }
18212
18214
 
18213
18215
  .navi_table_cell[aria-selected="true"] {
@@ -18771,10 +18773,12 @@ const useTableStickyContextValue = ({
18771
18773
  };
18772
18774
 
18773
18775
  installImportMetaCss(import.meta);import.meta.css = /* css */`
18774
- body {
18775
- --sticky-frontier-color: #c0c0c0;
18776
- --sticky-frontier-size: 12px;
18777
- --sticky-frontier-ghost-size: 8px;
18776
+ @layer navi {
18777
+ .navi_table {
18778
+ --sticky-frontier-color: #c0c0c0;
18779
+ --sticky-frontier-size: 12px;
18780
+ --sticky-frontier-ghost-size: 8px;
18781
+ }
18778
18782
  }
18779
18783
 
18780
18784
  .navi_table_cell[data-sticky-top] {
@@ -18809,9 +18813,9 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
18809
18813
  }
18810
18814
 
18811
18815
  .navi_table_sticky_frontier[data-left] {
18816
+ top: calc(var(--table-visual-top) + var(--sticky-group-top));
18812
18817
  left: calc(var(--table-visual-left) + var(--sticky-group-left));
18813
18818
  width: var(--sticky-frontier-size);
18814
- top: calc(var(--table-visual-top) + var(--sticky-group-top));
18815
18819
  height: calc(var(--table-visual-height) - var(--sticky-group-top));
18816
18820
  background: linear-gradient(
18817
18821
  to right,
@@ -18821,9 +18825,9 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
18821
18825
  }
18822
18826
 
18823
18827
  .navi_table_sticky_frontier[data-top] {
18828
+ top: calc(var(--table-visual-top) + var(--sticky-group-top));
18824
18829
  left: calc(var(--table-visual-left) + var(--sticky-group-left));
18825
18830
  width: calc(var(--table-visual-width) - var(--sticky-group-left));
18826
- top: calc(var(--table-visual-top) + var(--sticky-group-top));
18827
18831
  height: var(--sticky-frontier-size);
18828
18832
  background: linear-gradient(
18829
18833
  to bottom,
@@ -18835,8 +18839,8 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
18835
18839
  .navi_table_sticky_frontier_ghost,
18836
18840
  .navi_table_sticky_frontier_preview {
18837
18841
  position: absolute;
18838
- pointer-events: none;
18839
18842
  opacity: 0;
18843
+ pointer-events: none;
18840
18844
  }
18841
18845
  .navi_table_sticky_frontier_ghost {
18842
18846
  z-index: ${Z_INDEX_STICKY_FRONTIER_GHOST};
@@ -20149,8 +20153,6 @@ const useSignalSync = (value, initialValue = value) => {
20149
20153
  return signal;
20150
20154
  };
20151
20155
 
20152
- const withPropsStyle = () => {};
20153
-
20154
20156
  installImportMetaCss(import.meta);import.meta.css = /* css */`
20155
20157
  .navi_font_sized_svg {
20156
20158
  display: flex;
@@ -20163,16 +20165,13 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
20163
20165
  }
20164
20166
  `;
20165
20167
  const FontSizedSvg = ({
20166
- width = "1em",
20167
- height = "1em",
20168
20168
  children,
20169
20169
  ...rest
20170
20170
  }) => {
20171
- const [remainingProps, innerStyle] = withPropsStyle();
20172
- return jsx("span", {
20173
- ...remainingProps,
20174
- className: "navi_font_sized_svg",
20175
- style: innerStyle,
20171
+ return jsx(Box, {
20172
+ ...rest,
20173
+ as: "span",
20174
+ baseClassName: "navi_font_sized_svg",
20176
20175
  children: children
20177
20176
  });
20178
20177
  };