@swell/swell-ui 0.0.0-stage → 0.1.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.
@@ -0,0 +1,135 @@
1
+ {
2
+ "status": {
3
+ "$description": "Status messages. The type picks the color of the icon and border, and tints the background of a filled message; the appearance lays it out: filled adds the background, outline keeps the border, plain keeps the icon and text in the font of a field error, and quiet draws a note in the quiet palette.",
4
+ "$extensions": {
5
+ "is.swell.ui": {
6
+ "attributes": {
7
+ "type": ["danger", "success", "warning"]
8
+ },
9
+ "settings": {
10
+ "appearance": {
11
+ "description": "How status messages are drawn when the element has no appearance attribute.",
12
+ "values": ["filled", "outline", "plain"],
13
+ "default": "filled"
14
+ }
15
+ }
16
+ }
17
+ },
18
+ "border": {
19
+ "radius": {
20
+ "$type": "dimension",
21
+ "$value": "{border.radius}",
22
+ "$description": "Corner radius of status messages."
23
+ }
24
+ },
25
+ "color": {
26
+ "background": {
27
+ "$type": "color",
28
+ "$value": "{color.secondary.background}",
29
+ "$description": "Background of filled messages; a type sets its own."
30
+ },
31
+ "foreground": {
32
+ "$type": "color",
33
+ "$value": "{color.foreground}",
34
+ "$description": "Text of status messages."
35
+ },
36
+ "accent": {
37
+ "$type": "color",
38
+ "$value": "{status.color.foreground}",
39
+ "$description": "Icon of a message without a type, such as the host's start icon; a type sets its own, which also draws the border of an outline message and the text of a plain danger one."
40
+ },
41
+ "border": {
42
+ "$type": "color",
43
+ "$value": "{color.border}",
44
+ "$description": "Border of messages; a type sets its own."
45
+ }
46
+ },
47
+ "danger": {
48
+ "color": {
49
+ "accent": {
50
+ "$type": "color",
51
+ "$value": "{color.danger}",
52
+ "$description": "Icon of danger messages, the border of an outline one and the text of a plain one."
53
+ },
54
+ "background": {
55
+ "$type": "color",
56
+ "$value": {
57
+ "colorSpace": "srgb",
58
+ "components": [0.8431, 0.2157, 0.2392],
59
+ "hex": "#d7373d",
60
+ "alpha": 0.09
61
+ },
62
+ "$description": "Background of filled danger messages."
63
+ },
64
+ "border": {
65
+ "$type": "color",
66
+ "$value": {
67
+ "colorSpace": "srgb",
68
+ "components": [0.8431, 0.2157, 0.2392],
69
+ "hex": "#d7373d",
70
+ "alpha": 0.35
71
+ },
72
+ "$description": "Border of filled danger messages."
73
+ }
74
+ }
75
+ },
76
+ "success": {
77
+ "color": {
78
+ "accent": {
79
+ "$type": "color",
80
+ "$value": "{color.success}",
81
+ "$description": "Icon of success messages, the border of an outline one."
82
+ },
83
+ "background": {
84
+ "$type": "color",
85
+ "$value": {
86
+ "colorSpace": "srgb",
87
+ "components": [0.0706, 0.5804, 0.3686],
88
+ "hex": "#12945e",
89
+ "alpha": 0.09
90
+ },
91
+ "$description": "Background of filled success messages."
92
+ },
93
+ "border": {
94
+ "$type": "color",
95
+ "$value": {
96
+ "colorSpace": "srgb",
97
+ "components": [0.0706, 0.5804, 0.3686],
98
+ "hex": "#12945e",
99
+ "alpha": 0.35
100
+ },
101
+ "$description": "Border of filled success messages."
102
+ }
103
+ }
104
+ },
105
+ "warning": {
106
+ "color": {
107
+ "accent": {
108
+ "$type": "color",
109
+ "$value": "{color.warning}",
110
+ "$description": "Icon of warning messages, the border of an outline one."
111
+ },
112
+ "background": {
113
+ "$type": "color",
114
+ "$value": {
115
+ "colorSpace": "srgb",
116
+ "components": [0.7255, 0.4392, 0.0392],
117
+ "hex": "#b9700a",
118
+ "alpha": 0.09
119
+ },
120
+ "$description": "Background of filled warning messages."
121
+ },
122
+ "border": {
123
+ "$type": "color",
124
+ "$value": {
125
+ "colorSpace": "srgb",
126
+ "components": [0.7255, 0.4392, 0.0392],
127
+ "hex": "#b9700a",
128
+ "alpha": 0.35
129
+ },
130
+ "$description": "Border of filled warning messages."
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "tabs": {
3
+ "$description": "Tabs: a line under the chosen tab, a track with a marker under it, or numbered steps. The colors come from the palette; a segmented track takes color.secondary.background and its marker the background below, with a ring in field.color.border.",
4
+ "$extensions": {
5
+ "is.swell.ui": {
6
+ "settings": {
7
+ "appearance": {
8
+ "description": "How tabs are drawn when the element has no appearance attribute; steps come from the attribute only.",
9
+ "values": ["underline", "segmented"],
10
+ "default": "underline"
11
+ }
12
+ }
13
+ }
14
+ },
15
+ "border": {
16
+ "radius": {
17
+ "$type": "dimension",
18
+ "$value": "{border.radius}",
19
+ "$description": "Corner radius of the marker of segmented tabs; the track takes 4px more."
20
+ }
21
+ },
22
+ "indicator": {
23
+ "width": {
24
+ "$type": "dimension",
25
+ "$value": {
26
+ "value": 2,
27
+ "unit": "px"
28
+ },
29
+ "$description": "Width of the line that marks the chosen tab, and of the lines between steps."
30
+ }
31
+ },
32
+ "color": {
33
+ "background": {
34
+ "$type": "color",
35
+ "$value": "{color.background}",
36
+ "$description": "Background of the marker of segmented tabs."
37
+ },
38
+ "shadow": {
39
+ "$type": "color",
40
+ "$value": {
41
+ "colorSpace": "srgb",
42
+ "components": [0, 0, 0],
43
+ "alpha": 0.1,
44
+ "hex": "#000000"
45
+ },
46
+ "$description": "Color of the shadow of the marker of segmented tabs."
47
+ }
48
+ },
49
+ "font": {
50
+ "weight": {
51
+ "$type": "fontWeight",
52
+ "$value": "{font.strong.weight}",
53
+ "$description": "Font weight of tab labels."
54
+ }
55
+ },
56
+ "shadow": {
57
+ "$type": "shadow",
58
+ "$value": {
59
+ "color": "{tabs.color.shadow}",
60
+ "offsetX": {
61
+ "value": 0,
62
+ "unit": "px"
63
+ },
64
+ "offsetY": {
65
+ "value": 1,
66
+ "unit": "px"
67
+ },
68
+ "blur": {
69
+ "value": 3,
70
+ "unit": "px"
71
+ },
72
+ "spread": {
73
+ "value": 0,
74
+ "unit": "px"
75
+ }
76
+ },
77
+ "$description": "Shadow of the marker under the chosen segmented tab, in tabs.color.shadow."
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,222 @@
1
+ {
2
+ "text": {
3
+ "$description": "Text: a title, headings, subheadings, strong text, body text, captions, footnotes and eyebrows. `secondary` is quiet text.",
4
+ "$extensions": {
5
+ "is.swell.ui": {
6
+ "attributes": {
7
+ "type": [
8
+ "title",
9
+ "heading",
10
+ "subheading",
11
+ "strong",
12
+ "caption",
13
+ "footnote",
14
+ "eyebrow"
15
+ ]
16
+ },
17
+ "variants": true
18
+ }
19
+ },
20
+ "font": {
21
+ "family": {
22
+ "$type": "fontFamily",
23
+ "$value": "{font.family}",
24
+ "$description": "Font family of text."
25
+ },
26
+ "size": {
27
+ "$type": "dimension",
28
+ "$value": "{font.size}",
29
+ "$description": "Font size of body text."
30
+ },
31
+ "weight": {
32
+ "$type": "fontWeight",
33
+ "$value": "{font.weight}",
34
+ "$description": "Font weight of body text."
35
+ },
36
+ "tracking": {
37
+ "$type": "number",
38
+ "$value": "{font.tracking}",
39
+ "$description": "Letter spacing of body text, in em.",
40
+ "$extensions": {
41
+ "is.swell.ui": {
42
+ "unit": "em"
43
+ }
44
+ }
45
+ },
46
+ "leading": {
47
+ "$type": "number",
48
+ "$value": "{font.leading}",
49
+ "$description": "Line height of body text, as a multiple of the font size."
50
+ }
51
+ },
52
+ "color": {
53
+ "accent": {
54
+ "$type": "color",
55
+ "$value": "{color.foreground}",
56
+ "$description": "Color of text: text has no fill, so a variant colors it with its accent."
57
+ }
58
+ },
59
+ "title": {
60
+ "font": {
61
+ "family": {
62
+ "$type": "fontFamily",
63
+ "$value": "{font.heading.family}",
64
+ "$description": "Font family of titles."
65
+ },
66
+ "size": {
67
+ "$type": "dimension",
68
+ "$value": {
69
+ "value": 32,
70
+ "unit": "px"
71
+ },
72
+ "$description": "Font size of titles."
73
+ },
74
+ "weight": {
75
+ "$type": "fontWeight",
76
+ "$value": "{font.heading.weight}",
77
+ "$description": "Font weight of titles."
78
+ },
79
+ "tracking": {
80
+ "$type": "number",
81
+ "$value": -0.025,
82
+ "$description": "Letter spacing of titles, in em.",
83
+ "$extensions": {
84
+ "is.swell.ui": {
85
+ "unit": "em"
86
+ }
87
+ }
88
+ },
89
+ "leading": {
90
+ "$type": "number",
91
+ "$value": 1.1,
92
+ "$description": "Line height of titles."
93
+ }
94
+ }
95
+ },
96
+ "heading": {
97
+ "font": {
98
+ "family": {
99
+ "$type": "fontFamily",
100
+ "$value": "{font.heading.family}",
101
+ "$description": "Font family of headings."
102
+ },
103
+ "size": {
104
+ "$type": "dimension",
105
+ "$value": {
106
+ "value": 20,
107
+ "unit": "px"
108
+ },
109
+ "$description": "Font size of headings."
110
+ },
111
+ "weight": {
112
+ "$type": "fontWeight",
113
+ "$value": "{font.heading.weight}",
114
+ "$description": "Font weight of headings."
115
+ },
116
+ "tracking": {
117
+ "$type": "number",
118
+ "$value": "{font.heading.tracking}",
119
+ "$description": "Letter spacing of headings, in em.",
120
+ "$extensions": {
121
+ "is.swell.ui": {
122
+ "unit": "em"
123
+ }
124
+ }
125
+ },
126
+ "leading": {
127
+ "$type": "number",
128
+ "$value": 1.4,
129
+ "$description": "Line height of headings."
130
+ }
131
+ }
132
+ },
133
+ "subheading": {
134
+ "font": {
135
+ "family": {
136
+ "$type": "fontFamily",
137
+ "$value": "{font.heading.family}",
138
+ "$description": "Font family of subheadings."
139
+ },
140
+ "size": {
141
+ "$type": "dimension",
142
+ "$value": {
143
+ "value": 16,
144
+ "unit": "px"
145
+ },
146
+ "$description": "Font size of subheadings."
147
+ },
148
+ "weight": {
149
+ "$type": "fontWeight",
150
+ "$value": "{font.heading.weight}",
151
+ "$description": "Font weight of subheadings."
152
+ },
153
+ "tracking": {
154
+ "$type": "number",
155
+ "$value": -0.01,
156
+ "$description": "Letter spacing of subheadings, in em.",
157
+ "$extensions": {
158
+ "is.swell.ui": {
159
+ "unit": "em"
160
+ }
161
+ }
162
+ },
163
+ "leading": {
164
+ "$type": "number",
165
+ "$value": "{font.leading}",
166
+ "$description": "Line height of subheadings."
167
+ }
168
+ }
169
+ },
170
+ "strong": {
171
+ "font": {
172
+ "weight": {
173
+ "$type": "fontWeight",
174
+ "$value": "{font.strong.weight}",
175
+ "$description": "Font weight of strong text, such as the title of a group of fields."
176
+ }
177
+ }
178
+ },
179
+ "caption": {
180
+ "font": {
181
+ "size": {
182
+ "$type": "dimension",
183
+ "$value": "{font.caption.size}",
184
+ "$description": "Font size of captions."
185
+ }
186
+ }
187
+ },
188
+ "footnote": {
189
+ "font": {
190
+ "size": {
191
+ "$type": "dimension",
192
+ "$value": "{font.footnote.size}",
193
+ "$description": "Font size of footnotes: legal text, footers and notes."
194
+ }
195
+ }
196
+ },
197
+ "eyebrow": {
198
+ "font": {
199
+ "size": {
200
+ "$type": "dimension",
201
+ "$value": "{font.footnote.size}",
202
+ "$description": "Font size of eyebrows, the short uppercase lines above content."
203
+ },
204
+ "weight": {
205
+ "$type": "fontWeight",
206
+ "$value": "{font.bold.weight}",
207
+ "$description": "Font weight of eyebrows."
208
+ },
209
+ "tracking": {
210
+ "$type": "number",
211
+ "$value": 0.08,
212
+ "$description": "Letter spacing of eyebrows, in em.",
213
+ "$extensions": {
214
+ "is.swell.ui": {
215
+ "unit": "em"
216
+ }
217
+ }
218
+ }
219
+ }
220
+ }
221
+ }
222
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "thumbnail": {
3
+ "$description": "Thumbnails: a picture, an icon or initials in a small box, such as the photo of a cart line or an avatar. Primary fills the box with the accent; secondary is quiet, with a border.",
4
+ "$extensions": {
5
+ "is.swell.ui": {
6
+ "variants": true
7
+ }
8
+ },
9
+ "border": {
10
+ "radius": {
11
+ "$type": "dimension",
12
+ "$value": "{border.radius}",
13
+ "$description": "Corner radius of thumbnails that aren't circles."
14
+ }
15
+ },
16
+ "color": {
17
+ "background": {
18
+ "$type": "color",
19
+ "$value": "{color.accent}",
20
+ "$description": "Fill of primary thumbnails, such as an avatar's initials."
21
+ },
22
+ "foreground": {
23
+ "$type": "color",
24
+ "$value": "{color.background}",
25
+ "$description": "Initials and icons of primary thumbnails."
26
+ },
27
+ "border": {
28
+ "$type": "color",
29
+ "$value": {
30
+ "colorSpace": "srgb",
31
+ "components": [0, 0, 0],
32
+ "alpha": 0,
33
+ "hex": "#000000"
34
+ },
35
+ "$description": "Border of primary thumbnails; none by default, also over a photo."
36
+ }
37
+ },
38
+ "font": {
39
+ "weight": {
40
+ "$type": "fontWeight",
41
+ "$value": 650,
42
+ "$description": "Font weight of the initials in a thumbnail."
43
+ }
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "border": {
3
+ "$description": "Borders of every component.",
4
+ "$extensions": {
5
+ "is.swell.ui": {
6
+ "attributes": {
7
+ "type": ["strong"]
8
+ }
9
+ }
10
+ },
11
+ "radius": {
12
+ "$type": "dimension",
13
+ "$value": {
14
+ "value": 8,
15
+ "unit": "px"
16
+ },
17
+ "$description": "Base corner radius."
18
+ },
19
+ "width": {
20
+ "$type": "dimension",
21
+ "$value": {
22
+ "value": 1,
23
+ "unit": "px"
24
+ },
25
+ "$description": "Width of a border or a line: the frames of fields, checkboxes, overlays, cards, chips, badges, thumbnails, status messages, quantities and button options, buttons, dividers, the lines between the options of a select, above a lookup's action and under tabs."
26
+ },
27
+ "strong": {
28
+ "width": {
29
+ "$type": "dimension",
30
+ "$value": {
31
+ "value": 1.5,
32
+ "unit": "px"
33
+ },
34
+ "$description": "Width of a border that marks a control: outline buttons, the frames of outline radio options, radio circles, the circles of steps and skeleton cards."
35
+ }
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "color": {
3
+ "$description": "Dark theme values of color.",
4
+ "background": {
5
+ "$type": "color",
6
+ "$value": {
7
+ "colorSpace": "srgb",
8
+ "components": [0.0784, 0.0902, 0.1137],
9
+ "hex": "#14171d"
10
+ }
11
+ },
12
+ "foreground": {
13
+ "$type": "color",
14
+ "$value": {
15
+ "colorSpace": "srgb",
16
+ "components": [0.9098, 0.9176, 0.9373],
17
+ "hex": "#e8eaef"
18
+ }
19
+ },
20
+ "border": {
21
+ "$type": "color",
22
+ "$value": {
23
+ "colorSpace": "srgb",
24
+ "components": [0.1686, 0.1804, 0.2039],
25
+ "hex": "#2b2e34"
26
+ }
27
+ },
28
+ "accent": {
29
+ "$type": "color",
30
+ "$value": {
31
+ "colorSpace": "srgb",
32
+ "components": [0.3569, 0.549, 1],
33
+ "hex": "#5b8cff"
34
+ }
35
+ },
36
+ "danger": {
37
+ "$type": "color",
38
+ "$value": {
39
+ "colorSpace": "srgb",
40
+ "components": [0.949, 0.3333, 0.3529],
41
+ "hex": "#f2555a"
42
+ }
43
+ },
44
+ "success": {
45
+ "$type": "color",
46
+ "$value": {
47
+ "colorSpace": "srgb",
48
+ "components": [0.2431, 0.8118, 0.5569],
49
+ "hex": "#3ecf8e"
50
+ }
51
+ },
52
+ "warning": {
53
+ "$type": "color",
54
+ "$value": {
55
+ "colorSpace": "srgb",
56
+ "components": [0.9412, 0.6667, 0.2353],
57
+ "hex": "#f0aa3c"
58
+ }
59
+ },
60
+ "secondary": {
61
+ "background": {
62
+ "$type": "color",
63
+ "$value": {
64
+ "colorSpace": "srgb",
65
+ "components": [0.1098, 0.1216, 0.1451],
66
+ "hex": "#1c1f25"
67
+ }
68
+ },
69
+ "foreground": {
70
+ "$type": "color",
71
+ "$value": {
72
+ "colorSpace": "srgb",
73
+ "components": [0.5922, 0.6039, 0.6235],
74
+ "hex": "#979a9f"
75
+ }
76
+ },
77
+ "shadow": {
78
+ "$type": "color",
79
+ "$value": {
80
+ "colorSpace": "srgb",
81
+ "components": [0.1098, 0.1216, 0.1451],
82
+ "hex": "#1c1f25",
83
+ "alpha": 0.6
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }