@cloudflare/style-container 7.6.0 → 7.6.4
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/CHANGELOG.md +32 -0
- package/dist/index.d.ts +2 -2
- package/dist/isValidElementProp.d.ts +1 -0
- package/es/index.js +2 -2
- package/es/isValidElementProp.js +1 -1
- package/lib/index.js +7 -0
- package/lib/isValidElementProp.js +2 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [7.6.4](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/style-container@7.6.3...@cloudflare/style-container@7.6.4) (2022-02-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @cloudflare/style-container
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [7.6.3](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/style-container@7.6.2...@cloudflare/style-container@7.6.3) (2022-02-04)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @cloudflare/style-container
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [7.6.2](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/style-container@7.6.1...@cloudflare/style-container@7.6.2) (2022-02-01)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @cloudflare/style-container
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [7.6.1](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/style-container@7.6.0...@cloudflare/style-container@7.6.1) (2022-01-19)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @cloudflare/style-container
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
# [7.6.0](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/style-container@7.5.27...@cloudflare/style-container@7.6.0) (2022-01-07)
|
|
7
39
|
|
|
8
40
|
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import createComponent from './createComponent';
|
|
|
6
6
|
import createComponentStyles from './createComponentStyles';
|
|
7
7
|
import createStyledComponent, { filterStyleProps } from './createStyledComponent';
|
|
8
8
|
import withRenderer from './withRenderer';
|
|
9
|
-
import { isValidElementProp, filterValidElementProps } from './isValidElementProp';
|
|
9
|
+
import { ariaAttributes, isValidElementProp, filterValidElementProps } from './isValidElementProp';
|
|
10
10
|
import { WithTheme } from './types';
|
|
11
11
|
export * from './types';
|
|
12
12
|
export declare const withTheme: WithTheme;
|
|
13
|
-
export { createComponent, applyTheme, ThemeProvider, FelaTheme, connect, combineRules, createComponentStyles, withRenderer, applyStaticStyles, createStyledComponent, isValidElementProp, filterValidElementProps, filterStyleProps };
|
|
13
|
+
export { createComponent, ariaAttributes, applyTheme, ThemeProvider, FelaTheme, connect, combineRules, createComponentStyles, withRenderer, applyStaticStyles, createStyledComponent, isValidElementProp, filterValidElementProps, filterStyleProps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/// <reference types="lodash" />
|
|
3
|
+
export declare const ariaAttributes: string[];
|
|
3
4
|
export declare const isValidElementProp: ((tag: keyof JSX.IntrinsicElements, attr: string) => boolean) & import("lodash").MemoizedFunction;
|
|
4
5
|
export declare const filterValidElementProps: <T extends object>(tag: keyof JSX.IntrinsicElements, props: T) => Partial<T>;
|
|
5
6
|
export default isValidElementProp;
|
package/es/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import createComponent from './createComponent';
|
|
|
8
8
|
import createComponentStyles from './createComponentStyles';
|
|
9
9
|
import createStyledComponent, { filterStyleProps } from './createStyledComponent';
|
|
10
10
|
import withRenderer from './withRenderer';
|
|
11
|
-
import { isValidElementProp, filterValidElementProps } from './isValidElementProp';
|
|
11
|
+
import { ariaAttributes, isValidElementProp, filterValidElementProps } from './isValidElementProp';
|
|
12
12
|
export * from './types';
|
|
13
13
|
export const withTheme = _withTheme;
|
|
14
|
-
export { createComponent, applyTheme, ThemeProvider, FelaTheme, connect, combineRules, createComponentStyles, withRenderer, applyStaticStyles, createStyledComponent, isValidElementProp, filterValidElementProps, filterStyleProps };
|
|
14
|
+
export { createComponent, ariaAttributes, applyTheme, ThemeProvider, FelaTheme, connect, combineRules, createComponentStyles, withRenderer, applyStaticStyles, createStyledComponent, isValidElementProp, filterValidElementProps, filterStyleProps };
|
package/es/isValidElementProp.js
CHANGED
|
@@ -20,7 +20,7 @@ const globalAttributes = [
|
|
|
20
20
|
'autoCapitalize', 'autoCorrect', 'autoSave', // 'color', probably best to not allow this attribute
|
|
21
21
|
'itemProp', 'itemScope', 'itemType', 'itemID', 'itemRef', 'results', 'security', 'unselectable'];
|
|
22
22
|
const htmlElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr'];
|
|
23
|
-
const ariaAttributes = ['aria-activedescendant', 'aria-atomic', 'aria-autocomplete', 'aria-busy', 'aria-checked', 'aria-colcount', 'aria-colindex', 'aria-colspan', 'aria-controls', 'aria-current', 'aria-describedby', 'aria-details', 'aria-disabled', 'aria-dropeffect', 'aria-errormessage', 'aria-expanded', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-level', 'aria-live', 'aria-modal', 'aria-multiline', 'aria-multiselectable', 'aria-orientation', 'aria-owns', 'aria-placeholder', 'aria-posinset', 'aria-pressed', 'aria-readonly', 'aria-relevant', 'aria-required', 'aria-roledescription', 'aria-rowcount', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-setsize', 'aria-sort', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext'];
|
|
23
|
+
export const ariaAttributes = ['aria-activedescendant', 'aria-atomic', 'aria-autocomplete', 'aria-busy', 'aria-checked', 'aria-colcount', 'aria-colindex', 'aria-colspan', 'aria-controls', 'aria-current', 'aria-describedby', 'aria-details', 'aria-disabled', 'aria-dropeffect', 'aria-errormessage', 'aria-expanded', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-level', 'aria-live', 'aria-modal', 'aria-multiline', 'aria-multiselectable', 'aria-orientation', 'aria-owns', 'aria-placeholder', 'aria-posinset', 'aria-pressed', 'aria-readonly', 'aria-relevant', 'aria-required', 'aria-roledescription', 'aria-rowcount', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-setsize', 'aria-sort', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext'];
|
|
24
24
|
const extendedAttributes = {
|
|
25
25
|
a: ['download', 'href', 'hrefLang', 'media', 'rel', 'target', 'type', 'referrerPolicy'],
|
|
26
26
|
area: ['alt', 'coords', 'download', 'href', 'hrefLang', 'media', 'rel', 'shape', 'target'],
|
package/lib/index.js
CHANGED
|
@@ -18,6 +18,7 @@ var _exportNames = {
|
|
|
18
18
|
createStyledComponent: true,
|
|
19
19
|
filterStyleProps: true,
|
|
20
20
|
withRenderer: true,
|
|
21
|
+
ariaAttributes: true,
|
|
21
22
|
isValidElementProp: true,
|
|
22
23
|
filterValidElementProps: true
|
|
23
24
|
};
|
|
@@ -87,6 +88,12 @@ Object.defineProperty(exports, "withRenderer", {
|
|
|
87
88
|
return _withRenderer.default;
|
|
88
89
|
}
|
|
89
90
|
});
|
|
91
|
+
Object.defineProperty(exports, "ariaAttributes", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
get: function get() {
|
|
94
|
+
return _isValidElementProp.ariaAttributes;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
90
97
|
Object.defineProperty(exports, "isValidElementProp", {
|
|
91
98
|
enumerable: true,
|
|
92
99
|
get: function get() {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.filterValidElementProps = exports.isValidElementProp = void 0;
|
|
6
|
+
exports.default = exports.filterValidElementProps = exports.isValidElementProp = exports.ariaAttributes = void 0;
|
|
7
7
|
|
|
8
8
|
var _memoize = _interopRequireDefault(require("lodash/memoize"));
|
|
9
9
|
|
|
@@ -44,6 +44,7 @@ var globalAttributes = [
|
|
|
44
44
|
'itemProp', 'itemScope', 'itemType', 'itemID', 'itemRef', 'results', 'security', 'unselectable'];
|
|
45
45
|
var htmlElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr'];
|
|
46
46
|
var ariaAttributes = ['aria-activedescendant', 'aria-atomic', 'aria-autocomplete', 'aria-busy', 'aria-checked', 'aria-colcount', 'aria-colindex', 'aria-colspan', 'aria-controls', 'aria-current', 'aria-describedby', 'aria-details', 'aria-disabled', 'aria-dropeffect', 'aria-errormessage', 'aria-expanded', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-level', 'aria-live', 'aria-modal', 'aria-multiline', 'aria-multiselectable', 'aria-orientation', 'aria-owns', 'aria-placeholder', 'aria-posinset', 'aria-pressed', 'aria-readonly', 'aria-relevant', 'aria-required', 'aria-roledescription', 'aria-rowcount', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-setsize', 'aria-sort', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext'];
|
|
47
|
+
exports.ariaAttributes = ariaAttributes;
|
|
47
48
|
var extendedAttributes = {
|
|
48
49
|
a: ['download', 'href', 'hrefLang', 'media', 'rel', 'target', 'type', 'referrerPolicy'],
|
|
49
50
|
area: ['alt', 'coords', 'download', 'href', 'hrefLang', 'media', 'rel', 'shape', 'target'],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/style-container",
|
|
3
3
|
"description": "Cloudflare Style Container",
|
|
4
|
-
"version": "7.6.
|
|
4
|
+
"version": "7.6.4",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@cloudflare/style-const": "^5.2.
|
|
16
|
-
"@cloudflare/types": "^6.
|
|
15
|
+
"@cloudflare/style-const": "^5.2.3",
|
|
16
|
+
"@cloudflare/types": "^6.13.1",
|
|
17
17
|
"fela": "^11.6.1",
|
|
18
18
|
"fela-tools": "^11.6.1",
|
|
19
19
|
"lodash": "^4.17.10",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"test-coverage": "stratus test --coverage",
|
|
35
35
|
"test-watch": "stratus test --watch"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "994e89f08c4e6809252f6f49ea25de5af4dc2888"
|
|
38
38
|
}
|