@elliemae/ds-chat-tile 3.70.0-next.4 → 3.70.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/TileButton.js +89 -32
- package/dist/cjs/TileButton.js.map +3 -3
- package/dist/cjs/constants/index.js +54 -0
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +9 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +4 -0
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styled.js +43 -9
- package/dist/cjs/styled.js.map +2 -2
- package/dist/esm/TileButton.js +91 -27
- package/dist/esm/TileButton.js.map +2 -2
- package/dist/esm/constants/index.js +24 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +10 -2
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +10 -1
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styled.js +43 -9
- package/dist/esm/styled.js.map +2 -2
- package/dist/types/TileButton.d.ts +3 -1
- package/dist/types/constants/index.d.ts +23 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/react-desc-prop-types.d.ts +20 -27
- package/dist/types/tests/DSChatTileButton.api.test.d.ts +1 -0
- package/dist/types/tests/DSChatTileButton.data-testId.test.d.ts +1 -0
- package/dist/types/tests/DSChatTileButton.events.test.d.ts +1 -0
- package/dist/types/tests/DSChatTileButton.exports.test.d.ts +1 -0
- package/dist/types/tests/DSChatTileButton.get-owner-props-arguments.test.d.ts +1 -0
- package/dist/types/tests/DSChatTileButton.keyboard.test.d.ts +1 -0
- package/package.json +9 -8
package/dist/esm/TileButton.js
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { createElement } from "react";
|
|
3
4
|
import React2 from "react";
|
|
4
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
describe,
|
|
7
|
+
useValidateTypescriptPropTypes,
|
|
8
|
+
useMemoMergePropsWithDefault,
|
|
9
|
+
useOwnerProps,
|
|
10
|
+
useGetGlobalAttributes,
|
|
11
|
+
useGetXstyledProps
|
|
12
|
+
} from "@elliemae/ds-props-helpers";
|
|
5
13
|
import { DSTooltipV3 } from "@elliemae/ds-tooltip-v3";
|
|
6
14
|
import { Grid } from "@elliemae/ds-grid";
|
|
7
15
|
import { CloseXsmall } from "@elliemae/ds-icons";
|
|
@@ -17,10 +25,15 @@ import {
|
|
|
17
25
|
CloseButton
|
|
18
26
|
} from "./styled.js";
|
|
19
27
|
import { propsTileButton, defaultTileButton } from "./react-desc-prop-types.js";
|
|
20
|
-
import { DSChatTileButtonName } from "./
|
|
28
|
+
import { DSChatTileButtonName } from "./constants/index.js";
|
|
21
29
|
const TileButton = (props) => {
|
|
22
30
|
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultTileButton);
|
|
23
31
|
useValidateTypescriptPropTypes(propsWithDefault, propsTileButton, DSChatTileButtonName);
|
|
32
|
+
const { title: titleConsumed, type: typeConsumed, ...globalPropsWithoutReusedReservedKeywords } = propsWithDefault;
|
|
33
|
+
const globalAttrs = useGetGlobalAttributes(globalPropsWithoutReusedReservedKeywords);
|
|
34
|
+
const { type: typeStripped, ...globalProps } = globalAttrs;
|
|
35
|
+
const xstyledProps = useGetXstyledProps(propsWithDefault);
|
|
36
|
+
const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);
|
|
24
37
|
const {
|
|
25
38
|
label,
|
|
26
39
|
title,
|
|
@@ -48,26 +61,50 @@ const TileButton = (props) => {
|
|
|
48
61
|
onClick(dsId, title);
|
|
49
62
|
}, [dsId, onClick, title, applyAriaDisabled]);
|
|
50
63
|
const MainContent = React2.useMemo(
|
|
51
|
-
() => /* @__PURE__ */ jsxs(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
() => /* @__PURE__ */ jsxs(
|
|
65
|
+
StyledWrapperCentralContent,
|
|
66
|
+
{
|
|
67
|
+
getOwnerProps,
|
|
68
|
+
getOwnerPropsArguments,
|
|
69
|
+
alignItems: isHeader ? "center" : void 0,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx(Grid, { width: "100%", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs(
|
|
72
|
+
StyledTileButtonIcon,
|
|
73
|
+
{
|
|
74
|
+
getOwnerProps,
|
|
75
|
+
getOwnerPropsArguments,
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
justifyContent: "center",
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ jsx(Icon, { size: "m" }),
|
|
80
|
+
badge ? /* @__PURE__ */ jsx(
|
|
81
|
+
StyledStatusBadge,
|
|
82
|
+
{
|
|
83
|
+
getOwnerProps,
|
|
84
|
+
getOwnerPropsArguments,
|
|
85
|
+
badgeColor,
|
|
86
|
+
badgePosition,
|
|
87
|
+
"data-testid": `tile-badge-${dsId}`
|
|
88
|
+
}
|
|
89
|
+
) : null
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
) }),
|
|
93
|
+
!isHeader ? /* @__PURE__ */ jsx(Grid, { width: "100%", justifyContent: "center", children: label ? /* @__PURE__ */ jsx(StyledTileButtonLabel, { getOwnerProps, getOwnerPropsArguments, children: label }) : null }) : null
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
[isHeader, Icon, badge, dsId, badgeColor, badgePosition, label, getOwnerProps, getOwnerPropsArguments]
|
|
66
98
|
);
|
|
67
99
|
const Btn = React2.useMemo(
|
|
68
|
-
() => /* @__PURE__ */
|
|
100
|
+
() => /* @__PURE__ */ createElement(
|
|
69
101
|
StyledTileButton,
|
|
70
102
|
{
|
|
103
|
+
...globalProps,
|
|
104
|
+
...xstyledProps,
|
|
105
|
+
getOwnerProps,
|
|
106
|
+
getOwnerPropsArguments,
|
|
107
|
+
key: dsId,
|
|
71
108
|
isHeader,
|
|
72
109
|
value: dsId,
|
|
73
110
|
"data-testid": `tile-button-${dsId}`,
|
|
@@ -82,14 +119,33 @@ const TileButton = (props) => {
|
|
|
82
119
|
"aria-pressed": selected,
|
|
83
120
|
"aria-label": ariaLabel,
|
|
84
121
|
"aria-disabled": applyAriaDisabled,
|
|
85
|
-
innerRef
|
|
86
|
-
children: /* @__PURE__ */ jsxs(StyledWrapper, { alignItems: "center", justifyContent: "center", children: [
|
|
87
|
-
/* @__PURE__ */ jsx("span", { children: MainContent }),
|
|
88
|
-
/* @__PURE__ */ jsx(StyledWrapperLeftBorder, {}),
|
|
89
|
-
showClose && !disabled ? /* @__PURE__ */ jsx(CloseButton, { onClick: onClose, value: dsId, "data-testid": `tile-close-btn-${dsId}`, "aria-label": "close", children: /* @__PURE__ */ jsx(CloseXsmall, {}) }) : null
|
|
90
|
-
] })
|
|
122
|
+
innerRef
|
|
91
123
|
},
|
|
92
|
-
|
|
124
|
+
/* @__PURE__ */ jsxs(
|
|
125
|
+
StyledWrapper,
|
|
126
|
+
{
|
|
127
|
+
getOwnerProps,
|
|
128
|
+
getOwnerPropsArguments,
|
|
129
|
+
alignItems: "center",
|
|
130
|
+
justifyContent: "center",
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ jsx("span", { children: MainContent }),
|
|
133
|
+
/* @__PURE__ */ jsx(StyledWrapperLeftBorder, { getOwnerProps, getOwnerPropsArguments }),
|
|
134
|
+
showClose && !disabled ? /* @__PURE__ */ jsx(
|
|
135
|
+
CloseButton,
|
|
136
|
+
{
|
|
137
|
+
getOwnerProps,
|
|
138
|
+
getOwnerPropsArguments,
|
|
139
|
+
onClick: onClose,
|
|
140
|
+
value: dsId,
|
|
141
|
+
"data-testid": `tile-close-btn-${dsId}`,
|
|
142
|
+
"aria-label": "close",
|
|
143
|
+
children: /* @__PURE__ */ jsx(CloseXsmall, {})
|
|
144
|
+
}
|
|
145
|
+
) : null
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
)
|
|
93
149
|
),
|
|
94
150
|
[
|
|
95
151
|
MainContent,
|
|
@@ -106,15 +162,23 @@ const TileButton = (props) => {
|
|
|
106
162
|
selected,
|
|
107
163
|
showClose,
|
|
108
164
|
innerRef,
|
|
109
|
-
applyAriaDisabled
|
|
165
|
+
applyAriaDisabled,
|
|
166
|
+
getOwnerProps,
|
|
167
|
+
getOwnerPropsArguments,
|
|
168
|
+
globalProps,
|
|
169
|
+
xstyledProps
|
|
110
170
|
]
|
|
111
171
|
);
|
|
112
|
-
return title && !disableTooltip ? /* @__PURE__ */ jsx(StyledTooltipV3ButtonWrapper, { children: /* @__PURE__ */ jsx(DSTooltipV3, { id: `ds-chat-tile-tooltip-button-${dsId}`, text: title, startPlacementPreference: tooltipPlacement, children: Btn }) }) : Btn;
|
|
172
|
+
return title && !disableTooltip ? /* @__PURE__ */ jsx(StyledTooltipV3ButtonWrapper, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ jsx(DSTooltipV3, { id: `ds-chat-tile-tooltip-button-${dsId}`, text: title, startPlacementPreference: tooltipPlacement, children: Btn }) }) : Btn;
|
|
113
173
|
};
|
|
114
174
|
TileButton.displayName = DSChatTileButtonName;
|
|
115
175
|
const TileButtonWithSchema = describe(TileButton);
|
|
116
176
|
TileButtonWithSchema.propTypes = propsTileButton;
|
|
177
|
+
const DSChatTileButton = TileButton;
|
|
178
|
+
const DSChatTileButtonWithSchema = TileButtonWithSchema;
|
|
117
179
|
export {
|
|
180
|
+
DSChatTileButton,
|
|
181
|
+
DSChatTileButtonWithSchema,
|
|
118
182
|
TileButton,
|
|
119
183
|
TileButtonWithSchema
|
|
120
184
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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 type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\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.js';\nimport type { DSChatTileT } from './react-desc-prop-types.js';\nimport { propsTileButton, defaultTileButton } from './react-desc-prop-types.js';\nimport { DSChatTileButtonName } from './constants/index.js';\n\nconst TileButton: React.ComponentType<DSChatTileT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatTileT.InternalProps>(props, defaultTileButton);\n useValidateTypescriptPropTypes(propsWithDefault, propsTileButton, DSChatTileButtonName);\n\n // exclude `title` AND `type` \u2014 `title` is consumed (not spread); `type` HTMLButtonAttribute would\n // collide with styled-components' button type literal (`'button' | 'submit' | 'reset'`).\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { title: titleConsumed, type: typeConsumed, ...globalPropsWithoutReusedReservedKeywords } = propsWithDefault;\n const globalAttrs = useGetGlobalAttributes(globalPropsWithoutReusedReservedKeywords);\n // strip `type` from the resulting global attributes \u2014 `useGetGlobalAttributes`'s return type still\n // exposes it, and styled-components requires a strict `'button' | 'submit' | 'reset'` literal.\n // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars\n const { type: typeStripped, ...globalProps } = globalAttrs as typeof globalAttrs & { type?: unknown };\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps<DSChatTileT.Props>(propsWithDefault);\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 applyAriaDisabled,\n } = propsWithDefault;\n\n const handleClick = React.useCallback(() => {\n if (applyAriaDisabled) return;\n onClick(dsId, title);\n }, [dsId, onClick, title, applyAriaDisabled]);\n\n const MainContent = React.useMemo(\n () => (\n <StyledWrapperCentralContent\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n alignItems={isHeader ? 'center' : undefined}\n >\n <Grid width=\"100%\" alignItems=\"center\" justifyContent=\"center\">\n <StyledTileButtonIcon\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <Icon size=\"m\" />\n {badge ? (\n <StyledStatusBadge\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n badgeColor={badgeColor}\n badgePosition={badgePosition}\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`tile-badge-${dsId}`}\n />\n ) : null}\n </StyledTileButtonIcon>\n </Grid>\n {!isHeader ? (\n <Grid width=\"100%\" justifyContent=\"center\">\n {label ? (\n <StyledTileButtonLabel getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {label}\n </StyledTileButtonLabel>\n ) : null}\n </Grid>\n ) : null}\n </StyledWrapperCentralContent>\n ),\n [isHeader, Icon, badge, dsId, badgeColor, badgePosition, label, getOwnerProps, getOwnerPropsArguments],\n );\n\n const Btn = React.useMemo(\n () => (\n <StyledTileButton\n {...globalProps}\n {...xstyledProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n key={dsId}\n isHeader={isHeader}\n value={dsId}\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\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 aria-disabled={applyAriaDisabled}\n innerRef={innerRef}\n >\n <StyledWrapper\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <span>{MainContent}</span>\n <StyledWrapperLeftBorder getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n {showClose && !disabled ? (\n <CloseButton\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n onClick={onClose}\n value={dsId}\n // legacy dynamic data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={`tile-close-btn-${dsId}`}\n aria-label=\"close\"\n >\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 applyAriaDisabled,\n getOwnerProps,\n getOwnerPropsArguments,\n globalProps,\n xstyledProps,\n ],\n );\n\n return title && !disableTooltip ? (\n <StyledTooltipV3ButtonWrapper getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\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.displayName = DSChatTileButtonName;\nconst TileButtonWithSchema = describe(TileButton);\nTileButtonWithSchema.propTypes = propsTileButton as WeakValidationMap<unknown>;\n\n// DS-prefixed canonical names (modern Dimsum convention) \u2014 TileButton kept as alias for backwards compat\nconst DSChatTileButton = TileButton;\nconst DSChatTileButtonWithSchema = TileButtonWithSchema;\n\nexport { TileButton, TileButtonWithSchema, DSChatTileButton, DSChatTileButtonWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiFb,SAME,KANF;AAmCJ;AAlHN,OAAOA,YAAW;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,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;AAEP,SAAS,iBAAiB,yBAAyB;AACnD,SAAS,4BAA4B;AAErC,MAAM,aAAqD,CAAC,UAAU;AACpE,QAAM,mBAAmB,6BAAwD,OAAO,iBAAiB;AACzG,iCAA+B,kBAAkB,iBAAiB,oBAAoB;AAKtF,QAAM,EAAE,OAAO,eAAe,MAAM,cAAc,GAAG,yCAAyC,IAAI;AAClG,QAAM,cAAc,uBAAuB,wCAAwC;AAInF,QAAM,EAAE,MAAM,cAAc,GAAG,YAAY,IAAI;AAC/C,QAAM,eAAe,mBAAmB,gBAAgB;AACxD,QAAM,EAAE,eAAe,uBAAuB,IAAI,cAAiC,gBAAgB;AAEnG,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA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C,YAAU;AAAA,QACV,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,gBAAc;AAAA,QACd,cAAY;AAAA,QACZ,iBAAe;AAAA,QACf;AAAA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,YAAW;AAAA,UACX,gBAAe;AAAA,UAEf;AAAA,gCAAC,UAAM,uBAAY;AAAA,YACnB,oBAAC,2BAAwB,eAA8B,wBAAgD;AAAA,YACtG,aAAa,CAAC,WACb;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA;AAAA,gBACA,SAAS;AAAA,gBACT,OAAO;AAAA,gBAEP,eAAa,kBAAkB,IAAI;AAAA,gBACnC,cAAW;AAAA,gBAEX,8BAAC,eAAY;AAAA;AAAA,YACf,IACE;AAAA;AAAA;AAAA,MACN;AAAA,IACF;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO,SAAS,CAAC,iBACf,oBAAC,gCAA6B,eAA8B,wBAC1D,8BAAC,eAAY,IAAI,+BAA+B,IAAI,IAAI,MAAM,OAAO,0BAA0B,kBAC5F,eACH,GACF,IAEA;AAEJ;AAEA,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU;AAChD,qBAAqB,YAAY;AAGjC,MAAM,mBAAmB;AACzB,MAAM,6BAA6B;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { slotObjectToDataTestIds } from "@elliemae/ds-system";
|
|
3
|
+
const DSChatTileButtonName = "DSChattilebutton";
|
|
4
|
+
const CHAT_TILE_BUTTON_SLOTS = {
|
|
5
|
+
ROOT: "root",
|
|
6
|
+
TOOLTIP_WRAPPER: "tooltip-wrapper",
|
|
7
|
+
WRAPPER: "wrapper",
|
|
8
|
+
LEFT_BORDER: "left-border",
|
|
9
|
+
CENTRAL_CONTENT: "central-content",
|
|
10
|
+
ICON: "icon",
|
|
11
|
+
// legacy data-testid is dynamic per-instance (`tile-badge-${dsId}` lives on BADGE) — this slot has no legacy testid override
|
|
12
|
+
LABEL: "label",
|
|
13
|
+
BADGE: "badge",
|
|
14
|
+
// legacy ones... preserved at JSX level via inline data-testid `tile-badge-${dsId}`
|
|
15
|
+
CLOSE_BUTTON: "close-button"
|
|
16
|
+
// legacy ones... preserved at JSX level via inline data-testid `tile-close-btn-${dsId}`
|
|
17
|
+
};
|
|
18
|
+
const CHAT_TILE_BUTTON_DATA_TESTID = slotObjectToDataTestIds(DSChatTileButtonName, CHAT_TILE_BUTTON_SLOTS);
|
|
19
|
+
export {
|
|
20
|
+
CHAT_TILE_BUTTON_DATA_TESTID,
|
|
21
|
+
CHAT_TILE_BUTTON_SLOTS,
|
|
22
|
+
DSChatTileButtonName
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSChatTileButtonName = 'DSChattilebutton';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const CHAT_TILE_BUTTON_SLOTS = {\n ROOT: 'root',\n TOOLTIP_WRAPPER: 'tooltip-wrapper',\n WRAPPER: 'wrapper',\n LEFT_BORDER: 'left-border',\n CENTRAL_CONTENT: 'central-content',\n ICON: 'icon', // legacy data-testid is dynamic per-instance (`tile-badge-${dsId}` lives on BADGE) \u2014 this slot has no legacy testid override\n LABEL: 'label',\n BADGE: 'badge', // legacy ones... preserved at JSX level via inline data-testid `tile-badge-${dsId}`\n CLOSE_BUTTON: 'close-button', // legacy ones... preserved at JSX level via inline data-testid `tile-close-btn-${dsId}`\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\n// Note: ROOT, BADGE and CLOSE_BUTTON have legacy *dynamic* data-testid values (`tile-button-${dsId}`, `tile-badge-${dsId}`, `tile-close-btn-${dsId}`)\n// that consumer QA tests depend on. Those values are interpolated per-instance and preserved in JSX via inline `data-testid={...}`.\n// The map below holds only the static slot-derived testids; the dynamic ones cannot be expressed here.\nexport const CHAT_TILE_BUTTON_DATA_TESTID = slotObjectToDataTestIds(DSChatTileButtonName, CHAT_TILE_BUTTON_SLOTS);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,uBAAuB;AAG7B,MAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,MAAM;AAAA;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA;AAAA,EACP,cAAc;AAAA;AAChB;AAMO,MAAM,+BAA+B,wBAAwB,sBAAsB,sBAAsB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { TileButton, TileButtonWithSchema } from "./TileButton.js";
|
|
2
|
+
import { TileButton, TileButtonWithSchema, DSChatTileButton, DSChatTileButtonWithSchema } from "./TileButton.js";
|
|
3
|
+
import { propsTileButton } from "./react-desc-prop-types.js";
|
|
4
|
+
import { CHAT_TILE_BUTTON_SLOTS, CHAT_TILE_BUTTON_DATA_TESTID, DSChatTileButtonName } from "./constants/index.js";
|
|
3
5
|
export {
|
|
6
|
+
CHAT_TILE_BUTTON_DATA_TESTID,
|
|
7
|
+
CHAT_TILE_BUTTON_SLOTS,
|
|
8
|
+
DSChatTileButton,
|
|
9
|
+
DSChatTileButtonName,
|
|
10
|
+
DSChatTileButtonWithSchema,
|
|
4
11
|
TileButton,
|
|
5
|
-
TileButtonWithSchema
|
|
12
|
+
TileButtonWithSchema,
|
|
13
|
+
propsTileButton
|
|
6
14
|
};
|
|
7
15
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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.js';\nexport type { DSChatTileT } from './react-desc-prop-types.js';\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY,4BAA4B;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { TileButton, TileButtonWithSchema, DSChatTileButton, DSChatTileButtonWithSchema } from './TileButton.js';\nexport type { DSChatTileT } from './react-desc-prop-types.js';\nexport { propsTileButton } from './react-desc-prop-types.js';\nexport { CHAT_TILE_BUTTON_SLOTS, CHAT_TILE_BUTTON_DATA_TESTID, DSChatTileButtonName } from './constants/index.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY,sBAAsB,kBAAkB,kCAAkC;AAE/F,SAAS,uBAAuB;AAChC,SAAS,wBAAwB,8BAA8B,4BAA4B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
PropTypes,
|
|
4
|
+
getPropsPerSlotPropTypes,
|
|
5
|
+
globalAttributesPropTypes,
|
|
6
|
+
xstyledPropTypes
|
|
7
|
+
} from "@elliemae/ds-props-helpers";
|
|
3
8
|
import { noop } from "lodash-es";
|
|
4
9
|
import { Comments } from "@elliemae/ds-icons";
|
|
10
|
+
import { CHAT_TILE_BUTTON_SLOTS, DSChatTileButtonName } from "./constants/index.js";
|
|
5
11
|
const defaultTileButton = {
|
|
6
12
|
Icon: Comments,
|
|
7
13
|
dsId: "",
|
|
@@ -21,6 +27,9 @@ const defaultTileButton = {
|
|
|
21
27
|
applyAriaDisabled: false
|
|
22
28
|
};
|
|
23
29
|
const propsTileButton = {
|
|
30
|
+
...getPropsPerSlotPropTypes(DSChatTileButtonName, CHAT_TILE_BUTTON_SLOTS),
|
|
31
|
+
...globalAttributesPropTypes,
|
|
32
|
+
...xstyledPropTypes,
|
|
24
33
|
Icon: PropTypes.func.description("Icon component").defaultValue(defaultTileButton.Icon),
|
|
25
34
|
dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description("Unique id for the button").defaultValue(defaultTileButton.dsId),
|
|
26
35
|
label: PropTypes.string.description("It will display under the icon").defaultValue(defaultTileButton.label),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type React from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash-es';\nimport { Comments, type SvgIconT } from '@elliemae/ds-icons';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { CHAT_TILE_BUTTON_SLOTS, DSChatTileButtonName } from './constants/index.js';\n\nexport declare namespace DSChatTileT {\n type TooltipPlacementT =\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 // hand-written per-slot function argument map \u2014 one entry per slot in CHAT_TILE_BUTTON_SLOTS\n export type SlotFunctionArguments = {\n dsChattilebuttonRoot: () => object;\n dsChattilebuttonTooltipWrapper: () => object;\n dsChattilebuttonWrapper: () => object;\n dsChattilebuttonLeftBorder: () => object;\n dsChattilebuttonCentralContent: () => object;\n dsChattilebuttonIcon: () => object;\n dsChattilebuttonLabel: () => object;\n dsChattilebuttonBadge: () => object;\n dsChattilebuttonCloseButton: () => object;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n Icon: React.ComponentType<SvgIconT.Props>;\n dsId: string | number;\n label: string;\n onClick: (dsId: string | number, label: string) => void;\n title: string;\n showClose: boolean;\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: TooltipPlacementT;\n disableTooltip: boolean;\n applyAriaDisabled: boolean;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSChatTileButtonName, typeof CHAT_TILE_BUTTON_SLOTS> {\n onBlur?: React.FocusEventHandler<HTMLButtonElement>;\n onFocus?: React.FocusEventHandler<HTMLButtonElement>;\n onClose?: (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;\n innerRef?: React.MutableRefObject<HTMLButtonElement> | ((_ref: HTMLButtonElement) => void);\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultTileButton: DSChatTileT.DefaultProps = {\n Icon: Comments,\n dsId: '',\n label: '',\n onClick: noop,\n title: '',\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 applyAriaDisabled: false,\n};\n\nexport const propsTileButton: DSPropTypesSchema<DSChatTileT.Props> = {\n ...getPropsPerSlotPropTypes(DSChatTileButtonName, CHAT_TILE_BUTTON_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\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'),\n onBlur: PropTypes.func.description('The function to call when is on blur'),\n onClose: PropTypes.func\n .description('The function to call when the X is Clicked')\n .deprecated({ version: '4.x', message: 'use Menu and menuProps instead' }),\n showClose: PropTypes.bool\n .description('It will display the X')\n .defaultValue(defaultTileButton.showClose)\n .deprecated({ version: '4.x', message: 'use Menu and menuProps instead' }),\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 applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,YAAY;AACrB,SAAS,gBAA+B;AAExC,SAAS,wBAAwB,4BAA4B;AA0EtD,MAAM,oBAA8C;AAAA,EACzD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,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,E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AAa,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;AAAA,EACA,mBAAmB,UAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AACvB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/styled.js
CHANGED
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { styled } from "@elliemae/ds-system";
|
|
3
3
|
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
import { CHAT_TILE_BUTTON_SLOTS, DSChatTileButtonName } from "./constants/index.js";
|
|
4
5
|
const MIN_WIDTH_SIDEBAR = 48;
|
|
5
6
|
const BUTTON_SIDEBAR_HEIGHT = 48;
|
|
6
|
-
const StyledWrapperLeftBorder = styled(Grid
|
|
7
|
+
const StyledWrapperLeftBorder = styled(Grid, {
|
|
8
|
+
name: DSChatTileButtonName,
|
|
9
|
+
slot: CHAT_TILE_BUTTON_SLOTS.LEFT_BORDER
|
|
10
|
+
})`
|
|
7
11
|
height: 100%;
|
|
8
12
|
width: 4px;
|
|
9
13
|
position: absolute;
|
|
10
14
|
top: 0;
|
|
11
15
|
left: 0;
|
|
12
16
|
`;
|
|
13
|
-
const StyledStatusBadge = styled
|
|
17
|
+
const StyledStatusBadge = styled("div", {
|
|
18
|
+
name: DSChatTileButtonName,
|
|
19
|
+
slot: CHAT_TILE_BUTTON_SLOTS.BADGE,
|
|
20
|
+
// legacy dynamic data-testid `tile-badge-${dsId}` is preserved via inline JSX data-testid
|
|
21
|
+
preserveLegacyDataTestId: true
|
|
22
|
+
})`
|
|
14
23
|
height: 8px;
|
|
15
24
|
width: 8px;
|
|
16
25
|
position: absolute;
|
|
@@ -50,11 +59,17 @@ const StyledStatusBadge = styled.div`
|
|
|
50
59
|
border-radius: 50%;
|
|
51
60
|
box-sizing: content-box;
|
|
52
61
|
`;
|
|
53
|
-
const StyledWrapperCentralContent = styled(Grid
|
|
62
|
+
const StyledWrapperCentralContent = styled(Grid, {
|
|
63
|
+
name: DSChatTileButtonName,
|
|
64
|
+
slot: CHAT_TILE_BUTTON_SLOTS.CENTRAL_CONTENT
|
|
65
|
+
})`
|
|
54
66
|
width: 24px;
|
|
55
67
|
height: 40px;
|
|
56
68
|
`;
|
|
57
|
-
const StyledTileButtonIcon = styled(Grid
|
|
69
|
+
const StyledTileButtonIcon = styled(Grid, {
|
|
70
|
+
name: DSChatTileButtonName,
|
|
71
|
+
slot: CHAT_TILE_BUTTON_SLOTS.ICON
|
|
72
|
+
})`
|
|
58
73
|
position: relative;
|
|
59
74
|
height: 24px;
|
|
60
75
|
width: 24px;
|
|
@@ -68,7 +83,10 @@ const StyledTileButtonIcon = styled(Grid)`
|
|
|
68
83
|
}
|
|
69
84
|
}
|
|
70
85
|
`;
|
|
71
|
-
const StyledTileButtonLabel = styled
|
|
86
|
+
const StyledTileButtonLabel = styled("div", {
|
|
87
|
+
name: DSChatTileButtonName,
|
|
88
|
+
slot: CHAT_TILE_BUTTON_SLOTS.LABEL
|
|
89
|
+
})`
|
|
72
90
|
width: 24px;
|
|
73
91
|
height: ${(props) => props.theme.space.xs};
|
|
74
92
|
text-transform: uppercase;
|
|
@@ -78,7 +96,12 @@ const StyledTileButtonLabel = styled.div`
|
|
|
78
96
|
color: ${(props) => props.theme.colors.neutral[600]};
|
|
79
97
|
line-height: 17px;
|
|
80
98
|
`;
|
|
81
|
-
const CloseButton = styled
|
|
99
|
+
const CloseButton = styled("button", {
|
|
100
|
+
name: DSChatTileButtonName,
|
|
101
|
+
slot: CHAT_TILE_BUTTON_SLOTS.CLOSE_BUTTON,
|
|
102
|
+
// legacy dynamic data-testid `tile-close-btn-${dsId}` is preserved via inline JSX data-testid
|
|
103
|
+
preserveLegacyDataTestId: true
|
|
104
|
+
})`
|
|
82
105
|
outline: none;
|
|
83
106
|
background: none;
|
|
84
107
|
height: 9px;
|
|
@@ -116,11 +139,19 @@ const CloseButton = styled.button`
|
|
|
116
139
|
}
|
|
117
140
|
cursor: pointer;
|
|
118
141
|
`;
|
|
119
|
-
const StyledTooltipV3ButtonWrapper = styled
|
|
142
|
+
const StyledTooltipV3ButtonWrapper = styled("div", {
|
|
143
|
+
name: DSChatTileButtonName,
|
|
144
|
+
slot: CHAT_TILE_BUTTON_SLOTS.TOOLTIP_WRAPPER
|
|
145
|
+
})`
|
|
120
146
|
height: ${BUTTON_SIDEBAR_HEIGHT}px;
|
|
121
147
|
width: ${MIN_WIDTH_SIDEBAR}px;
|
|
122
148
|
`;
|
|
123
|
-
const StyledTileButton = styled
|
|
149
|
+
const StyledTileButton = styled("button", {
|
|
150
|
+
name: DSChatTileButtonName,
|
|
151
|
+
slot: CHAT_TILE_BUTTON_SLOTS.ROOT,
|
|
152
|
+
// legacy dynamic data-testid `tile-button-${dsId}` is preserved via inline JSX data-testid
|
|
153
|
+
preserveLegacyDataTestId: true
|
|
154
|
+
})`
|
|
124
155
|
outline: none;
|
|
125
156
|
background: ${(props) => props.theme.colors.neutral["050"]};
|
|
126
157
|
height: ${BUTTON_SIDEBAR_HEIGHT}px;
|
|
@@ -204,7 +235,10 @@ const StyledTileButton = styled.button`
|
|
|
204
235
|
return "";
|
|
205
236
|
}}
|
|
206
237
|
`;
|
|
207
|
-
const StyledWrapper = styled(Grid
|
|
238
|
+
const StyledWrapper = styled(Grid, {
|
|
239
|
+
name: DSChatTileButtonName,
|
|
240
|
+
slot: CHAT_TILE_BUTTON_SLOTS.WRAPPER
|
|
241
|
+
})`
|
|
208
242
|
height: 100%;
|
|
209
243
|
width: 100%;
|
|
210
244
|
position: relative;
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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 { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport type { DSChatTileT } from './react-desc-prop-types.js';\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.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAGvB,MAAM,0BAA0B,OAAO,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n/* eslint-disable max-lines */\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport type { DSChatTileT } from './react-desc-prop-types.js';\nimport { CHAT_TILE_BUTTON_SLOTS, DSChatTileButtonName } from './constants/index.js';\n\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n\n// Buttons\nexport const StyledWrapperLeftBorder = styled(Grid, {\n name: DSChatTileButtonName,\n slot: CHAT_TILE_BUTTON_SLOTS.LEFT_BORDER,\n})`\n height: 100%;\n width: 4px;\n position: absolute;\n top: 0;\n left: 0;\n`;\n\nexport const StyledStatusBadge = styled('div', {\n name: DSChatTileButtonName,\n slot: CHAT_TILE_BUTTON_SLOTS.BADGE,\n // legacy dynamic data-testid `tile-badge-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})<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: 2px solid ${(props) => props.theme.colors.neutral['050']};\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 border-radius: 50%;\n box-sizing: content-box;\n`;\n\nexport const StyledWrapperCentralContent = styled(Grid, {\n name: DSChatTileButtonName,\n slot: CHAT_TILE_BUTTON_SLOTS.CENTRAL_CONTENT,\n})`\n width: 24px;\n height: 40px;\n`;\n\nexport const StyledTileButtonIcon = styled(Grid, {\n name: DSChatTileButtonName,\n slot: CHAT_TILE_BUTTON_SLOTS.ICON,\n})`\n position: relative;\n height: 24px;\n width: 24px;\n svg {\n fill: ${(props) => props.theme.colors.neutral[600]};\n }\n\n &:focus {\n svg {\n fill: ${(props) => props.theme.colors.brand[800]};\n }\n }\n`;\n\nexport const StyledTileButtonLabel = styled('div', {\n name: DSChatTileButtonName,\n slot: CHAT_TILE_BUTTON_SLOTS.LABEL,\n})`\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 name: DSChatTileButtonName,\n slot: CHAT_TILE_BUTTON_SLOTS.CLOSE_BUTTON,\n // legacy dynamic data-testid `tile-close-btn-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})`\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 svg {\n fill: #000000;\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 name: DSChatTileButtonName,\n slot: CHAT_TILE_BUTTON_SLOTS.TOOLTIP_WRAPPER,\n})`\n height: ${BUTTON_SIDEBAR_HEIGHT}px;\n width: ${MIN_WIDTH_SIDEBAR}px;\n`;\n\nexport const StyledTileButton = styled('button', {\n name: DSChatTileButtonName,\n slot: CHAT_TILE_BUTTON_SLOTS.ROOT,\n // legacy dynamic data-testid `tile-button-${dsId}` is preserved via inline JSX data-testid\n preserveLegacyDataTestId: true,\n})<Partial<DSChatTileT.Props>>`\n outline: none;\n background: ${(props) => props.theme.colors.neutral['050']};\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 &[aria-disabled='true'] {\n background: ${(props) => props.theme.colors.neutral['080']};\n & ${StyledStatusBadge} {\n border: 2px solid ${(props) => props.theme.colors.neutral['080']};\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, [aria-disabled='true']) {\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 &[aria-disabled='true'] {\n background: ${(props) => props.theme.colors.neutral['080']};\n cursor: not-allowed;\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 `\n & ${StyledWrapperLeftBorder} {\n background: ${props.theme.colors.brand[600]};\n }\n `;\n }\n return '';\n }}\n`;\n\nexport const StyledWrapper = styled(Grid, {\n name: DSChatTileButtonName,\n slot: CHAT_TILE_BUTTON_SLOTS.WRAPPER,\n})`\n height: 100%;\n width: 100%;\n position: relative;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,SAAS,wBAAwB,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AM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA,MAEhE,oBAAoB;AAAA;AAAA,gBAEV,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA;AAAA,MAGpD,qBAAqB;AAAA,eACZ,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA,IAIrD,CAAC,UAAU;AACX,MAAI,MAAM,UAAU;AAClB,WAAO;AAAA,YACD,uBAAuB;AAAA,wBACX,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA,EAGjD;AACA,SAAO;AACT,CAAC;AAAA;AAGI,MAAM,gBAAgB,OAAO,MAAM;AAAA,EACxC,MAAM;AAAA,EACN,MAAM,uBAAuB;AAC/B,CAAC;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,4 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import type { DSChatTileT } from './react-desc-prop-types.js';
|
|
3
3
|
declare const TileButton: React.ComponentType<DSChatTileT.Props>;
|
|
4
4
|
declare const TileButtonWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSChatTileT.Props>;
|
|
5
|
-
|
|
5
|
+
declare const DSChatTileButton: React.FunctionComponent<DSChatTileT.Props>;
|
|
6
|
+
declare const DSChatTileButtonWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSChatTileT.Props>;
|
|
7
|
+
export { TileButton, TileButtonWithSchema, DSChatTileButton, DSChatTileButtonWithSchema };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const DSChatTileButtonName = "DSChattilebutton";
|
|
2
|
+
export declare const CHAT_TILE_BUTTON_SLOTS: {
|
|
3
|
+
readonly ROOT: "root";
|
|
4
|
+
readonly TOOLTIP_WRAPPER: "tooltip-wrapper";
|
|
5
|
+
readonly WRAPPER: "wrapper";
|
|
6
|
+
readonly LEFT_BORDER: "left-border";
|
|
7
|
+
readonly CENTRAL_CONTENT: "central-content";
|
|
8
|
+
readonly ICON: "icon";
|
|
9
|
+
readonly LABEL: "label";
|
|
10
|
+
readonly BADGE: "badge";
|
|
11
|
+
readonly CLOSE_BUTTON: "close-button";
|
|
12
|
+
};
|
|
13
|
+
export declare const CHAT_TILE_BUTTON_DATA_TESTID: {
|
|
14
|
+
readonly ROOT: "ds-chattilebutton-root";
|
|
15
|
+
readonly TOOLTIP_WRAPPER: "ds-chattilebutton-tooltip-wrapper";
|
|
16
|
+
readonly WRAPPER: "ds-chattilebutton-wrapper";
|
|
17
|
+
readonly LEFT_BORDER: "ds-chattilebutton-left-border";
|
|
18
|
+
readonly CENTRAL_CONTENT: "ds-chattilebutton-central-content";
|
|
19
|
+
readonly ICON: "ds-chattilebutton-icon";
|
|
20
|
+
readonly LABEL: "ds-chattilebutton-label";
|
|
21
|
+
readonly BADGE: "ds-chattilebutton-badge";
|
|
22
|
+
readonly CLOSE_BUTTON: "ds-chattilebutton-close-button";
|
|
23
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export { TileButton, TileButtonWithSchema } from './TileButton.js';
|
|
1
|
+
export { TileButton, TileButtonWithSchema, DSChatTileButton, DSChatTileButtonWithSchema } from './TileButton.js';
|
|
2
2
|
export type { DSChatTileT } from './react-desc-prop-types.js';
|
|
3
|
+
export { propsTileButton } from './react-desc-prop-types.js';
|
|
4
|
+
export { CHAT_TILE_BUTTON_SLOTS, CHAT_TILE_BUTTON_DATA_TESTID, DSChatTileButtonName } from './constants/index.js';
|