@iabbb/bds-react 0.40.0-beta.0 → 0.40.0-beta.10
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/Button/package.json +0 -3
- package/CallToAction/package.json +0 -3
- package/ErrorSummary/ErrorSummary.d.ts +1 -0
- package/ErrorSummary/index.cjs +207 -2
- package/ErrorSummary/index.cjs.map +1 -1
- package/ErrorSummary/index.mjs +207 -2
- package/ErrorSummary/index.mjs.map +1 -1
- package/ErrorSummary/package.json +4 -4
- package/FieldTextInput/package.json +0 -3
- package/Pagination/package.json +0 -3
- package/Typography/package.json +0 -3
- package/dom-shim.d.ts +1 -0
- package/index.cjs +439 -2
- package/index.cjs.map +1 -1
- package/index.mjs +439 -2
- package/index.mjs.map +1 -1
- package/package.json +5 -6
- package/Button/index.node.cjs +0 -115
- package/Button/index.node.cjs.map +0 -1
- package/CallToAction/index.node.cjs +0 -83
- package/CallToAction/index.node.cjs.map +0 -1
- package/ErrorSummary/index.node.cjs +0 -293
- package/ErrorSummary/index.node.cjs.map +0 -1
- package/FieldTextInput/index.node.cjs +0 -109
- package/FieldTextInput/index.node.cjs.map +0 -1
- package/Pagination/index.node.cjs +0 -180
- package/Pagination/index.node.cjs.map +0 -1
- package/Typography/index.node.cjs +0 -99
- package/Typography/index.node.cjs.map +0 -1
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
|
|
5
|
-
function _interopNamespaceDefault(e) {
|
|
6
|
-
var n = Object.create(null);
|
|
7
|
-
if (e) {
|
|
8
|
-
Object.keys(e).forEach(function (k) {
|
|
9
|
-
if (k !== 'default') {
|
|
10
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return e[k]; }
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
n.default = e;
|
|
19
|
-
return Object.freeze(n);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
23
|
-
|
|
24
|
-
function _extends() {
|
|
25
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
26
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
27
|
-
var source = arguments[i];
|
|
28
|
-
for (var key in source) {
|
|
29
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
30
|
-
target[key] = source[key];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return target;
|
|
35
|
-
};
|
|
36
|
-
return _extends.apply(this, arguments);
|
|
37
|
-
}
|
|
38
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
39
|
-
if (source == null) return {};
|
|
40
|
-
var target = {};
|
|
41
|
-
var sourceKeys = Object.keys(source);
|
|
42
|
-
var key, i;
|
|
43
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
44
|
-
key = sourceKeys[i];
|
|
45
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
46
|
-
target[key] = source[key];
|
|
47
|
-
}
|
|
48
|
-
return target;
|
|
49
|
-
}
|
|
50
|
-
function _objectWithoutProperties(source, excluded) {
|
|
51
|
-
if (source == null) return {};
|
|
52
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
53
|
-
var key, i;
|
|
54
|
-
if (Object.getOwnPropertySymbols) {
|
|
55
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
56
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
57
|
-
key = sourceSymbolKeys[i];
|
|
58
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
59
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
60
|
-
target[key] = source[key];
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return target;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
var _excluded = ["className", "component", "variant"];
|
|
67
|
-
var componentMap = {
|
|
68
|
-
h1: 'h1',
|
|
69
|
-
h2: 'h2',
|
|
70
|
-
h3: 'h3',
|
|
71
|
-
h4: 'h4',
|
|
72
|
-
h5: 'h5',
|
|
73
|
-
body: 'p'
|
|
74
|
-
};
|
|
75
|
-
var classMap = {
|
|
76
|
-
h1: 'bds-h1',
|
|
77
|
-
h2: 'bds-h2',
|
|
78
|
-
h3: 'bds-h3',
|
|
79
|
-
h4: 'bds-h4',
|
|
80
|
-
h5: 'bds-h5',
|
|
81
|
-
body: 'bds-body'
|
|
82
|
-
};
|
|
83
|
-
var Typography = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
84
|
-
var className = _ref.className,
|
|
85
|
-
component = _ref.component,
|
|
86
|
-
_ref$variant = _ref.variant,
|
|
87
|
-
variant = _ref$variant === void 0 ? 'body' : _ref$variant,
|
|
88
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
89
|
-
var Component = component !== null && component !== void 0 ? component : componentMap[variant];
|
|
90
|
-
return /*#__PURE__*/React__namespace.createElement(Component, _extends({
|
|
91
|
-
className: [classMap[variant], className].filter(function (x) {
|
|
92
|
-
return x;
|
|
93
|
-
}).join(' '),
|
|
94
|
-
ref: ref
|
|
95
|
-
}, props));
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
module.exports = Typography;
|
|
99
|
-
//# sourceMappingURL=index.node.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.node.cjs","sources":["../../src/Typography/Typography.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\nconst componentMap = {\r\n h1: 'h1',\r\n h2: 'h2',\r\n h3: 'h3',\r\n h4: 'h4',\r\n h5: 'h5',\r\n body: 'p',\r\n};\r\n\r\nconst classMap = {\r\n h1: 'bds-h1',\r\n h2: 'bds-h2',\r\n h3: 'bds-h3',\r\n h4: 'bds-h4',\r\n h5: 'bds-h5',\r\n body: 'bds-body',\r\n};\r\n\r\nexport type TypographyProps = {\r\n component?: React.ElementType;\r\n variant?: 'body' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\r\n};\r\n\r\nconst Typography = React.forwardRef<HTMLOrSVGElement, React.HTMLAttributes<HTMLOrSVGElement> & TypographyProps>(\r\n ({ className, component, variant = 'body', ...props }, ref) => {\r\n const Component = component ?? (componentMap[variant] as React.ElementType);\r\n return (\r\n <Component className={[classMap[variant], className].filter((x) => x).join(' ')} ref={ref} {...props} />\r\n );\r\n },\r\n);\r\n\r\nexport default Typography;\r\n"],"names":["componentMap","h1","h2","h3","h4","h5","body","classMap","Typography","React","forwardRef","_ref","ref","className","component","_ref$variant","variant","props","_objectWithoutProperties","_excluded","Component","createElement","_extends","filter","x","join"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG;AACnBC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,IAAI,EAAE,GAAA;AACR,CAAC,CAAA;AAED,IAAMC,QAAQ,GAAG;AACfN,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,IAAI,EAAE,UAAA;AACR,CAAC,CAAA;AAOKE,IAAAA,UAAU,gBAAGC,gBAAK,CAACC,UAAU,CACjC,UAAAC,IAAA,EAAuDC,GAAG,EAAK;AAAA,EAAA,IAA5DC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,SAAS,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