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,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
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../base/color" as cl;
|
|
3
|
+
@use "../base/border" as bo;
|
|
4
|
+
@use "../base/font" as ft;
|
|
5
|
+
@use "../base/space" as sp;
|
|
6
|
+
@use "../base/variants" as vr;
|
|
7
|
+
|
|
8
|
+
// Alerts / inline banners
|
|
9
|
+
//
|
|
10
|
+
// <div class="qo-alert qo-alert-info">
|
|
11
|
+
// <i class="qo-alert-icon fa-solid fa-circle-info"></i>
|
|
12
|
+
// Lite User Role cannot be edited.
|
|
13
|
+
// </div>
|
|
14
|
+
|
|
15
|
+
.qo-alert {
|
|
16
|
+
padding: 9px sp.$space-3;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: sp.$space-2;
|
|
20
|
+
border: bo.$border-width-sm solid transparent;
|
|
21
|
+
border-radius: bo.$border-radius-sm;
|
|
22
|
+
background-color: cl.$background-info-soft;
|
|
23
|
+
color: cl.$text-info;
|
|
24
|
+
font-family: ft.$font-family-primary;
|
|
25
|
+
font-size: ft.$font-size-sm;
|
|
26
|
+
font-weight: ft.$font-weight-medium;
|
|
27
|
+
line-height: ft.$line-height-sm;
|
|
28
|
+
|
|
29
|
+
&.qo-alert-block { align-items: flex-start; }
|
|
30
|
+
&.qo-alert-lg { padding: sp.$space-3 sp.$space-4; font-size: ft.$font-size-md; }
|
|
31
|
+
|
|
32
|
+
// Tint fill + ink, for every semantic and status variant.
|
|
33
|
+
@each $name, $spec in vr.$tint-variants {
|
|
34
|
+
&.qo-alert-#{$name} {
|
|
35
|
+
background-color: map.get($spec, soft);
|
|
36
|
+
color: map.get($spec, ink);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Outlined form, for a banner that must not read as a filled block.
|
|
41
|
+
@each $name, $spec in vr.$variants {
|
|
42
|
+
&.qo-alert-outline-#{$name} {
|
|
43
|
+
background-color: transparent;
|
|
44
|
+
border-color: map.get($spec, base);
|
|
45
|
+
color: map.get($spec, ink);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Left accent stripe.
|
|
50
|
+
@each $name, $spec in vr.$variants {
|
|
51
|
+
&.qo-alert-accent-#{$name} {
|
|
52
|
+
border-left: bo.$border-width-lg solid map.get($spec, base);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.qo-alert-icon {
|
|
58
|
+
flex: 0 0 auto;
|
|
59
|
+
font-size: ft.$font-size-lg;
|
|
60
|
+
line-height: 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.qo-alert-title {
|
|
64
|
+
display: block;
|
|
65
|
+
margin-bottom: 2px;
|
|
66
|
+
font-weight: ft.$font-weight-semibold;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Dismiss affordance — an alert that can be closed needs a real button.
|
|
70
|
+
.qo-alert-close {
|
|
71
|
+
margin-left: auto;
|
|
72
|
+
padding: 0;
|
|
73
|
+
border: 0;
|
|
74
|
+
background: transparent;
|
|
75
|
+
color: inherit;
|
|
76
|
+
font-size: ft.$font-size-lg;
|
|
77
|
+
line-height: 1;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
opacity: 0.7;
|
|
80
|
+
|
|
81
|
+
&:hover { opacity: 1; }
|
|
82
|
+
&:focus-visible { outline: 0; box-shadow: cl.$focus-ring; border-radius: bo.$border-radius-sm; }
|
|
83
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../base/color" as cl;
|
|
3
|
+
@use "../base/border" as bo;
|
|
4
|
+
@use "../base/font" as ft;
|
|
5
|
+
@use "../base/space" as sp;
|
|
6
|
+
@use "../base/size" as sz;
|
|
7
|
+
@use "../base/variants" as vr;
|
|
8
|
+
|
|
9
|
+
// Badges / pills
|
|
10
|
+
//
|
|
11
|
+
// <span class="qo-badge qo-badge-success">Active</span>
|
|
12
|
+
// <span class="qo-badge qo-badge-system">System</span>
|
|
13
|
+
//
|
|
14
|
+
// Tint fill + matching ink by default — that is the listing page's treatment
|
|
15
|
+
// for user type, status and role origin. `qo-badge-solid-*` gives the filled
|
|
16
|
+
// form for the cases that need more weight.
|
|
17
|
+
|
|
18
|
+
$badge-sizes: (
|
|
19
|
+
sm: (20px, sp.$space-2, ft.$font-size-xxs),
|
|
20
|
+
md: (sz.$badge-height, sp.$space-3, ft.$font-size-xs),
|
|
21
|
+
lg: (28px, sp.$space-3, ft.$font-size-sm),
|
|
22
|
+
) !default;
|
|
23
|
+
|
|
24
|
+
.qo-badge {
|
|
25
|
+
min-height: sz.$badge-height;
|
|
26
|
+
padding: 0 sp.$space-3;
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
gap: sp.$space-1;
|
|
31
|
+
border: bo.$border-width-sm solid transparent;
|
|
32
|
+
border-radius: bo.$border-radius-pill;
|
|
33
|
+
font-family: ft.$font-family-primary;
|
|
34
|
+
font-size: ft.$font-size-xs;
|
|
35
|
+
font-weight: ft.$font-weight-semibold;
|
|
36
|
+
line-height: 1;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
|
|
39
|
+
@each $name, $spec in $badge-sizes {
|
|
40
|
+
&.qo-badge-#{$name} {
|
|
41
|
+
min-height: nth($spec, 1);
|
|
42
|
+
padding: 0 nth($spec, 2);
|
|
43
|
+
font-size: nth($spec, 3);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.qo-badge-square { border-radius: bo.$border-radius-sm; }
|
|
48
|
+
// Status pills sit in a grid column and read better at one width.
|
|
49
|
+
&.qo-badge-fixed { min-width: 84px; }
|
|
50
|
+
|
|
51
|
+
// ---- tint (default) — every semantic and every status ----
|
|
52
|
+
@each $name, $spec in vr.$tint-variants {
|
|
53
|
+
&.qo-badge-#{$name} {
|
|
54
|
+
background-color: map.get($spec, soft);
|
|
55
|
+
color: map.get($spec, ink);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// ---- solid ----
|
|
60
|
+
@each $name, $spec in vr.$variants {
|
|
61
|
+
&.qo-badge-solid-#{$name} {
|
|
62
|
+
background-color: map.get($spec, base);
|
|
63
|
+
color: map.get($spec, on);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ---- outline ----
|
|
68
|
+
@each $name, $spec in vr.$variants {
|
|
69
|
+
&.qo-badge-outline-#{$name} {
|
|
70
|
+
background-color: transparent;
|
|
71
|
+
border-color: map.get($spec, base);
|
|
72
|
+
color: map.get($spec, ink);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// A badge used as a filter chip is interactive; everything else is not.
|
|
77
|
+
&.qo-badge-action {
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
transition: filter 0.2s ease, box-shadow 0.2s ease;
|
|
80
|
+
&:hover { filter: brightness(0.96); }
|
|
81
|
+
&:focus-visible { outline: 0; box-shadow: cl.$focus-ring; }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// A small count bubble — the "3" on a filter button.
|
|
86
|
+
.qo-badge-dot {
|
|
87
|
+
min-width: 18px;
|
|
88
|
+
height: 18px;
|
|
89
|
+
padding: 0 5px;
|
|
90
|
+
display: inline-flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
border-radius: bo.$border-radius-pill;
|
|
94
|
+
background-color: cl.$background-danger;
|
|
95
|
+
color: cl.$text-light;
|
|
96
|
+
font-family: ft.$font-family-primary;
|
|
97
|
+
font-size: ft.$font-size-xxs;
|
|
98
|
+
font-weight: ft.$font-weight-bold;
|
|
99
|
+
line-height: 1;
|
|
100
|
+
}
|