@jsenv/navi 0.20.0 → 0.20.2

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.
@@ -19278,11 +19278,19 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
19278
19278
  }
19279
19279
  &[data-icon-char] {
19280
19280
  flex-grow: 0 !important;
19281
- }
19282
- }
19283
19281
 
19284
- .navi_icon[data-interactive] {
19285
- cursor: pointer;
19282
+ svg,
19283
+ img {
19284
+ width: 100%;
19285
+ height: 100%;
19286
+ }
19287
+ svg {
19288
+ overflow: visible;
19289
+ }
19290
+ }
19291
+ &[data-interactive] {
19292
+ cursor: pointer;
19293
+ }
19286
19294
  }
19287
19295
 
19288
19296
  .navi_icon_char_slot {
@@ -19294,15 +19302,16 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
19294
19302
  position: absolute;
19295
19303
  inset: 0;
19296
19304
  display: inline-flex;
19297
- }
19298
- .navi_icon_foreground > .navi_text {
19299
- display: flex;
19300
- aspect-ratio: 1 / 1;
19301
- min-width: 0;
19302
- height: 100%;
19303
- max-height: 1em;
19304
- align-items: center;
19305
- justify-content: center;
19305
+
19306
+ & > .navi_text {
19307
+ display: flex;
19308
+ aspect-ratio: 1 / 1;
19309
+ min-width: 0;
19310
+ height: 100%;
19311
+ max-height: 1em;
19312
+ align-items: center;
19313
+ justify-content: center;
19314
+ }
19306
19315
  }
19307
19316
 
19308
19317
  .navi_icon > svg,
@@ -19326,15 +19335,6 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
19326
19335
  width: 100%;
19327
19336
  height: 100%;
19328
19337
  }
19329
-
19330
- .navi_icon[data-icon-char] svg,
19331
- .navi_icon[data-icon-char] img {
19332
- width: 100%;
19333
- height: 100%;
19334
- }
19335
- .navi_icon[data-icon-char] svg {
19336
- overflow: visible;
19337
- }
19338
19338
  `;
19339
19339
  const Icon = ({
19340
19340
  href,
@@ -19356,20 +19356,25 @@ const Icon = ({
19356
19356
  })
19357
19357
  }) : children;
19358
19358
  let {
19359
- box,
19359
+ flex,
19360
+ grid,
19360
19361
  width,
19361
19362
  height
19362
19363
  } = props;
19363
- if (width === "auto") width = undefined;
19364
- if (height === "auto") height = undefined;
19364
+ if (width === "auto") {
19365
+ width = undefined;
19366
+ }
19367
+ if (height === "auto") {
19368
+ height = undefined;
19369
+ }
19365
19370
  const hasExplicitWidth = width !== undefined;
19366
19371
  const hasExplicitHeight = height !== undefined;
19367
- if (!hasExplicitWidth && !hasExplicitHeight) {
19368
- if (decorative === undefined && !onClick) {
19369
- decorative = true;
19372
+ if (hasExplicitWidth || hasExplicitHeight) {
19373
+ if (flex === undefined) {
19374
+ flex = "x";
19370
19375
  }
19371
- } else {
19372
- box = true;
19376
+ } else if (decorative === undefined && !onClick) {
19377
+ decorative = true;
19373
19378
  }
19374
19379
  const ariaProps = decorative ? {
19375
19380
  "aria-hidden": "true"
@@ -19382,12 +19387,12 @@ const Icon = ({
19382
19387
  children: children
19383
19388
  });
19384
19389
  }
19385
- if (box) {
19390
+ if (flex || grid) {
19386
19391
  return jsx(Box, {
19387
19392
  square: true,
19388
19393
  ...props,
19389
19394
  ...ariaProps,
19390
- box: box,
19395
+ flex: flex,
19391
19396
  baseClassName: "navi_icon",
19392
19397
  "data-has-width": hasExplicitWidth ? "" : undefined,
19393
19398
  "data-has-height": hasExplicitHeight ? "" : undefined,
@@ -31570,7 +31575,7 @@ const DialogLayout = ({
31570
31575
  visualSelector: ".navi_dialog_content",
31571
31576
  ...props,
31572
31577
  children: jsx(Box, {
31573
- row: true,
31578
+ flex: "y",
31574
31579
  className: "navi_dialog_content",
31575
31580
  alignX: alignX,
31576
31581
  alignY: alignY,