claritas-web-framework 7.0.1 → 8.0.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 (65) hide show
  1. package/dist/index.css +276 -1
  2. package/dist/index.html +1 -1
  3. package/index.html +11 -6
  4. package/package.json +6 -5
  5. package/sass/_functions.scss +3 -145
  6. package/sass/_mixins.scss +0 -5
  7. package/sass/_reboot.scss +72 -410
  8. package/sass/_root.scss +11 -1
  9. package/sass/_variables.scss +120 -219
  10. package/sass/helpers/_grid.scss +11 -15
  11. package/sass/index.scss +2 -0
  12. package/sass/mixins/_button.scss +124 -232
  13. package/sass/mixins/_caret.scss +17 -10
  14. package/sass/mixins/_colors.scss +1 -1
  15. package/sass/mixins/_gradient.scss +0 -8
  16. package/sass/mixins/_group.scss +2 -2
  17. package/sass/mixins/_list.scss +1 -1
  18. package/sass/modules/_alert.scss +8 -8
  19. package/sass/modules/_breadcrumbs.scss +3 -3
  20. package/sass/modules/_button.scss +72 -96
  21. package/sass/modules/_card.scss +41 -56
  22. package/sass/modules/_close.scss +20 -10
  23. package/sass/modules/_details.scss +7 -25
  24. package/sass/modules/_dialog.scss +5 -5
  25. package/sass/modules/_dropdown.scss +28 -56
  26. package/sass/modules/_form.scss +167 -39
  27. package/sass/modules/_list.scss +19 -17
  28. package/sass/modules/_loader.scss +36 -36
  29. package/sass/modules/_nav.scss +92 -67
  30. package/sass/modules/_pill.scss +9 -22
  31. package/sass/modules/_table.scss +4 -4
  32. package/sass/modules/_tabs.scss +34 -57
  33. package/sass/modules/_tag.scss +11 -23
  34. package/sass/modules/_tile.scss +7 -7
  35. package/sass/modules/_tooltip.scss +13 -11
  36. package/sass/modules/form/_checkbox.scss +20 -21
  37. package/sass/modules/form/_file.scss +30 -25
  38. package/sass/modules/form/_formFieldGroup.scss +25 -37
  39. package/sass/modules/form/_output.scss +1 -1
  40. package/sass/modules/form/_progress.scss +20 -33
  41. package/sass/modules/form/_radio.scss +15 -39
  42. package/sass/modules/form/_range.scss +76 -24
  43. package/sass/modules/form/_select.scss +5 -5
  44. package/sass/modules/form/_switch.scss +1 -1
  45. package/sass/modules/form/_text.scss +20 -17
  46. package/sass/modules/form/_textarea.scss +1 -1
  47. package/sass/modules/form/_toggle.scss +23 -52
  48. package/webpack.config.js +5 -22
  49. package/webpack.plugins.js +15 -0
  50. package/webpack.rules.js +8 -0
  51. package/images/block.svg +0 -3
  52. package/images/check.svg +0 -3
  53. package/images/chevron-down.svg +0 -1
  54. package/images/menu.svg +0 -3
  55. package/images/remove.svg +0 -3
  56. package/images/subdirectory.svg +0 -3
  57. package/images/upload.svg +0 -3
  58. package/sass/mixins/_borderRadius.scss +0 -79
  59. package/sass/mixins/_boxShadow.scss +0 -22
  60. package/sass/mixins/_colors.temp.scss +0 -89
  61. package/sass/mixins/_pill.scss +0 -14
  62. package/sass/mixins/_rfs.scss +0 -297
  63. package/sass/mixins/_tag.scss +0 -52
  64. package/sass/mixins/_transition.scss +0 -27
  65. package/sass/modules/_button.old.scss +0 -215
