@elliemae/ds-header 2.2.0-alpha.4 → 3.0.0-next.2
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/cjs/Header.js +88 -98
- package/cjs/index.js +10 -28
- package/esm/Header.js +76 -69
- package/esm/index.js +1 -3
- package/package.json +2 -5
- package/cjs/Header.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/esm/Header.js.map +0 -7
- package/esm/index.js.map +0 -7
package/cjs/Header.js
CHANGED
|
@@ -1,106 +1,96 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
11
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
12
|
+
require('react');
|
|
13
|
+
var reactDesc = require('react-desc');
|
|
14
|
+
var styled = require('styled-components');
|
|
15
|
+
var styledComponents = require('@xstyled/styled-components');
|
|
16
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
17
|
+
|
|
18
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
+
|
|
20
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
21
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
22
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
23
|
+
|
|
24
|
+
const _excluded = ["color", "fontFamily", "fontSize", "fontWeight", "height", "level", "lineHeight", "text", "width"];
|
|
25
|
+
|
|
26
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
+
|
|
28
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
|
+
const H = /*#__PURE__*/styled__default["default"].h3.withConfig({
|
|
30
|
+
componentId: "sc-hpgkwz-0"
|
|
31
|
+
})(["font-weight:unset;font-size:unset;line-height:unset;margin:0;padding:0;", " ", " ", ""], styledComponents.space, styledComponents.sizing, styledComponents.typography);
|
|
32
|
+
|
|
33
|
+
const DSHeader = _ref => {
|
|
34
|
+
let {
|
|
35
|
+
color,
|
|
36
|
+
fontFamily,
|
|
37
|
+
fontSize,
|
|
38
|
+
fontWeight,
|
|
39
|
+
height,
|
|
40
|
+
level,
|
|
41
|
+
lineHeight,
|
|
42
|
+
text,
|
|
43
|
+
width
|
|
44
|
+
} = _ref,
|
|
45
|
+
rest = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
46
|
+
|
|
47
|
+
return /*#__PURE__*/jsxRuntime.jsx(H, _objectSpread(_objectSpread({
|
|
48
|
+
as: "h".concat(level),
|
|
49
|
+
color: color,
|
|
50
|
+
fontFamily: fontFamily,
|
|
51
|
+
fontSize: fontSize,
|
|
52
|
+
fontWeight: fontWeight,
|
|
53
|
+
h: height,
|
|
54
|
+
lineHeight: lineHeight,
|
|
55
|
+
w: width,
|
|
56
|
+
"data-testid": "em-ds-header"
|
|
57
|
+
}, rest), {}, {
|
|
58
|
+
children: text
|
|
59
|
+
}));
|
|
11
60
|
};
|
|
12
|
-
|
|
13
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(module2))
|
|
15
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (module2, isNodeMode) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
-
var Header_exports = {};
|
|
29
|
-
__export(Header_exports, {
|
|
30
|
-
DSHeader: () => DSHeader,
|
|
31
|
-
HeaderWithSchema: () => HeaderWithSchema,
|
|
32
|
-
default: () => Header_default
|
|
33
|
-
});
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_react_desc = require("react-desc");
|
|
37
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
38
|
-
var import_styled_components2 = require("@xstyled/styled-components");
|
|
39
|
-
const H = import_styled_components.default.h3`
|
|
40
|
-
font-weight: unset;
|
|
41
|
-
font-size: unset;
|
|
42
|
-
line-height: unset;
|
|
43
|
-
margin: 0;
|
|
44
|
-
padding: 0;
|
|
45
|
-
${import_styled_components2.space}
|
|
46
|
-
${import_styled_components2.sizing}
|
|
47
|
-
${import_styled_components2.typography}
|
|
48
|
-
`;
|
|
49
|
-
const DSHeader = ({
|
|
50
|
-
color,
|
|
51
|
-
fontFamily,
|
|
52
|
-
fontSize,
|
|
53
|
-
fontWeight,
|
|
54
|
-
height,
|
|
55
|
-
level,
|
|
56
|
-
lineHeight,
|
|
57
|
-
text,
|
|
58
|
-
width,
|
|
59
|
-
...rest
|
|
60
|
-
}) => /* @__PURE__ */ import_react.default.createElement(H, {
|
|
61
|
-
as: `h${level}`,
|
|
62
|
-
color,
|
|
63
|
-
fontFamily,
|
|
64
|
-
fontSize,
|
|
65
|
-
fontWeight,
|
|
66
|
-
h: height,
|
|
67
|
-
lineHeight,
|
|
68
|
-
w: width,
|
|
69
|
-
"data-testid": "em-ds-header",
|
|
70
|
-
...rest
|
|
71
|
-
}, text);
|
|
61
|
+
|
|
72
62
|
DSHeader.defaultProps = {
|
|
73
63
|
level: 3,
|
|
74
64
|
lineHeight: 1.2
|
|
75
65
|
};
|
|
76
66
|
const headerProps = {
|
|
77
|
-
color:
|
|
78
|
-
fontFamily:
|
|
79
|
-
fontSize:
|
|
80
|
-
fontWeight:
|
|
81
|
-
height:
|
|
82
|
-
level:
|
|
83
|
-
lineHeight:
|
|
84
|
-
m:
|
|
85
|
-
mb:
|
|
86
|
-
ml:
|
|
87
|
-
mr:
|
|
88
|
-
mt:
|
|
89
|
-
mx:
|
|
90
|
-
my:
|
|
91
|
-
p:
|
|
92
|
-
pb:
|
|
93
|
-
pl:
|
|
94
|
-
pr:
|
|
95
|
-
pt:
|
|
96
|
-
px:
|
|
97
|
-
py:
|
|
98
|
-
text:
|
|
99
|
-
width:
|
|
67
|
+
color: reactDesc.PropTypes.string.description('Colors aliases from theme. I.e. `brand.400`'),
|
|
68
|
+
fontFamily: reactDesc.PropTypes.string.description('font-family aliases from theme. I.e. `default`'),
|
|
69
|
+
fontSize: reactDesc.PropTypes.string.description('any valid value format. I.e. `16px`'),
|
|
70
|
+
fontWeight: reactDesc.PropTypes.string.description('any alias from theme. I.e. `semibold`'),
|
|
71
|
+
height: reactDesc.PropTypes.string.description('any valid value format. I.e. `200px`'),
|
|
72
|
+
level: reactDesc.PropTypes.oneOf([1, 2, 3, 4, 5, 6]).description('Depth of header tag. I.e. level `2` renders a h2 tag').defaultValue(2),
|
|
73
|
+
lineHeight: reactDesc.PropTypes.number.description('float numbers for line-height. I.e. 1.5').defaultValue(1.2),
|
|
74
|
+
m: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin'),
|
|
75
|
+
mb: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-bottom'),
|
|
76
|
+
ml: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-left'),
|
|
77
|
+
mr: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-right'),
|
|
78
|
+
mt: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-top'),
|
|
79
|
+
mx: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin x'),
|
|
80
|
+
my: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin y'),
|
|
81
|
+
p: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding'),
|
|
82
|
+
pb: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-bottom'),
|
|
83
|
+
pl: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-left'),
|
|
84
|
+
pr: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-right'),
|
|
85
|
+
pt: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-top'),
|
|
86
|
+
px: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding x'),
|
|
87
|
+
py: reactDesc.PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding y'),
|
|
88
|
+
text: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.string, reactDesc.PropTypes.element]).description('Header s text').isRequired,
|
|
89
|
+
width: reactDesc.PropTypes.string.description('text width')
|
|
100
90
|
};
|
|
101
|
-
|
|
102
|
-
const HeaderWithSchema = (0, import_react_desc.describe)(DSHeader);
|
|
91
|
+
const HeaderWithSchema = reactDesc.describe(DSHeader);
|
|
103
92
|
HeaderWithSchema.propTypes = headerProps;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
|
|
94
|
+
exports.DSHeader = DSHeader;
|
|
95
|
+
exports.HeaderWithSchema = HeaderWithSchema;
|
|
96
|
+
exports["default"] = DSHeader;
|
package/cjs/index.js
CHANGED
|
@@ -1,28 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (module2, isNodeMode) => {
|
|
17
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
-
return (module2, temp) => {
|
|
21
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
-
};
|
|
23
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
-
var src_exports = {};
|
|
25
|
-
var React = __toESM(require("react"));
|
|
26
|
-
__reExport(src_exports, require("./Header"));
|
|
27
|
-
module.exports = __toCommonJS(src_exports);
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var Header = require('./Header.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.DSHeader = Header.DSHeader;
|
|
10
|
+
exports.HeaderWithSchema = Header.HeaderWithSchema;
|
package/esm/Header.js
CHANGED
|
@@ -1,77 +1,84 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
8
|
+
import 'react';
|
|
9
|
+
import { PropTypes, describe } from 'react-desc';
|
|
10
|
+
import styled from 'styled-components';
|
|
11
|
+
import { space, sizing, typography } from '@xstyled/styled-components';
|
|
12
|
+
import { jsx } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
const _excluded = ["color", "fontFamily", "fontSize", "fontWeight", "height", "level", "lineHeight", "text", "width"];
|
|
15
|
+
|
|
16
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
+
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
+
const H = /*#__PURE__*/styled.h3.withConfig({
|
|
20
|
+
componentId: "sc-hpgkwz-0"
|
|
21
|
+
})(["font-weight:unset;font-size:unset;line-height:unset;margin:0;padding:0;", " ", " ", ""], space, sizing, typography);
|
|
22
|
+
|
|
23
|
+
const DSHeader = _ref => {
|
|
24
|
+
let {
|
|
25
|
+
color,
|
|
26
|
+
fontFamily,
|
|
27
|
+
fontSize,
|
|
28
|
+
fontWeight,
|
|
29
|
+
height,
|
|
30
|
+
level,
|
|
31
|
+
lineHeight,
|
|
32
|
+
text,
|
|
33
|
+
width
|
|
34
|
+
} = _ref,
|
|
35
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
+
|
|
37
|
+
return /*#__PURE__*/jsx(H, _objectSpread(_objectSpread({
|
|
38
|
+
as: "h".concat(level),
|
|
39
|
+
color: color,
|
|
40
|
+
fontFamily: fontFamily,
|
|
41
|
+
fontSize: fontSize,
|
|
42
|
+
fontWeight: fontWeight,
|
|
43
|
+
h: height,
|
|
44
|
+
lineHeight: lineHeight,
|
|
45
|
+
w: width,
|
|
46
|
+
"data-testid": "em-ds-header"
|
|
47
|
+
}, rest), {}, {
|
|
48
|
+
children: text
|
|
49
|
+
}));
|
|
50
|
+
};
|
|
51
|
+
|
|
39
52
|
DSHeader.defaultProps = {
|
|
40
53
|
level: 3,
|
|
41
54
|
lineHeight: 1.2
|
|
42
55
|
};
|
|
43
56
|
const headerProps = {
|
|
44
|
-
color: PropTypes.string.description(
|
|
45
|
-
fontFamily: PropTypes.string.description(
|
|
46
|
-
fontSize: PropTypes.string.description(
|
|
47
|
-
fontWeight: PropTypes.string.description(
|
|
48
|
-
height: PropTypes.string.description(
|
|
49
|
-
level: PropTypes.oneOf([1, 2, 3, 4, 5, 6]).description(
|
|
50
|
-
lineHeight: PropTypes.number.description(
|
|
51
|
-
m: PropTypes.oneOf([
|
|
52
|
-
mb: PropTypes.oneOf([
|
|
53
|
-
ml: PropTypes.oneOf([
|
|
54
|
-
mr: PropTypes.oneOf([
|
|
55
|
-
mt: PropTypes.oneOf([
|
|
56
|
-
mx: PropTypes.oneOf([
|
|
57
|
-
my: PropTypes.oneOf([
|
|
58
|
-
p: PropTypes.oneOf([
|
|
59
|
-
pb: PropTypes.oneOf([
|
|
60
|
-
pl: PropTypes.oneOf([
|
|
61
|
-
pr: PropTypes.oneOf([
|
|
62
|
-
pt: PropTypes.oneOf([
|
|
63
|
-
px: PropTypes.oneOf([
|
|
64
|
-
py: PropTypes.oneOf([
|
|
65
|
-
text: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(
|
|
66
|
-
width: PropTypes.string.description(
|
|
57
|
+
color: PropTypes.string.description('Colors aliases from theme. I.e. `brand.400`'),
|
|
58
|
+
fontFamily: PropTypes.string.description('font-family aliases from theme. I.e. `default`'),
|
|
59
|
+
fontSize: PropTypes.string.description('any valid value format. I.e. `16px`'),
|
|
60
|
+
fontWeight: PropTypes.string.description('any alias from theme. I.e. `semibold`'),
|
|
61
|
+
height: PropTypes.string.description('any valid value format. I.e. `200px`'),
|
|
62
|
+
level: PropTypes.oneOf([1, 2, 3, 4, 5, 6]).description('Depth of header tag. I.e. level `2` renders a h2 tag').defaultValue(2),
|
|
63
|
+
lineHeight: PropTypes.number.description('float numbers for line-height. I.e. 1.5').defaultValue(1.2),
|
|
64
|
+
m: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin'),
|
|
65
|
+
mb: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-bottom'),
|
|
66
|
+
ml: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-left'),
|
|
67
|
+
mr: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-right'),
|
|
68
|
+
mt: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-top'),
|
|
69
|
+
mx: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin x'),
|
|
70
|
+
my: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin y'),
|
|
71
|
+
p: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding'),
|
|
72
|
+
pb: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-bottom'),
|
|
73
|
+
pl: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-left'),
|
|
74
|
+
pr: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-right'),
|
|
75
|
+
pt: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-top'),
|
|
76
|
+
px: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding x'),
|
|
77
|
+
py: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding y'),
|
|
78
|
+
text: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Header s text').isRequired,
|
|
79
|
+
width: PropTypes.string.description('text width')
|
|
67
80
|
};
|
|
68
|
-
DSHeader.propTypes = headerProps;
|
|
69
81
|
const HeaderWithSchema = describe(DSHeader);
|
|
70
82
|
HeaderWithSchema.propTypes = headerProps;
|
|
71
|
-
|
|
72
|
-
export {
|
|
73
|
-
DSHeader,
|
|
74
|
-
HeaderWithSchema,
|
|
75
|
-
Header_default as default
|
|
76
|
-
};
|
|
77
|
-
//# sourceMappingURL=Header.js.map
|
|
83
|
+
|
|
84
|
+
export { DSHeader, HeaderWithSchema, DSHeader as default };
|
package/esm/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-header",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-next.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Header",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -36,10 +36,7 @@
|
|
|
36
36
|
"build": "node ../../scripts/build/build.js"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@xstyled/
|
|
40
|
-
"@xstyled/styled-components": "~3.1.2",
|
|
41
|
-
"@xstyled/system": "~3.1.2",
|
|
42
|
-
"@xstyled/util": "~3.1.0",
|
|
39
|
+
"@xstyled/styled-components": "~3.1.1",
|
|
43
40
|
"react-desc": "~4.1.3"
|
|
44
41
|
},
|
|
45
42
|
"devDependencies": {
|
package/cjs/Header.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Header.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { space, sizing, typography } from '@xstyled/styled-components';\n\nconst H = styled.h3`\n font-weight: unset;\n font-size: unset;\n line-height: unset;\n margin: 0;\n padding: 0;\n ${space}\n ${sizing}\n ${typography}\n`;\n\nconst DSHeader = ({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n height,\n level,\n lineHeight,\n text,\n width,\n ...rest\n}) => (\n <H\n as={`h${level}`}\n color={color}\n fontFamily={fontFamily}\n fontSize={fontSize}\n fontWeight={fontWeight}\n h={height}\n lineHeight={lineHeight}\n w={width}\n data-testid=\"em-ds-header\"\n {...rest}\n >\n {text}\n </H>\n);\n\nDSHeader.defaultProps = {\n level: 3,\n lineHeight: 1.2,\n};\n\nconst headerProps = {\n color: PropTypes.string.description('Colors aliases from theme. I.e. `brand.400`'),\n fontFamily: PropTypes.string.description('font-family aliases from theme. I.e. `default`'),\n fontSize: PropTypes.string.description('any valid value format. I.e. `16px`'),\n fontWeight: PropTypes.string.description('any alias from theme. I.e. `semibold`'),\n height: PropTypes.string.description('any valid value format. I.e. `200px`'),\n level: PropTypes.oneOf([1, 2, 3, 4, 5, 6])\n .description('Depth of header tag. I.e. level `2` renders a h2 tag')\n .defaultValue(2),\n lineHeight: PropTypes.number.description('float numbers for line-height. I.e. 1.5').defaultValue(1.2),\n m: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin'),\n mb: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-bottom'),\n ml: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-left'),\n mr: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-right'),\n mt: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-top'),\n mx: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin x'),\n my: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin y'),\n p: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding'),\n pb: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-bottom'),\n pl: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-left'),\n pr: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-right'),\n pt: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-top'),\n px: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding x'),\n py: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding y'),\n text: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Header s text').isRequired,\n width: PropTypes.string.description('text width'),\n};\n\nDSHeader.propTypes = headerProps;\n\nconst HeaderWithSchema = describe(DSHeader);\nHeaderWithSchema.propTypes = headerProps;\n\nexport { DSHeader, HeaderWithSchema };\nexport default DSHeader;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,wBAAoC;AACpC,+BAAmB;AACnB,gCAA0C;AAE1C,MAAM,IAAI,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMb;AAAA,IACA;AAAA,IACA;AAAA;AAGJ,MAAM,WAAW,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,KACG;AAAA,MAEH,mDAAC,GAAD;AAAA,EACE,IAAI,IAAI;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AAAA,EACH;AAAA,EACA,GAAG;AAAA,EACH,eAAY;AAAA,KACR;AAAA,GAEH;AAIL,SAAS,eAAe;AAAA,EACtB,OAAO;AAAA,EACP,YAAY;AAAA;AAGd,MAAM,cAAc;AAAA,EAClB,OAAO,4BAAU,OAAO,YAAY;AAAA,EACpC,YAAY,4BAAU,OAAO,YAAY;AAAA,EACzC,UAAU,4BAAU,OAAO,YAAY;AAAA,EACvC,YAAY,4BAAU,OAAO,YAAY;AAAA,EACzC,QAAQ,4BAAU,OAAO,YAAY;AAAA,EACrC,OAAO,4BAAU,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,IACpC,YAAY,wDACZ,aAAa;AAAA,EAChB,YAAY,4BAAU,OAAO,YAAY,2CAA2C,aAAa;AAAA,EACjG,GAAG,4BAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,QAAQ,YAAY;AAAA,EAC1E,IAAI,4BAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,QAAQ,YAAY;AAAA,EAC3E,IAA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G7B,IAAO,iBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/cjs/index.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './Header';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,wBAAc;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/esm/Header.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/Header.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { space, sizing, typography } from '@xstyled/styled-components';\n\nconst H = styled.h3`\n font-weight: unset;\n font-size: unset;\n line-height: unset;\n margin: 0;\n padding: 0;\n ${space}\n ${sizing}\n ${typography}\n`;\n\nconst DSHeader = ({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n height,\n level,\n lineHeight,\n text,\n width,\n ...rest\n}) => (\n <H\n as={`h${level}`}\n color={color}\n fontFamily={fontFamily}\n fontSize={fontSize}\n fontWeight={fontWeight}\n h={height}\n lineHeight={lineHeight}\n w={width}\n data-testid=\"em-ds-header\"\n {...rest}\n >\n {text}\n </H>\n);\n\nDSHeader.defaultProps = {\n level: 3,\n lineHeight: 1.2,\n};\n\nconst headerProps = {\n color: PropTypes.string.description('Colors aliases from theme. I.e. `brand.400`'),\n fontFamily: PropTypes.string.description('font-family aliases from theme. I.e. `default`'),\n fontSize: PropTypes.string.description('any valid value format. I.e. `16px`'),\n fontWeight: PropTypes.string.description('any alias from theme. I.e. `semibold`'),\n height: PropTypes.string.description('any valid value format. I.e. `200px`'),\n level: PropTypes.oneOf([1, 2, 3, 4, 5, 6])\n .description('Depth of header tag. I.e. level `2` renders a h2 tag')\n .defaultValue(2),\n lineHeight: PropTypes.number.description('float numbers for line-height. I.e. 1.5').defaultValue(1.2),\n m: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin'),\n mb: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-bottom'),\n ml: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-left'),\n mr: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-right'),\n mt: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin-top'),\n mx: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin x'),\n my: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('margin y'),\n p: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding'),\n pb: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-bottom'),\n pl: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-left'),\n pr: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-right'),\n pt: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding-top'),\n px: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding x'),\n py: PropTypes.oneOf(['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl']).description('padding y'),\n text: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Header s text').isRequired,\n width: PropTypes.string.description('text width'),\n};\n\nDSHeader.propTypes = headerProps;\n\nconst HeaderWithSchema = describe(DSHeader);\nHeaderWithSchema.propTypes = headerProps;\n\nexport { DSHeader, HeaderWithSchema };\nexport default DSHeader;\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AAEA,MAAM,IAAI,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMb;AAAA,IACA;AAAA,IACA;AAAA;AAGJ,MAAM,WAAW,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,KACG;AAAA,MAEH,qCAAC,GAAD;AAAA,EACE,IAAI,IAAI;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AAAA,EACH;AAAA,EACA,GAAG;AAAA,EACH,eAAY;AAAA,KACR;AAAA,GAEH;AAIL,SAAS,eAAe;AAAA,EACtB,OAAO;AAAA,EACP,YAAY;AAAA;AAGd,MAAM,cAAc;AAAA,EAClB,OAAO,UAAU,OAAO,YAAY;AAAA,EACpC,YAAY,UAAU,OAAO,YAAY;AAAA,EACzC,UAAU,UAAU,OAAO,YAAY;AAAA,EACvC,YAAY,UAAU,OAAO,YAAY;AAAA,EACzC,QAAQ,UAAU,OAAO,YAAY;AAAA,EACrC,OAAO,UAAU,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,IACpC,YAAY,wDACZ,aAAa;AAAA,EAChB,YAAY,UAAU,OAAO,YAAY,2CAA2C,aAAa;AAAA,EACjG,GAAG,UAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,QAAQ,YAAY;AAAA,EAC1E,IAAI,UAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,QAAQ,YAAY;AAAA,EAC3E,IAAI,UAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,QAAQ,YAAY;AAA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