@jsenv/navi 0.23.5 → 0.23.7

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.
@@ -6743,6 +6743,15 @@ const prepareStyleValue = (
6743
6743
  return mergedValue;
6744
6744
  };
6745
6745
 
6746
+ const negativeEntries = (map) => {
6747
+ const result = {};
6748
+ for (const key of Object.keys(map)) {
6749
+ result[`-${key}`] = `calc(-1 * ${map[key]})`;
6750
+ }
6751
+ return result;
6752
+ };
6753
+
6754
+
6746
6755
  // Unified design scale using t-shirt sizes with rem units for accessibility.
6747
6756
  // This scale is used for spacing to create visual harmony
6748
6757
  // and consistent proportions throughout the design system.
@@ -6755,6 +6764,7 @@ const SIZE_MAP = {
6755
6764
  xl: "var(--navi-xl)",
6756
6765
  xxl: "var(--navi-xxl)",
6757
6766
  };
6767
+ Object.assign(SIZE_MAP, negativeEntries(SIZE_MAP));
6758
6768
  const TYPO_SIZE_MAP = {
6759
6769
  xxs: "var(--navi-typo-xxs)",
6760
6770
  xs: "var(--navi-typo-xs)",
@@ -6764,6 +6774,7 @@ const TYPO_SIZE_MAP = {
6764
6774
  xl: "var(--navi-typo-xl)",
6765
6775
  xxl: "var(--navi-typo-xxl)",
6766
6776
  };
6777
+ Object.assign(TYPO_SIZE_MAP, negativeEntries(TYPO_SIZE_MAP));
6767
6778
  const sizeSpacingScaleKeys = new Set(Object.keys(SIZE_MAP));
6768
6779
  const isSizeSpacingScaleKey = (key) => {
6769
6780
  return sizeSpacingScaleKeys.has(key);
@@ -22387,10 +22398,30 @@ const css$q = /* css */`
22387
22398
  --x-link-text-decoration-hover: var(--link-text-decoration-hover);
22388
22399
  --x-link-cursor: var(--link-cursor);
22389
22400
 
22401
+ /* Resolve padding shorthands into directional vars */
22402
+ --x-link-padding-top: var(
22403
+ --link-padding-top,
22404
+ var(--link-padding-y, var(--link-padding, 0px))
22405
+ );
22406
+ --x-link-padding-right: var(
22407
+ --link-padding-right,
22408
+ var(--link-padding-x, var(--link-padding, 0px))
22409
+ );
22410
+ --x-link-padding-bottom: var(
22411
+ --link-padding-bottom,
22412
+ var(--link-padding-y, var(--link-padding, 0px))
22413
+ );
22414
+ --x-link-padding-left: var(
22415
+ --link-padding-left,
22416
+ var(--link-padding-x, var(--link-padding, 0px))
22417
+ );
22418
+
22390
22419
  position: relative;
22391
22420
  aspect-ratio: inherit;
22392
- /* Ensure the spacing for the loading outline is part of the <a> so that it does not create an overflow */
22393
- padding: var(--link-loading-outline-size);
22421
+ padding-top: calc(var(--x-link-padding-top) + var(--link-loading-outline-size));
22422
+ padding-right: calc(var(--x-link-padding-right) + var(--link-loading-outline-size));
22423
+ padding-bottom: calc(var(--x-link-padding-bottom) + var(--link-loading-outline-size));
22424
+ padding-left: calc(var(--x-link-padding-left) + var(--link-loading-outline-size));
22394
22425
  color: var(--x-link-color);
22395
22426
  text-decoration: var(--x-link-text-decoration);
22396
22427
  background: var(--x-link-background);
@@ -22611,6 +22642,13 @@ const css$q = /* css */`
22611
22642
  const LinkStyleCSSVars = {
22612
22643
  "outlineColor": "--link-outline-color",
22613
22644
  "borderRadius": "--link-border-radius",
22645
+ "padding": "--link-padding",
22646
+ "paddingX": "--link-padding-x",
22647
+ "paddingY": "--link-padding-y",
22648
+ "paddingTop": "--link-padding-top",
22649
+ "paddingRight": "--link-padding-right",
22650
+ "paddingBottom": "--link-padding-bottom",
22651
+ "paddingLeft": "--link-padding-left",
22614
22652
  "color": "--link-color",
22615
22653
  "cursor": "--link-cursor",
22616
22654
  "textDecoration": "--link-text-decoration",