@jsenv/navi 0.29.46 → 0.29.47

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.
@@ -27021,37 +27021,45 @@ installImportMetaCssBuild(import.meta);const css$W = /* css */`
27021
27021
  --x-button-border-color: var(--callout-color);
27022
27022
  }
27023
27023
 
27024
+ /* A variant states what the caller did NOT: the frameless ones below move
27025
+ the DEFAULTS (--button-*) and never the resolved values (--x-button-*),
27026
+ so a backgroundColor/background/borderColor prop — which lands inline on
27027
+ this same element — still wins. Two things come with that: the
27028
+ transparent default is written as a fallback of --button-background, so
27029
+ the background prop feeds --button-background-color through it; and the
27030
+ per-state defaults are re-pointed at the base one, otherwise the @layer
27031
+ formulas (hover = 5% black over the background, readonly = the same)
27032
+ would repaint a box the variant just took away. */
27033
+
27024
27034
  /* discrete: background on hover, and nothing else — no box at rest, and no
27025
27035
  shrink when pressed. What is drawn IS the content (a chevron, a number,
27026
27036
  a word), and shrinking it under the finger reads as the content itself
27027
27037
  flinching rather than as a button being pressed. */
27028
27038
  &[data-variant="discrete"] {
27029
27039
  --button-border-width: 0;
27030
- --x-button-background-color: transparent;
27031
- --x-button-border-color: transparent;
27040
+ --button-border-color: transparent;
27041
+ --button-border-color-hover: var(--button-border-color);
27042
+ --button-border-color-current: var(--button-border-color);
27043
+ --button-border-color-readonly: var(--button-border-color);
27044
+ --button-border-color-disabled: var(--button-border-color);
27045
+ --button-background-color: var(--button-background, transparent);
27046
+ /* The hover wash is mixed INTO the background instead of replacing it:
27047
+ over the transparent default it is exactly the 8% of currentColor it
27048
+ has always been, and over a backgroundColor the caller gave it darkens
27049
+ that color rather than erasing it. */
27050
+ --button-background-color-hover: color-mix(
27051
+ in srgb,
27052
+ currentColor 8%,
27053
+ var(--button-background-color)
27054
+ );
27055
+ --button-background-color-readonly: var(--button-background-color);
27056
+ --button-background-color-disabled: var(--button-background-color);
27032
27057
 
27033
27058
  &[data-pressed] {
27034
27059
  .navi_button_content {
27035
27060
  transform: none;
27036
27061
  }
27037
27062
  }
27038
-
27039
- &[data-hover] {
27040
- --x-button-border-color: transparent;
27041
- --x-button-background-color: color-mix(
27042
- in srgb,
27043
- currentColor 8%,
27044
- transparent
27045
- );
27046
- }
27047
- &[data-readonly] {
27048
- --x-button-border-color: transparent;
27049
- --x-button-background-color: transparent;
27050
- }
27051
- &[data-disabled] {
27052
- --x-button-border-color: transparent;
27053
- --x-button-background-color: transparent;
27054
- }
27055
27063
  }
27056
27064
  /* bare: discrete, minus the background on hover. For a control whose own
27057
27065
  drawing IS the button (a carousel bullet, a swatch), where a box lighting
@@ -27060,13 +27068,16 @@ installImportMetaCssBuild(import.meta);const css$W = /* css */`
27060
27068
  on focus, commandable. */
