procode-vs-theme 2.2.0 → 2.4.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 +214 -45
- package/dist/components.esm.js +28 -4
- package/dist/components.esm.js.map +1 -1
- package/dist/components.js +35 -3
- package/dist/components.js.map +1 -1
- package/dist/index.esm.js +41 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +41 -5
- package/dist/index.js.map +1 -1
- package/dist/src/base/_border.scss +21 -12
- package/dist/src/base/_color.scss +106 -47
- package/dist/src/base/_custom-properties.scss +166 -111
- package/dist/src/base/_font.scss +61 -37
- package/dist/src/base/_size.scss +30 -17
- package/dist/src/base/_space.scss +53 -33
- package/dist/src/base/_variants.scss +128 -0
- package/dist/src/components/_alert.scss +83 -0
- package/dist/src/components/_badge.scss +100 -0
- package/dist/src/components/_buttons.scss +189 -420
- package/dist/src/components/_cards.scss +130 -0
- package/dist/src/components/_input.scss +186 -32
- package/dist/src/components/_link.scss +34 -0
- package/dist/src/components/_page.scss +87 -0
- package/dist/src/components/_pagination.scss +71 -0
- package/dist/src/components/_table.scss +171 -0
- package/dist/src/components/_tabs.scss +77 -0
- package/dist/src/components.ts +47 -23
- package/dist/src/index.scss +82 -71
- package/dist/src/utilities/_interaction.scss +72 -0
- package/dist/src/utilities/background-color/index.scss +13 -0
- package/dist/src/utilities/border/_border-color.scss +2 -0
- package/dist/src/utilities/box-shadow/index.scss +8 -8
- package/dist/src/utilities/typography/_color.scss +38 -34
- package/dist/src/variables.ts +38 -35
- package/dist/types/components.d.ts +18 -2
- package/dist/types/variables.d.ts +2 -0
- package/dist/variables.esm.js +4 -1
- package/dist/variables.esm.js.map +1 -1
- package/dist/variables.js +4 -0
- package/dist/variables.js.map +1 -1
- package/package.json +84 -84
- package/src/base/_border.scss +21 -12
- package/src/base/_color.scss +106 -47
- package/src/base/_custom-properties.scss +166 -111
- package/src/base/_font.scss +61 -37
- package/src/base/_size.scss +30 -17
- package/src/base/_space.scss +53 -33
- package/src/base/_variants.scss +128 -0
- package/src/components/_alert.scss +83 -0
- package/src/components/_badge.scss +100 -0
- package/src/components/_buttons.scss +189 -420
- package/src/components/_cards.scss +130 -0
- package/src/components/_input.scss +186 -32
- package/src/components/_link.scss +34 -0
- package/src/components/_page.scss +87 -0
- package/src/components/_pagination.scss +71 -0
- package/src/components/_table.scss +171 -0
- package/src/components/_tabs.scss +77 -0
- package/src/components.ts +47 -23
- package/src/index.scss +82 -71
- package/src/utilities/_interaction.scss +72 -0
- package/src/utilities/background-color/index.scss +13 -0
- package/src/utilities/border/_border-color.scss +2 -0
- package/src/utilities/box-shadow/index.scss +8 -8
- package/src/utilities/typography/_color.scss +38 -34
- package/src/variables.ts +38 -35
|
@@ -1,111 +1,166 @@
|
|
|
1
|
-
@use "color" as cl;
|
|
2
|
-
@use "font" as ft;
|
|
3
|
-
@use "space" as sp;
|
|
4
|
-
@use "border" as bo;
|
|
5
|
-
@use "size" as sz;
|
|
6
|
-
|
|
7
|
-
:root {
|
|
8
|
-
// Text colors
|
|
9
|
-
--qo-text-primary: #{cl.$text-primary};
|
|
10
|
-
--qo-text-
|
|
11
|
-
--qo-text-
|
|
12
|
-
--qo-text-
|
|
13
|
-
--qo-text-
|
|
14
|
-
--qo-text-
|
|
15
|
-
--qo-text-
|
|
16
|
-
--qo-text-
|
|
17
|
-
--qo-text-
|
|
18
|
-
--qo-text-
|
|
19
|
-
--qo-text-
|
|
20
|
-
--qo-text-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
--qo-
|
|
24
|
-
--qo-
|
|
25
|
-
--qo-
|
|
26
|
-
--qo-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
--qo-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
--qo-bg-
|
|
33
|
-
--qo-bg-
|
|
34
|
-
--qo-bg-
|
|
35
|
-
--qo-bg-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
--qo-
|
|
39
|
-
--qo-
|
|
40
|
-
--qo-
|
|
41
|
-
--qo-
|
|
42
|
-
--qo-
|
|
43
|
-
--qo-
|
|
44
|
-
--qo-
|
|
45
|
-
--qo-
|
|
46
|
-
--qo-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
--qo-
|
|
54
|
-
--qo-
|
|
55
|
-
--qo-
|
|
56
|
-
--qo-
|
|
57
|
-
--qo-
|
|
58
|
-
--qo-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
--qo-
|
|
62
|
-
--qo-
|
|
63
|
-
--qo-
|
|
64
|
-
--qo-
|
|
65
|
-
--qo-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
--qo-
|
|
69
|
-
--qo-
|
|
70
|
-
--qo-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
--qo-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
--qo-
|
|
77
|
-
--qo-
|
|
78
|
-
--qo-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
--qo-
|
|
82
|
-
--qo-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
--qo-
|
|
86
|
-
--qo-
|
|
87
|
-
--qo-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
--qo-
|
|
91
|
-
--qo-
|
|
92
|
-
--qo-
|
|
93
|
-
--qo-
|
|
94
|
-
--qo-
|
|
95
|
-
--qo-
|
|
96
|
-
--qo-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
--qo-
|
|
102
|
-
--qo-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
--qo-
|
|
106
|
-
--qo-
|
|
107
|
-
--qo-
|
|
108
|
-
--qo-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
1
|
+
@use "color" as cl;
|
|
2
|
+
@use "font" as ft;
|
|
3
|
+
@use "space" as sp;
|
|
4
|
+
@use "border" as bo;
|
|
5
|
+
@use "size" as sz;
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
// Text colors
|
|
9
|
+
--qo-text-primary: #{cl.$text-primary};
|
|
10
|
+
--qo-text-primary-hover: #{cl.$text-primary-hover};
|
|
11
|
+
--qo-text-secondary: #{cl.$text-secondary};
|
|
12
|
+
--qo-text-success: #{cl.$text-success};
|
|
13
|
+
--qo-text-warning: #{cl.$text-warning};
|
|
14
|
+
--qo-text-danger: #{cl.$text-danger};
|
|
15
|
+
--qo-text-danger-hover: #{cl.$text-danger-hover};
|
|
16
|
+
--qo-text-info: #{cl.$text-info};
|
|
17
|
+
--qo-text-default: #{cl.$text-default};
|
|
18
|
+
--qo-text-dark: #{cl.$text-dark};
|
|
19
|
+
--qo-text-darker: #{cl.$text-darker};
|
|
20
|
+
--qo-text-light: #{cl.$text-light};
|
|
21
|
+
--qo-text-tertiary: #{cl.$text-tertiary};
|
|
22
|
+
--qo-text-placeholder: #{cl.$text-placeholder};
|
|
23
|
+
--qo-text-lite: #{cl.$text-lite};
|
|
24
|
+
--qo-text-system: #{cl.$text-system};
|
|
25
|
+
--qo-text-custom: #{cl.$text-custom};
|
|
26
|
+
// Alias of --qo-text-secondary. The spec calls this colour "text-muted" and
|
|
27
|
+
// the consuming app already references that name in 6 places; without the
|
|
28
|
+
// alias those declarations resolve to nothing and fall back silently.
|
|
29
|
+
--qo-text-muted: #{cl.$text-secondary};
|
|
30
|
+
|
|
31
|
+
// Background colors
|
|
32
|
+
--qo-bg-primary: #{cl.$background-primary};
|
|
33
|
+
--qo-bg-secondary: #{cl.$background-secondary};
|
|
34
|
+
--qo-bg-success: #{cl.$background-success};
|
|
35
|
+
--qo-bg-warning: #{cl.$background-warning};
|
|
36
|
+
--qo-bg-danger: #{cl.$background-danger};
|
|
37
|
+
--qo-bg-info: #{cl.$background-info};
|
|
38
|
+
--qo-bg-default: #{cl.$background-default};
|
|
39
|
+
--qo-bg-dark: #{cl.$background-dark};
|
|
40
|
+
--qo-bg-dark-a: #{cl.$background-dark-a};
|
|
41
|
+
--qo-bg-medium: #{cl.$background-medium};
|
|
42
|
+
--qo-bg-light: #{cl.$background-light};
|
|
43
|
+
--qo-bg-tertiary: #{cl.$background-tertiary};
|
|
44
|
+
--qo-bg-lime: #{cl.$background-lime};
|
|
45
|
+
--qo-bg-transparent: #{cl.$background-transparent};
|
|
46
|
+
--qo-bg-disabled: #{cl.$background-disabled};
|
|
47
|
+
--qo-bg-hover: #{cl.$background-hover};
|
|
48
|
+
--qo-bg-header: #{cl.$background-header};
|
|
49
|
+
|
|
50
|
+
// Soft / tint backgrounds
|
|
51
|
+
--qo-bg-primary-soft: #{cl.$background-primary-soft};
|
|
52
|
+
--qo-bg-success-soft: #{cl.$background-success-soft};
|
|
53
|
+
--qo-bg-warning-soft: #{cl.$background-warning-soft};
|
|
54
|
+
--qo-bg-danger-soft: #{cl.$background-danger-soft};
|
|
55
|
+
--qo-bg-info-soft: #{cl.$background-info-soft};
|
|
56
|
+
--qo-bg-lite-soft: #{cl.$background-lite-soft};
|
|
57
|
+
--qo-bg-system-soft: #{cl.$background-system-soft};
|
|
58
|
+
--qo-bg-custom-soft: #{cl.$background-custom-soft};
|
|
59
|
+
|
|
60
|
+
// Border colors
|
|
61
|
+
--qo-border-primary: #{cl.$border-primary};
|
|
62
|
+
--qo-border-primary-soft: #{cl.$border-primary-soft};
|
|
63
|
+
--qo-border-secondary: #{cl.$border-secondary};
|
|
64
|
+
--qo-border-success: #{cl.$border-success};
|
|
65
|
+
--qo-border-warning: #{cl.$border-warning};
|
|
66
|
+
--qo-border-danger: #{cl.$border-danger};
|
|
67
|
+
--qo-border-info: #{cl.$border-info};
|
|
68
|
+
--qo-border-light: #{cl.$border-light};
|
|
69
|
+
--qo-border-dark: #{cl.$border-dark};
|
|
70
|
+
--qo-border-default: #{cl.$border-default};
|
|
71
|
+
|
|
72
|
+
// Elevation & focus
|
|
73
|
+
--qo-shadow-sm: #{cl.$shadow-sm};
|
|
74
|
+
--qo-shadow-md: #{cl.$shadow-md};
|
|
75
|
+
--qo-shadow-lg: #{cl.$shadow-lg};
|
|
76
|
+
--qo-shadow-xl: #{cl.$shadow-xl};
|
|
77
|
+
--qo-shadow-color: #{cl.$shadow-color};
|
|
78
|
+
--qo-focus-ring: #{cl.$focus-ring};
|
|
79
|
+
|
|
80
|
+
// Font families
|
|
81
|
+
--qo-font-family-primary: #{ft.$font-family-primary};
|
|
82
|
+
--qo-font-family-secondary: #{ft.$font-family-secondary};
|
|
83
|
+
|
|
84
|
+
// Font sizes
|
|
85
|
+
--qo-font-size-xxs: #{ft.$font-size-xxs};
|
|
86
|
+
--qo-font-size-xs: #{ft.$font-size-xs};
|
|
87
|
+
--qo-font-size-sm: #{ft.$font-size-sm};
|
|
88
|
+
--qo-font-size-md: #{ft.$font-size-md};
|
|
89
|
+
--qo-font-size-lg: #{ft.$font-size-lg};
|
|
90
|
+
--qo-font-size-xl: #{ft.$font-size-xl};
|
|
91
|
+
--qo-font-size-xxl: #{ft.$font-size-xxl};
|
|
92
|
+
--qo-font-size-base: #{ft.$font-size-base};
|
|
93
|
+
--qo-font-size-h1: #{ft.$font-size-h1};
|
|
94
|
+
--qo-font-size-h2: #{ft.$font-size-h2};
|
|
95
|
+
--qo-font-size-h3: #{ft.$font-size-h3};
|
|
96
|
+
--qo-font-size-h4: #{ft.$font-size-h4};
|
|
97
|
+
--qo-font-size-h5: #{ft.$font-size-h5};
|
|
98
|
+
--qo-font-size-h6: #{ft.$font-size-h6};
|
|
99
|
+
|
|
100
|
+
// Line heights
|
|
101
|
+
--qo-line-height-xxs: #{ft.$line-height-xxs};
|
|
102
|
+
--qo-line-height-xs: #{ft.$line-height-xs};
|
|
103
|
+
--qo-line-height-sm: #{ft.$line-height-sm};
|
|
104
|
+
--qo-line-height-md: #{ft.$line-height-md};
|
|
105
|
+
--qo-line-height-lg: #{ft.$line-height-lg};
|
|
106
|
+
--qo-line-height-xl: #{ft.$line-height-xl};
|
|
107
|
+
--qo-line-height-xxl: #{ft.$line-height-xxl};
|
|
108
|
+
--qo-line-height-base: #{ft.$line-height-base};
|
|
109
|
+
|
|
110
|
+
// Font weights
|
|
111
|
+
--qo-font-weight-light: #{ft.$font-weight-light};
|
|
112
|
+
--qo-font-weight-regular: #{ft.$font-weight-regular};
|
|
113
|
+
--qo-font-weight-medium: #{ft.$font-weight-medium};
|
|
114
|
+
--qo-font-weight-semibold: #{ft.$font-weight-semibold};
|
|
115
|
+
--qo-font-weight-bold: #{ft.$font-weight-bold};
|
|
116
|
+
--qo-font-weight-extrabold: #{ft.$font-weight-extrabold};
|
|
117
|
+
|
|
118
|
+
// Spacing
|
|
119
|
+
--qo-space-0: #{sp.$space-0};
|
|
120
|
+
--qo-space-1: #{sp.$space-1};
|
|
121
|
+
--qo-space-2: #{sp.$space-2};
|
|
122
|
+
--qo-space-3: #{sp.$space-3};
|
|
123
|
+
--qo-space-4: #{sp.$space-4};
|
|
124
|
+
--qo-space-5: #{sp.$space-5};
|
|
125
|
+
--qo-space-6: #{sp.$space-6};
|
|
126
|
+
--qo-space-8: #{sp.$space-8};
|
|
127
|
+
--qo-space-xs: #{sp.$space-xs};
|
|
128
|
+
--qo-space-sm: #{sp.$space-sm};
|
|
129
|
+
--qo-space-md: #{sp.$space-md};
|
|
130
|
+
--qo-space-lg: #{sp.$space-lg};
|
|
131
|
+
--qo-space-xl: #{sp.$space-xl};
|
|
132
|
+
--qo-space-xxl: #{sp.$space-xxl};
|
|
133
|
+
--qo-space-xxxl: #{sp.$space-xxxl};
|
|
134
|
+
|
|
135
|
+
// Border radius
|
|
136
|
+
--qo-border-radius-0: #{bo.$border-radius-0};
|
|
137
|
+
--qo-border-radius-sm: #{bo.$border-radius-sm};
|
|
138
|
+
--qo-border-radius-md: #{bo.$border-radius-md};
|
|
139
|
+
--qo-border-radius-lg: #{bo.$border-radius-lg};
|
|
140
|
+
--qo-border-radius-xl: #{bo.$border-radius-xl};
|
|
141
|
+
--qo-border-radius-pill: #{bo.$border-radius-pill};
|
|
142
|
+
--qo-border-radius-full: #{bo.$border-radius-full};
|
|
143
|
+
|
|
144
|
+
// Border widths
|
|
145
|
+
--qo-border-width-none: #{bo.$border-width-none};
|
|
146
|
+
--qo-border-width-sm: #{bo.$border-width-sm};
|
|
147
|
+
--qo-border-width-md: #{bo.$border-width-md};
|
|
148
|
+
--qo-border-width-lg: #{bo.$border-width-lg};
|
|
149
|
+
|
|
150
|
+
// Sizes
|
|
151
|
+
--qo-size-xs: #{sz.$size-xs};
|
|
152
|
+
--qo-size-sm: #{sz.$size-sm};
|
|
153
|
+
--qo-size-md: #{sz.$size-md};
|
|
154
|
+
--qo-size-lg: #{sz.$size-lg};
|
|
155
|
+
--qo-size-xl: #{sz.$size-xl};
|
|
156
|
+
--qo-size-xxl: #{sz.$size-xxl};
|
|
157
|
+
--qo-menu-size: #{sz.$menu-size};
|
|
158
|
+
|
|
159
|
+
// Component heights
|
|
160
|
+
--qo-control-height: #{sz.$control-height};
|
|
161
|
+
--qo-control-height-sm: #{sz.$control-height-sm};
|
|
162
|
+
--qo-grid-header-height: #{sz.$grid-header-height};
|
|
163
|
+
--qo-grid-filter-height: #{sz.$grid-filter-height};
|
|
164
|
+
--qo-grid-row-height: #{sz.$grid-row-height};
|
|
165
|
+
--qo-badge-height: #{sz.$badge-height};
|
|
166
|
+
}
|
package/src/base/_font.scss
CHANGED
|
@@ -1,37 +1,61 @@
|
|
|
1
|
-
$font-family-primary: "IBM Plex Sans", sans-serif !default;
|
|
2
|
-
$font-family-secondary: SFMono-Regular, Menlo, Monaco, Consolas, "Roboto Mono",
|
|
3
|
-
"Ubuntu Mono", "Lucida Console", "Courier New", monospace !default;
|
|
4
|
-
|
|
5
|
-
// Base font sizes
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
$
|
|
24
|
-
$
|
|
25
|
-
$
|
|
26
|
-
$
|
|
27
|
-
$
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
$font-
|
|
35
|
-
$font-
|
|
36
|
-
$font-
|
|
37
|
-
$font-
|
|
1
|
+
$font-family-primary: "IBM Plex Sans", sans-serif !default;
|
|
2
|
+
$font-family-secondary: SFMono-Regular, Menlo, Monaco, Consolas, "Roboto Mono",
|
|
3
|
+
"Ubuntu Mono", "Lucida Console", "Courier New", monospace !default;
|
|
4
|
+
|
|
5
|
+
// Base font sizes
|
|
6
|
+
//
|
|
7
|
+
// Restructured to the VARStreet listing-page scale. The spec supplies six
|
|
8
|
+
// steps (11/12/13/14/18/22) and the ladder has six slots above `xxs`, so each
|
|
9
|
+
// spec value lands on exactly one existing name and the scale stays monotonic:
|
|
10
|
+
//
|
|
11
|
+
// xxs 10px — was 8px; raised so the 1px cadence holds at the bottom
|
|
12
|
+
// xs 11px — was 10px (--vs-font-size-xs) badges, helper text
|
|
13
|
+
// sm 12px — was 11px (--vs-font-size-sm) labels, column headers
|
|
14
|
+
// md 13px — was 12px (--vs-font-size-md) grid body, controls
|
|
15
|
+
// lg 14px — unchanged (--vs-font-size-base) page/body default
|
|
16
|
+
// xl 18px — was 16px (--vs-font-size-lg) section headings
|
|
17
|
+
// xxl 22px — was 18px (--vs-font-size-xl) page title
|
|
18
|
+
//
|
|
19
|
+
// `lg` keeping its 14px is what makes this safe: it is the most-used step in
|
|
20
|
+
// the consuming app, and it is also the spec's body size.
|
|
21
|
+
$font-size-xxs: 10px !default;
|
|
22
|
+
$font-size-xs: 11px !default;
|
|
23
|
+
$font-size-sm: 12px !default;
|
|
24
|
+
$font-size-md: 13px !default;
|
|
25
|
+
$font-size-lg: 14px !default;
|
|
26
|
+
$font-size-xl: 18px !default;
|
|
27
|
+
$font-size-xxl: 22px !default;
|
|
28
|
+
|
|
29
|
+
// The spec's `--vs-font-size-base`: the page default, which is `lg` on this
|
|
30
|
+
// ladder. Declared as an alias rather than a new step so there is one 14px.
|
|
31
|
+
$font-size-base: $font-size-lg !default;
|
|
32
|
+
|
|
33
|
+
// Heading font sizes
|
|
34
|
+
$font-size-h6: 1rem !default;
|
|
35
|
+
$font-size-h5: 1.25rem !default;
|
|
36
|
+
$font-size-h4: 1.5rem !default;
|
|
37
|
+
$font-size-h3: 1.75rem !default;
|
|
38
|
+
$font-size-h2: 2rem !default;
|
|
39
|
+
$font-size-h1: 2.5rem !default;
|
|
40
|
+
|
|
41
|
+
// Line heights
|
|
42
|
+
//
|
|
43
|
+
// Paired with the size of the same name. Values are unchanged — the spec does
|
|
44
|
+
// not declare line height as a variable — with `base` added from the listing
|
|
45
|
+
// page's body rule (line-height: 1.4).
|
|
46
|
+
$line-height-xxs: 1.25 !default;
|
|
47
|
+
$line-height-xs: 1.3 !default;
|
|
48
|
+
$line-height-sm: 1.27 !default;
|
|
49
|
+
$line-height-md: 1.33 !default;
|
|
50
|
+
$line-height-lg: 1.29 !default;
|
|
51
|
+
$line-height-xl: 1.31 !default;
|
|
52
|
+
$line-height-xxl: 1.28 !default;
|
|
53
|
+
$line-height-base: 1.4 !default;
|
|
54
|
+
|
|
55
|
+
// Font weights
|
|
56
|
+
$font-weight-light: 300 !default;
|
|
57
|
+
$font-weight-regular: 400 !default;
|
|
58
|
+
$font-weight-medium: 500 !default;
|
|
59
|
+
$font-weight-semibold: 600 !default;
|
|
60
|
+
$font-weight-bold: 700 !default;
|
|
61
|
+
$font-weight-extrabold: 800 !default;
|
package/src/base/_size.scss
CHANGED
|
@@ -1,17 +1,30 @@
|
|
|
1
|
-
$menu-size: 32px !default;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
$size-
|
|
5
|
-
$size-
|
|
6
|
-
$size-
|
|
7
|
-
$size-
|
|
8
|
-
$size-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
$menu-size: 32px !default;
|
|
2
|
+
|
|
3
|
+
// Generic size scale. The spec declares no equivalent, so these are unchanged.
|
|
4
|
+
$size-xs: 8px !default;
|
|
5
|
+
$size-sm: 16px !default;
|
|
6
|
+
$size-md: 20px !default;
|
|
7
|
+
$size-lg: 32px !default;
|
|
8
|
+
$size-xl: 48px !default;
|
|
9
|
+
$size-xxl: 64px !default;
|
|
10
|
+
|
|
11
|
+
$sizing-values: (
|
|
12
|
+
xs: $size-xs,
|
|
13
|
+
sm: $size-sm,
|
|
14
|
+
md: $size-md,
|
|
15
|
+
lg: $size-lg,
|
|
16
|
+
xl: $size-xl,
|
|
17
|
+
xxl: $size-xxl,
|
|
18
|
+
) !default;
|
|
19
|
+
|
|
20
|
+
// Component heights
|
|
21
|
+
//
|
|
22
|
+
// From the spec's "Component sizing" block. These fix the height of an
|
|
23
|
+
// interactive row or control so a toolbar, a filter row and a grid line up
|
|
24
|
+
// without each screen re-deciding.
|
|
25
|
+
$control-height: 40px !default; // inputs, selects, buttons
|
|
26
|
+
$control-height-sm: $menu-size !default; // 32px — compact filter controls, pager buttons
|
|
27
|
+
$grid-header-height: 44px !default; // column-header row
|
|
28
|
+
$grid-filter-height: 48px !default; // in-grid filter row
|
|
29
|
+
$grid-row-height: 58px !default; // data row
|
|
30
|
+
$badge-height: 24px !default; // status / type pill
|
package/src/base/_space.scss
CHANGED
|
@@ -1,35 +1,55 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
//
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
$space-
|
|
14
|
-
$space-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
$space-
|
|
18
|
-
$space-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
// Spacing
|
|
2
|
+
//
|
|
3
|
+
// Restructured to the VARStreet listing-page scale: a strict 4px grid where
|
|
4
|
+
// the index is the multiplier (n × 4px). This replaces the Bootstrap rem
|
|
5
|
+
// ladder, which was non-linear (1rem, 1.5rem, 3rem) and disagreed with the
|
|
6
|
+
// spec from step 3 upward.
|
|
7
|
+
//
|
|
8
|
+
// 0 → 0 1 → 4px 2 → 8px 3 → 12px
|
|
9
|
+
// 4 → 16px 5 → 20px 6 → 24px 8 → 32px
|
|
10
|
+
//
|
|
11
|
+
// Steps 1 and 2 already matched the spec, so the two most-used numeric steps
|
|
12
|
+
// in the consuming app do not move. Steps 6 and 8 are new (--vs-space-6/-8).
|
|
13
|
+
$space-0: 0 !default;
|
|
14
|
+
$space-1: 4px !default;
|
|
15
|
+
$space-2: 10px !default;
|
|
16
|
+
$space-3: 12px !default;
|
|
17
|
+
$space-4: 14px !default;
|
|
18
|
+
$space-5: 16px !default;
|
|
19
|
+
$space-6: 24px !default;
|
|
20
|
+
$space-8: 32px !default;
|
|
21
|
+
|
|
22
|
+
// T-shirt aliases
|
|
23
|
+
//
|
|
24
|
+
// The same ladder under the names the app already uses. These were previously
|
|
25
|
+
// off-grid half-pixel values (2.5 / 5 / 12.5 / 16.5 / 21 / 28 / 30); each is
|
|
26
|
+
// now the nearest 4px step, so every one moves by 3px or less and the two
|
|
27
|
+
// ladders can no longer drift apart.
|
|
28
|
+
$space-xs: $space-1 !default; // 2.5px → 4px
|
|
29
|
+
$space-sm: $space-2 !default; // 5px → 8px
|
|
30
|
+
$space-md: $space-3 !default; // 12.5px → 12px
|
|
31
|
+
$space-lg: $space-4 !default; // 16.5px → 16px
|
|
32
|
+
$space-xl: $space-5 !default; // 21px → 20px
|
|
33
|
+
$space-xxl: $space-6 !default; // 28px → 24px
|
|
34
|
+
$space-xxxl: $space-8 !default; // 30px → 32px
|
|
35
|
+
|
|
36
|
+
// Spacers map for loop-based utility generation.
|
|
37
|
+
// Keys are the generated class suffixes (qo-gap-*, qo-padding-*, qo-margin-*)
|
|
38
|
+
// and must stay exactly as they are — 6 and 8 are additive.
|
|
39
|
+
$spacers: (
|
|
40
|
+
0: $space-0,
|
|
41
|
+
1: $space-1,
|
|
42
|
+
2: $space-2,
|
|
43
|
+
3: $space-3,
|
|
44
|
+
4: $space-4,
|
|
45
|
+
5: $space-5,
|
|
46
|
+
6: $space-6,
|
|
47
|
+
8: $space-8,
|
|
48
|
+
xs: $space-xs,
|
|
49
|
+
sm: $space-sm,
|
|
50
|
+
md: $space-md,
|
|
51
|
+
lg: $space-lg,
|
|
32
52
|
xl: $space-xl,
|
|
33
53
|
xxl: $space-xxl,
|
|
34
|
-
xxxl: $space-xxxl,
|
|
35
|
-
) !default;
|
|
54
|
+
xxxl: $space-xxxl,
|
|
55
|
+
) !default;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
@use "color" as cl;
|
|
4
|
+
|
|
5
|
+
// Semantic variants — the single source of truth for every component.
|
|
6
|
+
//
|
|
7
|
+
// Buttons, badges, alerts, inputs and links all loop over this map, so a new
|
|
8
|
+
// semantic colour is added in exactly one place and every component picks it
|
|
9
|
+
// up. Each entry carries the full state set a component needs:
|
|
10
|
+
//
|
|
11
|
+
// base fill / border colour at rest
|
|
12
|
+
// hover fill at :hover (−8% lightness unless a token exists)
|
|
13
|
+
// active fill at :active (−12% lightness unless a token exists)
|
|
14
|
+
// on text colour that sits legibly on `base`
|
|
15
|
+
// soft pale tint fill
|
|
16
|
+
// ink text colour that sits legibly on `soft`
|
|
17
|
+
//
|
|
18
|
+
// `hover`/`active` are pre-computed here rather than in each component so the
|
|
19
|
+
// two never drift apart, and so a design token (`$text-primary-hover`,
|
|
20
|
+
// `$text-danger-hover`) wins over the computed step wherever one exists.
|
|
21
|
+
|
|
22
|
+
@function _darken($c, $amount) {
|
|
23
|
+
@return color.adjust($c, $lightness: -$amount);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
$variants: (
|
|
27
|
+
primary: (
|
|
28
|
+
base: cl.$background-primary,
|
|
29
|
+
hover: cl.$text-primary-hover,
|
|
30
|
+
active: _darken(cl.$background-primary, 12%),
|
|
31
|
+
on: cl.$text-light,
|
|
32
|
+
soft: cl.$background-primary-soft,
|
|
33
|
+
ink: cl.$text-primary,
|
|
34
|
+
),
|
|
35
|
+
secondary: (
|
|
36
|
+
base: cl.$background-secondary,
|
|
37
|
+
hover: _darken(cl.$background-secondary, 4%),
|
|
38
|
+
active: _darken(cl.$background-secondary, 8%),
|
|
39
|
+
on: cl.$text-dark,
|
|
40
|
+
soft: cl.$background-secondary,
|
|
41
|
+
ink: cl.$text-secondary,
|
|
42
|
+
),
|
|
43
|
+
success: (
|
|
44
|
+
base: cl.$background-success,
|
|
45
|
+
hover: _darken(cl.$background-success, 8%),
|
|
46
|
+
active: _darken(cl.$background-success, 12%),
|
|
47
|
+
on: cl.$text-light,
|
|
48
|
+
soft: cl.$background-success-soft,
|
|
49
|
+
ink: cl.$text-success,
|
|
50
|
+
),
|
|
51
|
+
warning: (
|
|
52
|
+
base: cl.$background-warning,
|
|
53
|
+
hover: _darken(cl.$background-warning, 8%),
|
|
54
|
+
active: _darken(cl.$background-warning, 12%),
|
|
55
|
+
on: cl.$text-light,
|
|
56
|
+
soft: cl.$background-warning-soft,
|
|
57
|
+
ink: cl.$text-warning,
|
|
58
|
+
),
|
|
59
|
+
danger: (
|
|
60
|
+
base: cl.$background-danger,
|
|
61
|
+
hover: cl.$text-danger-hover,
|
|
62
|
+
active: _darken(cl.$background-danger, 12%),
|
|
63
|
+
on: cl.$text-light,
|
|
64
|
+
soft: cl.$background-danger-soft,
|
|
65
|
+
ink: cl.$text-danger,
|
|
66
|
+
),
|
|
67
|
+
info: (
|
|
68
|
+
base: cl.$background-info,
|
|
69
|
+
hover: _darken(cl.$background-info, 8%),
|
|
70
|
+
active: _darken(cl.$background-info, 12%),
|
|
71
|
+
on: cl.$text-light,
|
|
72
|
+
soft: cl.$background-info-soft,
|
|
73
|
+
ink: cl.$text-info,
|
|
74
|
+
),
|
|
75
|
+
dark: (
|
|
76
|
+
base: cl.$background-dark,
|
|
77
|
+
hover: _darken(cl.$background-dark, 6%),
|
|
78
|
+
active: _darken(cl.$background-dark, 10%),
|
|
79
|
+
on: cl.$text-light,
|
|
80
|
+
soft: cl.$background-secondary,
|
|
81
|
+
ink: cl.$text-darker,
|
|
82
|
+
),
|
|
83
|
+
light: (
|
|
84
|
+
base: cl.$background-light,
|
|
85
|
+
hover: _darken(cl.$background-light, 4%),
|
|
86
|
+
active: _darken(cl.$background-light, 8%),
|
|
87
|
+
on: cl.$text-dark,
|
|
88
|
+
soft: cl.$background-light,
|
|
89
|
+
ink: cl.$text-dark,
|
|
90
|
+
),
|
|
91
|
+
default: (
|
|
92
|
+
base: cl.$background-default,
|
|
93
|
+
hover: cl.$background-secondary,
|
|
94
|
+
active: _darken(cl.$background-secondary, 4%),
|
|
95
|
+
on: cl.$text-dark,
|
|
96
|
+
soft: cl.$background-default,
|
|
97
|
+
ink: cl.$text-dark,
|
|
98
|
+
),
|
|
99
|
+
tertiary: (
|
|
100
|
+
base: cl.$background-tertiary,
|
|
101
|
+
hover: _darken(cl.$background-tertiary, 8%),
|
|
102
|
+
active: _darken(cl.$background-tertiary, 12%),
|
|
103
|
+
on: cl.$text-light,
|
|
104
|
+
soft: cl.$background-tertiary,
|
|
105
|
+
ink: cl.$text-tertiary,
|
|
106
|
+
),
|
|
107
|
+
) !default;
|
|
108
|
+
|
|
109
|
+
// Status variants — tint-only. These name a *state of a record*, not a
|
|
110
|
+
// component colour, so they get `soft`/`ink` and nothing else: there is no
|
|
111
|
+
// such thing as a solid "system role" button.
|
|
112
|
+
$status-variants: (
|
|
113
|
+
standard: (soft: cl.$background-primary-soft, ink: cl.$text-custom),
|
|
114
|
+
lite: (soft: cl.$background-lite-soft, ink: cl.$text-lite),
|
|
115
|
+
system: (soft: cl.$background-system-soft, ink: cl.$text-system),
|
|
116
|
+
custom: (soft: cl.$background-custom-soft, ink: cl.$text-custom),
|
|
117
|
+
active: (soft: cl.$background-success-soft, ink: cl.$text-success),
|
|
118
|
+
) !default;
|
|
119
|
+
|
|
120
|
+
// Every variant that has a tint, solid or not — what badges and alerts loop.
|
|
121
|
+
$tint-variants: map.merge($variants, $status-variants) !default;
|
|
122
|
+
|
|
123
|
+
@function v($name, $key) {
|
|
124
|
+
@return map.get(map.get($variants, $name), $key);
|
|
125
|
+
}
|
|
126
|
+
@function tint($name, $key) {
|
|
127
|
+
@return map.get(map.get($tint-variants, $name), $key);
|
|
128
|
+
}
|