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.
Files changed (66) hide show
  1. package/CHANGELOG.md +214 -45
  2. package/dist/components.esm.js +28 -4
  3. package/dist/components.esm.js.map +1 -1
  4. package/dist/components.js +35 -3
  5. package/dist/components.js.map +1 -1
  6. package/dist/index.esm.js +41 -5
  7. package/dist/index.esm.js.map +1 -1
  8. package/dist/index.js +41 -5
  9. package/dist/index.js.map +1 -1
  10. package/dist/src/base/_border.scss +21 -12
  11. package/dist/src/base/_color.scss +106 -47
  12. package/dist/src/base/_custom-properties.scss +166 -111
  13. package/dist/src/base/_font.scss +61 -37
  14. package/dist/src/base/_size.scss +30 -17
  15. package/dist/src/base/_space.scss +53 -33
  16. package/dist/src/base/_variants.scss +128 -0
  17. package/dist/src/components/_alert.scss +83 -0
  18. package/dist/src/components/_badge.scss +100 -0
  19. package/dist/src/components/_buttons.scss +189 -420
  20. package/dist/src/components/_cards.scss +130 -0
  21. package/dist/src/components/_input.scss +186 -32
  22. package/dist/src/components/_link.scss +34 -0
  23. package/dist/src/components/_page.scss +87 -0
  24. package/dist/src/components/_pagination.scss +71 -0
  25. package/dist/src/components/_table.scss +171 -0
  26. package/dist/src/components/_tabs.scss +77 -0
  27. package/dist/src/components.ts +47 -23
  28. package/dist/src/index.scss +82 -71
  29. package/dist/src/utilities/_interaction.scss +72 -0
  30. package/dist/src/utilities/background-color/index.scss +13 -0
  31. package/dist/src/utilities/border/_border-color.scss +2 -0
  32. package/dist/src/utilities/box-shadow/index.scss +8 -8
  33. package/dist/src/utilities/typography/_color.scss +38 -34
  34. package/dist/src/variables.ts +38 -35
  35. package/dist/types/components.d.ts +18 -2
  36. package/dist/types/variables.d.ts +2 -0
  37. package/dist/variables.esm.js +4 -1
  38. package/dist/variables.esm.js.map +1 -1
  39. package/dist/variables.js +4 -0
  40. package/dist/variables.js.map +1 -1
  41. package/package.json +84 -84
  42. package/src/base/_border.scss +21 -12
  43. package/src/base/_color.scss +106 -47
  44. package/src/base/_custom-properties.scss +166 -111
  45. package/src/base/_font.scss +61 -37
  46. package/src/base/_size.scss +30 -17
  47. package/src/base/_space.scss +53 -33
  48. package/src/base/_variants.scss +128 -0
  49. package/src/components/_alert.scss +83 -0
  50. package/src/components/_badge.scss +100 -0
  51. package/src/components/_buttons.scss +189 -420
  52. package/src/components/_cards.scss +130 -0
  53. package/src/components/_input.scss +186 -32
  54. package/src/components/_link.scss +34 -0
  55. package/src/components/_page.scss +87 -0
  56. package/src/components/_pagination.scss +71 -0
  57. package/src/components/_table.scss +171 -0
  58. package/src/components/_tabs.scss +77 -0
  59. package/src/components.ts +47 -23
  60. package/src/index.scss +82 -71
  61. package/src/utilities/_interaction.scss +72 -0
  62. package/src/utilities/background-color/index.scss +13 -0
  63. package/src/utilities/border/_border-color.scss +2 -0
  64. package/src/utilities/box-shadow/index.scss +8 -8
  65. package/src/utilities/typography/_color.scss +38 -34
  66. 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-secondary: #{cl.$text-secondary};
