@elliemae/ds-group-box 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 (65) hide show
  1. package/cjs/ActionItem.js +24 -0
  2. package/cjs/Actions.js +37 -0
  3. package/cjs/DSGroupBox.js +140 -0
  4. package/cjs/GroupBoxLabel.js +40 -0
  5. package/cjs/LabelElement.js +24 -0
  6. package/cjs/components/GroupHeader.js +53 -0
  7. package/cjs/components/blocks.js +56 -0
  8. package/cjs/constants.js +12 -0
  9. package/cjs/index.js +14 -0
  10. package/esm/ActionItem.js +17 -0
  11. package/esm/Actions.js +27 -0
  12. package/esm/DSGroupBox.js +128 -0
  13. package/esm/GroupBoxLabel.js +33 -0
  14. package/esm/LabelElement.js +17 -0
  15. package/esm/components/GroupHeader.js +44 -0
  16. package/esm/components/blocks.js +50 -0
  17. package/esm/constants.js +7 -0
  18. package/esm/index.js +2 -0
  19. package/package.json +37 -39
  20. package/types/ActionItem.d.ts +11 -0
  21. package/types/Actions.d.ts +16 -0
  22. package/types/DSGroupBox.d.ts +113 -0
  23. package/types/GroupBoxLabel.d.ts +21 -0
  24. package/types/LabelElement.d.ts +11 -0
  25. package/types/components/GroupHeader.d.ts +13 -0
  26. package/types/components/blocks.d.ts +4 -0
  27. package/types/constants.d.ts +5 -0
  28. package/types/index.d.ts +3 -0
  29. package/types/tests/DSGroupBox.test.d.ts +1 -0
  30. package/dist/cjs/ActionItem.js +0 -55
  31. package/dist/cjs/ActionItem.js.map +0 -7
  32. package/dist/cjs/Actions.js +0 -64
  33. package/dist/cjs/Actions.js.map +0 -7
  34. package/dist/cjs/DSGroupBox.js +0 -106
  35. package/dist/cjs/DSGroupBox.js.map +0 -7
  36. package/dist/cjs/GroupBoxLabel.js +0 -83
  37. package/dist/cjs/GroupBoxLabel.js.map +0 -7
  38. package/dist/cjs/LabelElement.js +0 -52
  39. package/dist/cjs/LabelElement.js.map +0 -7
  40. package/dist/cjs/components/GroupHeader.js +0 -69
  41. package/dist/cjs/components/GroupHeader.js.map +0 -7
  42. package/dist/cjs/components/blocks.js +0 -58
  43. package/dist/cjs/components/blocks.js.map +0 -7
  44. package/dist/cjs/constants.js +0 -40
  45. package/dist/cjs/constants.js.map +0 -7
  46. package/dist/cjs/index.js +0 -37
  47. package/dist/cjs/index.js.map +0 -7
  48. package/dist/esm/ActionItem.js +0 -26
  49. package/dist/esm/ActionItem.js.map +0 -7
  50. package/dist/esm/Actions.js +0 -35
  51. package/dist/esm/Actions.js.map +0 -7
  52. package/dist/esm/DSGroupBox.js +0 -77
  53. package/dist/esm/DSGroupBox.js.map +0 -7
  54. package/dist/esm/GroupBoxLabel.js +0 -54
  55. package/dist/esm/GroupBoxLabel.js.map +0 -7
  56. package/dist/esm/LabelElement.js +0 -23
  57. package/dist/esm/LabelElement.js.map +0 -7
  58. package/dist/esm/components/GroupHeader.js +0 -40
  59. package/dist/esm/components/GroupHeader.js.map +0 -7
  60. package/dist/esm/components/blocks.js +0 -29
  61. package/dist/esm/components/blocks.js.map +0 -7
  62. package/dist/esm/constants.js +0 -11
  63. package/dist/esm/constants.js.map +0 -7
  64. package/dist/esm/index.js +0 -8
  65. package/dist/esm/index.js.map +0 -7
