origam 2.18.19 → 2.18.21

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 (59) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/dist/src/assets/css/main.css +1 -1
  3. package/dist/src/assets/css/tokens/origam-utilities.css +30 -0
  4. package/dist/src/assets/css/tokens/primitive.css +5 -0
  5. package/dist/src/assets/scss/tokens/_origam-utilities.scss +30 -0
  6. package/dist/src/assets/scss/tokens/_primitive.scss +5 -0
  7. package/dist/src/components/Blockquote/OrigamBlockquote.vue +2 -1
  8. package/dist/src/components/TextMask/OrigamTextMask.vue +2 -1
  9. package/dist/src/components/Title/OrigamTitle.vue +2 -1
  10. package/dist/src/composables/Commons/backdrop.composable.cjs +50 -0
  11. package/dist/src/composables/Commons/backdrop.composable.d.ts +32 -0
  12. package/dist/src/composables/Commons/backdrop.composable.js +33 -0
  13. package/dist/src/composables/Commons/opacity.composable.cjs +50 -0
  14. package/dist/src/composables/Commons/opacity.composable.d.ts +33 -0
  15. package/dist/src/composables/Commons/opacity.composable.js +34 -0
  16. package/dist/src/composables/Commons/stateEffect.composable.cjs +17 -2
  17. package/dist/src/composables/Commons/stateEffect.composable.d.ts +7 -2
  18. package/dist/src/composables/Commons/stateEffect.composable.js +23 -2
  19. package/dist/src/composables/Commons/typography.composable.cjs +7 -0
  20. package/dist/src/composables/Commons/typography.composable.d.ts +6 -1
  21. package/dist/src/composables/Commons/typography.composable.js +9 -0
  22. package/dist/src/composables/index.cjs +24 -0
  23. package/dist/src/composables/index.d.ts +2 -0
  24. package/dist/src/composables/index.js +2 -0
  25. package/dist/src/consts/Commons/backdrop.const.cjs +15 -0
  26. package/dist/src/consts/Commons/backdrop.const.d.ts +47 -0
  27. package/dist/src/consts/Commons/backdrop.const.js +9 -0
  28. package/dist/src/consts/Commons/border.const.cjs +4 -1
  29. package/dist/src/consts/Commons/border.const.d.ts +0 -18
  30. package/dist/src/consts/Commons/border.const.js +7 -2
  31. package/dist/src/consts/Commons/opacity.const.cjs +20 -0
  32. package/dist/src/consts/Commons/opacity.const.d.ts +58 -0
  33. package/dist/src/consts/Commons/opacity.const.js +14 -0
  34. package/dist/src/consts/index.cjs +22 -0
  35. package/dist/src/consts/index.d.ts +2 -0
  36. package/dist/src/consts/index.js +2 -0
  37. package/dist/src/interfaces/Commons/backdrop.interface.cjs +1 -0
  38. package/dist/src/interfaces/Commons/backdrop.interface.d.ts +49 -0
  39. package/dist/src/interfaces/Commons/backdrop.interface.js +0 -0
  40. package/dist/src/interfaces/Commons/opacity.interface.cjs +1 -0
  41. package/dist/src/interfaces/Commons/opacity.interface.d.ts +37 -0
  42. package/dist/src/interfaces/Commons/opacity.interface.js +0 -0
  43. package/dist/src/interfaces/Commons/state-effect.interface.d.ts +31 -0
  44. package/dist/src/interfaces/Commons/typography.interface.d.ts +47 -3
  45. package/dist/src/interfaces/index.cjs +22 -0
  46. package/dist/src/interfaces/index.d.ts +2 -0
  47. package/dist/src/interfaces/index.js +2 -0
  48. package/dist/src/types/Commons/backdrop.type.cjs +1 -0
  49. package/dist/src/types/Commons/backdrop.type.d.ts +23 -0
  50. package/dist/src/types/Commons/backdrop.type.js +0 -0
  51. package/dist/src/types/Commons/opacity.type.cjs +1 -0
  52. package/dist/src/types/Commons/opacity.type.d.ts +36 -0
  53. package/dist/src/types/Commons/opacity.type.js +0 -0
  54. package/dist/src/types/Commons/state-effect.type.d.ts +2 -1
  55. package/dist/src/types/index.cjs +22 -0
  56. package/dist/src/types/index.d.ts +2 -0
  57. package/dist/src/types/index.js +2 -0
  58. package/dist/src/types/tokens.type.d.ts +1 -1
  59. 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-";
