@elliemae/ds-label-value 2.3.0-next.0 → 3.0.0-alpha.0
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/dist/cjs/DSLabelValue.js +49 -0
- package/dist/cjs/DSLabelValue.js.map +7 -0
- package/dist/cjs/components/Group.js +53 -0
- package/dist/cjs/components/Group.js.map +7 -0
- package/dist/cjs/components/Label.js +53 -0
- package/dist/cjs/components/Label.js.map +7 -0
- package/dist/cjs/components/Value.js +66 -0
- package/dist/cjs/components/Value.js.map +7 -0
- package/dist/cjs/components/Wrapper.js +56 -0
- package/dist/cjs/components/Wrapper.js.map +7 -0
- package/dist/cjs/components/defaultProps.js +58 -0
- package/dist/cjs/components/defaultProps.js.map +7 -0
- package/dist/cjs/components/props.js +71 -0
- package/dist/cjs/components/props.js.map +7 -0
- package/dist/cjs/index.js +40 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/esm/DSLabelValue.js +20 -0
- package/dist/esm/DSLabelValue.js.map +7 -0
- package/dist/esm/components/Group.js +24 -0
- package/dist/esm/components/Group.js.map +7 -0
- package/dist/esm/components/Label.js +24 -0
- package/dist/esm/components/Label.js.map +7 -0
- package/dist/esm/components/Value.js +37 -0
- package/dist/esm/components/Value.js.map +7 -0
- package/dist/esm/components/Wrapper.js +27 -0
- package/dist/esm/components/Wrapper.js.map +7 -0
- package/{esm → dist/esm}/components/defaultProps.js +15 -5
- package/dist/esm/components/defaultProps.js.map +7 -0
- package/dist/esm/components/props.js +46 -0
- package/dist/esm/components/props.js.map +7 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +7 -0
- package/{types → dist/types}/DSLabelValue.d.ts +0 -0
- package/{types → dist/types}/components/Group.d.ts +0 -0
- package/{types → dist/types}/components/Label.d.ts +0 -0
- package/{types → dist/types}/components/Value.d.ts +0 -0
- package/{types → dist/types}/components/Wrapper.d.ts +0 -0
- package/{types → dist/types}/components/defaultProps.d.ts +0 -0
- package/{types → dist/types}/components/props.d.ts +0 -0
- package/{types → dist/types}/index.d.ts +0 -0
- package/package.json +39 -31
- package/cjs/DSLabelValue.js +0 -21
- package/cjs/components/Group.js +0 -47
- package/cjs/components/Label.js +0 -47
- package/cjs/components/Value.js +0 -55
- package/cjs/components/Wrapper.js +0 -62
- package/cjs/components/defaultProps.js +0 -31
- package/cjs/components/props.js +0 -47
- package/cjs/index.js +0 -18
- package/esm/DSLabelValue.js +0 -17
- package/esm/components/Group.js +0 -38
- package/esm/components/Label.js +0 -38
- package/esm/components/Value.js +0 -46
- package/esm/components/Wrapper.js +0 -52
- package/esm/components/props.js +0 -40
- package/esm/index.js +0 -5
package/cjs/components/props.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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;
|
package/esm/DSLabelValue.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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 };
|
package/esm/components/Group.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
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 };
|
package/esm/components/Label.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
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 };
|
package/esm/components/Value.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
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 };
|
|
@@ -1,52 +0,0 @@
|
|
|
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 };
|
package/esm/components/props.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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';
|