@elliemae/ds-header 2.2.0-next.4 → 2.3.0-alpha.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 CHANGED
@@ -1,96 +1,106 @@
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
- }));
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
60
11
  };
61
-
12
+ var __reExport = (target, module2, copyDefault, desc) => {
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);
62
72
  DSHeader.defaultProps = {
63
73
  level: 3,
64
74
  lineHeight: 1.2
65
75
  };
66
76
  const headerProps = {
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')
77
+ color: import_react_desc.PropTypes.string.description("Colors aliases from theme. I.e. `brand.400`"),
78
+ fontFamily: import_react_desc.PropTypes.string.description("font-family aliases from theme. I.e. `default`"),
79
+ fontSize: import_react_desc.PropTypes.string.description("any valid value format. I.e. `16px`"),
80
+ fontWeight: import_react_desc.PropTypes.string.description("any alias from theme. I.e. `semibold`"),
81
+ height: import_react_desc.PropTypes.string.description("any valid value format. I.e. `200px`"),
82
+ level: import_react_desc.PropTypes.oneOf([1, 2, 3, 4, 5, 6]).description("Depth of header tag. I.e. level `2` renders a h2 tag").defaultValue(2),
83
+ lineHeight: import_react_desc.PropTypes.number.description("float numbers for line-height. I.e. 1.5").defaultValue(1.2),
84
+ m: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin"),
85
+ mb: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin-bottom"),
86
+ ml: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin-left"),
87
+ mr: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin-right"),
88
+ mt: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin-top"),
89
+ mx: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin x"),
90
+ my: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin y"),
91
+ p: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding"),
92
+ pb: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding-bottom"),
93
+ pl: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding-left"),
94
+ pr: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding-right"),
95
+ pt: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding-top"),
96
+ px: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding x"),
97
+ py: import_react_desc.PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding y"),
98
+ text: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.string, import_react_desc.PropTypes.element]).description("Header s text").isRequired,
99
+ width: import_react_desc.PropTypes.string.description("text width")
90
100
  };
91
- const HeaderWithSchema = reactDesc.describe(DSHeader);
101
+ DSHeader.propTypes = headerProps;
102
+ const HeaderWithSchema = (0, import_react_desc.describe)(DSHeader);
92
103
  HeaderWithSchema.propTypes = headerProps;
