@elliemae/ds-chat-tile 3.28.1-rc.1 → 3.29.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.
- package/dist/cjs/TileButton.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +4 -8
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styled.js.map +1 -1
- package/dist/cjs/typescript-testing/typescript-chat-card-valid.js +168 -0
- package/dist/cjs/typescript-testing/typescript-chat-card-valid.js.map +7 -0
- package/dist/esm/TileButton.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +4 -8
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styled.js.map +1 -1
- package/dist/esm/typescript-testing/typescript-chat-card-valid.js +145 -0
- package/dist/esm/typescript-testing/typescript-chat-card-valid.js.map +7 -0
- package/dist/types/react-desc-prop-types.d.ts +16 -10
- package/dist/types/styled.d.ts +1 -1
- package/dist/types/typescript-testing/typescript-chat-card-valid.d.ts +1 -0
- package/package.json +8 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/TileButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\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.js';\nimport type { DSChatTileT } from './react-desc-prop-types.js';\nimport { propsTileButton, defaultTileButton } from './react-desc-prop-types.js';\nimport { DSChatTileButtonName } from './DSChatTileButtonDefinitions.js';\n\nconst TileButton: React.ComponentType<DSChatTileT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultTileButton);\n useValidateTypescriptPropTypes(propsWithDefault, propsTileButton, DSChatTileButtonName);\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 innerRef={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}`} aria-label=\"close\">\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 = DSChatTileButtonName;\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;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\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.js';\nimport type { DSChatTileT } from './react-desc-prop-types.js';\nimport { propsTileButton, defaultTileButton } from './react-desc-prop-types.js';\nimport { DSChatTileButtonName } from './DSChatTileButtonDefinitions.js';\n\nconst TileButton: React.ComponentType<DSChatTileT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatTileT.InternalProps>(props, defaultTileButton);\n useValidateTypescriptPropTypes(propsWithDefault, propsTileButton, DSChatTileButtonName);\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\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 innerRef={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}`} aria-label=\"close\">\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 = DSChatTileButtonName;\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;ADwDb;AAtDV,mBAAkB;AAClB,8BAAuF;AACvF,wBAA4B;AAC5B,qBAAqB;AACrB,sBAA4B;AAC5B,oBAUO;AAEP,mCAAmD;AACnD,yCAAqC;AAErC,MAAM,aAAqD,CAAC,UAAU;AACpE,QAAM,uBAAmB,sDAAwD,OAAO,8CAAiB;AACzG,8DAA+B,kBAAkB,8CAAiB,uDAAoB;AAEtF,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,E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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,4CAAC,8CACC,sDAAC,iCAAY,IAAI,+BAA+B,QAAQ,MAAM,OAAO,0BAA0B,kBAC5F,eACH,GACF,IAEA;AAEJ;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,2BAAuB,kCAAS,UAAU;AAChD,qBAAqB,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -41,10 +41,7 @@ const defaultTileButton = {
|
|
|
41
41
|
dsId: "",
|
|
42
42
|
label: "",
|
|
43
43
|
onClick: import_lodash.noop,
|
|
44
|
-
onBlur: import_lodash.noop,
|
|
45
|
-
onFocus: import_lodash.noop,
|
|
46
44
|
title: "",
|
|
47
|
-
onClose: import_lodash.noop,
|
|
48
45
|
showClose: false,
|
|
49
46
|
badge: false,
|
|
50
47
|
badgeColor: "blue",
|
|
@@ -54,8 +51,7 @@ const defaultTileButton = {
|
|
|
54
51
|
isHeader: false,
|
|
55
52
|
ariaLabel: "Tile button",
|
|
56
53
|
tooltipPlacement: "right",
|
|
57
|
-
disableTooltip: false
|
|
58
|
-
innerRef: import_lodash.noop
|
|
54
|
+
disableTooltip: false
|
|
59
55
|
};
|
|
60
56
|
const propsTileButton = {
|
|
61
57
|
Icon: import_ds_props_helpers.PropTypes.func.description("Icon component").defaultValue(defaultTileButton.Icon),
|
|
@@ -63,9 +59,9 @@ const propsTileButton = {
|
|
|
63
59
|
label: import_ds_props_helpers.PropTypes.string.description("It will display under the icon").defaultValue(defaultTileButton.label),
|
|
64
60
|
title: import_ds_props_helpers.PropTypes.string.description("Tooltip").defaultValue(defaultTileButton.title),
|
|
65
61
|
onClick: import_ds_props_helpers.PropTypes.func.description("The function to call when is clicked").defaultValue(defaultTileButton.onClick),
|
|
66
|
-
onFocus: import_ds_props_helpers.PropTypes.func.description("The function to call when is focused")
|
|
67
|
-
onBlur: import_ds_props_helpers.PropTypes.func.description("The function to call when is on blur")
|
|
68
|
-
onClose: import_ds_props_helpers.PropTypes.func.description("The function to call when the X is Clicked").
|
|
62
|
+
onFocus: import_ds_props_helpers.PropTypes.func.description("The function to call when is focused"),
|
|
63
|
+
onBlur: import_ds_props_helpers.PropTypes.func.description("The function to call when is on blur"),
|
|
64
|
+
onClose: import_ds_props_helpers.PropTypes.func.description("The function to call when the X is Clicked").deprecated({ version: "4.x", message: "use Menu and menuProps instead" }),
|
|
69
65
|
showClose: import_ds_props_helpers.PropTypes.bool.description("It will display the X").defaultValue(defaultTileButton.showClose).deprecated({ version: "4.x", message: "use Menu and menuProps instead" }),
|
|
70
66
|
badge: import_ds_props_helpers.PropTypes.bool.description("It will display the badge").defaultValue(defaultTileButton.badge),
|
|
71
67
|
badgeColor: import_ds_props_helpers.PropTypes.oneOf(["blue", "green"]).description("Color badge: blue or green").defaultValue(defaultTileButton.badgeColor),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\nimport { Comments } from '@elliemae/ds-icons';\n\nexport declare namespace DSChatTileT {\n export interface
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAC1B,oBAAqB;AACrB,
|
|
4
|
+
"sourcesContent": ["import type React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\nimport { Comments, type SvgIconT } from '@elliemae/ds-icons';\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 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 }\n\n export interface OptionalProps {\n onBlur?: (e: React.ChangeEvent<HTMLButtonElement>) => void;\n onFocus?: (e: React.ChangeEvent<HTMLButtonElement>) => void;\n onClose?: (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;\n innerRef?: React.MutableRefObject<HTMLButtonElement> | ((_ref: HTMLButtonElement) => void);\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps {}\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};\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'),\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};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAC1B,oBAAqB;AACrB,sBAAwC;AA+CjC,MAAM,oBAA8C;AAAA,EACzD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OA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BAAkB,aAAa;AAAA,EAC/C,UAAU,kCAAU,KAAK,YAAY,6BAA6B,EAAE,aAAa,kBAAkB,QAAQ;AAAA,EAC3G,UAAU,kCAAU,KAAK,YAAY,sCAAsC,EAAE,aAAa,kBAAkB,QAAQ;AAAA,EACpH,UAAU,kCAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,kBAAkB,QAAQ;AAAA,EACzG,WAAW,kCAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,kBAAkB,SAAS;AAAA,EACxG,kBAAkB,kCAAU,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,kCAAU,KAAK,YAAY,wBAAwB,EAAE,aAAa,kBAAkB,cAAc;AAAA,EAClH,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,EAAE,SAAS,kCAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* 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.div<
|
|
4
|
+
"sourcesContent": ["/* 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.div<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 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[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 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 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 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: ${(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 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) {\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 `\n & ${StyledWrapperLeftBorder} {\n background: ${props.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
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,uBAAuB;AACvB,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,YAAY;AAAA,IACxB,KAAK;AACH,aAAO,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA,IACrC,KAAK;AACH,aAAO,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA,IACvC;AACE,aAAO,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA,EACvC;AACF;AAAA,IACE,CAAC,UAAU;AACX,UAAQ,MAAM,eAAe;AAAA,IAC3B,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH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G;AAAA;AAAA;AAAA,MAGnD;AAAA,eACS,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAAA;AAAA,IAIpD,CAAC,UAAU;AACX,MAAI,MAAM,UAAU;AAClB,WAAO;AAAA,YACD;AAAA,wBACY,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,EAGhD;AACA,SAAO;AACT;AAAA;AAGK,MAAM,oBAAgB,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,168 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var React = __toESM(require("react"));
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_lodash = require("lodash");
|
|
28
|
+
var import__ = require("../index.js");
|
|
29
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
30
|
+
const ref = (0, import_react.createRef)();
|
|
31
|
+
const testOptionalProps = {
|
|
32
|
+
onBlur: import_lodash.noop,
|
|
33
|
+
onFocus: import_lodash.noop,
|
|
34
|
+
onClose: import_lodash.noop,
|
|
35
|
+
innerRef: ref
|
|
36
|
+
};
|
|
37
|
+
const testPartialDefaults = {
|
|
38
|
+
Icon: import_ds_icons.Comments,
|
|
39
|
+
dsId: "id-1",
|
|
40
|
+
label: "AB",
|
|
41
|
+
title: "Title"
|
|
42
|
+
};
|
|
43
|
+
const testProps = {
|
|
44
|
+
...testOptionalProps,
|
|
45
|
+
...testPartialDefaults
|
|
46
|
+
};
|
|
47
|
+
const testPropsAsSyntax = {
|
|
48
|
+
...testOptionalProps,
|
|
49
|
+
...testPartialDefaults
|
|
50
|
+
};
|
|
51
|
+
const testCompleteDefaults = {
|
|
52
|
+
Icon: import_ds_icons.Comments,
|
|
53
|
+
dsId: "id-1",
|
|
54
|
+
label: "AB",
|
|
55
|
+
onClick: import_lodash.noop,
|
|
56
|
+
title: "Title",
|
|
57
|
+
showClose: false,
|
|
58
|
+
badge: false,
|
|
59
|
+
badgeColor: "blue",
|
|
60
|
+
badgePosition: "right",
|
|
61
|
+
disabled: false,
|
|
62
|
+
selected: false,
|
|
63
|
+
isHeader: false,
|
|
64
|
+
ariaLabel: "Tile button",
|
|
65
|
+
tooltipPlacement: "top",
|
|
66
|
+
disableTooltip: false
|
|
67
|
+
};
|
|
68
|
+
const testInternalProps = {
|
|
69
|
+
...testOptionalProps,
|
|
70
|
+
...testCompleteDefaults
|
|
71
|
+
};
|
|
72
|
+
const testInternalPropsAsSyntax = {
|
|
73
|
+
...testOptionalProps,
|
|
74
|
+
...testCompleteDefaults
|
|
75
|
+
};
|
|
76
|
+
const testExplicitDefinition = {
|
|
77
|
+
Icon: import_ds_icons.Comments,
|
|
78
|
+
dsId: "id-1",
|
|
79
|
+
label: "AB",
|
|
80
|
+
onClick: import_lodash.noop,
|
|
81
|
+
title: "Title",
|
|
82
|
+
showClose: false,
|
|
83
|
+
badge: false,
|
|
84
|
+
badgeColor: "blue",
|
|
85
|
+
badgePosition: "right",
|
|
86
|
+
disabled: false,
|
|
87
|
+
selected: false,
|
|
88
|
+
isHeader: false,
|
|
89
|
+
ariaLabel: "Tile button",
|
|
90
|
+
tooltipPlacement: "top",
|
|
91
|
+
disableTooltip: false,
|
|
92
|
+
onBlur: import_lodash.noop,
|
|
93
|
+
onFocus: import_lodash.noop,
|
|
94
|
+
onClose: import_lodash.noop,
|
|
95
|
+
innerRef: ref
|
|
96
|
+
};
|
|
97
|
+
const testInferedTypeCompatibility = {
|
|
98
|
+
Icon: import_ds_icons.Comments,
|
|
99
|
+
dsId: "id-1",
|
|
100
|
+
label: "AB",
|
|
101
|
+
onClick: import_lodash.noop,
|
|
102
|
+
title: "Title",
|
|
103
|
+
showClose: false,
|
|
104
|
+
badge: false,
|
|
105
|
+
badgeColor: "blue",
|
|
106
|
+
badgePosition: "right",
|
|
107
|
+
disabled: false,
|
|
108
|
+
selected: false,
|
|
109
|
+
isHeader: false,
|
|
110
|
+
ariaLabel: "Tile button",
|
|
111
|
+
tooltipPlacement: "top",
|
|
112
|
+
disableTooltip: false,
|
|
113
|
+
onBlur: import_lodash.noop,
|
|
114
|
+
onFocus: import_lodash.noop,
|
|
115
|
+
onClose: import_lodash.noop,
|
|
116
|
+
innerRef: ref
|
|
117
|
+
};
|
|
118
|
+
const testDefinitionAsConst = {
|
|
119
|
+
Icon: import_ds_icons.Comments,
|
|
120
|
+
dsId: "id-1",
|
|
121
|
+
label: "AB",
|
|
122
|
+
onClick: import_lodash.noop,
|
|
123
|
+
title: "Title",
|
|
124
|
+
showClose: false,
|
|
125
|
+
badge: false,
|
|
126
|
+
badgeColor: "blue",
|
|
127
|
+
badgePosition: "right",
|
|
128
|
+
disabled: false,
|
|
129
|
+
selected: false,
|
|
130
|
+
isHeader: false,
|
|
131
|
+
ariaLabel: "Tile button",
|
|
132
|
+
tooltipPlacement: "top",
|
|
133
|
+
disableTooltip: false,
|
|
134
|
+
onBlur: import_lodash.noop,
|
|
135
|
+
onFocus: import_lodash.noop,
|
|
136
|
+
onClose: import_lodash.noop,
|
|
137
|
+
innerRef: ref
|
|
138
|
+
};
|
|
139
|
+
const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
140
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.TileButton, { ...testExplicitDefinition }),
|
|
141
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.TileButton, { ...testInferedTypeCompatibility }),
|
|
142
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.TileButton, { ...testDefinitionAsConst }),
|
|
143
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
144
|
+
import__.TileButton,
|
|
145
|
+
{
|
|
146
|
+
Icon: import_ds_icons.Comments,
|
|
147
|
+
dsId: "id-1",
|
|
148
|
+
label: "AB",
|
|
149
|
+
onClick: import_lodash.noop,
|
|
150
|
+
title: "Title",
|
|
151
|
+
showClose: false,
|
|
152
|
+
badge: false,
|
|
153
|
+
badgeColor: "blue",
|
|
154
|
+
badgePosition: "right",
|
|
155
|
+
disabled: false,
|
|
156
|
+
selected: false,
|
|
157
|
+
isHeader: false,
|
|
158
|
+
ariaLabel: "Tile button",
|
|
159
|
+
tooltipPlacement: "top",
|
|
160
|
+
disableTooltip: false,
|
|
161
|
+
onBlur: import_lodash.noop,
|
|
162
|
+
onFocus: import_lodash.noop,
|
|
163
|
+
onClose: import_lodash.noop,
|
|
164
|
+
innerRef: ref
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
] });
|
|
168
|
+
//# sourceMappingURL=typescript-chat-card-valid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-chat-card-valid.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { noop } from 'lodash';\nimport { TileButton } from '../index.js';\nimport { Comments } from '@elliemae/ds-icons';\nimport type { DSChatTileT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSChatTileT.Props;\ntype ComponentPropsInternals = DSChatTileT.InternalProps;\ntype ComponentPropsDefaultProps = DSChatTileT.DefaultProps;\ntype ComponentPropsOptionalProps = DSChatTileT.OptionalProps;\n\nconst ref = createRef() as React.MutableRefObject<HTMLButtonElement> | ((_ref: HTMLButtonElement) => void);\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n onBlur: noop,\n onFocus: noop,\n onClose: noop,\n innerRef: ref,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n Icon: Comments,\n dsId: 'id-1',\n label: 'AB',\n title: 'Title',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n Icon: Comments,\n dsId: 'id-1',\n label: 'AB',\n onClick: noop,\n title: 'Title',\n showClose: false,\n badge: false,\n badgeColor: 'blue',\n badgePosition: 'right',\n disabled: false,\n selected: false,\n isHeader: false,\n ariaLabel: 'Tile button',\n tooltipPlacement: 'top',\n disableTooltip: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n Icon: Comments,\n dsId: 'id-1',\n label: 'AB',\n onClick: noop,\n title: 'Title',\n showClose: false,\n badge: false,\n badgeColor: 'blue',\n badgePosition: 'right',\n disabled: false,\n selected: false,\n isHeader: false,\n ariaLabel: 'Tile button',\n tooltipPlacement: 'top',\n disableTooltip: false,\n onBlur: noop,\n onFocus: noop,\n onClose: noop,\n innerRef: ref,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n Icon: Comments,\n dsId: 'id-1',\n label: 'AB',\n onClick: noop,\n title: 'Title',\n showClose: false,\n badge: false,\n badgeColor: 'blue',\n badgePosition: 'right',\n disabled: false,\n selected: false,\n isHeader: false,\n ariaLabel: 'Tile button',\n tooltipPlacement: 'top',\n disableTooltip: false,\n onBlur: noop,\n onFocus: noop,\n onClose: noop,\n innerRef: ref,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n Icon: Comments,\n dsId: 'id-1',\n label: 'AB',\n onClick: noop,\n title: 'Title',\n showClose: false,\n badge: false,\n badgeColor: 'blue',\n badgePosition: 'right',\n disabled: false,\n selected: false,\n isHeader: false,\n ariaLabel: 'Tile button',\n tooltipPlacement: 'top',\n disableTooltip: false,\n onBlur: noop,\n onFocus: noop,\n onClose: noop,\n innerRef: ref,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <TileButton {...testExplicitDefinition} />\n <TileButton {...testInferedTypeCompatibility} />\n <TileButton {...testDefinitionAsConst} />\n {/* works with inline values */}\n <TileButton\n Icon={Comments}\n dsId=\"id-1\"\n label=\"AB\"\n onClick={noop}\n title=\"Title\"\n showClose={false}\n badge={false}\n badgeColor=\"blue\"\n badgePosition=\"right\"\n disabled={false}\n selected={false}\n isHeader={false}\n ariaLabel=\"Tile button\"\n tooltipPlacement=\"top\"\n disableTooltip={false}\n onBlur={noop}\n onFocus={noop}\n onClose={noop}\n innerRef={ref}\n />\n </>\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC2IrB;AA1IF,mBAA0B;AAC1B,oBAAqB;AACrB,eAA2B;AAC3B,sBAAyB;AASzB,MAAM,UAAM,wBAAU;AAEtB,MAAM,oBAAiD;AAAA,EACrD,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,UAAU;AACZ;AAIA,MAAM,sBAA2D;AAAA,EAC/D,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AACT;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,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;AAClB;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS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AAS;AAAA,MACT,OAAM;AAAA,MACN,WAAW;AAAA,MACX,OAAO;AAAA,MACP,YAAW;AAAA,MACX,eAAc;AAAA,MACd,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,MACV,WAAU;AAAA,MACV,kBAAiB;AAAA,MACjB,gBAAgB;AAAA,MAChB,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,SAAS;AAAA,MACT,UAAU;AAAA;AAAA,EACZ;AAAA,GACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -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 { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\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.js';\nimport type { DSChatTileT } from './react-desc-prop-types.js';\nimport { propsTileButton, defaultTileButton } from './react-desc-prop-types.js';\nimport { DSChatTileButtonName } from './DSChatTileButtonDefinitions.js';\n\nconst TileButton: React.ComponentType<DSChatTileT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultTileButton);\n useValidateTypescriptPropTypes(propsWithDefault, propsTileButton, DSChatTileButtonName);\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 innerRef={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}`} aria-label=\"close\">\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 = DSChatTileButtonName;\nconst TileButtonWithSchema = describe(TileButton);\nTileButtonWithSchema.propTypes = propsTileButton as WeakValidationMap<unknown>;\n\nexport { TileButton, TileButtonWithSchema };\n"],
|
|
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 { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\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.js';\nimport type { DSChatTileT } from './react-desc-prop-types.js';\nimport { propsTileButton, defaultTileButton } from './react-desc-prop-types.js';\nimport { DSChatTileButtonName } from './DSChatTileButtonDefinitions.js';\n\nconst TileButton: React.ComponentType<DSChatTileT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatTileT.InternalProps>(props, defaultTileButton);\n useValidateTypescriptPropTypes(propsWithDefault, propsTileButton, DSChatTileButtonName);\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\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 innerRef={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}`} aria-label=\"close\">\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 = DSChatTileButtonName;\nconst TileButtonWithSchema = describe(TileButton);\nTileButtonWithSchema.propTypes = propsTileButton as WeakValidationMap<unknown>;\n\nexport { TileButton, TileButtonWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACwDb,SACE,KADF;AAtDV,OAAOA,YAAW;AAClB,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;AAEP,SAAS,iBAAiB,yBAAyB;AACnD,SAAS,4BAA4B;AAErC,MAAM,aAAqD,CAAC,UAAU;AACpE,QAAM,mBAAmB,6BAAwD,OAAO,iBAAiB;AACzG,iCAA+B,kBAAkB,iBAAiB,oBAAoB;AAEtF,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;AAEJ,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,+BAA4B,YAAY,WAAW,WAAW,QAC7D;AAAA,0BAAC,QAAK,OAAM,QAAO,YAAW,UAAS,gBAAe,UACpD,+BAAC,wBAAqB,YAAW,UAA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AAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU;AAChD,qBAAqB,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -7,10 +7,7 @@ const defaultTileButton = {
|
|
|
7
7
|
dsId: "",
|
|
8
8
|
label: "",
|
|
9
9
|
onClick: noop,
|
|
10
|
-
onBlur: noop,
|
|
11
|
-
onFocus: noop,
|
|
12
10
|
title: "",
|
|
13
|
-
onClose: noop,
|
|
14
11
|
showClose: false,
|
|
15
12
|
badge: false,
|
|
16
13
|
badgeColor: "blue",
|
|
@@ -20,8 +17,7 @@ const defaultTileButton = {
|
|
|
20
17
|
isHeader: false,
|
|
21
18
|
ariaLabel: "Tile button",
|
|
22
19
|
tooltipPlacement: "right",
|
|
23
|
-
disableTooltip: false
|
|
24
|
-
innerRef: noop
|
|
20
|
+
disableTooltip: false
|
|
25
21
|
};
|
|
26
22
|
const propsTileButton = {
|
|
27
23
|
Icon: PropTypes.func.description("Icon component").defaultValue(defaultTileButton.Icon),
|
|
@@ -29,9 +25,9 @@ const propsTileButton = {
|
|
|
29
25
|
label: PropTypes.string.description("It will display under the icon").defaultValue(defaultTileButton.label),
|
|
30
26
|
title: PropTypes.string.description("Tooltip").defaultValue(defaultTileButton.title),
|
|
31
27
|
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")
|
|
33
|
-
onBlur: PropTypes.func.description("The function to call when is on blur")
|
|
34
|
-
onClose: PropTypes.func.description("The function to call when the X is Clicked").
|
|
28
|
+
onFocus: PropTypes.func.description("The function to call when is focused"),
|
|
29
|
+
onBlur: PropTypes.func.description("The function to call when is on blur"),
|
|
30
|
+
onClose: PropTypes.func.description("The function to call when the X is Clicked").deprecated({ version: "4.x", message: "use Menu and menuProps instead" }),
|
|
35
31
|
showClose: PropTypes.bool.description("It will display the X").defaultValue(defaultTileButton.showClose).deprecated({ version: "4.x", message: "use Menu and menuProps instead" }),
|
|
36
32
|
badge: PropTypes.bool.description("It will display the badge").defaultValue(defaultTileButton.badge),
|
|
37
33
|
badgeColor: PropTypes.oneOf(["blue", "green"]).description("Color badge: blue or green").defaultValue(defaultTileButton.badgeColor),
|
|
@@ -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", "import type React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\nimport { Comments } from '@elliemae/ds-icons';\n\nexport declare namespace DSChatTileT {\n export interface
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\nimport { Comments, type SvgIconT } from '@elliemae/ds-icons';\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 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 }\n\n export interface OptionalProps {\n onBlur?: (e: React.ChangeEvent<HTMLButtonElement>) => void;\n onFocus?: (e: React.ChangeEvent<HTMLButtonElement>) => void;\n onClose?: (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;\n innerRef?: React.MutableRefObject<HTMLButtonElement> | ((_ref: HTMLButtonElement) => void);\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps {}\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};\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'),\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};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,gBAA+B;AA+CjC,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;AAClB;AAEO,MAAM,kBAAkB;AAAA,EAC7B,MAAM,UAAU,KAAK,YAAY,gBAAgB,EAAE,aAAa,kBAAkB,IAAI;AAAA,EACtF,MAAM,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAC3D,YAAY,0BAA0B,EACtC,aAAa,kBAAkB,IAAI;AAAA,EACtC,OAAO,UAAU,OAAO,YAAY,gCAAgC,EAAE,aAAa,kBAAkB,KAAK;AAAA,EAC1G,OAAO,UAAU,OAAO,YAAY,SAAS,EAAE,aAAa,kBAAkB,KAAK;AAAA,EACnF,SAAS,UAAU,KAAK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UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,EAAE,SAAS,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE;AAAA,IAC3F;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
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.div<
|
|
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.div<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 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[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 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 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 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: ${(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 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) {\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 `\n & ${StyledWrapperLeftBorder} {\n background: ${props.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
5
|
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,c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,GAAG;AAAA;AAAA;AAAA;AAAA,cAI1C,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA,QAE7C;AAAA,0BACkB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKnD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,MACvD;AAAA,oBACc,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA,QAEvD;AAAA,oBACY,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,0BACrC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA,MAE/D;AAAA;AAAA,gBAEU,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAAA,MAGnD;AAAA,eACS,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAAA;AAAA,IAIpD,CAAC,UAAU;AACX,MAAI,MAAM,UAAU;AAClB,WAAO;AAAA,YACD;AAAA,wBACY,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA,EAGhD;AACA,SAAO;AACT;AAAA;AAGK,MAAM,gBAAgB,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { createRef } from "react";
|
|
4
|
+
import { noop } from "lodash";
|
|
5
|
+
import { TileButton } from "../index.js";
|
|
6
|
+
import { Comments } from "@elliemae/ds-icons";
|
|
7
|
+
const ref = createRef();
|
|
8
|
+
const testOptionalProps = {
|
|
9
|
+
onBlur: noop,
|
|
10
|
+
onFocus: noop,
|
|
11
|
+
onClose: noop,
|
|
12
|
+
innerRef: ref
|
|
13
|
+
};
|
|
14
|
+
const testPartialDefaults = {
|
|
15
|
+
Icon: Comments,
|
|
16
|
+
dsId: "id-1",
|
|
17
|
+
label: "AB",
|
|
18
|
+
title: "Title"
|
|
19
|
+
};
|
|
20
|
+
const testProps = {
|
|
21
|
+
...testOptionalProps,
|
|
22
|
+
...testPartialDefaults
|
|
23
|
+
};
|
|
24
|
+
const testPropsAsSyntax = {
|
|
25
|
+
...testOptionalProps,
|
|
26
|
+
...testPartialDefaults
|
|
27
|
+
};
|
|
28
|
+
const testCompleteDefaults = {
|
|
29
|
+
Icon: Comments,
|
|
30
|
+
dsId: "id-1",
|
|
31
|
+
label: "AB",
|
|
32
|
+
onClick: noop,
|
|
33
|
+
title: "Title",
|
|
34
|
+
showClose: false,
|
|
35
|
+
badge: false,
|
|
36
|
+
badgeColor: "blue",
|
|
37
|
+
badgePosition: "right",
|
|
38
|
+
disabled: false,
|
|
39
|
+
selected: false,
|
|
40
|
+
isHeader: false,
|
|
41
|
+
ariaLabel: "Tile button",
|
|
42
|
+
tooltipPlacement: "top",
|
|
43
|
+
disableTooltip: false
|
|
44
|
+
};
|
|
45
|
+
const testInternalProps = {
|
|
46
|
+
...testOptionalProps,
|
|
47
|
+
...testCompleteDefaults
|
|
48
|
+
};
|
|
49
|
+
const testInternalPropsAsSyntax = {
|
|
50
|
+
...testOptionalProps,
|
|
51
|
+
...testCompleteDefaults
|
|
52
|
+
};
|
|
53
|
+
const testExplicitDefinition = {
|
|
54
|
+
Icon: Comments,
|
|
55
|
+
dsId: "id-1",
|
|
56
|
+
label: "AB",
|
|
57
|
+
onClick: noop,
|
|
58
|
+
title: "Title",
|
|
59
|
+
showClose: false,
|
|
60
|
+
badge: false,
|
|
61
|
+
badgeColor: "blue",
|
|
62
|
+
badgePosition: "right",
|
|
63
|
+
disabled: false,
|
|
64
|
+
selected: false,
|
|
65
|
+
isHeader: false,
|
|
66
|
+
ariaLabel: "Tile button",
|
|
67
|
+
tooltipPlacement: "top",
|
|
68
|
+
disableTooltip: false,
|
|
69
|
+
onBlur: noop,
|
|
70
|
+
onFocus: noop,
|
|
71
|
+
onClose: noop,
|
|
72
|
+
innerRef: ref
|
|
73
|
+
};
|
|
74
|
+
const testInferedTypeCompatibility = {
|
|
75
|
+
Icon: Comments,
|
|
76
|
+
dsId: "id-1",
|
|
77
|
+
label: "AB",
|
|
78
|
+
onClick: noop,
|
|
79
|
+
title: "Title",
|
|
80
|
+
showClose: false,
|
|
81
|
+
badge: false,
|
|
82
|
+
badgeColor: "blue",
|
|
83
|
+
badgePosition: "right",
|
|
84
|
+
disabled: false,
|
|
85
|
+
selected: false,
|
|
86
|
+
isHeader: false,
|
|
87
|
+
ariaLabel: "Tile button",
|
|
88
|
+
tooltipPlacement: "top",
|
|
89
|
+
disableTooltip: false,
|
|
90
|
+
onBlur: noop,
|
|
91
|
+
onFocus: noop,
|
|
92
|
+
onClose: noop,
|
|
93
|
+
innerRef: ref
|
|
94
|
+
};
|
|
95
|
+
const testDefinitionAsConst = {
|
|
96
|
+
Icon: Comments,
|
|
97
|
+
dsId: "id-1",
|
|
98
|
+
label: "AB",
|
|
99
|
+
onClick: noop,
|
|
100
|
+
title: "Title",
|
|
101
|
+
showClose: false,
|
|
102
|
+
badge: false,
|
|
103
|
+
badgeColor: "blue",
|
|
104
|
+
badgePosition: "right",
|
|
105
|
+
disabled: false,
|
|
106
|
+
selected: false,
|
|
107
|
+
isHeader: false,
|
|
108
|
+
ariaLabel: "Tile button",
|
|
109
|
+
tooltipPlacement: "top",
|
|
110
|
+
disableTooltip: false,
|
|
111
|
+
onBlur: noop,
|
|
112
|
+
onFocus: noop,
|
|
113
|
+
onClose: noop,
|
|
114
|
+
innerRef: ref
|
|
115
|
+
};
|
|
116
|
+
const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
117
|
+
/* @__PURE__ */ jsx(TileButton, { ...testExplicitDefinition }),
|
|
118
|
+
/* @__PURE__ */ jsx(TileButton, { ...testInferedTypeCompatibility }),
|
|
119
|
+
/* @__PURE__ */ jsx(TileButton, { ...testDefinitionAsConst }),
|
|
120
|
+
/* @__PURE__ */ jsx(
|
|
121
|
+
TileButton,
|
|
122
|
+
{
|
|
123
|
+
Icon: Comments,
|
|
124
|
+
dsId: "id-1",
|
|
125
|
+
label: "AB",
|
|
126
|
+
onClick: noop,
|
|
127
|
+
title: "Title",
|
|
128
|
+
showClose: false,
|
|
129
|
+
badge: false,
|
|
130
|
+
badgeColor: "blue",
|
|
131
|
+
badgePosition: "right",
|
|
132
|
+
disabled: false,
|
|
133
|
+
selected: false,
|
|
134
|
+
isHeader: false,
|
|
135
|
+
ariaLabel: "Tile button",
|
|
136
|
+
tooltipPlacement: "top",
|
|
137
|
+
disableTooltip: false,
|
|
138
|
+
onBlur: noop,
|
|
139
|
+
onFocus: noop,
|
|
140
|
+
onClose: noop,
|
|
141
|
+
innerRef: ref
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
] });
|
|
145
|
+
//# sourceMappingURL=typescript-chat-card-valid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-chat-card-valid.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { noop } from 'lodash';\nimport { TileButton } from '../index.js';\nimport { Comments } from '@elliemae/ds-icons';\nimport type { DSChatTileT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSChatTileT.Props;\ntype ComponentPropsInternals = DSChatTileT.InternalProps;\ntype ComponentPropsDefaultProps = DSChatTileT.DefaultProps;\ntype ComponentPropsOptionalProps = DSChatTileT.OptionalProps;\n\nconst ref = createRef() as React.MutableRefObject<HTMLButtonElement> | ((_ref: HTMLButtonElement) => void);\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n onBlur: noop,\n onFocus: noop,\n onClose: noop,\n innerRef: ref,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n Icon: Comments,\n dsId: 'id-1',\n label: 'AB',\n title: 'Title',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n Icon: Comments,\n dsId: 'id-1',\n label: 'AB',\n onClick: noop,\n title: 'Title',\n showClose: false,\n badge: false,\n badgeColor: 'blue',\n badgePosition: 'right',\n disabled: false,\n selected: false,\n isHeader: false,\n ariaLabel: 'Tile button',\n tooltipPlacement: 'top',\n disableTooltip: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n Icon: Comments,\n dsId: 'id-1',\n label: 'AB',\n onClick: noop,\n title: 'Title',\n showClose: false,\n badge: false,\n badgeColor: 'blue',\n badgePosition: 'right',\n disabled: false,\n selected: false,\n isHeader: false,\n ariaLabel: 'Tile button',\n tooltipPlacement: 'top',\n disableTooltip: false,\n onBlur: noop,\n onFocus: noop,\n onClose: noop,\n innerRef: ref,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n Icon: Comments,\n dsId: 'id-1',\n label: 'AB',\n onClick: noop,\n title: 'Title',\n showClose: false,\n badge: false,\n badgeColor: 'blue',\n badgePosition: 'right',\n disabled: false,\n selected: false,\n isHeader: false,\n ariaLabel: 'Tile button',\n tooltipPlacement: 'top',\n disableTooltip: false,\n onBlur: noop,\n onFocus: noop,\n onClose: noop,\n innerRef: ref,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n Icon: Comments,\n dsId: 'id-1',\n label: 'AB',\n onClick: noop,\n title: 'Title',\n showClose: false,\n badge: false,\n badgeColor: 'blue',\n badgePosition: 'right',\n disabled: false,\n selected: false,\n isHeader: false,\n ariaLabel: 'Tile button',\n tooltipPlacement: 'top',\n disableTooltip: false,\n onBlur: noop,\n onFocus: noop,\n onClose: noop,\n innerRef: ref,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <TileButton {...testExplicitDefinition} />\n <TileButton {...testInferedTypeCompatibility} />\n <TileButton {...testDefinitionAsConst} />\n {/* works with inline values */}\n <TileButton\n Icon={Comments}\n dsId=\"id-1\"\n label=\"AB\"\n onClick={noop}\n title=\"Title\"\n showClose={false}\n badge={false}\n badgeColor=\"blue\"\n badgePosition=\"right\"\n disabled={false}\n selected={false}\n isHeader={false}\n ariaLabel=\"Tile button\"\n tooltipPlacement=\"top\"\n disableTooltip={false}\n onBlur={noop}\n onFocus={noop}\n onClose={noop}\n innerRef={ref}\n />\n </>\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC2IrB,mBAEE,KAFF;AA1IF,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AASzB,MAAM,MAAM,UAAU;AAEtB,MAAM,oBAAiD;AAAA,EACrD,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,UAAU;AACZ;AAIA,MAAM,sBAA2D;AAAA,EAC/D,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AACT;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH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M;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,EAChB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,UAAU;AACZ;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,cAAY,GAAG,wBAAwB;AAAA,EACxC,oBAAC,cAAY,GAAG,8BAA8B;AAAA,EAC9C,oBAAC,cAAY,GAAG,uBAAuB;AAAA,EAEvC;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,MAAK;AAAA,MACL,OAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAM;AAAA,MACN,WAAW;AAAA,MACX,OAAO;AAAA,MACP,YAAW;AAAA,MACX,eAAc;AAAA,MACd,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,MACV,WAAU;AAAA,MACV,kBAAiB;AAAA,MACjB,gBAAgB;AAAA,MAChB,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,SAAS;AAAA,MACT,UAAU;AAAA;AAAA,EACZ;AAAA,GACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import { type SvgIconT } from '@elliemae/ds-icons';
|
|
2
3
|
export declare namespace DSChatTileT {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}>;
|
|
4
|
+
type TooltipPlacementT = 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
|
|
5
|
+
interface DefaultProps {
|
|
6
|
+
Icon: React.ComponentType<SvgIconT.Props>;
|
|
7
7
|
dsId: string | number;
|
|
8
8
|
label: string;
|
|
9
|
-
onClick
|
|
10
|
-
onBlur?: (e: React.ChangeEvent<HTMLButtonElement>) => void;
|
|
11
|
-
onFocus?: (e: React.ChangeEvent<HTMLButtonElement>) => void;
|
|
9
|
+
onClick: (dsId: string | number, label: string) => void;
|
|
12
10
|
title: string;
|
|
13
11
|
showClose: boolean;
|
|
14
|
-
onClose?: (dsId: string | number) => void;
|
|
15
12
|
badge: boolean;
|
|
16
13
|
badgeColor: 'blue' | 'green';
|
|
17
14
|
badgePosition: 'left' | 'right';
|
|
@@ -19,12 +16,21 @@ export declare namespace DSChatTileT {
|
|
|
19
16
|
selected: boolean;
|
|
20
17
|
isHeader: boolean;
|
|
21
18
|
ariaLabel: string;
|
|
22
|
-
tooltipPlacement:
|
|
19
|
+
tooltipPlacement: TooltipPlacementT;
|
|
23
20
|
disableTooltip: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface OptionalProps {
|
|
23
|
+
onBlur?: (e: React.ChangeEvent<HTMLButtonElement>) => void;
|
|
24
|
+
onFocus?: (e: React.ChangeEvent<HTMLButtonElement>) => void;
|
|
25
|
+
onClose?: (e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
24
26
|
innerRef?: React.MutableRefObject<HTMLButtonElement> | ((_ref: HTMLButtonElement) => void);
|
|
25
27
|
}
|
|
28
|
+
interface Props extends Partial<DefaultProps>, OptionalProps {
|
|
29
|
+
}
|
|
30
|
+
interface InternalProps extends DefaultProps, OptionalProps {
|
|
31
|
+
}
|
|
26
32
|
}
|
|
27
|
-
export declare const defaultTileButton: DSChatTileT.
|
|
33
|
+
export declare const defaultTileButton: DSChatTileT.DefaultProps;
|
|
28
34
|
export declare const propsTileButton: {
|
|
29
35
|
Icon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
30
36
|
dsId: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
package/dist/types/styled.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { DSChatTileT } from './react-desc-prop-types.js';
|
|
3
3
|
export declare const StyledWrapperLeftBorder: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
4
|
-
export declare const StyledStatusBadge: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme,
|
|
4
|
+
export declare const StyledStatusBadge: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, DSChatTileT.Props & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
5
5
|
export declare const StyledWrapperCentralContent: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
6
6
|
export declare const StyledTileButtonIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
7
7
|
export declare const StyledTileButtonLabel: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat-tile",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0-next.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat Tile",
|
|
6
6
|
"files": [
|
|
@@ -44,19 +44,19 @@
|
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public",
|
|
47
|
-
"typeSafety":
|
|
47
|
+
"typeSafety": true
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@elliemae/ds-grid": "3.
|
|
51
|
-
"@elliemae/ds-icons": "3.
|
|
52
|
-
"@elliemae/ds-props-helpers": "3.
|
|
53
|
-
"@elliemae/ds-system": "3.
|
|
54
|
-
"@elliemae/ds-tooltip": "3.
|
|
50
|
+
"@elliemae/ds-grid": "3.29.0-next.0",
|
|
51
|
+
"@elliemae/ds-icons": "3.29.0-next.0",
|
|
52
|
+
"@elliemae/ds-props-helpers": "3.29.0-next.0",
|
|
53
|
+
"@elliemae/ds-system": "3.29.0-next.0",
|
|
54
|
+
"@elliemae/ds-tooltip": "3.29.0-next.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
58
58
|
"styled-components": "~5.3.9",
|
|
59
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
59
|
+
"@elliemae/ds-monorepo-devops": "3.29.0-next.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"lodash": "^4.17.21",
|