claritas-web-framework 8.0.53 → 8.1.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 (73) hide show
  1. package/.stylelintrc.json +2 -0
  2. package/dist/index.css +1 -1
  3. package/package.json +13 -13
  4. package/sass/_functions.scss +15 -2
  5. package/sass/_helpers.scss +6 -0
  6. package/sass/_mixins.scss +11 -0
  7. package/sass/_modules.scss +30 -0
  8. package/sass/_reboot.scss +17 -4
  9. package/sass/_root.scss +7 -0
  10. package/sass/_utilities.scss +16 -0
  11. package/sass/_variables.scss +2 -18
  12. package/sass/helpers/_container.scss +3 -0
  13. package/sass/helpers/_embed.scss +1 -0
  14. package/sass/helpers/_grid.scss +11 -0
  15. package/sass/helpers/_link.scss +1 -0
  16. package/sass/helpers/_screenReader.scss +2 -0
  17. package/sass/helpers/_wrap.scss +1 -0
  18. package/sass/index.scss +7 -0
  19. package/sass/mixins/_breakpoints.scss +36 -6
  20. package/sass/mixins/_button.scss +1 -15
  21. package/sass/mixins/_caret.scss +5 -1
  22. package/sass/mixins/_clearfix.scss +1 -0
  23. package/sass/mixins/_colors.scss +1 -0
  24. package/sass/mixins/_container.scss +3 -0
  25. package/sass/mixins/_gradient.scss +2 -0
  26. package/sass/mixins/_grid.scss +24 -1
  27. package/sass/mixins/_group.scss +7 -1
  28. package/sass/mixins/_list.scss +6 -1
  29. package/sass/mixins/_screenReader.scss +1 -0
  30. package/sass/modules/_alert.scss +4 -1
  31. package/sass/modules/_breadcrumbs.scss +3 -0
  32. package/sass/modules/_button.scss +12 -6
  33. package/sass/modules/_card.scss +9 -1
  34. package/sass/modules/_close.scss +1 -0
  35. package/sass/modules/_details.scss +6 -1
  36. package/sass/modules/_dialog.scss +1 -0
  37. package/sass/modules/_dropdown.scss +2 -0
  38. package/sass/modules/_form.scss +11 -12
  39. package/sass/modules/_list.scss +13 -2
  40. package/sass/modules/_loader.scss +10 -0
  41. package/sass/modules/_modal.scss +1 -0
  42. package/sass/modules/_nav.scss +3 -3
  43. package/sass/modules/_pill.scss +6 -0
  44. package/sass/modules/_table.scss +17 -0
  45. package/sass/modules/_tabs.scss +5 -1
  46. package/sass/modules/_tag.scss +7 -0
  47. package/sass/modules/_tile.scss +7 -1
  48. package/sass/modules/_tooltip.scss +5 -0
  49. package/sass/modules/form/_checkbox.scss +5 -0
  50. package/sass/modules/form/_file.scss +10 -0
  51. package/sass/modules/form/_formFieldGroup.scss +2 -2
  52. package/sass/modules/form/_progress.scss +1 -0
  53. package/sass/modules/form/_radio.scss +5 -0
  54. package/sass/modules/form/_range.scss +20 -3
  55. package/sass/modules/form/_select.scss +1 -0
  56. package/sass/modules/form/_switch.scss +4 -0
  57. package/sass/modules/form/_text.scss +0 -3
  58. package/sass/modules/form/_toggle.scss +3 -0
  59. package/sass/utilities/_align.scss +3 -0
  60. package/sass/utilities/_border.scss +1 -0
  61. package/sass/utilities/_colors.scss +17 -0
  62. package/sass/utilities/_display.scss +3 -0
  63. package/sass/utilities/_flex.scss +2 -0
  64. package/sass/utilities/_float.scss +2 -0
  65. package/sass/utilities/_order.scss +2 -0
  66. package/sass/utilities/_overflow.scss +2 -0
  67. package/sass/utilities/_pointerEvents.scss +2 -0
  68. package/sass/utilities/_position.scss +2 -0
  69. package/sass/utilities/_size.scss +3 -0
  70. package/sass/utilities/_spacing.scss +2 -0
  71. package/sass/utilities/_typography.scss +2 -0
  72. package/sass/utilities/_visibility.scss +2 -0
  73. package/sass/utilities/_zIndex.scss +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claritas-web-framework",