11
- --qo-text-success: #{cl.$text-success};
12
- --qo-text-warning: #{cl.$text-warning};
13
- --qo-text-danger: #{cl.$text-danger};
14
- --qo-text-info: #{cl.$text-info};
15
- --qo-text-default: #{cl.$text-default};
16
- --qo-text-dark: #{cl.$text-dark};
17
- --qo-text-darker: #{cl.$text-darker};
18
- --qo-text-light: #{cl.$text-light};
19
- --qo-text-tertiary: #{cl.$text-tertiary};
20
- --qo-text-placeholder: #{cl.$text-placeholder};
21
-
22
- // Background colors
23
- --qo-bg-primary: #{cl.$background-primary};
24
- --qo-bg-secondary: #{cl.$background-secondary};
25
- --qo-bg-success: #{cl.$background-success};
26
- --qo-bg-warning: #{cl.$background-warning};
27
- --qo-bg-danger: #{cl.$background-danger};
28
- --qo-bg-info: #{cl.$background-info};
29
- --qo-bg-default: #{cl.$background-default};
30
- --qo-bg-dark: #{cl.$background-dark};
31
- --qo-bg-dark-a: #{cl.$background-dark-a};
32
- --qo-bg-medium: #{cl.$background-medium};
33
- --qo-bg-light: #{cl.$background-light};
34
- --qo-bg-tertiary: #{cl.$background-tertiary};
35
- --qo-bg-disabled: #{cl.$background-disabled};
36
-
37
- // Border colors
38
- --qo-border-primary: #{cl.$border-primary};
39
- --qo-border-secondary: #{cl.$border-secondary};
40
- --qo-border-success: #{cl.$border-success};
41
- --qo-border-warning: #{cl.$border-warning};
42
- --qo-border-danger: #{cl.$border-danger};
43
- --qo-border-info: #{cl.$border-info};
44
- --qo-border-light: #{cl.$border-light};
45
- --qo-border-dark: #{cl.$border-dark};
46
- --qo-border-default: #{cl.$border-default};
47
-
48
- // Font families
49
- --qo-font-family-primary: #{ft.$font-family-primary};
50
- --qo-font-family-secondary: #{ft.$font-family-secondary};
51
-
52
- // Font sizes
53
- --qo-font-size-xxs: #{ft.$font-size-xxs};
54
- --qo-font-size-xs: #{ft.$font-size-xs};
55
- --qo-font-size-sm: #{ft.$font-size-sm};
56
- --qo-font-size-md: #{ft.$font-size-md};
57
- --qo-font-size-lg: #{ft.$font-size-lg};
58
- --qo-font-size-xl: #{ft.$font-size-xl};
59
- --qo-font-size-xxl: #{ft.$font-size-xxl};
60
- --qo-font-size-h1: #{ft.$font-size-h1};
61
- --qo-font-size-h2: #{ft.$font-size-h2};
62
- --qo-font-size-h3: #{ft.$font-size-h3};
63
- --qo-font-size-h4: #{ft.$font-size-h4};
64
- --qo-font-size-h5: #{ft.$font-size-h5};
65
- --qo-font-size-h6: #{ft.$font-size-h6};
66
-
67
- // Font weights
68
- --qo-font-weight-light: #{ft.$font-weight-light};
69
- --qo-font-weight-regular: #{ft.$font-weight-regular};
70
- --qo-font-weight-medium: #{ft.$font-weight-medium};
71
- --qo-font-weight-semibold: #{ft.$font-weight-semibold};
72
- --qo-font-weight-bold: #{ft.$font-weight-bold};
73
- --qo-font-weight-extrabold: #{ft.$font-weight-extrabold};
74
-
75
- // Spacing
76
- --qo-space-0: #{sp.$space-0};
77
- --qo-space-1: #{sp.$space-1};
78
- --qo-space-2: #{sp.$space-2};
79
- --qo-space-3: #{sp.$space-3};
80
- --qo-space-4: #{sp.$space-4};
81
- --qo-space-5: #{sp.$space-5};
82
- --qo-space-sm: #{sp.$space-sm};
83
- --qo-space-md: #{sp.$space-md};
84
- --qo-space-lg: #{sp.$space-lg};
85
- --qo-space-xl: #{sp.$space-xl};
86
- --qo-space-xxl: #{sp.$space-xxl};
87
- --qo-space-xxxl: #{sp.$space-xxxl};
88
-
89
- // Border radius
90
- --qo-border-radius-0: #{bo.$border-radius-0};
91
- --qo-border-radius-sm: #{bo.$border-radius-sm};
92
- --qo-border-radius-md: #{bo.$border-radius-md};
93
- --qo-border-radius-lg: #{bo.$border-radius-lg};
94
- --qo-border-radius-xl: #{bo.$border-radius-xl};
95
- --qo-border-radius-pill: #{bo.$border-radius-pill};
96
- --qo-border-radius-full: #{bo.$border-radius-full};
97
-
98
- // Border widths
99
- --qo-border-width-none: #{bo.$border-width-none};
100
- --qo-border-width-sm: #{bo.$border-width-sm};
101
- --qo-border-width-md: #{bo.$border-width-md};
102
- --qo-border-width-lg: #{bo.$border-width-lg};
103
-
104
- // Sizes
105
- --qo-size-xs: #{sz.$size-xs};
106
- --qo-size-sm: #{sz.$size-sm};
107
- --qo-size-md: #{sz.$size-md};
108
- --qo-size-lg: #{sz.$size-lg};
109
- --qo-size-xl: #{sz.$size-xl};
110
- --qo-size-xxl: #{sz.$size-xxl};
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
+ }
@@ -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
- $font-size-xxs: 8px !default;
7
- $font-size-xs: 10px !default;
8
- $font-size-sm: 11px !default;
9
- $font-size-md: 12px !default;
10
- $font-size-lg: 14px !default;
11
- $font-size-xl: 16px !default;
12
- $font-size-xxl: 18px !default;
13
-
14
- // Heading font sizes
15
- $font-size-h6: 1rem !default;
16
- $font-size-h5: 1.25rem !default;
17
- $font-size-h4: 1.5rem !default;
18
- $font-size-h3: 1.75rem !default;
19
- $font-size-h2: 2rem !default;
20
- $font-size-h1: 2.5rem !default;
21
-
22
- // Line heights
23
- $line-height-xxs: 1.25 !default;
24
- $line-height-xs: 1.3 !default;
25
- $line-height-sm: 1.27 !default;
26
- $line-height-md: 1.33 !default;
27
- $line-height-lg: 1.29 !default;
28
- $line-height-xl: 1.31 !default;
29
- $line-height-xxl: 1.28 !default;
30
-
31
- // Font weights
32
- $font-weight-light: 300 !default;
33
- $font-weight-regular: 400 !default;
34
- $font-weight-medium: 500 !default;
35
- $font-weight-semibold: 600 !default;
36
- $font-weight-bold: 700 !default;
37
- $font-weight-extrabold: 800 !default;
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;
@@ -1,17 +1,30 @@
1
- $menu-size: 32px !default;
2
-
3
- $size-xs: 8px !default;
4
- $size-sm: 16px !default;
5
- $size-md: 20px !default;
6
- $size-lg: 32px !default;
7
- $size-xl: 48px !default;
8
- $size-xxl: 64px !default;
9
-
10
- $sizing-values: (
11
- xs: $size-xs,
12
- sm: $size-sm,
13
- md: $size-md,
14
- lg: $size-lg,
15
- xl: $size-xl,
16
- xxl: $size-xxl,
17
- ) !default;
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
@@ -1,35 +1,55 @@
1
- // Bootstrap-compatible spacing scale (rem-based)
2
- $space-0: 0 !default;
3
- $space-1: 0.25rem !default;
4
- $space-2: 0.5rem !default;
5
- $space-3: 1rem !default;
6
- $space-4: 1.5rem !default;
7
- $space-5: 3rem !default;
8
-
9
- // Legacy spacing aliases
10
- $space-xs: 2.5px !default;
11
- $space-sm: 5px !default;
12
- $space-md: 12.5px !default;
13
- $space-lg: 16.5px !default;
14
- $space-xl: 21px !default;
15
- // Dialog-scale spacing: the outer padding of the larger modals (the column
16
- // chooser and its siblings), which the xs-xl steps were all too tight for.
17
- $space-xxl: 28px !default;
18
- $space-xxxl: 30px !default;
19
-
20
- // Spacers map for loop-based utility generation
21
- $spacers: (
22
- 0: $space-0,
23
- 1: $space-1,
24
- 2: $space-2,
25
- 3: $space-3,
26
- 4: $space-4,
27
- 5: $space-5,
28
- xs: $space-xs,
29
- sm: $space-sm,
30
- md: $space-md,
31
- lg: $space-lg,
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
+ }