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
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
  };
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,73 @@
1
+ /*********************************************************
2
+ * TVariantPresets
3
+ *
4
+ * @description
5
+ * ADR-005 (D1) — un `variant` EST une preconfiguration de props nommee,
6
+ * pas une couche CSS : `Record<valeur du variant, Partial<props>>`.
7
+ *
8
+ * @description
9
+ * C'est le type d'AUTORAT, celui qu'une table
10
+ * `consts/{Composant}/{composant}-variant.const.ts` annote pour que le
11
+ * compilateur refuse une valeur de variant inconnue ou un nom de prop que
12
+ * le composant ne declare pas :
13
+ *
14
+ * export const KBD_VARIANT_PRESETS: TVariantPresets<TKbdVariant, IKbdProps> = {
15
+ * outlined: { bgColor: '...', border: 1 },
16
+ * filled: { bgColor: '...' },
17
+ * tonal: { bgColor: '...', border: 0 }
18
+ * }
19
+ *
20
+ * @description
21
+ * ⛔ AUCUN SCSS N'ACCOMPAGNE UNE TABLE DE PRESETS. La classe
22
+ * `{nom}--variant-{valeur}` que `useVariant()` emet continue d'exister,
23
+ * mais le DS ne lui attache plus aucune regle : elle appartient au
24
+ * CONSOMMATEUR, comme crochet d'override. Le garde `no-variant-css` tient
25
+ * cette moitie du contrat.
26
+ *
27
+ * @description
28
+ * ⛔ LES VALEURS NE SE RE-EXPRIMENT PAS EN ECHELON SEMANTIQUE. Mesure
29
+ * (2026-09-30) : les 8 themes de marque
30
+ * (`packages/marketing/src/themes/*.theme.ts`) habillent leurs boutons A
31
+ * TRAVERS les tokens de composant que la regle de variant lisait —
32
+ * `cartoon` pose `--origam-btn---box-shadow-elevated: 4px 4px 0 #171717`,
33
+ * `glass` une ombre de verre a quatre couches. Un preset ecrit
34
+ * `elevation: 'md'` emet `var(--origam-shadow---md)` et jette donc
35
+ * silencieusement l'ombre de la marque sur les 8 identites x 2 modes.
36
+ * @description
37
+ * Un preset porte la MEME chaine `var(--origam-{cmp}---{...}, <repli>)`
38
+ * que portait la regle, jamais sa traduction en echelon : le canal
39
+ * d'override des themes survit, et le rendu est identique par
40
+ * construction. `TElevation` documente le `box-shadow` libre (dont
41
+ * `var()`, multi-couches, `inset`) rendu verbatim, et `isCssColor`
42
+ * accepte `var(--…)` comme `color-mix(…)` en les routant vers le canal
43
+ * de style « valeur custom ».
44
+ ********************************************************/
45
+ export type TVariantPresets<V extends string, P> = Record<V, Partial<P>>;
46
+ /*********************************************************
47
+ * TVariantPresetTable
48
+ *
49
+ * @description
50
+ * La meme table, vue par le RESOLVEUR : valeur du variant -> sac de props.
51
+ *
52
+ * @description
53
+ * Type efface a dessein. Le resolveur est generique sur les 217
54
+ * composants et ne peut etre parametre par aucun `IXxxProps` en
55
+ * particulier ; c'est la table d'autorat qui porte le typage fort, au
56
+ * point d'ecriture, ou il sert reellement a quelque chose.
57
+ ********************************************************/
58
+ export type TVariantPresetTable = Record<string, Record<string, unknown>>;
59
+ /*********************************************************
60
+ * TVariantPresetRegistry
61
+ *
62
+ * @description
63
+ * Nom kebab du composant (`'origam-btn'`) -> sa table de presets.
64
+ *
65
+ * @description
66
+ * Meme forme que ce qu'un theme peut declarer sous `IOrigamTheme.variants`
67
+ * (ADR-005 D4). C'est une exigence, pas une coincidence : la directive
68
+ * d'implementation de l'ADR veut qu'un preset soit « une config par defaut
69
+ * comme avec le theme, la meme logique ». Si les deux formes divergeaient,
70
+ * la fusion du lot 1 et les variants definis par le consommateur
71
+ * demanderaient deux chemins de resolution au lieu d'un.
72
+ ********************************************************/
73
+ export type TVariantPresetRegistry = Record<string, TVariantPresetTable>;
File without changes
@@ -597,6 +597,17 @@ Object.keys(_dimension).forEach(function (key) {
597
597
  }
598
598
  });