93
-
94
- exports.DSHeader = DSHeader;
95
- exports.HeaderWithSchema = HeaderWithSchema;
96
- exports["default"] = DSHeader;
104
+ var Header_default = DSHeader;
105
+ module.exports = __toCommonJS(Header_exports);
106
+ //# sourceMappingURL=Header.js.map
@@ -0,0 +1,7 @@
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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Y;AAAA,EAC3E,IAAI,4BAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,QAAQ,YAAY;AAAA,EAC3E,IAAI,4BAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,QAAQ,YAAY;AAAA,EAC3E,IAAI,4BAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,QAAQ,YAAY;AAAA,EAC3E,IAAI,4BAAU,MAAM,CAAC,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,QAAQ,YAAY;AAAA,EAC3E,MAAM,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,UAAU,YAAY,iBAAiB;AAAA,EAC9F,OAAO,4BAAU,OAAO,YAAY;AAAA;AAGtC,SAAS,YAAY;AAErB,MAAM,mBAAmB,gCAAS;AAClC,iBAAiB,YAAY;AAG7B,IAAO,iBAAQ;",
6
+ "names": []
7
+ }
package/cjs/index.js CHANGED
@@ -1,10 +1,28 @@
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;
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __reExport = (target, module2, copyDefault, desc) => {
9
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
10
+ for (let key of __getOwnPropNames(module2))
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
@@ -0,0 +1,7 @@
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 CHANGED
@@ -1,84 +1,77 @@
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
-
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { describe, PropTypes } from "react-desc";
4
+ import styled from "styled-components";
5
+ import { space, sizing, typography } from "@xstyled/styled-components";
6
+ const H = styled.h3`
7
+ font-weight: unset;
8
+ font-size: unset;
9
+ line-height: unset;
10
+ margin: 0;
11
+ padding: 0;
12
+ ${space}
13
+ ${sizing}
14
+ ${typography}
15
+ `;
16
+ const DSHeader = ({
17
+ color,
18
+ fontFamily,
19
+ fontSize,
20
+ fontWeight,
21
+ height,
22
+ level,
23
+ lineHeight,
24
+ text,
25
+ width,
26
+ ...rest
27
+ }) => /* @__PURE__ */ React2.createElement(H, {
28
+ as: `h${level}`,
29
+ color,
30
+ fontFamily,
31
+ fontSize,
32
+ fontWeight,
33
+ h: height,
34
+ lineHeight,
35
+ w: width,
36
+ "data-testid": "em-ds-header",
37
+ ...rest
38
+ }, text);
52
39
  DSHeader.defaultProps = {
53
40
  level: 3,
54
41
  lineHeight: 1.2
55
42
  };
56
43
  const headerProps = {
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')
44
+ color: PropTypes.string.description("Colors aliases from theme. I.e. `brand.400`"),
45
+ fontFamily: PropTypes.string.description("font-family aliases from theme. I.e. `default`"),
46
+ fontSize: PropTypes.string.description("any valid value format. I.e. `16px`"),
47
+ fontWeight: PropTypes.string.description("any alias from theme. I.e. `semibold`"),
48
+ height: PropTypes.string.description("any valid value format. I.e. `200px`"),
49
+ level: PropTypes.oneOf([1, 2, 3, 4, 5, 6]).description("Depth of header tag. I.e. level `2` renders a h2 tag").defaultValue(2),
50
+ lineHeight: PropTypes.number.description("float numbers for line-height. I.e. 1.5").defaultValue(1.2),
51
+ m: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin"),
52
+ mb: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin-bottom"),
53
+ ml: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin-left"),
54
+ mr: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin-right"),
55
+ mt: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin-top"),
56
+ mx: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin x"),
57
+ my: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("margin y"),
58
+ p: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding"),
59
+ pb: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding-bottom"),
60
+ pl: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding-left"),
61
+ pr: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding-right"),
62
+ pt: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding-top"),
63
+ px: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding x"),
64
+ py: PropTypes.oneOf(["xxs", "xs", "s", "m", "l", "xl", "xxl"]).description("padding y"),
65
+ text: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description("Header s text").isRequired,
66
+ width: PropTypes.string.description("text width")
80
67
  };
68
+ DSHeader.propTypes = headerProps;
81
69
  const HeaderWithSchema = describe(DSHeader);
82
70
  HeaderWithSchema.propTypes = headerProps;
83
-
84
- export { DSHeader, HeaderWithSchema, DSHeader as default };
71
+ var Header_default = DSHeader;
72
+ export {
73
+ DSHeader,
74
+ HeaderWithSchema,
75
+ Header_default as default
76
+ };
77
+ //# sourceMappingURL=Header.js.map
@@ -0,0 +1,7 @@
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,UA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MAAM,KAAK,KAAK,KAAK,MAAM,QAAQ,YAAY;AAAA,EAC3E,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;AAAA,EAC3E,MAAM,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,UAAU,YAAY,iBAAiB;AAAA,EAC9F,OAAO,UAAU,OAAO,YAAY;AAAA;AAGtC,SAAS,YAAY;AAErB,MAAM,mBAAmB,SAAS;AAClC,iBAAiB,YAAY;AAG7B,IAAO,iBAAQ;",
6
+ "names": []
7
+ }
package/esm/index.js CHANGED
@@ -1 +1,3 @@
1
- export { DSHeader, HeaderWithSchema } from './Header.js';
1
+ import * as React from "react";
2
+ export * from "./Header";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './Header';\n"],
5
+ "mappings": "AAAA;ACAA;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-header",
3
- "version": "2.2.0-next.4",
3
+ "version": "2.3.0-alpha.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Header",
6
6
  "module": "./esm/index.js",
package/types/Header.d.ts CHANGED
@@ -148,18 +148,7 @@ declare const DSHeader: {
148
148
  };
149
149
  };
150
150
  declare const HeaderWithSchema: {
151
- (props?: {
152
- [x: string]: any;
153
- color: any;
154
- fontFamily: any;
155
- fontSize: any;
156
- fontWeight: any;
157
- height: any;
158
- level: any;
159
- lineHeight: any;
160
- text: any;
161
- width: any;
162
- } | undefined): JSX.Element;
151
+ (props?: unknown): JSX.Element;
163
152
  propTypes: unknown;
164
153
  toTypescript: () => import("react-desc").TypescriptSchema;
165
154
  };