@elliemae/ds-chat-tile 3.6.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var TileButton_exports = {};
26
+ __export(TileButton_exports, {
27
+ TileButton: () => TileButton,
28
+ TileButtonWithSchema: () => TileButtonWithSchema
29
+ });
30
+ module.exports = __toCommonJS(TileButton_exports);
31
+ var React = __toESM(require("react"));
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ var import_react = __toESM(require("react"));
34
+ var import_ds_utilities = require("@elliemae/ds-utilities");
35
+ var import_ds_tooltip = require("@elliemae/ds-tooltip");
36
+ var import_ds_grid = require("@elliemae/ds-grid");
37
+ var import_ds_icons = require("@elliemae/ds-icons");
38
+ var import_styled = require("./styled");
39
+ var import_react_desc_prop_types = require("./react-desc-prop-types");
40
+ const TileButton = (props) => {
41
+ const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultTileButton);
42
+ (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.propsTileButton);
43
+ const {
44
+ label,
45
+ title,
46
+ dsId,
47
+ onClick,
48
+ onFocus,
49
+ onBlur,
50
+ Icon,
51
+ showClose,
52
+ onClose,
53
+ badge,
54
+ badgeColor,
55
+ badgePosition,
56
+ disabled,
57
+ selected,
58
+ isHeader,
59
+ ariaLabel,
60
+ tooltipPlacement,
61
+ disableTooltip,
62
+ innerRef
63
+ } = propsWithDefault;
64
+ const handleClick = import_react.default.useCallback(() => {
65
+ onClick(dsId, title);
66
+ }, [dsId, onClick, title]);
67
+ const MainContent = import_react.default.useMemo(
68
+ () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledWrapperCentralContent, {
69
+ alignItems: isHeader ? "center" : void 0,
70
+ children: [
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, {
72
+ width: "100%",
73
+ alignItems: "center",
74
+ justifyContent: "center",
75
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledTileButtonIcon, {
76
+ alignItems: "center",
77
+ justifyContent: "center",
78
+ children: [
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
80
+ size: "m"
81
+ }),
82
+ badge ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledStatusBadge, {
83
+ badgeColor,
84
+ badgePosition,
85
+ "data-testid": `tile-badge-${dsId}`
86
+ }) : null
87
+ ]
88
+ })
89
+ }),
90
+ !isHeader ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, {
91
+ width: "100%",
92
+ justifyContent: "center",
93
+ children: label ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledTileButtonLabel, {
94
+ children: label
95
+ }) : null
96
+ }) : null
97
+ ]
98
+ }),
99
+ [isHeader, Icon, badge, dsId, badgeColor, badgePosition, label]
100
+ );
101
+ const Btn = import_react.default.useMemo(
102
+ () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledTileButton, {
103
+ isHeader,
104
+ value: dsId,
105
+ "data-testid": `tile-button-${dsId}`,
106
+ "data-key": dsId,
107
+ onClick: handleClick,
108
+ onFocus,
109
+ onBlur,
110
+ disabled,
111
+ selected,
112
+ badgeColor,
113
+ badgePosition,
114
+ "aria-pressed": selected,
115
+ "aria-label": ariaLabel,
116
+ ref: innerRef,
117
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledWrapper, {
118
+ alignItems: "center",
119
+ justifyContent: "center",
120
+ children: [
121
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
122
+ children: MainContent
123
+ }),
124
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledWrapperLeftBorder, {}),
125
+ showClose && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.CloseButton, {
126
+ onClick: onClose,
127
+ value: dsId,
128
+ "data-testid": `tile-close-btn-${dsId}`,
129
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.CloseXsmall, {})
130
+ }) : null
131
+ ]
132
+ })
133
+ }, dsId),
134
+ [
135
+ MainContent,
136
+ ariaLabel,
137
+ badgeColor,
138
+ badgePosition,
139
+ disabled,
140
+ dsId,
141
+ handleClick,
142
+ isHeader,
143
+ onBlur,
144
+ onClose,
145
+ onFocus,
146
+ selected,
147
+ showClose,
148
+ innerRef
149
+ ]
150
+ );
151
+ return title && !disableTooltip ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledTooltipV3ButtonWrapper, {
152
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_tooltip.DSTooltipV3, {
153
+ id: `ds-chat-tile-tooltip-button-${dsId}`,
154
+ text: title,
155
+ startPlacementPreference: tooltipPlacement,
156
+ children: Btn
157
+ })
158
+ }) : Btn;
159
+ };
160
+ TileButton.propTypes = import_react_desc_prop_types.propsTileButton;
161
+ TileButton.displayName = "TileButton";
162
+ const TileButtonWithSchema = (0, import_ds_utilities.describe)(TileButton);
163
+ TileButtonWithSchema.propTypes = import_react_desc_prop_types.propsTileButton;
164
+ //# sourceMappingURL=TileButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/TileButton.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { Grid } from '@elliemae/ds-grid';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport {\n StyledTooltipV3ButtonWrapper,\n StyledTileButton,\n StyledTileButtonIcon,\n StyledTileButtonLabel,\n StyledWrapper,\n StyledWrapperLeftBorder,\n StyledStatusBadge,\n StyledWrapperCentralContent,\n CloseButton,\n} from './styled';\nimport { propsTileButton, defaultTileButton, DSChatTileT } from './react-desc-prop-types';\n\nconst TileButton: React.ComponentType<DSChatTileT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultTileButton);\n useValidateTypescriptPropTypes(propsWithDefault, propsTileButton);\n\n const {\n label,\n title,\n dsId,\n onClick,\n onFocus,\n onBlur,\n Icon,\n showClose,\n onClose,\n badge,\n badgeColor,\n badgePosition,\n disabled,\n selected,\n isHeader,\n ariaLabel,\n tooltipPlacement,\n disableTooltip,\n innerRef,\n } = propsWithDefault;\n const handleClick = React.useCallback(() => {\n onClick(dsId, title);\n }, [dsId, onClick, title]);\n\n const MainContent = React.useMemo(\n () => (\n <StyledWrapperCentralContent alignItems={isHeader ? 'center' : undefined}>\n <Grid width=\"100%\" alignItems=\"center\" justifyContent=\"center\">\n <StyledTileButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n {badge ? (\n <StyledStatusBadge\n badgeColor={badgeColor}\n badgePosition={badgePosition}\n data-testid={`tile-badge-${dsId}`}\n />\n ) : null}\n </StyledTileButtonIcon>\n </Grid>\n {!isHeader ? (\n <Grid width=\"100%\" justifyContent=\"center\">\n {label ? <StyledTileButtonLabel>{label}</StyledTileButtonLabel> : null}\n </Grid>\n ) : null}\n </StyledWrapperCentralContent>\n ),\n [isHeader, Icon, badge, dsId, badgeColor, badgePosition, label],\n );\n\n const Btn = React.useMemo(\n () => (\n <StyledTileButton\n key={dsId}\n isHeader={isHeader}\n value={dsId}\n data-testid={`tile-button-${dsId}`}\n data-key={dsId}\n onClick={handleClick}\n onFocus={onFocus}\n onBlur={onBlur}\n disabled={disabled}\n selected={selected}\n badgeColor={badgeColor}\n badgePosition={badgePosition}\n aria-pressed={selected}\n aria-label={ariaLabel}\n ref={innerRef}\n >\n <StyledWrapper alignItems=\"center\" justifyContent=\"center\">\n <span>{MainContent}</span>\n <StyledWrapperLeftBorder />\n {showClose && !disabled ? (\n <CloseButton onClick={onClose} value={dsId} data-testid={`tile-close-btn-${dsId}`}>\n <CloseXsmall />\n </CloseButton>\n ) : null}\n </StyledWrapper>\n </StyledTileButton>\n ),\n [\n MainContent,\n ariaLabel,\n badgeColor,\n badgePosition,\n disabled,\n dsId,\n handleClick,\n isHeader,\n onBlur,\n onClose,\n onFocus,\n selected,\n showClose,\n innerRef,\n ],\n );\n\n return title && !disableTooltip ? (\n <StyledTooltipV3ButtonWrapper>\n <DSTooltipV3 id={`ds-chat-tile-tooltip-button-${dsId}`} text={title} startPlacementPreference={tooltipPlacement}>\n {Btn}\n </DSTooltipV3>\n </StyledTooltipV3ButtonWrapper>\n ) : (\n Btn\n );\n};\n\nTileButton.propTypes = propsTileButton as WeakValidationMap<unknown>;\nTileButton.displayName = 'TileButton';\nconst TileButtonWithSchema = describe(TileButton);\nTileButtonWithSchema.propTypes = propsTileButton as WeakValidationMap<unknown>;\n\nexport { TileButton, TileButtonWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,mBAAyC;AACzC,0BAAuF;AACvF,wBAA4B;AAC5B,qBAAqB;AACrB,sBAA4B;AAC5B,oBAUO;AACP,mCAAgE;AAEhE,MAAM,aAAqD,CAAC,UAAU;AACpE,QAAM,uBAAmB,kDAA6B,OAAO,8CAAiB;AAC9E,0DAA+B,kBAAkB,4CAAe;AAEhE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,cAAc,aAAAA,QAAM,YAAY,MAAM;AAC1C,YAAQ,MAAM,KAAK;AAAA,EACrB,GAAG,CAAC,MAAM,SAAS,KAAK,CAAC;AAEzB,QAAM,cAAc,aAAAA,QAAM;AAAA,IACxB,MACE,6CAAC;AAAA,MAA4B,YAAY,WAAW,WAAW;AAAA,MAC7D;AAAA,oDAAC;AAAA,UAAK,OAAM;AAAA,UAAO,YAAW;AAAA,UAAS,gBAAe;AAAA,UACpD,uDAAC;AAAA,YAAqB,YAAW;AAAA,YAAS,gBAAe;AAAA,YACvD;AAAA,0DAAC;AAAA,gBAAK,MAAK;AAAA,eAAI;AAAA,cACd,QACC,4CAAC;AAAA,gBACC;AAAA,gBACA;AAAA,gBACA,eAAa,cAAc;AAAA,eAC7B,IACE;AAAA;AAAA,WACN;AAAA,SACF;AAAA,QACC,CAAC,WACA,4CAAC;AAAA,UAAK,OAAM;A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-0,0 +1,35 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var src_exports = {};
26
+ __export(src_exports, {
27
+ DSChatTileT: () => import_react_desc_prop_types.DSChatTileT,
28
+ TileButton: () => import_TileButton.TileButton,
29
+ TileButtonWithSchema: () => import_TileButton.TileButtonWithSchema
30
+ });
31
+ module.exports = __toCommonJS(src_exports);
32
+ var React = __toESM(require("react"));
33
+ var import_TileButton = require("./TileButton");
34
+ var import_react_desc_prop_types = require("./react-desc-prop-types");
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export { TileButton, TileButtonWithSchema } from './TileButton';\nexport { DSChatTileT } from './react-desc-prop-types';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAiD;AACjD,mCAA4B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var react_desc_prop_types_exports = {};
26
+ __export(react_desc_prop_types_exports, {
27
+ defaultTileButton: () => defaultTileButton,
28
+ propsTileButton: () => propsTileButton
29
+ });
30
+ module.exports = __toCommonJS(react_desc_prop_types_exports);
31
+ var React = __toESM(require("react"));
32
+ var import_ds_utilities = require("@elliemae/ds-utilities");
33
+ var import_lodash = require("lodash");
34
+ var import_ds_icons = require("@elliemae/ds-icons");
35
+ const defaultTileButton = {
36
+ Icon: import_ds_icons.Comments,
37
+ dsId: "",
38
+ label: "",
39
+ onClick: import_lodash.noop,
40
+ onBlur: import_lodash.noop,
41
+ onFocus: import_lodash.noop,
42
+ title: "",
43
+ onClose: import_lodash.noop,
44
+ showClose: false,
45
+ badge: false,
46
+ badgeColor: "blue",
47
+ badgePosition: "left",
48
+ disabled: false,
49
+ selected: false,
50
+ isHeader: false,
51
+ ariaLabel: "Tile button",
52
+ tooltipPlacement: "right",
53
+ disableTooltip: false,
54
+ innerRef: import_lodash.noop
55
+ };
56
+ const propsTileButton = {
57
+ Icon: import_ds_utilities.PropTypes.func.description("Icon component").defaultValue(defaultTileButton.Icon),
58
+ dsId: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.number, import_ds_utilities.PropTypes.string]).description("Unique id for the button").defaultValue(defaultTileButton.dsId),
59
+ label: import_ds_utilities.PropTypes.string.description("It will display under the icon").defaultValue(defaultTileButton.label),
60
+ title: import_ds_utilities.PropTypes.string.description("Tooltip").defaultValue(defaultTileButton.title),
61
+ onClick: import_ds_utilities.PropTypes.func.description("The function to call when is clicked").defaultValue(defaultTileButton.onClick),
62
+ onFocus: import_ds_utilities.PropTypes.func.description("The function to call when is focused").defaultValue(defaultTileButton.onFocus),
63
+ onBlur: import_ds_utilities.PropTypes.func.description("The function to call when is on blur").defaultValue(defaultTileButton.onBlur),
64
+ onClose: import_ds_utilities.PropTypes.func.description("The function to call when the X is Clicked").defaultValue(defaultTileButton.onClose),
65
+ showClose: import_ds_utilities.PropTypes.bool.description("It will display the X").defaultValue(defaultTileButton.showClose),
66
+ badge: import_ds_utilities.PropTypes.bool.description("It will display the badge").defaultValue(defaultTileButton.badge),
67
+ badgeColor: import_ds_utilities.PropTypes.oneOf(["blue", "green"]).description("Color badge: blue or green").defaultValue(defaultTileButton.badgeColor),
68
+ badgePosition: import_ds_utilities.PropTypes.oneOf(["left", "right"]).description("Color badge: blue or green").defaultValue(defaultTileButton.badgePosition),
69
+ disabled: import_ds_utilities.PropTypes.bool.description("It will disabled the button").defaultValue(defaultTileButton.disabled),
70
+ selected: import_ds_utilities.PropTypes.bool.description("Indicate that the button is selected").defaultValue(defaultTileButton.disabled),
71
+ isHeader: import_ds_utilities.PropTypes.bool.description("It won't render the label").defaultValue(defaultTileButton.disabled),
72
+ ariaLabel: import_ds_utilities.PropTypes.string.description("aria-label attribute").defaultValue(defaultTileButton.ariaLabel),
73
+ tooltipPlacement: import_ds_utilities.PropTypes.oneOf([
74
+ "top-start",
75
+ "top",
76
+ "top-end",
77
+ "right-start",
78
+ "right",
79
+ "right-end",
80
+ "bottom-end",
81
+ "bottom",
82
+ "bottom-start",
83
+ "left-end",
84
+ "left",
85
+ "left-start"
86
+ ]).description("start placement preferences, as per popperjs placement option").defaultValue("'right'"),
87
+ disableTooltip: import_ds_utilities.PropTypes.bool.description("Disable tooltip option").defaultValue(defaultTileButton.disableTooltip),
88
+ innerRef: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.func, import_ds_utilities.PropTypes.shape({ current: import_ds_utilities.PropTypes.any })]).description(
89
+ "reference to the component"
90
+ )
91
+ };
92
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { PropTypes } from '@elliemae/ds-utilities';\nimport { noop } from 'lodash';\nimport { Comments } from '@elliemae/ds-icons';\n\nexport declare namespace DSChatTileT {\n export interface Props {\n Icon: React.FC<{ size: string }>;\n dsId: string | number;\n label: string;\n onClick?: (dsId: string | number, label: string) => void;\n onBlur?: (e: React.ChangeEvent<HTMLButtonElement>) => void;\n onFocus?: (e: React.ChangeEvent<HTMLButtonElement>) => void;\n title: string;\n showClose: boolean;\n onClose?: (dsId: string | number) => void;\n badge: boolean;\n badgeColor: 'blue' | 'green';\n badgePosition: 'left' | 'right';\n disabled: boolean;\n selected: boolean;\n isHeader: boolean;\n ariaLabel: string;\n tooltipPlacement:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n disableTooltip: boolean;\n innerRef?: React.MutableRefObject<HTMLButtonElement> | ((_ref: HTMLButtonElement) => void);\n }\n}\n\nexport const defaultTileButton: DSChatTileT.Props = {\n Icon: Comments,\n dsId: '',\n label: '',\n onClick: noop,\n onBlur: noop,\n onFocus: noop,\n title: '',\n onClose: noop,\n showClose: false,\n badge: false,\n badgeColor: 'blue',\n badgePosition: 'left',\n disabled: false,\n selected: false,\n isHeader: false,\n ariaLabel: 'Tile button',\n tooltipPlacement: 'right',\n disableTooltip: false,\n innerRef: noop,\n};\n\nexport const propsTileButton = {\n Icon: PropTypes.func.description('Icon component').defaultValue(defaultTileButton.Icon),\n dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('Unique id for the button')\n .defaultValue(defaultTileButton.dsId),\n label: PropTypes.string.description('It will display under the icon').defaultValue(defaultTileButton.label),\n title: PropTypes.string.description('Tooltip').defaultValue(defaultTileButton.title),\n onClick: PropTypes.func.description('The function to call when is clicked').defaultValue(defaultTileButton.onClick),\n onFocus: PropTypes.func.description('The function to call when is focused').defaultValue(defaultTileButton.onFocus),\n onBlur: PropTypes.func.description('The function to call when is on blur').defaultValue(defaultTileButton.onBlur),\n onClose: PropTypes.func\n .description('The function to call when the X is Clicked')\n .defaultValue(defaultTileButton.onClose),\n showClose: PropTypes.bool.description('It will display the X').defaultValue(defaultTileButton.showClose),\n badge: PropTypes.bool.description('It will display the badge').defaultValue(defaultTileButton.badge),\n badgeColor: PropTypes.oneOf(['blue', 'green'])\n .description('Color badge: blue or green')\n .defaultValue(defaultTileButton.badgeColor),\n badgePosition: PropTypes.oneOf(['left', 'right'])\n .description('Color badge: blue or green')\n .defaultValue(defaultTileButton.badgePosition),\n disabled: PropTypes.bool.description('It will disabled the button').defaultValue(defaultTileButton.disabled),\n selected: PropTypes.bool.description('Indicate that the button is selected').defaultValue(defaultTileButton.disabled),\n isHeader: PropTypes.bool.description(\"It won't render the label\").defaultValue(defaultTileButton.disabled),\n ariaLabel: PropTypes.string.description('aria-label attribute').defaultValue(defaultTileButton.ariaLabel),\n tooltipPlacement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'right'\"),\n disableTooltip: PropTypes.bool.description('Disable tooltip option').defaultValue(defaultTileButton.disableTooltip),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'reference to the component',\n ),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAA0B;AAC1B,oBAAqB;AACrB,sBAAyB;AAsClB,MAAM,oBAAuC;AAAA,EAClD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,UAAU;AACZ;AAEO,MAAM,kBAAkB;AAAA,EAC7B,MAAM,8BAAU,KAAK,YAAY,gBAAgB,EAAE,aAAa,kBAAkB,IAAI;AAAA,EACtF,MAAM,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAC3D,YAAY,0BAA0B,EACtC,aAAa,kBAAkB,IAAI;AAAA,EACtC,OAAO,8BAAU,OAAO,YAAY,gCAAgC,EAAE,aAAa,kB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AAa,SAAS;AAAA,EACzB,gBAAgB,8BAAU,KAAK,YAAY,wBAAwB,EAAE,aAAa,kBAAkB,cAAc;AAAA,EAClH,UAAU,8BAAU,UAAU,CAAC,8BAAU,MAAM,8BAAU,MAAM,EAAE,SAAS,8BAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,243 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var styled_exports = {};
26
+ __export(styled_exports, {
27
+ CloseButton: () => CloseButton,
28
+ StyledStatusBadge: () => StyledStatusBadge,
29
+ StyledTileButton: () => StyledTileButton,
30
+ StyledTileButtonIcon: () => StyledTileButtonIcon,
31
+ StyledTileButtonLabel: () => StyledTileButtonLabel,
32
+ StyledTooltipV3ButtonWrapper: () => StyledTooltipV3ButtonWrapper,
33
+ StyledWrapper: () => StyledWrapper,
34
+ StyledWrapperCentralContent: () => StyledWrapperCentralContent,
35
+ StyledWrapperLeftBorder: () => StyledWrapperLeftBorder
36
+ });
37
+ module.exports = __toCommonJS(styled_exports);
38
+ var React = __toESM(require("react"));
39
+ var import_ds_system = require("@elliemae/ds-system");
40
+ var import_ds_grid = require("@elliemae/ds-grid");
41
+ const MIN_WIDTH_SIDEBAR = 48;
42
+ const BUTTON_SIDEBAR_HEIGHT = 48;
43
+ const StyledWrapperLeftBorder = (0, import_ds_system.styled)(import_ds_grid.Grid)`
44
+ height: 100%;
45
+ width: 4px;
46
+ position: absolute;
47
+ top: 0;
48
+ left: 0;
49
+ `;
50
+ const StyledStatusBadge = import_ds_system.styled.div`
51
+ height: 8px;
52
+ width: 8px;
53
+ position: absolute;
54
+ top: 0;
55
+ background: ${(props) => {
56
+ switch (props.badgeColor) {
57
+ case "blue":
58
+ return props.theme.colors.brand[600];
59
+ case "green":
60
+ return props.theme.colors.success[900];
61
+ default:
62
+ return props.theme.colors.brand[600];
63
+ }
64
+ }};
65
+ ${(props) => {
66
+ switch (props.badgePosition) {
67
+ case "left":
68
+ return "left: -4px;";
69
+ case "right":
70
+ return "right: -4px;";
71
+ default:
72
+ return "left: -4px;";
73
+ }
74
+ }};
75
+ border-radius: 50%;
76
+ box-sizing: content-box;
77
+ `;
78
+ const StyledWrapperCentralContent = (0, import_ds_system.styled)(import_ds_grid.Grid)`
79
+ width: 24px;
80
+ height: 40px;
81
+ `;
82
+ const StyledTileButtonIcon = (0, import_ds_system.styled)(import_ds_grid.Grid)`
83
+ position: relative;
84
+ height: 24px;
85
+ width: 24px;
86
+ svg {
87
+ fill: ${(props) => props.theme.colors.neutral[500]};
88
+ }
89
+
90
+ &:focus {
91
+ svg {
92
+ fill: ${(props) => props.theme.colors.brand[800]};
93
+ }
94
+ }
95
+ `;
96
+ const StyledTileButtonLabel = import_ds_system.styled.div`
97
+ width: 24px;
98
+ height: ${(props) => props.theme.space.xs};
99
+ text-transform: uppercase;
100
+ overflow: hidden;
101
+ text-align: center;
102
+ font-size: 13px;
103
+ color: ${(props) => props.theme.colors.neutral[600]};
104
+ line-height: 17px;
105
+ `;
106
+ const CloseButton = import_ds_system.styled.button`
107
+ outline: none;
108
+ background: none;
109
+ height: 9px;
110
+ width: 9px;
111
+ position: absolute;
112
+ top: 1px;
113
+ right: 1px;
114
+ overflow: hidden;
115
+ padding: 0;
116
+ border: none;
117
+ span {
118
+ position: absolute;
119
+ left: -3px;
120
+ top: -4px;
121
+ }
122
+
123
+ &:focus,
124
+ &:hover {
125
+ svg {
126
+ fill: ${(props) => props.theme.colors.brand[600]};
127
+ }
128
+ &:after {
129
+ display: block;
130
+ content: '';
131
+ position: absolute;
132
+ top: 0;
133
+ left: 0;
134
+ width: 100%;
135
+ height: 100%;
136
+ border: solid 1px ${(props) => props.theme.colors.brand[600]};
137
+ border-radius: 2px;
138
+ }
139
+ }
140
+ cursor: pointer;
141
+ `;
142
+ const StyledTooltipV3ButtonWrapper = import_ds_system.styled.div`
143
+ height: ${BUTTON_SIDEBAR_HEIGHT}px;
144
+ width: ${MIN_WIDTH_SIDEBAR}px;
145
+ `;
146
+ const StyledTileButton = import_ds_system.styled.button`
147
+ outline: none;
148
+ background: transparent;
149
+ height: ${BUTTON_SIDEBAR_HEIGHT}px;
150
+ width: ${MIN_WIDTH_SIDEBAR}px;
151
+ position: relative;
152
+ padding: 0;
153
+ border: none;
154
+ cursor: pointer;
155
+ border-bottom: ${(props) => props.isHeader ? `1px solid ${props.theme.colors.neutral["200"]}` : "none"};
156
+ &:focus,
157
+ &:hover,
158
+ &:active,
159
+ &:disabled {
160
+ background: ${(props) => props.theme.colors.neutral["080"]};
161
+ & ${StyledStatusBadge} {
162
+ border: 2px solid ${(props) => props.theme.colors.neutral["080"]};
163
+ margin-top: -2px;
164
+ ${(props) => {
165
+ switch (props.badgePosition) {
166
+ case "left":
167
+ return "margin-left: -2px;";
168
+ case "right":
169
+ return "margin-right: -2px;";
170
+ default:
171
+ return "margin-left: -2px;";
172
+ }
173
+ }};
174
+ }
175
+ }
176
+
177
+ &:focus,
178
+ &:hover {
179
+ & ${StyledWrapperLeftBorder} {
180
+ background: ${(props) => props.theme.colors.brand[800]};
181
+ }
182
+ & ${StyledTileButtonLabel} {
183
+ color: ${(props) => props.theme.colors.neutral[600]};
184
+ }
185
+
186
+ & svg {
187
+ fill: ${(props) => props.theme.colors.brand[800]};
188
+ }
189
+ }
190
+
191
+ &:active:not(:disabled) {
192
+ background: ${(props) => props.theme.colors.neutral["050"]};
193
+ & ${StyledWrapperLeftBorder} {
194
+ background: ${(props) => props.theme.colors.brand[600]};
195
+ }
196
+ & ${StyledTileButtonLabel} {
197
+ color: ${(props) => props.theme.colors.neutral[600]};
198
+ font-weight: 600;
199
+ }
200
+ & svg {
201
+ fill: ${(props) => props.theme.colors.brand[600]};
202
+ }
203
+ & ${StyledStatusBadge} {
204
+ border: 2px solid ${(props) => props.theme.colors.neutral["050"]};
205
+ }
206
+ }
207
+
208
+ &:disabled {
209
+ background: ${(props) => props.theme.colors.neutral["080"]};
210
+ ${StyledWrapperLeftBorder} {
211
+ background: ${(props) => props.theme.colors.neutral["400"]};
212
+ }
213
+ & ${StyledStatusBadge} {
214
+ background: ${(props) => props.theme.colors.neutral["500"]};
215
+ border: 2px solid ${(props) => props.theme.colors.neutral["080"]};
216
+ }
217
+ ${StyledTileButtonIcon} {
218
+ svg {
219
+ fill: ${(props) => props.theme.colors.neutral[400]};
220
+ }
221
+ }
222
+ ${StyledTileButtonLabel} {
223
+ color: ${(props) => props.theme.colors.neutral[400]};
224
+ }
225
+ }
226
+
227
+ ${(props) => {
228
+ if (props.selected) {
229
+ return import_ds_system.css`
230
+ & ${StyledWrapperLeftBorder} {
231
+ background: ${(nestedProps) => nestedProps.theme.colors.brand[600]};
232
+ }
233
+ `;
234
+ }
235
+ return "";
236
+ }}
237
+ `;
238
+ const StyledWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid)`
239
+ height: 100%;
240
+ width: 100%;
241
+ position: relative;
242
+ `;
243
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/styled.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable indent */\n/* eslint-disable max-lines */\nimport { css, styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSChatTileT } from './react-desc-prop-types';\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n\n// Buttons\nexport const StyledWrapperLeftBorder = styled(Grid)`\n height: 100%;\n width: 4px;\n position: absolute;\n top: 0;\n left: 0;\n`;\n\nexport const StyledStatusBadge = styled.div<Partial<DSChatTileT.Props>>`\n height: 8px;\n width: 8px;\n position: absolute;\n top: 0;\n background: ${(props) => {\n switch (props.badgeColor) {\n case 'blue':\n return props.theme.colors.brand[600];\n case 'green':\n return props.theme.colors.success[900];\n default:\n return props.theme.colors.brand[600];\n }\n }};\n ${(props) => {\n switch (props.badgePosition) {\n case 'left':\n return 'left: -4px;';\n case 'right':\n return 'right: -4px;';\n default:\n return 'left: -4px;';\n }\n }};\n border-radius: 50%;\n box-sizing: content-box;\n`;\n\nexport const StyledWrapperCentralContent = styled(Grid)`\n width: 24px;\n height: 40px;\n`;\n\nexport const StyledTileButtonIcon = styled(Grid)`\n position: relative;\n height: 24px;\n width: 24px;\n svg {\n fill: ${(props) => props.theme.colors.neutral[500]};\n }\n\n &:focus {\n svg {\n fill: ${(props) => props.theme.colors.brand[800]};\n }\n }\n`;\n\nexport const StyledTileButtonLabel = styled.div`\n width: 24px;\n height: ${(props) => props.theme.space.xs};\n text-transform: uppercase;\n overflow: hidden;\n text-align: center;\n font-size: 13px;\n color: ${(props) => props.theme.colors.neutral[600]};\n line-height: 17px;\n`;\n\nexport const CloseButton = styled.button`\n outline: none;\n background: none;\n height: 9px;\n width: 9px;\n position: absolute;\n top: 1px;\n right: 1px;\n overflow: hidden;\n padding: 0;\n border: none;\n span {\n position: absolute;\n left: -3px;\n top: -4px;\n }\n\n &:focus,\n &:hover {\n svg {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n &:after {\n display: block;\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: solid 1px ${(props) => props.theme.colors.brand[600]};\n border-radius: 2px;\n }\n }\n cursor: pointer;\n`;\n\n// MAIN WRAPPER\nexport const StyledTooltipV3ButtonWrapper = styled.div`\n height: ${BUTTON_SIDEBAR_HEIGHT}px;\n width: ${MIN_WIDTH_SIDEBAR}px;\n`;\nexport const StyledTileButton = styled.button<Partial<DSChatTileT.Props>>`\n outline: none;\n background: transparent;\n height: ${BUTTON_SIDEBAR_HEIGHT}px;\n width: ${MIN_WIDTH_SIDEBAR}px;\n position: relative;\n padding: 0;\n border: none;\n cursor: pointer;\n border-bottom: ${(props) => (props.isHeader ? `1px solid ${props.theme.colors.neutral['200']}` : 'none')};\n &:focus,\n &:hover,\n &:active,\n &:disabled {\n background: ${(props) => props.theme.colors.neutral['080']};\n & ${StyledStatusBadge} {\n border: 2px solid ${(props) => props.theme.colors.neutral['080']};\n margin-top: -2px;\n ${(props) => {\n switch (props.badgePosition) {\n case 'left':\n return 'margin-left: -2px;';\n case 'right':\n return 'margin-right: -2px;';\n default:\n return 'margin-left: -2px;';\n }\n }};\n }\n }\n\n &:focus,\n &:hover {\n & ${StyledWrapperLeftBorder} {\n background: ${(props) => props.theme.colors.brand[800]};\n }\n & ${StyledTileButtonLabel} {\n color: ${(props) => props.theme.colors.neutral[600]};\n }\n\n & svg {\n fill: ${(props) => props.theme.colors.brand[800]};\n }\n }\n\n &:active:not(:disabled) {\n background: ${(props) => props.theme.colors.neutral['050']};\n & ${StyledWrapperLeftBorder} {\n background: ${(props) => props.theme.colors.brand[600]};\n }\n & ${StyledTileButtonLabel} {\n color: ${(props) => props.theme.colors.neutral[600]};\n font-weight: 600;\n }\n & svg {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n & ${StyledStatusBadge} {\n border: 2px solid ${(props) => props.theme.colors.neutral['050']};\n }\n }\n\n &:disabled {\n background: ${(props) => props.theme.colors.neutral['080']};\n ${StyledWrapperLeftBorder} {\n background: ${(props) => props.theme.colors.neutral['400']};\n }\n & ${StyledStatusBadge} {\n background: ${(props) => props.theme.colors.neutral['500']};\n border: 2px solid ${(props) => props.theme.colors.neutral['080']};\n }\n ${StyledTileButtonIcon} {\n svg {\n fill: ${(props) => props.theme.colors.neutral[400]};\n }\n }\n ${StyledTileButtonLabel} {\n color: ${(props) => props.theme.colors.neutral[400]};\n }\n }\n\n ${(props) => {\n if (props.selected) {\n return css`\n & ${StyledWrapperLeftBorder} {\n background: ${(nestedProps) => nestedProps.theme.colors.brand[600]};\n }\n `;\n }\n return '';\n }}\n`;\n\nexport const StyledWrapper = styled(Grid)`\n height: 100%;\n width: 100%;\n position: relative;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,uBAA4B;AAC5B,qBAAqB;AAErB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAGvB,MAAM,8BAA0B,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ3C,MAAM,oBAAoB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKxB,CAAC,UAAU;AACvB,UAAQ,MAAM;AAAA,SACP;AACH,aAAO,MAAM,MAAM,OAAO,MAAM;AAAA,SAC7B;AACH,aAAO,MAAM,MAAM,OAAO,QAAQ;AAAA;AAElC,aAAO,MAAM,MAAM,OAAO,MAAM;AAAA;AAEtC;AAAA,IACE,CAAC,UAAU;AACX,UAAQ,MAAM;AAAA,SACP;AACH,aAAO;AAAA,SACJ;AACH,aAAO;AAAA;A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A;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,148 @@
1
+ import * as React from "react";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import React2 from "react";
4
+ import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
5
+ import { DSTooltipV3 } from "@elliemae/ds-tooltip";
6
+ import { Grid } from "@elliemae/ds-grid";
7
+ import { CloseXsmall } from "@elliemae/ds-icons";
8
+ import {
9
+ StyledTooltipV3ButtonWrapper,
10
+ StyledTileButton,
11
+ StyledTileButtonIcon,
12
+ StyledTileButtonLabel,
13
+ StyledWrapper,
14
+ StyledWrapperLeftBorder,
15
+ StyledStatusBadge,
16
+ StyledWrapperCentralContent,
17
+ CloseButton
18
+ } from "./styled";
19
+ import { propsTileButton, defaultTileButton } from "./react-desc-prop-types";
20
+ const TileButton = (props) => {
21
+ const propsWithDefault = useMemoMergePropsWithDefault(props, defaultTileButton);
22
+ useValidateTypescriptPropTypes(propsWithDefault, propsTileButton);
23
+ const {
24
+ label,
25
+ title,
26
+ dsId,
27
+ onClick,
28
+ onFocus,
29
+ onBlur,
30
+ Icon,
31
+ showClose,
32
+ onClose,
33
+ badge,
34
+ badgeColor,
35
+ badgePosition,
36
+ disabled,
37
+ selected,
38
+ isHeader,
39
+ ariaLabel,
40
+ tooltipPlacement,
41
+ disableTooltip,
42
+ innerRef
43
+ } = propsWithDefault;
44
+ const handleClick = React2.useCallback(() => {
45
+ onClick(dsId, title);
46
+ }, [dsId, onClick, title]);
47
+ const MainContent = React2.useMemo(
48
+ () => /* @__PURE__ */ jsxs(StyledWrapperCentralContent, {
49
+ alignItems: isHeader ? "center" : void 0,
50
+ children: [
51
+ /* @__PURE__ */ jsx(Grid, {
52
+ width: "100%",
53
+ alignItems: "center",
54
+ justifyContent: "center",
55
+ children: /* @__PURE__ */ jsxs(StyledTileButtonIcon, {
56
+ alignItems: "center",
57
+ justifyContent: "center",
58
+ children: [
59
+ /* @__PURE__ */ jsx(Icon, {
60
+ size: "m"
61
+ }),
62
+ badge ? /* @__PURE__ */ jsx(StyledStatusBadge, {
63
+ badgeColor,
64
+ badgePosition,
65
+ "data-testid": `tile-badge-${dsId}`
66
+ }) : null
67
+ ]
68
+ })
69
+ }),
70
+ !isHeader ? /* @__PURE__ */ jsx(Grid, {
71
+ width: "100%",
72
+ justifyContent: "center",
73
+ children: label ? /* @__PURE__ */ jsx(StyledTileButtonLabel, {
74
+ children: label
75
+ }) : null
76
+ }) : null
77
+ ]
78
+ }),
79
+ [isHeader, Icon, badge, dsId, badgeColor, badgePosition, label]
80
+ );
81
+ const Btn = React2.useMemo(
82
+ () => /* @__PURE__ */ jsx(StyledTileButton, {
83
+ isHeader,
84
+ value: dsId,
85
+ "data-testid": `tile-button-${dsId}`,
86
+ "data-key": dsId,
87
+ onClick: handleClick,
88
+ onFocus,
89
+ onBlur,
90
+ disabled,
91
+ selected,
92
+ badgeColor,
93
+ badgePosition,
94
+ "aria-pressed": selected,
95
+ "aria-label": ariaLabel,
96
+ ref: innerRef,
97
+ children: /* @__PURE__ */ jsxs(StyledWrapper, {
98
+ alignItems: "center",
99
+ justifyContent: "center",
100
+ children: [
101
+ /* @__PURE__ */ jsx("span", {
102
+ children: MainContent
103
+ }),
104
+ /* @__PURE__ */ jsx(StyledWrapperLeftBorder, {}),
105
+ showClose && !disabled ? /* @__PURE__ */ jsx(CloseButton, {
106
+ onClick: onClose,
107
+ value: dsId,
108
+ "data-testid": `tile-close-btn-${dsId}`,
109
+ children: /* @__PURE__ */ jsx(CloseXsmall, {})
110
+ }) : null
111
+ ]
112
+ })
113
+ }, dsId),
114
+ [
115
+ MainContent,
116
+ ariaLabel,
117
+ badgeColor,
118
+ badgePosition,
119
+ disabled,
120
+ dsId,
121
+ handleClick,
122
+ isHeader,
123
+ onBlur,
124
+ onClose,
125
+ onFocus,
126
+ selected,
127
+ showClose,
128
+ innerRef
129
+ ]
130
+ );
131
+ return title && !disableTooltip ? /* @__PURE__ */ jsx(StyledTooltipV3ButtonWrapper, {
132
+ children: /* @__PURE__ */ jsx(DSTooltipV3, {
133
+ id: `ds-chat-tile-tooltip-button-${dsId}`,
134
+ text: title,
135
+ startPlacementPreference: tooltipPlacement,
136
+ children: Btn
137
+ })
138
+ }) : Btn;
139
+ };
140
+ TileButton.propTypes = propsTileButton;
141
+ TileButton.displayName = "TileButton";
142
+ const TileButtonWithSchema = describe(TileButton);
143
+ TileButtonWithSchema.propTypes = propsTileButton;
144
+ export {
145
+ TileButton,
146
+ TileButtonWithSchema
147
+ };
148
+ //# sourceMappingURL=TileButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/TileButton.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { Grid } from '@elliemae/ds-grid';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport {\n StyledTooltipV3ButtonWrapper,\n StyledTileButton,\n StyledTileButtonIcon,\n StyledTileButtonLabel,\n StyledWrapper,\n StyledWrapperLeftBorder,\n StyledStatusBadge,\n StyledWrapperCentralContent,\n CloseButton,\n} from './styled';\nimport { propsTileButton, defaultTileButton, DSChatTileT } from './react-desc-prop-types';\n\nconst TileButton: React.ComponentType<DSChatTileT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultTileButton);\n useValidateTypescriptPropTypes(propsWithDefault, propsTileButton);\n\n const {\n label,\n title,\n dsId,\n onClick,\n onFocus,\n onBlur,\n Icon,\n showClose,\n onClose,\n badge,\n badgeColor,\n badgePosition,\n disabled,\n selected,\n isHeader,\n ariaLabel,\n tooltipPlacement,\n disableTooltip,\n innerRef,\n } = propsWithDefault;\n const handleClick = React.useCallback(() => {\n onClick(dsId, title);\n }, [dsId, onClick, title]);\n\n const MainContent = React.useMemo(\n () => (\n <StyledWrapperCentralContent alignItems={isHeader ? 'center' : undefined}>\n <Grid width=\"100%\" alignItems=\"center\" justifyContent=\"center\">\n <StyledTileButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n {badge ? (\n <StyledStatusBadge\n badgeColor={badgeColor}\n badgePosition={badgePosition}\n data-testid={`tile-badge-${dsId}`}\n />\n ) : null}\n </StyledTileButtonIcon>\n </Grid>\n {!isHeader ? (\n <Grid width=\"100%\" justifyContent=\"center\">\n {label ? <StyledTileButtonLabel>{label}</StyledTileButtonLabel> : null}\n </Grid>\n ) : null}\n </StyledWrapperCentralContent>\n ),\n [isHeader, Icon, badge, dsId, badgeColor, badgePosition, label],\n );\n\n const Btn = React.useMemo(\n () => (\n <StyledTileButton\n key={dsId}\n isHeader={isHeader}\n value={dsId}\n data-testid={`tile-button-${dsId}`}\n data-key={dsId}\n onClick={handleClick}\n onFocus={onFocus}\n onBlur={onBlur}\n disabled={disabled}\n selected={selected}\n badgeColor={badgeColor}\n badgePosition={badgePosition}\n aria-pressed={selected}\n aria-label={ariaLabel}\n ref={innerRef}\n >\n <StyledWrapper alignItems=\"center\" justifyContent=\"center\">\n <span>{MainContent}</span>\n <StyledWrapperLeftBorder />\n {showClose && !disabled ? (\n <CloseButton onClick={onClose} value={dsId} data-testid={`tile-close-btn-${dsId}`}>\n <CloseXsmall />\n </CloseButton>\n ) : null}\n </StyledWrapper>\n </StyledTileButton>\n ),\n [\n MainContent,\n ariaLabel,\n badgeColor,\n badgePosition,\n disabled,\n dsId,\n handleClick,\n isHeader,\n onBlur,\n onClose,\n onFocus,\n selected,\n showClose,\n innerRef,\n ],\n );\n\n return title && !disableTooltip ? (\n <StyledTooltipV3ButtonWrapper>\n <DSTooltipV3 id={`ds-chat-tile-tooltip-button-${dsId}`} text={title} startPlacementPreference={tooltipPlacement}>\n {Btn}\n </DSTooltipV3>\n </StyledTooltipV3ButtonWrapper>\n ) : (\n Btn\n );\n};\n\nTileButton.propTypes = propsTileButton as WeakValidationMap<unknown>;\nTileButton.displayName = 'TileButton';\nconst TileButtonWithSchema = describe(TileButton);\nTileButtonWithSchema.propTypes = propsTileButton as WeakValidationMap<unknown>;\n\nexport { TileButton, TileButtonWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,OAAOA,YAAkC;AACzC,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,mBAAmB;AAC5B,SAAS,YAAY;AACrB,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB,yBAAsC;AAEhE,MAAM,aAAqD,CAAC,UAAU;AACpE,QAAM,mBAAmB,6BAA6B,OAAO,iBAAiB;AAC9E,iCAA+B,kBAAkB,eAAe;AAEhE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,cAAcA,OAAM,YAAY,MAAM;AAC1C,YAAQ,MAAM,KAAK;AAAA,EACrB,GAAG,CAAC,MAAM,SAAS,KAAK,CAAC;AAEzB,QAAM,cAAcA,OAAM;AAAA,IACxB,MACE,qBAAC;AAAA,MAA4B,YAAY,WAAW,WAAW;AAAA,MAC7D;AAAA,4BAAC;AAAA,UAAK,OAAM;AAAA,UAAO,YAAW;AAAA,UAAS,gBAAe;AAAA,UACpD,+BAAC;AAAA,YAAqB,YAAW;AAAA,YAAS,gBAAe;AAAA,YACvD;AAAA,kCAAC;AAA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AA,MAAO,0BAA0B;AAAA,MAC5F;AAAA,KACH;AAAA,GACF,IAEA;AAEJ;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU;AAChD,qBAAqB,YAAY;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { TileButton, TileButtonWithSchema } from "./TileButton";
3
+ import { DSChatTileT } from "./react-desc-prop-types";
4
+ export {
5
+ DSChatTileT,
6
+ TileButton,
7
+ TileButtonWithSchema
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { TileButton, TileButtonWithSchema } from './TileButton';\nexport { DSChatTileT } from './react-desc-prop-types';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY,4BAA4B;AACjD,SAAS,mBAAmB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,66 @@
1
+ import * as React from "react";
2
+ import { PropTypes } from "@elliemae/ds-utilities";
3
+ import { noop } from "lodash";
4
+ import { Comments } from "@elliemae/ds-icons";
5
+ const defaultTileButton = {
6
+ Icon: Comments,
7
+ dsId: "",
8
+ label: "",
9
+ onClick: noop,
10
+ onBlur: noop,
11
+ onFocus: noop,
12
+ title: "",
13
+ onClose: noop,
14
+ showClose: false,
15
+ badge: false,
16
+ badgeColor: "blue",
17
+ badgePosition: "left",
18
+ disabled: false,
19
+ selected: false,
20
+ isHeader: false,
21
+ ariaLabel: "Tile button",
22
+ tooltipPlacement: "right",
23
+ disableTooltip: false,
24
+ innerRef: noop
25
+ };
26
+ const propsTileButton = {
27
+ Icon: PropTypes.func.description("Icon component").defaultValue(defaultTileButton.Icon),
28
+ dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description("Unique id for the button").defaultValue(defaultTileButton.dsId),
29
+ label: PropTypes.string.description("It will display under the icon").defaultValue(defaultTileButton.label),
30
+ title: PropTypes.string.description("Tooltip").defaultValue(defaultTileButton.title),
31
+ onClick: PropTypes.func.description("The function to call when is clicked").defaultValue(defaultTileButton.onClick),
32
+ onFocus: PropTypes.func.description("The function to call when is focused").defaultValue(defaultTileButton.onFocus),
33
+ onBlur: PropTypes.func.description("The function to call when is on blur").defaultValue(defaultTileButton.onBlur),
34
+ onClose: PropTypes.func.description("The function to call when the X is Clicked").defaultValue(defaultTileButton.onClose),
35
+ showClose: PropTypes.bool.description("It will display the X").defaultValue(defaultTileButton.showClose),
36
+ badge: PropTypes.bool.description("It will display the badge").defaultValue(defaultTileButton.badge),
37
+ badgeColor: PropTypes.oneOf(["blue", "green"]).description("Color badge: blue or green").defaultValue(defaultTileButton.badgeColor),
38
+ badgePosition: PropTypes.oneOf(["left", "right"]).description("Color badge: blue or green").defaultValue(defaultTileButton.badgePosition),
39
+ disabled: PropTypes.bool.description("It will disabled the button").defaultValue(defaultTileButton.disabled),
40
+ selected: PropTypes.bool.description("Indicate that the button is selected").defaultValue(defaultTileButton.disabled),
41
+ isHeader: PropTypes.bool.description("It won't render the label").defaultValue(defaultTileButton.disabled),
42
+ ariaLabel: PropTypes.string.description("aria-label attribute").defaultValue(defaultTileButton.ariaLabel),
43
+ tooltipPlacement: PropTypes.oneOf([
44
+ "top-start",
45
+ "top",
46
+ "top-end",
47
+ "right-start",
48
+ "right",
49
+ "right-end",
50
+ "bottom-end",
51
+ "bottom",
52
+ "bottom-start",
53
+ "left-end",
54
+ "left",
55
+ "left-start"
56
+ ]).description("start placement preferences, as per popperjs placement option").defaultValue("'right'"),
57
+ disableTooltip: PropTypes.bool.description("Disable tooltip option").defaultValue(defaultTileButton.disableTooltip),
58
+ innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(
59
+ "reference to the component"
60
+ )
61
+ };
62
+ export {
63
+ defaultTileButton,
64
+ propsTileButton
65
+ };
66
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes } from '@elliemae/ds-utilities';\nimport { noop } from 'lodash';\nimport { Comments } from '@elliemae/ds-icons';\n\nexport declare namespace DSChatTileT {\n export interface Props {\n Icon: React.FC<{ size: string }>;\n dsId: string | number;\n label: string;\n onClick?: (dsId: string | number, label: string) => void;\n onBlur?: (e: React.ChangeEvent<HTMLButtonElement>) => void;\n onFocus?: (e: React.ChangeEvent<HTMLButtonElement>) => void;\n title: string;\n showClose: boolean;\n onClose?: (dsId: string | number) => void;\n badge: boolean;\n badgeColor: 'blue' | 'green';\n badgePosition: 'left' | 'right';\n disabled: boolean;\n selected: boolean;\n isHeader: boolean;\n ariaLabel: string;\n tooltipPlacement:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n disableTooltip: boolean;\n innerRef?: React.MutableRefObject<HTMLButtonElement> | ((_ref: HTMLButtonElement) => void);\n }\n}\n\nexport const defaultTileButton: DSChatTileT.Props = {\n Icon: Comments,\n dsId: '',\n label: '',\n onClick: noop,\n onBlur: noop,\n onFocus: noop,\n title: '',\n onClose: noop,\n showClose: false,\n badge: false,\n badgeColor: 'blue',\n badgePosition: 'left',\n disabled: false,\n selected: false,\n isHeader: false,\n ariaLabel: 'Tile button',\n tooltipPlacement: 'right',\n disableTooltip: false,\n innerRef: noop,\n};\n\nexport const propsTileButton = {\n Icon: PropTypes.func.description('Icon component').defaultValue(defaultTileButton.Icon),\n dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('Unique id for the button')\n .defaultValue(defaultTileButton.dsId),\n label: PropTypes.string.description('It will display under the icon').defaultValue(defaultTileButton.label),\n title: PropTypes.string.description('Tooltip').defaultValue(defaultTileButton.title),\n onClick: PropTypes.func.description('The function to call when is clicked').defaultValue(defaultTileButton.onClick),\n onFocus: PropTypes.func.description('The function to call when is focused').defaultValue(defaultTileButton.onFocus),\n onBlur: PropTypes.func.description('The function to call when is on blur').defaultValue(defaultTileButton.onBlur),\n onClose: PropTypes.func\n .description('The function to call when the X is Clicked')\n .defaultValue(defaultTileButton.onClose),\n showClose: PropTypes.bool.description('It will display the X').defaultValue(defaultTileButton.showClose),\n badge: PropTypes.bool.description('It will display the badge').defaultValue(defaultTileButton.badge),\n badgeColor: PropTypes.oneOf(['blue', 'green'])\n .description('Color badge: blue or green')\n .defaultValue(defaultTileButton.badgeColor),\n badgePosition: PropTypes.oneOf(['left', 'right'])\n .description('Color badge: blue or green')\n .defaultValue(defaultTileButton.badgePosition),\n disabled: PropTypes.bool.description('It will disabled the button').defaultValue(defaultTileButton.disabled),\n selected: PropTypes.bool.description('Indicate that the button is selected').defaultValue(defaultTileButton.disabled),\n isHeader: PropTypes.bool.description(\"It won't render the label\").defaultValue(defaultTileButton.disabled),\n ariaLabel: PropTypes.string.description('aria-label attribute').defaultValue(defaultTileButton.ariaLabel),\n tooltipPlacement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'right'\"),\n disableTooltip: PropTypes.bool.description('Disable tooltip option').defaultValue(defaultTileButton.disableTooltip),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description(\n 'reference to the component',\n ),\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,gBAAgB;AAsClB,MAAM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EAC5C,eAAe,UAAU,MAAM,CAAC,QAAQ,OAAO,CAAC,EAC7C,YAAY,4BAA4B,EACxC,aAAa,kBAAkB,aAAa;AAAA,EAC/C,UAAU,UAAU,KAAK,YAAY,6BAA6B,EAAE,aAAa,kBAAkB,QAAQ;AAAA,EAC3G,UAAU,UAAU,KAAK,YAAY,sCAAsC,EAAE,aAAa,kBAAkB,QAAQ;AAAA,EACpH,UAAU,UAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,kBAAkB,QAAQ;AAAA,EACzG,WAAW,UAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,kBAAkB,SAAS;AAAA,EACxG,kBAAkB,UAAU,MAAM;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,+DAA+D,EAC3E,aAAa,SAAS;AAAA,EACzB,gBAAgB,UAAU,KAAK,YAAY,wBAAwB,EAAE,aAAa,kBAAkB,cAAc;AAAA,EAClH,UAAU,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,EAAE,SAAS,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,217 @@
1
+ import * as React from "react";
2
+ import { css, styled } from "@elliemae/ds-system";
3
+ import { Grid } from "@elliemae/ds-grid";
4
+ const MIN_WIDTH_SIDEBAR = 48;
5
+ const BUTTON_SIDEBAR_HEIGHT = 48;
6
+ const StyledWrapperLeftBorder = styled(Grid)`
7
+ height: 100%;
8
+ width: 4px;
9
+ position: absolute;
10
+ top: 0;
11
+ left: 0;
12
+ `;
13
+ const StyledStatusBadge = styled.div`
14
+ height: 8px;
15
+ width: 8px;
16
+ position: absolute;
17
+ top: 0;
18
+ background: ${(props) => {
19
+ switch (props.badgeColor) {
20
+ case "blue":
21
+ return props.theme.colors.brand[600];
22
+ case "green":
23
+ return props.theme.colors.success[900];
24
+ default:
25
+ return props.theme.colors.brand[600];
26
+ }
27
+ }};
28
+ ${(props) => {
29
+ switch (props.badgePosition) {
30
+ case "left":
31
+ return "left: -4px;";
32
+ case "right":
33
+ return "right: -4px;";
34
+ default:
35
+ return "left: -4px;";
36
+ }
37
+ }};
38
+ border-radius: 50%;
39
+ box-sizing: content-box;
40
+ `;
41
+ const StyledWrapperCentralContent = styled(Grid)`
42
+ width: 24px;
43
+ height: 40px;
44
+ `;
45
+ const StyledTileButtonIcon = styled(Grid)`
46
+ position: relative;
47
+ height: 24px;
48
+ width: 24px;
49
+ svg {
50
+ fill: ${(props) => props.theme.colors.neutral[500]};
51
+ }
52
+
53
+ &:focus {
54
+ svg {
55
+ fill: ${(props) => props.theme.colors.brand[800]};
56
+ }
57
+ }
58
+ `;
59
+ const StyledTileButtonLabel = styled.div`
60
+ width: 24px;
61
+ height: ${(props) => props.theme.space.xs};
62
+ text-transform: uppercase;
63
+ overflow: hidden;
64
+ text-align: center;
65
+ font-size: 13px;
66
+ color: ${(props) => props.theme.colors.neutral[600]};
67
+ line-height: 17px;
68
+ `;
69
+ const CloseButton = styled.button`
70
+ outline: none;
71
+ background: none;
72
+ height: 9px;
73
+ width: 9px;
74
+ position: absolute;
75
+ top: 1px;
76
+ right: 1px;
77
+ overflow: hidden;
78
+ padding: 0;
79
+ border: none;
80
+ span {
81
+ position: absolute;
82
+ left: -3px;
83
+ top: -4px;
84
+ }
85
+
86
+ &:focus,
87
+ &:hover {
88
+ svg {
89
+ fill: ${(props) => props.theme.colors.brand[600]};
90
+ }
91
+ &:after {
92
+ display: block;
93
+ content: '';
94
+ position: absolute;
95
+ top: 0;
96
+ left: 0;
97
+ width: 100%;
98
+ height: 100%;
99
+ border: solid 1px ${(props) => props.theme.colors.brand[600]};
100
+ border-radius: 2px;
101
+ }
102
+ }
103
+ cursor: pointer;
104
+ `;
105
+ const StyledTooltipV3ButtonWrapper = styled.div`
106
+ height: ${BUTTON_SIDEBAR_HEIGHT}px;
107
+ width: ${MIN_WIDTH_SIDEBAR}px;
108
+ `;
109
+ const StyledTileButton = styled.button`
110
+ outline: none;
111
+ background: transparent;
112
+ height: ${BUTTON_SIDEBAR_HEIGHT}px;
113
+ width: ${MIN_WIDTH_SIDEBAR}px;
114
+ position: relative;
115
+ padding: 0;
116
+ border: none;
117
+ cursor: pointer;
118
+ border-bottom: ${(props) => props.isHeader ? `1px solid ${props.theme.colors.neutral["200"]}` : "none"};
119
+ &:focus,
120
+ &:hover,
121
+ &:active,
122
+ &:disabled {
123
+ background: ${(props) => props.theme.colors.neutral["080"]};
124
+ & ${StyledStatusBadge} {
125
+ border: 2px solid ${(props) => props.theme.colors.neutral["080"]};
126
+ margin-top: -2px;
127
+ ${(props) => {
128
+ switch (props.badgePosition) {
129
+ case "left":
130
+ return "margin-left: -2px;";
131
+ case "right":
132
+ return "margin-right: -2px;";
133
+ default:
134
+ return "margin-left: -2px;";
135
+ }
136
+ }};
137
+ }
138
+ }
139
+
140
+ &:focus,
141
+ &:hover {
142
+ & ${StyledWrapperLeftBorder} {
143
+ background: ${(props) => props.theme.colors.brand[800]};
144
+ }
145
+ & ${StyledTileButtonLabel} {
146
+ color: ${(props) => props.theme.colors.neutral[600]};
147
+ }
148
+
149
+ & svg {
150
+ fill: ${(props) => props.theme.colors.brand[800]};
151
+ }
152
+ }
153
+
154
+ &:active:not(:disabled) {
155
+ background: ${(props) => props.theme.colors.neutral["050"]};
156
+ & ${StyledWrapperLeftBorder} {
157
+ background: ${(props) => props.theme.colors.brand[600]};
158
+ }
159
+ & ${StyledTileButtonLabel} {
160
+ color: ${(props) => props.theme.colors.neutral[600]};
161
+ font-weight: 600;
162
+ }
163
+ & svg {
164
+ fill: ${(props) => props.theme.colors.brand[600]};
165
+ }
166
+ & ${StyledStatusBadge} {
167
+ border: 2px solid ${(props) => props.theme.colors.neutral["050"]};
168
+ }
169
+ }
170
+
171
+ &:disabled {
172
+ background: ${(props) => props.theme.colors.neutral["080"]};
173
+ ${StyledWrapperLeftBorder} {
174
+ background: ${(props) => props.theme.colors.neutral["400"]};
175
+ }
176
+ & ${StyledStatusBadge} {
177
+ background: ${(props) => props.theme.colors.neutral["500"]};
178
+ border: 2px solid ${(props) => props.theme.colors.neutral["080"]};
179
+ }
180
+ ${StyledTileButtonIcon} {
181
+ svg {
182
+ fill: ${(props) => props.theme.colors.neutral[400]};
183
+ }
184
+ }
185
+ ${StyledTileButtonLabel} {
186
+ color: ${(props) => props.theme.colors.neutral[400]};
187
+ }
188
+ }
189
+
190
+ ${(props) => {
191
+ if (props.selected) {
192
+ return css`
193
+ & ${StyledWrapperLeftBorder} {
194
+ background: ${(nestedProps) => nestedProps.theme.colors.brand[600]};
195
+ }
196
+ `;
197
+ }
198
+ return "";
199
+ }}
200
+ `;
201
+ const StyledWrapper = styled(Grid)`
202
+ height: 100%;
203
+ width: 100%;
204
+ position: relative;
205
+ `;
206
+ export {
207
+ CloseButton,
208
+ StyledStatusBadge,
209
+ StyledTileButton,
210
+ StyledTileButtonIcon,
211
+ StyledTileButtonLabel,
212
+ StyledTooltipV3ButtonWrapper,
213
+ StyledWrapper,
214
+ StyledWrapperCentralContent,
215
+ StyledWrapperLeftBorder
216
+ };
217
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styled.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n/* eslint-disable max-lines */\nimport { css, styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSChatTileT } from './react-desc-prop-types';\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n\n// Buttons\nexport const StyledWrapperLeftBorder = styled(Grid)`\n height: 100%;\n width: 4px;\n position: absolute;\n top: 0;\n left: 0;\n`;\n\nexport const StyledStatusBadge = styled.div<Partial<DSChatTileT.Props>>`\n height: 8px;\n width: 8px;\n position: absolute;\n top: 0;\n background: ${(props) => {\n switch (props.badgeColor) {\n case 'blue':\n return props.theme.colors.brand[600];\n case 'green':\n return props.theme.colors.success[900];\n default:\n return props.theme.colors.brand[600];\n }\n }};\n ${(props) => {\n switch (props.badgePosition) {\n case 'left':\n return 'left: -4px;';\n case 'right':\n return 'right: -4px;';\n default:\n return 'left: -4px;';\n }\n }};\n border-radius: 50%;\n box-sizing: content-box;\n`;\n\nexport const StyledWrapperCentralContent = styled(Grid)`\n width: 24px;\n height: 40px;\n`;\n\nexport const StyledTileButtonIcon = styled(Grid)`\n position: relative;\n height: 24px;\n width: 24px;\n svg {\n fill: ${(props) => props.theme.colors.neutral[500]};\n }\n\n &:focus {\n svg {\n fill: ${(props) => props.theme.colors.brand[800]};\n }\n }\n`;\n\nexport const StyledTileButtonLabel = styled.div`\n width: 24px;\n height: ${(props) => props.theme.space.xs};\n text-transform: uppercase;\n overflow: hidden;\n text-align: center;\n font-size: 13px;\n color: ${(props) => props.theme.colors.neutral[600]};\n line-height: 17px;\n`;\n\nexport const CloseButton = styled.button`\n outline: none;\n background: none;\n height: 9px;\n width: 9px;\n position: absolute;\n top: 1px;\n right: 1px;\n overflow: hidden;\n padding: 0;\n border: none;\n span {\n position: absolute;\n left: -3px;\n top: -4px;\n }\n\n &:focus,\n &:hover {\n svg {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n &:after {\n display: block;\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: solid 1px ${(props) => props.theme.colors.brand[600]};\n border-radius: 2px;\n }\n }\n cursor: pointer;\n`;\n\n// MAIN WRAPPER\nexport const StyledTooltipV3ButtonWrapper = styled.div`\n height: ${BUTTON_SIDEBAR_HEIGHT}px;\n width: ${MIN_WIDTH_SIDEBAR}px;\n`;\nexport const StyledTileButton = styled.button<Partial<DSChatTileT.Props>>`\n outline: none;\n background: transparent;\n height: ${BUTTON_SIDEBAR_HEIGHT}px;\n width: ${MIN_WIDTH_SIDEBAR}px;\n position: relative;\n padding: 0;\n border: none;\n cursor: pointer;\n border-bottom: ${(props) => (props.isHeader ? `1px solid ${props.theme.colors.neutral['200']}` : 'none')};\n &:focus,\n &:hover,\n &:active,\n &:disabled {\n background: ${(props) => props.theme.colors.neutral['080']};\n & ${StyledStatusBadge} {\n border: 2px solid ${(props) => props.theme.colors.neutral['080']};\n margin-top: -2px;\n ${(props) => {\n switch (props.badgePosition) {\n case 'left':\n return 'margin-left: -2px;';\n case 'right':\n return 'margin-right: -2px;';\n default:\n return 'margin-left: -2px;';\n }\n }};\n }\n }\n\n &:focus,\n &:hover {\n & ${StyledWrapperLeftBorder} {\n background: ${(props) => props.theme.colors.brand[800]};\n }\n & ${StyledTileButtonLabel} {\n color: ${(props) => props.theme.colors.neutral[600]};\n }\n\n & svg {\n fill: ${(props) => props.theme.colors.brand[800]};\n }\n }\n\n &:active:not(:disabled) {\n background: ${(props) => props.theme.colors.neutral['050']};\n & ${StyledWrapperLeftBorder} {\n background: ${(props) => props.theme.colors.brand[600]};\n }\n & ${StyledTileButtonLabel} {\n color: ${(props) => props.theme.colors.neutral[600]};\n font-weight: 600;\n }\n & svg {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n & ${StyledStatusBadge} {\n border: 2px solid ${(props) => props.theme.colors.neutral['050']};\n }\n }\n\n &:disabled {\n background: ${(props) => props.theme.colors.neutral['080']};\n ${StyledWrapperLeftBorder} {\n background: ${(props) => props.theme.colors.neutral['400']};\n }\n & ${StyledStatusBadge} {\n background: ${(props) => props.theme.colors.neutral['500']};\n border: 2px solid ${(props) => props.theme.colors.neutral['080']};\n }\n ${StyledTileButtonIcon} {\n svg {\n fill: ${(props) => props.theme.colors.neutral[400]};\n }\n }\n ${StyledTileButtonLabel} {\n color: ${(props) => props.theme.colors.neutral[400]};\n }\n }\n\n ${(props) => {\n if (props.selected) {\n return css`\n & ${StyledWrapperLeftBorder} {\n background: ${(nestedProps) => nestedProps.theme.colors.brand[600]};\n }\n `;\n }\n return '';\n }}\n`;\n\nexport const StyledWrapper = styled(Grid)`\n height: 100%;\n width: 100%;\n position: relative;\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,KAAK,cAAc;AAC5B,SAAS,YAAY;AAErB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAGvB,MAAM,0BAA0B,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ3C,MAAM,oBAAoB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKxB,CAAC,UAAU;AACvB,UAAQ,MAAM;AAAA,SACP;AACH,aAAO,MAAM,MAAM,OAAO,MAAM;AAAA,SAC7B;AACH,aAAO,MAAM,MAAM,OAAO,QAAQ;AAAA;AAElC,aAAO,MAAM,MAAM,OAAO,MAAM;AAAA;AAEtC;AAAA,IACE,CAAC,UAAU;AACX,UAAQ,MAAM;AAAA,SACP;AACH,aAAO;AAAA,SACJ;AACH,aAAO;AAAA;AAEP,aAAO;AAAA;AAEb;AAAA;AAAA;AAAA;AAKK,MAAM,8BAA8B,OAAO,IAAI;AAAA;AAAA;AAAA;AAK/C,MAAM,uBAAuB,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,YAKnC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,cAKpC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAK3C,MAAM,wBAAwB,OAAO;AAAA;AAAA,YAEhC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,WAK9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI1C,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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ACkB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,kBAK9C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,MAClD;AAAA,oBACc,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,QAElD;AAAA,oBACY,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,0BAChC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,MAE1D;AAAA;AAAA,gBAEU,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,MAGhD;AAAA,eACS,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA,IAIjD,CAAC,UAAU;AACX,MAAI,MAAM,UAAU;AAClB,WAAO;AAAA,YACD;AAAA,wBACY,CAAC,gBAAgB,YAAY,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA,EAGpE;AACA,SAAO;AACT;AAAA;AAGK,MAAM,gBAAgB,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@elliemae/ds-chat-tile",
3
+ "version": "3.6.0-next.0",
4
+ "license": "MIT",
5
+ "description": "ICE MT - Dimsum - Chat Tile",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "module": "./dist/esm/index.js",
10
+ "main": "./dist/cjs/index.js",
11
+ "types": "./dist/types/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/esm/index.js",
15
+ "require": "./dist/cjs/index.js"
16
+ },
17
+ "./styled": {
18
+ "import": "./dist/esm/styled.js",
19
+ "require": "./dist/cjs/styled.js"
20
+ },
21
+ "./props": {
22
+ "import": "./dist/esm/props.js",
23
+ "require": "./dist/cjs/props.js"
24
+ },
25
+ "./TileButton": {
26
+ "import": "./dist/esm/TileButton.js",
27
+ "require": "./dist/cjs/TileButton.js"
28
+ }
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://git.elliemae.io/platform-ui/dimsum.git"
33
+ },
34
+ "engines": {
35
+ "pnpm": ">=6",
36
+ "node": ">=16"
37
+ },
38
+ "author": "ICE MT",
39
+ "jestSonar": {
40
+ "sonar56x": true,
41
+ "reportPath": "reports",
42
+ "reportFile": "tests.xml",
43
+ "indent": 4
44
+ },
45
+ "publishConfig": {
46
+ "access": "public",
47
+ "typeSafety": true
48
+ },
49
+ "dependencies": {
50
+ "@elliemae/ds-grid": "3.6.0-next.0",
51
+ "@elliemae/ds-icons": "3.6.0-next.0",
52
+ "@elliemae/ds-system": "3.6.0-next.0",
53
+ "@elliemae/ds-tooltip": "3.6.0-next.0",
54
+ "@elliemae/ds-utilities": "3.6.0-next.0"
55
+ },
56
+ "devDependencies": {
57
+ "@testing-library/dom": "~8.13.0",
58
+ "@testing-library/jest-dom": "~5.16.4",
59
+ "@testing-library/react": "~12.1.3",
60
+ "@testing-library/user-event": "~13.5.0",
61
+ "styled-components": "~5.3.5"
62
+ },
63
+ "peerDependencies": {
64
+ "lodash": "^4.17.21",
65
+ "react": "^17.0.2",
66
+ "react-dom": "^17.0.2",
67
+ "styled-components": "^5.3.5"
68
+ },
69
+ "scripts": {
70
+ "test": "node ../../scripts/testing/test.mjs",
71
+ "lint": "node ../../scripts/lint.mjs",
72
+ "dts": "node ../../scripts/dts.mjs",
73
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
74
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
75
+ "checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
76
+ }
77
+ }