599
599
  });
600
+ var _backdrop = require("./Commons/backdrop.type.cjs");
601
+ Object.keys(_backdrop).forEach(function (key) {
602
+ if (key === "default" || key === "__esModule") return;
603
+ if (key in exports && exports[key] === _backdrop[key]) return;
604
+ Object.defineProperty(exports, key, {
605
+ enumerable: true,
606
+ get: function () {
607
+ return _backdrop[key];
608
+ }
609
+ });
610
+ });
600
611
  var _elevation = require("./Commons/elevation.type.cjs");
601
612
  Object.keys(_elevation).forEach(function (key) {
602
613
  if (key === "default" || key === "__esModule") return;
@@ -608,6 +619,17 @@ Object.keys(_elevation).forEach(function (key) {
608
619
  }
609
620
  });
610
621
  });
622
+ var _opacity = require("./Commons/opacity.type.cjs");
623
+ Object.keys(_opacity).forEach(function (key) {
624
+ if (key === "default" || key === "__esModule") return;
625
+ if (key in exports && exports[key] === _opacity[key]) return;
626
+ Object.defineProperty(exports, key, {
627
+ enumerable: true,
628
+ get: function () {
629
+ return _opacity[key];
630
+ }
631
+ });
632
+ });
611
633
  var _variant = require("./Commons/variant.type.cjs");
612
634
  Object.keys(_variant).forEach(function (key) {
613
635
  if (key === "default" || key === "__esModule") return;
@@ -619,6 +641,17 @@ Object.keys(_variant).forEach(function (key) {
619
641
  }
620
642
  });
621
643
  });
644
+ var _variantPreset = require("./Commons/variant-preset.type.cjs");
645
+ Object.keys(_variantPreset).forEach(function (key) {
646
+ if (key === "default" || key === "__esModule") return;
647
+ if (key in exports && exports[key] === _variantPreset[key]) return;
648
+ Object.defineProperty(exports, key, {
649
+ enumerable: true,
650
+ get: function () {
651
+ return _variantPreset[key];
652
+ }
653
+ });
654
+ });
622
655
  var _direction = require("./Commons/direction.type.cjs");
623
656
  Object.keys(_direction).forEach(function (key) {
624
657
  if (key === "default" || key === "__esModule") return;
@@ -52,8 +52,11 @@ export * from './Commons/letter-spacing.type';
52
52
  export * from './Commons/line-height.type';
53
53
  export * from './Commons/rounded.type';
54
54
  export * from './Commons/dimension.type';
55
+ export * from './Commons/backdrop.type';
55
56
  export * from './Commons/elevation.type';
57
+ export * from './Commons/opacity.type';
56
58
  export * from './Commons/variant.type';
59
+ export * from './Commons/variant-preset.type';
57
60
  export * from './Commons/direction.type';
58
61
  export * from './Commons/display.type';
59
62
  export * from './Commons/event.type';
@@ -52,8 +52,11 @@ export * from "./Commons/letter-spacing.type.js";
52
52
  export * from "./Commons/line-height.type.js";
53
53
  export * from "./Commons/rounded.type.js";
54
54
  export * from "./Commons/dimension.type.js";
55
+ export * from "./Commons/backdrop.type.js";
55
56
  export * from "./Commons/elevation.type.js";
57
+ export * from "./Commons/opacity.type.js";
56
58
  export * from "./Commons/variant.type.js";
59
+ export * from "./Commons/variant-preset.type.js";
57
60
  export * from "./Commons/direction.type.js";
58
61
  export * from "./Commons/display.type.js";
59
62
  export * from "./Commons/event.type.js";