@elliemae/ds-label-value 2.3.0-alpha.8 → 2.3.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.
Files changed (56) hide show
  1. package/cjs/DSLabelValue.js +21 -0
  2. package/cjs/components/Group.js +47 -0
  3. package/cjs/components/Label.js +47 -0
  4. package/cjs/components/Value.js +55 -0
  5. package/cjs/components/Wrapper.js +62 -0
  6. package/cjs/components/defaultProps.js +31 -0
  7. package/cjs/components/props.js +47 -0
  8. package/cjs/index.js +18 -0
  9. package/esm/DSLabelValue.js +17 -0
  10. package/esm/components/Group.js +38 -0
  11. package/esm/components/Label.js +38 -0
  12. package/esm/components/Value.js +46 -0
  13. package/esm/components/Wrapper.js +52 -0
  14. package/{dist/esm → esm}/components/defaultProps.js +5 -15
  15. package/esm/components/props.js +40 -0
  16. package/esm/index.js +5 -0
  17. package/package.json +32 -34
  18. package/types/DSLabelValue.d.ts +168 -0
  19. package/types/components/Group.d.ts +40 -0
  20. package/types/components/Label.d.ts +29 -0
  21. package/types/components/Value.d.ts +39 -0
  22. package/types/components/Wrapper.d.ts +48 -0
  23. package/types/components/defaultProps.d.ts +20 -0
  24. package/types/components/props.d.ts +78 -0
  25. package/types/index.d.ts +1 -0
  26. package/dist/cjs/DSLabelValue.js +0 -49
  27. package/dist/cjs/DSLabelValue.js.map +0 -7
  28. package/dist/cjs/components/Group.js +0 -53
  29. package/dist/cjs/components/Group.js.map +0 -7
  30. package/dist/cjs/components/Label.js +0 -53
  31. package/dist/cjs/components/Label.js.map +0 -7
  32. package/dist/cjs/components/Value.js +0 -66
  33. package/dist/cjs/components/Value.js.map +0 -7
  34. package/dist/cjs/components/Wrapper.js +0 -56
  35. package/dist/cjs/components/Wrapper.js.map +0 -7
  36. package/dist/cjs/components/defaultProps.js +0 -58
  37. package/dist/cjs/components/defaultProps.js.map +0 -7
  38. package/dist/cjs/components/props.js +0 -71
  39. package/dist/cjs/components/props.js.map +0 -7
  40. package/dist/cjs/index.js +0 -40
  41. package/dist/cjs/index.js.map +0 -7
  42. package/dist/esm/DSLabelValue.js +0 -20
  43. package/dist/esm/DSLabelValue.js.map +0 -7
  44. package/dist/esm/components/Group.js +0 -24
  45. package/dist/esm/components/Group.js.map +0 -7
  46. package/dist/esm/components/Label.js +0 -24
  47. package/dist/esm/components/Label.js.map +0 -7
  48. package/dist/esm/components/Value.js +0 -37
  49. package/dist/esm/components/Value.js.map +0 -7
  50. package/dist/esm/components/Wrapper.js +0 -27
  51. package/dist/esm/components/Wrapper.js.map +0 -7
  52. package/dist/esm/components/defaultProps.js.map +0 -7
  53. package/dist/esm/components/props.js +0 -46
  54. package/dist/esm/components/props.js.map +0 -7
  55. package/dist/esm/index.js +0 -18
  56. package/dist/esm/index.js.map +0 -7
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Wrapper = require('./components/Wrapper.js');
6
+ var Group = require('./components/Group.js');
7
+ var Label = require('./components/Label.js');
8
+ var Value = require('./components/Value.js');
9
+
10
+ const DSLabelValue = Object.assign(Wrapper["default"], {
11
+ Group: Group["default"],
12
+ Wrapper: Wrapper["default"],
13
+ Label: Label["default"],
14
+ Value: Value["default"]
15
+ });
16
+
17
+ exports.WrapperWithSchema = Wrapper.WrapperWithSchema;
18
+ exports.GroupWithSchema = Group.GroupWithSchema;
19
+ exports.LabelWithSchema = Label.LabelWithSchema;
20
+ exports.ValueWithSchema = Value.ValueWithSchema;
21
+ exports["default"] = DSLabelValue;
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('react');
7
+ var reactDesc = require('react-desc');
8
+ var dsClassnames = require('@elliemae/ds-classnames');
9
+ var props = require('./props.js');
10
+ var defaultProps = require('./defaultProps.js');
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
15
+
16
+ const blockName = 'labelValueGroup';
17
+ const WrapperGroup = dsClassnames.aggregatedClasses('div')(blockName, 'wrapper', _ref => {
18
+ let {
19
+ orientation,
20
+ inline
21
+ } = _ref;
22
+ return {
23
+ inline,
24
+ [orientation]: orientation
25
+ };
26
+ });
27
+
28
+ const Group = _ref2 => {
29
+ let {
30
+ children,
31
+ inline,
32
+ orientation
33
+ } = _ref2;
34
+ return /*#__PURE__*/_jsx__default["default"](WrapperGroup, {
35
+ classProps: {
36
+ orientation,
37
+ inline
38
+ }
39
+ }, void 0, children);
40
+ };
41
+
42
+ Group.defaultProps = defaultProps.groupDefault;
43
+ const GroupWithSchema = reactDesc.describe(Group);
44
+ GroupWithSchema.propTypes = props.groupProps;
45
+
46
+ exports.GroupWithSchema = GroupWithSchema;
47
+ exports["default"] = Group;
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('react');
7
+ var reactDesc = require('react-desc');
8
+ var dsClassnames = require('@elliemae/ds-classnames');
9
+ var props = require('./props.js');
10
+ var defaultProps = require('./defaultProps.js');
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
15
+
16
+ const blockName = 'labelValue';
17
+ const LabelStyled = dsClassnames.aggregatedClasses('div')(blockName, 'label', _ref => {
18
+ let {
19
+ labelPosition,
20
+ labelColor
21
+ } = _ref;
22
+ return {
23
+ [labelPosition]: labelPosition,
24
+ [labelColor]: labelColor
25
+ };
26
+ });
27
+
28
+ const Label = _ref2 => {
29
+ let {
30
+ children,
31
+ position: labelPosition,
32
+ color
33
+ } = _ref2;
34
+ return /*#__PURE__*/_jsx__default["default"](LabelStyled, {
35
+ classProps: {
36
+ labelPosition,
37
+ color
38
+ }
39
+ }, void 0, children);
40
+ };
41
+
42
+ Label.defaultProps = defaultProps.labelDefault;
43
+ const LabelWithSchema = reactDesc.describe(Label);
44
+ LabelWithSchema.propTypes = props.labelProps;
45
+
46
+ exports.LabelWithSchema = LabelWithSchema;
47
+ exports["default"] = Label;
@@ -0,0 +1,55 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('react');
7
+ var reactDesc = require('react-desc');
8
+ var dsClassnames = require('@elliemae/ds-classnames');
9
+ var props = require('./props.js');
10
+ var defaultProps = require('./defaultProps.js');
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
15
+
16
+ const blockName = 'labelValue';
17
+ const ValueStyled = dsClassnames.aggregatedClasses('div')(blockName, 'value', _ref => {
18
+ let {
19
+ size,
20
+ valuePosition,
21
+ valueColor,
22
+ semibold
23
+ } = _ref;
24
+ return {
25
+ [size]: size,
26
+ [valuePosition]: valuePosition,
27
+ [valueColor]: valueColor,
28
+ semibold
29
+ };
30
+ });
31
+
32
+ const Value = _ref2 => {
33
+ let {
34
+ children,
35
+ position: valuePosition,
36
+ size,
37
+ color: valueColor,
38
+ semibold = false
39
+ } = _ref2;
40
+ return /*#__PURE__*/_jsx__default["default"](ValueStyled, {
41
+ classProps: {
42
+ size,
43
+ valuePosition,
44
+ valueColor,
45
+ semibold
46
+ }
47
+ }, void 0, /*#__PURE__*/_jsx__default["default"]("span", {}, void 0, children));
48
+ };
49
+
50
+ Value.defaultProps = defaultProps.valueDefault;
51
+ const ValueWithSchema = reactDesc.describe(Value);
52
+ ValueWithSchema.propTypes = props.valueProps;
53
+
54
+ exports.ValueWithSchema = ValueWithSchema;
55
+ exports["default"] = Value;
@@ -0,0 +1,62 @@
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 _jsx = require('@babel/runtime/helpers/jsx');
11
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
12
+ require('react');
13
+ var reactDesc = require('react-desc');
14
+ var dsClassnames = require('@elliemae/ds-classnames');
15
+ var props = require('./props.js');
16
+ var defaultProps = require('./defaultProps.js');
17
+ var jsxRuntime = require('react/jsx-runtime');
18
+
19
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
+
21
+ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
22
+ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
23
+
24
+ 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; }
25
+
26
+ 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; }
27
+ const blockName = 'labelValue';
28
+ const LabelValueWrapper = dsClassnames.aggregatedClasses('div')(blockName, 'label-value-wrapper', () => null);
29
+ const Container = dsClassnames.aggregatedClasses('div')(blockName, 'wrapper', _ref => {
30
+ let {
31
+ inverted
32
+ } = _ref;
33
+ return {
34
+ inverted
35
+ };
36
+ });
37
+
38
+ const Wrapper = _ref2 => {
39
+ let {
40
+ containerProps,
41
+ children,
42
+ className,
43
+ icon,
44
+ inverted
45
+ } = _ref2;
46
+ return /*#__PURE__*/_jsx__default["default"](Container, {
47
+ classProps: {
48
+ inverted
49
+ }
50
+ }, void 0, icon, /*#__PURE__*/jsxRuntime.jsx(LabelValueWrapper, _objectSpread(_objectSpread({
51
+ className: className
52
+ }, containerProps), {}, {
53
+ children: children
54
+ })));
55
+ };
56
+
57
+ Wrapper.defaultProps = defaultProps.wrapperDefault;
58
+ const WrapperWithSchema = reactDesc.describe(Wrapper);
59
+ WrapperWithSchema.propTypes = props.wrapperProps;
60
+
61
+ exports.WrapperWithSchema = WrapperWithSchema;
62
+ exports["default"] = Wrapper;
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var propTypes = require('@elliemae/ds-shared/prop-types');
6
+
7
+ const groupDefault = {
8
+ inline: false,
9
+ orientation: propTypes.orientationVariants.VERTICAL
10
+ };
11
+ const labelDefault = {
12
+ position: propTypes.position.LEFT,
13
+ color: propTypes.fontColor.NEUTRAL500
14
+ };
15
+ const valueDefault = {
16
+ position: propTypes.position.LEFT,
17
+ size: propTypes.sizeVariants.M,
18
+ color: propTypes.fontColor.NEUTRAL700,
19
+ semibold: false
20
+ };
21
+ const wrapperDefault = {
22
+ containerProps: {},
23
+ className: '',
24
+ icon: null,
25
+ inverted: false
26
+ };
27
+
28
+ exports.groupDefault = groupDefault;
29
+ exports.labelDefault = labelDefault;
30
+ exports.valueDefault = valueDefault;
31
+ exports.wrapperDefault = wrapperDefault;
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var reactDesc = require('react-desc');
6
+ var propTypes = require('@elliemae/ds-shared/prop-types');
7
+
8
+ const groupProps = {
9
+ /**
10
+ * The elements to be wrapped
11
+ */
12
+ children: reactDesc.PropTypes.element.description('The elements to be wrapped'),
13
+
14
+ /**
15
+ * If the label value should be inline
16
+ */
17
+ inline: reactDesc.PropTypes.bool.description('If the label value should be inline'),
18
+
19
+ /**
20
+ * 'vertical' or 'horizontal'
21
+ */
22
+ orientation: reactDesc.PropTypes.string.description("'vertical' or 'horizontal'")
23
+ };
24
+ const labelProps = {
25
+ children: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.element, reactDesc.PropTypes.string, reactDesc.PropTypes.number]).description('Label element').isRequired,
26
+ position: reactDesc.PropTypes.string.description('labels position').defaultValue(propTypes.position.LEFT),
27
+ color: reactDesc.PropTypes.string.description('labels color').defaultValue(propTypes.fontColor.NEUTRAL500)
28
+ };
29
+ const wrapperProps = {
30
+ containerProps: reactDesc.PropTypes.object.description('Set of Properties attached to the main container'),
31
+ className: reactDesc.PropTypes.string.description('html class attribute'),
32
+ icon: reactDesc.PropTypes.element.description('Icon to be attached near value'),
33
+ inverted: reactDesc.PropTypes.bool.description('Changes the position of the label').defaultValue(false),
34
+ children: reactDesc.PropTypes.element.description('label value').isRequired
35
+ };
36
+ const valueProps = {
37
+ children: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.element, reactDesc.PropTypes.string, reactDesc.PropTypes.number]).description('value element').isRequired,
38
+ size: reactDesc.PropTypes.func.description('values size').defaultValue(propTypes.sizeVariants.M),
39
+ position: reactDesc.PropTypes.string.description('position of the value').defaultValue(propTypes.position.LEFT),
40
+ color: reactDesc.PropTypes.string.description('value color').defaultValue(propTypes.fontColor.NEUTRAL700),
41
+ semibold: reactDesc.PropTypes.bool.description('semibold or not').defaultValue(false)
42
+ };
43
+
44
+ exports.groupProps = groupProps;
45
+ exports.labelProps = labelProps;
46
+ exports.valueProps = valueProps;
47
+ exports.wrapperProps = wrapperProps;
package/cjs/index.js ADDED
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DSLabelValue = require('./DSLabelValue.js');
6
+ var Wrapper = require('./components/Wrapper.js');
7
+ var Group = require('./components/Group.js');
8
+ var Label = require('./components/Label.js');
9
+ var Value = require('./components/Value.js');
10
+
11
+
12
+
13
+ exports.DSLabelValue = DSLabelValue["default"];
14
+ exports["default"] = DSLabelValue["default"];
15
+ exports.WrapperWithSchema = Wrapper.WrapperWithSchema;
16
+ exports.GroupWithSchema = Group.GroupWithSchema;
17
+ exports.LabelWithSchema = Label.LabelWithSchema;
18
+ exports.ValueWithSchema = Value.ValueWithSchema;
@@ -0,0 +1,17 @@
1
+ import Wrapper from './components/Wrapper.js';
2
+ export { WrapperWithSchema } from './components/Wrapper.js';
3
+ import Group from './components/Group.js';
4
+ export { GroupWithSchema } from './components/Group.js';
5
+ import Label from './components/Label.js';
6
+ export { LabelWithSchema } from './components/Label.js';
7
+ import Value from './components/Value.js';
8
+ export { ValueWithSchema } from './components/Value.js';
9
+
10
+ const DSLabelValue = Object.assign(Wrapper, {
11
+ Group,
12
+ Wrapper,
13
+ Label,
14
+ Value
15
+ });
16
+
17
+ export { DSLabelValue as default };
@@ -0,0 +1,38 @@
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { describe } from 'react-desc';
4
+ import { aggregatedClasses } from '@elliemae/ds-classnames';
5
+ import { groupProps } from './props.js';
6
+ import { groupDefault } from './defaultProps.js';
7
+
8
+ const blockName = 'labelValueGroup';
9
+ const WrapperGroup = aggregatedClasses('div')(blockName, 'wrapper', _ref => {
10
+ let {
11
+ orientation,
12
+ inline
13
+ } = _ref;
14
+ return {
15
+ inline,
16
+ [orientation]: orientation
17
+ };
18
+ });
19
+
20
+ const Group = _ref2 => {
21
+ let {
22
+ children,
23
+ inline,
24
+ orientation
25
+ } = _ref2;
26
+ return /*#__PURE__*/_jsx(WrapperGroup, {
27
+ classProps: {
28
+ orientation,
29
+ inline
30
+ }
31
+ }, void 0, children);
32
+ };
33
+
34
+ Group.defaultProps = groupDefault;
35
+ const GroupWithSchema = describe(Group);
36
+ GroupWithSchema.propTypes = groupProps;
37
+
38
+ export { GroupWithSchema, Group as default };
@@ -0,0 +1,38 @@
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { describe } from 'react-desc';
4
+ import { aggregatedClasses } from '@elliemae/ds-classnames';
5
+ import { labelProps } from './props.js';
6
+ import { labelDefault } from './defaultProps.js';
7
+
8
+ const blockName = 'labelValue';
9
+ const LabelStyled = aggregatedClasses('div')(blockName, 'label', _ref => {
10
+ let {
11
+ labelPosition,
12
+ labelColor
13
+ } = _ref;
14
+ return {
15
+ [labelPosition]: labelPosition,
16
+ [labelColor]: labelColor
17
+ };
18
+ });
19
+
20
+ const Label = _ref2 => {
21
+ let {
22
+ children,
23
+ position: labelPosition,
24
+ color
25
+ } = _ref2;
26
+ return /*#__PURE__*/_jsx(LabelStyled, {
27
+ classProps: {
28
+ labelPosition,
29
+ color
30
+ }
31
+ }, void 0, children);
32
+ };
33
+
34
+ Label.defaultProps = labelDefault;
35
+ const LabelWithSchema = describe(Label);
36
+ LabelWithSchema.propTypes = labelProps;
37
+
38
+ export { LabelWithSchema, Label as default };
@@ -0,0 +1,46 @@
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { describe } from 'react-desc';
4
+ import { aggregatedClasses } from '@elliemae/ds-classnames';
5
+ import { valueProps } from './props.js';
6
+ import { valueDefault } from './defaultProps.js';
7
+
8
+ const blockName = 'labelValue';
9
+ const ValueStyled = aggregatedClasses('div')(blockName, 'value', _ref => {
10
+ let {
11
+ size,
12
+ valuePosition,
13
+ valueColor,
14
+ semibold
15
+ } = _ref;
16
+ return {
17
+ [size]: size,
18
+ [valuePosition]: valuePosition,
19
+ [valueColor]: valueColor,
20
+ semibold
21
+ };
22
+ });
23
+
24
+ const Value = _ref2 => {
25
+ let {
26
+ children,
27
+ position: valuePosition,
28
+ size,
29
+ color: valueColor,
30
+ semibold = false
31
+ } = _ref2;
32
+ return /*#__PURE__*/_jsx(ValueStyled, {
33
+ classProps: {
34
+ size,
35
+ valuePosition,
36
+ valueColor,
37
+ semibold
38
+ }
39
+ }, void 0, /*#__PURE__*/_jsx("span", {}, void 0, children));
40
+ };
41
+
42
+ Value.defaultProps = valueDefault;
43
+ const ValueWithSchema = describe(Value);
44
+ ValueWithSchema.propTypes = valueProps;
45
+
46
+ export { ValueWithSchema, Value as default };
@@ -0,0 +1,52 @@
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 _jsx from '@babel/runtime/helpers/esm/jsx';
7
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
+ import 'react';
9
+ import { describe } from 'react-desc';
10
+ import { aggregatedClasses } from '@elliemae/ds-classnames';
11
+ import { wrapperProps } from './props.js';
12
+ import { wrapperDefault } from './defaultProps.js';
13
+ import { jsx } from 'react/jsx-runtime';
14
+
15
+ 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; }
16
+
17
+ 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; }
18
+ const blockName = 'labelValue';
19
+ const LabelValueWrapper = aggregatedClasses('div')(blockName, 'label-value-wrapper', () => null);
20
+ const Container = aggregatedClasses('div')(blockName, 'wrapper', _ref => {
21
+ let {
22
+ inverted
23
+ } = _ref;
24
+ return {
25
+ inverted
26
+ };
27
+ });
28
+
29
+ const Wrapper = _ref2 => {
30
+ let {
31
+ containerProps,
32
+ children,
33
+ className,
34
+ icon,
35
+ inverted
36
+ } = _ref2;
37
+ return /*#__PURE__*/_jsx(Container, {
38
+ classProps: {
39
+ inverted
40
+ }
41
+ }, void 0, icon, /*#__PURE__*/jsx(LabelValueWrapper, _objectSpread(_objectSpread({
42
+ className: className
43
+ }, containerProps), {}, {
44
+ children: children
45
+ })));
46
+ };
47
+
48
+ Wrapper.defaultProps = wrapperDefault;
49
+ const WrapperWithSchema = describe(Wrapper);
50
+ WrapperWithSchema.propTypes = wrapperProps;
51
+
52
+ export { WrapperWithSchema, Wrapper as default };
@@ -1,10 +1,5 @@
1
- import * as React from "react";
2
- import {
3
- orientationVariants,
4
- position,
5
- sizeVariants,
6
- fontColor
7
- } from "@elliemae/ds-shared/prop-types";
1
+ import { orientationVariants, position, fontColor, sizeVariants } from '@elliemae/ds-shared/prop-types';
2
+
8
3
  const groupDefault = {
9
4
  inline: false,
10
5
  orientation: orientationVariants.VERTICAL
@@ -21,14 +16,9 @@ const valueDefault = {
21
16
  };
22
17
  const wrapperDefault = {
23
18
  containerProps: {},
24
- className: "",
19
+ className: '',
25
20
  icon: null,
26
21
  inverted: false
27
22
  };
28
- export {
29
- groupDefault,
30
- labelDefault,
31
- valueDefault,
32
- wrapperDefault
33
- };
34
- //# sourceMappingURL=defaultProps.js.map
23
+
24
+ export { groupDefault, labelDefault, valueDefault, wrapperDefault };
@@ -0,0 +1,40 @@
1
+ import { PropTypes } from 'react-desc';
2
+ import { position, fontColor, sizeVariants } from '@elliemae/ds-shared/prop-types';
3
+
4
+ const groupProps = {
5
+ /**
6
+ * The elements to be wrapped
7
+ */
8
+ children: PropTypes.element.description('The elements to be wrapped'),
9
+
10
+ /**
11
+ * If the label value should be inline
12
+ */
13
+ inline: PropTypes.bool.description('If the label value should be inline'),
14
+
15
+ /**
16
+ * 'vertical' or 'horizontal'
17
+ */
18
+ orientation: PropTypes.string.description("'vertical' or 'horizontal'")
19
+ };
20
+ const labelProps = {
21
+ children: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.number]).description('Label element').isRequired,
22
+ position: PropTypes.string.description('labels position').defaultValue(position.LEFT),
23
+ color: PropTypes.string.description('labels color').defaultValue(fontColor.NEUTRAL500)
24
+ };
25
+ const wrapperProps = {
26
+ containerProps: PropTypes.object.description('Set of Properties attached to the main container'),
27
+ className: PropTypes.string.description('html class attribute'),
28
+ icon: PropTypes.element.description('Icon to be attached near value'),
29
+ inverted: PropTypes.bool.description('Changes the position of the label').defaultValue(false),
30
+ children: PropTypes.element.description('label value').isRequired
31
+ };
32
+ const valueProps = {
33
+ children: PropTypes.oneOfType([PropTypes.element, PropTypes.string, PropTypes.number]).description('value element').isRequired,
34
+ size: PropTypes.func.description('values size').defaultValue(sizeVariants.M),
35
+ position: PropTypes.string.description('position of the value').defaultValue(position.LEFT),
36
+ color: PropTypes.string.description('value color').defaultValue(fontColor.NEUTRAL700),
37
+ semibold: PropTypes.bool.description('semibold or not').defaultValue(false)
38
+ };
39
+
40
+ export { groupProps, labelProps, valueProps, wrapperProps };
package/esm/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export { default as DSLabelValue, default } from './DSLabelValue.js';
2
+ export { WrapperWithSchema } from './components/Wrapper.js';
3
+ export { GroupWithSchema } from './components/Group.js';
4
+ export { LabelWithSchema } from './components/Label.js';
5
+ export { ValueWithSchema } from './components/Value.js';