@coopdigital/styles 0.42.2 → 0.44.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 (52) hide show
  1. package/dist/components/Button.css +1 -1
  2. package/dist/components/Card.css +1 -1
  3. package/dist/components/Checkbox.css +1 -1
  4. package/dist/components/DatePicker.css +1 -1
  5. package/dist/components/Expandable.css +1 -1
  6. package/dist/components/Pill.css +1 -1
  7. package/dist/components/Radio.css +1 -1
  8. package/dist/components/Searchbox.css +1 -1
  9. package/dist/components/Select.css +1 -1
  10. package/dist/components/Signpost.css +1 -1
  11. package/dist/components/Tag.css +1 -1
  12. package/dist/components/TextInput.css +1 -1
  13. package/dist/components/Textarea.css +1 -1
  14. package/dist/components.css +1 -1
  15. package/dist/form.css +1 -1
  16. package/dist/main.css +1 -1
  17. package/dist/required-backgrounds.css +1 -0
  18. package/dist/reset.css +1 -1
  19. package/dist/typography/headings.css +1 -1
  20. package/dist/typography/misc.css +1 -1
  21. package/dist/typography.css +1 -1
  22. package/dist/vars/typography.css +1 -1
  23. package/dist/vars/ui.css +1 -1
  24. package/dist/vars-legacy.css +1 -1
  25. package/dist/vars.css +1 -1
  26. package/package.json +11 -6
  27. package/presets/uno/index.d.ts +2 -0
  28. package/presets/uno/index.js +106 -0
  29. package/src/components/DatePicker.scss +1 -0
  30. package/src/main.scss +1 -0
  31. package/src/required-backgrounds.scss +7 -0
  32. package/src/typography/headings.scss +1 -1
  33. package/dist/utilities/background.css +0 -1
  34. package/dist/utilities/border.css +0 -1
  35. package/dist/utilities/display.css +0 -1
  36. package/dist/utilities/flex.css +0 -1
  37. package/dist/utilities/grid.css +0 -1
  38. package/dist/utilities/position.css +0 -1
  39. package/dist/utilities/sizing.css +0 -1
  40. package/dist/utilities/spacing.css +0 -1
  41. package/dist/utilities/typography.css +0 -1
  42. package/dist/utilities.css +0 -1
  43. package/src/utilities/background.scss +0 -84
  44. package/src/utilities/border.scss +0 -74
  45. package/src/utilities/display.scss +0 -7
  46. package/src/utilities/flex.scss +0 -194
  47. package/src/utilities/grid.scss +0 -192
  48. package/src/utilities/position.scss +0 -16
  49. package/src/utilities/sizing.scss +0 -36
  50. package/src/utilities/spacing.scss +0 -63
  51. package/src/utilities/typography.scss +0 -131
  52. package/src/utilities.scss +0 -9
