@design-system-rte/core 0.1.1 → 0.1.2-rc2
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/assets/fonts/Nunito-Bold.woff2 +0 -0
- package/assets/fonts/Nunito-Light.woff2 +0 -0
- package/assets/fonts/Nunito-Regular.woff2 +0 -0
- package/assets/fonts/Nunito-SemiBold.woff2 +0 -0
- package/components/button/button.constants.ts +7 -0
- package/components/button/button.interface.d.ts +12 -0
- package/components/grid/grid.interface.d.ts +14 -0
- package/components/grid/grid.scss +79 -0
- package/components/grid/grid.stories.scss +22 -0
- package/components/icon/icon.interface.d.ts +4 -0
- package/components/link/link.interface.d.ts +5 -0
- package/components/radio-button/radio-button.constants.ts +1 -0
- package/components/radio-button/radio-button.interface.d.ts +8 -0
- package/components/radio-button-group/radio-button-group.interface.d.ts +16 -0
- package/constants/keyboard.constants.ts +3 -0
- package/package.json +2 -20
- package/tokens/_layout.scss +4 -4
- package/tokens/_mixins.scss +1 -0
- package/tokens/_typography.scss +74 -0
- package/tokens/main.scss +1 -1
- package/dist/core.mjs +0 -1
- package/dist/index.d.ts +0 -16
- package/dist/styles/main.css +0 -27
- package/dist/styles/main.css.map +0 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ButtonVariant = 'filled' | 'outlined' | 'text' | 'transparent' | 'danger'
|
|
2
|
+
export type ButtonSize = 's' | 'm' | 'l';
|
|
3
|
+
export type ButtonIconPosition = 'left' | 'right';
|
|
4
|
+
|
|
5
|
+
export interface ButtonProps {
|
|
6
|
+
label: string;
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
size?: ButtonSize;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
icon?: string;
|
|
11
|
+
iconPosition?: ButtonIconPosition
|
|
12
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@use '@design-system-rte/core/tokens/main.scss' as *;
|
|
2
|
+
|
|
3
|
+
$grid-max-width-narrow: 864px;
|
|
4
|
+
$grid-max-width-wide: 1296px;
|
|
5
|
+
|
|
6
|
+
.grid {
|
|
7
|
+
display: grid;
|
|
8
|
+
grid-template-columns: repeat($column-number-s, 1fr);
|
|
9
|
+
column-gap: $positive-spacing_150;
|
|
10
|
+
padding: 0 $positive-spacing_200;
|
|
11
|
+
margin: auto;
|
|
12
|
+
|
|
13
|
+
@media (min-width: $breakpoints-xs) {
|
|
14
|
+
grid-template-columns: repeat($column-number-m, 1fr);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@media (min-width: $breakpoints-m) {
|
|
18
|
+
grid-template-columns: repeat($column-number-l, 1fr);
|
|
19
|
+
column-gap: $positive-spacing_200;
|
|
20
|
+
padding: 0 $positive-spacing_400;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&[data-gridtype='fixed-narrow'] {
|
|
24
|
+
max-width: $grid-max-width-narrow;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&[data-gridtype='fixed-wide'] {
|
|
28
|
+
max-width: $grid-max-width-wide;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.col {
|
|
33
|
+
grid-column: span 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@for $i from 1 through 12 {
|
|
37
|
+
.col-xxs-#{$i} {
|
|
38
|
+
grid-column: span #{$i};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media (min-width: $breakpoints-xs) {
|
|
43
|
+
@for $i from 1 through 12 {
|
|
44
|
+
.col-xs-#{$i} {
|
|
45
|
+
grid-column: span #{$i};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (min-width: $breakpoints-s) {
|
|
51
|
+
@for $i from 1 through 12 {
|
|
52
|
+
.col-s-#{$i} {
|
|
53
|
+
grid-column: span #{$i};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (min-width: $breakpoints-m) {
|
|
59
|
+
@for $i from 1 through 12 {
|
|
60
|
+
.col-m-#{$i} {
|
|
61
|
+
grid-column: span #{$i};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media (min-width: $breakpoints-l) {
|
|
67
|
+
@for $i from 1 through 12 {
|
|
68
|
+
.col-l-#{$i} {
|
|
69
|
+
grid-column: span #{$i};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
@media (min-width: $breakpoints-xl) {
|
|
74
|
+
@for $i from 1 through 12 {
|
|
75
|
+
.col-xl-#{$i} {
|
|
76
|
+
grid-column: span #{$i};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@use '@design-system-rte/core/tokens/main.scss' as *;
|
|
2
|
+
@use '@design-system-rte/core/tokens/primitives/_colors.scss' as *;
|
|
3
|
+
|
|
4
|
+
.sb-css-grid-container {
|
|
5
|
+
background-color: $jaune-indications-200;
|
|
6
|
+
outline: 1px dashed $jaune-indications-400;
|
|
7
|
+
|
|
8
|
+
.grid {
|
|
9
|
+
.col {
|
|
10
|
+
@include typography-text-l;
|
|
11
|
+
background-color: #FFFFFF;
|
|
12
|
+
box-shadow: 0 0 0 1px $jaune-indications-400;
|
|
13
|
+
min-block-size: 100px;
|
|
14
|
+
display: flex;
|
|
15
|
+
gap: $positive-spacing_200;
|
|
16
|
+
|
|
17
|
+
p {
|
|
18
|
+
margin: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const labelSize = 16
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type Direction = "horizontal" | "vertical";
|
|
2
|
+
|
|
3
|
+
export interface RadioButtonGroupProps {
|
|
4
|
+
groupName: string;
|
|
5
|
+
items: string[];
|
|
6
|
+
direction?: Direction;
|
|
7
|
+
showItemsLabel?: boolean;
|
|
8
|
+
groupTitle?: string;
|
|
9
|
+
showGroupTitle?: boolean;
|
|
10
|
+
groupHelpText?: string;
|
|
11
|
+
showHelpText?: boolean;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
error?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
readOnly?: boolean;
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design-system-rte/core",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"main": "
|
|
5
|
-
"types": "dist/index.d.ts",
|
|
6
|
-
"style": "dist/styles/main.css",
|
|
7
|
-
"sass": "tokens/main.scss",
|
|
8
|
-
"files": ["dist", "tokens"],
|
|
3
|
+
"version": "0.1.2-rc2",
|
|
4
|
+
"main": "index.js",
|
|
9
5
|
"scripts": {
|
|
10
|
-
"build": "vite build && sass tokens/main.scss:dist/styles/main.css",
|
|
11
|
-
"build:types": "tsc --emitDeclarationOnly",
|
|
12
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
13
7
|
},
|
|
14
|
-
"repository": {
|
|
15
|
-
"type": "git",
|
|
16
|
-
"url": "https://github.com/rte-france/design-system-rte"
|
|
17
|
-
},
|
|
18
8
|
"keywords": [],
|
|
19
9
|
"author": "",
|
|
20
10
|
"license": "ISC",
|
|
@@ -24,13 +14,5 @@
|
|
|
24
14
|
},
|
|
25
15
|
"peerDependencies": {
|
|
26
16
|
"sass": "^1.85.1"
|
|
27
|
-
},
|
|
28
|
-
"exports": {
|
|
29
|
-
".": {
|
|
30
|
-
"types": "./dist/index.d.ts",
|
|
31
|
-
"import": "./dist/index.js"
|
|
32
|
-
},
|
|
33
|
-
"./tokens/*": "./tokens/*",
|
|
34
|
-
"./style.css": "./dist/styles/main.css"
|
|
35
17
|
}
|
|
36
18
|
}
|
package/tokens/_layout.scss
CHANGED
|
@@ -4,10 +4,10 @@ $breakpoints-s: 768px;
|
|
|
4
4
|
$breakpoints-m: 1024px;
|
|
5
5
|
$breakpoints-l: 1440px;
|
|
6
6
|
$breakpoints-xl: 1768px;
|
|
7
|
-
$column-number-xs:
|
|
8
|
-
$column-number-s:
|
|
9
|
-
$column-number-m:
|
|
10
|
-
$column-number-l:
|
|
7
|
+
$column-number-xs: 1;
|
|
8
|
+
$column-number-s: 2;
|
|
9
|
+
$column-number-m: 6;
|
|
10
|
+
$column-number-l: 12;
|
|
11
11
|
$panel-width-xs: 56px;
|
|
12
12
|
$panel-width-s: 320px;
|
|
13
13
|
$panel-width-m: 400px;
|
package/tokens/_mixins.scss
CHANGED
package/tokens/_typography.scss
CHANGED
|
@@ -146,4 +146,78 @@ $button-l-semibold-letter-spacing: $letter-spacing-s;
|
|
|
146
146
|
font-size: $button-l-semibold-font-size;
|
|
147
147
|
line-height: $button-l-semibold-line-height;
|
|
148
148
|
letter-spacing: $button-l-semibold-letter-spacing;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@mixin typography-text {
|
|
152
|
+
font-feature-settings: 'liga' off, 'clig' off;
|
|
153
|
+
font-style: normal;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@mixin typography-text-m {
|
|
157
|
+
@include typography-text;
|
|
158
|
+
font-family: $text-m-regular-font-family;
|
|
159
|
+
font-weight: $text-m-regular-font-weight;
|
|
160
|
+
font-size: $text-m-regular-font-size;
|
|
161
|
+
line-height: $text-m-regular-line-height;
|
|
162
|
+
letter-spacing: $text-m-regular-letter-spacing;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@mixin typography-text-m-bold {
|
|
166
|
+
@include typography-text;
|
|
167
|
+
font-family: $text-m-bold-font-family;
|
|
168
|
+
font-weight: $text-m-bold-font-weight;
|
|
169
|
+
font-size: $text-m-bold-font-size;
|
|
170
|
+
line-height: $text-m-bold-line-height;
|
|
171
|
+
letter-spacing: $text-m-bold-letter-spacing;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@mixin typography-text-l {
|
|
175
|
+
@include typography-text;
|
|
176
|
+
font-family: $text-l-regular-font-family;
|
|
177
|
+
font-weight: $text-l-regular-font-weight;
|
|
178
|
+
font-size: $text-l-regular-font-size;
|
|
179
|
+
line-height: $text-l-regular-line-height;
|
|
180
|
+
letter-spacing: $text-l-regular-letter-spacing;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@mixin typography-link {
|
|
184
|
+
font-feature-settings: 'liga' off, 'clig' off;
|
|
185
|
+
font-style: normal;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@mixin typography-link-m {
|
|
189
|
+
@include typography-link;
|
|
190
|
+
font-family: $text-m-regular-font-family;
|
|
191
|
+
font-weight: $text-m-regular-font-weight;
|
|
192
|
+
font-size: $text-m-regular-font-size;
|
|
193
|
+
line-height: $text-m-regular-line-height;
|
|
194
|
+
letter-spacing: $text-m-regular-letter-spacing;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@mixin typography-radio-button {
|
|
198
|
+
font-feature-settings: 'liga' off, 'clig' off;
|
|
199
|
+
font-style: normal;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@mixin typography-radio-button-l {
|
|
203
|
+
@include typography-radio-button;
|
|
204
|
+
font-family: $text-l-regular-font-family;
|
|
205
|
+
font-size: $text-l-regular-font-size;
|
|
206
|
+
font-weight: $text-l-regular-font-weight;
|
|
207
|
+
line-height: $text-l-regular-line-height;
|
|
208
|
+
letter-spacing: $text-l-regular-letter-spacing;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
@mixin typography-heading{
|
|
212
|
+
font-feature-settings: "liga" off, "clig" off;
|
|
213
|
+
font-style: normal;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@mixin typography-heading-s{
|
|
217
|
+
@include typography-heading;
|
|
218
|
+
font-family: $heading-s-semibold-font-family;
|
|
219
|
+
font-weight: $heading-s-semibold-font-weight;
|
|
220
|
+
font-size: $heading-s-semibold-font-size;
|
|
221
|
+
line-height: $heading-s-semibold-line-height;
|
|
222
|
+
letter-spacing: $heading-s-semibold-letter-spacing;
|
|
149
223
|
}
|
package/tokens/main.scss
CHANGED
package/dist/core.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/dist/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare type ButtonIconPosition = 'left' | 'right';
|
|
2
|
-
|
|
3
|
-
export declare interface ButtonProps {
|
|
4
|
-
label: string;
|
|
5
|
-
variant?: ButtonVariant;
|
|
6
|
-
size?: ButtonSize;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
icon?: string;
|
|
9
|
-
iconPosition?: ButtonIconPosition;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export declare type ButtonSize = 's' | 'm' | 'l';
|
|
13
|
-
|
|
14
|
-
export declare type ButtonVariant = 'filled' | 'outlined' | 'text' | 'transparent' | 'danger';
|
|
15
|
-
|
|
16
|
-
export { }
|
package/dist/styles/main.css
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:wght,FILL,GRAD@400,0,0&display=swap");
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: "Nunito";
|
|
4
|
-
src: url("../../assets/fonts/Nunito-Light.woff2") format("woff2");
|
|
5
|
-
font-weight: 300;
|
|
6
|
-
font-style: normal;
|
|
7
|
-
}
|
|
8
|
-
@font-face {
|
|
9
|
-
font-family: "Nunito";
|
|
10
|
-
src: url("../../assets/fonts/Nunito-Regular.woff2") format("woff2");
|
|
11
|
-
font-weight: 400;
|
|
12
|
-
font-style: normal;
|
|
13
|
-
}
|
|
14
|
-
@font-face {
|
|
15
|
-
font-family: "Nunito";
|
|
16
|
-
src: url("../../assets/fonts/Nunito-SemiBold.woff2") format("woff2");
|
|
17
|
-
font-weight: 600;
|
|
18
|
-
font-style: normal;
|
|
19
|
-
}
|
|
20
|
-
@font-face {
|
|
21
|
-
font-family: "Nunito";
|
|
22
|
-
src: url("../../assets/fonts/Nunito-Bold.woff2") format("woff2");
|
|
23
|
-
font-weight: 700;
|
|
24
|
-
font-style: normal;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/*# sourceMappingURL=main.css.map */
|
package/dist/styles/main.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../tokens/main.scss","../../tokens/primitives/_typography.scss"],"names":[],"mappings":"AAOQ;ACLR;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA","file":"main.css"}
|