origam 2.18.18 → 2.18.20

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.
Files changed (81) hide show
  1. package/CHANGELOG.md +183 -0
  2. package/dist/src/assets/css/main.css +1 -1
  3. package/dist/src/assets/css/tokens/dark.css +124 -6
  4. package/dist/src/assets/css/tokens/light.css +62 -3
  5. package/dist/src/assets/css/tokens/origam-utilities.css +30 -0
  6. package/dist/src/assets/css/tokens/primitive.css +5 -0
  7. package/dist/src/assets/scss/tokens/_dark.scss +124 -6
  8. package/dist/src/assets/scss/tokens/_light.scss +62 -3
  9. package/dist/src/assets/scss/tokens/_origam-utilities.scss +30 -0
  10. package/dist/src/assets/scss/tokens/_primitive.scss +5 -0
  11. package/dist/src/components/Audio/OrigamAudio.vue +66 -2
  12. package/dist/src/components/Chip/OrigamChip.vue +34 -0
  13. package/dist/src/components/Field/OrigamField.vue +76 -3
  14. package/dist/src/components/List/OrigamList.vue +90 -3
  15. package/dist/src/components/Main/OrigamMain.vue +2 -2
  16. package/dist/src/components/Media/OrigamMediaScrubber.vue +11 -1
  17. package/dist/src/components/SliderField/OrigamSliderField.vue +138 -3
  18. package/dist/src/components/SliderField/OrigamSliderFieldTrack.vue +12 -1
  19. package/dist/src/components/Snackbar/OrigamSnackbar.vue +2 -2
  20. package/dist/src/components/Switch/OrigamSwitch.vue +32 -0
  21. package/dist/src/components/TextField/OrigamTextField.vue +3 -1
  22. package/dist/src/components/Video/OrigamVideo.vue +11 -1
  23. package/dist/src/composables/Commons/backdrop.composable.cjs +50 -0
  24. package/dist/src/composables/Commons/backdrop.composable.d.ts +32 -0
  25. package/dist/src/composables/Commons/backdrop.composable.js +33 -0
  26. package/dist/src/composables/Commons/layout.composable.cjs +2 -2
  27. package/dist/src/composables/Commons/layout.composable.d.ts +16 -2
  28. package/dist/src/composables/Commons/layout.composable.js +1 -1
  29. package/dist/src/composables/Commons/opacity.composable.cjs +50 -0
  30. package/dist/src/composables/Commons/opacity.composable.d.ts +33 -0
  31. package/dist/src/composables/Commons/opacity.composable.js +34 -0
  32. package/dist/src/composables/Commons/stateEffect.composable.cjs +17 -2
  33. package/dist/src/composables/Commons/stateEffect.composable.d.ts +7 -2
  34. package/dist/src/composables/Commons/stateEffect.composable.js +23 -2
  35. package/dist/src/composables/Commons/theme-props-resolver.composable.cjs +44 -9
  36. package/dist/src/composables/Commons/theme-props-resolver.composable.d.ts +33 -1
  37. package/dist/src/composables/Commons/theme-props-resolver.composable.js +42 -10
  38. package/dist/src/composables/index.cjs +24 -0
  39. package/dist/src/composables/index.d.ts +2 -0
  40. package/dist/src/composables/index.js +2 -0
  41. package/dist/src/consts/Commons/backdrop.const.cjs +15 -0
  42. package/dist/src/consts/Commons/backdrop.const.d.ts +47 -0
  43. package/dist/src/consts/Commons/backdrop.const.js +9 -0
  44. package/dist/src/consts/Commons/opacity.const.cjs +20 -0
  45. package/dist/src/consts/Commons/opacity.const.d.ts +58 -0
  46. package/dist/src/consts/Commons/opacity.const.js +14 -0
  47. package/dist/src/consts/Commons/variant-preset.const.cjs +8 -0
  48. package/dist/src/consts/Commons/variant-preset.const.d.ts +60 -0
  49. package/dist/src/consts/Commons/variant-preset.const.js +2 -0
  50. package/dist/src/consts/index.cjs +33 -0
  51. package/dist/src/consts/index.d.ts +3 -0
  52. package/dist/src/consts/index.js +3 -0
  53. package/dist/src/interfaces/Commons/backdrop.interface.cjs +1 -0
  54. package/dist/src/interfaces/Commons/backdrop.interface.d.ts +49 -0
  55. package/dist/src/interfaces/Commons/backdrop.interface.js +0 -0
  56. package/dist/src/interfaces/Commons/opacity.interface.cjs +1 -0
  57. package/dist/src/interfaces/Commons/opacity.interface.d.ts +37 -0
  58. package/dist/src/interfaces/Commons/opacity.interface.js +0 -0
  59. package/dist/src/interfaces/Commons/state-effect.interface.d.ts +31 -0
  60. package/dist/src/interfaces/Commons/theme.interface.d.ts +33 -0
  61. package/dist/src/interfaces/Masonry/masonry.interface.d.ts +2 -2
  62. package/dist/src/interfaces/index.cjs +22 -0
  63. package/dist/src/interfaces/index.d.ts +2 -0
  64. package/dist/src/interfaces/index.js +2 -0
  65. package/dist/src/origam.cjs +2 -1
  66. package/dist/src/origam.js +8 -2
  67. package/dist/src/types/Commons/backdrop.type.cjs +1 -0
  68. package/dist/src/types/Commons/backdrop.type.d.ts +23 -0
  69. package/dist/src/types/Commons/backdrop.type.js +0 -0
  70. package/dist/src/types/Commons/opacity.type.cjs +1 -0
  71. package/dist/src/types/Commons/opacity.type.d.ts +36 -0
  72. package/dist/src/types/Commons/opacity.type.js +0 -0
  73. package/dist/src/types/Commons/state-effect.type.d.ts +2 -1
  74. package/dist/src/types/Commons/variant-preset.type.cjs +1 -0
  75. package/dist/src/types/Commons/variant-preset.type.d.ts +73 -0
  76. package/dist/src/types/Commons/variant-preset.type.js +0 -0
  77. package/dist/src/types/index.cjs +33 -0
  78. package/dist/src/types/index.d.ts +3 -0
  79. package/dist/src/types/index.js +3 -0
  80. package/dist/src/types/tokens.type.d.ts +1 -1
  81. package/package.json +1 -1
