@apolitical/component-library 8.11.2-oa.2 → 8.11.3-lrn-102

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.
@@ -12,41 +12,43 @@ $pretty-checkbox: (
12
12
  );
13
13
 
14
14
  @layer components {
15
- .pretty-checkbox {
16
- width: px-to-rem(get-map($pretty-checkbox, 'width'));
17
- height: px-to-rem(get-map($pretty-checkbox, 'width'));
18
- position: absolute;
19
- top: px-to-rem(get-map($pretty-checkbox, 'top'));
20
- inset-inline-start: 0;
21
- border: px-to-rem(get-map($pretty-checkbox, 'border')) solid
22
- get-map($theme, 'form_field_border');
23
- border-radius: px-to-rem(get-map($pretty-checkbox, 'border-radius'));
24
- box-sizing: border-box;
25
- outline: none;
26
- z-index: 10;
15
+ .v1styles {
16
+ .pretty-checkbox {
17
+ width: px-to-rem(get-map($pretty-checkbox, 'width'));
18
+ height: px-to-rem(get-map($pretty-checkbox, 'width'));
19
+ position: absolute;
20
+ top: px-to-rem(get-map($pretty-checkbox, 'top'));
21
+ inset-inline-start: 0;
22
+ border: px-to-rem(get-map($pretty-checkbox, 'border')) solid
23
+ get-map($theme, 'form_field_border');
24
+ border-radius: px-to-rem(get-map($pretty-checkbox, 'border-radius'));
25
+ box-sizing: border-box;
26
+ outline: none;
27
+ z-index: 10;
27
28
 
28
- input:focus + &,
29
- button:focus & {
30
- box-shadow: $outline get-map($theme, 'default_focus');
31
- }
29
+ input:focus + &,
30
+ button:focus & {
31
+ box-shadow: $outline get-map($theme, 'default_focus');
32
+ }
32
33
 
33
- input:checked + &,
34
- .selected & {
35
- background: get-map($theme, 'form_checkbox_bg');
36
- border-color: get-map($theme, 'form_checkbox_border');
34
+ input:checked + &,
35
+ .selected & {
36
+ background: get-map($theme, 'form_checkbox_bg');
37
+ border-color: get-map($theme, 'form_checkbox_border');
37
38
 
38
- &:not(.radio)::before {
39
- @include image('icons/tick.svg', true);
39
+ &:not(.radio)::before {
40
+ @include image('icons/tick.svg', true);
40
41
 
41
- content: '';
42
- width: px-to-rem(get-map($pretty-checkbox, 'tick-width'));
43
- height: px-to-rem(get-map($pretty-checkbox, 'tick-height'));
44
- background: get-map($theme, 'form_checkbox_icon');
45
- position: absolute;
46
- top: 50%;
47
- left: 50%;
48
- margin-top: px-to-rem(get-map($pretty-checkbox, 'margin-top'));
49
- margin-left: px-to-rem(get-map($pretty-checkbox, 'margin-left'));
42
+ content: '';
43
+ width: px-to-rem(get-map($pretty-checkbox, 'tick-width'));
44
+ height: px-to-rem(get-map($pretty-checkbox, 'tick-height'));
45
+ background: get-map($theme, 'form_checkbox_icon');
46
+ position: absolute;
47
+ top: 50%;
48
+ left: 50%;
49
+ margin-top: px-to-rem(get-map($pretty-checkbox, 'margin-top'));
50
+ margin-left: px-to-rem(get-map($pretty-checkbox, 'margin-left'));
51
+ }
50
52
  }
51
53
  }
52
54
  }
@@ -38,77 +38,79 @@ $character-limit: (
38
38
  }
39
39
 
40
40
  @layer base {
41
- ::placeholder {
42
- color: get-map($theme, 'form_input_placeholder');
43
- opacity: 1;
44
- }
41
+ .v1styles {
42
+ ::placeholder {
43
+ color: get-map($theme, 'form_input_placeholder');
44
+ opacity: 1;
45
+ }
45
46
 
46
- input,
47
- .input,
48
- textarea {
49
- @include field-styling;
47
+ input,
48
+ .input,
49
+ textarea {
50
+ @include field-styling;
50
51
 
51
- width: 100%;
52
- padding: px-to-rem(get-map($field, 'padding-vertical'))
53
- px-to-rem(get-map($field, 'padding-horizontal'));
54
- font-size: px-to-rem(get-map($field, 'font-size'));
55
- color: get-map($theme, 'form_input');
56
- line-height: px-to-rem(get-map($field, 'line-height'));
52
+ width: 100%;
53
+ padding: px-to-rem(get-map($field, 'padding-vertical'))
54
+ px-to-rem(get-map($field, 'padding-horizontal'));
55
+ font-size: px-to-rem(get-map($field, 'font-size'));
56
+ color: get-map($theme, 'form_input');
57
+ line-height: px-to-rem(get-map($field, 'line-height'));
57
58
 
58
- &.autoresize {
59
- @include transition(height, 0.5s);
59
+ &.autoresize {
60
+ @include transition(height, 0.5s);
60
61
 
61
- min-height: px-to-rem(get-map($autoresize, 'height'));
62
- overflow: hidden;
62
+ min-height: px-to-rem(get-map($autoresize, 'height'));
63
+ overflow: hidden;
64
+
65
+ &:empty,
66
+ &.single-line {
67
+ // This is to override the inline styles for the height
68
+ height: px-to-rem(get-map($autoresize, 'height')) !important;
69
+ }
63
70
 
64
- &:empty,
65
- &.single-line {
66
- // This is to override the inline styles for the height
67
- height: px-to-rem(get-map($autoresize, 'height')) !important;
71
+ &[data-character-limit] {
72
+ &:focus,
73
+ &:focus-within {
74
+ padding-right: px-to-rem(
75
+ get-map($character-limit, 'max-width') +
76
+ get-map($character-limit, 'padding-horizontal')
77
+ );
78
+ }
79
+ }
68
80
  }
69
81
 
70
- &[data-character-limit] {
82
+ &:not(.autoresize)[data-character-limit] {
71
83
  &:focus,
72
84
  &:focus-within {
73
- padding-right: px-to-rem(
74
- get-map($character-limit, 'max-width') +
75
- get-map($character-limit, 'padding-horizontal')
76
- );
85
+ padding-bottom: px-to-rem(get-map($character-limit, 'padding-bottom'));
77
86
  }
78
87
  }
79
- }
80
-
81
- &:not(.autoresize)[data-character-limit] {
82
- &:focus,
83
- &:focus-within {
84
- padding-bottom: px-to-rem(get-map($character-limit, 'padding-bottom'));
85
- }
86
- }
87
88
 
88
- // Remove default styling, for consistency
89
- &[type='search'] {
90
- &::-ms-clear {
91
- width: 0;
92
- height: 0;
93
- display: none;
94
- }
89
+ // Remove default styling, for consistency
90
+ &[type='search'] {
91
+ &::-ms-clear {
92
+ width: 0;
93
+ height: 0;
94
+ display: none;
95
+ }
95
96
 
96
- &::-ms-reveal {
97
- width: 0;
98
- height: 0;
99
- display: none;
100
- }
97
+ &::-ms-reveal {
98
+ width: 0;
99
+ height: 0;
100
+ display: none;
101
+ }
101
102
 
102
- &::-webkit-search-decoration,
103
- &::-webkit-search-cancel-button,
104
- &::-webkit-search-results-button,
105
- &::-webkit-search-results-decoration {
106
- display: none;
103
+ &::-webkit-search-decoration,
104
+ &::-webkit-search-cancel-button,
105
+ &::-webkit-search-results-button,
106
+ &::-webkit-search-results-decoration {
107
+ display: none;
108
+ }
107
109
  }
108
110
  }
109
- }
110
111
 
111
- textarea {
112
- resize: none;
112
+ textarea {
113
+ resize: none;
114
+ }
113
115
  }
114
116
  }
@@ -5,25 +5,27 @@ $base-form: (
5
5
  );
6
6
 
7
7
  @layer components {
8
- .form {
9
- width: 100%;
10
- position: relative;
11
- padding: px-to-rem(get-map($base-form, 'padding'));
12
- display: flex;
13
- flex-flow: row wrap;
14
- justify-content: space-between;
15
- box-sizing: border-box;
8
+ .v1styles {
9
+ .form {
10
+ width: 100%;
11
+ position: relative;
12
+ padding: px-to-rem(get-map($base-form, 'padding'));
13
+ display: flex;
14
+ flex-flow: row wrap;
15
+ justify-content: space-between;
16
+ box-sizing: border-box;
16
17
 
17
- .error {
18
- font-style: italic;
19
- }
18
+ .error {
19
+ font-style: italic;
20
+ }
20
21
 
21
- .cta {
22
- width: 100%;
23
- text-align: right;
22
+ .cta {
23
+ width: 100%;
24
+ text-align: right;
24
25
 
25
- &.center {
26
- text-align: center;
26
+ &.center {
27
+ text-align: center;
28
+ }
27
29
  }
28
30
  }
29
31
  }
@@ -1,13 +1,15 @@
1
1
  @import './../../functions', './../../variables';
2
2
 
3
3
  @layer base {
4
- label,
5
- .legend-as-label {
6
- font-weight: 900;
4
+ .v1styles {
5
+ label,
6
+ .legend-as-label {
7
+ font-weight: 900;
7
8
 
8
- small {
9
- color: get-map($theme, 'form_label-small');
10
- font-weight: inherit;
9
+ small {
10
+ color: get-map($theme, 'form_label-small');
11
+ font-weight: inherit;
12
+ }
11
13
  }
12
14
  }
13
15
  }
@@ -8,26 +8,28 @@ $radio-inner: (
8
8
  );
9
9
 
10
10
  @layer components {
11
- .pretty-checkbox.radio {
12
- border-radius: 50%;
11
+ .v1styles {
12
+ .pretty-checkbox.radio {
13
+ border-radius: 50%;
13
14
 
14
- input:checked + &,
15
- .selected & {
16
- border: px-to-rem(get-map($radio, 'border')) solid
17
- get-map($theme, 'form_checkbox_bg');
18
- background: none;
15
+ input:checked + &,
16
+ .selected & {
17
+ border: px-to-rem(get-map($radio, 'border')) solid
18
+ get-map($theme, 'form_checkbox_bg');
19
+ background: none;
19
20
 
20
- &::after {
21
- content: '';
22
- display: block;
23
- width: px-to-rem(get-map($radio-inner, 'width'));
24
- height: px-to-rem(get-map($radio-inner, 'width'));
25
- background-color: get-map($theme, 'form_checkbox_bg');
26
- border-radius: 50%;
27
- position: absolute;
28
- top: 50%;
29
- left: 50%;
30
- transform: translate(-50%, -50%);
21
+ &::after {
22
+ content: '';
23
+ display: block;
24
+ width: px-to-rem(get-map($radio-inner, 'width'));
25
+ height: px-to-rem(get-map($radio-inner, 'width'));
26
+ background-color: get-map($theme, 'form_checkbox_bg');
27
+ border-radius: 50%;
28
+ position: absolute;
29
+ top: 50%;
30
+ left: 50%;
31
+ transform: translate(-50%, -50%);
32
+ }
31
33
  }
32
34
  }
33
35
  }
@@ -6,27 +6,29 @@ $search-icon: (
6
6
  );
7
7
 
8
8
  @layer base {
9
- button.search {
10
- width: px-to-rem(get-map($search-icon, 'width'));
11
- height: px-to-rem(get-map($search-icon, 'height'));
12
- background: transparent;
13
- margin: 0;
14
- padding: 0;
15
- border: none;
16
- display: flex;
17
- align-items: center;
18
- justify-content: center;
19
- cursor: pointer;
20
-
21
- &::before {
22
- @include transition(background, 0.3s, ease);
23
- @include image('icons/magnifying-glass.svg', true);
24
-
25
- content: '';
9
+ .v1styles {
10
+ button.search {
26
11
  width: px-to-rem(get-map($search-icon, 'width'));
27
12
  height: px-to-rem(get-map($search-icon, 'height'));
28
- background: get-map($theme, 'form_search-button_bg');
29
- display: block;
13
+ background: transparent;
14
+ margin: 0;
15
+ padding: 0;
16
+ border: none;
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+ cursor: pointer;
21
+
22
+ &::before {
23
+ @include transition(background, 0.3s, ease);
24
+ @include image('icons/magnifying-glass.svg', true);
25
+
26
+ content: '';
27
+ width: px-to-rem(get-map($search-icon, 'width'));
28
+ height: px-to-rem(get-map($search-icon, 'height'));
29
+ background: get-map($theme, 'form_search-button_bg');
30
+ display: block;
31
+ }
30
32
  }
31
33
  }
32
34
  }
@@ -2,112 +2,108 @@
2
2
  * https://meyerweb.com/eric/tools/css/reset/ */
3
3
 
4
4
  @layer reset {
5
- html,
6
- body,
7
- div,
8
- span,
9
- applet,
10
- object,
11
- iframe,
12
- h1,
13
- h2,
14
- h3,
15
- h4,
16
- h5,
17
- h6,
18
- p,
19
- blockquote,
20
- pre,
21
- a,
22
- abbr,
23
- acronym,
24
- address,
25
- big,
26
- cite,
27
- code,
28
- del,
29
- dfn,
30
- em,
31
- img,
32
- ins,
33
- kbd,
34
- q,
35
- s,
36
- samp,
37
- small,
38
- strike,
39
- strong,
40
- sub,
41
- sup,
42
- tt,
43
- var,
44
- b,
45
- u,
46
- i,
47
- center,
48
- dl,
49
- dt,
50
- dd,
51
- ol,
52
- ul,
53
- li,
54
- fieldset,
55
- form,
56
- label,
57
- legend,
58
- table,
59
- caption,
60
- tbody,
61
- tfoot,
62
- thead,
63
- tr,
64
- th,
65
- td,
66
- article,
67
- aside,
68
- canvas,
69
- details,
70
- embed,
71
- figure,
72
- figcaption,
73
- footer,
74
- header,
75
- hgroup,
76
- menu,
77
- nav,
78
- output,
79
- ruby,
80
- section,
81
- summary,
82
- time,
83
- mark,
84
- audio,
85
- video {
86
- margin: 0;
87
- padding: 0;
88
- border: 0;
89
- vertical-align: baseline;
90
- }
5
+ .v1styles {
6
+ &,
7
+ div,
8
+ span,
9
+ applet,
10
+ object,
11
+ iframe,
12
+ h1,
13
+ h2,
14
+ h3,
15
+ h4,
16
+ h5,
17
+ h6,
18
+ p,
19
+ blockquote,
20
+ pre,
21
+ a,
22
+ abbr,
23
+ acronym,
24
+ address,
25
+ big,
26
+ cite,
27
+ code,
28
+ del,
29
+ dfn,
30
+ em,
31
+ img,
32
+ ins,
33
+ kbd,
34
+ q,
35
+ s,
36
+ samp,
37
+ small,
38
+ strike,
39
+ strong,
40
+ sub,
41
+ sup,
42
+ tt,
43
+ var,
44
+ b,
45
+ u,
46
+ i,
47
+ center,
48
+ dl,
49
+ dt,
50
+ dd,
51
+ ol,
52
+ ul,
53
+ li,
54
+ fieldset,
55
+ form,
56
+ label,
57
+ legend,
58
+ table,
59
+ caption,
60
+ tbody,
61
+ tfoot,
62
+ thead,
63
+ tr,
64
+ th,
65
+ td,
66
+ article,
67
+ aside,
68
+ canvas,
69
+ details,
70
+ embed,
71
+ figure,
72
+ figcaption,
73
+ footer,
74
+ header,
75
+ hgroup,
76
+ menu,
77
+ nav,
78
+ output,
79
+ ruby,
80
+ section,
81
+ summary,
82
+ time,
83
+ mark,
84
+ audio,
85
+ video {
86
+ margin: 0;
87
+ padding: 0;
88
+ border: 0;
89
+ vertical-align: baseline;
90
+ }
91
91
 
92
- article,
93
- aside,
94
- details,
95
- figcaption,
96
- figure,
97
- footer,
98
- header,
99
- hgroup,
100
- menu,
101
- nav,
102
- section {
103
- display: block;
104
- }
92
+ article,
93
+ aside,
94
+ details,
95
+ figcaption,
96
+ figure,
97
+ footer,
98
+ header,
99
+ hgroup,
100
+ menu,
101
+ nav,
102
+ section {
103
+ display: block;
104
+ }
105
105
 
106
- html {
107
106
  font-size: 100%;
108
- }
109
-
110
- body {
111
107
  -moz-osx-font-smoothing: grayscale;
112
108
  -webkit-font-smoothing: antialiased;
113
109
 
@@ -116,29 +112,29 @@
116
112
  text-size-adjust: 100%;
117
113
  text-rendering: optimizelegibility;
118
114
  line-height: 1;
119
- }
120
115
 
121
- ul {
122
- list-style: disc;
123
- }
116
+ ul {
117
+ list-style: disc;
118
+ }
124
119
 
125
- ol {
126
- list-style: decimal;
127
- }
120
+ ol {
121
+ list-style: decimal;
122
+ }
128
123
 
129
- blockquote,
130
- q {
131
- quotes: none;
124
+ blockquote,
125
+ q {
126
+ quotes: none;
132
127
 
133
- &::before,
134
- &::after {
135
- content: '';
136
- content: none;
128
+ &::before,
129
+ &::after {
130
+ content: '';
131
+ content: none;
132
+ }
137
133
  }
138
- }
139
134
 
140
- table {
141
- border-collapse: collapse;
142
- border-spacing: 0;
135
+ table {
136
+ border-collapse: collapse;
137
+ border-spacing: 0;
138
+ }
143
139
  }
144
140
  }