@@ -0,0 +1,44 @@
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';
4
+ import { BOX_TYPES } from '../constants.js';
5
+ import { Actions } from '../Actions.js';
6
+ import LabelElement from '../LabelElement.js';
7
+ import GroupBoxLabel from '../GroupBoxLabel.js';
8
+
9
+ const DSGroupBoxHeader = _ref => {
10
+ let {
11
+ labelProps = {
12
+ labelText: '',
13
+ borderBottom: false,
14
+ id: 'ds-group-box__header'
15
+ },
16
+ rightActions = [],
17
+ centerActions = [],
18
+ type = BOX_TYPES.CATEGORY,
19
+ noBorder,
20
+ isMain
21
+ } = _ref;
22
+ const {
23
+ labelText,
24
+ borderBottom,
25
+ id
26
+ } = labelProps;
27
+ return /*#__PURE__*/_jsx(GroupBoxLabel, {
28
+ borderBottom: borderBottom,
29
+ isMain: isMain,
30
+ noBorder: noBorder,
31
+ type: type,
32
+ id: id
33
+ }, void 0, /*#__PURE__*/_jsx(LabelElement, {}, void 0, /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
34
+ value: labelText
35
+ })), /*#__PURE__*/_jsx(Actions, {
36
+ actions: centerActions,
37
+ centerActions: centerActions.length > 0
38
+ }), /*#__PURE__*/_jsx(Actions, {
39
+ actions: rightActions,
40
+ rightActions: rightActions.length > 0
41
+ }));
42
+ };
43
+
44
+ export { DSGroupBoxHeader };
@@ -0,0 +1,50 @@
1
+ import { aggregatedClasses } from '@elliemae/ds-classnames';
2
+
3
+ const blockName = 'group-box';
4
+ const GroupBoxWrapper = aggregatedClasses('div')(blockName, 'wrapper', _ref => {
5
+ let {
6
+ onlyHeader,
7
+ noBorder,
8
+ type,
9
+ isMain
10
+ } = _ref;
11
+ return {
12
+ 'only-header': onlyHeader,
13
+ 'no-border': noBorder,
14
+ [type]: type,
15
+ 'main-box': isMain,
16
+ 'nested-box': !isMain
17
+ };
18
+ });
19
+ const GroupBoxContent = aggregatedClasses('div')(blockName, 'content', _ref2 => {
20
+ let {
21
+ type,
22
+ asRow,
23
+ onlyHeader,
24
+ noPadding,
25
+ noBorder,
26
+ noBorderTop
27
+ } = _ref2;
28
+ return {
29
+ [type]: type,
30
+ 'as-row': asRow,
31
+ 'only-header': onlyHeader,
32
+ 'no-padding': noPadding,
33
+ 'no-border': noBorder,
34
+ 'no-border-top': noBorderTop
35
+ };
36
+ });
37
+ const Label = aggregatedClasses('div')(blockName, 'label', _ref3 => {
38
+ let {
39
+ borderBottom,
40
+ type,
41
+ noBorder
42
+ } = _ref3;
43
+ return {
44
+ 'border-bottom': borderBottom,
45
+ [type]: type,
46
+ 'no-border': noBorder
47
+ };
48
+ });
49
+
50
+ export { GroupBoxContent, GroupBoxWrapper, Label };
@@ -0,0 +1,7 @@
1
+ const BOX_TYPES = {
2
+ CATEGORY: 'category-box',
3
+ GROUP: 'group-box'
4
+ };
5
+ const BOX_TYPES_ARRAY = [BOX_TYPES.CATEGORY, BOX_TYPES.GROUP];
6
+
7
+ export { BOX_TYPES, BOX_TYPES_ARRAY };
package/esm/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { DSGroupBox, DSGroupBoxWithSchema, DSGroupBox as default } from './DSGroupBox.js';
2
+ export { BOX_TYPES, BOX_TYPES_ARRAY } from './constants.js';
package/package.json CHANGED
@@ -1,50 +1,47 @@
1
1
  {
2
2
  "name": "@elliemae/ds-group-box",
3
- "version": "2.3.0-alpha.8",
3
+ "version": "2.3.0-next.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Group Box",
6
- "files": [
7
- "dist"
8
- ],
9
- "module": "./dist/esm/index.js",
10
- "main": "./dist/cjs/index.js",
11
- "types": "./dist/types/index.d.ts",
6
+ "module": "./esm/index.js",
7
+ "main": "./cjs/index.js",
8
+ "types": "./types/index.d.ts",
12
9
  "exports": {
13
10
  ".": {
14
- "import": "./dist/esm/index.js",
15
- "require": "./dist/cjs/index.js"
11
+ "import": "./esm/index.js",
12
+ "require": "./cjs/index.js"
16
13
  },
17
14
  "./LabelElement": {
18
- "import": "./dist/esm/LabelElement.js",
19
- "require": "./dist/cjs/LabelElement.js"
15
+ "import": "./esm/LabelElement.js",
16
+ "require": "./cjs/LabelElement.js"
20
17
  },
21
18
  "./GroupBoxLabel": {
22
- "import": "./dist/esm/GroupBoxLabel.js",
23
- "require": "./dist/cjs/GroupBoxLabel.js"
19
+ "import": "./esm/GroupBoxLabel.js",
20
+ "require": "./cjs/GroupBoxLabel.js"
24
21
  },
25
22
  "./DSGroupBox": {
26
- "import": "./dist/esm/DSGroupBox.js",
27
- "require": "./dist/cjs/DSGroupBox.js"
23
+ "import": "./esm/DSGroupBox.js",
24
+ "require": "./cjs/DSGroupBox.js"
28
25
  },
29
26
  "./constants": {
30
- "import": "./dist/esm/constants.js",
31
- "require": "./dist/cjs/constants.js"
27
+ "import": "./esm/constants.js",
28
+ "require": "./cjs/constants.js"
32
29
  },
33
30
  "./components/GroupHeader": {
34
- "import": "./dist/esm/components/GroupHeader.js",
35
- "require": "./dist/cjs/components/GroupHeader.js"
31
+ "import": "./esm/components/GroupHeader.js",
32
+ "require": "./cjs/components/GroupHeader.js"
36
33
  },
37
34
  "./components/blocks": {
38
- "import": "./dist/esm/components/blocks.js",
39
- "require": "./dist/cjs/components/blocks.js"
35
+ "import": "./esm/components/blocks.js",
36
+ "require": "./cjs/components/blocks.js"
40
37
  },
41
38
  "./Actions": {
42
- "import": "./dist/esm/Actions.js",
43
- "require": "./dist/cjs/Actions.js"
39
+ "import": "./esm/Actions.js",
40
+ "require": "./cjs/Actions.js"
44
41
  },
45
42
  "./ActionItem": {
46
- "import": "./dist/esm/ActionItem.js",
47
- "require": "./dist/cjs/ActionItem.js"
43
+ "import": "./esm/ActionItem.js",
44
+ "require": "./cjs/ActionItem.js"
48
45
  }
49
46
  },
50
47
  "sideEffects": [
@@ -56,20 +53,26 @@
56
53
  "url": "https://git.elliemae.io/platform-ui/dimsum.git"
57
54
  },
58
55
  "engines": {
59
- "pnpm": ">=6",
60
- "node": ">=16"
56
+ "npm": ">=7",
57
+ "node": ">=14"
61
58
  },
62
59
  "author": "ICE MT",
60
+ "scripts": {
61
+ "dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
62
+ "prebuild": "exit 0",
63
+ "predev": "exit 0",
64
+ "build": "node ../../scripts/build/build.js"
65
+ },
63
66
  "dependencies": {
64
- "@elliemae/ds-classnames": "2.3.0-alpha.8",
65
- "@elliemae/ds-system": "2.3.0-alpha.8",
66
- "@elliemae/ds-truncated-tooltip-text": "2.3.0-alpha.8",
67
- "@xstyled/styled-components": "~3.1.2",
67
+ "@elliemae/ds-classnames": "2.3.0-next.2",
68
+ "@elliemae/ds-system": "2.3.0-next.1",
69
+ "@elliemae/ds-truncated-tooltip-text": "2.3.0-next.2",
70
+ "@xstyled/styled-components": "~3.1.1",
68
71
  "prop-types": "~15.7.2",
69
72
  "react-desc": "~4.1.3"
70
73
  },
71
74
  "devDependencies": {
72
- "@testing-library/jest-dom": "~5.15.1",
75
+ "@testing-library/jest-dom": "~5.15.0",
73
76
  "@testing-library/react": "~12.1.2",
74
77
  "styled-components": "~5.3.3",
75
78
  "styled-system": "~5.1.5"
@@ -82,12 +85,7 @@
82
85
  },
83
86
  "publishConfig": {
84
87
  "access": "public",
85
- "typeSafety": false
86
- },
87
- "scripts": {
88
- "dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
89
- "prebuild": "exit 0",
90
- "predev": "exit 0",
91
- "build": "node ../../scripts/build/build.js"
88
+ "directory": "dist",
89
+ "generateSubmodules": true
92
90
  }
93
91
  }
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import PropTypes from 'prop-types';
3
+ declare function ActionItem({ children }: {
4
+ children: any;
5
+ }): JSX.Element;
6
+ declare namespace ActionItem {
7
+ var propTypes: {
8
+ children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
9
+ };
10
+ }
11
+ export default ActionItem;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import PropTypes from 'prop-types';
3
+ declare function Actions({ actions, centerActions, rightActions }: {
4
+ actions?: never[] | undefined;
5
+ centerActions: any;
6
+ rightActions: any;
7
+ }): JSX.Element | null;
8
+ declare namespace Actions {
9
+ var propTypes: {
10
+ actions: PropTypes.Requireable<any[]>;
11
+ centerActions: PropTypes.Requireable<boolean>;
12
+ rightActions: PropTypes.Requireable<boolean>;
13
+ };
14
+ }
15
+ export { Actions };
16
+ export default Actions;
@@ -0,0 +1,113 @@
1
+ /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
+ /// <reference types="react" />
3
+ declare const DSGroupBox: {
4
+ ({ containerProps, labelProps, rightActions, centerActions, type, asRow, onlyHeader, noBorder, noPadding, children: components, isMain, }: {
5
+ containerProps?: {} | undefined;
6
+ labelProps?: {
7
+ labelText: string;
8
+ borderBottom: boolean;
9
+ id: string;
10
+ } | undefined;
11
+ rightActions?: never[] | undefined;
12
+ centerActions?: never[] | undefined;
13
+ type?: string | undefined;
14
+ asRow?: boolean | undefined;
15
+ onlyHeader?: boolean | undefined;
16
+ noBorder?: boolean | undefined;
17
+ noPadding?: boolean | undefined;
18
+ children?: never[] | undefined;
19
+ isMain?: boolean | undefined;
20
+ }): JSX.Element;
21
+ propTypes: {
22
+ /** props to inject to wrapper */
23
+ containerProps: {
24
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
25
+ deprecated: import("react-desc").PropTypesDescValidator;
26
+ };
27
+ isRequired: import("react-desc").PropTypesDescValue;
28
+ };
29
+ /**
30
+ * Label attributes to be rendered
31
+ */
32
+ labelProps: {
33
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
34
+ deprecated: import("react-desc").PropTypesDescValidator;
35
+ };
36
+ isRequired: import("react-desc").PropTypesDescValue;
37
+ };
38
+ /**
39
+ * ['category-box', 'group-box']
40
+ */
41
+ type: {
42
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
43
+ deprecated: import("react-desc").PropTypesDescValidator;
44
+ };
45
+ isRequired: import("react-desc").PropTypesDescValue;
46
+ };
47
+ /**
48
+ * Components to be rendered inside the box
49
+ */
50
+ children: any;
51
+ /**
52
+ * Actions on the right side of the label
53
+ */
54
+ rightActions: {
55
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
56
+ deprecated: import("react-desc").PropTypesDescValidator;
57
+ };
58
+ isRequired: import("react-desc").PropTypesDescValue;
59
+ };
60
+ /**
61
+ * Actions on the next to the label
62
+ */
63
+ centerActions: {
64
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
65
+ deprecated: import("react-desc").PropTypesDescValidator;
66
+ };
67
+ isRequired: import("react-desc").PropTypesDescValue;
68
+ };
69
+ /**
70
+ * Display the content of the group box with flex direction row
71
+ */
72
+ asRow: {
73
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
74
+ deprecated: import("react-desc").PropTypesDescValidator;
75
+ };
76
+ isRequired: import("react-desc").PropTypesDescValue;
77
+ };
78
+ /**
79
+ * Show border only on the header
80
+ */
81
+ onlyHeader: {
82
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
83
+ deprecated: import("react-desc").PropTypesDescValidator;
84
+ };
85
+ isRequired: import("react-desc").PropTypesDescValue;
86
+ };
87
+ /**
88
+ * Remove the wrapper border
89
+ */
90
+ noBorder: {
91
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
92
+ deprecated: import("react-desc").PropTypesDescValidator;
93
+ };
94
+ isRequired: import("react-desc").PropTypesDescValue;
95
+ };
96
+ /**
97
+ * Remove the top and bottom padding from the content
98
+ */
99
+ noPadding: {
100
+ defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
101
+ deprecated: import("react-desc").PropTypesDescValidator;
102
+ };
103
+ isRequired: import("react-desc").PropTypesDescValue;
104
+ };
105
+ };
106
+ };
107
+ declare const DSGroupBoxWithSchema: {
108
+ (props?: unknown): JSX.Element;
109
+ propTypes: unknown;
110
+ toTypescript: () => import("react-desc").TypescriptSchema;
111
+ };
112
+ export { DSGroupBox, DSGroupBoxWithSchema };
113
+ export default DSGroupBox;
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ import PropTypes from 'prop-types';
3
+ declare function GroupBoxLabel({ borderBottom, children, noBorder, isMain, type, id }: {
4
+ borderBottom: any;
5
+ children: any;
6
+ noBorder: any;
7
+ isMain: any;
8
+ type: any;
9
+ id: any;
10
+ }): JSX.Element;
11
+ declare namespace GroupBoxLabel {
12
+ var propTypes: {
13
+ children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
14
+ type: PropTypes.Requireable<string>;
15
+ borderBottom: PropTypes.Requireable<boolean>;
16
+ isMain: PropTypes.Validator<boolean>;
17
+ noBorder: PropTypes.Requireable<boolean>;
18
+ id: PropTypes.Requireable<string>;
19
+ };
20
+ }
21
+ export default GroupBoxLabel;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import PropTypes from 'prop-types';
3
+ declare function LabelElement({ children }: {
4
+ children: any;
5
+ }): JSX.Element;
6
+ declare namespace LabelElement {
7
+ var propTypes: {
8
+ children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
9
+ };
10
+ }
11
+ export default LabelElement;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ export declare const DSGroupBoxHeader: ({ labelProps, rightActions, centerActions, type, noBorder, isMain, }: {
3
+ labelProps?: {
4
+ labelText: string;
5
+ borderBottom: boolean;
6
+ id: string;
7
+ } | undefined;
8
+ rightActions?: never[] | undefined;
9
+ centerActions?: never[] | undefined;
10
+ type?: string | undefined;
11
+ noBorder: any;
12
+ isMain: any;
13
+ }) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const GroupBoxWrapper: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
3
+ export declare const GroupBoxContent: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
4
+ export declare const Label: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
@@ -0,0 +1,5 @@
1
+ export declare const BOX_TYPES: {
2
+ CATEGORY: string;
3
+ GROUP: string;
4
+ };
5
+ export declare const BOX_TYPES_ARRAY: string[];
@@ -0,0 +1,3 @@
1
+ export * from './DSGroupBox';
2
+ export * from './constants';
3
+ export { default } from './DSGroupBox';
@@ -0,0 +1 @@
1
+ export {};
@@ -1,55 +0,0 @@
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 });
11
- };
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 ActionItem_exports = {};
29
- __export(ActionItem_exports, {
30
- default: () => ActionItem_default
31
- });
32
- var React = __toESM(require("react"));
33
- var import_react = __toESM(require("react"));
34
- var import_styled_components = __toESM(require("styled-components"));
35
- var import_ds_system = require("@elliemae/ds-system");
36
- var import_prop_types = __toESM(require("prop-types"));
37
- const ActionItemNode = import_styled_components.default.div`
38
- padding-right: ${(props) => (0, import_ds_system.__UNSAFE_SPACE_TO_DIMSUM)(props.theme.space.xs)};
39
- font-weight: 300;
40
- overflow: hidden;
41
- align-items: center;
42
- display: flex;
43
- &:last-child {
44
- padding-right: 0;
45
- }
46
- `;
47
- function ActionItem({ children }) {
48
- return /* @__PURE__ */ import_react.default.createElement(ActionItemNode, null, children);
49
- }
50
- ActionItem.propTypes = {
51
- children: import_prop_types.default.node.isRequired
52
- };
53
- var ActionItem_default = ActionItem;
54
- module.exports = __toCommonJS(ActionItem_exports);
55
- //# sourceMappingURL=ActionItem.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/ActionItem.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport styled from 'styled-components';\nimport { __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport PropTypes from 'prop-types';\n\nconst ActionItemNode = styled.div`\n padding-right: ${props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};\n font-weight: 300;\n overflow: hidden;\n align-items: center;\n display: flex;\n &:last-child {\n padding-right: 0;\n }\n`;\n\nfunction ActionItem({ children }) {\n return <ActionItemNode>{children}</ActionItemNode>;\n}\n\nActionItem.propTypes = {\n children: PropTypes.node.isRequired,\n};\n\nexport default ActionItem;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,+BAAmB;AACnB,uBAAyC;AACzC,wBAAsB;AAEtB,MAAM,iBAAiB,iCAAO;AAAA,mBACX,WAAS,+CAAyB,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUvE,oBAAoB,EAAE,YAAY;AAChC,SAAO,mDAAC,gBAAD,MAAiB;AAAA;AAG1B,WAAW,YAAY;AAAA,EACrB,UAAU,0BAAU,KAAK;AAAA;AAG3B,IAAO,qBAAQ;",
6
- "names": []
7
- }
@@ -1,64 +0,0 @@
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 });
11
- };
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 Actions_exports = {};
29
- __export(Actions_exports, {
30
- Actions: () => Actions,
31
- default: () => Actions_default
32
- });
33
- var React = __toESM(require("react"));
34
- var import_react = __toESM(require("react"));
35
- var import_prop_types = __toESM(require("prop-types"));
36
- var import_styled_components = __toESM(require("styled-components"));
37
- var import_styled_components2 = require("@xstyled/styled-components");
38
- var import_ds_system = require("@elliemae/ds-system");
39
- var import_ActionItem = __toESM(require("./ActionItem"));
40
- const ActionsNode = import_styled_components.default.div`
41
- display: flex;
42
- flex-direction: row;
43
- padding-left: ${(props) => (0, import_ds_system.__UNSAFE_SPACE_TO_DIMSUM)(props.theme.space.m)};
44
- overflow: hidden;
45
- ${import_styled_components2.space}
46
- `;
47
- function Actions({ actions = [], centerActions, rightActions }) {
48
- if (actions.length < 1)
49
- return null;
50
- return /* @__PURE__ */ import_react.default.createElement(ActionsNode, {
51
- marginLeft: !!rightActions && "auto",
52
- marginRight: !!centerActions && "auto"
53
- }, actions.map((action, key) => /* @__PURE__ */ import_react.default.createElement(import_ActionItem.default, {
54
- key
55
- }, action)));
56
- }
57
- Actions.propTypes = {
58
- actions: import_prop_types.default.array,
59
- centerActions: import_prop_types.default.bool,
60
- rightActions: import_prop_types.default.bool
61
- };
62
- var Actions_default = Actions;
63
- module.exports = __toCommonJS(Actions_exports);
64
- //# sourceMappingURL=Actions.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Actions.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/forbid-prop-types */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\nimport { space } from '@xstyled/styled-components';\nimport { __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport ActionItem from './ActionItem';\n\nconst ActionsNode = styled.div`\n display: flex;\n flex-direction: row;\n padding-left: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m)};\n overflow: hidden;\n ${space}\n`;\n\nfunction Actions({ actions = [], centerActions, rightActions }) {\n if (actions.length < 1) return null;\n return (\n <ActionsNode\n marginLeft={!!rightActions && 'auto'}\n marginRight={!!centerActions && 'auto'}\n >\n {actions.map((action, key) => (\n <ActionItem key={key}>{action}</ActionItem>\n ))}\n </ActionsNode>\n );\n}\n\nActions.propTypes = {\n actions: PropTypes.array,\n centerActions: PropTypes.bool,\n rightActions: PropTypes.bool,\n};\n\nexport { Actions };\nexport default Actions;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,wBAAsB;AACtB,+BAAmB;AACnB,gCAAsB;AACtB,uBAAyC;AACzC,wBAAuB;AAEvB,MAAM,cAAc,iCAAO;AAAA;AAAA;AAAA,kBAGT,CAAC,UAAU,+CAAyB,MAAM,MAAM,MAAM;AAAA;AAAA,IAEpE;AAAA;AAGJ,iBAAiB,EAAE,UAAU,IAAI,eAAe,gBAAgB;AAC9D,MAAI,QAAQ,SAAS;AAAG,WAAO;AAC/B,SACE,mDAAC,aAAD;AAAA,IACE,YAAY,CAAC,CAAC,gBAAgB;AAAA,IAC9B,aAAa,CAAC,CAAC,iBAAiB;AAAA,KAE/B,QAAQ,IAAI,CAAC,QAAQ,QACpB,mDAAC,2BAAD;AAAA,IAAY;AAAA,KAAW;AAAA;AAM/B,QAAQ,YAAY;AAAA,EAClB,SAAS,0BAAU;AAAA,EACnB,eAAe,0BAAU;AAAA,EACzB,cAAc,0BAAU;AAAA;AAI1B,IAAO,kBAAQ;",
6
- "names": []
7
- }