@laerdal/life-react-components 2.1.1-dev.24 → 2.1.1-dev.29
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/Accordion/AccordionItem.cjs +8 -17
- package/dist/Accordion/AccordionItem.cjs.map +1 -1
- package/dist/Accordion/AccordionItem.d.ts +2 -0
- package/dist/Accordion/AccordionItem.js +9 -18
- package/dist/Accordion/AccordionItem.js.map +1 -1
- package/dist/Accordion/AccordionMenu.cjs +6 -2
- package/dist/Accordion/AccordionMenu.cjs.map +1 -1
- package/dist/Accordion/AccordionMenu.d.ts +3 -0
- package/dist/Accordion/AccordionMenu.js +6 -2
- package/dist/Accordion/AccordionMenu.js.map +1 -1
- package/dist/Accordion/styles.cjs +7 -11
- package/dist/Accordion/styles.cjs.map +1 -1
- package/dist/Accordion/styles.d.ts +1 -4
- package/dist/Accordion/styles.js +6 -9
- package/dist/Accordion/styles.js.map +1 -1
- package/dist/Tile/TileCommonItems.cjs +2 -2
- package/dist/Tile/TileCommonItems.cjs.map +1 -1
- package/dist/Tile/TileCommonItems.js +2 -2
- package/dist/Tile/TileCommonItems.js.map +1 -1
- package/dist/Tile/TileHeader.cjs +10 -18
- package/dist/Tile/TileHeader.cjs.map +1 -1
- package/dist/Tile/TileHeader.js +10 -18
- package/dist/Tile/TileHeader.js.map +1 -1
- package/dist/Tile/TileTypes.cjs.map +1 -1
- package/dist/Tile/TileTypes.d.ts +1 -2
- package/dist/Tile/TileTypes.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ var _icons = require("../icons");
|
|
|
14
14
|
var _styles = require("./styles");
|
|
15
15
|
var _common = require("../common");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
var _excluded = ["id", "onSelect", "isActive", "title", "icon", "disabled", "isLast", "padding", "children", "className"];
|
|
17
|
+
var _excluded = ["id", "onSelect", "isActive", "title", "icon", "disabled", "isLast", "padding", "children", "className", "size"];
|
|
18
18
|
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; }
|
|
19
19
|
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) { (0, _defineProperty2.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; }
|
|
20
20
|
var AccordionItem = function AccordionItem(props) {
|
|
@@ -28,11 +28,12 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
28
28
|
padding = props.padding,
|
|
29
29
|
children = props.children,
|
|
30
30
|
className = props.className,
|
|
31
|
+
_props$size = props.size,
|
|
32
|
+
size = _props$size === void 0 ? _.Size.Medium : _props$size,
|
|
31
33
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
32
|
-
var cls = (isActive ? 'active' : '') + (disabled ? ' disabled' : '') + (className ? " ".concat(className) : '');
|
|
34
|
+
var cls = (isActive ? 'active' : '') + (disabled ? ' disabled' : '') + (className ? " ".concat(className) : '') + " ".concat(size);
|
|
33
35
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.AccordionItemContainer, {
|
|
34
36
|
id: id,
|
|
35
|
-
displaySeparator: !isActive && !isLast,
|
|
36
37
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ItemHeaderContainer, _objectSpread(_objectSpread({
|
|
37
38
|
role: "button",
|
|
38
39
|
"aria-expanded": isActive,
|
|
@@ -50,26 +51,16 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
50
51
|
onMouseDown: _common.defaultOnMouseDownHandler,
|
|
51
52
|
className: cls
|
|
52
53
|
}, rest), {}, {
|
|
53
|
-
children: [icon
|
|
54
|
-
size: '24px'
|
|
55
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
54
|
+
children: [icon, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
56
55
|
children: title
|
|
57
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
56
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
58
57
|
"aria-hidden": "true",
|
|
59
|
-
children: isActive
|
|
60
|
-
color: _.COLORS.neutral_800,
|
|
61
|
-
size: "20px"
|
|
62
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SystemIcons.ChevronDown, {
|
|
63
|
-
color: _.COLORS.neutral_600,
|
|
64
|
-
size: "20px"
|
|
65
|
-
})
|
|
58
|
+
children: [isActive && /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SystemIcons.ChevronUp, {}), !isActive && /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SystemIcons.ChevronDown, {})]
|
|
66
59
|
})]
|
|
67
60
|
})), isActive && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ItemBodyContainer, {
|
|
68
61
|
id: "itemContentFor_".concat(id),
|
|
69
62
|
padding: padding,
|
|
70
|
-
children:
|
|
71
|
-
children: children
|
|
72
|
-
})
|
|
63
|
+
children: children
|
|
73
64
|
})]
|
|
74
65
|
});
|
|
75
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItem.cjs","names":["AccordionItem","props","id","onSelect","isActive","title","icon","disabled","isLast","padding","children","className","
|
|
1
|
+
{"version":3,"file":"AccordionItem.cjs","names":["AccordionItem","props","id","onSelect","isActive","title","icon","disabled","isLast","padding","children","className","size","Size","Medium","rest","cls","undefined","e","key","defaultOnMouseDownHandler"],"sources":["../../src/Accordion/AccordionItem.tsx"],"sourcesContent":["import React from 'react';\nimport {COLORS, ComponentS, Size} from '..';\nimport {SystemIcons} from '../icons';\nimport {AccordionItemProps} from './AccordionMenu';\nimport {AccordionItemContainer, ItemBodyContainer, ItemHeaderContainer} from './styles';\nimport {defaultOnMouseDownHandler} from '../common';\n\ninterface AccordionItemPropsInner extends AccordionItemProps {\n onSelect: (id: string) => void;\n isActive: boolean;\n isLast: boolean;\n padding?: string;\n size?: Size.Small | Size.Medium | Size.Large;\n}\n\nconst AccordionItem: React.FunctionComponent<AccordionItemPropsInner> = (props: AccordionItemPropsInner) => {\n const {\n id,\n onSelect,\n isActive,\n title,\n icon,\n disabled,\n isLast,\n padding,\n children,\n className,\n size = Size.Medium,\n ...rest\n } = props;\n\n const cls = (isActive ? 'active' : '') + (disabled ? ' disabled' : '') + (className ? ` ${className}` : '') + ` ${size}`;\n\n return (\n <AccordionItemContainer id={id}>\n <ItemHeaderContainer\n role=\"button\"\n aria-expanded={isActive}\n id={`itemHeaderFor_${id}`}\n aria-controls={`itemContentFor_${id}`}\n tabIndex={!disabled ? 0 : undefined}\n onClick={() => {\n if (!disabled) {\n onSelect(id);\n }\n }}\n onKeyDown={(e: any) => {\n if (e.key === 'Enter') onSelect(id);\n }}\n onMouseDown={defaultOnMouseDownHandler}\n className={cls}\n {...rest}>\n {icon}\n <span>{title}</span>\n <div aria-hidden=\"true\">\n {\n isActive && <SystemIcons.ChevronUp/>\n }\n {\n !isActive && <SystemIcons.ChevronDown/>\n }\n </div>\n </ItemHeaderContainer>\n {isActive && (\n <ItemBodyContainer id={`itemContentFor_${id}`} padding={padding}>\n {children}\n </ItemBodyContainer>\n )\n }\n </AccordionItemContainer>\n );\n};\n\nexport default AccordionItem;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AAEA;AACA;AAAoD;AAAA;AAAA;AAAA;AAUpD,IAAMA,aAA+D,GAAG,SAAlEA,aAA+D,CAAIC,KAA8B,EAAK;EAC1G,IACEC,EAAE,GAYAD,KAAK,CAZPC,EAAE;IACFC,QA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,WAEnBD,QAAQ,iBAAI,qBAAC,kBAAW,CAAC,SAAS,KAAE,EAGpC,CAACA,QAAQ,iBAAI,qBAAC,kBAAW,CAAC,WAAW,KAAE;MAAA,EAErC;IAAA,GACc,EACrBA,QAAQ,iBACP,qBAAC,yBAAiB;MAAC,EAAE,2BAAoBF,EAAE,CAAG;MAAC,OAAO,EAAEO,OAAQ;MAAA,UAC7DC;IAAQ,EAEZ;EAAA,EAEsB;AAE7B,CAAC;AAAC;EA/DAP,QAAQ;EACRC,QAAQ;EACRI,MAAM;EACNC,OAAO;AAAA;AAAA,eA8DMT,aAAa;AAAA"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Size } from '..';
|
|
2
3
|
import { AccordionItemProps } from './AccordionMenu';
|
|
3
4
|
interface AccordionItemPropsInner extends AccordionItemProps {
|
|
4
5
|
onSelect: (id: string) => void;
|
|
5
6
|
isActive: boolean;
|
|
6
7
|
isLast: boolean;
|
|
7
8
|
padding?: string;
|
|
9
|
+
size?: Size.Small | Size.Medium | Size.Large;
|
|
8
10
|
}
|
|
9
11
|
declare const AccordionItem: React.FunctionComponent<AccordionItemPropsInner>;
|
|
10
12
|
export default AccordionItem;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import _pt from "prop-types";
|
|
4
|
-
var _excluded = ["id", "onSelect", "isActive", "title", "icon", "disabled", "isLast", "padding", "children", "className"];
|
|
4
|
+
var _excluded = ["id", "onSelect", "isActive", "title", "icon", "disabled", "isLast", "padding", "children", "className", "size"];
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import { Size } from '..';
|
|
9
9
|
import { SystemIcons } from '../icons';
|
|
10
10
|
import { AccordionItemContainer, ItemBodyContainer, ItemHeaderContainer } from './styles';
|
|
11
11
|
import { defaultOnMouseDownHandler } from '../common';
|
|
@@ -22,11 +22,12 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
22
22
|
padding = props.padding,
|
|
23
23
|
children = props.children,
|
|
24
24
|
className = props.className,
|
|
25
|
+
_props$size = props.size,
|
|
26
|
+
size = _props$size === void 0 ? Size.Medium : _props$size,
|
|
25
27
|
rest = _objectWithoutProperties(props, _excluded);
|
|
26
|
-
var cls = (isActive ? 'active' : '') + (disabled ? ' disabled' : '') + (className ? " ".concat(className) : '');
|
|
28
|
+
var cls = (isActive ? 'active' : '') + (disabled ? ' disabled' : '') + (className ? " ".concat(className) : '') + " ".concat(size);
|
|
27
29
|
return /*#__PURE__*/_jsxs(AccordionItemContainer, {
|
|
28
30
|
id: id,
|
|
29
|
-
displaySeparator: !isActive && !isLast,
|
|
30
31
|
children: [/*#__PURE__*/_jsxs(ItemHeaderContainer, _objectSpread(_objectSpread({
|
|
31
32
|
role: "button",
|
|
32
33
|
"aria-expanded": isActive,
|
|
@@ -44,26 +45,16 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
44
45
|
onMouseDown: defaultOnMouseDownHandler,
|
|
45
46
|
className: cls
|
|
46
47
|
}, rest), {}, {
|
|
47
|
-
children: [icon
|
|
48
|
-
size: '24px'
|
|
49
|
-
}), /*#__PURE__*/_jsx("span", {
|
|
48
|
+
children: [icon, /*#__PURE__*/_jsx("span", {
|
|
50
49
|
children: title
|
|
51
|
-
}), /*#__PURE__*/
|
|
50
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
52
51
|
"aria-hidden": "true",
|
|
53
|
-
children: isActive
|
|
54
|
-
color: COLORS.neutral_800,
|
|
55
|
-
size: "20px"
|
|
56
|
-
}) : /*#__PURE__*/_jsx(SystemIcons.ChevronDown, {
|
|
57
|
-
color: COLORS.neutral_600,
|
|
58
|
-
size: "20px"
|
|
59
|
-
})
|
|
52
|
+
children: [isActive && /*#__PURE__*/_jsx(SystemIcons.ChevronUp, {}), !isActive && /*#__PURE__*/_jsx(SystemIcons.ChevronDown, {})]
|
|
60
53
|
})]
|
|
61
54
|
})), isActive && /*#__PURE__*/_jsx(ItemBodyContainer, {
|
|
62
55
|
id: "itemContentFor_".concat(id),
|
|
63
56
|
padding: padding,
|
|
64
|
-
children:
|
|
65
|
-
children: children
|
|
66
|
-
})
|
|
57
|
+
children: children
|
|
67
58
|
})]
|
|
68
59
|
});
|
|
69
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItem.js","names":["React","
|
|
1
|
+
{"version":3,"file":"AccordionItem.js","names":["React","Size","SystemIcons","AccordionItemContainer","ItemBodyContainer","ItemHeaderContainer","defaultOnMouseDownHandler","AccordionItem","props","id","onSelect","isActive","title","icon","disabled","isLast","padding","children","className","size","Medium","rest","cls","undefined","e","key"],"sources":["../../src/Accordion/AccordionItem.tsx"],"sourcesContent":["import React from 'react';\nimport {COLORS, ComponentS, Size} from '..';\nimport {SystemIcons} from '../icons';\nimport {AccordionItemProps} from './AccordionMenu';\nimport {AccordionItemContainer, ItemBodyContainer, ItemHeaderContainer} from './styles';\nimport {defaultOnMouseDownHandler} from '../common';\n\ninterface AccordionItemPropsInner extends AccordionItemProps {\n onSelect: (id: string) => void;\n isActive: boolean;\n isLast: boolean;\n padding?: string;\n size?: Size.Small | Size.Medium | Size.Large;\n}\n\nconst AccordionItem: React.FunctionComponent<AccordionItemPropsInner> = (props: AccordionItemPropsInner) => {\n const {\n id,\n onSelect,\n isActive,\n title,\n icon,\n disabled,\n isLast,\n padding,\n children,\n className,\n size = Size.Medium,\n ...rest\n } = props;\n\n const cls = (isActive ? 'active' : '') + (disabled ? ' disabled' : '') + (className ? ` ${className}` : '') + ` ${size}`;\n\n return (\n <AccordionItemContainer id={id}>\n <ItemHeaderContainer\n role=\"button\"\n aria-expanded={isActive}\n id={`itemHeaderFor_${id}`}\n aria-controls={`itemContentFor_${id}`}\n tabIndex={!disabled ? 0 : undefined}\n onClick={() => {\n if (!disabled) {\n onSelect(id);\n }\n }}\n onKeyDown={(e: any) => {\n if (e.key === 'Enter') onSelect(id);\n }}\n onMouseDown={defaultOnMouseDownHandler}\n className={cls}\n {...rest}>\n {icon}\n <span>{title}</span>\n <div aria-hidden=\"true\">\n {\n isActive && <SystemIcons.ChevronUp/>\n }\n {\n !isActive && <SystemIcons.ChevronDown/>\n }\n </div>\n </ItemHeaderContainer>\n {isActive && (\n <ItemBodyContainer id={`itemContentFor_${id}`} padding={padding}>\n {children}\n </ItemBodyContainer>\n )\n }\n </AccordionItemContainer>\n );\n};\n\nexport default AccordionItem;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAA4BC,IAAI,QAAO,IAAI;AAC3C,SAAQC,WAAW,QAAO,UAAU;AAEpC,SAAQC,sBAAsB,EAAEC,iBAAiB,EAAEC,mBAAmB,QAAO,UAAU;AACvF,SAAQC,yBAAyB,QAAO,WAAW;AAAC;AAAA;AAUpD,IAAMC,aAA+D,GAAG,SAAlEA,aAA+D,CAAIC,KAA8B,EAAK;EAC1G,IACEC,EAAE,GAYAD,KAAK,CAZPC,EAAE;IACFC,QAAQ,GAWNF,KAAK,CAXPE,QAAQ;IACRC,QAAQ,GAUNH,KAAK,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ACA,QAAQ,iBAAI,KAAC,WAAW,CAAC,WAAW,KAAE;MAAA,EAErC;IAAA,GACc,EACrBA,QAAQ,iBACP,KAAC,iBAAiB;MAAC,EAAE,2BAAoBF,EAAE,CAAG;MAAC,OAAO,EAAEO,OAAQ;MAAA,UAC7DC;IAAQ,EAEZ;EAAA,EAEsB;AAE7B,CAAC;AAAC;EA/DAP,QAAQ;EACRC,QAAQ;EACRI,MAAM;EACNC,OAAO;AAAA;AA8DT,eAAeT,aAAa"}
|
|
@@ -14,8 +14,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
14
14
|
var React = _interopRequireWildcard(require("react"));
|
|
15
15
|
var _AccordionItem = _interopRequireDefault(require("./AccordionItem"));
|
|
16
16
|
var _styles = require("./styles");
|
|
17
|
+
var _types = require("../types");
|
|
17
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
var _excluded = ["items", "selectedItems", "setSelectedItems", "onSelect", "multipleActive", "padding"],
|
|
19
|
+
var _excluded = ["items", "selectedItems", "setSelectedItems", "onSelect", "multipleActive", "padding", "size"],
|
|
19
20
|
_excluded2 = ["id", "disabled", "title", "icon", "children"];
|
|
20
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -28,6 +29,8 @@ var AccordionMenu = function AccordionMenu(props) {
|
|
|
28
29
|
onSelect = props.onSelect,
|
|
29
30
|
multipleActive = props.multipleActive,
|
|
30
31
|
padding = props.padding,
|
|
32
|
+
_props$size = props.size,
|
|
33
|
+
size = _props$size === void 0 ? _types.Size.Medium : _props$size,
|
|
31
34
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
32
35
|
var _React$useState = React.useState([]),
|
|
33
36
|
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
@@ -73,7 +76,8 @@ var AccordionMenu = function AccordionMenu(props) {
|
|
|
73
76
|
}),
|
|
74
77
|
isLast: index === items.length - 1,
|
|
75
78
|
onSelect: onSelected,
|
|
76
|
-
padding: padding
|
|
79
|
+
padding: padding,
|
|
80
|
+
size: size
|
|
77
81
|
}, rest), {}, {
|
|
78
82
|
children: children
|
|
79
83
|
}), id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionMenu.cjs","names":["AccordionMenu","props","items","selectedItems","setSelectedItems","onSelect","multipleActive","padding","rest","React","useState","builtinSelectedItems","builtinSetSelectedItems","getCollection","getUpdateFunction","onSelected","id","collection","updateFunc","isActive","find","x","filter","map","index","disabled","title","icon","children","length"],"sources":["../../src/Accordion/AccordionMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport AccordionItem from './AccordionItem';\nimport { AccordionMenuWrapper } from './styles';\n\nexport interface AccordionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'>{\n items: AccordionItemProps[];\n selectedItems?: string[];\n setSelectedItems?: (a: string[]) => void;\n onSelect?: (id: string) => void;\n multipleActive?: boolean;\n padding?: string;\n}\n\nexport interface AccordionItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'id' | 'aria-expanded' | 'onSelect' | 'tabIndex' | 'onKeyDown' | 'onClick' | 'onMouseDown'> {\n id: string;\n disabled?: boolean;\n title: string;\n icon?: React.ReactNode;\n children: React.ReactNode;\n}\n\nconst AccordionMenu: React.FunctionComponent<AccordionProps> = (props: AccordionProps) => {\n const { items, selectedItems, setSelectedItems, onSelect, multipleActive, padding, ...rest } = props;\n const [builtinSelectedItems, builtinSetSelectedItems] = React.useState<string[]>([]);\n\n const getCollection = () => {\n return selectedItems ? selectedItems : builtinSelectedItems;\n };\n\n const getUpdateFunction = () => {\n return setSelectedItems ? setSelectedItems : builtinSetSelectedItems;\n };\n\n const onSelected = (id: string) => {\n const collection = getCollection();\n const updateFunc = getUpdateFunction();\n\n const isActive = !!collection.find((x) => x == id);\n if (multipleActive) {\n if (isActive) updateFunc(collection.filter((x) => x != id));\n else updateFunc([...collection, id]);\n } else updateFunc(isActive ? [] : [id]);\n\n onSelect && onSelect(id);\n };\n\n return (\n <AccordionMenuWrapper {...rest}>\n {items.map(({id, disabled, title, icon, children, ...rest}, index) => (\n <AccordionItem\n key={id}\n id={id}\n disabled={disabled}\n title={title}\n aria-expanded={!!getCollection().find((x) => x == id)}\n icon={icon}\n isActive={!!getCollection().find((x) => x == id)}\n isLast={index === items.length - 1}\n onSelect={onSelected}\n padding={padding}\n {...rest}>\n {children}\n </AccordionItem>\n ))}\n </AccordionMenuWrapper>\n );\n};\n\nexport default AccordionMenu;\n"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":"AccordionMenu.cjs","names":["AccordionMenu","props","items","selectedItems","setSelectedItems","onSelect","multipleActive","padding","size","Size","Medium","rest","React","useState","builtinSelectedItems","builtinSetSelectedItems","getCollection","getUpdateFunction","onSelected","id","collection","updateFunc","isActive","find","x","filter","map","index","disabled","title","icon","children","length"],"sources":["../../src/Accordion/AccordionMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport AccordionItem from './AccordionItem';\nimport { AccordionMenuWrapper } from './styles';\nimport {Size} from \"../types\";\n\nexport interface AccordionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'>{\n items: AccordionItemProps[];\n selectedItems?: string[];\n setSelectedItems?: (a: string[]) => void;\n onSelect?: (id: string) => void;\n multipleActive?: boolean;\n padding?: string;\n size?: Size.Small | Size.Medium | Size.Large;\n}\n\nexport interface AccordionItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'id' | 'aria-expanded' | 'onSelect' | 'tabIndex' | 'onKeyDown' | 'onClick' | 'onMouseDown'> {\n id: string;\n disabled?: boolean;\n title: string;\n icon?: React.ReactNode;\n\n size?: Size.Small | Size.Medium | Size.Large;\n children: React.ReactNode;\n}\n\nconst AccordionMenu: React.FunctionComponent<AccordionProps> = (props: AccordionProps) => {\n const { items, selectedItems, setSelectedItems, onSelect, multipleActive, padding, size = Size.Medium, ...rest } = props;\n const [builtinSelectedItems, builtinSetSelectedItems] = React.useState<string[]>([]);\n\n const getCollection = () => {\n return selectedItems ? selectedItems : builtinSelectedItems;\n };\n\n const getUpdateFunction = () => {\n return setSelectedItems ? setSelectedItems : builtinSetSelectedItems;\n };\n\n const onSelected = (id: string) => {\n const collection = getCollection();\n const updateFunc = getUpdateFunction();\n\n const isActive = !!collection.find((x) => x == id);\n if (multipleActive) {\n if (isActive) updateFunc(collection.filter((x) => x != id));\n else updateFunc([...collection, id]);\n } else updateFunc(isActive ? [] : [id]);\n\n onSelect && onSelect(id);\n };\n\n return (\n <AccordionMenuWrapper {...rest}>\n {items.map(({id, disabled, title, icon, children, ...rest}, index) => (\n <AccordionItem\n key={id}\n id={id}\n disabled={disabled}\n title={title}\n aria-expanded={!!getCollection().find((x) => x == id)}\n icon={icon}\n isActive={!!getCollection().find((x) => x == id)}\n isLast={index === items.length - 1}\n onSelect={onSelected}\n padding={padding}\n size={size}\n {...rest}>\n {children}\n </AccordionItem>\n ))}\n </AccordionMenuWrapper>\n );\n};\n\nexport default A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eA8DMP,aAAa;AAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { Size } from "../types";
|
|
2
3
|
export interface AccordionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
3
4
|
items: AccordionItemProps[];
|
|
4
5
|
selectedItems?: string[];
|
|
@@ -6,12 +7,14 @@ export interface AccordionProps extends Omit<React.HTMLAttributes<HTMLDivElement
|
|
|
6
7
|
onSelect?: (id: string) => void;
|
|
7
8
|
multipleActive?: boolean;
|
|
8
9
|
padding?: string;
|
|
10
|
+
size?: Size.Small | Size.Medium | Size.Large;
|
|
9
11
|
}
|
|
10
12
|
export interface AccordionItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'id' | 'aria-expanded' | 'onSelect' | 'tabIndex' | 'onKeyDown' | 'onClick' | 'onMouseDown'> {
|
|
11
13
|
id: string;
|
|
12
14
|
disabled?: boolean;
|
|
13
15
|
title: string;
|
|
14
16
|
icon?: React.ReactNode;
|
|
17
|
+
size?: Size.Small | Size.Medium | Size.Large;
|
|
15
18
|
children: React.ReactNode;
|
|
16
19
|
}
|
|
17
20
|
declare const AccordionMenu: React.FunctionComponent<AccordionProps>;
|
|
@@ -3,13 +3,14 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
import _pt from "prop-types";
|
|
6
|
-
var _excluded = ["items", "selectedItems", "setSelectedItems", "onSelect", "multipleActive", "padding"],
|
|
6
|
+
var _excluded = ["items", "selectedItems", "setSelectedItems", "onSelect", "multipleActive", "padding", "size"],
|
|
7
7
|
_excluded2 = ["id", "disabled", "title", "icon", "children"];
|
|
8
8
|
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; }
|
|
9
9
|
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; }
|
|
10
10
|
import * as React from 'react';
|
|
11
11
|
import AccordionItem from './AccordionItem';
|
|
12
12
|
import { AccordionMenuWrapper } from './styles';
|
|
13
|
+
import { Size } from "../types";
|
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
15
|
var AccordionMenu = function AccordionMenu(props) {
|
|
15
16
|
var items = props.items,
|
|
@@ -18,6 +19,8 @@ var AccordionMenu = function AccordionMenu(props) {
|
|
|
18
19
|
onSelect = props.onSelect,
|
|
19
20
|
multipleActive = props.multipleActive,
|
|
20
21
|
padding = props.padding,
|
|
22
|
+
_props$size = props.size,
|
|
23
|
+
size = _props$size === void 0 ? Size.Medium : _props$size,
|
|
21
24
|
rest = _objectWithoutProperties(props, _excluded);
|
|
22
25
|
var _React$useState = React.useState([]),
|
|
23
26
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -63,7 +66,8 @@ var AccordionMenu = function AccordionMenu(props) {
|
|
|
63
66
|
}),
|
|
64
67
|
isLast: index === items.length - 1,
|
|
65
68
|
onSelect: onSelected,
|
|
66
|
-
padding: padding
|
|
69
|
+
padding: padding,
|
|
70
|
+
size: size
|
|
67
71
|
}, rest), {}, {
|
|
68
72
|
children: children
|
|
69
73
|
}), id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionMenu.js","names":["React","AccordionItem","AccordionMenuWrapper","AccordionMenu","props","items","selectedItems","setSelectedItems","onSelect","multipleActive","padding","rest","useState","builtinSelectedItems","builtinSetSelectedItems","getCollection","getUpdateFunction","onSelected","id","collection","updateFunc","isActive","find","x","filter","map","index","disabled","title","icon","children","length"],"sources":["../../src/Accordion/AccordionMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport AccordionItem from './AccordionItem';\nimport { AccordionMenuWrapper } from './styles';\n\nexport interface AccordionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'>{\n items: AccordionItemProps[];\n selectedItems?: string[];\n setSelectedItems?: (a: string[]) => void;\n onSelect?: (id: string) => void;\n multipleActive?: boolean;\n padding?: string;\n}\n\nexport interface AccordionItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'id' | 'aria-expanded' | 'onSelect' | 'tabIndex' | 'onKeyDown' | 'onClick' | 'onMouseDown'> {\n id: string;\n disabled?: boolean;\n title: string;\n icon?: React.ReactNode;\n children: React.ReactNode;\n}\n\nconst AccordionMenu: React.FunctionComponent<AccordionProps> = (props: AccordionProps) => {\n const { items, selectedItems, setSelectedItems, onSelect, multipleActive, padding, ...rest } = props;\n const [builtinSelectedItems, builtinSetSelectedItems] = React.useState<string[]>([]);\n\n const getCollection = () => {\n return selectedItems ? selectedItems : builtinSelectedItems;\n };\n\n const getUpdateFunction = () => {\n return setSelectedItems ? setSelectedItems : builtinSetSelectedItems;\n };\n\n const onSelected = (id: string) => {\n const collection = getCollection();\n const updateFunc = getUpdateFunction();\n\n const isActive = !!collection.find((x) => x == id);\n if (multipleActive) {\n if (isActive) updateFunc(collection.filter((x) => x != id));\n else updateFunc([...collection, id]);\n } else updateFunc(isActive ? [] : [id]);\n\n onSelect && onSelect(id);\n };\n\n return (\n <AccordionMenuWrapper {...rest}>\n {items.map(({id, disabled, title, icon, children, ...rest}, index) => (\n <AccordionItem\n key={id}\n id={id}\n disabled={disabled}\n title={title}\n aria-expanded={!!getCollection().find((x) => x == id)}\n icon={icon}\n isActive={!!getCollection().find((x) => x == id)}\n isLast={index === items.length - 1}\n onSelect={onSelected}\n padding={padding}\n {...rest}>\n {children}\n </AccordionItem>\n ))}\n </AccordionMenuWrapper>\n );\n};\n\nexport default AccordionMenu;\n"],"mappings":";;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,SAASC,oBAAoB,QAAQ,UAAU;AAAC;
|
|
1
|
+
{"version":3,"file":"AccordionMenu.js","names":["React","AccordionItem","AccordionMenuWrapper","Size","AccordionMenu","props","items","selectedItems","setSelectedItems","onSelect","multipleActive","padding","size","Medium","rest","useState","builtinSelectedItems","builtinSetSelectedItems","getCollection","getUpdateFunction","onSelected","id","collection","updateFunc","isActive","find","x","filter","map","index","disabled","title","icon","children","length"],"sources":["../../src/Accordion/AccordionMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport AccordionItem from './AccordionItem';\nimport { AccordionMenuWrapper } from './styles';\nimport {Size} from \"../types\";\n\nexport interface AccordionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'>{\n items: AccordionItemProps[];\n selectedItems?: string[];\n setSelectedItems?: (a: string[]) => void;\n onSelect?: (id: string) => void;\n multipleActive?: boolean;\n padding?: string;\n size?: Size.Small | Size.Medium | Size.Large;\n}\n\nexport interface AccordionItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'id' | 'aria-expanded' | 'onSelect' | 'tabIndex' | 'onKeyDown' | 'onClick' | 'onMouseDown'> {\n id: string;\n disabled?: boolean;\n title: string;\n icon?: React.ReactNode;\n\n size?: Size.Small | Size.Medium | Size.Large;\n children: React.ReactNode;\n}\n\nconst AccordionMenu: React.FunctionComponent<AccordionProps> = (props: AccordionProps) => {\n const { items, selectedItems, setSelectedItems, onSelect, multipleActive, padding, size = Size.Medium, ...rest } = props;\n const [builtinSelectedItems, builtinSetSelectedItems] = React.useState<string[]>([]);\n\n const getCollection = () => {\n return selectedItems ? selectedItems : builtinSelectedItems;\n };\n\n const getUpdateFunction = () => {\n return setSelectedItems ? setSelectedItems : builtinSetSelectedItems;\n };\n\n const onSelected = (id: string) => {\n const collection = getCollection();\n const updateFunc = getUpdateFunction();\n\n const isActive = !!collection.find((x) => x == id);\n if (multipleActive) {\n if (isActive) updateFunc(collection.filter((x) => x != id));\n else updateFunc([...collection, id]);\n } else updateFunc(isActive ? [] : [id]);\n\n onSelect && onSelect(id);\n };\n\n return (\n <AccordionMenuWrapper {...rest}>\n {items.map(({id, disabled, title, icon, children, ...rest}, index) => (\n <AccordionItem\n key={id}\n id={id}\n disabled={disabled}\n title={title}\n aria-expanded={!!getCollection().find((x) => x == id)}\n icon={icon}\n isActive={!!getCollection().find((x) => x == id)}\n isLast={index === items.length - 1}\n onSelect={onSelected}\n padding={padding}\n size={size}\n {...rest}>\n {children}\n </AccordionItem>\n ))}\n </AccordionMenuWrapper>\n );\n};\n\nexport default AccordionMenu;\n"],"mappings":";;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,SAASC,oBAAoB,QAAQ,UAAU;AAC/C,SAAQC,IAAI,QAAO,UAAU;AAAC;AAsB9B,IAAMC,aAAsD,GAAG,SAAzDA,aAAsD,CAAIC,KAAqB,EAAK;EACxF,IAAQC,KAAK,GAAsGD,KAAK,CAAhHC,KAAK;IAAEC,aAAa,GAAuFF,KAAK,CAAzGE,aAAa;IAAEC,gBAAgB,GAAqEH,KAAK,CAA1FG,gBAAgB;IAAEC,QAAQ,GAA2DJ,KAAK,CAAxEI,QAAQ;IAAEC,cAAc,GAA2CL,KAAK,CAA9DK,cAAc;IAAEC,OAAO,GAAkCN,KAAK,CAA9CM,OAAO;IAAA,cAAkCN,KAAK,CAArCO,IAAI;IAAJA,IAAI,4BAAGT,IAAI,CAACU,MAAM;IAAKC,IAAI,4BAAKT,KAAK;EACxH,sBAAwDL,KAAK,CAACe,QAAQ,CAAW,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BAAe,CAAC,CAACb,aAAa,EAAE,CAACO,IAAI,CAAC,UAACC,CAAC;UAAA,OAAKA,CAAC,IAAIL,EAAE;QAAA,EAAE;QACtD,IAAI,EAAEW,IAAK;QACX,QAAQ,EAAE,CAAC,CAACd,aAAa,EAAE,CAACO,IAAI,CAAC,UAACC,CAAC;UAAA,OAAKA,CAAC,IAAIL,EAAE;QAAA,EAAE;QACjD,MAAM,EAAEQ,KAAK,KAAKvB,KAAK,CAAC4B,MAAM,GAAG,CAAE;QACnC,QAAQ,EAAEd,UAAW;QACrB,OAAO,EAAET,OAAQ;QACjB,IAAI,EAAEC;MAAK,GACPE,IAAI;QAAA,UACPmB;MAAQ,IAZJZ,EAAE,CAaO;IAAA,CACjB;EAAC,GACmB;AAE3B,CAAC;AAAC;EAjEAf,KAAK;IAULe,EAAE;IACFS,QAAQ;IACRC,KAAK;IACLC,IAAI;IAGJC,QAAQ;EAAA;EAfR1B,aAAa;EACbC,gBAAgB;EAChBC,QAAQ;EACRC,cAAc;EACdC,OAAO;AAAA;AA8DT,eAAeP,aAAa"}
|
|
@@ -4,24 +4,20 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.ItemHeaderContainer = exports.ItemBodyContainer = exports.
|
|
7
|
+
exports.ItemHeaderContainer = exports.ItemBodyContainer = exports.AccordionMenuWrapper = exports.AccordionItemContainer = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _styles = require("../styles");
|
|
11
11
|
var _zIndexes = require("../styles/z-indexes");
|
|
12
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4
|
|
12
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
13
13
|
var AccordionMenuWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n min-width: 320px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n"])));
|
|
14
14
|
exports.AccordionMenuWrapper = AccordionMenuWrapper;
|
|
15
|
-
var
|
|
16
|
-
return props.displaySeparator ? "1px solid ".concat(_styles.COLORS.neutral_100) : '';
|
|
17
|
-
});
|
|
18
|
-
exports.AccordionItemContainer = AccordionItemContainer;
|
|
19
|
-
var ItemHeaderContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px 11px 16px;\n cursor: pointer;\n\n ", "\n\n div:last-child {\n margin-left: auto;\n }\n outline: none;\n\n :focus:not(:active) {\n ", "\n }\n\n :hover {\n background: ", ";\n color: ", ";\n z-index: ", ";\n }\n\n :active {\n color: ", ";\n background: ", ";\n z-index: ", ";\n }\n\n &.active {\n color: ", ";\n }\n\n &.disabled {\n background: ", "!important;\n color: ", ";\n cursor: not-allowed;\n pointer-events: none;\n svg {\n color: ", "!important;\n }\n }\n"])), (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), _styles.focusStyles, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_800, _styles.COLORS.primary_100, _zIndexes.Z_INDEXES.active, _styles.COLORS.neutral_800, _styles.COLORS.white, _styles.COLORS.neutral_300, _styles.COLORS.neutral_300);
|
|
15
|
+
var ItemHeaderContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n outline: none;\n box-sizing: border-box;\n\n ", "\n\n div:last-child {\n margin-left: auto;\n }\n\n padding: 0 16px;\n min-height: 48px;\n \n svg {\n width: 20px;\n height: 20px;\n }\n \n &.medium {\n ", "\n padding: 0 24px;\n min-height: 56px;\n\n svg {\n width: 24px;\n height: 24px;\n }\n }\n\n &.large {\n ", "\n padding: 0 32px;\n min-height: 64px;\n svg {\n width: 24px;\n height: 24px;\n }\n }\n\n :focus:not(:active) {\n ", "\n }\n\n :hover {\n background: ", ";\n color: ", ";\n z-index: ", ";\n }\n\n :active {\n color: ", ";\n background: ", ";\n z-index: ", ";\n }\n\n &.active {\n color: ", ";\n }\n\n &.disabled {\n background: ", "!important;\n color: ", ";\n cursor: not-allowed;\n pointer-events: none;\n svg {\n color: ", "!important;\n }\n }\n"])), (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), (0, _styles.ComponentLStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), _styles.focusStyles, _styles.COLORS.primary_20, _styles.COLORS.primary_700, _zIndexes.Z_INDEXES.hover, _styles.COLORS.primary_800, _styles.COLORS.primary_100, _zIndexes.Z_INDEXES.active, _styles.COLORS.neutral_800, _styles.COLORS.white, _styles.COLORS.neutral_300, _styles.COLORS.neutral_300);
|
|
20
16
|
exports.ItemHeaderContainer = ItemHeaderContainer;
|
|
21
|
-
var
|
|
22
|
-
exports.
|
|
23
|
-
var ItemBodyContainer = _styledComponents.default.div(
|
|
17
|
+
var AccordionItemContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n \n &:not(:last-child) ", ":not(.active) {\n border-bottom: 1px solid ", ";\n }\n"])), ItemHeaderContainer, _styles.COLORS.neutral_100);
|
|
18
|
+
exports.AccordionItemContainer = AccordionItemContainer;
|
|
19
|
+
var ItemBodyContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", ";\n background: ", ";\n \n ", "\n \n .medium & {\n ", "\n }\n \n .large & {\n ", "\n }\n\n"])), function (props) {
|
|
24
20
|
return props.padding || '12px 16px';
|
|
25
|
-
}, _styles.COLORS.white);
|
|
21
|
+
}, _styles.COLORS.white, (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Regular, null), (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Regular, null), (0, _styles.ComponentLStyling)(_styles.ComponentTextStyle.Regular, null));
|
|
26
22
|
exports.ItemBodyContainer = ItemBodyContainer;
|
|
27
23
|
//# sourceMappingURL=styles.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.cjs","names":["AccordionMenuWrapper","styled","div","
|
|
1
|
+
{"version":3,"file":"styles.cjs","names":["AccordionMenuWrapper","styled","div","ItemHeaderContainer","ComponentSStyling","ComponentTextStyle","Regular","COLORS","neutral_600","ComponentMStyling","ComponentLStyling","focusStyles","primary_20","primary_700","Z_INDEXES","hover","primary_800","primary_100","active","neutral_800","white","neutral_300","AccordionItemContainer","neutral_100","ItemBodyContainer","props","padding"],"sources":["../../src/Accordion/styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport {\n COLORS,\n ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle,\n focusStyles\n} from '../styles';\nimport { Z_INDEXES } from '../styles/z-indexes';\n\nexport const AccordionMenuWrapper = styled.div`\n min-width: 320px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n`;\n\n\n\nexport const ItemHeaderContainer = styled.div`\n position: relative;\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n outline: none;\n box-sizing: border-box;\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n div:last-child {\n margin-left: auto;\n }\n\n padding: 0 16px;\n min-height: 48px;\n \n svg {\n width: 20px;\n height: 20px;\n }\n \n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n padding: 0 24px;\n min-height: 56px;\n\n svg {\n width: 24px;\n height: 24px;\n }\n }\n\n &.large {\n ${ComponentLStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n padding: 0 32px;\n min-height: 64px;\n svg {\n width: 24px;\n height: 24px;\n }\n }\n\n :focus:not(:active) {\n ${focusStyles}\n }\n\n :hover {\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n z-index: ${Z_INDEXES.hover};\n }\n\n :active {\n color: ${COLORS.primary_800};\n background: ${COLORS.primary_100};\n z-index: ${Z_INDEXES.active};\n }\n\n &.active {\n color: ${COLORS.neutral_800};\n }\n\n &.disabled {\n background: ${COLORS.white}!important;\n color: ${COLORS.neutral_300};\n cursor: not-allowed;\n pointer-events: none;\n svg {\n color: ${COLORS.neutral_300}!important;\n }\n }\n`;\n\nexport const AccordionItemContainer = styled.div`\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n \n &:not(:last-child) ${ItemHeaderContainer}:not(.active) {\n border-bottom: 1px solid ${COLORS.neutral_100};\n }\n`;\n\nexport const ItemBodyContainer = styled.div<{ padding?: string }>`\n padding: ${(props) => props.padding || '12px 16px'};\n background: ${COLORS.white};\n \n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\n \n .medium & {\n ${ComponentMStyling(ComponentTextStyle.Regular, null)}\n }\n \n .large & {\n ${ComponentLStyling(ComponentTextStyle.Regular, null)}\n }\n\n`;\n"],"mappings":";;;;;;;;AAAA;AACA;AAQA;AAAgD;AAEzC,IAAMA,oBAAoB,GAAGC,yBAAM,CAACC,GAAG,kLAK7C;AAAC;AAIK,IAAMC,mBAAmB,GAAGF,yBAAM,CAACC,GAAG,wjCASzC,IAAAE,yBAAiB,EAACC,0BAAkB,CAACC,OAAO,EAAEC,cAAM,CAACC,WAAW,CAAC,EAe/D,IAAAC,yBAAiB,EAACJ,0BAAkB,CAACC,OAAO,EAAEC,cAAM,CAACC,WAAW,CAAC,EAWjE,IAAAE,yBAAiB,EAACL,0BAAkB,CAACC,OAAO,EAAEC,cAAM,CAACC,WAAW,CAAC,EAUjEG,mBAAW,EAICJ,cAAM,CAACK,UAAU,EACtBL,cAAM,CAACM,WAAW,EAChBC,mBAAS,CAACC,KAAK,EAIjBR,cAAM,CAACS,WAAW,EACbT,cAAM,CAACU,WAAW,EACrBH,mBAAS,CAACI,MAAM,EAIlBX,cAAM,CAACY,WAAW,EAIbZ,cAAM,CAACa,KAAK,EACjBb,cAAM,CAACc,WAAW,EAIhBd,cAAM,CAACc,WAAW,CAGhC;AAAC;AAEK,IAAMC,sBAAsB,GAAGrB,yBAAM,CAACC,GAAG,uQAMzBC,mBAAmB,EACXI,cAAM,CAACgB,WAAW,CAEhD;AAAC;AAEK,IAAMC,iBAAiB,GAAGvB,yBAAM,CAACC,GAAG,gNAC9B,UAACuB,KAAK;EAAA,OAAKA,KAAK,CAACC,OAAO,IAAI,WAAW;AAAA,GACpCnB,cAAM,CAACa,KAAK,EAExB,IAAAhB,yBAAiB,EAACC,0BAAkB,CAACC,OAAO,EAAE,IAAI,CAAC,EAGjD,IAAAG,yBAAiB,EAACJ,0BAAkB,CAACC,OAAO,EAAE,IAAI,CAAC,EAInD,IAAAI,yBAAiB,EAACL,0BAAkB,CAACC,OAAO,EAAE,IAAI,CAAC,CAGxD;AAAC"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
export declare const AccordionMenuWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
-
export declare const AccordionItemContainer: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
-
displaySeparator: boolean;
|
|
4
|
-
}, never>;
|
|
5
2
|
export declare const ItemHeaderContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
-
export declare const
|
|
3
|
+
export declare const AccordionItemContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
4
|
export declare const ItemBodyContainer: import("styled-components").StyledComponent<"div", any, {
|
|
8
5
|
padding?: string | undefined;
|
|
9
6
|
}, never>;
|
package/dist/Accordion/styles.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { COLORS, ComponentMStyling, ComponentTextStyle, focusStyles } from '../styles';
|
|
4
|
+
import { COLORS, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle, focusStyles } from '../styles';
|
|
5
5
|
import { Z_INDEXES } from '../styles/z-indexes';
|
|
6
6
|
export var AccordionMenuWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n min-width: 320px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n"])));
|
|
7
|
-
export var
|
|
8
|
-
|
|
9
|
-
})
|
|
10
|
-
export var ItemHeaderContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px 11px 16px;\n cursor: pointer;\n\n ", "\n\n div:last-child {\n margin-left: auto;\n }\n outline: none;\n\n :focus:not(:active) {\n ", "\n }\n\n :hover {\n background: ", ";\n color: ", ";\n z-index: ", ";\n }\n\n :active {\n color: ", ";\n background: ", ";\n z-index: ", ";\n }\n\n &.active {\n color: ", ";\n }\n\n &.disabled {\n background: ", "!important;\n color: ", ";\n cursor: not-allowed;\n pointer-events: none;\n svg {\n color: ", "!important;\n }\n }\n"])), ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600), focusStyles, COLORS.primary_20, COLORS.primary_700, Z_INDEXES.hover, COLORS.primary_800, COLORS.primary_100, Z_INDEXES.active, COLORS.neutral_800, COLORS.white, COLORS.neutral_300, COLORS.neutral_300);
|
|
11
|
-
export var HeaderIconContainer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-left: auto;\n"])));
|
|
12
|
-
export var ItemBodyContainer = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: ", ";\n background: ", ";\n"])), function (props) {
|
|
7
|
+
export var ItemHeaderContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n outline: none;\n box-sizing: border-box;\n\n ", "\n\n div:last-child {\n margin-left: auto;\n }\n\n padding: 0 16px;\n min-height: 48px;\n \n svg {\n width: 20px;\n height: 20px;\n }\n \n &.medium {\n ", "\n padding: 0 24px;\n min-height: 56px;\n\n svg {\n width: 24px;\n height: 24px;\n }\n }\n\n &.large {\n ", "\n padding: 0 32px;\n min-height: 64px;\n svg {\n width: 24px;\n height: 24px;\n }\n }\n\n :focus:not(:active) {\n ", "\n }\n\n :hover {\n background: ", ";\n color: ", ";\n z-index: ", ";\n }\n\n :active {\n color: ", ";\n background: ", ";\n z-index: ", ";\n }\n\n &.active {\n color: ", ";\n }\n\n &.disabled {\n background: ", "!important;\n color: ", ";\n cursor: not-allowed;\n pointer-events: none;\n svg {\n color: ", "!important;\n }\n }\n"])), ComponentSStyling(ComponentTextStyle.Regular, COLORS.neutral_600), ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600), ComponentLStyling(ComponentTextStyle.Regular, COLORS.neutral_600), focusStyles, COLORS.primary_20, COLORS.primary_700, Z_INDEXES.hover, COLORS.primary_800, COLORS.primary_100, Z_INDEXES.active, COLORS.neutral_800, COLORS.white, COLORS.neutral_300, COLORS.neutral_300);
|
|
8
|
+
export var AccordionItemContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n \n &:not(:last-child) ", ":not(.active) {\n border-bottom: 1px solid ", ";\n }\n"])), ItemHeaderContainer, COLORS.neutral_100);
|
|
9
|
+
export var ItemBodyContainer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: ", ";\n background: ", ";\n \n ", "\n \n .medium & {\n ", "\n }\n \n .large & {\n ", "\n }\n\n"])), function (props) {
|
|
13
10
|
return props.padding || '12px 16px';
|
|
14
|
-
}, COLORS.white);
|
|
11
|
+
}, COLORS.white, ComponentSStyling(ComponentTextStyle.Regular, null), ComponentMStyling(ComponentTextStyle.Regular, null), ComponentLStyling(ComponentTextStyle.Regular, null));
|
|
15
12
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styled","COLORS","ComponentMStyling","ComponentTextStyle","focusStyles","Z_INDEXES","AccordionMenuWrapper","div","
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styled","COLORS","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","focusStyles","Z_INDEXES","AccordionMenuWrapper","div","ItemHeaderContainer","Regular","neutral_600","primary_20","primary_700","hover","primary_800","primary_100","active","neutral_800","white","neutral_300","AccordionItemContainer","neutral_100","ItemBodyContainer","props","padding"],"sources":["../../src/Accordion/styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport {\n COLORS,\n ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle,\n focusStyles\n} from '../styles';\nimport { Z_INDEXES } from '../styles/z-indexes';\n\nexport const AccordionMenuWrapper = styled.div`\n min-width: 320px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n`;\n\n\n\nexport const ItemHeaderContainer = styled.div`\n position: relative;\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n outline: none;\n box-sizing: border-box;\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n div:last-child {\n margin-left: auto;\n }\n\n padding: 0 16px;\n min-height: 48px;\n \n svg {\n width: 20px;\n height: 20px;\n }\n \n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n padding: 0 24px;\n min-height: 56px;\n\n svg {\n width: 24px;\n height: 24px;\n }\n }\n\n &.large {\n ${ComponentLStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n padding: 0 32px;\n min-height: 64px;\n svg {\n width: 24px;\n height: 24px;\n }\n }\n\n :focus:not(:active) {\n ${focusStyles}\n }\n\n :hover {\n background: ${COLORS.primary_20};\n color: ${COLORS.primary_700};\n z-index: ${Z_INDEXES.hover};\n }\n\n :active {\n color: ${COLORS.primary_800};\n background: ${COLORS.primary_100};\n z-index: ${Z_INDEXES.active};\n }\n\n &.active {\n color: ${COLORS.neutral_800};\n }\n\n &.disabled {\n background: ${COLORS.white}!important;\n color: ${COLORS.neutral_300};\n cursor: not-allowed;\n pointer-events: none;\n svg {\n color: ${COLORS.neutral_300}!important;\n }\n }\n`;\n\nexport const AccordionItemContainer = styled.div`\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n \n &:not(:last-child) ${ItemHeaderContainer}:not(.active) {\n border-bottom: 1px solid ${COLORS.neutral_100};\n }\n`;\n\nexport const ItemBodyContainer = styled.div<{ padding?: string }>`\n padding: ${(props) => props.padding || '12px 16px'};\n background: ${COLORS.white};\n \n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\n \n .medium & {\n ${ComponentMStyling(ComponentTextStyle.Regular, null)}\n }\n \n .large & {\n ${ComponentLStyling(ComponentTextStyle.Regular, null)}\n }\n\n`;\n"],"mappings":";;AAAA,OAAOA,MAAM,MAAe,mBAAmB;AAC/C,SACEC,MAAM,EACNC,iBAAiB,EACjBC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,WAAW,QACN,WAAW;AAClB,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,OAAO,IAAMC,oBAAoB,GAAGR,MAAM,CAACS,GAAG,oKAK7C;AAID,OAAO,IAAMC,mBAAmB,GAAGV,MAAM,CAACS,GAAG,0iCASzCL,iBAAiB,CAACC,kBAAkB,CAACM,OAAO,EAAEV,MAAM,CAACW,WAAW,CAAC,EAe/DT,iBAAiB,CAACE,kBAAkB,CAACM,OAAO,EAAEV,MAAM,CAACW,WAAW,CAAC,EAWjEV,iBAAiB,CAACG,kBAAkB,CAACM,OAAO,EAAEV,MAAM,CAACW,WAAW,CAAC,EAUjEN,WAAW,EAICL,MAAM,CAACY,UAAU,EACtBZ,MAAM,CAACa,WAAW,EAChBP,SAAS,CAACQ,KAAK,EAIjBd,MAAM,CAACe,WAAW,EACbf,MAAM,CAACgB,WAAW,EACrBV,SAAS,CAACW,MAAM,EAIlBjB,MAAM,CAACkB,WAAW,EAIblB,MAAM,CAACmB,KAAK,EACjBnB,MAAM,CAACoB,WAAW,EAIhBpB,MAAM,CAACoB,WAAW,CAGhC;AAED,OAAO,IAAMC,sBAAsB,GAAGtB,MAAM,CAACS,GAAG,yPAMzBC,mBAAmB,EACXT,MAAM,CAACsB,WAAW,CAEhD;AAED,OAAO,IAAMC,iBAAiB,GAAGxB,MAAM,CAACS,GAAG,kMAC9B,UAACgB,KAAK;EAAA,OAAKA,KAAK,CAACC,OAAO,IAAI,WAAW;AAAA,GACpCzB,MAAM,CAACmB,KAAK,EAExBhB,iBAAiB,CAACC,kBAAkB,CAACM,OAAO,EAAE,IAAI,CAAC,EAGjDR,iBAAiB,CAACE,kBAAkB,CAACM,OAAO,EAAE,IAAI,CAAC,EAInDT,iBAAiB,CAACG,kBAAkB,CAACM,OAAO,EAAE,IAAI,CAAC,CAGxD"}
|
|
@@ -24,11 +24,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
24
24
|
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) { (0, _defineProperty2.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; }
|
|
25
25
|
var TileNoteText = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)([""])));
|
|
26
26
|
exports.TileNoteText = TileNoteText;
|
|
27
|
-
var TileNoteIcon = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["
|
|
27
|
+
var TileNoteIcon = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)([""])));
|
|
28
28
|
exports.TileNoteIcon = TileNoteIcon;
|
|
29
29
|
var TileNoteWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n align-items: center;\n color: ", ";\n\n &.small {\n gap: 4px;\n\n ", " {\n width: 16px;\n height: 16px;\n }\n\n ", " {\n ", "\n }\n }\n\n &.medium {\n gap: 6px;\n\n ", " {\n width: 16px;\n height: 16px;\n }\n\n ", " {\n ", "\n }\n\n }\n\n &.large {\n gap: 8px;\n\n ", " {\n width: 20px;\n height: 20px;\n }\n\n ", " {\n ", "\n }\n }\n"])), _styles.COLORS.neutral_600, TileNoteIcon, TileNoteText, (0, _styles.ComponentXXSStyling)(_styles.ComponentTextStyle.Regular, null), TileNoteIcon, TileNoteText, (0, _styles.ComponentXSStyling)(_styles.ComponentTextStyle.Regular, null), TileNoteIcon, TileNoteText, (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Regular, null));
|
|
30
30
|
exports.TileNoteWrapper = TileNoteWrapper;
|
|
31
|
-
var TileHyperLinkIcon = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["
|
|
31
|
+
var TileHyperLinkIcon = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)([""])));
|
|
32
32
|
exports.TileHyperLinkIcon = TileHyperLinkIcon;
|
|
33
33
|
var TileHyperLinkText = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)([""])));
|
|
34
34
|
exports.TileHyperLinkText = TileHyperLinkText;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileCommonItems.cjs","names":["TileNoteText","styled","div","TileNoteIcon","TileNoteWrapper","COLORS","neutral_600","ComponentXXSStyling","ComponentTextStyle","Regular","ComponentXSStyling","ComponentSStyling","TileHyperLinkIcon","TileHyperLinkText","TileHyperLinkWrapper","Bold","primary_500","ComponentMStyling","ComponentLStyling","RenderTileItem","item","size","key","undefined","componentType","action","disabled","icon","active","onChange","defaultState","activeState","items","itemsType","onClick","actionIcon","actionLabel","actionVariant","actionLoading","multiSelect","scrollable","pinTopItem","maxHeight","noteIcon","React","cloneElement","Size","Large","noteText","linkText","linkIcon","rest","buttonText"],"sources":["../../src/Tile/TileCommonItems.tsx"],"sourcesContent":["import {\n TileDropdownButton,\n TileHyperLink,\n TileIconButton,\n TileNote,\n TileStandardButton,\n TileToggleButton\n} from './TileTypes';\nimport {Button, IconButton} from '../Button';\nimport {ToggleButton} from '../Toggles';\nimport {DropdownButton} from '../Dropdown';\nimport React from 'react';\nimport styled from 'styled-components';\nimport {\n COLORS, ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle,\n ComponentXSStyling,\n ComponentXXSStyling\n} from '../styles';\nimport {HyperLink} from '../HyperLink';\nimport {Size} from '../types';\n\n\nexport const TileNoteText = styled.div``;\nexport const TileNoteIcon = styled.div
|
|
1
|
+
{"version":3,"file":"TileCommonItems.cjs","names":["TileNoteText","styled","div","TileNoteIcon","TileNoteWrapper","COLORS","neutral_600","ComponentXXSStyling","ComponentTextStyle","Regular","ComponentXSStyling","ComponentSStyling","TileHyperLinkIcon","TileHyperLinkText","TileHyperLinkWrapper","Bold","primary_500","ComponentMStyling","ComponentLStyling","RenderTileItem","item","size","key","undefined","componentType","action","disabled","icon","active","onChange","defaultState","activeState","items","itemsType","onClick","actionIcon","actionLabel","actionVariant","actionLoading","multiSelect","scrollable","pinTopItem","maxHeight","noteIcon","React","cloneElement","Size","Large","noteText","linkText","linkIcon","rest","buttonText"],"sources":["../../src/Tile/TileCommonItems.tsx"],"sourcesContent":["import {\n TileDropdownButton,\n TileHyperLink,\n TileIconButton,\n TileNote,\n TileStandardButton,\n TileToggleButton\n} from './TileTypes';\nimport {Button, IconButton} from '../Button';\nimport {ToggleButton} from '../Toggles';\nimport {DropdownButton} from '../Dropdown';\nimport React from 'react';\nimport styled from 'styled-components';\nimport {\n COLORS, ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle,\n ComponentXSStyling,\n ComponentXXSStyling\n} from '../styles';\nimport {HyperLink} from '../HyperLink';\nimport {Size} from '../types';\n\n\nexport const TileNoteText = styled.div``;\nexport const TileNoteIcon = styled.div``;\nexport const TileNoteWrapper = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n color: ${COLORS.neutral_600};\n\n &.small {\n gap: 4px;\n\n ${TileNoteIcon} {\n width: 16px;\n height: 16px;\n }\n\n ${TileNoteText} {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n }\n }\n\n &.medium {\n gap: 6px;\n\n ${TileNoteIcon} {\n width: 16px;\n height: 16px;\n }\n\n ${TileNoteText} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n }\n\n }\n\n &.large {\n gap: 8px;\n\n ${TileNoteIcon} {\n width: 20px;\n height: 20px;\n }\n\n ${TileNoteText} {\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\n }\n }\n`;\n\n\nexport const TileHyperLinkIcon = styled.div``;\nexport const TileHyperLinkText = styled.div``;\n\nexport const TileHyperLinkWrapper = styled.div`\n width: max-content;\n\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.primary_500)}\n a {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n\n &.small {\n ${TileHyperLinkIcon} {\n width: 24px;\n height: 24px;\n }\n\n ${TileHyperLinkText} {\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\n }\n\n a {\n gap: 4px;\n }\n }\n\n &.medium {\n ${TileHyperLinkIcon} {\n width: 24px;\n height: 24px;\n }\n\n ${TileHyperLinkText} {\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\n }\n\n a {\n gap: 6px;\n }\n }\n\n &.large {\n ${TileHyperLinkIcon} {\n width: 28px;\n height: 28px;\n }\n\n ${TileHyperLinkText} {\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\n }\n\n a {\n gap: 8px;\n }\n }\n`\n\nexport const RenderTileItem = (item: TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton | TileNote | TileHyperLink,\n size: Size,\n key: any | undefined = undefined) => {\n switch (item.componentType) {\n case 'icon': {\n return <IconButton key={key}\n variant={'secondary'}\n useTransparentBackground={true}\n shape={'circular'}\n action={item.action}\n disabled={item.disabled}>\n {item.icon}\n </IconButton>\n }\n case 'toggle': {\n return <ToggleButton key={key}\n active={item.active}\n onChange={item.onChange}\n defaultState={item.defaultState}\n activeState={item.activeState}\n disabled={item.disabled}/>\n }\n case 'dropdown': {\n return <DropdownButton key={key}\n type={'icon'}\n items={item.items}\n itemsType={item.itemsType}\n onClick={item.onClick}\n icon={item.icon}\n action={item.action}\n actionIcon={item.actionIcon}\n actionLabel={item.actionLabel}\n actionVariant={item.actionVariant}\n actionLoading={item.actionLoading}\n multiSelect={item.multiSelect}\n scrollable={item.scrollable}\n pinTopItem={item.pinTopItem}\n maxHeight={item.maxHeight}\n disabled={item.disabled}/>\n\n }\n case 'note': {\n return <TileNoteWrapper key={key} className={size}>\n {\n item.noteIcon &&\n <TileNoteIcon>\n {React.cloneElement(item.noteIcon as React.ReactElement, {size: size === Size.Large ? '20px' : '16'})}\n </TileNoteIcon>\n }\n <TileNoteText>{item.noteText}</TileNoteText>\n </TileNoteWrapper>\n\n }\n case 'link': {\n const {linkText, componentType, linkIcon, ...rest} = item;\n return <TileHyperLinkWrapper className={size} key={key}>\n <HyperLink {...rest}>\n <TileHyperLinkIcon>\n {React.cloneElement(linkIcon as React.ReactElement, {size: size === Size.Large ? '28px' : '24px'})}\n </TileHyperLinkIcon>\n <TileHyperLinkText>{linkText}</TileHyperLinkText>\n </HyperLink>\n </TileHyperLinkWrapper>\n }\n case 'button': {\n const {buttonText, componentType, ...rest} = item;\n return <Button key={key}\n size={size}\n {...rest}>\n {buttonText}\n </Button>\n }\n }\n}\n"],"mappings":";;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AAA8B;AAAA;EAAA;AAAA;AAAA;AAAA;AAGvB,IAAMA,YAAY,GAAGC,yBAAM,CAACC,GAAG,mFAAE;AAAC;AAClC,IAAMC,YAAY,GAAGF,yBAAM,CAACC,GAAG,qFAAE;AAAC;AAClC,IAAME,eAAe,GAAGH,yBAAM,CAACC,GAAG,mjBAI9BG,cAAM,CAACC,WAAW,EAKvBH,YAAY,EAKZH,YAAY,EACV,IAAAO,2BAAmB,EAACC,0BAAkB,CAACC,OAAO,EAAE,IAAI,CAAC,EAOvDN,YAAY,EAKZH,YAAY,EACV,IAAAU,0BAAkB,EAACF,0BAAkB,CAACC,OAAO,EAAE,IAAI,CAAC,EAQtDN,YAAY,EAKZH,YAAY,EACV,IAAAW,yBAAiB,EAACH,0BAAkB,CAACC,OAAO,EAAE,IAAI,CAAC,CAG1D;AAAC;AAGK,IAAMG,iBAAiB,GAAGX,yBAAM,CAACC,GAAG,qFAAE;AAAC;AACvC,IAAMW,iBAAiB,GAAGZ,yBAAM,CAACC,GAAG,qFAAE;AAAC;AAEvC,IAAMY,oBAAoB,GAAGb,yBAAM,CAACC,GAAG,ypBAG1C,IAAAS,yBAAiB,EAACH,0BAAkB,CAACO,IAAI,EAAEV,cAAM,CAACW,WAAW,CAAC,EAS5DJ,iBAAiB,EAKjBC,iBAAiB,EACf,IAAAF,yBAAiB,EAACH,0BAAkB,CAACO,IAAI,EAAE,IAAI,CAAC,EASlDH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IACA,KAAK,QAAQ;MAAE;QACb,IAAO8B,UAAU,GAA4BhC,IAAI,CAA1CgC,UAAU;UAAE5B,cAAa,GAAaJ,IAAI,CAA9BI,aAAa;UAAK2B,KAAI,0CAAI/B,IAAI;QACjD,oBAAO,qBAAC,cAAM;UACC,IAAI,EAAEC;QAAK,GACP8B,KAAI;UAAA,UACpBC;QAAU,IAHO9B,GAAG,CAId;MACX;EAAC;AAEL,CAAC;AAAA"}
|
|
@@ -17,9 +17,9 @@ import { Size } from '../types';
|
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
export var TileNoteText = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral([""])));
|
|
20
|
-
export var TileNoteIcon = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["
|
|
20
|
+
export var TileNoteIcon = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([""])));
|
|
21
21
|
export var TileNoteWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n color: ", ";\n\n &.small {\n gap: 4px;\n\n ", " {\n width: 16px;\n height: 16px;\n }\n\n ", " {\n ", "\n }\n }\n\n &.medium {\n gap: 6px;\n\n ", " {\n width: 16px;\n height: 16px;\n }\n\n ", " {\n ", "\n }\n\n }\n\n &.large {\n gap: 8px;\n\n ", " {\n width: 20px;\n height: 20px;\n }\n\n ", " {\n ", "\n }\n }\n"])), COLORS.neutral_600, TileNoteIcon, TileNoteText, ComponentXXSStyling(ComponentTextStyle.Regular, null), TileNoteIcon, TileNoteText, ComponentXSStyling(ComponentTextStyle.Regular, null), TileNoteIcon, TileNoteText, ComponentSStyling(ComponentTextStyle.Regular, null));
|
|
22
|
-
export var TileHyperLinkIcon = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["
|
|
22
|
+
export var TileHyperLinkIcon = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([""])));
|
|
23
23
|
export var TileHyperLinkText = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral([""])));
|
|
24
24
|
export var TileHyperLinkWrapper = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: max-content;\n\n ", "\n a {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n\n &.small {\n ", " {\n width: 24px;\n height: 24px;\n }\n\n ", " {\n ", "\n }\n\n a {\n gap: 4px;\n }\n }\n\n &.medium {\n ", " {\n width: 24px;\n height: 24px;\n }\n\n ", " {\n ", "\n }\n\n a {\n gap: 6px;\n }\n }\n\n &.large {\n ", " {\n width: 28px;\n height: 28px;\n }\n\n ", " {\n ", "\n }\n\n a {\n gap: 8px;\n }\n }\n"])), ComponentSStyling(ComponentTextStyle.Bold, COLORS.primary_500), TileHyperLinkIcon, TileHyperLinkText, ComponentSStyling(ComponentTextStyle.Bold, null), TileHyperLinkIcon, TileHyperLinkText, ComponentMStyling(ComponentTextStyle.Bold, null), TileHyperLinkIcon, TileHyperLinkText, ComponentLStyling(ComponentTextStyle.Bold, null));
|
|
25
25
|
export var RenderTileItem = function RenderTileItem(item, size) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileCommonItems.js","names":["Button","IconButton","ToggleButton","DropdownButton","React","styled","COLORS","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","ComponentXXSStyling","HyperLink","Size","TileNoteText","div","TileNoteIcon","TileNoteWrapper","neutral_600","Regular","TileHyperLinkIcon","TileHyperLinkText","TileHyperLinkWrapper","Bold","primary_500","RenderTileItem","item","size","key","undefined","componentType","action","disabled","icon","active","onChange","defaultState","activeState","items","itemsType","onClick","actionIcon","actionLabel","actionVariant","actionLoading","multiSelect","scrollable","pinTopItem","maxHeight","noteIcon","cloneElement","Large","noteText","linkText","linkIcon","rest","buttonText"],"sources":["../../src/Tile/TileCommonItems.tsx"],"sourcesContent":["import {\n TileDropdownButton,\n TileHyperLink,\n TileIconButton,\n TileNote,\n TileStandardButton,\n TileToggleButton\n} from './TileTypes';\nimport {Button, IconButton} from '../Button';\nimport {ToggleButton} from '../Toggles';\nimport {DropdownButton} from '../Dropdown';\nimport React from 'react';\nimport styled from 'styled-components';\nimport {\n COLORS, ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle,\n ComponentXSStyling,\n ComponentXXSStyling\n} from '../styles';\nimport {HyperLink} from '../HyperLink';\nimport {Size} from '../types';\n\n\nexport const TileNoteText = styled.div``;\nexport const TileNoteIcon = styled.div
|
|
1
|
+
{"version":3,"file":"TileCommonItems.js","names":["Button","IconButton","ToggleButton","DropdownButton","React","styled","COLORS","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","ComponentXXSStyling","HyperLink","Size","TileNoteText","div","TileNoteIcon","TileNoteWrapper","neutral_600","Regular","TileHyperLinkIcon","TileHyperLinkText","TileHyperLinkWrapper","Bold","primary_500","RenderTileItem","item","size","key","undefined","componentType","action","disabled","icon","active","onChange","defaultState","activeState","items","itemsType","onClick","actionIcon","actionLabel","actionVariant","actionLoading","multiSelect","scrollable","pinTopItem","maxHeight","noteIcon","cloneElement","Large","noteText","linkText","linkIcon","rest","buttonText"],"sources":["../../src/Tile/TileCommonItems.tsx"],"sourcesContent":["import {\n TileDropdownButton,\n TileHyperLink,\n TileIconButton,\n TileNote,\n TileStandardButton,\n TileToggleButton\n} from './TileTypes';\nimport {Button, IconButton} from '../Button';\nimport {ToggleButton} from '../Toggles';\nimport {DropdownButton} from '../Dropdown';\nimport React from 'react';\nimport styled from 'styled-components';\nimport {\n COLORS, ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle,\n ComponentXSStyling,\n ComponentXXSStyling\n} from '../styles';\nimport {HyperLink} from '../HyperLink';\nimport {Size} from '../types';\n\n\nexport const TileNoteText = styled.div``;\nexport const TileNoteIcon = styled.div``;\nexport const TileNoteWrapper = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n color: ${COLORS.neutral_600};\n\n &.small {\n gap: 4px;\n\n ${TileNoteIcon} {\n width: 16px;\n height: 16px;\n }\n\n ${TileNoteText} {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n }\n }\n\n &.medium {\n gap: 6px;\n\n ${TileNoteIcon} {\n width: 16px;\n height: 16px;\n }\n\n ${TileNoteText} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n }\n\n }\n\n &.large {\n gap: 8px;\n\n ${TileNoteIcon} {\n width: 20px;\n height: 20px;\n }\n\n ${TileNoteText} {\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\n }\n }\n`;\n\n\nexport const TileHyperLinkIcon = styled.div``;\nexport const TileHyperLinkText = styled.div``;\n\nexport const TileHyperLinkWrapper = styled.div`\n width: max-content;\n\n ${ComponentSStyling(ComponentTextStyle.Bold, COLORS.primary_500)}\n a {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n\n &.small {\n ${TileHyperLinkIcon} {\n width: 24px;\n height: 24px;\n }\n\n ${TileHyperLinkText} {\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\n }\n\n a {\n gap: 4px;\n }\n }\n\n &.medium {\n ${TileHyperLinkIcon} {\n width: 24px;\n height: 24px;\n }\n\n ${TileHyperLinkText} {\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\n }\n\n a {\n gap: 6px;\n }\n }\n\n &.large {\n ${TileHyperLinkIcon} {\n width: 28px;\n height: 28px;\n }\n\n ${TileHyperLinkText} {\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\n }\n\n a {\n gap: 8px;\n }\n }\n`\n\nexport const RenderTileItem = (item: TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton | TileNote | TileHyperLink,\n size: Size,\n key: any | undefined = undefined) => {\n switch (item.componentType) {\n case 'icon': {\n return <IconButton key={key}\n variant={'secondary'}\n useTransparentBackground={true}\n shape={'circular'}\n action={item.action}\n disabled={item.disabled}>\n {item.icon}\n </IconButton>\n }\n case 'toggle': {\n return <ToggleButton key={key}\n active={item.active}\n onChange={item.onChange}\n defaultState={item.defaultState}\n activeState={item.activeState}\n disabled={item.disabled}/>\n }\n case 'dropdown': {\n return <DropdownButton key={key}\n type={'icon'}\n items={item.items}\n itemsType={item.itemsType}\n onClick={item.onClick}\n icon={item.icon}\n action={item.action}\n actionIcon={item.actionIcon}\n actionLabel={item.actionLabel}\n actionVariant={item.actionVariant}\n actionLoading={item.actionLoading}\n multiSelect={item.multiSelect}\n scrollable={item.scrollable}\n pinTopItem={item.pinTopItem}\n maxHeight={item.maxHeight}\n disabled={item.disabled}/>\n\n }\n case 'note': {\n return <TileNoteWrapper key={key} className={size}>\n {\n item.noteIcon &&\n <TileNoteIcon>\n {React.cloneElement(item.noteIcon as React.ReactElement, {size: size === Size.Large ? '20px' : '16'})}\n </TileNoteIcon>\n }\n <TileNoteText>{item.noteText}</TileNoteText>\n </TileNoteWrapper>\n\n }\n case 'link': {\n const {linkText, componentType, linkIcon, ...rest} = item;\n return <TileHyperLinkWrapper className={size} key={key}>\n <HyperLink {...rest}>\n <TileHyperLinkIcon>\n {React.cloneElement(linkIcon as React.ReactElement, {size: size === Size.Large ? '28px' : '24px'})}\n </TileHyperLinkIcon>\n <TileHyperLinkText>{linkText}</TileHyperLinkText>\n </HyperLink>\n </TileHyperLinkWrapper>\n }\n case 'button': {\n const {buttonText, componentType, ...rest} = item;\n return <Button key={key}\n size={size}\n {...rest}>\n {buttonText}\n </Button>\n }\n }\n}\n"],"mappings":";;;;;;;;AAQA,SAAQA,MAAM,EAAEC,UAAU,QAAO,WAAW;AAC5C,SAAQC,YAAY,QAAO,YAAY;AACvC,SAAQC,cAAc,QAAO,aAAa;AAC1C,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SACEC,MAA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EAAC;AAEL,CAAC"}
|
package/dist/Tile/TileHeader.cjs
CHANGED
|
@@ -15,17 +15,15 @@ var _Button = require("../Button");
|
|
|
15
15
|
var _SystemIcons = require("../icons/systemicons/SystemIcons");
|
|
16
16
|
var _TileCommonItems = require("./TileCommonItems");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var Wrapper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n\n min-height: 56px;\n box-sizing: border-box;\n\n &.small {\n padding: 8px 16px;\n min-height: 56px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n }\n\n &.medium {\n padding: 12px 20px;\n min-height: 64px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n\n }\n\n &.large {\n padding: 16px 24px;\n min-height: 72px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n\n }\n"])), SubtitleContainer, (0, _styles.ComponentXXSStyling)(_styles.ComponentTextStyle.Regular, null), TitleContainer, (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Bold, null), SubtitleContainer, (0, _styles.ComponentXSStyling)(_styles.ComponentTextStyle.Regular, null), TitleContainer, (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Bold, null), SubtitleContainer, (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Regular, null), TitleContainer, (0, _styles.ComponentLStyling)(_styles.ComponentTextStyle.Bold, null));
|
|
18
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
19
|
+
var TagLineContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _styles.COLORS.neutral_600);
|
|
20
|
+
var TitleContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _styles.COLORS.black);
|
|
21
|
+
var TextContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n flex: 1;\n"])));
|
|
22
|
+
var ActionContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
|
|
23
|
+
var Wrapper = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n\n min-height: 56px;\n box-sizing: border-box;\n\n &.small {\n padding: 4px 16px;\n min-height: 56px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n }\n\n &.medium {\n padding: 8px 20px;\n min-height: 64px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n\n }\n\n &.large {\n padding: 12px 24px;\n min-height: 72px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n\n }\n"])), TagLineContainer, (0, _styles.ComponentXXSStyling)(_styles.ComponentTextStyle.Regular, null), TitleContainer, (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Bold, null), TagLineContainer, (0, _styles.ComponentXSStyling)(_styles.ComponentTextStyle.Regular, null), TitleContainer, (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Bold, null), TagLineContainer, (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Regular, null), TitleContainer, (0, _styles.ComponentLStyling)(_styles.ComponentTextStyle.Bold, null));
|
|
25
24
|
var TileHeader = function TileHeader(_ref) {
|
|
26
25
|
var title = _ref.title,
|
|
27
|
-
|
|
28
|
-
subtitleIcon = _ref.subtitleIcon,
|
|
26
|
+
tagLine = _ref.tagLine,
|
|
29
27
|
tooltip = _ref.tooltip,
|
|
30
28
|
buttons = _ref.buttons,
|
|
31
29
|
size = _ref.size;
|
|
@@ -54,16 +52,10 @@ var TileHeader = function TileHeader(_ref) {
|
|
|
54
52
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, {
|
|
55
53
|
className: size,
|
|
56
54
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(TextContainer, {
|
|
57
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
55
|
+
children: [tagLine && /*#__PURE__*/(0, _jsxRuntime.jsx)(TagLineContainer, {
|
|
56
|
+
children: tagLine
|
|
57
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(TitleContainer, {
|
|
58
58
|
children: title
|
|
59
|
-
}), subtitle && /*#__PURE__*/(0, _jsxRuntime.jsxs)(SubtitleContainer, {
|
|
60
|
-
children: [subtitleIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(SubtitleIconContainer, {
|
|
61
|
-
children: /*#__PURE__*/_react.default.cloneElement(subtitleIcon, {
|
|
62
|
-
size: size === _types.Size.Large ? '20px' : '16px'
|
|
63
|
-
})
|
|
64
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
65
|
-
children: subtitle
|
|
66
|
-
})]
|
|
67
59
|
})]
|
|
68
60
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(ActionContainer, {
|
|
69
61
|
children: [renderTooltip(), buttons && buttons.map(function (item, index) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileHeader.cjs","names":["
|
|
1
|
+
{"version":3,"file":"TileHeader.cjs","names":["TagLineContainer","styled","div","COLORS","neutral_600","TitleContainer","black","TextContainer","ActionContainer","Wrapper","ComponentXXSStyling","ComponentTextStyle","Regular","ComponentSStyling","Bold","ComponentXSStyling","ComponentMStyling","ComponentLStyling","TileHeader","title","tagLine","tooltip","buttons","size","renderTooltip","Size","XSmall","cursor","map","item","index","RenderTileItem"],"sources":["../../src/Tile/TileHeader.tsx"],"sourcesContent":["import React from 'react';\nimport {TileHeaderProps} from './TileTypes';\nimport {Size} from '../types';\nimport styled from 'styled-components';\nimport {\n COLORS,\n ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle, ComponentXSStyling,\n ComponentXXSStyling\n} from '../styles';\nimport {TooltipWrapper} from '../Tooltips';\nimport {IconButton} from '../Button';\nimport {Help} from '../icons/systemicons/SystemIcons';\nimport {RenderTileItem} from './TileCommonItems';\n\nconst TagLineContainer = styled.div`\n color: ${COLORS.neutral_600};\n`;\n\nconst TitleContainer = styled.div`\n color: ${COLORS.black};\n`;\n\nconst TextContainer = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n flex: 1;\n`;\n\nconst ActionContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Wrapper = styled.div`\n display: flex;\n align-items: center;\n\n min-height: 56px;\n box-sizing: border-box;\n\n &.small {\n padding: 4px 16px;\n min-height: 56px;\n\n ${TagLineContainer} {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n }\n\n ${TitleContainer} {\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\n }\n }\n\n &.medium {\n padding: 8px 20px;\n min-height: 64px;\n\n ${TagLineContainer} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n }\n\n ${TitleContainer} {\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\n }\n\n }\n\n &.large {\n padding: 12px 24px;\n min-height: 72px;\n\n ${TagLineContainer} {\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\n }\n\n ${TitleContainer} {\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\n }\n\n }\n`;\n\n\nconst TileHeader: React.FunctionComponent<TileHeaderProps & { size: Size }> = ({\n title,\n tagLine,\n tooltip,\n buttons,\n size\n }) => {\n\n const renderTooltip = () =>\n !!tooltip &&\n <TooltipWrapper delay=\"0s\" size={Size.XSmall}\n align=\"center\"\n position=\"bottom\"\n withArrow={false}\n label={tooltip}>\n <IconButton variant=\"secondary\"\n shape=\"circular\"\n style={{cursor: 'help'}}\n action={() => {\n }}>\n <Help size=\"24px\" color={COLORS.neutral_600}/>\n </IconButton>\n </TooltipWrapper>;\n\n\n return (\n <Wrapper className={size}>\n <TextContainer>\n {tagLine && <TagLineContainer>{tagLine}</TagLineContainer>}\n <TitleContainer>{title}</TitleContainer>\n </TextContainer>\n <ActionContainer>\n {renderTooltip()}\n {buttons && buttons.map((item, index) => RenderTileItem(item, size, index))}\n </ActionContainer>\n </Wrapper>\n )\n}\n\nexport default TileHeader;\n"],"mappings":";;;;;;;;AAAA;AAEA;AACA;AACA;AAQA;AACA;AACA;AACA;AAAiD;AAAA;AAEjD,IAAMA,gBAAgB,GAAGC,yBAAM,CAACC,GAAG,sGACxBC,cAAM,CAACC,WAAW,CAC5B;AAED,IAAMC,cAAc,GAAGJ,yBAAM,CAACC,GAAG,wGACtBC,cAAM,CAACG,KAAK,CACtB;AAED,IAAMC,aAAa,GAAGN,yBAAM,CAACC,GAAG,4KAK/B;AAED,IAAMM,eAAe,GAAGP,yBAAM,CAACC,GAAG,iIAGjC;AAED,IAAMO,OAAO,GAAGR,yBAAM,CAACC,GAAG,ykBAWpBF,gBAAgB,EACd,IAAAU,2BAAmB,EAACC,0BAAkB,CAACC,OAAO,EAAE,IAAI,CAAC,EAGvDP,cAAc,EACZ,IAAAQ,yBAAiB,EAACF,0BAAkB,CAACG,IAAI,EAAE,IAAI,CAAC,EAQlDd,gBAAgB,EACd,IAAAe,0BAAkB,EAACJ,0BAAkB,CAACC,OAAO,EAAE,IAAI,CAAC,EAGtDP,cAAc,EACZ,IAAAW,yBAAiB,EAACL,0BAAkB,CAACG,IAAI,EAAE,IAAI,CAAC,EASlDd,gBAAgB,EACd,IAAAa,yBAAiB,EAACF,0BAAkB,CAACC,OAAO,EAAE,IAAI,CAAC,EAGrDP,cAAc,EACZ,IAAAY,yBAAiB,EAACN,0BAAkB,CAACG,IAAI,EAAE,IAAI,CAAC,CAIvD;AAGD,IAAMI,UAAq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Literal from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Size } from '../types';
|
|
5
5
|
import styled from 'styled-components';
|
|
@@ -10,16 +10,14 @@ import { Help } from '../icons/systemicons/SystemIcons';
|
|
|
10
10
|
import { RenderTileItem } from './TileCommonItems';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var Wrapper = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n min-height: 56px;\n box-sizing: border-box;\n\n &.small {\n padding: 8px 16px;\n min-height: 56px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n }\n\n &.medium {\n padding: 12px 20px;\n min-height: 64px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n\n }\n\n &.large {\n padding: 16px 24px;\n min-height: 72px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n\n }\n"])), SubtitleContainer, ComponentXXSStyling(ComponentTextStyle.Regular, null), TitleContainer, ComponentSStyling(ComponentTextStyle.Bold, null), SubtitleContainer, ComponentXSStyling(ComponentTextStyle.Regular, null), TitleContainer, ComponentMStyling(ComponentTextStyle.Bold, null), SubtitleContainer, ComponentSStyling(ComponentTextStyle.Regular, null), TitleContainer, ComponentLStyling(ComponentTextStyle.Bold, null));
|
|
13
|
+
var TagLineContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), COLORS.neutral_600);
|
|
14
|
+
var TitleContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n"])), COLORS.black);
|
|
15
|
+
var TextContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n flex: 1;\n"])));
|
|
16
|
+
var ActionContainer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
|
|
17
|
+
var Wrapper = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n min-height: 56px;\n box-sizing: border-box;\n\n &.small {\n padding: 4px 16px;\n min-height: 56px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n }\n\n &.medium {\n padding: 8px 20px;\n min-height: 64px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n\n }\n\n &.large {\n padding: 12px 24px;\n min-height: 72px;\n\n ", " {\n ", "\n }\n\n ", " {\n ", "\n }\n\n }\n"])), TagLineContainer, ComponentXXSStyling(ComponentTextStyle.Regular, null), TitleContainer, ComponentSStyling(ComponentTextStyle.Bold, null), TagLineContainer, ComponentXSStyling(ComponentTextStyle.Regular, null), TitleContainer, ComponentMStyling(ComponentTextStyle.Bold, null), TagLineContainer, ComponentSStyling(ComponentTextStyle.Regular, null), TitleContainer, ComponentLStyling(ComponentTextStyle.Bold, null));
|
|
19
18
|
var TileHeader = function TileHeader(_ref) {
|
|
20
19
|
var title = _ref.title,
|
|
21
|
-
|
|
22
|
-
subtitleIcon = _ref.subtitleIcon,
|
|
20
|
+
tagLine = _ref.tagLine,
|
|
23
21
|
tooltip = _ref.tooltip,
|
|
24
22
|
buttons = _ref.buttons,
|
|
25
23
|
size = _ref.size;
|
|
@@ -48,16 +46,10 @@ var TileHeader = function TileHeader(_ref) {
|
|
|
48
46
|
return /*#__PURE__*/_jsxs(Wrapper, {
|
|
49
47
|
className: size,
|
|
50
48
|
children: [/*#__PURE__*/_jsxs(TextContainer, {
|
|
51
|
-
children: [/*#__PURE__*/_jsx(
|
|
49
|
+
children: [tagLine && /*#__PURE__*/_jsx(TagLineContainer, {
|
|
50
|
+
children: tagLine
|
|
51
|
+
}), /*#__PURE__*/_jsx(TitleContainer, {
|
|
52
52
|
children: title
|
|
53
|
-
}), subtitle && /*#__PURE__*/_jsxs(SubtitleContainer, {
|
|
54
|
-
children: [subtitleIcon && /*#__PURE__*/_jsx(SubtitleIconContainer, {
|
|
55
|
-
children: /*#__PURE__*/React.cloneElement(subtitleIcon, {
|
|
56
|
-
size: size === Size.Large ? '20px' : '16px'
|
|
57
|
-
})
|
|
58
|
-
}), /*#__PURE__*/_jsx("span", {
|
|
59
|
-
children: subtitle
|
|
60
|
-
})]
|
|
61
53
|
})]
|
|
62
54
|
}), /*#__PURE__*/_jsxs(ActionContainer, {
|
|
63
55
|
children: [renderTooltip(), buttons && buttons.map(function (item, index) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileHeader.js","names":["React","Size","styled","COLORS","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","ComponentXXSStyling","TooltipWrapper","IconButton","Help","RenderTileItem","
|
|
1
|
+
{"version":3,"file":"TileHeader.js","names":["React","Size","styled","COLORS","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","ComponentXXSStyling","TooltipWrapper","IconButton","Help","RenderTileItem","TagLineContainer","div","neutral_600","TitleContainer","black","TextContainer","ActionContainer","Wrapper","Regular","Bold","TileHeader","title","tagLine","tooltip","buttons","size","renderTooltip","XSmall","cursor","map","item","index"],"sources":["../../src/Tile/TileHeader.tsx"],"sourcesContent":["import React from 'react';\nimport {TileHeaderProps} from './TileTypes';\nimport {Size} from '../types';\nimport styled from 'styled-components';\nimport {\n COLORS,\n ComponentLStyling,\n ComponentMStyling,\n ComponentSStyling,\n ComponentTextStyle, ComponentXSStyling,\n ComponentXXSStyling\n} from '../styles';\nimport {TooltipWrapper} from '../Tooltips';\nimport {IconButton} from '../Button';\nimport {Help} from '../icons/systemicons/SystemIcons';\nimport {RenderTileItem} from './TileCommonItems';\n\nconst TagLineContainer = styled.div`\n color: ${COLORS.neutral_600};\n`;\n\nconst TitleContainer = styled.div`\n color: ${COLORS.black};\n`;\n\nconst TextContainer = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n flex: 1;\n`;\n\nconst ActionContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Wrapper = styled.div`\n display: flex;\n align-items: center;\n\n min-height: 56px;\n box-sizing: border-box;\n\n &.small {\n padding: 4px 16px;\n min-height: 56px;\n\n ${TagLineContainer} {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n }\n\n ${TitleContainer} {\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\n }\n }\n\n &.medium {\n padding: 8px 20px;\n min-height: 64px;\n\n ${TagLineContainer} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n }\n\n ${TitleContainer} {\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\n }\n\n }\n\n &.large {\n padding: 12px 24px;\n min-height: 72px;\n\n ${TagLineContainer} {\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\n }\n\n ${TitleContainer} {\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\n }\n\n }\n`;\n\n\nconst TileHeader: React.FunctionComponent<TileHeaderProps & { size: Size }> = ({\n title,\n tagLine,\n tooltip,\n buttons,\n size\n }) => {\n\n const renderTooltip = () =>\n !!tooltip &&\n <TooltipWrapper delay=\"0s\" size={Size.XSmall}\n align=\"center\"\n position=\"bottom\"\n withArrow={false}\n label={tooltip}>\n <IconButton variant=\"secondary\"\n shape=\"circular\"\n style={{cursor: 'help'}}\n action={() => {\n }}>\n <Help size=\"24px\" color={COLORS.neutral_600}/>\n </IconButton>\n </TooltipWrapper>;\n\n\n return (\n <Wrapper className={size}>\n <TextContainer>\n {tagLine && <TagLineContainer>{tagLine}</TagLineContainer>}\n <TitleContainer>{title}</TitleContainer>\n </TextContainer>\n <ActionContainer>\n {renderTooltip()}\n {buttons && buttons.map((item, index) => RenderTileItem(item, size, index))}\n </ActionContainer>\n </Wrapper>\n )\n}\n\nexport default TileHeader;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAAQC,IAAI,QAAO,UAAU;AAC7B,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SACEC,MAAM,EACNC,iBAAiB,EACjBC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAAEC,kBAAkB,EACtCC,mBAAmB,QACd,WAAW;AAClB,SAAQC,cAAc,QAAO,aAAa;AAC1C,SAAQC,UAAU,QAAO,WAAW;AACpC,SAAQC,IAAI,QAAO,kCAAkC;AACrD,SAAQC,cAAc,QAAO,mBAAmB;AAAC;AAAA;AAEjD,IAAMC,gBAAgB,GAAGZ,MAAM,CAACa,GAAG,wFACxBZ,MAAM,CAACa,WAAW,CAC5B;AAED,IAAMC,cAAc,GAAGf,MAAM,CAACa,GAAG,0FACtBZ,MAAM,CAACe,KAAK,CACtB;AAED,IAAMC,aAAa,GAAGjB,MAAM,CAACa,GAAG,8JAK/B;AAED,IAAMK,eAAe,GAAGlB,MAAM,CAACa,GAAG,mHAGjC;AAED,IAAMM,OAAO,GAAGnB,MAAM,CAACa,GAAG,2jBAWpBD,gBAAgB,EACdL,mBAAmB,CAACF,kBAAkB,CAACe,OAAO,EAAE,IAAI,CAAC,EAGvDL,cAAc,EACZX,iBAAiB,CAACC,kBAAkB,CAACgB,IAAI,EAAE,IAAI,CAAC,EAQlDT,gBAAgB,EACdN,kBAAkB,CAACD,kBAAkB,CAACe,OAAO,EAAE,IAAI,CAAC,EAGtDL,cAAc,EACZZ,iBAAiB,CAACE,kBAAkB,CAACgB,IAAI,EAAE,IAAI,CAAC,EASlDT,gBAAgB,EACdR,iBAAiB,CAACC,kBAAkB,CAACe,OAAO,EAAE,IAAI,CAAC,EAGrDL,cAAc,EACZb,iBAAiB,CAACG,kBAAk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,"file":"TileTypes.cjs","names":[],"sources":["../../src/Tile/TileTypes.ts"],"sourcesContent":["import React from 'react';\nimport {IconButtonProps} from '../Button/Iconbutton';\nimport {ToggleButtonProps} from '../Toggles/ToggleButton';\nimport {DropdownButtonProps} from '../Dropdown/DropdownButtonTypes';\nimport {ButtonProps} from '../Button/Button';\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\nimport {Size} from '../types';\n\n\nexport type TileIconButton = Pick<IconButtonProps, 'action' | 'disabled'> & {\n componentType: 'icon';\n icon: React.ReactNode;\n}\n\nexport type TileToggleButton =\n Pick<ToggleButtonProps, 'active' | 'onChange' | 'disabled' | 'defaultState' | 'activeState'>\n & { componentType: 'toggle'; }\n\nexport type TileDropdownButton =\n Pick<DropdownButtonProps, 'items' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'>\n & {\n componentType: 'dropdown';\n icon: React.ReactNode;\n}\n\nexport type TileStandardButton = Pick<ButtonProps, 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\n componentType: 'button';\n buttonText: string;\n}\n\nexport type TileNote = {\n componentType: 'note';\n noteIcon?: React.ReactNode;\n noteText: string;\n}\n\n\nexport type TileHyperLink = HyperlinkProps & {\n componentType: 'link';\n linkIcon?: React.ReactNode;\n linkText: string;\n}\n\nexport type FooterButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton;\nexport type HeaderButtons = TileIconButton | TileToggleButton | TileDropdownButton;\n\nexport interface TileHeaderProps {\n title: string;\n tooltip?: string;\n
|
|
1
|
+
{"version":3,"file":"TileTypes.cjs","names":[],"sources":["../../src/Tile/TileTypes.ts"],"sourcesContent":["import React from 'react';\nimport {IconButtonProps} from '../Button/Iconbutton';\nimport {ToggleButtonProps} from '../Toggles/ToggleButton';\nimport {DropdownButtonProps} from '../Dropdown/DropdownButtonTypes';\nimport {ButtonProps} from '../Button/Button';\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\nimport {Size} from '../types';\n\n\nexport type TileIconButton = Pick<IconButtonProps, 'action' | 'disabled'> & {\n componentType: 'icon';\n icon: React.ReactNode;\n}\n\nexport type TileToggleButton =\n Pick<ToggleButtonProps, 'active' | 'onChange' | 'disabled' | 'defaultState' | 'activeState'>\n & { componentType: 'toggle'; }\n\nexport type TileDropdownButton =\n Pick<DropdownButtonProps, 'items' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'>\n & {\n componentType: 'dropdown';\n icon: React.ReactNode;\n}\n\nexport type TileStandardButton = Pick<ButtonProps, 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\n componentType: 'button';\n buttonText: string;\n}\n\nexport type TileNote = {\n componentType: 'note';\n noteIcon?: React.ReactNode;\n noteText: string;\n}\n\n\nexport type TileHyperLink = HyperlinkProps & {\n componentType: 'link';\n linkIcon?: React.ReactNode;\n linkText: string;\n}\n\nexport type FooterButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton;\nexport type HeaderButtons = TileIconButton | TileToggleButton | TileDropdownButton;\n\nexport interface TileHeaderProps {\n title: string;\n tooltip?: string;\n tagLine?: string;\n buttons?: HeaderButtons[];\n}\n\nexport interface TileFooterProps {\n leftItem?: TileNote | TileHyperLink | TileStandardButton;\n buttons?: FooterButtons[];\n}\n\n\nexport interface TileProps extends React.HTMLAttributes<HTMLDivElement>{\n style?: {\n width?: string,\n minWidth?: string,\n maxWidth?: string,\n height?: string,\n minHeight?: string,\n maxHeight?: string,\n };\n\n size?: Size.Small | Size.Medium | Size.Large\n\n header?: TileHeaderProps;\n footer?: TileFooterProps;\n}\n"],"mappings":""}
|
package/dist/Tile/TileTypes.d.ts
CHANGED
|
@@ -35,8 +35,7 @@ export type HeaderButtons = TileIconButton | TileToggleButton | TileDropdownButt
|
|
|
35
35
|
export interface TileHeaderProps {
|
|
36
36
|
title: string;
|
|
37
37
|
tooltip?: string;
|
|
38
|
-
|
|
39
|
-
subtitleIcon?: React.ReactNode;
|
|
38
|
+
tagLine?: string;
|
|
40
39
|
buttons?: HeaderButtons[];
|
|
41
40
|
}
|
|
42
41
|
export interface TileFooterProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileTypes.js","names":[],"sources":["../../src/Tile/TileTypes.ts"],"sourcesContent":["import React from 'react';\nimport {IconButtonProps} from '../Button/Iconbutton';\nimport {ToggleButtonProps} from '../Toggles/ToggleButton';\nimport {DropdownButtonProps} from '../Dropdown/DropdownButtonTypes';\nimport {ButtonProps} from '../Button/Button';\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\nimport {Size} from '../types';\n\n\nexport type TileIconButton = Pick<IconButtonProps, 'action' | 'disabled'> & {\n componentType: 'icon';\n icon: React.ReactNode;\n}\n\nexport type TileToggleButton =\n Pick<ToggleButtonProps, 'active' | 'onChange' | 'disabled' | 'defaultState' | 'activeState'>\n & { componentType: 'toggle'; }\n\nexport type TileDropdownButton =\n Pick<DropdownButtonProps, 'items' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'>\n & {\n componentType: 'dropdown';\n icon: React.ReactNode;\n}\n\nexport type TileStandardButton = Pick<ButtonProps, 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\n componentType: 'button';\n buttonText: string;\n}\n\nexport type TileNote = {\n componentType: 'note';\n noteIcon?: React.ReactNode;\n noteText: string;\n}\n\n\nexport type TileHyperLink = HyperlinkProps & {\n componentType: 'link';\n linkIcon?: React.ReactNode;\n linkText: string;\n}\n\nexport type FooterButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton;\nexport type HeaderButtons = TileIconButton | TileToggleButton | TileDropdownButton;\n\nexport interface TileHeaderProps {\n title: string;\n tooltip?: string;\n
|
|
1
|
+
{"version":3,"file":"TileTypes.js","names":[],"sources":["../../src/Tile/TileTypes.ts"],"sourcesContent":["import React from 'react';\nimport {IconButtonProps} from '../Button/Iconbutton';\nimport {ToggleButtonProps} from '../Toggles/ToggleButton';\nimport {DropdownButtonProps} from '../Dropdown/DropdownButtonTypes';\nimport {ButtonProps} from '../Button/Button';\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\nimport {Size} from '../types';\n\n\nexport type TileIconButton = Pick<IconButtonProps, 'action' | 'disabled'> & {\n componentType: 'icon';\n icon: React.ReactNode;\n}\n\nexport type TileToggleButton =\n Pick<ToggleButtonProps, 'active' | 'onChange' | 'disabled' | 'defaultState' | 'activeState'>\n & { componentType: 'toggle'; }\n\nexport type TileDropdownButton =\n Pick<DropdownButtonProps, 'items' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'>\n & {\n componentType: 'dropdown';\n icon: React.ReactNode;\n}\n\nexport type TileStandardButton = Pick<ButtonProps, 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\n componentType: 'button';\n buttonText: string;\n}\n\nexport type TileNote = {\n componentType: 'note';\n noteIcon?: React.ReactNode;\n noteText: string;\n}\n\n\nexport type TileHyperLink = HyperlinkProps & {\n componentType: 'link';\n linkIcon?: React.ReactNode;\n linkText: string;\n}\n\nexport type FooterButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton;\nexport type HeaderButtons = TileIconButton | TileToggleButton | TileDropdownButton;\n\nexport interface TileHeaderProps {\n title: string;\n tooltip?: string;\n tagLine?: string;\n buttons?: HeaderButtons[];\n}\n\nexport interface TileFooterProps {\n leftItem?: TileNote | TileHyperLink | TileStandardButton;\n buttons?: FooterButtons[];\n}\n\n\nexport interface TileProps extends React.HTMLAttributes<HTMLDivElement>{\n style?: {\n width?: string,\n minWidth?: string,\n maxWidth?: string,\n height?: string,\n minHeight?: string,\n maxHeight?: string,\n };\n\n size?: Size.Small | Size.Medium | Size.Large\n\n header?: TileHeaderProps;\n footer?: TileFooterProps;\n}\n"],"mappings":""}
|