@@ -0,0 +1,47 @@
1
+ /*********************************************************
2
+ * BACKDROP_BLUR_RUNG_VARS
3
+ *
4
+ * @description
5
+ * The primitive blur ladder, mapped to the `var()` expression
6
+ * `useBackdrop` wraps in `blur(...)`. Keys are the rung names as they
7
+ * appear in the token suffix and in the utility class.
8
+ *
9
+ * @description
10
+ * ⛔ WHOLE LITERAL STRINGS, same reason as `OPACITY_RUNG_VARS`: the
11
+ * dormant direction of `token-var-channels` greps `.ts` sources for the
12
+ * literal `var(--origam-…)` text, and these five tokens have NO other
13
+ * reader in the repo yet — no component consumes `useBackdrop` until
14
+ * ADR-005's lot 4 converts `ghost`. Concatenating the name would make all
15
+ * five read as dormant and turn the guard red on a correct change.
16
+ *
17
+ * @description
18
+ * RUNG VALUES ARE MEASURED, NOT INVENTED. Counted over the `blur(Npx)`
19
+ * literals in `packages/ds/src` + `packages/marketing/src`:
20
+ * `8px` x25, `16px` x21, `6px` x17, `20px` x14, `24px` x7, `12px` x7,
21
+ * `28px` x5. The five rungs below sit on that distribution rather than on
22
+ * a tidy doubling, which is why `sm` is `6px` and not `4px`.
23
+ ********************************************************/
24
+ export declare const BACKDROP_BLUR_RUNG_VARS: Readonly<Record<string, string>>;
25
+ /*********************************************************
26
+ * BACKDROP_BLUR_DEFAULT_RUNG
27
+ *
28
+ * @description
29
+ * Rung used when `backdropBlur` is passed as a bare `true`.
30
+ *
31
+ * @description
32
+ * `md` is `8px`, which is both the most frequent blur literal in the repo
33
+ * and the exact value `OrigamBtn`'s `ghost` rule paints today
34
+ * (`backdrop-filter: var(--origam-btn---backdrop-filter-ghost, blur(8px))`).
35
+ * ADR-005 lot 4 can therefore convert `ghost` to `backdropBlur: 'md'`
36
+ * with no rendering change to justify.
37
+ ********************************************************/
38
+ export declare const BACKDROP_BLUR_DEFAULT_RUNG = "md";
39
+ /*********************************************************
40
+ * BACKDROP_UTILITY_CLASS_PREFIX
41
+ *
42
+ * @description
43
+ * Root of the global backdrop utility classes emitted by `useBackdrop`
44
+ * (`.origam--backdrop-blur-md`, ...). Declared in
45
+ * `src/assets/css/tokens/origam-utilities.css`.
46
+ ********************************************************/
47
+ export declare const BACKDROP_UTILITY_CLASS_PREFIX = "origam--backdrop-blur-";
@@ -0,0 +1,9 @@
1
+ export const BACKDROP_BLUR_RUNG_VARS = {
2
+ xs: "var(--origam-blur---xs, 4px)",
3
+ sm: "var(--origam-blur---sm, 6px)",
4
+ md: "var(--origam-blur---md, 8px)",
5
+ lg: "var(--origam-blur---lg, 16px)",
6
+ xl: "var(--origam-blur---xl, 24px)"
7
+ };
8
+ export const BACKDROP_BLUR_DEFAULT_RUNG = "md";
9
+ export const BACKDROP_UTILITY_CLASS_PREFIX = "origam--backdrop-blur-";
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.OPACITY_UTILITY_CLASS_PREFIX = exports.OPACITY_RUNG_VARS = exports.OPACITY_PERCENT_SCALE = exports.OPACITY_FRACTION_CEILING = void 0;
7
+ const OPACITY_RUNG_VARS = exports.OPACITY_RUNG_VARS = {
8
+ "0": "var(--origam-opacity---0, 0)",
9
+ "12": "var(--origam-opacity---12, 0.12)",
10
+ "26": "var(--origam-opacity---26, 0.26)",
11
+ "32": "var(--origam-opacity---32, 0.32)",
12
+ "50": "var(--origam-opacity---50, 0.5)",
13
+ "60": "var(--origam-opacity---60, 0.6)",
14
+ "70": "var(--origam-opacity---70, 0.7)",
15
+ "87": "var(--origam-opacity---87, 0.87)",
16
+ "100": "var(--origam-opacity---100, 1)"
17
+ };
18
+ const OPACITY_UTILITY_CLASS_PREFIX = exports.OPACITY_UTILITY_CLASS_PREFIX = "origam--opacity-";
19
+ const OPACITY_FRACTION_CEILING = exports.OPACITY_FRACTION_CEILING = 1;
20
+ const OPACITY_PERCENT_SCALE = exports.OPACITY_PERCENT_SCALE = 100;
@@ -0,0 +1,58 @@
1
+ /*********************************************************
2
+ * OPACITY_RUNG_VARS
3
+ *
4
+ * @description
5
+ * The 0..100 percent rungs of the primitive opacity ladder, mapped to the
6
+ * `var()` expression `useOpacity` emits for each. Keys are the rung names
7
+ * as they appear in the token suffix and in the utility class.
8
+ *
9
+ * @description
10
+ * ⛔ WRITTEN AS WHOLE LITERAL STRINGS ON PURPOSE, not assembled from a
11
+ * prefix plus the key. `token-var-channels` scans `.ts` sources for the
12
+ * literal text `var(--origam-…)` to decide whether a declared token is
13
+ * read by anybody; a name concatenated at runtime
14
+ * (`var(${PREFIX}${rung})`) matches nothing, so every rung here would be
15
+ * reported DORMANT and the guard would redden. That is the same blind
16
+ * spot #813 shipped through and #823 exists to close — see the
17
+ * `SHADOW_TOKEN_PREFIX` banner in `elevation.const.ts` for the version of
18
+ * this trap that already cost the repo a release.
19
+ *
20
+ * @description
21
+ * Each reference carries a literal fallback, the shape CLAUDE.md names as
22
+ * the one to copy (`useRounded`'s `var(--origam-radius---md, 8px)`). The
23
+ * ladder is declared in `primitive.css` / `_primitive.scss`, so the
24
+ * fallback is inert today; it stops the declaration from being destroyed
25
+ * outright should a consumer ship the component CSS without the token
26
+ * sheet.
27
+ ********************************************************/
28
+ export declare const OPACITY_RUNG_VARS: Readonly<Record<string, string>>;
29
+ /*********************************************************
30
+ * OPACITY_UTILITY_CLASS_PREFIX
31
+ *
32
+ * @description
33
+ * Root of the global opacity utility classes emitted by `useOpacity`
34
+ * (`.origam--opacity-70`, ...). Declared in
35
+ * `src/assets/css/tokens/origam-utilities.css`.
36
+ ********************************************************/
37
+ export declare const OPACITY_UTILITY_CLASS_PREFIX = "origam--opacity-";
38
+ /*********************************************************
39
+ * OPACITY_FRACTION_CEILING
40
+ *
41
+ * @description
42
+ * Boundary between the two numeric readings of `TOpacity`. A value at or
43
+ * below it is a CSS fraction; above it, a 0..100 percentage.
44
+ *
45
+ * @description
46
+ * Named rather than inlined so the one place that decides `opacity={1}`
47
+ * means "opaque" and not "1 %" is greppable — see {@link TOpacity} for
48
+ * why that call was made.
49
+ ********************************************************/
50
+ export declare const OPACITY_FRACTION_CEILING = 1;
51
+ /*********************************************************
52
+ * OPACITY_PERCENT_SCALE
53
+ *
54
+ * @description
55
+ * Divisor turning a percent-scale `opacity` into the CSS fraction it
56
+ * denotes, for the values that name no token rung (`42` -> `0.42`).
57
+ ********************************************************/
58
+ export declare const OPACITY_PERCENT_SCALE = 100;
@@ -0,0 +1,14 @@
1
+ export const OPACITY_RUNG_VARS = {
2
+ "0": "var(--origam-opacity---0, 0)",
3
+ "12": "var(--origam-opacity---12, 0.12)",
4
+ "26": "var(--origam-opacity---26, 0.26)",
5
+ "32": "var(--origam-opacity---32, 0.32)",
6
+ "50": "var(--origam-opacity---50, 0.5)",
7
+ "60": "var(--origam-opacity---60, 0.6)",
8
+ "70": "var(--origam-opacity---70, 0.7)",
9
+ "87": "var(--origam-opacity---87, 0.87)",
10
+ "100": "var(--origam-opacity---100, 1)"
11
+ };
12
+ export const OPACITY_UTILITY_CLASS_PREFIX = "origam--opacity-";
13
+ export const OPACITY_FRACTION_CEILING = 1;
14
+ export const OPACITY_PERCENT_SCALE = 100;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VARIANT_PROP_KEY = exports.VARIANT_PRESETS = void 0;
7
+ const VARIANT_PROP_KEY = exports.VARIANT_PROP_KEY = "variant";
8
+ const VARIANT_PRESETS = exports.VARIANT_PRESETS = {};
@@ -0,0 +1,60 @@
1
+ import type { TVariantPresetRegistry } from '../../types/Commons/variant-preset.type';
2
+ /*********************************************************
3
+ * VARIANT_PROP_KEY
4
+ *
5
+ * @description
6
+ * Le nom du prop discriminant qu'une table de presets indexe. ADR-005
7
+ * n'en prevoit qu'un, et le resolveur a besoin de le nommer pour deux
8
+ * raisons distinctes.
9
+ *
10
+ * @description
11
+ * ⛔ C'EST AUSSI LA GARDE ANTI-RECURSION. Le getter installe sur un prop
12
+ * lit `props.variant` pour savoir quelle entree de la table consulter. Si
13
+ * ce getter etait AUSSI installe sur `variant` lui-meme, cette lecture se
14
+ * rappellerait indefiniment. Un preset ne pose jamais `variant` — il n'y
15
+ * a donc rien a resoudre pour cette cle, et `patchThemedPropSlot` la
16
+ * saute explicitement sur le canal preset.
17
+ ********************************************************/
18
+ export declare const VARIANT_PROP_KEY = "variant";
19
+ /*********************************************************
20
+ * VARIANT_PRESETS
21
+ *
22
+ * @description
23
+ * Les tables de presets que le DS LIVRE, par nom kebab de composant. Un
24
+ * theme les surcharge via `IOrigamTheme.variants` (ADR-005 D4) ; il ne les
25
+ * constitue pas.
26
+ *
27
+ * @description
28
+ * ⛔ VIDE A DESSEIN DANS CE LOT, et ce n'est pas du code mort. Le lot 1
29
+ * d'ADR-005 livre le MECANISME (type partage, rang dans le resolveur,
30
+ * canal `theme.variants`) et aucune conversion de composant : chaque
31
+ * composant arrive avec son propre lot, parce qu'aucun ne se convertit
32
+ * mecaniquement. Mesure a l'appui (2026-09-30), la taxonomie « famille A »
33
+ * de D5 est optimiste sur trois des quatre composants qu'elle liste :
34
+ * @description
35
+ * - `OrigamKbd` — ses regles de variant posent des PROPRIETES CUSTOM que
36
+ * `key-surface` consomme sur la racine ET sur les descendants `__key`
37
+ * (`&--variant-outlined &__key`). Un prop de racine emet
38
+ * `background-color`, qui n'herite pas jusqu'a `__key` ; et la
39
+ * declaration de `key-surface` siege a (0,2,0), donc une valeur de
40
+ * preset TOKENISEE lui perdrait. Conversion fidele = revoir par ou
41
+ * `key-surface` recoit sa couleur.
42
+ * - `OrigamBtnGroup` — recopie `--origam-btn-group---border-width` dans
43
+ * une propriete custom qui alimente un `calc()` de rayon interieur.
44
+ * Inexprimable en prop de racine.
45
+ * - `OrigamBlockquote` — `padding-inline-start: calc(var(--…) + var(--…))`
46
+ * et des regles imbriquees sur `__body` / `__attribution`.
47
+ * @description
48
+ * Seul `OrigamBtn` ne peint que des proprietes de racine — mais il depend
49
+ * de `IOpacityProps` / `IBackdropProps` (Q1, absents) et son `ghost` porte
50
+ * une branche `@supports not (backdrop-filter)` qui echange le fond de
51
+ * 12 % a 18 % : aucune prop n'exprime une valeur conditionnee a une
52
+ * feature query.
53
+ *
54
+ * @description
55
+ * Le pilote est `OrigamKbd`, pour une raison que D7 ne donne pas : AUCUN
56
+ * theme de marque ne touche un seul token `origam-kbd` (verifie, zero
57
+ * occurrence sur les 8 themes), donc le zero-changement y est prouvable en
58
+ * isolation. `OrigamBtn` vient au lot 4.
59
+ ********************************************************/
60
+ export declare const VARIANT_PRESETS: TVariantPresetRegistry;
@@ -0,0 +1,2 @@
1
+ export const VARIANT_PROP_KEY = "variant";
2
+ export const VARIANT_PRESETS = {};
@@ -949,6 +949,17 @@ Object.keys(_cssSupport).forEach(function (key) {
949
949
  }
950
950
  });