@@ -5,7 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.BORDER_REGEX = exports.BORDER_PROP_KEYS = exports.BORDER_POSITION_MAP = exports.BORDER_LOGICAL_AXIS_MAP = exports.BORDER_KEYWORD_WIDTH = void 0;
7
7
  var _enums = require("../../enums/index.cjs");
8
- const BORDER_REGEX = exports.BORDER_REGEX = /^(?<width>(?: ?(?:[0-9]+)(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr)?){0,4}) {0,1}(?<style>(?:(?: ?(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset))+){0,4}) ?(?<color>(?: ?(?:(?:(?:#)(?:[a-f0-9]{3}|[a-f0-9]{6}))|(?:var\(--[^)]+\))|(?:(?:rgb|hsl|rgba)a?\(.*\))|(?:[A-Za-z]+))){0,4})$/;
8
+ const BORDER_STYLE_ALTERNATION = Object.values(_enums.BORDER_STYLE).join("|");
9
+ const BORDER_LENGTH_UNITS = "(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr)?";
10
+ const BORDER_COLOR_GROUP = "(?<color>(?: ?(?:(?:(?:#)(?:[a-f0-9]{3}|[a-f0-9]{6}))|(?:var\\(--[^)]+\\))|(?:(?:rgb|hsl|rgba)a?\\(.*\\))|(?:[A-Za-z]+))){0,4})";
11
+ const BORDER_REGEX = exports.BORDER_REGEX = new RegExp(`^(?<width>(?: ?var\\(--[^)]+\\)(?= +(?:${BORDER_STYLE_ALTERNATION}))| ?(?:[0-9]+)${BORDER_LENGTH_UNITS}){0,4}) {0,1}(?<style>(?:(?: ?(?:${BORDER_STYLE_ALTERNATION}))+){0,4}) ?` + BORDER_COLOR_GROUP + "$");
9
12
  const BORDER_POSITION_MAP = exports.BORDER_POSITION_MAP = [{
10
13
  side: _enums.BLOCK.TOP,
11
14
  widthProp: "borderTop",
@@ -1,23 +1,5 @@
1
1
  import { BLOCK, INLINE } from '../../enums';
2
2
  import type { TBorderLogicalAxis, TBorderWidthKeyword } from '../../types/Commons/border.type';
3
- /**
4
- * Parse a free-form `border` value into width / style / color groups.
5
- *
6
- * Accepted color forms (in alternation order — `var()` MUST come before
7
- * the bare `[A-Za-z]+` branch, otherwise `var` would be eaten as a word
8
- * before the parenthesis group has a chance to match):
9
- *
10
- * • Hex literal — `#abc` / `#aabbcc`
11
- * • CSS function — `rgb(…)` / `rgba(…)` / `hsl(…)` / `hsla(…)`
12
- * • CSS custom prop — `var(--origam-color__action--primary---bg)` (with optional
13
- * fallback: `var(--x, fallback)`)
14
- * • Named keyword — `red`, `currentColor`, `transparent`, etc.
15
- *
16
- * The user reported that DS-token references (`var(--…)`) silently
17
- * dropped through this regex and were never emitted as `border-color`,
18
- * while raw hex / named colors worked. Adding the `var()` alternative
19
- * fixes the design-token path.
20
- */
21
3
  export declare const BORDER_REGEX: RegExp;
22
4
  /**
23
5
  * Physical-side lookup driving the per-side border wiring (issue #215).
@@ -1,5 +1,10 @@
1
- import { BLOCK, BORDER_LOGICAL_AXIS, INLINE } from "../../enums/index.js";
2
- export const BORDER_REGEX = /^(?<width>(?: ?(?:[0-9]+)(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr)?){0,4}) {0,1}(?<style>(?:(?: ?(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset))+){0,4}) ?(?<color>(?: ?(?:(?:(?:#)(?:[a-f0-9]{3}|[a-f0-9]{6}))|(?:var\(--[^)]+\))|(?:(?:rgb|hsl|rgba)a?\(.*\))|(?:[A-Za-z]+))){0,4})$/;
1
+ import { BLOCK, BORDER_LOGICAL_AXIS, BORDER_STYLE, INLINE } from "../../enums/index.js";
2
+ const BORDER_STYLE_ALTERNATION = Object.values(BORDER_STYLE).join("|");
3
+ const BORDER_LENGTH_UNITS = "(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr)?";
4
+ const BORDER_COLOR_GROUP = "(?<color>(?: ?(?:(?:(?:#)(?:[a-f0-9]{3}|[a-f0-9]{6}))|(?:var\\(--[^)]+\\))|(?:(?:rgb|hsl|rgba)a?\\(.*\\))|(?:[A-Za-z]+))){0,4})";
5
+ export const BORDER_REGEX = new RegExp(
6
+ `^(?<width>(?: ?var\\(--[^)]+\\)(?= +(?:${BORDER_STYLE_ALTERNATION}))| ?(?:[0-9]+)${BORDER_LENGTH_UNITS}){0,4}) {0,1}(?<style>(?:(?: ?(?:${BORDER_STYLE_ALTERNATION}))+){0,4}) ?` + BORDER_COLOR_GROUP + "$"
7
+ );
3
8
  export const BORDER_POSITION_MAP = [
4
9
  { side: BLOCK.TOP, widthProp: "borderTop", colorProp: "borderTopColor" },
5
10
  { side: INLINE.RIGHT, widthProp: "borderRight", colorProp: "borderRightColor" },
@@ -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;
@@ -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;
@@ -960,6 +971,17 @@ Object.keys(_elevation).forEach(function (key) {
960
971
  }
961
972
  });
962
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
+ });
963
985
  var _variantPreset = require("./Commons/variant-preset.const.cjs");
964
986
  Object.keys(_variantPreset).forEach(function (key) {
965
987
  if (key === "default" || key === "__esModule") return;
@@ -84,5 +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';
88
90
  export * from './Commons/variant-preset.const';
@@ -84,5 +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";
88
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 —
@@ -6,9 +6,14 @@ import type { TLineHeight } from '../../types/Commons/line-height.type';
6
6
  /**
7
7
  * Cross-cutting typography surface — the font equivalent of
8
8
  * `IColorProps` / `IBorderProps` / `IMarginProps`. Every prop is optional
9
- * and maps a primitive font token key to the matching component CSS
10
- * variable via `useTypography`. When a prop is unset the component keeps
11
- * its theme value (no override emitted).
9
+ * and resolves to the matching component CSS variable via `useTypography`.
10
+ * When a prop is unset the component keeps its theme value (no override
11
+ * emitted).
12
+ *
13
+ * The first FIVE props are primitive font token KEYS, wrapped into
14
+ * `var(--origam-font__{group}---{value})`. `fontStyle` is the one
15
+ * PASSTHROUGH: a CSS keyword emitted verbatim, because `font-style` has no
16
+ * design scale — see its own note below.
12
17
  *
13
18
  * | Prop | CSS property | Primitive token group |
14
19
  * |-----------------|-------------------|------------------------------|
@@ -17,6 +22,7 @@ import type { TLineHeight } from '../../types/Commons/line-height.type';
17
22
  * | `fontWeight` | `font-weight` | `--origam-font__weight---*` |
18
23
  * | `lineHeight` | `line-height` | `--origam-font__lineHeight---*` |
19
24
  * | `letterSpacing` | `letter-spacing` | `--origam-font__letterSpacing---*` |
25
+ * | `fontStyle` | `font-style` | *none — passthrough, see below* |
20
26
  *
21
27
  * Collision-free names by design: `fontSize` / `fontWeight` / `fontFamily`
22
28
  * (not `size` / `weight` / `family`) so the surface composes with
@@ -53,4 +59,42 @@ export interface ITypographyProps {
53
59
  * When unset, the component keeps its theme letter-spacing.
54
60
  */
55
61
  letterSpacing?: TLetterSpacing;
62
+ /*********************************************************
63
+ * fontStyle
64
+ *
65
+ * @description
66
+ * Style de fonte, emis LITTERALEMENT dans
67
+ * `--origam-{prefix}---font-style`. Seul membre PASSTHROUGH de cette
68
+ * interface : les cinq autres props sont des cles de token que
69
+ * `useTypography` enveloppe en `var(--origam-font__{groupe}---{valeur})`.
70
+ *
71
+ * @description
72
+ * ⛔ POURQUOI PAS UN TOKEN. `italic` / `normal` / `oblique` sont des
73
+ * MOTS-CLES CSS, pas les echelons d'une echelle de design : il n'existe
74
+ * aucun groupe `--origam-font__style---*` dans `primitive.css` (verifie,
75
+ * zero occurrence) et il n'en faut pas. Enveloppee, la valeur sortirait
76
+ * en `var(--origam-font__style---italic)`, un nom que nulle feuille ne
77
+ * declare — donc rien ne peindrait.
78
+ *
79
+ * @description
80
+ * Type `string` volontairement large, par coherence avec
81
+ * `IBorderProps.borderStyle` / `borderColor`, les deux autres
82
+ * passthrough de mot-cle CSS des interfaces Commons. Laisse passer
83
+ * `oblique 10deg`, qu'une union fermee rejetterait.
84
+ *
85
+ * @description
86
+ * ⚠️ N'a d'EFFET que si la SCSS du composant lit le var GENERIQUE
87
+ * `--origam-{prefix}---font-style`. Mesure a l'ajout : un seul composant
88
+ * le fait — `OrigamBlockquote`
89
+ * (`--origam-blockquote---resolved-font-style` retombe dessus).
90
+ * @description
91
+ * ⛔ `OrigamBracketCompetitor` ne compte PAS, et la nuance vaut d'etre
92
+ * lue : il lit `--origam-bracket-competitor--pending---font-style`, un
93
+ * var de MODIFICATEUR D'ETAT (double tiret `--pending---`), pas le
94
+ * generique que `useTypography(props, 'bracket-competitor')` emet. La
95
+ * prop y type-check et emet sa variable sans rien peindre — meme cas
96
+ * que `fontFamily` sur Btn. Ne pas ajouter de regle SCSS pour lui
97
+ * forcer un effet sans le signaler.
98
+ ********************************************************/
99
+ fontStyle?: string;
56
100
  }
@@ -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";
@@ -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;
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,36 @@
1
+ /*********************************************************
2
+ * TOpacity
3
+ *
4
+ * @description
5
+ * `opacity` prop accepted by every component that consumes `useOpacity`
6
+ * (`src/composables/Commons/opacity.composable.ts`).
7
+ *
8
+ * @description
9
+ * Two numeric readings share one type, disambiguated at runtime by the
10
+ * MAGNITUDE of the value — the same loose `number | string` union
11
+ * `TElevation` and `TRounded` use, for the same reason: the shapes are
12
+ * told apart by `useOpacity`, not by the type system.
13
+ *
14
+ * @description
15
+ * A number `<= 1` is read as a CSS fraction and emitted verbatim
16
+ * (`0.7` -> `opacity: 0.7`). A number `> 1` is read on the 0..100
17
+ * PERCENT scale that names the token rungs (`70` -> rung `70`), which is
18
+ * the vocabulary ADR-005's variant presets are written in
19
+ * (`plain: { opacity: 70, hover: { opacity: 100 } }`).
20
+ *
21
+ * @description
22
+ * ⛔ The split is at 1, not at 0, and that is deliberate. Reading every
23
+ * number on the percent scale would make `opacity={1}` mean 1 % — very
24
+ * nearly invisible — where every CSS author on earth means "opaque". The
25
+ * cost of the split is that 1 % cannot be written as a number; pass the
26
+ * string `'1%'` for it. That trade was chosen because `opacity={1}`
27
+ * meaning "opaque" is the single most likely thing a consumer types, and
28
+ * silently rendering it invisible is the worst available failure.
29
+ *
30
+ * @description
31
+ * A non-numeric string passes through verbatim, so `'50%'`,
32
+ * `'var(--origam-opacity---50)'` and `'calc(1 / 3)'` all reach the
33
+ * declaration untouched. Mirrors the custom-value escape hatch of
34
+ * `TRounded` / `TElevation`.
35
+ ********************************************************/
36
+ export type TOpacity = number | string;
File without changes
@@ -2,6 +2,7 @@ import type { IBgColorProps, IColorProps } from '../../interfaces/Commons/color.
2
2
  import type { IBorderProps } from '../../interfaces/Commons/border.interface';
3
3
  import type { IElevationProps } from '../../interfaces/Commons/elevation.interface';
4
4
  import type { IMarginProps } from '../../interfaces/Commons/margin.interface';
5
+ import type { IOpacityProps } from '../../interfaces/Commons/opacity.interface';
5
6
  import type { IPaddingProps } from '../../interfaces/Commons/padding.interface';
6
7
  import type { IRoundedProps } from '../../interfaces/Commons/rounded.interface';
7
8
  /**
@@ -25,6 +26,6 @@ import type { IRoundedProps } from '../../interfaces/Commons/rounded.interface';
25
26
  * OVERRIDE object a consumer passes to `hover` / `active`. This type
26
27
  * describes the RESTING props those overrides are layered on top of.
27
28
  */
28
- export type TStateEffectProps = IColorProps & IBgColorProps & IBorderProps & IRoundedProps & IElevationProps & IPaddingProps & IMarginProps & {
29
+ export type TStateEffectProps = IColorProps & IBgColorProps & IBorderProps & IRoundedProps & IElevationProps & IPaddingProps & IMarginProps & IOpacityProps & {
29
30
  gap?: boolean | number | string;
30
31
  };