@newhighsco/chipset 6.23.1 → 6.24.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newhighsco/chipset",
3
3
  "description": "Shareable, theme-able component library by New High Score",
4
- "version": "6.23.1",
4
+ "version": "6.24.1",
5
5
  "author": "New High Score",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -50,11 +50,11 @@
50
50
  "@newhighsco/browserslist-config": "2.0.0",
51
51
  "@newhighsco/commitlint-config": "1.1.46",
52
52
  "@newhighsco/editor-config": "1.2.0",
53
- "@newhighsco/eslint-config": "4.2.1",
54
- "@newhighsco/postcss-config": "3.5.350",
53
+ "@newhighsco/eslint-config": "4.2.2",
54
+ "@newhighsco/postcss-config": "3.5.351",
55
55
  "@newhighsco/prettier-config": "2.1.32",
56
56
  "@newhighsco/release-config": "1.4.13",
57
- "@newhighsco/storybook-preset": "8.1.1",
57
+ "@newhighsco/storybook-preset": "8.1.2",
58
58
  "@newhighsco/stylelint-config": "4.0.18",
59
59
  "@newhighsco/svgr-config": "1.0.0",
60
60
  "@omlet/cli": "2.0.0",
@@ -63,7 +63,7 @@
63
63
  "@testing-library/jest-dom": "6.8.0",
64
64
  "@testing-library/react": "16.3.0",
65
65
  "babel-loader": "10.0.0",
66
- "chromatic": "13.1.5",
66
+ "chromatic": "13.2.0",
67
67
  "concurrently": "9.2.1",
68
68
  "eslint": "8.57.1",
69
69
  "husky": "9.1.7",
@@ -76,7 +76,7 @@
76
76
  "react": "19.1.1",
77
77
  "react-dom": "19.1.1",
78
78
  "sass-true": "9.0.0",
79
- "semantic-release": "24.2.8",
79
+ "semantic-release": "24.2.9",
80
80
  "storybook": "9.1.7",
81
81
  "stylelint": "16.24.0",
82
82
  "webpack": "5.101.3"
@@ -113,6 +113,16 @@
113
113
  "stylelint": {
114
114
  "extends": [
115
115
  "@newhighsco/stylelint-config"
116
+ ],
117
+ "overrides": [
118
+ {
119
+ "files": [
120
+ "**/*.spec.*"
121
+ ],
122
+ "rules": {
123
+ "number-max-precision": null
124
+ }
125
+ }
116
126
  ]
117
127
  }
118
128
  }
@@ -1,5 +1,5 @@
1
- @use '../../../styles/mixins/visually-hidden' as *;
1
+ @use '../../../styles/mixins/a11y';
2
2
 
3
3
  .root {
4
- @include visually-hidden;
4
+ @include a11y.visually-hidden;
5
5
  }
@@ -8,3 +8,12 @@
8
8
  overflow: hidden !important;
9
9
  clip-path: rect(0 0 0 0) !important;
10
10
  }
11
+
12
+ @mixin visually-unhidden {
13
+ position: static !important;
14
+ height: auto !important;
15
+ width: 1px !important;
16
+ margin: 0 !important;
17
+ overflow: visible !important;
18
+ clip-path: none !important;
19
+ }
@@ -1,6 +1,7 @@
1
1
  @use 'sass:list';
2
2
  @use 'sass:math';
3
3
  @use 'sass:map';
4
+ @use './a11y';
4
5
 
5
6
  // DEFAULT VARIABLES
6
7
 
@@ -47,7 +48,7 @@ $fraction-names: whole half third quarter fifth sixth seventh eighth ninth tenth
47
48
  margin-left: -($grid-modifier--gutter);
48
49
 
49
50
  & > .item {
50
- padding-left: _grid-gutter--item($grid-modifier--gutter);
51
+ padding-left: -grid-gutter($grid-modifier--gutter);
51
52
  }
52
53
  }
53
54
 
@@ -58,7 +59,7 @@ $fraction-names: whole half third quarter fifth sixth seventh eighth ninth tenth
58
59
  // Reverses the rendered layout of the `grid__item`s
59
60
 
