@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,115 @@
1
+ {
2
+ "color": {
3
+ "$description": "The global palette. The group level is the primary palette; `secondary` is the quieter one: its background and its text.",
4
+ "$extensions": {
5
+ "is.swell.ui": {
6
+ "attributes": {
7
+ "variant": ["secondary"]
8
+ }
9
+ }
10
+ },
11
+ "background": {
12
+ "$type": "color",
13
+ "$value": {
14
+ "colorSpace": "srgb",
15
+ "components": [1, 1, 1],
16
+ "hex": "#ffffff"
17
+ },
18
+ "$description": "Page background."
19
+ },
20
+ "foreground": {
21
+ "$type": "color",
22
+ "$value": {
23
+ "colorSpace": "srgb",
24
+ "components": [0.0549, 0.0667, 0.0902],
25
+ "hex": "#0e1117"
26
+ },
27
+ "$description": "Text and icons on the page background."
28
+ },
29
+ "border": {
30
+ "$type": "color",
31
+ "$value": {
32
+ "colorSpace": "srgb",
33
+ "components": [0.8941, 0.898, 0.898],
34
+ "hex": "#e4e5e5"
35
+ },
36
+ "$description": "Decorative borders and dividers."
37
+ },
38
+ "accent": {
39
+ "$type": "color",
40
+ "$value": {
41
+ "colorSpace": "srgb",
42
+ "components": [0.2275, 0.4, 0.9608],
43
+ "hex": "#3a66f5"
44
+ },
45
+ "$description": "The brand color: filled buttons, links, checked controls, focus."
46
+ },
47
+ "danger": {
48
+ "$type": "color",
49
+ "$value": {
50
+ "colorSpace": "srgb",
51
+ "components": [0.8431, 0.2157, 0.2392],
52
+ "hex": "#d7373d"
53
+ },
54
+ "$description": "Errors: invalid fields, error messages."
55
+ },
56
+ "success": {
57
+ "$type": "color",
58
+ "$value": {
59
+ "colorSpace": "srgb",
60
+ "components": [0.0706, 0.5804, 0.3686],
61
+ "hex": "#12945e"
62
+ },
63
+ "$description": "Success: success messages and a successful button."
64
+ },
65
+ "warning": {
66
+ "$type": "color",
67
+ "$value": {
68
+ "colorSpace": "srgb",
69
+ "components": [0.7255, 0.4392, 0.0392],
70
+ "hex": "#b9700a"
71
+ },
72
+ "$description": "Warnings: warning messages."
73
+ },
74
+ "secondary": {
75
+ "background": {
76
+ "$type": "color",
77
+ "$value": {
78
+ "colorSpace": "srgb",
79
+ "components": [0.9608, 0.9608, 0.9647],
80
+ "hex": "#f5f5f6"
81
+ },
82
+ "$description": "Quiet areas: secondary buttons, status messages, filled fields."
83
+ },
84
+ "foreground": {
85
+ "$type": "color",
86
+ "$value": {
87
+ "colorSpace": "srgb",
88
+ "components": [0.4157, 0.4196, 0.4353],
89
+ "hex": "#6a6b6f"
90
+ },
91
+ "$description": "Quiet text: hints, captions, placeholders, secondary text."
92
+ },
93
+ "border": {
94
+ "$type": "color",
95
+ "$value": "{color.border}",
96
+ "$description": "Borders of secondary buttons, badges and thumbnails."
97
+ },
98
+ "accent": {
99
+ "$type": "color",
100
+ "$value": "{color.secondary.foreground}",
101
+ "$description": "The quiet color where there is no fill: secondary text and links, and the text of outline and plain secondary buttons and badges."
102
+ },
103
+ "shadow": {
104
+ "$type": "color",
105
+ "$value": {
106
+ "colorSpace": "srgb",
107
+ "components": [0.9608, 0.9608, 0.9647],
108
+ "hex": "#f5f5f6",
109
+ "alpha": 0.6
110
+ },
111
+ "$description": "Color of the shadow of filled secondary buttons."
112
+ }
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,115 @@
1
+ {
2
+ "control": {
3
+ "$description": "The control scale: the height and text size of each of the five steps, shared by buttons, fields, selects, lookups, quantities, checkboxes, radio groups, status messages, plain links and skeletons. Every other measure of a sized component follows from these two. The group also holds the opacity of a disabled control.",
4
+ "$extensions": {
5
+ "is.swell.ui": {
6
+ "attributes": {
7
+ "size": ["xsmall", "small", "large", "xlarge"]
8
+ },
9
+ "states": ["disabled"]
10
+ }
11
+ },
12
+ "height": {
13
+ "$type": "dimension",
14
+ "$value": {
15
+ "value": 48,
16
+ "unit": "px"
17
+ },
18
+ "$description": "Height of medium controls."
19
+ },
20
+ "font": {
21
+ "size": {
22
+ "$type": "dimension",
23
+ "$value": "{font.size}",
24
+ "$description": "Font size of medium controls."
25
+ }
26
+ },
27
+ "xsmall": {
28
+ "height": {
29
+ "$type": "dimension",
30
+ "$value": {
31
+ "value": 32,
32
+ "unit": "px"
33
+ },
34
+ "$description": "Height of extra small controls, the smallest that holds a 16px line on a touch screen."
35
+ },
36
+ "font": {
37
+ "size": {
38
+ "$type": "dimension",
39
+ "$value": {
40
+ "value": 12,
41
+ "unit": "px"
42
+ },
43
+ "$description": "Font size of extra small controls."
44
+ }
45
+ }
46
+ },
47
+ "small": {
48
+ "height": {
49
+ "$type": "dimension",
50
+ "$value": {
51
+ "value": 40,
52
+ "unit": "px"
53
+ },
54
+ "$description": "Height of small controls."
55
+ },
56
+ "font": {
57
+ "size": {
58
+ "$type": "dimension",
59
+ "$value": {
60
+ "value": 13,
61
+ "unit": "px"
62
+ },
63
+ "$description": "Font size of small controls."
64
+ }
65
+ }
66
+ },
67
+ "large": {
68
+ "height": {
69
+ "$type": "dimension",
70
+ "$value": {
71
+ "value": 56,
72
+ "unit": "px"
73
+ },
74
+ "$description": "Height of large controls."
75
+ },
76
+ "font": {
77
+ "size": {
78
+ "$type": "dimension",
79
+ "$value": {
80
+ "value": 16,
81
+ "unit": "px"
82
+ },
83
+ "$description": "Font size of large controls."
84
+ }
85
+ }
86
+ },
87
+ "xlarge": {
88
+ "height": {
89
+ "$type": "dimension",
90
+ "$value": {
91
+ "value": 64,
92
+ "unit": "px"
93
+ },
94
+ "$description": "Height of extra large controls."
95
+ },
96
+ "font": {
97
+ "size": {
98
+ "$type": "dimension",
99
+ "$value": {
100
+ "value": 18,
101
+ "unit": "px"
102
+ },
103
+ "$description": "Font size of extra large controls."
104
+ }
105
+ }
106
+ },
107
+ "disabled": {
108
+ "opacity": {
109
+ "$type": "number",
110
+ "$value": 0.5,
111
+ "$description": "Opacity of a disabled control, the disabled options of a choice, a busy quantity and the step of a quantity at its limit."
112
+ }
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "field": {
3
+ "$description": "Dark theme values of field.",
4
+ "color": {
5
+ "border": {
6
+ "$type": "color",
7
+ "$value": {
8
+ "colorSpace": "srgb",
9
+ "components": [0.4784, 0.4863, 0.5098],
10
+ "hex": "#7a7c82"
11
+ }
12
+ }
13
+ },
14
+ "hover": {
15
+ "color": {
16
+ "border": {
17
+ "$type": "color",
18
+ "$value": {
19
+ "colorSpace": "srgb",
20
+ "components": [0.651, 0.6588, 0.6784],
21
+ "hex": "#a6a8ad"
22
+ }
23
+ }
24
+ }
25
+ },
26
+ "focus": {
27
+ "color": {
28
+ "ring": {
29
+ "$type": "color",
30
+ "$value": {
31
+ "colorSpace": "srgb",
32
+ "components": [0.3569, 0.549, 1.0],
33
+ "hex": "#5b8cff",
34
+ "alpha": 0.16
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "invalid": {
40
+ "color": {
41
+ "ring": {
42
+ "$type": "color",
43
+ "$value": {
44
+ "colorSpace": "srgb",
45
+ "components": [0.949, 0.3333, 0.3529],
46
+ "hex": "#f2555a",
47
+ "alpha": 0.09
48
+ }
49
+ }
50
+ }
51
+ },
52
+ "label": {
53
+ "color": {
54
+ "foreground": {
55
+ "$type": "color",
56
+ "$value": {
57
+ "colorSpace": "srgb",
58
+ "components": [0.7098, 0.7176, 0.7412],
59
+ "hex": "#b5b7bd"
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,158 @@
1
+ {
2
+ "field": {
3
+ "$description": "The look of text fields: input, textarea, select and lookup. Checkboxes and radios take its border, and a radio group takes its label.",
4
+ "$extensions": {
5
+ "is.swell.ui": {
6
+ "settings": {
7
+ "appearance": {
8
+ "description": "How text fields are drawn when the element has no appearance attribute: outline (border on all sides), filled (fill and a bottom border), underline (bottom border).",
9
+ "values": ["outline", "filled", "underline"],
10
+ "default": "outline"
11
+ }
12
+ },
13
+ "states": ["hover", "focus", "invalid"]
14
+ }
15
+ },
16
+ "color": {
17
+ "background": {
18
+ "$type": "color",
19
+ "$value": "{color.secondary.background}",
20
+ "$description": "Fill of filled fields."
21
+ },
22
+ "foreground": {
23
+ "$type": "color",
24
+ "$value": "{color.foreground}",
25
+ "$description": "Text of fields."
26
+ },
27
+ "border": {
28
+ "$type": "color",
29
+ "$value": {
30
+ "colorSpace": "srgb",
31
+ "components": [0.5451, 0.5529, 0.5647],
32
+ "hex": "#8b8d90"
33
+ },
34
+ "$description": "Border of fields, checkboxes and radio circles, at 3:1 against the background."
35
+ }
36
+ },
37
+ "hover": {
38
+ "color": {
39
+ "border": {
40
+ "$type": "color",
41
+ "$value": {
42
+ "colorSpace": "srgb",
43
+ "components": [0.349, 0.3569, 0.3725],
44
+ "hex": "#595b5f"
45
+ },
46
+ "$description": "Border of fields, checkboxes and radio circles under the pointer."
47
+ }
48
+ }
49
+ },
50
+ "focus": {
51
+ "color": {
52
+ "ring": {
53
+ "$type": "color",
54
+ "$value": {
55
+ "colorSpace": "srgb",
56
+ "components": [0.2275, 0.4, 0.9608],
57
+ "hex": "#3a66f5",
58
+ "alpha": 0.16
59
+ },
60
+ "$description": "Soft ring around a focused outline field, outside its border in focus.color."
61
+ }
62
+ }
63
+ },
64
+ "invalid": {
65
+ "color": {
66
+ "ring": {
67
+ "$type": "color",
68
+ "$value": {
69
+ "colorSpace": "srgb",
70
+ "components": [0.8431, 0.2157, 0.2392],
71
+ "hex": "#d7373d",
72
+ "alpha": 0.09
73
+ },
74
+ "$description": "Soft ring around an invalid outline field, outside its border in color.danger."
75
+ }
76
+ }
77
+ },
78
+ "label": {
79
+ "$description": "Labels above fields and radio groups. Their size follows the text of the field's size, one step smaller and at least 12px.",
80
+ "$extensions": {
81
+ "is.swell.ui": {
82
+ "settings": {
83
+ "position": {
84
+ "description": "Where the label of a text field sits: above it, or floating inside it.",
85
+ "values": ["above", "floating"],
86
+ "default": "floating"
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "font": {
92
+ "family": {
93
+ "$type": "fontFamily",
94
+ "$value": "{font.family}",
95
+ "$description": "Font family of field labels."
96
+ },
97
+ "weight": {
98
+ "$type": "fontWeight",
99
+ "$value": "{font.strong.weight}",
100
+ "$description": "Font weight of labels above fields; a floating label takes the base font weight at rest and font.medium.weight raised."
101
+ },
102
+ "tracking": {
103
+ "$type": "number",
104
+ "$value": "{font.tracking}",
105
+ "$description": "Letter spacing of field labels, in em.",
106
+ "$extensions": {
107
+ "is.swell.ui": {
108
+ "unit": "em"
109
+ }
110
+ }
111
+ }
112
+ },
113
+ "color": {
114
+ "foreground": {
115
+ "$type": "color",
116
+ "$value": {
117
+ "colorSpace": "srgb",
118
+ "components": [0.2824, 0.2902, 0.3098],
119
+ "hex": "#484a4f"
120
+ },
121
+ "$description": "Color of labels above fields; a floating label takes color.secondary.foreground."
122
+ }
123
+ }
124
+ },
125
+ "ring": {
126
+ "width": {
127
+ "$type": "dimension",
128
+ "$value": {
129
+ "value": 3,
130
+ "unit": "px"
131
+ },
132
+ "$description": "Width of the ring around a focused or invalid outline field, and of the ring around the current step."
133
+ }
134
+ },
135
+ "gap": {
136
+ "$type": "dimension",
137
+ "$value": {
138
+ "value": 6,
139
+ "unit": "px"
140
+ },
141
+ "$description": "Space between the label, the field and the hint or error of a field, a checkbox and a radio group."
142
+ },
143
+ "outline": {
144
+ "color": {
145
+ "background": {
146
+ "$type": "color",
147
+ "$value": {
148
+ "colorSpace": "srgb",
149
+ "components": [0, 0, 0],
150
+ "alpha": 0,
151
+ "hex": "#000000"
152
+ },
153
+ "$description": "Fill of outline fields, such as a raised surface on a dark page or a field in an area of its own; transparent by default."
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "focus": {
3
+ "$description": "The focus outline, the same on every interactive component.",
4
+ "color": {
5
+ "$type": "color",
6
+ "$value": "{color.accent}",
7
+ "$description": "Color of the focus outline."
8
+ },
9
+ "width": {
10
+ "$type": "dimension",
11
+ "$value": {
12
+ "value": 2,
13
+ "unit": "px"
14
+ },
15
+ "$description": "Width of the focus outline."
16
+ },
17
+ "offset": {
18
+ "$type": "dimension",
19
+ "$value": {
20
+ "value": 2,
21
+ "unit": "px"
22
+ },
23
+ "$description": "Gap between a component and its focus outline."
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,117 @@
1
+ {
2
+ "font": {
3
+ "$description": "What every text shares, and the two small sizes that captions, footnotes, badges and chips share.",
4
+ "$extensions": {
5
+ "is.swell.ui": {
6
+ "attributes": {
7
+ "type": ["caption", "footnote", "heading", "medium", "strong", "bold"]
8
+ }
9
+ }
10
+ },
11
+ "family": {
12
+ "$type": "fontFamily",
13
+ "$value": [
14
+ "-apple-system",
15
+ "BlinkMacSystemFont",
16
+ "Inter",
17
+ "Segoe UI",
18
+ "Roboto",
19
+ "Helvetica",
20
+ "Arial",
21
+ "sans-serif"
22
+ ],
23
+ "$description": "Font family."
24
+ },
25
+ "size": {
26
+ "$type": "dimension",
27
+ "$value": {
28
+ "value": 14,
29
+ "unit": "px"
30
+ },
31
+ "$description": "Base font size."
32
+ },
33
+ "weight": {
34
+ "$type": "fontWeight",
35
+ "$value": 400,
36
+ "$description": "Base font weight."
37
+ },
38
+ "tracking": {
39
+ "$type": "number",
40
+ "$value": 0,
41
+ "$description": "Base letter spacing, in em.",
42
+ "$extensions": {
43
+ "is.swell.ui": {
44
+ "unit": "em"
45
+ }
46
+ }
47
+ },
48
+ "leading": {
49
+ "$type": "number",
50
+ "$value": 1.5,
51
+ "$description": "Base line height, as a multiple of the font size."
52
+ },
53
+ "caption": {
54
+ "size": {
55
+ "$type": "dimension",
56
+ "$value": {
57
+ "value": 13,
58
+ "unit": "px"
59
+ },
60
+ "$description": "Small font size: captions, divider labels and medium chips."
61
+ }
62
+ },
63
+ "footnote": {
64
+ "size": {
65
+ "$type": "dimension",
66
+ "$value": {
67
+ "value": 12,
68
+ "unit": "px"
69
+ },
70
+ "$description": "Smallest font size: footnotes, eyebrows and medium badges."
71
+ }
72
+ },
73
+ "heading": {
74
+ "family": {
75
+ "$type": "fontFamily",
76
+ "$value": "{font.family}",
77
+ "$description": "Font family of titles, headings, subheadings and the labels of vertical steps."
78
+ },
79
+ "weight": {
80
+ "$type": "fontWeight",
81
+ "$value": 650,
82
+ "$description": "Font weight of titles, headings, subheadings and the labels of vertical steps."
83
+ },
84
+ "tracking": {
85
+ "$type": "number",
86
+ "$value": -0.015,
87
+ "$description": "Letter spacing of headings and the labels of vertical steps, in em.",
88
+ "$extensions": {
89
+ "is.swell.ui": {
90
+ "unit": "em"
91
+ }
92
+ }
93
+ }
94
+ },
95
+ "medium": {
96
+ "weight": {
97
+ "$type": "fontWeight",
98
+ "$value": 500,
99
+ "$description": "A medium weight: a raised field label and the label of a button option."
100
+ }
101
+ },
102
+ "strong": {
103
+ "weight": {
104
+ "$type": "fontWeight",
105
+ "$value": 600,
106
+ "$description": "A strong weight: field labels, errors, plain status messages and links, tabs, the labels of outline and segmented options, badges and strong text."
107
+ }
108
+ },
109
+ "bold": {
110
+ "weight": {
111
+ "$type": "fontWeight",
112
+ "$value": 700,
113
+ "$description": "A bold weight: the count of a quantity, the numbers of steps, the chosen button option, chips, small badges and eyebrows."
114
+ }
115
+ }
116
+ }
117
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "motion": {
3
+ "$description": "Durations and easing of every transition. With reduced motion in the system settings, components change state without movement.",
4
+ "duration": {
5
+ "fast": {
6
+ "$type": "duration",
7
+ "$value": {
8
+ "value": 200,
9
+ "unit": "ms"
10
+ },
11
+ "$description": "Color changes on hover and focus."
12
+ },
13
+ "base": {
14
+ "$type": "duration",
15
+ "$value": {
16
+ "value": 250,
17
+ "unit": "ms"
18
+ },
19
+ "$description": "Presses, small moves and pops: a check, a rising label, a list or an error appearing."
20
+ },
21
+ "slow": {
22
+ "$type": "duration",
23
+ "$value": {
24
+ "value": 450,
25
+ "unit": "ms"
26
+ },
27
+ "$description": "Large moves: a sliding marker, expanding content, a message appearing, a shake, a chip popping in."
28
+ },
29
+ "loop": {
30
+ "$type": "duration",
31
+ "$value": {
32
+ "value": 1350,
33
+ "unit": "ms"
34
+ },
35
+ "$description": "Period of a continuous motion: the shimmer of a skeleton; the spinner of a loading button turns in two thirds of it."
36
+ }
37
+ },
38
+ "easing": {
39
+ "$type": "cubicBezier",
40
+ "$value": [0.2, 0.8, 0.2, 1],
41
+ "$description": "Easing of every transition that doesn't overshoot."
42
+ },
43
+ "spring": {
44
+ "$type": "cubicBezier",
45
+ "$value": [0.34, 1.56, 0.64, 1],
46
+ "$description": "Easing of pops that overshoot: checks and chips."
47
+ }
48
+ }
49
+ }