951
951
  });
952
+ var _backdrop = require("./Commons/backdrop.const.cjs");
953
+ Object.keys(_backdrop).forEach(function (key) {
954
+ if (key === "default" || key === "__esModule") return;
955
+ if (key in exports && exports[key] === _backdrop[key]) return;
956
+ Object.defineProperty(exports, key, {
957
+ enumerable: true,
958
+ get: function () {
959
+ return _backdrop[key];
960
+ }
961
+ });
962
+ });
952
963
  var _elevation = require("./Commons/elevation.const.cjs");
953
964
  Object.keys(_elevation).forEach(function (key) {
954
965
  if (key === "default" || key === "__esModule") return;
@@ -959,4 +970,26 @@ Object.keys(_elevation).forEach(function (key) {
959
970
  return _elevation[key];
960
971
  }
961
972
  });
973
+ });
974
+ var _opacity = require("./Commons/opacity.const.cjs");
975
+ Object.keys(_opacity).forEach(function (key) {
976
+ if (key === "default" || key === "__esModule") return;
977
+ if (key in exports && exports[key] === _opacity[key]) return;
978
+ Object.defineProperty(exports, key, {
979
+ enumerable: true,
980
+ get: function () {
981
+ return _opacity[key];
982
+ }
983
+ });
984
+ });
985
+ var _variantPreset = require("./Commons/variant-preset.const.cjs");
986
+ Object.keys(_variantPreset).forEach(function (key) {
987
+ if (key === "default" || key === "__esModule") return;
988
+ if (key in exports && exports[key] === _variantPreset[key]) return;
989
+ Object.defineProperty(exports, key, {
990
+ enumerable: true,
991
+ get: function () {
992
+ return _variantPreset[key];
993
+ }
994
+ });
962
995
  });
