@raspberrypifoundation/design-system-react 1.6.0 → 2.0.0-beta.1
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 +16 -1
- package/README.md +63 -10
- package/dist/rpf-design-system-react.css +1 -0
- package/dist/rpf-design-system-react.js +2744 -0
- package/dist/rpf-design-system-react.umd.cjs +35 -0
- package/dist/scss/components/accordion.scss +94 -0
- package/dist/scss/components/alert.scss +131 -0
- package/dist/scss/components/burger-menu.scss +89 -0
- package/dist/scss/components/button.scss +321 -0
- package/dist/scss/components/forms/error-message.scss +20 -0
- package/dist/scss/components/forms/fieldset.scss +42 -0
- package/dist/scss/components/forms/input-checkbox.scss +62 -0
- package/dist/scss/components/forms/input-label.scss +36 -0
- package/dist/scss/components/forms/input-number.scss +61 -0
- package/dist/scss/components/forms/input-password.scss +109 -0
- package/dist/scss/components/forms/input-radio.scss +63 -0
- package/dist/scss/components/forms/input-search.scss +65 -0
- package/dist/scss/components/forms/input-select.scss +14 -0
- package/dist/scss/components/forms/input-text.scss +5 -0
- package/dist/scss/components/forms/input-textarea.scss +12 -0
- package/dist/scss/components/forms/inputs.scss +40 -0
- package/dist/scss/components/layout/decorative-section.scss +185 -0
- package/dist/scss/components/link.scss +51 -0
- package/dist/scss/components/menu-item.scss +66 -0
- package/dist/scss/components/menu-title.scss +25 -0
- package/dist/scss/components/menu.scss +31 -0
- package/dist/scss/components/progress-bar.scss +43 -0
- package/dist/scss/components/squiggle.scss +46 -0
- package/dist/scss/components/table/table-cell.scss +82 -0
- package/dist/scss/components/table/table.scss +32 -0
- package/dist/scss/components/tag.scss +50 -0
- package/dist/scss/design-system-core.scss +37 -0
- package/dist/scss/mixins/_inputs.scss +19 -0
- package/dist/scss/mixins/_typography.scss +75 -0
- package/dist/scss/properties/_border.scss +13 -0
- package/dist/scss/properties/_font-size.scss +14 -0
- package/dist/scss/properties/_font-weight.scss +4 -0
- package/dist/scss/properties/_line-height.scss +15 -0
- package/dist/scss/properties/_shadows.scss +7 -0
- package/dist/scss/properties/_sizing.scss +6 -0
- package/dist/scss/properties/_spacing.scss +16 -0
- package/dist/scss/properties/colors/_alert.scss +10 -0
- package/dist/scss/properties/colors/_brand.scss +14 -0
- package/dist/scss/properties/colors/_decorative.scss +58 -0
- package/dist/scss/properties/colors/_greys.scss +18 -0
- package/dist/scss/properties/colors/_inputs.scss +13 -0
- package/dist/scss/properties/colors/_text.scss +7 -0
- package/package.json +59 -84
- package/dist/cjs/bundle.js +0 -1809
- package/dist/esm/bundle.js +0 -1791
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@forward '../../properties/colors/inputs';
|
|
2
|
+
@forward '../../properties/sizing';
|
|
3
|
+
|
|
4
|
+
.rpf-input-radio {
|
|
5
|
+
--rpf-input-radio-hit-target: var(--min-target-size);
|
|
6
|
+
--rpf-input-radio-size: var(--space-3);
|
|
7
|
+
|
|
8
|
+
align-items: center;
|
|
9
|
+
border-radius: var(--space-1);
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
display: flex;
|
|
12
|
+
gap: var(--space-1-5);
|
|
13
|
+
margin-block-end: var(--space-1);
|
|
14
|
+
max-width: 50ch;
|
|
15
|
+
min-height: var(--rpf-input-radio-hit-target);
|
|
16
|
+
min-width: 240px;
|
|
17
|
+
padding-block: calc((var(--rpf-input-radio-hit-target) - var(--rpf-input-radio-size)) / 2);
|
|
18
|
+
padding-inline: var(--space-1);
|
|
19
|
+
width: 100%;
|
|
20
|
+
|
|
21
|
+
input[type='radio'] {
|
|
22
|
+
align-self: flex-start;
|
|
23
|
+
appearance: none;
|
|
24
|
+
background: var(--rpf-white);
|
|
25
|
+
border: var(--space-0-25) solid var(--rpf-grey-850);
|
|
26
|
+
border-radius: var(--rpf-input-radio-size);
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
height: var(--rpf-input-radio-size);
|
|
29
|
+
margin: 0;
|
|
30
|
+
width: var(--rpf-input-radio-size);
|
|
31
|
+
|
|
32
|
+
&:checked {
|
|
33
|
+
background-image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="12" height="12" rx="6" fill="hsla(228, 9%, 15%, 1)"/></svg>');
|
|
34
|
+
background-position: center center;
|
|
35
|
+
background-repeat: no-repeat;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:disabled {
|
|
39
|
+
border-color: var(--rpf-grey-400);
|
|
40
|
+
|
|
41
|
+
&:checked {
|
|
42
|
+
background-image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="12" height="12" rx="6" fill="hsla(229, 8%, 61%, 1)"/></svg>');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.rpf-input--full-width {
|
|
48
|
+
max-width: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:has(> input[type='radio']:disabled), &--disabled {
|
|
52
|
+
background-color: var(--rpf-input-background-color-disabled);
|
|
53
|
+
color: var(--rpf-grey-400)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:has(> input[type='radio']:focus-visible) {
|
|
57
|
+
outline: 3px solid var(--rpf-input-outline-color);
|
|
58
|
+
|
|
59
|
+
> input[type='radio']:focus-visible {
|
|
60
|
+
outline: none;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@forward '../../properties/colors/greys';
|
|
2
|
+
@forward '../../properties/colors/inputs';
|
|
3
|
+
@forward '../../properties/font-size';
|
|
4
|
+
@forward '../../properties/spacing';
|
|
5
|
+
|
|
6
|
+
.rpf-input-search-container {
|
|
7
|
+
display: flex;
|
|
8
|
+
max-width: 50ch;
|
|
9
|
+
min-width: 240px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
|
|
12
|
+
input[type='search']::-webkit-search-decoration,
|
|
13
|
+
input[type='search']::-webkit-search-cancel-button {
|
|
14
|
+
appearance: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.rpf-input-search {
|
|
18
|
+
border-end-end-radius: 0;
|
|
19
|
+
border-inline-end: 0;
|
|
20
|
+
border-start-end-radius: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.rpf-button {
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
max-width: var(--space-6);
|
|
29
|
+
|
|
30
|
+
// Override default rpf-button border styles
|
|
31
|
+
&::before {
|
|
32
|
+
border: var(--input-border-width) solid var(--rpf-input-color);
|
|
33
|
+
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Override default rpf-button disabled styles
|
|
37
|
+
&:disabled,
|
|
38
|
+
&--disabled {
|
|
39
|
+
.rpf-button__icon {
|
|
40
|
+
color: var(--rpf-input-color);
|
|
41
|
+
}
|
|
42
|
+
&::before {
|
|
43
|
+
background-color: var(--rpf-input-background-color-disabled);
|
|
44
|
+
border-color: var(--rpf-input-background-color-disabled);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Change border styles to work with input error styles
|
|
49
|
+
&--error {
|
|
50
|
+
&::before {
|
|
51
|
+
border-color: var(--rpf-alert-error);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Override default rpf-button focus styles
|
|
57
|
+
.rpf-input-search:focus-visible,
|
|
58
|
+
.rpf-button:focus-visible {
|
|
59
|
+
outline: 3px solid var(--rpf-input-outline-color);
|
|
60
|
+
z-index: 1;
|
|
61
|
+
&::before {
|
|
62
|
+
outline: 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.rpf-input.rpf-input-select {
|
|
2
|
+
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'><path fill='%23212121' d='m12 15.375-6-6 1.4-1.4 4.6 4.6 4.6-4.6 1.4 1.4-6 6Z'/></svg>");
|
|
3
|
+
background-repeat: no-repeat;
|
|
4
|
+
background-position: center right var(--space-1-5);
|
|
5
|
+
|
|
6
|
+
html[dir='rtl'] & {
|
|
7
|
+
background-position: center left var(--space-1-5);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&:disabled,
|
|
11
|
+
&--disabled {
|
|
12
|
+
background-image: none;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@forward '../../properties/border';
|
|
2
|
+
@forward '../../properties/colors/inputs';
|
|
3
|
+
@forward '../../properties/font-size';
|
|
4
|
+
@forward '../../properties/spacing';
|
|
5
|
+
@use '../../mixins/inputs';
|
|
6
|
+
|
|
7
|
+
.rpf-input-field {
|
|
8
|
+
margin-block-end: var(--space-3);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.rpf-input {
|
|
12
|
+
all: unset;
|
|
13
|
+
background-color: var(--rpf-input-background-color);
|
|
14
|
+
border: var(--input-border-width) solid var(--rpf-input-color);
|
|
15
|
+
border-radius: var(--border-radius);
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
color: var(--rpf-input-color);
|
|
18
|
+
display: flex;
|
|
19
|
+
font-size: var(--font-size-1);
|
|
20
|
+
line-height: var(--line-height-2);
|
|
21
|
+
padding-block: calc(var(--space-1) - 2px);
|
|
22
|
+
padding-inline: var(--space-1-5);
|
|
23
|
+
max-width: 50ch;
|
|
24
|
+
min-width: 240px;
|
|
25
|
+
width: 100%;
|
|
26
|
+
|
|
27
|
+
@include inputs.disabled;
|
|
28
|
+
|
|
29
|
+
&:focus-visible {
|
|
30
|
+
outline: 3px solid var(--rpf-input-outline-color);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--error {
|
|
34
|
+
border-color: var(--rpf-input-color-error);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--full-width {
|
|
38
|
+
max-width: none;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
@forward '../../properties/spacing';
|
|
2
|
+
|
|
3
|
+
$wave-path-1: 'm0 0 66.667 9.74c66.666 9.738 200 29.216 333.333 38.956a2741.784 2741.784 0 0 0 400 0c133.333-9.74 266.67-29.218 400-32.464 133.33-3.246 266.67 9.739 333.33 16.232l66.67 6.492V64H0V0Z';
|
|
4
|
+
$wave-path-2: 'm0 28.8 66.667 4.8c66.666 4.8 200 14.4 333.333 19.2 133.333 4.8 266.667 4.8 400-4.8 133.333-9.6 266.67-28.8 400-38.4C1333.33 0 1466.67 0 1533.33 0H1600v64H0V28.8Z';
|
|
5
|
+
$wave-path-3: 'm1600 56-66.67-10.419c-66.66-10.419-200-31.258-333.33-40.189-133.33-8.93-266.667-5.953-400 2.977C666.667 17.3 533.333 32.185 400 36.65c-133.333 4.465-266.667-1.488-333.333-4.465L0 29.208V66h1600V56Z';
|
|
6
|
+
|
|
7
|
+
@supports selector(:has(*)) {
|
|
8
|
+
.rpf-decorative-section {
|
|
9
|
+
--rpf-decorative-section-wave-variant-1-mask-svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="64" preserveAspectRatio="none"><path d="#{$wave-path-1}" /></svg>');
|
|
10
|
+
--rpf-decorative-section-wave-variant-2-mask-svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="64" preserveAspectRatio="none"><path d="#{$wave-path-2}" /></svg>');
|
|
11
|
+
--rpf-decorative-section-wave-variant-3-mask-svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="64" preserveAspectRatio="none"><path d="#{$wave-path-3}" /></svg>');
|
|
12
|
+
--rpf-decorative-section-wave-variant-1-mask-svg-mirror: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="64" preserveAspectRatio="none" transform="scale(-1, 1)"><path d="#{$wave-path-1}" /></svg>');
|
|
13
|
+
--rpf-decorative-section-wave-variant-2-mask-svg-mirror: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="64" preserveAspectRatio="none" transform="scale(-1, 1)"><path d="#{$wave-path-2}" /></svg>');
|
|
14
|
+
--rpf-decorative-section-wave-variant-3-mask-svg-mirror: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="64" preserveAspectRatio="none" transform="scale(-1, 1)"><path d="#{$wave-path-3}" /></svg>');
|
|
15
|
+
--rpf-decorative-section-wave-centre-variant-content-mask: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,1) 100%);
|
|
16
|
+
--rpf-decorative-section-wave-height: clamp(16px, 3.5cqw, 56px);
|
|
17
|
+
--rpf-decorative-section-wave-mask-height: clamp(18px, 4cqw, 64px);
|
|
18
|
+
--rpf-decorative-section-wave-variant-svg-mask: '';
|
|
19
|
+
--rpf-decorative-section-slice-height: clamp(var(--space-2), 3cqw, var(--space-6));
|
|
20
|
+
|
|
21
|
+
&__block-start-wave {
|
|
22
|
+
padding-block-start: var(--rpf-decorative-section-wave-height);
|
|
23
|
+
margin-block-start: calc(var(--rpf-decorative-section-wave-height) * -1);
|
|
24
|
+
-webkit-mask-image:
|
|
25
|
+
var(--rpf-decorative-section-wave-variant-svg-mask),
|
|
26
|
+
var(--rpf-decorative-section-wave-centre-variant-content-mask);
|
|
27
|
+
mask-image:
|
|
28
|
+
var(--rpf-decorative-section-wave-variant-svg-mask),
|
|
29
|
+
var(--rpf-decorative-section-wave-centre-variant-content-mask);
|
|
30
|
+
-webkit-mask-position: 0 0, 0 calc(var(--rpf-decorative-section-wave-mask-height) - 1px);
|
|
31
|
+
mask-position: 0 0, 0 calc(var(--rpf-decorative-section-wave-mask-height) - 1px);
|
|
32
|
+
-webkit-mask-size: 100% var(--rpf-decorative-section-wave-mask-height), 100% 100%;
|
|
33
|
+
mask-size: 100% var(--rpf-decorative-section-wave-mask-height), 100% 100%;
|
|
34
|
+
-webkit-mask-repeat: no-repeat;
|
|
35
|
+
mask-repeat: no-repeat;
|
|
36
|
+
|
|
37
|
+
// Default
|
|
38
|
+
& {
|
|
39
|
+
--rpf-decorative-section-wave-variant-svg-mask: var(--rpf-decorative-section-wave-variant-1-mask-svg);
|
|
40
|
+
|
|
41
|
+
&--mirrored {
|
|
42
|
+
--rpf-decorative-section-wave-variant-svg-mask: var(--rpf-decorative-section-wave-variant-1-mask-svg-mirror);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&--variant-1 {
|
|
47
|
+
--rpf-decorative-section-wave-variant-svg-mask: var(--rpf-decorative-section-wave-variant-2-mask-svg);
|
|
48
|
+
|
|
49
|
+
&-mirrored {
|
|
50
|
+
--rpf-decorative-section-wave-variant-svg-mask: var(--rpf-decorative-section-wave-variant-2-mask-svg-mirror);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&--variant-2 {
|
|
55
|
+
--rpf-decorative-section-wave-variant-svg-mask: var(--rpf-decorative-section-wave-variant-3-mask-svg);
|
|
56
|
+
|
|
57
|
+
&-mirrored {
|
|
58
|
+
--rpf-decorative-section-wave-variant-svg-mask: var(--rpf-decorative-section-wave-variant-3-mask-svg-mirror);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:has(+ .rpf-decorative-section__block-start-wave) {
|
|
64
|
+
padding-block-end: var(--rpf-decorative-section-wave-height);
|
|
65
|
+
|
|
66
|
+
&.rpf-decorative-section--no-padding {
|
|
67
|
+
padding-block-end: 0;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&__block-end-wave {
|
|
72
|
+
padding-block-end: var(--rpf-decorative-section-wave-height);
|
|
73
|
+
margin-block-end: calc(var(--rpf-decorative-section-wave-height) * -1);
|
|
74
|
+
|
|
75
|
+
+ .rpf-decorative-section {
|
|
76
|
+
padding-block-start: var(--rpf-decorative-section-wave-height);
|
|
77
|
+
-webkit-mask-image:
|
|
78
|
+
var(--rpf-decorative-section-wave-variant-svg-mask),
|
|
79
|
+
var(--rpf-decorative-section-wave-centre-variant-content-mask);
|
|
80
|
+
mask-image:
|
|
81
|
+
var(--rpf-decorative-section-wave-variant-svg-mask),
|
|
82
|
+
var(--rpf-decorative-section-wave-centre-variant-content-mask);
|
|
83
|
+
-webkit-mask-position: 0 0, 0 calc(var(--rpf-decorative-section-wave-mask-height) - 1px);
|
|
84
|
+
mask-position: 0 0, 0 calc(var(--rpf-decorative-section-wave-mask-height) - 1px);
|
|
85
|
+
-webkit-mask-size: 100% var(--rpf-decorative-section-wave-mask-height), 100% 100%;
|
|
86
|
+
mask-size: 100% var(--rpf-decorative-section-wave-mask-height), 100% 100%;
|
|
87
|
+
-webkit-mask-repeat: no-repeat;
|
|
88
|
+
mask-repeat: no-repeat;
|
|
89
|
+
|
|
90
|
+
&--no-padding {
|
|
91
|
+
padding-block-start: 0;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&.rpf-decorative-section--no-padding {
|
|
96
|
+
padding-block-end: 0;
|
|
97
|
+
margin-block-end: calc(var(--rpf-decorative-section-wave-mask-height) * -1);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Default
|
|
101
|
+
& {
|
|
102
|
+
+ .rpf-decorative-section {
|
|
103
|
+
--rpf-decorative-section-wave-variant-svg-mask: var(--rpf-decorative-section-wave-variant-1-mask-svg);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&--mirrored {
|
|
107
|
+
+ .rpf-decorative-section {
|
|
108
|
+
--rpf-decorative-section-wave-variant-svg-mask: var(--rpf-decorative-section-wave-variant-1-mask-svg-mirror);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&--variant-1 {
|
|
114
|
+
+ .rpf-decorative-section {
|
|
115
|
+
--rpf-decorative-section-wave-variant-svg-mask: var(--rpf-decorative-section-wave-variant-2-mask-svg);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&-mirrored {
|
|
119
|
+
+ .rpf-decorative-section {
|
|
120
|
+
--rpf-decorative-section-wave-variant-svg-mask: var(--rpf-decorative-section-wave-variant-2-mask-svg-mirror);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&--variant-2 {
|
|
126
|
+
+ .rpf-decorative-section {
|
|
127
|
+
--rpf-decorative-section-wave-variant-svg-mask: var(--rpf-decorative-section-wave-variant-3-mask-svg);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&-mirrored {
|
|
131
|
+
+ .rpf-decorative-section {
|
|
132
|
+
--rpf-decorative-section-wave-variant-svg-mask: var(--rpf-decorative-section-wave-variant-3-mask-svg-mirror);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&__block-start-slice {
|
|
139
|
+
padding-block-start: var(--rpf-decorative-section-slice-height);
|
|
140
|
+
|
|
141
|
+
clip-path: polygon(0 var(--rpf-decorative-section-slice-height),100% 0,100% 100%,0 100%);
|
|
142
|
+
margin-block-start: calc(var(--rpf-decorative-section-slice-height) * -1);
|
|
143
|
+
padding-block-start: var(--rpf-decorative-section-slice-height);
|
|
144
|
+
|
|
145
|
+
&--mirrored {
|
|
146
|
+
clip-path: polygon(0 0,100% var(--rpf-decorative-section-slice-height),100% 100%,0 100%);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&:has(+ .rpf-decorative-section__block-start-slice) {
|
|
151
|
+
padding-block-end: var(--rpf-decorative-section-slice-height);
|
|
152
|
+
|
|
153
|
+
&.rpf-decorative-section--no-padding {
|
|
154
|
+
padding-block-end: 0;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&__block-end-slice {
|
|
159
|
+
padding-block-end: var(--rpf-decorative-section-slice-height);
|
|
160
|
+
|
|
161
|
+
+ .rpf-decorative-section {
|
|
162
|
+
clip-path: polygon(0 var(--rpf-decorative-section-slice-height),100% 0,100% 100%,0 100%);
|
|
163
|
+
margin-block-start: calc(var(--rpf-decorative-section-slice-height) * -1);
|
|
164
|
+
padding-block-start: var(--rpf-decorative-section-slice-height);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&--mirrored + .rpf-decorative-section {
|
|
168
|
+
clip-path: polygon(0 0,100% var(--rpf-decorative-section-slice-height),100% 100%,0 100%);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&--no-padding {
|
|
173
|
+
padding-block: 0;
|
|
174
|
+
|
|
175
|
+
> img:only-child {
|
|
176
|
+
display: block;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Needed for specificity
|
|
181
|
+
+ .rpf-decorative-section--no-padding {
|
|
182
|
+
padding-block: 0;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@use '../mixins/typography';
|
|
2
|
+
@forward '../properties/sizing';
|
|
3
|
+
|
|
4
|
+
:root, :host {
|
|
5
|
+
--link-color: var(--rpf-link-text);
|
|
6
|
+
--link-color-active: var(--rpf-navy-600);
|
|
7
|
+
--link-color-hover: var(--link-color);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.rpf-link {
|
|
11
|
+
border-radius: var(--border-radius);
|
|
12
|
+
color: var(--link-color);
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
font-weight: var(--font-weight-bold);
|
|
15
|
+
max-inline-size: fit-content;
|
|
16
|
+
|
|
17
|
+
&:active {
|
|
18
|
+
color: var(--link-color-active);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
color: var(--link-color-hover);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:focus-visible {
|
|
26
|
+
outline: 3px solid var(--link-color);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&--block {
|
|
30
|
+
align-items: center;
|
|
31
|
+
display: flex;
|
|
32
|
+
min-block-size: var(--min-target-size);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&--external {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
|
|
39
|
+
span {
|
|
40
|
+
text-decoration: underline;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&::after {
|
|
44
|
+
content: '\e89e';
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
font-family: 'Material Symbols Sharp', sans-serif;
|
|
47
|
+
padding-inline-end: var(--space-0-5);
|
|
48
|
+
padding-inline-start: var(--space-0-25);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@use '../mixins/typography' as typography;
|
|
2
|
+
@forward '../properties/spacing';
|
|
3
|
+
@forward '../properties/colors/greys';
|
|
4
|
+
@forward '../properties/colors/text';
|
|
5
|
+
@forward '../properties/colors/alert';
|
|
6
|
+
|
|
7
|
+
:root,
|
|
8
|
+
:host {
|
|
9
|
+
--rpf-menu-item-text-color: var(--rpf-text-primary);
|
|
10
|
+
--rpf-menu-item-text-color-danger: var(--rpf-alert-error);
|
|
11
|
+
--rpf-menu-item-background-color: transparent;
|
|
12
|
+
--rpf-menu-item-background-color-hover: var(--rpf-grey-50);
|
|
13
|
+
--rpf-menu-item-background-color-active: var(--rpf-grey-100);
|
|
14
|
+
--rpf-menu-item-focus: var(--rpf-raspberry-800);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.rpf-menu__item {
|
|
18
|
+
// Reset li styles
|
|
19
|
+
list-style: none;
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
color: var(--rpf-menu-item-text-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.rpf-menu__item button,
|
|
26
|
+
.rpf-menu__item a {
|
|
27
|
+
// Reset button and link styles
|
|
28
|
+
border: none;
|
|
29
|
+
margin: 0;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
background-color: transparent;
|
|
32
|
+
user-select: none;
|
|
33
|
+
text-decoration: none;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
font-family: inherit;
|
|
36
|
+
|
|
37
|
+
// Item styles
|
|
38
|
+
text-align: start;
|
|
39
|
+
min-inline-size: 7.5rem;
|
|
40
|
+
inline-size: 100%;
|
|
41
|
+
display: inline-flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 0.5rem;
|
|
44
|
+
|
|
45
|
+
border-radius: var(--space-1);
|
|
46
|
+
@include typography.style-1(bold);
|
|
47
|
+
color: inherit;
|
|
48
|
+
padding: var(--space-1-5) var(--space-1);
|
|
49
|
+
|
|
50
|
+
&:hover {
|
|
51
|
+
background-color: var(--rpf-menu-item-background-color-hover);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:active {
|
|
55
|
+
background-color: var(--rpf-menu-item-background-color-active);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:focus-visible {
|
|
59
|
+
outline: 2px solid var(--rpf-menu-item-focus);
|
|
60
|
+
// outline-offset: 3px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.rpf-menu__item--danger {
|
|
65
|
+
color: var(--rpf-menu-item-text-color-danger);
|
|
66
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@use '../mixins/typography' as typography;
|
|
2
|
+
|
|
3
|
+
:root, :host{
|
|
4
|
+
--rpf-menu-title-color: var(--rpf-text-secondary);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.rpf-menu__title {
|
|
8
|
+
// Reset li styles
|
|
9
|
+
list-style: none;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
|
|
13
|
+
// Title styles
|
|
14
|
+
color: var(--rpf-menu-title-color);
|
|
15
|
+
@include typography.style-1(bold);
|
|
16
|
+
|
|
17
|
+
margin-block: var(--space-0-25);
|
|
18
|
+
border-block-end: 1px solid var(--rpf-menu-divider-color);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.rpf-menu__title span {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
margin-inline: var(--space-1);
|
|
24
|
+
margin-block-end: var(--space-0-5);
|
|
25
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@forward '../properties/spacing';
|
|
2
|
+
@forward '../properties/shadows';
|
|
3
|
+
@forward 'menu-item';
|
|
4
|
+
@forward 'menu-title';
|
|
5
|
+
|
|
6
|
+
:root,
|
|
7
|
+
:host {
|
|
8
|
+
--rpf-menu-background-color: var(--rpf-white);
|
|
9
|
+
--rpf-menu-border-color: var(--rpf-grey-50);
|
|
10
|
+
--rpf-menu-divider-color: var(--rpf-grey-100);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.rpf-menu {
|
|
14
|
+
margin: 0;
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
padding: var(--space-1-5);
|
|
18
|
+
gap: var(--space-0-5);
|
|
19
|
+
border-radius: var(--space-1);
|
|
20
|
+
border: 2px solid var(--rpf-menu-border-color);
|
|
21
|
+
background: var(--rpf-menu-background-color);
|
|
22
|
+
box-shadow: var(--rpf-shadow-centre);
|
|
23
|
+
list-style: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.rpf-menu hr {
|
|
27
|
+
inline-size: 100%;
|
|
28
|
+
border: none;
|
|
29
|
+
border-block-start: 1px solid var(--rpf-menu-divider-color);
|
|
30
|
+
margin-block: var(--space-0-25);
|
|
31
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@use '../mixins/typography' as typography;
|
|
2
|
+
|
|
3
|
+
@forward "../properties/spacing";
|
|
4
|
+
@forward "../properties/colors/greys";
|
|
5
|
+
@forward "../properties/colors/decorative";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
:root, :host {
|
|
9
|
+
--color-progress-bar-complete: var(--rpf-navy-800);
|
|
10
|
+
--color-progress-bar-incomplete: var(--rpf-grey-150);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.rpf-progress-bar {
|
|
14
|
+
&__label {
|
|
15
|
+
@include typography.style-1;
|
|
16
|
+
align-items: center;
|
|
17
|
+
display: grid;
|
|
18
|
+
grid-gap: var(--space-3);
|
|
19
|
+
grid-template-columns: max-content 1fr;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__bar{
|
|
23
|
+
background: var(--color-progress-bar-incomplete);
|
|
24
|
+
block-size: .375rem;
|
|
25
|
+
border-radius: .375rem;
|
|
26
|
+
inline-size: 100%;
|
|
27
|
+
|
|
28
|
+
&::-webkit-progress-bar {
|
|
29
|
+
background: var(--color-progress-bar-incomplete);
|
|
30
|
+
border-radius: .375rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&::-webkit-progress-value {
|
|
34
|
+
background: var(--color-progress-bar-complete);
|
|
35
|
+
border-radius: .375rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&::-moz-progress-bar {
|
|
39
|
+
background: var(--color-progress-bar-complete);
|
|
40
|
+
border-radius: .375rem;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@forward '../properties/colors/brand';
|
|
2
|
+
@forward '../properties/spacing';
|
|
3
|
+
|
|
4
|
+
%rpf-squiggle-default {
|
|
5
|
+
--rpf-squiggle-mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%22%20viewBox%3D%220%200%2029%2013%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2011c7%200%207-8%2014-8%208%200%208%208%2015%208%22%20style%3D%22fill%3Anone%3Bfill-rule%3Anonzero%3Bstroke%3Awhite%3Bstroke-width%3A4px%22%20transform%3D%22translate%28-3%29%22%2F%3E%3C%2Fsvg%3E');
|
|
6
|
+
--rpf-squiggle-end-cap-l-mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%22%20viewBox%3D%220%200%202%2013%22%3E%3Ccircle%20cx%3D%220%22%20cy%3D%2211%22%20r%3D%222%22%20style%3D%22fill%3Awhite%22%2F%3E%3C%2Fsvg%3E');
|
|
7
|
+
--rpf-squiggle-end-cap-r-mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%22%20viewBox%3D%220%200%202%2013%22%3E%3Ccircle%20cx%3D%222%22%20cy%3D%2211%22%20r%3D%222%22%20style%3D%22fill%3Awhite%22%2F%3E%3C%2Fsvg%3E');
|
|
8
|
+
background-color: var(--rpf-squiggle-color, var(--rpf-brand-raspberry));
|
|
9
|
+
border: 2px solid transparent;
|
|
10
|
+
border-block: none;
|
|
11
|
+
block-size: 13px;
|
|
12
|
+
mask-clip: content-box, border-box, border-box;
|
|
13
|
+
mask-image: var(--rpf-squiggle-mask), var(--rpf-squiggle-end-cap-l-mask), var(--rpf-squiggle-end-cap-r-mask);
|
|
14
|
+
mask-origin: content-box, border-box, border-box;
|
|
15
|
+
mask-position: top left, top right, top left;
|
|
16
|
+
mask-repeat: round, no-repeat, no-repeat;
|
|
17
|
+
mask-size: 29px 13px, 2px 13px, 2px 13px;
|
|
18
|
+
|
|
19
|
+
// Chromium-based browsers currently need vendor prefix
|
|
20
|
+
-webkit-mask-clip: content-box, border-box, border-box;
|
|
21
|
+
-webkit-mask-image: var(--rpf-squiggle-mask), var(--rpf-squiggle-end-cap-l-mask), var(--rpf-squiggle-end-cap-r-mask);
|
|
22
|
+
-webkit-mask-origin: content-box, border-box, border-box;
|
|
23
|
+
-webkit-mask-position: top left, top right, top left;
|
|
24
|
+
-webkit-mask-repeat: round, no-repeat, no-repeat;
|
|
25
|
+
-webkit-mask-size: 29px 13px, 2px 13px, 2px 13px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.rpf-squiggle {
|
|
29
|
+
@extend %rpf-squiggle-default;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.rpf-squiggle-heading {
|
|
33
|
+
display: inline-block;
|
|
34
|
+
position: relative;
|
|
35
|
+
padding-block-end: calc(13px + var(--space-1));
|
|
36
|
+
|
|
37
|
+
&::after {
|
|
38
|
+
@extend %rpf-squiggle-default;
|
|
39
|
+
|
|
40
|
+
content: '';
|
|
41
|
+
display: block;
|
|
42
|
+
position: absolute;
|
|
43
|
+
inset-inline: 0;
|
|
44
|
+
margin-block-start: var(--space-1);
|
|
45
|
+
}
|
|
46
|
+
}
|