@jsenv/navi 0.26.13 → 0.26.14

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.
@@ -8199,6 +8199,19 @@ installImportMetaCssBuild(import.meta);/**
8199
8199
  * style can only be determined once the node is available.
8200
8200
  */
8201
8201
  import.meta.css = [/* css */`
8202
+ @layer navi {
8203
+ /*
8204
+ When using square/circle/aspectRatio prop we expect box to respect the aspect ratio.
8205
+ But within flex containers or stuff like that the min-width/min-height auto
8206
+ will prevent the item from shrinking to respect aspect-ratio
8207
+ We put that in a layer navi + a specific attribute so that it's very easy to override this
8208
+ */
8209
+ [navi-aspect-ratio] {
8210
+ min-width: 0;
8211
+ min-height: 0;
8212
+ }
8213
+ }
8214
+
8202
8215
  [navi-box-flow="inline"] {
8203
8216
  display: inline;
8204
8217
  }
@@ -8694,12 +8707,14 @@ const Box = props => {
8694
8707
  // Flatten nested arrays (e.g., from .map()) to treat each element as individual child
8695
8708
  innerChildren = applySeparatorOnChildren(innerChildren, separator);
8696
8709
  }
8710
+ const aspectRatio = rest.square || rest.circle ? "1/1" : rest.aspectRatio;
8697
8711
  return jsx(TagName, {
8698
8712
  ref: ref,
8699
8713
  className: innerClassName,
8700
8714
  "navi-box-flow": boxFlowIsDefault ? undefined : boxFlow,
8701
8715
  "navi-box-flow-row": row ? "" : undefined,
8702
8716
  "navi-box-flow-column": column ? "" : undefined,
8717
+ "navi-aspect-ratio": aspectRatio ? aspectRatio : undefined,
8703
8718
  "data-visual-selector": visualSelector,
8704
8719
  ...selfForwardedProps,
8705
8720
  children: jsx(BoxFlowContext.Provider, {