60
61
  @mixin reverse($namespace: '') {
61
- $namespace: _namespace-suffix($namespace, 'reverse');
62
+ $namespace: -namespace-suffix($namespace, 'reverse');
62
63
 
63
64
  /*! purgecss start ignore */
64
65
  .root#{$namespace} {
@@ -78,9 +79,9 @@ $fraction-names: whole half third quarter fifth sixth seventh eighth ninth tenth
78
79
  // Sets up grid width styles
79
80
 
80
81
  @mixin widths($namespace, $columns) {
81
- $namespace: _namespace-suffix($namespace);
82
+ $namespace: -namespace-suffix($namespace);
82
83
 
83
- @include _grid($namespace, $columns, 'width');
84
+ @include -grid($namespace, $columns, 'width');
84
85
  }
85
86
 
86
87
  // GRID FLEXBOX
@@ -93,6 +94,17 @@ $fraction-names: whole half third quarter fifth sixth seventh eighth ninth tenth
93
94
  }
94
95
  }
95
96
 
97
+ @mixin hidden($namespace: '') {
98
+ $namespace: -namespace-suffix($namespace, 'hidden');
99
+
100
+ /*! purgecss start ignore */
101
+ .item#{$namespace} {
102
+ @include a11y.visually-hidden;
103
+ }
104
+
105
+ /*! purgecss end ignore */
106
+ }
107
+
96
108
  // GRID VERTICAL ALIGNMENTS
97
109
  // Sets up grid vertical-align styles
98
110
 
@@ -104,7 +116,7 @@ $fraction-names: whole half third quarter fifth sixth seventh eighth ninth tenth
104
116
  );
105
117
 
106
118
  @each $align in $aligns {
107
- $namespace: _namespace-suffix('valign', $align);
119
+ $namespace: -namespace-suffix('valign', $align);
108
120
 
109
121
  /*! purgecss start ignore */
110
122
  .root#{$namespace} {
@@ -125,8 +137,7 @@ $fraction-names: whole half third quarter fifth sixth seventh eighth ninth tenth
125
137
  // These mixins should not be called directly,
126
138
  // instead are used as helpers within other mixins
127
139
 
128
- /* stylelint-disable-next-line scss/at-mixin-pattern */
129
- @mixin _grid($namespace, $columns, $property) {
140
+ @mixin -grid($namespace, $columns, $property) {
130
141
  $columns-length: list.length($columns);
131
142
 
132
143
  @for $i from 1 through $columns-length {
@@ -146,8 +157,7 @@ $fraction-names: whole half third quarter fifth sixth seventh eighth ninth tenth
146
157
  }
147
158
  }
148
159
 
149
- /* stylelint-disable-next-line scss/at-function-pattern */
150
- @function _grid-gutter--item($g) {
160
+ @function -grid-gutter($g) {
151
161
  @if math.unit($g) == '%' {
152
162
  $scale: math.div(100, 100 + $g);
153
163
 
@@ -157,8 +167,7 @@ $fraction-names: whole half third quarter fifth sixth seventh eighth ninth tenth
157
167
  }
158
168
  }
159
169
 
160
- /* stylelint-disable-next-line scss/at-function-pattern */
161
- @function _namespace-suffix($namespace, $suffix: '') {
170
+ @function -namespace-suffix($namespace, $suffix: '') {
162
171
  @if $namespace != '' {
163
172
  $namespace: $namespace + '-';
164
173
  }
@@ -1,3 +1,4 @@
1
+ @forward 'a11y';
1
2
  @forward 'clearfix';
2
3
  @forward 'ellipsis';
3
4
  @forward 'font-smoothing';
@@ -5,5 +6,3 @@
5
6
  @forward 'hidpi';
6
7
  @forward 'mq';
7
8
  @forward 'triangle';
8
- @forward 'visually-hidden';
9
- @forward 'visually-unhidden';
@@ -0,0 +1,17 @@
1
+ import { KitchenSink } from '../src/__mocks__/fixtures'
2
+
3
+ export default { component: KitchenSink }
4
+
5
+ export const Source = {
6
+ parameters: {
7
+ chromatic: { disable: true },
8
+ docs: {
9
+ source: {
10
+ code: "@use '~@newhighsco/chipset/styles/normalize';",
11
+ language: 'css'
12
+ }
13
+ }
14
+ }
15
+ }
16
+
17
+ export const Example = {}
@@ -1,8 +0,0 @@
1
- @mixin visually-unhidden {
2
- position: static !important;
3
- height: auto !important;
4
- width: 1px !important;
5
- margin: 0 !important;
6
- overflow: visible !important;
7
- clip-path: none !important;
8
- }