origam 2.18.20 → 2.19.0
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.
- package/CHANGELOG.md +125 -0
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +0 -6
- package/dist/src/assets/css/tokens/light.css +0 -3
- package/dist/src/assets/scss/tokens/_dark.scss +0 -6
- package/dist/src/assets/scss/tokens/_light.scss +0 -3
- package/dist/src/components/Blockquote/OrigamBlockquote.vue +2 -1
- package/dist/src/components/Kbd/OrigamKbd.vue +23 -41
- package/dist/src/components/TextMask/OrigamTextMask.vue +2 -1
- package/dist/src/components/Title/OrigamTitle.vue +2 -1
- package/dist/src/composables/Commons/typography.composable.cjs +7 -0
- package/dist/src/composables/Commons/typography.composable.d.ts +6 -1
- package/dist/src/composables/Commons/typography.composable.js +9 -0
- package/dist/src/consts/Commons/border.const.cjs +4 -1
- package/dist/src/consts/Commons/border.const.d.ts +0 -18
- package/dist/src/consts/Commons/border.const.js +7 -2
- package/dist/src/consts/Commons/variant-preset.const.cjs +4 -1
- package/dist/src/consts/Commons/variant-preset.const.d.ts +22 -13
- package/dist/src/consts/Commons/variant-preset.const.js +4 -1
- package/dist/src/consts/Kbd/kbd.const.cjs +22 -0
- package/dist/src/consts/Kbd/kbd.const.d.ts +102 -0
- package/dist/src/consts/Kbd/kbd.const.js +16 -0
- package/dist/src/consts/index.cjs +11 -0
- package/dist/src/consts/index.d.ts +1 -0
- package/dist/src/consts/index.js +1 -0
- package/dist/src/interfaces/Commons/typography.interface.d.ts +47 -3
- package/dist/src/interfaces/Kbd/kbd.interface.d.ts +2 -1
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
10
|
-
*
|
|
11
|
-
*
|
|
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
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { IBorderProps } from '../Commons/border.interface';
|
|
2
2
|
import type { IBgColorProps, IColorProps } from '../Commons/color.interface';
|
|
3
3
|
import type { ICommonsComponentProps } from '../Commons/commons.interface';
|
|
4
|
+
import type { IElevationProps } from '../Commons/elevation.interface';
|
|
4
5
|
import type { IRoundedProps } from '../Commons/rounded.interface';
|
|
5
6
|
import type { ISizeProps } from '../Commons/size.interface';
|
|
6
7
|
import type { ITypographyProps } from '../Commons/typography.interface';
|
|
7
8
|
import type { TKbdVariant } from '../../types/Kbd/kbd.type';
|
|
8
|
-
export interface IKbdProps extends ICommonsComponentProps, IColorProps, IBgColorProps, ISizeProps, IBorderProps, IRoundedProps, Pick<ITypographyProps, 'fontFamily' | 'fontSize' | 'fontWeight'> {
|
|
9
|
+
export interface IKbdProps extends ICommonsComponentProps, IColorProps, IBgColorProps, ISizeProps, IBorderProps, IElevationProps, IRoundedProps, Pick<ITypographyProps, 'fontFamily' | 'fontSize' | 'fontWeight'> {
|
|
9
10
|
/** Single key label (e.g. "⌘", "Ctrl", "A"). Overridden by the default slot. */
|
|
10
11
|
text?: string;
|
|
11
12
|
/** Composed shortcut rendered as individual nested `<kbd>` elements (e.g. ['Ctrl', 'Shift', 'Z']). */
|