@@ -1,194 +0,0 @@
1
- @use "sass:selector";
2
- @use "sass:string";
3
- @use "../breakpoints" as *;
4
-
5
- $breakpoints: (
6
- // "xxs" 320,
7
- // "xs" 414,
8
- "sm" $mq-small,
9
- "md" $mq-medium,
10
- "lg" $mq-large,
11
- "xl" $mq-xlarge,
12
- "xxl" $mq-xxlarge
13
- );
14
- $flex-directions: (row, row-reverse, col column, col-reverse column-reverse);
15
- $flex-wraps: (nowrap, wrap, wrap-reverse);
16
- $justify-content: (
17
- normal,
18
- start flex-start,
19
- center,
20
- end flex-end,
21
- between space-between,
22
- around space-around,
23
- evenly space-evenly,
24
- baseline,
25
- stretch
26
- ); // except for justify-end-safe & justify-center-safe
27
- $align-content: (
28
- normal,
29
- start flex-start,
30
- center,
31
- end flex-end,
32
- between space-between,
33
- around space-around,
34
- evenly space-evenly,
35
- baseline,
36
- stretch
37
- );
38
- $justify-items: (
39
- normal,
40
- start flex-start,
41
- center,
42
- end flex-end,
43
- stretch
44
- ); // except for center-safe and end-safe
45
- $align-items: (
46
- start flex-start,
47
- center,
48
- end flex-end,
49
- stretch,
50
- baseline,
51
- baseline-last "last baseline"
52
- ); // except for center-safe and end-safe
53
-
54
- $justify-self: (auto, start, center, end, stretch); // except for safe center and safe end
55
- $align-self: (
56
- auto,
57
- start flex-start,
58
- center,
59
- end flex-end,
60
- stretch,
61
- baseline,
62
- baseline-last "last baseline"
63
- ); // except for safe center and safe end
64
-
65
- .flex {
66
- display: flex;
67
- }
68
-
69
- .inline-flex {
70
- display: inline-flex;
71
- }
72
-
73
- /**
74
- * Generate safe prefix
75
- * Adds this .sm\\: instead of .sm:
76
- */
77
-
78
- @function get-safe-prefix($prefix: "") {
79
- $safe-prefix: "";
80
-
81
- @if string.length($prefix) > 0 {
82
- $safe-prefix: $prefix + "\\:";
83
- }
84
-
85
- @return $safe-prefix;
86
- }
87
-
88
- @mixin flex-direction($prefix: "") {
89
- $safe-prefix: get-safe-prefix($prefix);
90
-
91
- @each $k, $v in $flex-directions {
92
- .#{$safe-prefix}flex-#{$k} {
93
- flex-direction: #{if($v, $v, $k)};
94
- }
95
- }
96
- }
97
-
98
- @include flex-direction;
99
-
100
- @each $breakpoint, $size in $breakpoints {
101
- @media (min-width: $size) {
102
- @include flex-direction($breakpoint);
103
- }
104
- }
105
-
106
- @each $option in $flex-wraps {
107
- .flex-#{$option} {
108
- flex-wrap: $option;
109
- }
110
- }
111
-
112
- @each $k, $v in $justify-content {
113
- .justify-#{$k} {
114
- justify-content: #{if($v, $v, $k)};
115
- }
116
- }
117
-
118
- @each $k, $v in $align-content {
119
- .content-#{$k} {
120
- align-content: #{if($v, $v, $k)};
121
- }
122
- }
123
-
124
- @each $k, $v in $justify-items {
125
- .justify-items-#{$k} {
126
- justify-items: #{if($v, $v, $k)};
127
- }
128
- }
129
-
130
- @each $k, $v in $align-items {
131
- .items-#{$k} {
132
- align-items: #{if($v, $v, $k)};
133
- }
134
- }
135
-
136
- @each $k, $v in $justify-self {
137
- .justify-self-#{$k} {
138
- justify-self: #{if($v, $v, $k)};
139
- }
140
- }
141
-
142
- @each $k, $v in $align-self {
143
- .self-#{$k} {
144
- align-self: #{if($v, $v, $k)};
145
- }
146
- }
147
-
148
- .flex-none {
149
- flex: none;
150
- }
151
-
152
- .flex-auto {
153
- flex: 1 1 auto;
154
- }
155
-
156
- .flex-initial {
157
- flex: 0 1 auto;
158
- }
159
-
160
- /*
161
- Compound flex utilities
162
- */
163
- .flex-center {
164
- display: flex;
165
- align-items: center;
166
- justify-content: center;
167
- }
168
-
169
- .flex-center-between {
170
- display: flex;
171
- align-items: center;
172
- justify-content: space-between;
173
- }
174
-
175
- .flex-center-around {
176
- display: flex;
177
- align-items: center;
178
- justify-content: space-around;
179
- }
180
-
181
- .flex-stack-vertical {
182
- display: flex;
183
- flex-direction: column;
184
- gap: 1rem;
185
- }
186
-
187
- // Column on small screens, row on medium and up
188
- .flex-responsive {
189
- display: flex;
190
- flex-direction: column;
191
- @media (min-width: $mq-medium) {
192
- flex-direction: row;
193
- }
194
- }
@@ -1,192 +0,0 @@
1
- @use "sass:selector";
2
- @use "sass:string";
3
- @use "../breakpoints" as *;
4
-
5
- $columns: 12;
6
- $breakpoints: (
7
- // "xxs" 320 2,
8
- // "xs" 414 2,
9
- "sm" $mq-small 6,
10
- "md" $mq-medium 12,
11
- "lg" $mq-large 12,
12
- "xl" $mq-xlarge 12,
13
- "xxl" $mq-xxlarge 12
14
- );
15
-
16
- /* prettier-ignore */
17
- $gaps: (
18
- 2,
19
- 4 "sm",
20
- 6,
21
- 8 "md",
22
- 10,
23
- 12 "lg"
24
- );
25
-
26
- .grid {
27
- display: grid;
28
- }
29
-
30
- .inline-grid {
31
- display: inline-grid;
32
- }
33
-
34
- /**
35
- * Generate safe prefix
36
- * Adds this .sm\\: instead of .sm:
37
- */
38
-
39
- @function get-safe-prefix($prefix: "") {
40
- $safe-prefix: "";
41
-
42
- @if string.length($prefix) > 0 {
43
- $safe-prefix: $prefix + "\\:";
44
- }
45
-
46
- @return $safe-prefix;
47
- }
48
-
49
- /**
50
- * Generate .gap-* classes
51
- * Currently does not generate .gap-x-* or .gap-y-*
52
- */
53
-
54
- @mixin gap-classes($prefix: "") {
55
- $safe-prefix: get-safe-prefix($prefix);
56
-
57
- @each $size, $name in $gaps {
58
- $px: ".#{$safe-prefix}gap-#{$size}";
59
- $selector: ($px);
60
-
61
- @if $name {
62
- $selector: selector.extend($selector, $px, (".#{$safe-prefix}gap-#{$name}"));
63
- }
64
- #{$selector} {
65
- gap: calc(var(--spacing-4) * $size);
66
- }
67
- }
68
- }
69
-
70
- /**
71
- * Generate .grid-* classes
72
- * Generally of the format .grid-cols-*
73
- */
74
-
75
- @mixin grid-classes($prefix: "") {
76
- $safe-prefix: get-safe-prefix($prefix);
77
-
78
- @for $number from 1 through $columns {
79
- .#{$safe-prefix}grid-cols-#{$number} {
80
- grid-template-columns: repeat(#{$number}, minmax(0, 1fr));
81
- }
82
- }
83
- }
84
-
85
- /**
86
- * Generate .col-* classes
87
- */
88
-
89
- @mixin column-classes($prefix: "") {
90
- $safe-prefix: get-safe-prefix($prefix);
91
-
92
- @for $number from 1 through $columns {
93
- .#{$safe-prefix}col-span-#{$number} {
94
- grid-column: span #{$number} / span #{$number};
95
- }
96
- .#{$safe-prefix}col-start-#{$number} {
97
- grid-column-start: #{$number};
98
- }
99
- .#{$safe-prefix}col-end-#{$number} {
100
- grid-column-end: #{$number};
101
- }
102
- }
103
- }
104
-
105
- @include gap-classes;
106
-
107
- @include grid-classes;
108
-
109
- @include column-classes;
110
-
111
- // Static .grid-cols-* classes
112
-
113
- .grid-cols-none {
114
- grid-template-columns: none;
115
- }
116
-
117
- .grid-cols-subgrid {
118
- grid-template-columns: subgrid;
119
- }
120
-
121
- // Static .col-* classes
122
-
123
- .col-span-full {
124
- grid-column: 1 / -1;
125
- }
126
-
127
- .col-span-stretch {
128
- grid-column-end: -1;
129
- }
130
-
131
- .col-start-auto {
132
- grid-column-start: auto;
133
- }
134
-
135
- .col-end-auto {
136
- grid-column-end: auto;
137
- }
138
-
139
- .col-auto {
140
- grid-column: auto;
141
- }
142
-
143
- // Static .grid-flow-* classes
144
-
145
- .grid-flow-col {
146
- grid-auto-flow: column;
147
- }
148
-
149
- .grid-flow-dense {
150
- grid-auto-flow: dense;
151
- }
152
-
153
- .grid-flow-col-dense {
154
- grid-auto-flow: column dense;
155
- }
156
-
157
- // Static .auto-cols-* classes
158
-
159
- .auto-cols-auto {
160
- grid-auto-columns: auto;
161
- }
162
-
163
- .auto-cols-min {
164
- grid-auto-columns: min-content;
165
- }
166
-
167
- .auto-cols-max {
168
- grid-auto-columns: max-content;
169
- }
170
-
171
- .auto-cols-fr {
172
- grid-auto-columns: minmax(0, 1fr);
173
- }
174
-
175
- @each $breakpoint, $size, $cols in $breakpoints {
176
- @media (min-width: $size) {
177
- @include gap-classes($breakpoint);
178
-
179
- @include grid-classes($breakpoint);
180
-
181
- @include column-classes($breakpoint);
182
- }
183
- }
184
-
185
- // Static gap-* classes
186
- .gap-auto {
187
- gap: 1rem;
188
-
189
- @media (min-width: $mq-medium) {
190
- gap: 2rem;
191
- }
192
- }
@@ -1,16 +0,0 @@
1
- // Positioning Utilities
2
- $positioning-options: (static, relative, absolute, fixed, sticky);
3
-
4
- @each $p in $positioning-options {
5
- .#{$p} {
6
- position: #{$p};
7
- }
8
- }
9
-
10
- $z-indexes: (auto, 0, 10, 20, 30, 40, 50);
11
-
12
- @each $z in $z-indexes {
13
- .z-#{$z} {
14
- z-index: #{$z};
15
- }
16
- }
@@ -1,36 +0,0 @@
1
- @use "sass:string";
2
-
3
- // Sizing Utilities
4
- $property-options: (
5
- width: "w",
6
- // min-width: "min-w",
7
- // max-width: "max-w",
8
- height: "h",
9
- // min-height: "min-h",
10
- // max-height: "max-h",
11
- );
12
- $size-options: (
13
- "auto": auto,
14
- "full": 100%,
15
- "1\\/2": 50%,
16
- "1\\/3": calc(100% / 3),
17
- "1\\/4": calc(100% / 4),
18
- /*"1\\/5": calc(100% / 5),
19
- "1\\/6": calc(100% / 6),
20
- "1\\/8": calc(100% / 8),
21
- "1\\/10": calc(100% / 10),
22
- "1\\/12": calc(100% / 12),
23
- */"2\\/3":
24
- calc(200% / 3),
25
- "3\\/4": calc(300% / 4) /*
26
- "4\\/5": calc(400% / 5),
27
- "5\\/6": calc(500% / 6),*/,
28
- );
29
-
30
- @each $property, $class in $property-options {
31
- @each $class-suffix, $value in $size-options {
32
- .#{$class}-#{string.unquote($class-suffix)} {
33
- #{$property}: #{$value};
34
- }
35
- }
36
- }
@@ -1,63 +0,0 @@
1
- $spacing: (
2
- "64",
3
- "56",
4
- "48",
5
- "32",
6
- "24",
7
- "20",
8
- "18",
9
- "16",
10
- "14",
11
- "12",
12
- "10",
13
- "8",
14
- "6",
15
- "4",
16
- "2",
17
- "0"
18
- );
19
-
20
- @each $k in $spacing {
21
- .m-#{$k} {
22
- margin: var(--spacing-#{$k});
23
- }
24
- .mx-#{$k} {
25
- margin-inline: var(--spacing-#{$k});
26
- }
27
- .my-#{$k} {
28
- margin-block: var(--spacing-#{$k});
29
- }
30
- .mt-#{$k} {
31
- margin-top: var(--spacing-#{$k});
32
- }
33
- .mb-#{$k} {
34
- margin-bottom: var(--spacing-#{$k});
35
- }
36
- .ml-#{$k} {
37
- margin-left: var(--spacing-#{$k});
38
- }
39
- .mr-#{$k} {
40
- margin-right: var(--spacing-#{$k});
41
- }
42
- .p-#{$k} {
43
- padding: var(--spacing-#{$k});
44
- }
45
- .px-#{$k} {
46
- padding-inline: var(--spacing-#{$k});
47
- }
48
- .py-#{$k} {
49
- padding-block: var(--spacing-#{$k});
50
- }
51
- .pt-#{$k} {
52
- padding-top: var(--spacing-#{$k});
53
- }
54
- .pb-#{$k} {
55
- padding-bottom: var(--spacing-#{$k});
56
- }
57
- .pl-#{$k} {
58
- padding-left: var(--spacing-#{$k});
59
- }
60
- .pr-#{$k} {
61
- padding-right: var(--spacing-#{$k});
62
- }
63
- }
@@ -1,131 +0,0 @@
1
- @use "sass:selector";
2
- @use "../vars/colors-palette" as *;
3
-
4
- $sizes: (
5
- 10,
6
- 11,
7
- 12 "xs",
8
- 13,
9
- 14 "sm",
10
- 16 "base",
11
- 18 "lg",
12
- 20 "xl",
13
- 22,
14
- 24 "2xl",
15
- 26,
16
- 28,
17
- 30 "3xl",
18
- 32,
19
- 36 "4xl",
20
- 40,
21
- 46,
22
- 48 "5xl",
23
- 56,
24
- 60 "6xl",
25
- 64,
26
- 72 "7xl",
27
- 82 "mega",
28
- 96 "8xl"
29
- );
30
-
31
- @each $size, $name in $sizes {
32
- $px: ".text-#{$size}";
33
- $selector: ($px);
34
-
35
- @if $name {
36
- $selector: selector.extend($selector, $px, (".text-#{$name}"));
37
- }
38
-
39
- #{$selector} {
40
- font-size: var(--text-size-#{$size});
41
- }
42
- }
43
-
44
- .font-headline {
45
- font-family: var(--font-family-headline);
46
- }
47
-
48
- .font-avenir {
49
- font-family: var(--font-family);
50
- }
51
-
52
- .font-mono {
53
- font-family: monospace;
54
- }
55
-
56
- $text-transform-options: (capitalize, uppercase, lowercase);
57
-
58
- @each $option in $text-transform-options {
59
- .text-#{$option} {
60
- text-transform: #{$option};
61
- }
62
- }
63
-
64
- $text-wrap-options: ("wrap", "nowrap", "balance", "pretty");
65
-
66
- @each $option in $text-wrap-options {
67
- .text-#{$option} {
68
- text-wrap: #{$option};
69
- }
70
- }
71
-
72
- $text-align-options: ("left", "center", "right", "justify", "start", "end");
73
-
74
- @each $option in $text-align-options {
75
- .text-#{$option} {
76
- text-align: #{$option};
77
- }
78
- }
79
-
80
- $font-weight-options: (300 "light", 400 "normal", 500 "medium", 600 "semibold", 700 "bold");
81
-
82
- @each $weight, $name in $font-weight-options {
83
- .font-#{$name} {
84
- font-weight: #{$weight};
85
- }
86
- }
87
-
88
- .italic {
89
- font-style: italic;
90
- }
91
-
92
- $text-decoration-line-options: (underline, overline, line-through, no-underline);
93
-
94
- @each $option in $text-decoration-line-options {
95
- .#{$option} {
96
- text-decoration-line: if($option == "no-underline", none, $option);
97
- }
98
- }
99
-
100
- $letter-spacing-options: (
101
- "tracking-tighter": "-0.05em",
102
- "tracking-tight": "-0.025em",
103
- "tracking-normal": "0em",
104
- "tracking-wide": "0.025em",
105
- "tracking-wider": "0.05em",
106
- "tracking-widest": "0.1em",
107
- );
108
-
109
- @each $option, $value in $letter-spacing-options {
110
- .#{$option} {
111
- letter-spacing: #{$value};
112
- }
113
- }
114
-
115
- @each $key, $color in $dark-colors {
116
- .text-dark-#{$key} {
117
- color: #{$color};
118
- }
119
- }
120
-
121
- @each $key, $color in $text-colors {
122
- .text-#{$key} {
123
- color: #{$color};
124
- }
125
- }
126
-
127
- @each $key, $color in $standalone-colors {
128
- .text-#{$key} {
129
- color: #{$color};
130
- }
131
- }
@@ -1,9 +0,0 @@
1
- @use "./utilities/background";
2
- @use "./utilities/border";
3
- @use "./utilities/typography";
4
- @use "./utilities/grid";
5
- @use "./utilities/display";
6
- @use "./utilities/spacing";
7
- @use "./utilities/flex";
8
- @use "./utilities/position";
9
- @use "./utilities/sizing";