@jsenv/navi 0.12.2 → 0.12.3

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
 
@@ -17585,9 +17578,11 @@ const ROW_MAX_HEIGHT = 100;
17585
17578
  const COLUMN_MIN_WIDTH = 50;
17586
17579
  const COLUMN_MAX_WIDTH = 500;
17587
17580
  import.meta.css = /* css */`
17588
- body {
17589
- --table-resizer-handle-color: #063b7c;
17590
- --table-resizer-color: #387ec9;
17581
+ @layer navi {
17582
+ .navi_table {
17583
+ --table-resizer-handle-color: #063b7c;
17584
+ --table-resizer-color: #387ec9;
17585
+ }
17591
17586
  }
17592
17587
 
17593
17588
  .navi_table_cell {
@@ -17603,10 +17598,10 @@ import.meta.css = /* css */`
17603
17598
  }
17604
17599
  .navi_table_cell_resize_handle[data-left],
17605
17600
  .navi_table_cell_resize_handle[data-right] {
17606
- cursor: ew-resize;
17607
17601
  top: 0;
17608
17602
  bottom: 0;
17609
17603
  width: 8px;
17604
+ cursor: ew-resize;
17610
17605
  }
17611
17606
  .navi_table_cell_resize_handle[data-left] {
17612
17607
  left: 0;
@@ -17617,10 +17612,10 @@ import.meta.css = /* css */`
17617
17612
 
17618
17613
  .navi_table_cell_resize_handle[data-top],
17619
17614
  .navi_table_cell_resize_handle[data-bottom] {
17620
- cursor: ns-resize;
17621
- left: 0;
17622
17615
  right: 0;
17616
+ left: 0;
17623
17617
  height: 8px;
17618
+ cursor: ns-resize;
17624
17619
  }
17625
17620
  .navi_table_cell_resize_handle[data-top] {
17626
17621
  top: 0;
@@ -17630,25 +17625,25 @@ import.meta.css = /* css */`
17630
17625
  }
17631
17626
 
17632
17627
  .navi_table_column_resizer {
17633
- pointer-events: none;
17634
17628
  position: absolute;
17629
+ top: var(--table-visual-top);
17635
17630
  left: var(--table-column-resizer-left);
17636
17631
  width: 10px;
17637
- top: var(--table-visual-top);
17638
17632
  height: var(--table-visual-height);
17639
17633
  opacity: 0;
17634
+ pointer-events: none;
17640
17635
  }
17641
17636
  .navi_table_column_resize_handle {
17642
17637
  position: absolute;
17643
- height: 100%;
17644
17638
  top: 50%;
17645
- transform: translateY(-50%);
17646
- border-radius: 15px;
17647
- background: var(--table-resizer-handle-color);
17648
17639
  /* opacity: 0.5; */
17649
17640
  width: 5px;
17641
+ height: 100%;
17650
17642
  height: 26px;
17651
17643
  max-height: 80%;
17644
+ background: var(--table-resizer-handle-color);
17645
+ border-radius: 15px;
17646
+ transform: translateY(-50%);
17652
17647
  }
17653
17648
  .navi_table_column_resize_handle[data-left] {
17654
17649
  left: 2px;
@@ -17659,16 +17654,16 @@ import.meta.css = /* css */`
17659
17654
  .navi_table_column_resize_handle_container {
17660
17655
  position: absolute;
17661
17656
  top: 0;
17662
- left: -10px;
17663
17657
  right: 0;
17658
+ left: -10px;
17664
17659
  height: var(--table-cell-height);
17665
17660
  }
17666
17661
  .navi_table_column_resizer_line {
17667
17662
  position: absolute;
17668
17663
  top: 0;
17669
17664
  bottom: 0;
17670
- width: 5px;
17671
17665
  left: -3px;
17666
+ width: 5px;
17672
17667
  background: var(--table-resizer-color);
17673
17668
  opacity: 0;
17674
17669
  transition: opacity 0.1s ease;
@@ -17685,25 +17680,25 @@ import.meta.css = /* css */`
17685
17680
  }
17686
17681
 
17687
17682
  .navi_table_row_resizer {
17688
- pointer-events: none;
17689
17683
  position: absolute;
17684
+ top: var(--table-row-resizer-top);
17690
17685
  left: var(--table-visual-left);
17691
17686
  width: var(--table-visual-width);
17692
- top: var(--table-row-resizer-top);
17693
17687
  height: 10px;
17694
17688
  opacity: 0;
17689
+ pointer-events: none;
17695
17690
  }
17696
17691
  .navi_table_row_resize_handle {
17697
17692
  position: absolute;
17698
- width: 100%;
17699
17693
  left: 50%;
17700
- transform: translateX(-50%);
17701
- border-radius: 15px;
17702
- background: var(--table-resizer-handle-color);
17694
+ width: 100%;
17703
17695
  /* opacity: 0.5; */
17704
17696
  width: 26px;
17705
- height: 5px;
17706
17697
  max-width: 80%;
17698
+ height: 5px;
17699
+ background: var(--table-resizer-handle-color);
17700
+ border-radius: 15px;
17701
+ transform: translateX(-50%);
17707
17702
  }
