@alveole/theme 1.10.0 → 2.0.0-alpha.1

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 (98) hide show
  1. package/README.md +15 -15
  2. package/dist/WebThemeStyles.web.d.ts.map +1 -1
  3. package/dist/WebThemeStyles.web.js +4 -6
  4. package/dist/constants/Color.d.ts +0 -116
  5. package/dist/constants/Color.d.ts.map +1 -1
  6. package/dist/constants/Color.js +0 -116
  7. package/dist/constants/Control.d.ts +105 -0
  8. package/dist/constants/Control.d.ts.map +1 -0
  9. package/dist/constants/Control.js +28 -0
  10. package/dist/constants/Elevation.d.ts +8 -8
  11. package/dist/constants/Elevation.d.ts.map +1 -1
  12. package/dist/constants/Focus.d.ts +72 -0
  13. package/dist/constants/Focus.d.ts.map +1 -0
  14. package/dist/constants/Focus.js +79 -0
  15. package/dist/constants/FocusProps.d.ts +22 -0
  16. package/dist/constants/FocusProps.d.ts.map +1 -0
  17. package/dist/constants/FocusProps.js +15 -0
  18. package/dist/constants/Font.d.ts +13 -8
  19. package/dist/constants/Font.d.ts.map +1 -1
  20. package/dist/constants/Font.js +27 -27
  21. package/dist/constants/Grille.d.ts +9 -1
  22. package/dist/constants/Grille.d.ts.map +1 -1
  23. package/dist/constants/Grille.js +9 -1
  24. package/dist/constants/Link.d.ts +8 -0
  25. package/dist/constants/Link.d.ts.map +1 -0
  26. package/dist/constants/Link.js +8 -0
  27. package/dist/constants/LinkProps.d.ts +10 -0
  28. package/dist/constants/LinkProps.d.ts.map +1 -0
  29. package/dist/constants/LinkProps.js +9 -0
  30. package/dist/constants/Palette.d.ts +2 -10
  31. package/dist/constants/Palette.d.ts.map +1 -1
  32. package/dist/constants/Palette.js +2 -10
  33. package/dist/constants/Pill.d.ts +41 -0
  34. package/dist/constants/Pill.d.ts.map +1 -0
  35. package/dist/constants/Pill.js +26 -0
  36. package/dist/constants/Radius.d.ts +1 -1
  37. package/dist/constants/Radius.d.ts.map +1 -1
  38. package/dist/constants/Spacing.d.ts +4 -4
  39. package/dist/constants/Spacing.d.ts.map +1 -1
  40. package/dist/constants/Spacing.js +4 -4
  41. package/dist/constants/Typography.d.ts +25 -1
  42. package/dist/constants/Typography.d.ts.map +1 -1
  43. package/dist/constants/Typography.js +53 -29
  44. package/dist/constants/dataSetAttribute.d.ts +6 -0
  45. package/dist/constants/dataSetAttribute.d.ts.map +1 -0
  46. package/dist/constants/dataSetAttribute.js +5 -0
  47. package/dist/constants/index.d.ts +4 -0
  48. package/dist/constants/index.d.ts.map +1 -1
  49. package/dist/constants/index.js +4 -0
  50. package/dist/default.css +76 -176
  51. package/dist/helpers/alphaColor.d.ts.map +1 -1
  52. package/dist/helpers/alphaColor.js +2 -11
  53. package/dist/helpers/contrastColor.d.ts +12 -0
  54. package/dist/helpers/contrastColor.d.ts.map +1 -0
  55. package/dist/helpers/contrastColor.js +51 -0
  56. package/dist/helpers/cssVarPalette.d.ts +14 -0
  57. package/dist/helpers/cssVarPalette.d.ts.map +1 -0
  58. package/dist/helpers/cssVarPalette.js +9 -0
  59. package/dist/helpers/cssVarTypography.d.ts +12 -0
  60. package/dist/helpers/cssVarTypography.d.ts.map +1 -0
  61. package/dist/helpers/cssVarTypography.js +33 -0
  62. package/dist/helpers/darkenColor.d.ts.map +1 -1
  63. package/dist/helpers/darkenColor.js +5 -12
  64. package/dist/helpers/deepMerge.d.ts +12 -2
  65. package/dist/helpers/deepMerge.d.ts.map +1 -1
  66. package/dist/helpers/deepMerge.js +24 -14
  67. package/dist/helpers/elevationStyle.d.ts +1 -1
  68. package/dist/helpers/focusRingCSS.d.ts +15 -0
  69. package/dist/helpers/focusRingCSS.d.ts.map +1 -0
  70. package/dist/helpers/focusRingCSS.js +26 -0
  71. package/dist/helpers/hexToRgb.d.ts +6 -0
  72. package/dist/helpers/hexToRgb.d.ts.map +1 -0
  73. package/dist/helpers/hexToRgb.js +13 -0
  74. package/dist/helpers/injectVariableCSS.d.ts +14 -4
  75. package/dist/helpers/injectVariableCSS.d.ts.map +1 -1
  76. package/dist/helpers/injectVariableCSS.js +19 -42
  77. package/dist/helpers/isRecord.d.ts +3 -0
  78. package/dist/helpers/isRecord.d.ts.map +1 -0
  79. package/dist/helpers/isRecord.js +2 -0
  80. package/dist/helpers/linkCSS.d.ts +2 -0
  81. package/dist/helpers/linkCSS.d.ts.map +1 -0
  82. package/dist/helpers/linkCSS.js +2 -0
  83. package/dist/helpers/mapValues.d.ts +15 -0
  84. package/dist/helpers/mapValues.d.ts.map +1 -0
  85. package/dist/helpers/mapValues.js +11 -0
  86. package/dist/helpers/removeUnsupportedCSSProperties.d.ts.map +1 -1
  87. package/dist/helpers/removeUnsupportedCSSProperties.js +6 -10
  88. package/dist/helpers/typographyVariables.d.ts +22 -0
  89. package/dist/helpers/typographyVariables.d.ts.map +1 -0
  90. package/dist/helpers/typographyVariables.js +49 -0
  91. package/dist/helpers/useThemeBuilder.d.ts.map +1 -1
  92. package/dist/helpers/useThemeBuilder.js +10 -46
  93. package/dist/index.d.ts +1 -0
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.js +1 -0
  96. package/dist/type/Theme.d.ts +4 -0
  97. package/dist/type/Theme.d.ts.map +1 -1
  98. package/package.json +12 -12