@@ -84,4 +84,7 @@ export * from './Audio/audio.const';
84
84
  export * from './Audio/audio-waveform.const';
85
85
  export * from './Clipboard/clipboard.const';
86
86
  export * from './Commons/css-support.const';
87
+ export * from './Commons/backdrop.const';
87
88
  export * from './Commons/elevation.const';
89
+ export * from './Commons/opacity.const';
90
+ export * from './Commons/variant-preset.const';
@@ -84,4 +84,7 @@ export * from "./Audio/audio.const.js";
84
84
  export * from "./Audio/audio-waveform.const.js";
85
85
  export * from "./Clipboard/clipboard.const.js";
86
86
  export * from "./Commons/css-support.const.js";
87
+ export * from "./Commons/backdrop.const.js";
87
88
  export * from "./Commons/elevation.const.js";
89
+ export * from "./Commons/opacity.const.js";
90
+ export * from "./Commons/variant-preset.const.js";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,49 @@
1
+ import type { TBackdropBlur } from '../../types/Commons/backdrop.type';
2
+ /*********************************************************
3
+ * IBackdropProps
4
+ *
5
+ * @description
6
+ * Backdrop-filter surface — the "frosted glass" channel. Carries the blur
7
+ * rung only; it is not a general `filter` surface.
8
+ *
9
+ * @description
10
+ * ⛔ SCOPE, AND WHY IT STOPS HERE. ADR-005 Q1 was arbitrated as "a new
11
+ * prop surface" so `OrigamBtn`'s `ghost` variant can become a pure props
12
+ * preset instead of a `.origam-btn--variant-ghost` rule. What `ghost`
13
+ * needs is `backdrop-filter: blur(8px)` — that is the whole requirement,
14
+ * and this interface covers exactly it. `saturate()`, `brightness()` and
15
+ * multi-function filters are NOT guessed at here: a component that needs
16
+ * one keeps writing its own `--origam-{cmp}---backdrop-filter`, the
17
+ * channel 12 components already use today (Alert, Card, Chip, Field,
18
+ * Menu, Sheet, Snackbar, Tooltip, Toolbar, Overlay, CommandPalette, Btn).
19
+ *
20
+ * @description
21
+ * ⚠️ ADR-005 D6 recorded "no prop, no token group, no utility class" for
22
+ * this axis. Remeasured for this lot: the PROP and the UTILITY CLASS were
23
+ * indeed absent, but the per-component `---backdrop-filter` token channel
24
+ * above already existed. What was genuinely missing was a PRIMITIVE blur
25
+ * ladder, which this lot adds as `--origam-blur---{xs,sm,md,lg,xl}`.
26
+ *
27
+ * @description
28
+ * Consumed via `useBackdrop(props)` -> `{ backdropClasses, backdropStyles }`.
29
+ ********************************************************/
30
+ export interface IBackdropProps {
31
+ /*********************************************************
32
+ * backdropBlur
33
+ *
34
+ * @description
35
+ * Blur radius applied to what sits BEHIND the element. A rung name
36
+ * (`'md'`) resolves to `blur(var(--origam-blur---md))`; `true` means
37
+ * the default rung; a number is read as `px`; any other string is
38
+ * emitted inside `blur(...)` verbatim.
39
+ *
40
+ * @description
41
+ * Emits `-webkit-backdrop-filter` alongside the standard property —
42
+ * Safari still needs the prefix. No `@supports` gate: an unsupported
43
+ * browser drops an unknown declaration on its own, and the
44
+ * `@supports not (...)` blocks in the DS today exist to thicken the
45
+ * BACKGROUND when blur is unavailable, which is a `bgColor` concern
46
+ * and not this one.
47
+ ********************************************************/
48
+ backdropBlur?: TBackdropBlur;
49
+ }
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,37 @@
1
+ import type { TOpacity } from '../../types/Commons/opacity.type';
2
+ /*********************************************************
3
+ * IOpacityProps
4
+ *
5
+ * @description
6
+ * Opacity surface. Single scalar — there is no per-side or per-axis form,
7
+ * `opacity` being a whole-element property.
8
+ *
9
+ * @description
10
+ * ⛔ REUSE NOTE — this interface does NOT bring a token group with it. The
11
+ * primitive ladder it resolves against already existed before the
12
+ * interface did: `--origam-opacity---{0,12,26,32,50,60,70,87,100}`,
13
+ * declared in `assets/css/tokens/primitive.css` and its SCSS twin, and
14
+ * already read by `OrigamBtn`'s `--variant-plain` rule
15
+ * (`opacity: var(--origam-btn---opacity-plain, var(--origam-opacity---70))`).
16
+ * ADR-005's D6 proposed "add `IOpacityProps` + a token group"; only the
17
+ * first half was missing. Declaring a second ladder would have been the
18
+ * duplication the repo's reuse rule exists to prevent.
19
+ *
20
+ * @description
21
+ * Consumed via `useOpacity(props)` -> `{ opacityClasses, opacityStyles }`,
22
+ * both bound in parallel (strategy A) exactly as `useElevation` does.
23
+ ********************************************************/
24
+ export interface IOpacityProps {
25
+ /*********************************************************
26
+ * opacity
27
+ *
28
+ * @description
29
+ * Element opacity. A number `<= 1` is a CSS fraction (`0.7`); a number
30
+ * `> 1` is a 0..100 percentage naming a token rung (`70`). Any other
31
+ * string passes through verbatim (`'50%'`, `'var(...)'`, `'calc(...)'`).
32
+ *
33
+ * @description
34
+ * See {@link TOpacity} for why the fraction/percent split sits at 1.
35
+ ********************************************************/
36
+ opacity?: TOpacity;
37
+ }
@@ -1,6 +1,7 @@
1
1
  import type { IBorderProps } from './border.interface';