3
- "version": "8.0.53",
3
+ "version": "8.1.0",
4
4
  "description": "The CSS framework built for Claritas front end.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,23 +17,23 @@
17
17
  "author": "David Brooks",
18
18
  "license": "UNLICENSED",
19
19
  "devDependencies": {
20
- "css-loader": "^6.10.0",
21
- "find-unused-sass-variables": "^5.0.0",
20
+ "css-loader": "^7.1.1",
21
+ "find-unused-sass-variables": "^6.0.0",
22
22
  "html-webpack-plugin": "^5.6.0",
23
- "mini-css-extract-plugin": "^2.8.0",
24
- "prettier": "^3.2.4",
25
- "sass": "^1.70.0",
26
- "sass-loader": "^14.1.0",
27
- "stylelint": "^16.2.1",
23
+ "mini-css-extract-plugin": "^2.9.0",
24
+ "prettier": "^3.2.5",
25
+ "sass-loader": "^14.2.1",
26
+ "stylelint": "^16.5.0",
28
27
  "stylelint-config-standard": "^36.0.0",
29
- "stylelint-config-standard-scss": "^13.0.0",
30
- "stylelint-scss": "^6.1.0",
31
- "webpack": "^5.90.1",
28
+ "stylelint-config-standard-scss": "^13.1.0",
29
+ "stylelint-scss": "^6.2.1",
30
+ "webpack": "^5.91.0",
32
31
  "webpack-cli": "^5.1.4",
33
- "webpack-dev-server": "^4.15.1"
32
+ "webpack-dev-server": "^5.0.4"
34
33
  },
35
34
  "dependencies": {
36
35
  "modern-normalize": "^2.0.0",
37
- "rfs": "^10.0.0"
36
+ "rfs": "^10.0.0",
37
+ "sass": "^1.76.0"
38
38
  }
39
39
  }
@@ -1,5 +1,7 @@
1
1
  @use "sass:color";
2
+
2
3
  @use "sass:math";
4
+
3
5
  @use "sass:string";
4
6
 
5
7
  @use "./variables" as *;
@@ -13,6 +15,7 @@
13
15
  // @param {String} $search - Substring to replace
14
16
  // @param {String} $replace ('') - New value
15
17
  // @return {String} - Updated string