@@ -1,297 +0,0 @@
1
- // SCSS RFS mixin
2
- // Automated responsive values for font sizes, paddings, margins and much more
3
- // Licensed under MIT (https://github.com/twbs/rfs/blob/main/LICENSE)
4
-
5
- // Configuration
6
- @use "sass:map";
7
- @use "sass:math";
8
- @use "sass:meta";
9
- @use "sass:string";
10
- @use "./../functions" as *;
11
- @use "./../variables" as *;
12
-
13
- // Base value
14
- $rfs-base-value: 1.25rem !default;
15
- $rfs-unit: rem !default;
16
-
17
- @if $rfs-unit != rem and $rfs-unit != px {
18
- @error "`#{$rfs-unit}` is not a valid unit for $rfs-unit. Use `px` or `rem`.";
19
- }
20
-
21
- // Breakpoint at where values start decreasing if screen width is smaller
22
- $rfs-breakpoint: 1200px !default;
23
- $rfs-breakpoint-unit: px !default;
24
-
25
- @if $rfs-breakpoint-unit != px and $rfs-breakpoint-unit != em and $rfs-breakpoint-unit != rem {
26
- @error "`#{$rfs-breakpoint-unit}` is not a valid unit for $rfs-breakpoint-unit. Use `px`, `em` or `rem`.";
27
- }
28
-
29
- // Resize values based on screen height and width
30
- $rfs-two-dimensional: false !default;
31
-
32
- // Factor of decrease
33
- $rfs-factor: 10 !default;
34
-
35
- @if meta.type-of($rfs-factor) != number or $rfs-factor <= 1 {
36
- @error "`#{$rfs-factor}` is not a valid $rfs-factor, it must be greater than 1.";
37
- }
38
-
39
- // Mode. Possibilities: "min-media-query", "max-media-query"
40
- $rfs-mode: min-media-query !default;
41
-
42
- // Generate enable or disable classes. Possibilities: false, "enable" or "disable"
43
- $rfs-class: false !default;
44
-
45
- // 1 rem = $rfs-rem-value px
46
- $rfs-rem-value: 16 !default;
47
-
48
- // Safari iframe resize bug: https://github.com/twbs/rfs/issues/14
49
- $rfs-safari-iframe-resize-bug-fix: false !default;
50
-
51
- // Cache $rfs-base-value unit
52
- $rfs-base-value-unit: math.unit($rfs-base-value);
53
-
54
- // Remove px-unit from $rfs-base-value for calculations
55
- @if $rfs-base-value-unit == px {
56
- $rfs-base-value: divide($rfs-base-value, $rfs-base-value * 0 + 1);
57
- } @else if $rfs-base-value-unit == rem {
58
- $rfs-base-value: divide($rfs-base-value, divide($rfs-base-value * 0 + 1, $rfs-rem-value));
59
- }
60
-
61
- // Cache $rfs-breakpoint unit to prevent multiple calls
62
- $rfs-breakpoint-unit-cache: math.unit($rfs-breakpoint);
63
-
64
- // Remove unit from $rfs-breakpoint for calculations
65
- @if $rfs-breakpoint-unit-cache == px {
66
- $rfs-breakpoint: divide($rfs-breakpoint, $rfs-breakpoint * 0 + 1);
67
- } @else if $rfs-breakpoint-unit-cache == rem or $rfs-breakpoint-unit-cache == "em" {
68
- $rfs-breakpoint: divide($rfs-breakpoint, divide($rfs-breakpoint * 0 + 1, $rfs-rem-value));
69
- }
70
-
71
- // Calculate the media query value
72
- $rfs-mq-value: if(
73
- $rfs-breakpoint-unit == px,
74
- #{$rfs-breakpoint}px,
75
- #{divide($rfs-breakpoint, $rfs-rem-value)}#{$rfs-breakpoint-unit}
76
- );
77
- $rfs-mq-property-width: if($rfs-mode == max-media-query, max-width, min-width);
78
- $rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height);
79
-
80
- // Internal mixin used to determine which media query needs to be used
81
- @mixin rfs-media-query {
82
- @if $rfs-two-dimensional {
83
- @if $rfs-mode == max-media-query {
84
- @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}), (#{$rfs-mq-property-height}: #{$rfs-mq-value}) {
85
- @content;
86
- }
87
- } @else {
88
- @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) and (#{$rfs-mq-property-height}: #{$rfs-mq-value}) {
89
- @content;
90
- }
91
- }
92
- } @else {
93
- @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) {
94
- @content;
95
- }
96
- }
97
- }
98
-
99
- // Internal mixin that adds disable classes to the selector if needed.
100
- @mixin rfs-rule {
101
- @if $rfs-class == disable and $rfs-mode == max-media-query {
102
- // Adding an extra class increases specificity, which prevents the media query to override the property
103
- &,
104
- .disable-rfs &,
105
- &.disable-rfs {
106
- @content;
107
- }
108
- } @else if $rfs-class == enable and $rfs-mode == min-media-query {
109
- .enable-rfs &,
110
- &.enable-rfs {
111
- @content;
112
- }
113
- } @else {
114
- @content;
115
- }
116
- }
117
-
118
- // Internal mixin that adds enable classes to the selector if needed.
119
- @mixin rfs-media-query-rule {
120
- @if $rfs-class == enable {
121
- @if $rfs-mode == min-media-query {
122
- @content;
123
- }
124
-
125
- @include rfs-media-query {
126
- .enable-rfs &,
127
- &.enable-rfs {
128
- @content;
129
- }
130
- }
131
- } @else {
132
- @if $rfs-class == disable and $rfs-mode == min-media-query {
133
- .disable-rfs &,
134
- &.disable-rfs {
135
- @content;
136
- }
137
- }
138
-
139
- @include rfs-media-query {
140
- @content;
141
- }
142
- }
143
- }
144
-
145
- // Helper function to get the formatted non-responsive value
146
- @function rfs-value($values) {
147
- // Convert to list
148
- $values: if(meta.type-of($values) != list, ($values), $values);
149
- $val: "";
150
-
151
- // Loop over each value and calculate value
152
- @each $value in $values {
153
- @if $value == 0 {
154
- $val: $val + " 0";
155
- } @else {
156
- // Cache $value unit
157
- $unit: if(meta.type-of($value) == "number", math.unit($value), false);
158
-
159
- @if $unit == px {
160
- // Convert to rem if needed
161
- $val: $val + " " + if($rfs-unit == rem, #{divide($value, $value * 0 + $rfs-rem-value)}rem, $value);
162
- } @else if $unit == rem {
163
- // Convert to px if needed
164
- $val: $val + " " + if($rfs-unit == px, #{divide($value, $value * 0 + 1) * $rfs-rem-value}px, $value);
165
- } @else {
166
- // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
167
- $val: $val + " " + $value;
168
- }
169
- }
170
- }
171
-
172
- // Remove first space
173
- @return unquote(string.slice($val, 2));
174
- }
175
-
176
- // Helper function to get the responsive value calculated by RFS
177
- @function rfs-fluid-value($values) {
178
- // Convert to list
179
- $values: if(meta.type-of($values) != list, ($values), $values);
180
- $val: "";
181
-
182
- // Loop over each value and calculate value
183
- @each $value in $values {
184
- @if $value == 0 {
185
- $val: $val + " 0";
186
- } @else {
187
- // Cache $value unit
188
- $unit: if(meta.type-of($value) == "number", math.unit($value), false);
189
-
190
- // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
191
- @if not $unit or $unit != px and $unit != rem {
192
- $val: $val + " " + $value;
193
- } @else {
194
- // Remove unit from $value for calculations
195
- $value: divide($value, $value * 0 + if($unit == px, 1, divide(1, $rfs-rem-value)));
196
-
197
- // Only add the media query if the value is greater than the minimum value
198
- @if math.abs($value) <= $rfs-base-value or not $enable-rfs {
199
- $val: $val + " " + if($rfs-unit == rem, #{divide($value, $rfs-rem-value)}rem, #{$value}px);
200
- } @else {
201
- // Calculate the minimum value
202
- $value-min: $rfs-base-value + divide(math.abs($value) - $rfs-base-value, $rfs-factor);
203
-
204
- // Calculate difference between $value and the minimum value
205
- $value-diff: math.abs($value) - $value-min;
206
-
207
- // Base value formatting
208
- $min-width: if($rfs-unit == rem, #{divide($value-min, $rfs-rem-value)}rem, #{$value-min}px);
209
-
210
- // Use negative value if needed
211
- $min-width: if($value < 0, -$min-width, $min-width);
212
-
213
- // Use `vmin` if two-dimensional is enabled
214
- $variable-unit: if($rfs-two-dimensional, vmin, vw);
215
-
216
- // Calculate the variable width between 0 and $rfs-breakpoint
217
- $variable-width: #{divide($value-diff * 100, $rfs-breakpoint)}#{$variable-unit};
218
-
219
- // Return the calculated value
220
- $val: $val + " calc(" + $min-width + if($value < 0, " - ", " + ") + $variable-width + ")";
221
- }
222
- }
223
- }
224
- }
225
-
226
- // Remove first space
227
- @return unquote(string.slice($val, 2));
228
- }
229
-
230
- // RFS mixin
231
- @mixin rfs($values, $property: font-size) {
232
- @if $values {
233
- $val: rfs-value($values);
234
- $fluid-val: rfs-fluid-value($values);
235
-
236
- // Do not print the media query if responsive & non-responsive values are the same
237
- @if $val == $fluid-val {
238
- #{$property}: $val;
239
- } @else {
240
- @include rfs-rule {
241
- #{$property}: if($rfs-mode == max-media-query, $val, $fluid-val);
242
-
243
- // Include safari iframe resize fix if needed
244
- min-width: if($rfs-safari-iframe-resize-bug-fix, (0 * 1vw), null);
245
- }
246
-
247
- @include rfs-media-query-rule {
248
- #{$property}: if($rfs-mode == max-media-query, $fluid-val, $val);
249
- }
250
- }
251
- }
252
- }
253
-
254
- // Shorthand helper mixins
255
- @mixin font-size($value) {
256
- @include rfs($value);
257
- }
258
-
259
- @mixin padding($value) {
260
- @include rfs($value, padding);
261
- }
262
-
263
- @mixin padding-top($value) {
264
- @include rfs($value, padding-top);
265
- }
266
-
267
- @mixin padding-right($value) {
268
- @include rfs($value, padding-right);
269
- }
270
-
271
- @mixin padding-bottom($value) {
272
- @include rfs($value, padding-bottom);
273
- }
274
-
275
- @mixin padding-left($value) {
276
- @include rfs($value, padding-left);
277
- }
278
-
279
- @mixin margin($value) {
280
- @include rfs($value, margin);
281
- }
282
-
283
- @mixin margin-top($value) {
284
- @include rfs($value, margin-top);
285
- }
286
-
287
- @mixin margin-right($value) {
288
- @include rfs($value, margin-right);
289
- }
290
-
291
- @mixin margin-bottom($value) {
292
- @include rfs($value, margin-bottom);
293
- }
294
-
295
- @mixin margin-left($value) {
296
- @include rfs($value, margin-left);
297
- }
@@ -1,52 +0,0 @@
1
- @use "sass:color";
2
- @use "./../variables" as *;
3
- @use "./../functions" as *;
4
- @use "./../mixins/colors" as *;
5
- @use "./../mixins/gradient" as *;
6
-
7
- @mixin tag-variant($background, $lightness) {
8
- // @include make-background-color($value: $background, $title: "tag-");
9
-
10
- // @if $lightness < $lightness-value {
11
- // @include make-color($value: "white", $shade: 0, $title: "tag-");
12
- // } @else {
13
- // @include make-color($value: "dark", $shade: 0, $title: "tag-");
14
- // }
15
-
16
- // &.tag--link {
17
- // @include make-link-color("body-color", $shade: $link-shade-value, $title: "tag-");
18
-
19
- // cursor: pointer;
20
-
21
- // &:hover {
22
- // text-decoration: none;
23
- // }
24
- // }
25
- }
26
-
27
- // @mixin tag-variant(
28
- // $background,
29
- // $color,
30
- // $hover-background:
31
- // if(
32
- // $color == $color-contrast-light,
33
- // color.mix(black, $background, $button-hover-background-shade-amount),
34
- // color.mix(white, $background, $button-hover-background-tint-amount)
35
- // ),
36
- // $hover-color: color-contrast($hover-background)
37
- // ) {
38
- // color: $color;
39
-
40
- // @include gradient-background($background);
41
-
42
- // &.tag--link {
43
- // color: $color;
44
-
45
- // @include gradient-background($background);
46
-
47
- // &:hover {
48
- // color: $hover-color;
49
- // background-color: $hover-background;
50
- // }
51
- // }
52
- // }
@@ -1,27 +0,0 @@
1
- @use "./../variables" as *;
2
-
3
- @mixin transition($transition...) {
4
- @if length($transition) == 0 {
5
- $transition: $transition-base;
6
- }
7
-
8
- @if length($transition) > 1 {
9
- @each $value in $transition {
10
- @if not $value or $value == none {
11
- @warn "The keyword 'none' or 'null' must be used as a single argument.";
12
- }
13
- }
14
- }
15
-
16
- @if $enable-transitions {
17
- @if nth($transition, 1) {
18
- transition: $transition;
19
- }
20
-
21
- @if $enable-reduced-motion and nth($transition, 1) != null and nth($transition, 1) != none {
22
- @media (prefers-reduced-motion: reduce) {
23
- transition: none;
24
- }
25
- }
26
- }
27
- }
@@ -1,215 +0,0 @@
1
- @use "sass:color";
2
- @use "./../variables" as *;
3
- @use "./../functions" as *;
4
- @use "./../mixins" as *;
5
-
6
- .button {
7
- // --button-padding-x: #{$button-padding-x};
8
- // --button-padding-y: #{$button-padding-y};
9
- // --button-font-family: #{$button-font-family};
10
-
11
- // @include rfs($button-font-size, --button-font-size);
12
-
13
- // --button-font-weight: #{$button-font-weight};
14
- // --button-line-height: #{$button-line-height};
15
- // --button-color: #{$body-color};
16
- // --button-background: #{$button-background};
17
- // --button-border-width: #{$button-border-width};
18
- // --button-border-style: #{$button-border-style};
19
- // --button-border-color: #{$button-border-color};
20
- // --button-border-radius: #{$button-border-radius};
21
- --button-hover-border-color: #{$button-hover-border-color};
22
- --button-active-border-color: #{$button-active-border-color};
23
- --button-box-shadow: #{$button-box-shadow};
24
- --button-disabled-opacity: #{$button-disabled-opacity};
25
- --button-focus-box-shadow: 0 0 #{$input-button-focus-blur} #{$input-button-focus-width} var(--button-border-color);
26
-
27
- // --button-text-decoration: none;
28
- // --button-hover-text-decoration: none;
29
-
30
- // display: inline-flex;
31
- // padding: var(--button-padding-y) var(--button-padding-x);
32
- // font-family: var(--button-font-family);
33
-
34
- // @include font-size(var(--button-font-size));
35
-
36
- // font-weight: var(--button-font-weight);
37
- // line-height: var(--button-line-height);
38
- // color: var(--button-color);
39
- // text-align: center;
40
- // align-items: center;
41
- // justify-content: center;
42
- // text-decoration: var(--button-text-decoration);
43
- // white-space: $button-white-space;
44
- // vertical-align: middle;
45
- // cursor: if($enable-button-pointers, pointer, null);
46
- // user-select: none;
47
- // border: var(--button-border-width) var(--button-border-style) var(--button-border-color);
48
-
49
- @include border-radius(var(--button-border-radius));
50
- @include gradient-background(var(--button-background));
51
- @include box-shadow(var(--button-box-shadow));
52
- @include transition($button-transition);
53
-
54
- &:hover {
55
- color: var(--button-hover-color);
56
- text-decoration: var(--button-hover-text-decoration);
57
- background-color: var(--button-hover-background);
58
- border-color: var(--button-hover-border-color);
59
- }
60
-
61
- .button--switch + &:hover {
62
- color: var(--button-hover-color);
63
- text-decoration: var(--button-hover-text-decoration);
64
- background-color: var(--button-hover-background);
65
- border-color: var(--button-hover-border-color);
66
- }
67
-
68
- &:focus-visible {
69
- color: var(--button-hover-color);
70
-
71
- @include gradient-background(var(--button-hover-background));
72
-
73
- border-color: var(--button-hover-border-color);
74
- outline: 0;
75
-
76
- @if $enable-shadows {
77
- box-shadow: var(--button-box-shadow), var(--button-focus-box-shadow);
78
- } @else {
79
- box-shadow: var(--button-focus-box-shadow);
80
- }
81
- }
82
-
83
- .button--switch:focus-visible + & {
84
- border-color: var(--button-hover-border-color);
85
- outline: 0;
86
-
87
- @if $enable-shadows {
88
- box-shadow: var(--button-box-shadow), var(--button-focus-box-shadow);
89
- } @else {
90
- box-shadow: var(--button-focus-box-shadow);
91
- }
92
- }
93
-
94
- .button--switch:checked + &,
95
- :not(.button--switch) + &:active,
96
- &:first-child:active,
97
- &.active,
98
- &.show {
99
- color: var(--button-active-color);
100
- background-color: var(--button-active-background);
101
- background-image: if($enable-gradients, none, null);
102
- border-color: var(--button-active-border-color);
103
-
104
- @include box-shadow(var(--button-active-shadow));
105
-
106
- &:focus-visible {
107
- @if $enable-shadows {
108
- box-shadow: var(--button-active-shadow), var(--button-focus-box-shadow);
109
- } @else {
110
- box-shadow: var(--button-focus-box-shadow);
111
- }
112
- }
113
- }
114
-
115
- &:disabled,
116
- &.disabled,
117
- fieldset:disabled & {
118
- color: var(--button-disabled-color);
119
- pointer-events: none;
120
- background-color: var(--button-disabled-background);
121
- background-image: if($enable-gradients, none, null);
122
- border-color: var(--button-disabled-border-color);
123
- opacity: var(--button-disabled-opacity);
124
-
125
- @include box-shadow(none);
126
- }
127
-
128
- &.button--outline {
129
- @include button-outline-variant($body-color);
130
- }
131
-
132
- &.button--link {
133
- @include button-link-variant($body-color);
134
- }
135
-
136
- &.button--unstyled {
137
- @include button-unstyled-variant($body-color);
138
- }
139
- }
140
-
141
- // Alternate buttons
142
-
143
- @each $color, $value in $all-colors {
144
- .button.button--#{$color} {
145
- @if $color == "light" {
146
- @include button-variant(
147
- $value,
148
- $button-border-color,
149
- $hover-background: color.mix(black, $value, $button-hover-background-shade-amount),
150
- $hover-border: color.mix(black, $value, $button-hover-border-shade-amount),
151
- $active-background: color.mix(black, $value, $button-active-background-shade-amount),
152
- $active-border: color.mix(black, $value, $button-active-border-shade-amount)
153
- );
154
- } @else if $color == "dark" {
155
- @include button-variant(
156
- $value,
157
- $button-border-color,
158
- $hover-background: color.mix(white, $value, $button-hover-background-tint-amount),
159
- $hover-border: color.mix(white, $value, $button-hover-border-tint-amount),
160
- $active-background: color.mix(white, $value, $button-active-background-tint-amount),
161
- $active-border: color.mix(white, $value, $button-active-border-tint-amount)
162
- );
163
- } @else {
164
- @include button-variant($value, $button-border-color);
165
- }
166
-
167
- &.button--outline {
168
- @include button-outline-variant($value);
169
- }
170
-
171
- &.button--link {
172
- @include button-link-variant($value);
173
- }
174
-
175
- &.button--unstyled {
176
- @include button-unstyled-variant($value);
177
- }
178
- }
179
- }
180
-
181
- // Button Sizes
182
-
183
- .button--large {
184
- @include button-size(
185
- $button-padding-y-large,
186
- $button-padding-x-large,
187
- $button-font-size-large,
188
- $button-border-radius-large
189
- );
190
-
191
- &.button--unstyled {
192
- @include button-size(0, 0, $button-font-size-large, 0);
193
- }
194
- }
195
-
196
- .button--small {
197
- @include button-size(
198
- $button-padding-y-small,
199
- $button-padding-x-small,
200
- $button-font-size-small,
201
- $button-border-radius-small
202
- );
203
-
204
- &.button--unstyled {
205
- @include button-size(0, 0, $button-font-size-small, 0);
206
- }
207
- }
208
-
209
- .buttons {
210
- @include make-group-row;
211
-
212
- &.buttons--grouped {
213
- @include make-grouped-row(".button");
214
- }
215
- }