2
2
  import type { IElevationProps } from './elevation.interface';
3
3
  import type { IMarginProps } from './margin.interface';
4
+ import type { IOpacityProps } from './opacity.interface';
4
5
  import type { IPaddingProps } from './padding.interface';
5
6
  import type { IRoundedProps } from './rounded.interface';
6
7
  import type { TColor } from '../../types/Commons/color.type';
@@ -42,6 +43,23 @@ export interface IStateEffectConfig {
42
43
  bgColor?: TColor;
43
44
  /** Border width / style / direction override. */
44
45
  border?: IBorderProps['border'];
46
+ /*********************************************************
47
+ * borderColor
48
+ *
49
+ * @description
50
+ * Border COLOUR override, independent of the `border` shorthand.
51
+ *
52
+ * @description
53
+ * ⚠️ ADR-005's D6 audit missed this one. It lists `opacity` as the
54
+ * single gap on this interface, having checked the variants that set
55
+ * a border WIDTH; `outlined --active` sets a border-COLOUR, which the
56
+ * `border` shorthand above cannot carry.
57
+ *
58
+ * @description
59
+ * Found by remeasuring D6 rather than by reading it, and recorded
60
+ * here because the ADR's own table is incomplete on this row.
61
+ ********************************************************/
62
+ borderColor?: IBorderProps['borderColor'];
45
63
  /** Corner radius override. */
46
64
  rounded?: IRoundedProps['rounded'];
47
65
  /** Box-shadow elevation override. */
@@ -52,6 +70,19 @@ export interface IStateEffectConfig {
52
70
  margin?: IMarginProps['margin'];
53
71
  /** Gap (flex/grid) override. Components that expose a `gap` prop pick it up. */
54
72
  gap?: boolean | number | string;
73
+ /*********************************************************
74
+ * opacity
75
+ *
76
+ * @description
77
+ * Opacity override. This is the half of `OrigamBtn`'s `plain` variant
78
+ * that a preset could not express.
79
+ *
80
+ * @description
81
+ * `plain` is `opacity: var(--origam-opacity---70)` at rest plus
82
+ * `:hover { opacity: 1 }` — i.e. `{ opacity: 70, hover: { opacity: 100 } }`
83
+ * once this key exists (ADR-005 D6).
84
+ ********************************************************/
85
+ opacity?: IOpacityProps['opacity'];
55
86
  }
56
87
  /**
57
88
  * Hover-state configuration. Same shape as the generic state config —
@@ -2,6 +2,7 @@ import type { Ref } from 'vue';
2
2
  import type { IThemeVars } from './semantic-tree.interface';
3
3
  import type { TThemeVars } from '../../types/Commons/token-tree.type';
4
4
  import type { TMode, TTheme } from '../../types/Commons/theme.type';
5
+ import type { TVariantPresetRegistry } from '../../types/Commons/variant-preset.type';
5
6
  import type { IDefault } from '../DefaultsProvider/defaults-provider.interface';
6
7
  /**
7
8
  * Shape of the `useTheme()` singleton state.
@@ -127,4 +128,36 @@ export interface IOrigamTheme {
127
128
  * }
128
129
  */
129
130
  components?: IDefault;
131
+ /*********************************************************
132
+ * variants
133
+ *
134
+ * @description
135
+ * ADR-005 D4 — redefinit en PROPS ce qu'un `variant` veut dire, par
136
+ * composant puis par valeur de variant :
137
+ *
138
+ * variants: {
139
+ * 'origam-btn': { outlined: { border: 3, rounded: 'lg' } }
140
+ * }
141
+ *
142
+ * @description
143
+ * C'est ce qui rend les variants conformes a la regle PROPS-D'ABORD :
144
+ * un theme retune `outlined` en changeant des valeurs de props, et ne
145
+ * descend a `vars` / `cssVars` que pour ce que les props n'expriment
146
+ * pas. Les variants etaient le seul API du DS a violer cette regle
147
+ * structurellement.
148
+ *
149
+ * @description
150
+ * FRERE de `components`, pas une cle imbriquee dedans : `components`
151
+ * est type `IDefault` (composant -> map de props), donc y nicher un
152
+ * niveau de variant rendrait `{ 'origam-btn': { outlined: … } }`
153
+ * ambigu avec un prop qui s'appellerait litteralement `outlined`.
154
+ *
155
+ * @description
156
+ * Fusionne par-dessus la table livree par le DS a l'installation
157
+ * (`resolveVariantPresetRegistry`), avec le `mergeDeep` que
158
+ * `provideDefaults` utilise deja. Le preset resultant reste le rang
159
+ * LE PLUS FAIBLE de la resolution (arbitrage Q2) : un prop ecrit au
160
+ * site d'appel, comme un defaut de `components`, le battent tous deux.
161
+ ********************************************************/
162
+ variants?: TVariantPresetRegistry;
130
163
  }