18
+
16
19
  @function str-replace($string, $search, $replace: "") {
17
20
  $index: string.index($string, $search);
18
21
 
@@ -27,13 +30,19 @@
27
30
 
28
31
  // See https://codepen.io/kevinweber/pen/dXWoRw
29
32
  // Requires the use of quotes around data URIs.
33
+
30
34
  @function escape-svg($string) {
35
+
31
36
  @if string.index($string, "data:image/svg+xml") {
37
+
32
38
  @each $char, $encoded in $escaped-characters {
33
39
  // Do not escape the url brackets
40
+
34
41
  @if string.index($string, "url(") == 1 {
35
42
  $string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}");
36
- } @else {
43
+ }
44
+
45
+ @else {
37
46
  $string: str-replace($string, $char, $encoded);
38
47
  }
39
48
  }
@@ -46,8 +55,12 @@
46
55
  $color-sum: math.max(color.lightness($value), 0%);
47
56
 
48
57
  @if $color-sum > $threshold {
58
+
49
59
  @return hsl(var(--dark-h) var(--dark-s) var(--dark-l) / $opacity);
50
- } @else {
60
+ }
61
+
62
+ @else {
63
+
51
64
  @return hsl(var(--white-h) var(--white-s) var(--white-l) / $opacity);
52
65
  }
53
66
  }
@@ -1,7 +1,13 @@
1
1
  @forward "./helpers/container";
2
+
2
3
  @forward "./helpers/embed";
4
+
3
5
  @forward "./helpers/grid";
6
+
4
7
  @forward "./helpers/image";
8
+
5
9
  @forward "./helpers/link";
10
+
6
11
  @forward "./helpers/screenReader";
12
+
7
13
  @forward "./helpers/wrap";
package/sass/_mixins.scss CHANGED
@@ -1,12 +1,23 @@
1
1
  @forward "./mixins/breakpoints";
2
+
2
3
  @forward "./mixins/button";
4
+
3
5
  @forward "./mixins/caret";
6
+
4
7
  @forward "./mixins/clearfix";
8
+
5
9
  @forward "./mixins/colors";
10
+
6
11
  @forward "./mixins/container";
12
+
7
13
  @forward "./mixins/gradient";
14
+
8
15
  @forward "./mixins/grid";
16
+
9
17
  @forward "./mixins/group";
18
+
10
19
  @forward "./mixins/list";
20
+
11
21
  @forward "./mixins/screenReader";
22
+
12
23
  @forward "./mixins/wrap";
@@ -1,31 +1,61 @@
1
1
  @forward "./modules/alert";
2
+
2
3
  @forward "./modules/breadcrumbs";
4
+
3
5
  @forward "./modules/button";
6
+
4
7
  @forward "./modules/card";
8
+
5
9
  @forward "./modules/close";
10
+
6
11
  @forward "./modules/details";
12
+
7
13
  @forward "./modules/dialog";
14
+
8
15
  @forward "./modules/dropdown";
16
+
9
17
  @forward "./modules/form";
18
+
10
19
  @forward "./modules/form/formFieldGroup";
20
+
11
21
  @forward "./modules/form/checkbox";
22
+
12
23
  @forward "./modules/form/file";
24
+
13
25
  @forward "./modules/form/output";
26
+
14
27
  @forward "./modules/form/progress";
28
+
15
29
  @forward "./modules/form/radio";
30
+
16
31
  @forward "./modules/form/range";
32
+
17
33
  @forward "./modules/form/select";
34
+
18
35
  @forward "./modules/form/switch";
36
+
19
37
  @forward "./modules/form/text";
38
+
20
39
  @forward "./modules/form/textarea";
40
+
21
41
  @forward "./modules/form/toggle";
42
+
22
43
  @forward "./modules/list";
44
+
23
45
  @forward "./modules/loader";
46
+
24
47
  @forward "./modules/modal";
48
+
25
49
  @forward "./modules/nav";
50
+
26
51
  @forward "./modules/pill";
52
+
27
53
  @forward "./modules/table";
54
+
28
55
  @forward "./modules/tabs";
56
+
29
57
  @forward "./modules/tag";
58
+
30
59
  @forward "./modules/tile";
60
+
31
61
  @forward "./modules/tooltip";
package/sass/_reboot.scss CHANGED
@@ -1,7 +1,9 @@
1
1
  @use "sass:color";
2
2
 
3
3
  @use "rfs/scss" as *;
4
+
4
5
  @use "./variables" as *;
6
+
5
7
  @use "./mixins" as *;
6
8
 
7
9
  body {
@@ -35,37 +37,49 @@ hr {
35
37
 
36
38
  h1,
37
39
  .h1 {
40
+
38
41
  @extend %heading;
42
+
39
43
  font-size: var(--font-size-1);
40
44
  }
41
45
 
42
46
  h2,
43
47
  .h2 {
48
+
44
49
  @extend %heading;
50
+
45
51
  font-size: var(--font-size-2);
46
52
  }
47
53
 
48
54
  h3,
49
55
  .h3 {
56
+
50
57
  @extend %heading;
58
+
51
59
  font-size: var(--font-size-3);
52
60
  }
53
61
 
54
62
  h4,
55
63
  .h4 {
64
+
56
65
  @extend %heading;
66
+
57
67
  font-size: var(--font-size-4);
58
68
  }
59
69
 
60
70
  h5,
61
71
  .h5 {
72
+
62
73
  @extend %heading;
74
+
63
75
  font-size: var(--font-size-5);
64
76
  }
65
77
 
66
78
  h6,
67
79
  .h6 {
80
+
68
81
  @extend %heading;
82
+
69
83
  font-size: var(--font-size-6);
70
84
  }
71
85
 
@@ -121,7 +135,8 @@ a {
121
135
  }
122
136
  }
123
137
 
124
- a:not([href]):not([class]) {
138
+ a:not([href], [class]) {
139
+
125
140
  &,
126
141
  &:hover {
127
142
  color: inherit;
@@ -187,9 +202,7 @@ select {
187
202
  }
188
203
  }
189
204
 
190
- [list]:not([type="date"]):not([type="datetime-local"]):not([type="month"]):not([type="week"]):not(
191
- [type="time"]
192
- )::-webkit-calendar-picker-indicator {
205
+ [list]:not([type="date"], [type="datetime-local"], [type="month"], [type="week"], [type="time"])::-webkit-calendar-picker-indicator {
193
206
  display: none !important;
194
207
  }
195
208
 
package/sass/_root.scss CHANGED
@@ -1,12 +1,16 @@
1
1
  @use "./variables" as *;
2
+
2
3
  @use "./mixins/colors" as *;
3
4
 
4
5
  :root {
6
+
5
7
  @if $font-size-root {
8
+
6
9
  @include font-size(var(--root-font-size));
7
10
  }
8
11
 
9
12
  @if $enable-smooth-scroll {
13
+
10
14
  @media (prefers-reduced-motion: no-preference) {
11
15
  scroll-behavior: smooth;
12
16
  }
@@ -27,14 +31,17 @@
27
31
  --border-color-hover-main: #{$border-color-hover-main};
28
32
 
29
33
  @each $key, $value in $grays {
34
+
30
35
  @include define-color-variables($key, $value);
31
36
  }
32
37
 
33
38
  @each $key, $value in $all-colors {
39
+
34
40
  @include define-color-variables($key, $value);
35
41
  }
36
42
 
37
43
  @include define-color-variables($title: "body-color", $color: $body-color);
44
+
38
45
  @include define-color-variables($title: "border-color-main", $color: $border-color-main);
39
46
 
40
47
  @each $key, $value in $zindexes {
@@ -1,17 +1,33 @@
1
1
  @forward "./utilities/align";
2
+
2
3
  @forward "./utilities/border";
4
+
3
5
  @forward "./utilities/colors";
6
+
4
7
  @forward "./utilities/display";
8
+
5
9
  @forward "./utilities/flex";
10
+
6
11
  @forward "./utilities/float";
12
+
7
13
  @forward "./utilities/order";
14
+
8
15
  @forward "./utilities/overflow";
16
+
9
17
  @forward "./utilities/pointerEvents";
18
+
10
19
  @forward "./utilities/position";
20
+
11
21
  @forward "./utilities/shadow";
22
+
12
23
  @forward "./utilities/size";
24
+
13
25
  @forward "./utilities/spacing";
26
+
14
27
  @forward "./utilities/translate";
28
+
15
29
  @forward "./utilities/typography";
30
+
16
31
  @forward "./utilities/visibility";
32
+
17
33
  @forward "./utilities/zIndex";
@@ -1,5 +1,7 @@
1
1
  @use "sass:map";
2
+
2
3
  @use "sass:color";
4
+
3
5
  @use "sass:math";
4
6
 
5
7
  /* --------------------------------- options -------------------------------- */
@@ -19,7 +21,6 @@ $gray-7: #4d5055 !default;
19
21
  $gray-8: #30353a !default;
20
22
  $gray-9: #14191f !default;
21
23
  $black: #000 !default;
22
-
23
24
  $grays: (
24
25
  "gray-1": $gray-1,
25
26
  "gray-2": $gray-2,
@@ -31,7 +32,6 @@ $grays: (
31
32
  "gray-8": $gray-8,
32
33
  "gray-9": $gray-9
33
34
  ) !default;
34
-
35
35
  $blue: #0d6efd !default;
36
36
  $indigo: #6610f2 !default;
37
37
  $purple: #6f42c1 !default;
@@ -42,7 +42,6 @@ $yellow: #ffc107 !default;
42
42
  $green: #198754 !default;
43
43
  $teal: #20c997 !default;
44
44
  $cyan: #0dcaf0 !default;
45
-
46
45
  $colors: (
47
46
  "blue": $blue,
48
47
  "indigo": $indigo,
@@ -57,7 +56,6 @@ $colors: (
57
56
  "white": $white,
58
57
  "black": $black
59
58
  ) !default;
60
-
61
59
  $primary: $blue !default;
62
60
  $secondary: $gray-6 !default;
63
61
  $success: $green !default;
@@ -67,7 +65,6 @@ $danger: $red !default;
67
65
  $light: $gray-1 !default;
68
66
  $medium: $gray-6 !default;
69
67
  $dark: $gray-8 !default;
70
-
71
68
  $theme-colors: (
72
69
  "primary": $primary,
73
70
  "secondary": $secondary,
@@ -79,12 +76,9 @@ $theme-colors: (
79
76
  "medium": $medium,
80
77
  "dark": $dark
81
78
  ) !default;
82
-
83
79
  $all-colors: map.merge($colors, $theme-colors) !default;
84
-
85
80
  $color-flip-threshold: 50% !default;
86
81
  $color-flip-l: 35% !default;
87
-
88
82
  $color-disabled-alpha: 65% !default;
89
83
 
90
84
  /* ---------------------------------- Misc ---------------------------------- */
@@ -100,7 +94,6 @@ $spacers: (
100
94
  4: $spacer * 1.5,
101
95
  5: $spacer * 3
102
96
  ) !default;
103
-
104
97
  $gutters: $spacers !default;
105
98
 
106
99
  /* ---------------------------------- links --------------------------------- */
@@ -123,7 +116,6 @@ $breakpoints: (
123
116
  "widescreen": 1216px,
124
117
  "fullhd": 1408px
125
118
  ) !default;
126
-
127
119
  $container-max-widths: (
128
120
  "mobile": 516px,
129
121
  "tablet": 708px,
@@ -131,7 +123,6 @@ $container-max-widths: (
131
123
  "widescreen": 1156px,
132
124
  "fullhd": 1348px
133
125
  ) !default;
134
-
135
126
  $grid-columns: 12 !default;
136
127
  $grid-gutter: calc($spacer * 1.5) !default;
137
128
  $grid-gutter-tight: calc($spacer * 0.75) !default;
@@ -140,17 +131,14 @@ $grid-gutter-tight: calc($spacer * 0.75) !default;
140
131
  $font-size-root: null !default;
141
132
  $font-size-base: $spacer !default;
142
133
  $line-height-base: 1.5 !default;
143
-
144
134
  $font-size-6: $font-size-base !default;
145
135
  $font-size-5: calc($font-size-base * 1.125) !default;
146
136
  $font-size-4: calc(($font-size-base * 1.275) + 0.3vw) !default;
147
137
  $font-size-3: calc(($font-size-base * 1.3) + 0.6vw) !default;
148
138
  $font-size-2: calc(($font-size-base * 1.325) + 0.9vw) !default;
149
139
  $font-size-1: calc(($font-size-base * 1.375) + 1.5vw) !default;
150
-
151
140
  $font-size-xsmall: 0.675em !default;
152
141
  $font-size-small: 0.875em !default;
153
-
154
142
  $font-sizes: (
155
143
  1: $font-size-1,
156
144
  2: $font-size-2,
@@ -175,7 +163,6 @@ $font-family-sans-serif:
175
163
  $font-family-serif: cambria, "Hoefler Text", utopia, serif !default;
176
164
  $font-family-monospace: sfmono-regular, menlo, monaco, consolas, monospace !default;
177
165
  $font-family-base: $font-family-sans-serif !default;
178
-
179
166
  $font-families: (
180
167
  "sans-serif": $font-family-sans-serif,
181
168
  "serif": $font-family-serif,
@@ -315,7 +302,6 @@ $form-file-indicator-color: rgba($body-color, 25%) !default;
315
302
  $form-file-indicator-hover-color: rgba($body-color, 50%) !default;
316
303
  $form-file-indicator: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='#{$form-file-indicator-color}' stroke='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z'/></svg>") !default;
317
304
  $form-file-indicator-hover: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='#{$form-file-indicator-hover-color}' stroke='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z'/></svg>") !default;
318
-
319
305
  $form-transition:
320
306
  color 0.15s ease-in-out,
321
307
  background-color 0.15s ease-in-out,
@@ -385,10 +371,8 @@ $button-border-radius: $input-button-border-radius !default;
385
371
  $button-large-border-radius: $input-button-large-border-radius !default;
386
372
  $button-small-border-radius: $input-button-small-border-radius !default;
387
373
  $button-round-border-radius: $input-button-round-border-radius !default;
388
-
389
374
  $button-color-flip-threshold: 60% !default;
390
375
  $button-color-flip-l: 35% !default;
391
-
392
376
  $button-disabled-border-alpha: 35% !default;
393
377
  $button-disabled-background-alpha: $color-disabled-alpha !default;
394
378
  $button-hover-background-alpha: 10% !default;
@@ -1,11 +1,14 @@
1
1
  @use "./../variables" as *;
2
+
2
3
  @use "./../mixins/container" as *;
3
4
 
4
5
  .container,
5
6
  .container--fluid {
7
+
6
8
  @include make-container;
7
9
  }
8
10
 
9
11
  .container {
12
+
10
13
  @include make-container-max-widths($container-max-widths, $breakpoints);
11
14
  }
@@ -29,6 +29,7 @@
29
29
 
30
30
  @each $key, $value in $embeds {
31
31
  .embed--#{$key} {
32
+
32
33
  &::before {
33
34
  padding-top: $value !important;
34
35
  }
@@ -1,34 +1,44 @@
1
1
  @use "sass:map";
2
+
2
3
  @use "sass:math";
3
4
 
4
5
  @use "./../variables" as *;
6
+
5
7
  @use "./../mixins/breakpoints" as *;
8
+
6
9
  @use "./../mixins/grid" as *;
7
10
 
8
11
  // Row
9
12
  // Rows contain your columns.
13
+
10
14
  :root {
15
+
11
16
  @each $name, $value in $breakpoints {
12
17
  --breakpoint-#{$name}: #{$value};
13
18
  }
14
19
  }
15
20
 
16
21
  .grid {
22
+
17
23
  @include make-row;
18
24
  }
19
25
 
20
26
  .grid--tight {
27
+
21
28
  @include make-row($grid-gutter-tight);
22
29
  }
23
30
 
24
31
  .grid,
25
32
  .grid--tight {
33
+
26
34
  > * {
35
+
27
36
  @include make-col-ready;
28
37
  }
29
38
  }
30
39
 
31
40
  @if $enable-cssgrid {
41
+
32
42
  .g-grid {
33
43
  gap: var(--gap, #{$grid-gutter});
34
44
  }
@@ -49,4 +59,5 @@
49
59
 
50
60
  // Columns
51
61
  // Common styles for small and large grid columns
62
+
52
63
  @include make-grid-columns;
@@ -1,4 +1,5 @@
1
1
  .link--stretched {
2
+
2
3
  &::after,
3
4
  &::before {
4
5
  position: absolute;
@@ -1,9 +1,11 @@
1
1
  @use "./../mixins/screenReader" as *;
2
2
 
3
3
  .screen-reader {
4
+
4
5
  @include make-screen-reader(false);
5
6
  }
6
7
 
7
8
  .screen-reader--focusable {
9
+
8
10
  @include make-screen-reader(true);
9
11
  }
@@ -1,5 +1,6 @@
1
1
  @use "./../mixins/wrap" as *;
2
2
 
3
3
  .wrap--overflow {
4
+
4
5
  @include make-wrap-overflow;
5
6
  }
package/sass/index.scss CHANGED
@@ -1,10 +1,17 @@
1
1
  @forward "./variables";
2
+
2
3
  @forward "./functions";
4
+
3
5
  @forward "./mixins";
6
+
4
7
  @forward "./helpers";
8
+
5
9
  @forward "./utilities";
10
+
6
11
  @forward "./modules";
12
+
7
13
  @forward "./reboot";
14
+
8
15
  @forward "./root";
9
16
 
10
17
  @import "modern-normalize/modern-normalize.css";