17708
17703
  .navi_table_row_resize_handle[data-top] {
17709
17704
  top: 2px;
@@ -17713,17 +17708,17 @@ import.meta.css = /* css */`
17713
17708
  }
17714
17709
  .navi_table_row_resize_handle_container {
17715
17710
  position: absolute;
17716
- left: 0;
17717
17711
  top: -10px;
17718
17712
  bottom: 0;
17713
+ left: 0;
17719
17714
  width: var(--table-cell-width);
17720
17715
  }
17721
17716
  .navi_table_row_resizer_line {
17722
17717
  position: absolute;
17723
- left: 0;
17718
+ top: -3px;
17724
17719
  right: 0;
17720
+ left: 0;
17725
17721
  height: 5px;
17726
- top: -3px;
17727
17722
  background: var(--table-resizer-color);
17728
17723
  opacity: 0;
17729
17724
  transition: opacity 0.1s ease;
@@ -18205,9 +18200,14 @@ const findPreviousTableRow = currentRow => {
18205
18200
  };
18206
18201
 
18207
18202
  installImportMetaCss(import.meta);import.meta.css = /* css */`
18208
- body {
18209
- --selection-border-color: #0078d4;
18210
- --selection-background-color: #eaf1fd;
18203
+ @layer navi {
18204
+ .navi_table {
18205
+ --selection-border-color: var(--navi-selection-border-color, #0078d4);
18206
+ --selection-background-color: var(
18207
+ --navi-selection-background-color,
18208
+ #eaf1fd
18209
+ );
18210
+ }
18211
18211
  }
18212
18212
 
18213
18213
  .navi_table_cell[aria-selected="true"] {
@@ -18771,10 +18771,12 @@ const useTableStickyContextValue = ({
18771
18771
  };
18772
18772
 
18773
18773
  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;
18774
+ @layer navi {
18775
+ .navi_table {
18776
+ --sticky-frontier-color: #c0c0c0;
18777
+ --sticky-frontier-size: 12px;
18778
+ --sticky-frontier-ghost-size: 8px;
18779
+ }
18778
18780
  }
18779
18781
 
18780
18782
  .navi_table_cell[data-sticky-top] {
@@ -18809,9 +18811,9 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
18809
18811
  }
18810
18812
 
18811
18813
  .navi_table_sticky_frontier[data-left] {
18814
+ top: calc(var(--table-visual-top) + var(--sticky-group-top));
18812
18815
  left: calc(var(--table-visual-left) + var(--sticky-group-left));
18813
18816
  width: var(--sticky-frontier-size);
18814
- top: calc(var(--table-visual-top) + var(--sticky-group-top));
18815
18817
  height: calc(var(--table-visual-height) - var(--sticky-group-top));
18816
18818
  background: linear-gradient(
18817
18819
  to right,
@@ -18821,9 +18823,9 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
18821
18823
  }
18822
18824
 
18823
18825
  .navi_table_sticky_frontier[data-top] {
18826
+ top: calc(var(--table-visual-top) + var(--sticky-group-top));
18824
18827
  left: calc(var(--table-visual-left) + var(--sticky-group-left));
18825
18828
  width: calc(var(--table-visual-width) - var(--sticky-group-left));
18826
- top: calc(var(--table-visual-top) + var(--sticky-group-top));
18827
18829
  height: var(--sticky-frontier-size);
18828
18830
  background: linear-gradient(
18829
18831
  to bottom,
@@ -18835,8 +18837,8 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
18835
18837
  .navi_table_sticky_frontier_ghost,
18836
18838
  .navi_table_sticky_frontier_preview {
18837
18839
  position: absolute;
18838
- pointer-events: none;
18839
18840
  opacity: 0;
18841
+ pointer-events: none;
18840
18842
  }
18841
18843
  .navi_table_sticky_frontier_ghost {
18842
18844
  z-index: ${Z_INDEX_STICKY_FRONTIER_GHOST};
@@ -20149,8 +20151,6 @@ const useSignalSync = (value, initialValue = value) => {
20149
20151
  return signal;
20150
20152
  };
20151
20153
 
20152
- const withPropsStyle = () => {};
20153
-
20154
20154
  installImportMetaCss(import.meta);import.meta.css = /* css */`
20155
20155
  .navi_font_sized_svg {
20156
20156
  display: flex;
@@ -20163,16 +20163,13 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
20163
20163
  }
20164
20164
  `;
20165
20165
  const FontSizedSvg = ({
20166
- width = "1em",
20167
- height = "1em",
20168
20166
  children,
20169
20167
  ...rest
20170
20168
  }) => {
20171
- const [remainingProps, innerStyle] = withPropsStyle();
20172
- return jsx("span", {
20173
- ...remainingProps,
20174
- className: "navi_font_sized_svg",
20175
- style: innerStyle,
20169
+ return jsx(Box, {
20170
+ ...rest,
20171
+ as: "span",
20172
+ baseClassName: "navi_font_sized_svg",
20176
20173
  children: children
20177
20174
  });
20178
20175
  };