@@ -59,8 +59,8 @@ export interface IMasonryProps extends ICommonsComponentProps, ITagProps, IDimen
59
59
  * Gap between items, both vertically and horizontally. Accepts:
60
60
  *
61
61
  * - one of the grid size tokens `'xs' | 'sm' | 'md' | 'lg' | 'xl'`
62
- * (resolved via `tokens/component/grid.json`, same matrix as
63
- * `<OrigamGrid>` for visual consistency).
62
+ * (resolved via `GRID_GAP_SIZE_VAR` to `--origam-grid---gap-{size}`,
63
+ * same matrix as `<OrigamGrid>` for visual consistency).
64
64
  * - any CSS length string (`'24px'`, `'1rem'`).
65
65
  * - a plain `number` interpreted as pixels.
66
66
  *
@@ -542,6 +542,17 @@ Object.keys(_autocomplete).forEach(function (key) {
542
542
  }
543
543
  });
544
544
  });
545
+ var _backdrop = require("./Commons/backdrop.interface.cjs");
546
+ Object.keys(_backdrop).forEach(function (key) {
547
+ if (key === "default" || key === "__esModule") return;
548
+ if (key in exports && exports[key] === _backdrop[key]) return;
549
+ Object.defineProperty(exports, key, {
550
+ enumerable: true,
551
+ get: function () {
552
+ return _backdrop[key];
553
+ }
554
+ });
555
+ });
545
556
  var _border = require("./Commons/border.interface.cjs");