package/README.md CHANGED
@@ -87,32 +87,32 @@ Les styles de texte sont organisés en trois catégories :
87
87
  ```tsx
88
88
  const { text } = useTheme();
89
89
 
90
- // Titres alternatifs (Barlow Bold)
90
+ // Titres alternatifs (Geist SemiBold)
91
91
  text['Titres alternatifs'].XS; // 48px
92
92
  text['Titres alternatifs'].XL; // 80px
93
93
 
94
- // Titres (Inter Bold — tailles adaptées mobile/desktop)
95
- text.Titres['H1 - XL']; // Barlow SemiBold, 40px desktop / 32px mobile
94
+ // Titres (Geist SemiBold — tailles adaptées mobile/desktop)
95
+ text.Titres['H1 - XL']; // Geist SemiBold, 40px desktop / 32px mobile
96
96
  text.Titres['H3 - MD']; // 28px desktop / 24px mobile
97
97
  text.Titres['H6 - XXS']; // 20px desktop / 18px mobile
98
98
 
99
99
  // Corps de texte
100
- text['Corps de texte'].SM.Regular; // Inter Regular, 14px
101
- text['Corps de texte'].MD.SemiBold; // Inter SemiBold, 16px
102
- text['Corps de texte'].LG.Medium; // Inter Medium, 18px
100
+ text['Corps de texte'].SM.Regular; // Geist Regular, 14px
101
+ text['Corps de texte'].MD.SemiBold; // Geist SemiBold, 16px
102
+ text['Corps de texte'].LG.Medium; // Geist Medium, 18px
103
103
  ```
104
104
 
105
105
  ## Fonts
106
106
 
107
- Les fonts sont chargées automatiquement par `ThemeProvider`. Deux familles sont disponibles : **Inter** (corps de texte) et **Barlow** (titres).
107
+ Les fonts sont chargées automatiquement par `ThemeProvider`. Une seule famille est utilisée : **Geist** (titres et corps de texte).
108
108
 
109
- Sur le web, les fonts sont injectées via des `@font-face` CSS standards (`font-family: Inter; font-weight: 500`). Sur native, elles utilisent le système expo-font.
109
+ Sur le web, les fonts sont injectées via des `@font-face` CSS standards (`font-family: Geist; font-weight: 500`). Sur native, elles utilisent le système expo-font.
110
110
 