27061
27069
  &[data-variant="bare"] {
27062
27070
  --button-border-width: 0;
27063
- --x-button-background-color: transparent;
27064
- --x-button-border-color: transparent;
27071
+ --button-border-color: transparent;
27072
+ --button-border-color-hover: var(--button-border-color);
27073
+ --button-border-color-current: var(--button-border-color);
27074
+ --button-border-color-readonly: var(--button-border-color);
27075
+ --button-border-color-disabled: var(--button-border-color);
27076
+ --button-background-color: var(--button-background, transparent);
27077
+ --button-background-color-hover: var(--button-background-color);
27078
+ --button-background-color-readonly: var(--button-background-color);
27079
+ --button-background-color-disabled: var(--button-background-color);
27065
27080
 
27066
- &[data-hover] {
27067
- --x-button-background-color: transparent;
27068
- --x-button-border-color: transparent;
27069
- }
27070
27081
  &[data-pressed] {
27071
27082
  .navi_button_content {
27072
27083
  transform: none;
@@ -27075,36 +27086,34 @@ installImportMetaCssBuild(import.meta);const css$W = /* css */`
27075
27086
  }
27076
27087
  /* discrete-border: border on hover */
27077
27088
  &[data-variant="discrete-border"] {
27078
- --x-button-background-color: transparent;
27089
+ --button-background-color: var(--button-background, transparent);
27090
+ --button-background-color-hover: var(--button-background-color);
27091
+ --button-background-color-readonly: var(--button-background-color);
27092
+ --button-background-color-disabled: var(--button-background-color);
27093
+ /* The border is the whole point of this variant: it is absent at rest
27094
+ and drawn on hover, so only the resting color goes transparent — the
27095
+ hover one keeps the @layer formula, now mixed from whatever
27096
+ borderColor the caller gave. */
27079
27097
  --x-button-border-color: transparent;
27080
27098
 
27081
27099
  &[data-hover] {
27082
27100
  --x-button-border-color: var(--button-border-color-hover);
27083
27101
  }
27084
- &[data-readonly] {
27085
- --x-button-border-color: transparent;
27086
- }
27102
+ &[data-readonly],
27087
27103
  &[data-disabled] {
27088
27104
  --x-button-border-color: transparent;
27089
27105
  }
27090
27106
  }
27091
27107
  /* border variant: no background, border only */
27092
27108
  &[data-variant="border"] {
27093
- --x-button-background-color: transparent;
27094
-
27095
- &[data-hover] {
27096
- --x-button-background-color: color-mix(
27097
- in srgb,
27098
- currentColor 8%,
27099
- transparent
27100
- );
27101
- }
27102
- &[data-readonly] {
27103
- --x-button-background-color: transparent;
27104
- }
27105
- &[data-disabled] {
27106
- --x-button-background-color: transparent;
27107
- }
27109
+ --button-background-color: var(--button-background, transparent);
27110
+ --button-background-color-hover: color-mix(
27111
+ in srgb,
27112
+ currentColor 8%,
27113
+ var(--button-background-color)
27114
+ );
27115
+ --button-background-color-readonly: var(--button-background-color);
27116
+ --button-background-color-disabled: var(--button-background-color);
27108
27117
  }
27109
27118
  /* Last word on the shrink, over whatever the variant decided: the variant
27110
27119
  guesses from how the button is drawn, and that guess is wrong as soon as
@@ -59353,14 +59362,25 @@ installImportMetaCssBuild(import.meta);const css$r = /* css */`
59353
59362
  --x-picker-border-color: var(--callout-color);
59354
59363
  }
59355
59364
 
59365
+ /* A variant states what the caller did NOT: it moves the DEFAULTS
59366
+ (--picker-*) and never the resolved values (--x-picker-*), so a
59367
+ backgroundColor/borderColor/padding prop — which lands inline on this
59368
+ same element — still wins. The per-state defaults are re-pointed at the
59369
+ base one too, otherwise the @layer formulas (hover = 5% black over the
59370
+ background, disabled = 5% grey) would repaint a box the variant just
59371
+ took away. */
59356
59372
  &[data-variant="icon"] {
59357
- --x-picker-padding-top: 0;
59358
- --x-picker-padding-right: 0;
59359
- --x-picker-padding-bottom: 0;
59360
- --x-picker-padding-left: 0;
59373
+ --picker-padding-x-default: 0;
59374
+ --picker-padding-y-default: 0;
59361
59375
  --picker-border-width: 0px; /* must carry a unit (px) — used in calc() to offset the custom input overlay */
59362
- --x-picker-border-color: transparent;
59363
- --x-picker-background-color: transparent;
59376
+ --picker-border-color: transparent;
59377
+ --picker-border-color-hover: var(--picker-border-color);
59378
+ --picker-border-color-readonly: var(--picker-border-color);
59379
+ --picker-border-color-disabled: var(--picker-border-color);
59380
+ --picker-background-color: transparent;
59381
+ --picker-background-color-hover: var(--picker-background-color);
59382
+ --picker-background-color-readonly: var(--picker-background-color);
59383
+ --picker-background-color-disabled: var(--picker-background-color);
59364
59384
  --x-picker-icon-color: currentColor;
59365
59385
  }
59366
59386
  /* discrete: no box at rest, a background on hover — the same word Button
@@ -59368,31 +59388,35 @@ installImportMetaCssBuild(import.meta);const css$r = /* css */`
59368
59388
  around it; the chevron in the right slot is what still says it opens. */
59369
59389
  &[data-variant="discrete"] {
59370
59390
  --picker-border-width: 0px; /* must carry a unit (px) — used in calc() to offset the custom input overlay */
59371
- --x-picker-border-color: transparent;
59372
- --x-picker-background-color: transparent;
59373
-
59374
- &[data-hover] {
59375
- --x-picker-border-color: transparent;
59376
- --x-picker-background-color: color-mix(
59377
- in srgb,
59378
- currentColor 8%,
59379
- transparent
59380
- );
59381
- }
59382
- &[data-readonly],
59383
- &[data-disabled] {
59384
- --x-picker-border-color: transparent;
59385
- --x-picker-background-color: transparent;
59386
- }
59391
+ --picker-border-color: transparent;
59392
+ --picker-border-color-hover: var(--picker-border-color);
59393
+ --picker-border-color-readonly: var(--picker-border-color);
59394
+ --picker-border-color-disabled: var(--picker-border-color);
59395
+ --picker-background-color: transparent;
59396
+ /* The hover wash is mixed INTO the background instead of replacing it:
59397
+ over the transparent default it is exactly the 8% of currentColor it
59398
+ has always been, and over a backgroundColor the caller gave it darkens
59399
+ that color rather than erasing it. */
59400
+ --picker-background-color-hover: color-mix(
59401
+ in srgb,
59402
+ currentColor 8%,
59403
+ var(--picker-background-color)
59404
+ );
59405
+ --picker-background-color-readonly: var(--picker-background-color);
59406
+ --picker-background-color-disabled: var(--picker-background-color);
59387
59407
  }
59388
59408
  &[data-variant="headless"] {
59389
- --x-picker-padding-top: 0;
59390
- --x-picker-padding-right: 0;
59391
- --x-picker-padding-bottom: 0;
59392
- --x-picker-padding-left: 0;
59409
+ --picker-padding-x-default: 0;
59410
+ --picker-padding-y-default: 0;
59393
59411
  --picker-border-width: 0px; /* must carry a unit (px) — used in calc() to offset the custom input overlay */
59394
- --x-picker-border-color: transparent;
59395
- --x-picker-background-color: transparent;
59412
+ --picker-border-color: transparent;
59413
+ --picker-border-color-hover: var(--picker-border-color);
59414
+ --picker-border-color-readonly: var(--picker-border-color);
59415
+ --picker-border-color-disabled: var(--picker-border-color);
59416
+ --picker-background-color: transparent;
59417
+ --picker-background-color-hover: var(--picker-background-color);
59418
+ --picker-background-color-readonly: var(--picker-background-color);
59419
+ --picker-background-color-disabled: var(--picker-background-color);
59396
59420
  --x-picker-icon-color: currentColor;
59397
59421
 
59398
59422
  .navi_picker_box {