546
557
  Object.keys(_border).forEach(function (key) {
547
558
  if (key === "default" || key === "__esModule") return;
@@ -927,6 +938,17 @@ Object.keys(_nested).forEach(function (key) {
927
938
  }
928
939
  });
929
940
  });
941
+ var _opacity = require("./Commons/opacity.interface.cjs");
942
+ Object.keys(_opacity).forEach(function (key) {
943
+ if (key === "default" || key === "__esModule") return;
944
+ if (key in exports && exports[key] === _opacity[key]) return;
945
+ Object.defineProperty(exports, key, {
946
+ enumerable: true,
947
+ get: function () {
948
+ return _opacity[key];
949
+ }
950
+ });
951
+ });
930
952
  var _padding = require("./Commons/padding.interface.cjs");
931
953
  Object.keys(_padding).forEach(function (key) {
932
954
  if (key === "default" || key === "__esModule") return;
@@ -47,6 +47,7 @@ export * from './Commons/adjacent.interface';
47
47
  export * from './Commons/align.interface';
48
48
  export * from './Commons/audio.interface';
49
49
  export * from './Commons/autocomplete.interface';
50
+ export * from './Commons/backdrop.interface';
50
51
  export * from './Commons/border.interface';
51
52
  export * from './Commons/box.interface';
52
53
  export * from './Commons/clickOutside.interface';
@@ -82,6 +83,7 @@ export * from './Commons/locale.interface';
82
83
  export * from './Commons/margin.interface';
83
84
  export * from './Commons/message.interface';
84
85
  export * from './Commons/nested.interface';
86
+ export * from './Commons/opacity.interface';
85
87
  export * from './Commons/padding.interface';
86
88
  export * from './Commons/position.interface';
87
89
  export * from './Commons/resizeObserver.interface';
@@ -47,6 +47,7 @@ export * from "./Commons/adjacent.interface.js";
47
47
  export * from "./Commons/align.interface.js";
48
48
  export * from "./Commons/audio.interface.js";
49
49
  export * from "./Commons/autocomplete.interface.js";
50
+ export * from "./Commons/backdrop.interface.js";
50
51
  export * from "./Commons/border.interface.js";
51
52
  export * from "./Commons/box.interface.js";
52
53
  export * from "./Commons/clickOutside.interface.js";
@@ -82,6 +83,7 @@ export * from "./Commons/locale.interface.js";
82
83
  export * from "./Commons/margin.interface.js";
83
84
  export * from "./Commons/message.interface.js";
84
85
  export * from "./Commons/nested.interface.js";
86
+ export * from "./Commons/opacity.interface.js";
85
87
  export * from "./Commons/padding.interface.js";
86
88
  export * from "./Commons/position.interface.js";
87
89
  export * from "./Commons/resizeObserver.interface.js";
@@ -32,6 +32,7 @@ function createOrigam(origam = {}) {
32
32
  const defaultsRef = (0, _composables.createDefaults)({});
33
33
  defaultsRef.value = activeDefaultsFor(allThemes, allThemes[0]?.name ?? "", void 0);
34
34
  const themedKeysUnion = (0, _composables.themedPropKeysUnion)(allThemes.map(theme => theme.components).filter(components2 => !!components2));
35
+ const variantPresets = (0, _composables.resolveVariantPresetRegistry)(_consts.VARIANT_PRESETS, allThemes.map(theme => theme.variants).filter(variants => !!variants));
35
36
  const scope = (0, _vue.effectScope)();
36
37
  return scope.run(() => {
37
38
  const icons = (0, _composables.createIcons)(options.icons);
@@ -67,7 +68,7 @@ function createOrigam(origam = {}) {
67
68
  app.provide(_consts.ORIGAM_GO_TO_KEY, goTo);
68
69
  app.provide(_consts.ORIGAM_THEMES_KEY, installedThemes);
69
70
  app.provide(_consts.ORIGAM_DEFAULTS_KEY, defaultsRef);
70
- (0, _composables.installThemePropsResolver)(app, themedKeysUnion);
71
+ (0, _composables.installThemePropsResolver)(app, themedKeysUnion, variantPresets);
71
72
  app.provide(_consts.ORIGAM_THEME_DEFAULTS_KEY, (brand, mode) => activeDefaultsFor(allThemes, brand, mode));
72
73
  if (_consts.IN_BROWSER && options.ssr) {
73
74
  const nuxt = app.$nuxt;
@@ -7,6 +7,7 @@ import {
7
7
  createIcons,
8
8
  createLocale,
9
9
  installThemePropsResolver,
10
+ resolveVariantPresetRegistry,
10
11
  themedPropKeysUnion
11
12
  } from "./composables/index.js";
12
13
  import {
@@ -19,7 +20,8 @@ import {
19
20
  ORIGAM_ICONS_KEY,
20
21
  ORIGAM_LOCALE_KEY,
21
22
  ORIGAM_THEME_DEFAULTS_KEY,
22
- ORIGAM_THEMES_KEY
23
+ ORIGAM_THEMES_KEY,
24
+ VARIANT_PRESETS
23
25
  } from "./consts/index.js";
24
26
  import * as origamDirectives from "./directives/index.js";
25
27
  import { setContrastConfig } from "./directives/Contrast/contrast.directive.js";
@@ -45,6 +47,10 @@ export function createOrigam(origam = {}) {
45
47
  const themedKeysUnion = themedPropKeysUnion(
46
48
  allThemes.map((theme) => theme.components).filter((components2) => !!components2)
47
49
  );
50
+ const variantPresets = resolveVariantPresetRegistry(
51
+ VARIANT_PRESETS,
52
+ allThemes.map((theme) => theme.variants).filter((variants) => !!variants)
53
+ );
48
54
  const scope = effectScope();
49
55
  return scope.run(() => {
50
56
  const icons = createIcons(options.icons);
@@ -80,7 +86,7 @@ export function createOrigam(origam = {}) {
80
86
  app.provide(ORIGAM_GO_TO_KEY, goTo);
81
87
  app.provide(ORIGAM_THEMES_KEY, installedThemes);
82
88
  app.provide(ORIGAM_DEFAULTS_KEY, defaultsRef);
83
- installThemePropsResolver(app, themedKeysUnion);
89
+ installThemePropsResolver(app, themedKeysUnion, variantPresets);
84
90
  app.provide(ORIGAM_THEME_DEFAULTS_KEY, (brand, mode) => activeDefaultsFor(allThemes, brand, mode));
85
91
  if (IN_BROWSER && options.ssr) {
86
92
  const nuxt = app.$nuxt;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,23 @@
1
+ /*********************************************************
2
+ * TBackdropBlur
3
+ *
4
+ * @description
5
+ * `backdropBlur` prop accepted by every component that consumes
6
+ * `useBackdrop` (`src/composables/Commons/backdrop.composable.ts`).
7
+ *
8
+ * @description
9
+ * Three shapes, disambiguated at runtime by `useBackdrop`:
10
+ * - a rung name (`'xs' | 'sm' | 'md' | 'lg' | 'xl'`) resolving to
11
+ * `blur(var(--origam-blur---{rung}))`;
12
+ * - `true`, meaning the default rung (`BACKDROP_BLUR_DEFAULT_RUNG`), so
13
+ * a consumer can write `backdrop-blur` with no value;
14
+ * - a number (read as `px`) or any CSS length string, emitted inside
15
+ * `blur(...)` verbatim.
16
+ *
17
+ * @description
18
+ * `false`, `null` and `undefined` all mean "no backdrop filter" and emit
19
+ * nothing at all — not `backdrop-filter: none`. Emitting `none` would win
20
+ * the cascade over a component's own rule and erase a blur the component
21
+ * painted for itself, the same defect #813 measured on `box-shadow`.
22
+ ********************************************************/
23
+ export type TBackdropBlur = boolean | number | string;