111
111
  ```tsx
112
112
  const { font } = useTheme();
113
113
 
114
- font['Inter-Regular']; // 'Inter-Regular' (native) ou utilisé via font-weight (web)
115
- font['Barlow-Bold'];
114
+ font['Geist-Regular']; // 'Geist-Regular' (native) ou utilisé via font-weight (web)
115
+ font['Geist-Bold'];
116
116
  ```
117
117
 
118
118
  ### fontStyle helper
@@ -123,8 +123,8 @@ Pour créer des styles typés avec la bonne font selon la plateforme :
123
123
  import { fontStyle } from '@alveole/theme';
124
124
 
125
125
  const style = {
126
- ...fontStyle('Inter-Bold'), // { fontFamily: 'Inter', fontWeight: '600' } sur web
127
- fontSize: 16, // { fontFamily: 'Inter-Bold' } sur native
126
+ ...fontStyle('Geist-Bold'), // { fontFamily: 'Geist', fontWeight: '600' } sur web
127
+ fontSize: 16, // { fontFamily: 'Geist-Bold' } sur native
128
128
  };
129
129
  ```
130
130
 
@@ -160,7 +160,7 @@ isVariant('mobile'); // boolean
160
160
  const { color } = useTheme();
161
161
 
162
162
  color.Neutre[700];
163
- color.Mandarine[50];
163
+ color.Watusi[50];
164
164
  color.alpha(color.Neutre[900], 0.5); // 'rgba(55, 58, 63, 0.5)'
165
165
  ```
166
166
 
@@ -170,7 +170,7 @@ color.alpha(color.Neutre[900], 0.5); // 'rgba(55, 58, 63, 0.5)'
170
170
  <ThemeProvider
171
171
  color={{
172
172
  Neutre: { 100: '#F7F7F7' },
173
- Mandarine: { 50: '#FFF3EA' },
173
+ Watusi: { 50: '#FEF5F2' },
174
174
  }}
175
175
  >
176
176
  <App />
@@ -214,7 +214,7 @@ var(--spacing-3W)
214
214
 
215
215
  /* Colors */
216
216
  var(--color-Neutre-200)
217
- var(--color-Mandarine-50)
217
+ var(--color-Watusi-50)
218
218
  ```
219
219
 
220
220
  ## Références
@@ -1 +1 @@
1
- {"version":3,"file":"WebThemeStyles.web.d.ts","sourceRoot":"","sources":["../src/WebThemeStyles.web.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAKpC,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,+BAUzD"}
1
+ {"version":3,"file":"WebThemeStyles.web.d.ts","sourceRoot":"","sources":["../src/WebThemeStyles.web.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEpC,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,+BAWzD"}
@@ -1,9 +1,7 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
- import { generateCSSVariables, generateFontFaceCSS, generateFontSmoothingCSS } from './helpers/injectVariableCSS';
4
- const fontFaceCSS = generateFontFaceCSS();
5
- const fontSmoothingCSS = generateFontSmoothingCSS();
3
+ import { generateThemeCSSParts } from './helpers/injectVariableCSS';
6
4
  export function WebThemeStyles({ theme }) {
7
- const cssVariables = useMemo(() => generateCSSVariables(theme), [theme]);
8
- return (_jsxs(_Fragment, { children: [_jsx("style", { precedence: "default", dangerouslySetInnerHTML: { __html: cssVariables } }), _jsx("style", { precedence: "default", dangerouslySetInnerHTML: { __html: fontFaceCSS } }), _jsx("style", { precedence: "default", dangerouslySetInnerHTML: { __html: fontSmoothingCSS } })] }));
5
+ const parts = useMemo(() => generateThemeCSSParts(theme), [theme]);
6
+ return (_jsx(_Fragment, { children: parts.map((css, index) => (_jsx("style", { precedence: "default", dangerouslySetInnerHTML: { __html: css } }, index))) }));
9
7
  }
@@ -19,19 +19,6 @@ export declare const Colors: {
19
19
  readonly 'sun-475': "#3E7F2E";
20
20
  readonly 'sun-475-hover': "#28571D";
21
21
  };
22
- readonly Mandarine: {
23
- readonly 50: "#FEF9EE";
24
- readonly 100: "#FDF2D7";
25
- readonly 200: "#FBE0AD";
26
- readonly 300: "#F8C979";
27
- readonly 400: "#F4A843";
28
- readonly 500: "#F19023";
29
- readonly 600: "#E27414";
30
- readonly 700: "#BB5813";
31
- readonly 800: "#954517";
32
- readonly 900: "#783B16";
33
- readonly 950: "#411C09";
34
- };
35
22
  readonly Lilas: {
36
23
  readonly 50: "#F6F5FD";
37
24
  readonly 100: "#EFECFB";
@@ -45,19 +32,6 @@ export declare const Colors: {
45
32
  readonly 900: "#4E2E84";
46
33
  readonly 950: "#301C59";
47
34
  };
48
- readonly Shakespeare: {
49
- readonly 50: "#EEFBFD";
50
- readonly 100: "#D3F3FA";
51
- readonly 200: "#ADE6F4";
52
- readonly 300: "#75D3EB";
53
- readonly 400: "#31B5DA";
54
- readonly 500: "#1999C1";
55
- readonly 600: "#187BA2";
56
- readonly 700: "#1A6484";
57
- readonly 800: "#1E526C";
58
- readonly 900: "#1D465C";
59
- readonly 950: "#0E2D3E";
60
- };
61
35
  readonly Cerise: {
62
36
  readonly 50: "#FDF2F8";
63
37
  readonly 100: "#FCE7F3";
@@ -71,19 +45,6 @@ export declare const Colors: {
71
45
  readonly 900: "#841744";
72
46
  readonly 950: "#510624";
73
47
  };
74
- readonly Pacifika: {
75
- readonly 50: "#FFFDE4";
76
- readonly 100: "#FFFDC5";
77
- readonly 200: "#FFFF92";
78
- readonly 300: "#F9FF53";
79
- readonly 400: "#EEFB20";
80
- readonly 500: "#D1E200";
81
- readonly 600: "#A2B500";
82
- readonly 700: "#738102";
83
- readonly 800: "#5F6B09";
84
- readonly 900: "#505A0D";
85
- readonly 950: "#2A3300";
86
- };
87
48
  readonly GoldenFizz: {
88
49
  readonly 50: "#FFFEE5";
89
50
  readonly 100: "#FEFFC7";
@@ -110,58 +71,6 @@ export declare const Colors: {
110
71
  readonly 900: "#404668";
111
72
  readonly 950: "#2A2D41";
112
73
  };
113
- readonly ButteryWhite: {
114
- readonly 50: "#FFFBEA";
115
- readonly 100: "#FEF4C7";
116
- readonly 200: "#FDE78A";
117
- readonly 300: "#FCD54D";
118
- readonly 400: "#FBC124";
119
- readonly 500: "#F5A00B";
120
- readonly 600: "#D97906";
121
- readonly 700: "#B45509";
122
- readonly 800: "#92410E";
123
- readonly 900: "#78360F";
124
- readonly 950: "#451B03";
125
- };
126
- readonly CoralRed: {
127
- readonly 50: "#FEF2F2";
128
- readonly 100: "#FEE2E2";
129
- readonly 200: "#FECACA";
130
- readonly 300: "#FCA5A5";
131
- readonly 400: "#F77272";
132
- readonly 500: "#EF4E4E";
133
- readonly 600: "#DB2727";
134
- readonly 700: "#B81D1D";
135
- readonly 800: "#981C1C";
136
- readonly 900: "#7F1D1D";
137
- readonly 950: "#450A0A";
138
- };
139
- readonly Lochmara: {
140
- readonly 50: "#F1F8FE";
141
- readonly 100: "#E2F1FC";
142
- readonly 200: "#BFE2F8";
143
- readonly 300: "#87CCF2";
144
- readonly 400: "#47B0E9";
145
- readonly 500: "#1F97D8";
146
- readonly 600: "#1177B6";
147
- readonly 700: "#0F5F95";
148
- readonly 800: "#11527B";
149
- readonly 900: "#144566";
150
- readonly 950: "#0D2C44";
151
- };
152
- readonly BigStone: {
153
- readonly 50: "#F2F8FD";
154
- readonly 100: "#E4EFFA";
155
- readonly 200: "#C2DFF5";
156
- readonly 300: "#8CC5ED";
157
- readonly 400: "#4EA7E2";
158
- readonly 500: "#288CCF";
159
- readonly 600: "#196FB0";
160
- readonly 700: "#16598E";
161
- readonly 800: "#164C76";
162
- readonly 900: "#174063";
163
- readonly 950: "#102A43";
164
- };
165
74
  readonly PinkVivid: {
166
75
  readonly 50: "#FFF5F8";
167
76
  readonly 100: "#FFB8D2";
@@ -174,31 +83,6 @@ export declare const Colors: {
174
83
  readonly 800: "#870557";
175
84
  readonly 900: "#620042";
176
85
  };
177
- readonly LimeGreen: {
178
- readonly 50: "#F6FCE9";
179
- readonly 100: "#EAF7D0";
180
- readonly 200: "#D7F0A6";
181
- readonly 300: "#BBE472";
182
- readonly 400: "#A1D447";
183
- readonly 500: "#7BB026";
184
- readonly 600: "#7BB026";
185
- readonly 700: "#4D711A";
186
- readonly 800: "#3F5A1A";
187
- readonly 900: "#374D1A";
188
- readonly 950: "#1A2A09";
189
- };
190
- readonly Purple: {
191
- readonly 50: "#EAE2F8";
192
- readonly 100: "#CFBCF2";
193
- readonly 200: "#A081D9";
194
- readonly 300: "#8662C7";
195
- readonly 400: "#724BB7";
196
- readonly 500: "#653CAD";
197
- readonly 600: "#51279B";
198
- readonly 700: "#421987";
199
- readonly 800: "#34126F";
200
- readonly 900: "#240754";
201
- };
202
86
  readonly Focus: {
203
87
  readonly 525: "#0A76F6";
204
88
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Color.d.ts","sourceRoot":"","sources":["../../src/constants/Color.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;QAEf,kBAAkB;;;;;;QAMlB,kBAAkB;;QAElB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA6TlB,kBAAkB;;QAElB,kBAAkB;;QAElB,kBAAkB;;QAElB,kBAAkB;;QAElB,kBAAkB;;QAElB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAkClB,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CzB,CAAC;AAGX,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,MAAM,CAAC;AAC3C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC1D,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC;AAC/D,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"Color.d.ts","sourceRoot":"","sources":["../../src/constants/Color.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;QAEf,kBAAkB;;;;;;QAMlB,kBAAkB;;QAElB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAyMlB,kBAAkB;;QAElB,kBAAkB;;QAElB,kBAAkB;;QAElB,kBAAkB;;QAElB,kBAAkB;;QAElB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAkClB,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CzB,CAAC;AAGX,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,MAAM,CAAC;AAC3C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC1D,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC;AAC/D,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC"}
@@ -19,19 +19,6 @@ export const Colors = {
19
19
  'sun-475': '#3E7F2E',
20
20
  'sun-475-hover': '#28571D',
21
21
  },
22
- Mandarine: {
23
- 50: '#FEF9EE',
24
- 100: '#FDF2D7',
25
- 200: '#FBE0AD',
26
- 300: '#F8C979',
27
- 400: '#F4A843',
28
- 500: '#F19023',
29
- 600: '#E27414',
30
- 700: '#BB5813',
31
- 800: '#954517',
32
- 900: '#783B16',
33
- 950: '#411C09',
34
- },
35
22
  Lilas: {
36
23
  50: '#F6F5FD',
37
24
  100: '#EFECFB',
@@ -45,19 +32,6 @@ export const Colors = {
45
32
  900: '#4E2E84',
46
33
  950: '#301C59',
47
34
  },
48
- Shakespeare: {
49
- 50: '#EEFBFD',
50
- 100: '#D3F3FA',
51
- 200: '#ADE6F4',
52
- 300: '#75D3EB',
53
- 400: '#31B5DA',
54
- 500: '#1999C1',
55
- 600: '#187BA2',
56
- 700: '#1A6484',
57
- 800: '#1E526C',
58
- 900: '#1D465C',
59
- 950: '#0E2D3E',
60
- },
61
35
  Cerise: {
62
36
  50: '#FDF2F8',
63
37
  100: '#FCE7F3',
@@ -71,19 +45,6 @@ export const Colors = {
71
45
  900: '#841744',
72
46
  950: '#510624',
73
47
  },
74
- Pacifika: {
75
- 50: '#FFFDE4',
76
- 100: '#FFFDC5',
77
- 200: '#FFFF92',
78
- 300: '#F9FF53',
79
- 400: '#EEFB20',
80
- 500: '#D1E200',
81
- 600: '#A2B500',
82
- 700: '#738102',
83
- 800: '#5F6B09',
84
- 900: '#505A0D',
85
- 950: '#2A3300',
86
- },
87
48
  GoldenFizz: {
88
49
  50: '#FFFEE5',
89
50
  100: '#FEFFC7',
@@ -110,58 +71,6 @@ export const Colors = {
110
71
  900: '#404668',
111
72
  950: '#2A2D41',
112
73
  },
113
- ButteryWhite: {
114
- 50: '#FFFBEA',
115
- 100: '#FEF4C7',
116
- 200: '#FDE78A',
117
- 300: '#FCD54D',
118
- 400: '#FBC124',
119
- 500: '#F5A00B',
120
- 600: '#D97906',
121
- 700: '#B45509',
122
- 800: '#92410E',
123
- 900: '#78360F',
124
- 950: '#451B03',
125
- },
126
- CoralRed: {
127
- 50: '#FEF2F2',
128
- 100: '#FEE2E2',
129
- 200: '#FECACA',
130
- 300: '#FCA5A5',
131
- 400: '#F77272',
132
- 500: '#EF4E4E',
133
- 600: '#DB2727',
134
- 700: '#B81D1D',
135
- 800: '#981C1C',
136
- 900: '#7F1D1D',
137
- 950: '#450A0A',
138
- },
139
- Lochmara: {
140
- 50: '#F1F8FE',
141
- 100: '#E2F1FC',
142
- 200: '#BFE2F8',
143
- 300: '#87CCF2',
144
- 400: '#47B0E9',
145
- 500: '#1F97D8',
146
- 600: '#1177B6',
147
- 700: '#0F5F95',
148
- 800: '#11527B',
149
- 900: '#144566',
150
- 950: '#0D2C44',
151
- },
152
- BigStone: {
153
- 50: '#F2F8FD',
154
- 100: '#E4EFFA',
155
- 200: '#C2DFF5',
156
- 300: '#8CC5ED',
157
- 400: '#4EA7E2',
158
- 500: '#288CCF',
159
- 600: '#196FB0',
160
- 700: '#16598E',
161
- 800: '#164C76',
162
- 900: '#174063',
163
- 950: '#102A43',
164
- },
165
74
  PinkVivid: {
166
75
  50: '#FFF5F8',
167
76
  100: '#FFB8D2',
@@ -174,31 +83,6 @@ export const Colors = {
174
83
  800: '#870557',
175
84
  900: '#620042',
176
85
  },
177
- LimeGreen: {
178
- 50: '#F6FCE9',
179
- 100: '#EAF7D0',
180
- 200: '#D7F0A6',
181
- 300: '#BBE472',
182
- 400: '#A1D447',
183
- 500: '#7BB026',
184
- 600: '#7BB026',
185
- 700: '#4D711A',
186
- 800: '#3F5A1A',
187
- 900: '#374D1A',
188
- 950: '#1A2A09',
189
- },
190
- Purple: {
191
- 50: '#EAE2F8',
192
- 100: '#CFBCF2',
193
- 200: '#A081D9',
194
- 300: '#8662C7',
195
- 400: '#724BB7',
196
- 500: '#653CAD',
197
- 600: '#51279B',
198
- 700: '#421987',
199
- 800: '#34126F',
200
- 900: '#240754',
201
- },
202
86
  Focus: {
203
87
  525: '#0A76F6',
204
88
  },
@@ -0,0 +1,105 @@
1
+ import type { Variant } from './Variant';
2
+ /**
3
+ * Dimensions partagees par tous les controles (bouton, champ, selecteur, puce).
4
+ *
5
+ * Elles sont fixees ici plutot que derivees d'un padding et d'une hauteur de ligne :
6
+ * c'est ce qui garantit qu'un bouton et un champ places cote a cote s'alignent.
7
+ *
8
+ * Deux echelles plutot qu'une (ADR 0013) : les outils professionnels sont compacts,
9
+ * l'usage au doigt demande de la place. `tablet` se range avec `mobile`, un iPad etant
10
+ * tactile. L'echelle desktop suit les primitives de Primer.
11
+ */
12
+ declare const DESKTOP: {
13
+ readonly xs: {
14
+ readonly height: 24;
15
+ readonly paddingInline: 8;
16
+ readonly gap: 4;
17
+ };
18
+ readonly sm: {
19
+ readonly height: 28;
20
+ readonly paddingInline: 8;
21
+ readonly gap: 8;
22
+ };
23
+ readonly md: {
24
+ readonly height: 32;
25
+ readonly paddingInline: 12;
26
+ readonly gap: 8;
27
+ };
28
+ readonly lg: {
29
+ readonly height: 40;
30
+ readonly paddingInline: 16;
31
+ readonly gap: 8;
32
+ };
33
+ readonly xl: {
34
+ readonly height: 48;
35
+ readonly paddingInline: 16;
36
+ readonly gap: 8;
37
+ };
38
+ };
39
+ export declare const ControlSizes: {
40
+ readonly desktop: {
41
+ readonly xs: {
42
+ readonly height: 24;
43
+ readonly paddingInline: 8;
44
+ readonly gap: 4;
45
+ };
46
+ readonly sm: {
47
+ readonly height: 28;
48
+ readonly paddingInline: 8;
49
+ readonly gap: 8;
50
+ };
51
+ readonly md: {
52
+ readonly height: 32;
53
+ readonly paddingInline: 12;
54
+ readonly gap: 8;
55
+ };
56
+ readonly lg: {
57
+ readonly height: 40;
58
+ readonly paddingInline: 16;
59
+ readonly gap: 8;
60
+ };
61
+ readonly xl: {
62
+ readonly height: 48;
63
+ readonly paddingInline: 16;
64
+ readonly gap: 8;
65
+ };
66
+ };
67
+ readonly mobile: {
68
+ readonly xs: {
69
+ readonly height: 28;
70
+ readonly paddingInline: 8;
71
+ readonly gap: 8;
72
+ };
73
+ readonly sm: {
74
+ readonly height: 32;
75
+ readonly paddingInline: 12;
76
+ readonly gap: 8;
77
+ };
78
+ readonly md: {
79
+ readonly height: 40;
80
+ readonly paddingInline: 16;
81
+ readonly gap: 8;
82
+ };
83
+ readonly lg: {
84
+ readonly height: 48;
85
+ readonly paddingInline: 24;
86
+ readonly gap: 8;
87
+ };
88
+ readonly xl: {
89
+ readonly height: 56;
90
+ readonly paddingInline: 24;
91
+ readonly gap: 8;
92
+ };
93
+ };
94
+ };
95
+ export type ControlDensite = keyof typeof ControlSizes;
96
+ export type ControlSize = {
97
+ height: number;
98
+ paddingInline: number;
99
+ gap: number;
100
+ };
101
+ export type ControlSizeKey = keyof typeof DESKTOP;
102
+ /** Une tablette est tactile : elle suit la densite mobile, jamais celle du desktop. */
103
+ export declare const controlSizesFor: (variant: Variant) => Record<ControlSizeKey, ControlSize>;
104
+ export {};
105
+ //# sourceMappingURL=Control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Control.d.ts","sourceRoot":"","sources":["../../src/constants/Control.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;;;;;;GASG;AACH,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;CAMH,CAAC;AAWX,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgD,CAAC;AAE1E,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,YAAY,CAAC;AACvD,MAAM,MAAM,WAAW,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AACjF,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,OAAO,CAAC;AAElD,uFAAuF;AACvF,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,KAAG,MAAM,CAAC,cAAc,EAAE,WAAW,CACjB,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Dimensions partagees par tous les controles (bouton, champ, selecteur, puce).
3
+ *
4
+ * Elles sont fixees ici plutot que derivees d'un padding et d'une hauteur de ligne :
5
+ * c'est ce qui garantit qu'un bouton et un champ places cote a cote s'alignent.
6
+ *
7
+ * Deux echelles plutot qu'une (ADR 0013) : les outils professionnels sont compacts,
8
+ * l'usage au doigt demande de la place. `tablet` se range avec `mobile`, un iPad etant
9
+ * tactile. L'echelle desktop suit les primitives de Primer.
10
+ */
11
+ const DESKTOP = {
12
+ xs: { height: 24, paddingInline: 8, gap: 4 },
13
+ sm: { height: 28, paddingInline: 8, gap: 8 },
14
+ md: { height: 32, paddingInline: 12, gap: 8 },
15
+ lg: { height: 40, paddingInline: 16, gap: 8 },
16
+ xl: { height: 48, paddingInline: 16, gap: 8 },
17
+ };
18
+ /** Reprend les hauteurs actuelles du kit : aucune rupture visuelle sur telephone. */
19
+ const MOBILE = {
20
+ xs: { height: 28, paddingInline: 8, gap: 8 },
21
+ sm: { height: 32, paddingInline: 12, gap: 8 },
22
+ md: { height: 40, paddingInline: 16, gap: 8 },
23
+ lg: { height: 48, paddingInline: 24, gap: 8 },
24
+ xl: { height: 56, paddingInline: 24, gap: 8 },
25
+ };
26
+ export const ControlSizes = { desktop: DESKTOP, mobile: MOBILE };
27
+ /** Une tablette est tactile : elle suit la densite mobile, jamais celle du desktop. */
28
+ export const controlSizesFor = (variant) => variant === 'desktop' ? ControlSizes.desktop : ControlSizes.mobile;
@@ -4,7 +4,7 @@ export declare const Elevations: {
4
4
  raised: {
5
5
  web: string;
6
6
  mobile: {
7
- shadowColor: Color;
7
+ shadowColor: string;
8
8
  shadowOffset: {
9
9
  width: number;
10
10
  height: number;
@@ -17,7 +17,7 @@ export declare const Elevations: {
17
17
  overlap: {
18
18
  web: string;
19
19
  mobile: {
20
- shadowColor: Color;
20
+ shadowColor: string;
21
21
  shadowOffset: {
22
22
  width: number;
23
23
  height: number;
@@ -30,7 +30,7 @@ export declare const Elevations: {
30
30
  lifted: {
31
31
  web: string;
32
32
  mobile: {
33
- shadowColor: Color;
33
+ shadowColor: string;
34
34
  shadowOffset: {
35
35
  width: number;
36
36
  height: number;
@@ -44,7 +44,7 @@ export declare const Elevations: {
44
44
  0: {
45
45
  web: string;
46
46
  mobile: {
47
- shadowColor: Color;
47
+ shadowColor: string;
48
48
  shadowOffset: {
49
49
  width: number;
50
50
  height: number;
@@ -58,7 +58,7 @@ export declare const Elevations: {
58
58
  1: {
59
59
  web: string;
60
60
  mobile: {
61
- shadowColor: Color;
61
+ shadowColor: string;
62
62
  shadowOffset: {
63
63
  width: number;
64
64
  height: number;
@@ -72,7 +72,7 @@ export declare const Elevations: {
72
72
  2: {
73
73
  web: string;
74
74
  mobile: {
75
- shadowColor: Color;
75
+ shadowColor: string;
76
76
  shadowOffset: {
77
77
  width: number;
78
78
  height: number;
@@ -86,7 +86,7 @@ export declare const Elevations: {
86
86
  3: {
87
87
  web: string;
88
88
  mobile: {
89
- shadowColor: Color;
89
+ shadowColor: string;
90
90
  shadowOffset: {
91
91
  width: number;
92
92
  height: number;
@@ -100,7 +100,7 @@ export declare const Elevations: {
100
100
  4: {
101
101
  web: string;
102
102
  mobile: {
103
- shadowColor: Color;
103
+ shadowColor: string;
104
104
  shadowOffset: {
105
105
  width: number;
106
106
  height: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Elevation.d.ts","sourceRoot":"","sources":["../../src/constants/Elevation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIrC,eAAO,MAAM,UAAU;;;;yBAII,KAAK;;;;;;;;;;;;;yBAUL,KAAK;;;;;;;;;;;;;yBAUL,KAAK;;;;;;;;;;IAO9B,kBAAkB;;;;yBAIgB,KAAK;;;;;;;;;;IAOvC,kBAAkB;;;;yBAIO,KAAK;;;;;;;;;;IAO9B,kBAAkB;;;;yBAIO,KAAK;;;;;;;;;;IAO9B,kBAAkB;;;;yBAIO,KAAK;;;;;;;;;;IAO9B,kBAAkB;;;;yBAIO,KAAK;;;;;;;;;;CAOW,CAAC;AAG5C,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AACpE,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE;QACN,WAAW,EAAE,KAAK,CAAC;QACnB,YAAY,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;QACxC,aAAa,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;QAC1C,YAAY,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;QACxC,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;KACnC,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"Elevation.d.ts","sourceRoot":"","sources":["../../src/constants/Elevation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIrC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+BrB,kBAAkB;;;;;;;;;;;;;;IAWlB,kBAAkB;;;;;;;;;;;;;;IAWlB,kBAAkB;;;;;;;;;;;;;;IAWlB,kBAAkB;;;;;;;;;;;;;;IAWlB,kBAAkB;;;;;;;;;;;;;;CAWuB,CAAC;AAG5C,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AACpE,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE;QACN,WAAW,EAAE,KAAK,CAAC;QACnB,YAAY,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;QACxC,aAAa,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;QAC1C,YAAY,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;QACxC,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;KACnC,CAAC;CACH,CAAC"}