@elliemae/ds-pills-v2 3.51.0-next.1 → 3.51.0-next.12
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/DSPillDefinitions.js +2 -2
- package/dist/cjs/DSPillDefinitions.js.map +1 -1
- package/dist/cjs/components/Pill.js +1 -0
- package/dist/cjs/components/Pill.js.map +2 -2
- package/dist/cjs/components/styled.js +18 -7
- package/dist/cjs/components/styled.js.map +2 -2
- package/dist/cjs/components/types/LabelOnlyPill.js +62 -0
- package/dist/cjs/components/types/LabelOnlyPill.js.map +7 -0
- package/dist/cjs/components/types/MenuButtonPill.js +2 -2
- package/dist/cjs/components/types/MenuButtonPill.js.map +1 -1
- package/dist/cjs/components/types/ReadOnlyPill.js +8 -6
- package/dist/cjs/components/types/ReadOnlyPill.js.map +2 -2
- package/dist/cjs/components/types/ValuePill.js +5 -2
- package/dist/cjs/components/types/ValuePill.js.map +2 -2
- package/dist/cjs/components/types/index.js +2 -0
- package/dist/cjs/components/types/index.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +21 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/typescript-pills-v2-valid.js +12 -1
- package/dist/cjs/typescript-testing/typescript-pills-v2-valid.js.map +2 -2
- package/dist/esm/DSPillDefinitions.js +2 -2
- package/dist/esm/DSPillDefinitions.js.map +1 -1
- package/dist/esm/components/Pill.js +2 -0
- package/dist/esm/components/Pill.js.map +2 -2
- package/dist/esm/components/styled.js +18 -7
- package/dist/esm/components/styled.js.map +2 -2
- package/dist/esm/components/types/LabelOnlyPill.js +32 -0
- package/dist/esm/components/types/LabelOnlyPill.js.map +7 -0
- package/dist/esm/components/types/MenuButtonPill.js +2 -2
- package/dist/esm/components/types/MenuButtonPill.js.map +1 -1
- package/dist/esm/components/types/ReadOnlyPill.js +8 -6
- package/dist/esm/components/types/ReadOnlyPill.js.map +2 -2
- package/dist/esm/components/types/ValuePill.js +5 -2
- package/dist/esm/components/types/ValuePill.js.map +2 -2
- package/dist/esm/components/types/index.js +2 -0
- package/dist/esm/components/types/index.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +21 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/typescript-pills-v2-valid.js +12 -1
- package/dist/esm/typescript-testing/typescript-pills-v2-valid.js.map +2 -2
- package/dist/types/DSPillDefinitions.d.ts +2 -2
- package/dist/types/components/styled.d.ts +8 -0
- package/dist/types/components/types/LabelOnlyPill.d.ts +3 -0
- package/dist/types/components/types/index.d.ts +1 -0
- package/dist/types/react-desc-prop-types.d.ts +6 -1
- package/package.json +16 -68
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/types/ValuePill.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport React from 'react';\nimport type { DSPillT } from '../../react-desc-prop-types.js';\nimport { TextComponent } from '../TextComponent.js';\nimport { StyledSpanWithTooltip, StyledValuePillWrapper } from '../styled.js';\n\nexport const ValuePill = React.memo<DSPillT.InternalProps>(\n ({\n label,\n size,\n labelTruncated,\n disabled,\n tooltipValue,\n iconLeft,\n ariaLabel,\n applyAriaDisabled,\n applyTooltipOverflowWrap,\n }) => (\n <StyledValuePillWrapper\n disabled={disabled}\n pillSize={size}\n alignItems=\"center\"\n className=\"ds-pill-wrapper ds-pill-wrapper-value\"\n data-testid=\"ds-pill-wrapper\"\n cols={[iconLeft && 'min-content', 'auto'].filter((notFalse) => notFalse) as string[]}\n gutter=\"xxxs\"\n hasIcon={iconLeft !== null}\n data-label={ariaLabel || label}\n applyAriaDisabled={applyAriaDisabled}\n >\n {iconLeft}\n {tooltipValue !== '' ? (\n <DSTooltipV3\n text={tooltipValue ?? ''}\n ariaLabel={tooltipValue ?? ''}\n applyTooltipOverflowWrap={applyTooltipOverflowWrap}\n >\n <StyledSpanWithTooltip className=\"ds-pill-tooltip-value\" aria-disabled={applyAriaDisabled} tabIndex={0}>\n {label}\n </StyledSpanWithTooltip>\n </DSTooltipV3>\n ) : (\n <TextComponent labelTruncated={labelTruncated} label={label} />\n )}\n </StyledValuePillWrapper>\n ),\n);\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport React from 'react';\nimport type { DSPillT } from '../../react-desc-prop-types.js';\nimport { TextComponent } from '../TextComponent.js';\nimport { StyledSpanWithTooltip, StyledValuePillWrapper } from '../styled.js';\n\nexport const ValuePill = React.memo<DSPillT.InternalProps>(\n ({\n label,\n size,\n labelTruncated,\n disabled,\n tooltipValue,\n iconLeft,\n ariaLabel,\n applyAriaDisabled,\n readOnly,\n applyTooltipOverflowWrap,\n trailingComma,\n }) => (\n <StyledValuePillWrapper\n disabled={disabled}\n pillSize={size}\n alignItems=\"center\"\n className=\"ds-pill-wrapper ds-pill-wrapper-value\"\n data-testid=\"ds-pill-wrapper\"\n cols={[iconLeft && 'min-content', 'auto'].filter((notFalse) => notFalse) as string[]}\n gutter=\"xxxs\"\n hasIcon={iconLeft !== null}\n data-label={ariaLabel || label}\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n >\n {iconLeft}\n {tooltipValue !== '' ? (\n <DSTooltipV3\n text={tooltipValue ?? ''}\n ariaLabel={tooltipValue ?? ''}\n applyTooltipOverflowWrap={applyTooltipOverflowWrap}\n >\n <StyledSpanWithTooltip className=\"ds-pill-tooltip-value\" aria-disabled={applyAriaDisabled} tabIndex={0}>\n {label}\n </StyledSpanWithTooltip>\n </DSTooltipV3>\n ) : (\n <TextComponent labelTruncated={labelTruncated} label={`${label}${trailingComma ? ',' : ''}`} />\n )}\n </StyledValuePillWrapper>\n ),\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACoBnB,SAoBM,KApBN;AApBJ,SAAS,mBAAmB;AAC5B,OAAOA,YAAW;AAElB,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB,8BAA8B;AAEvD,MAAM,YAAYA,OAAM;AAAA,EAC7B,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,UAAU;AAAA,MACV,YAAW;AAAA,MACX,WAAU;AAAA,MACV,eAAY;AAAA,MACZ,MAAM,CAAC,YAAY,eAAe,MAAM,EAAE,OAAO,CAAC,aAAa,QAAQ;AAAA,MACvE,QAAO;AAAA,MACP,SAAS,aAAa;AAAA,MACtB,cAAY,aAAa;AAAA,MACzB;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA,iBAAiB,KAChB;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,gBAAgB;AAAA,YACtB,WAAW,gBAAgB;AAAA,YAC3B;AAAA,YAEA,8BAAC,yBAAsB,WAAU,yBAAwB,iBAAe,mBAAmB,UAAU,GAClG,iBACH;AAAA;AAAA,QACF,IAEA,oBAAC,iBAAc,gBAAgC,OAAO,GAAG,KAAK,GAAG,gBAAgB,MAAM,EAAE,IAAI;AAAA;AAAA;AAAA,EAEjG;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -2,6 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { DropdownPill } from "./DropdownPill.js";
|
|
3
3
|
import { InputPill } from "./InputPill.js";
|
|
4
4
|
import { LabelPill } from "./LabelPill.js";
|
|
5
|
+
import { LabelOnlyPill } from "./LabelOnlyPill.js";
|
|
5
6
|
import { MenuButtonPill } from "./MenuButtonPill.js";
|
|
6
7
|
import { ReadOnlyPill } from "./ReadOnlyPill.js";
|
|
7
8
|
import { RemovablePill } from "./RemovablePill.js";
|
|
@@ -9,6 +10,7 @@ import { ValuePill } from "./ValuePill.js";
|
|
|
9
10
|
export {
|
|
10
11
|
DropdownPill,
|
|
11
12
|
InputPill,
|
|
13
|
+
LabelOnlyPill,
|
|
12
14
|
LabelPill,
|
|
13
15
|
MenuButtonPill,
|
|
14
16
|
ReadOnlyPill,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/types/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DropdownPill } from './DropdownPill.js';\nexport { InputPill } from './InputPill.js';\nexport { LabelPill } from './LabelPill.js';\nexport { MenuButtonPill } from './MenuButtonPill.js';\nexport { ReadOnlyPill } from './ReadOnlyPill.js';\nexport { RemovablePill } from './RemovablePill.js';\nexport { ValuePill } from './ValuePill.js';\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DropdownPill } from './DropdownPill.js';\nexport { InputPill } from './InputPill.js';\nexport { LabelPill } from './LabelPill.js';\nexport { LabelOnlyPill } from './LabelOnlyPill.js';\nexport { MenuButtonPill } from './MenuButtonPill.js';\nexport { ReadOnlyPill } from './ReadOnlyPill.js';\nexport { RemovablePill } from './RemovablePill.js';\nexport { ValuePill } from './ValuePill.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -6,6 +6,7 @@ const DSPillV2DefaultProps = {
|
|
|
6
6
|
innerRef: () => null,
|
|
7
7
|
disabled: false,
|
|
8
8
|
applyAriaDisabled: false,
|
|
9
|
+
readOnly: false,
|
|
9
10
|
applyTooltipOverflowWrap: false,
|
|
10
11
|
// turn on for > 25.1
|
|
11
12
|
hasError: false,
|
|
@@ -15,6 +16,7 @@ const DSPillV2DefaultProps = {
|
|
|
15
16
|
tooltipValue: "",
|
|
16
17
|
iconLeft: null,
|
|
17
18
|
IconLeft: null,
|
|
19
|
+
IconRight: null,
|
|
18
20
|
iconRight: null,
|
|
19
21
|
onRemove: () => null,
|
|
20
22
|
inputPlaceholder: "",
|
|
@@ -41,7 +43,16 @@ const DSPillGroupDefaultProps = {
|
|
|
41
43
|
width: "fit-content",
|
|
42
44
|
innerRef: () => null
|
|
43
45
|
};
|
|
44
|
-
const pillTypes = PropTypes.oneOf([
|
|
46
|
+
const pillTypes = PropTypes.oneOf([
|
|
47
|
+
"label",
|
|
48
|
+
"labelOnly",
|
|
49
|
+
"value",
|
|
50
|
+
"input",
|
|
51
|
+
"dropdown",
|
|
52
|
+
"removable",
|
|
53
|
+
"readonly",
|
|
54
|
+
"menubutton"
|
|
55
|
+
]);
|
|
45
56
|
const { children, ...menuButtonPropsPropTypes } = DSMenuButtonPropTypes;
|
|
46
57
|
const DSPillV2PropTypes = {
|
|
47
58
|
...globalAttributesPropTypes,
|
|
@@ -58,7 +69,11 @@ const DSPillV2PropTypes = {
|
|
|
58
69
|
message: "Use IconLeft instead for accessibility reasons"
|
|
59
70
|
}),
|
|
60
71
|
IconLeft: PropTypes.node.description("A component to show int the left of a label pill").defaultValue(null),
|
|
61
|
-
|
|
72
|
+
IconRight: PropTypes.node.description("A component to show in the right of a readonly pill").defaultValue(null),
|
|
73
|
+
iconRight: PropTypes.node.description("A component to show in the right of a readonly pill").defaultValue(null).deprecated({
|
|
74
|
+
version: "4.x",
|
|
75
|
+
message: "Use IconRight instead for accessibility reasons"
|
|
76
|
+
}),
|
|
62
77
|
onRemove: PropTypes.func.description("Callback triggered when removing a pill with the close icon").defaultValue(() => null),
|
|
63
78
|
inputPlaceholder: PropTypes.string.description("Placeholder for the input pill").defaultValue(""),
|
|
64
79
|
onInputChange: PropTypes.func.description("Callback triggered when user provides input to the input pill").defaultValue(() => null),
|
|
@@ -69,12 +84,16 @@ const DSPillV2PropTypes = {
|
|
|
69
84
|
applyAriaDisabled: PropTypes.bool.description(
|
|
70
85
|
"Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION."
|
|
71
86
|
).defaultValue(false),
|
|
87
|
+
readOnly: PropTypes.bool.description("Whether the Pill is in readonly state or not.").defaultValue(false),
|
|
72
88
|
applyTooltipOverflowWrap: PropTypes.bool.description(
|
|
73
89
|
"when a tooltip is present, the tooltip text may be too long to fit in the pill. If true, the tooltip will wrap to the next line using overflow-wrap"
|
|
74
90
|
).defaultValue(false),
|
|
75
91
|
hasError: PropTypes.bool.description("Whether the pill should be in an error state. Only for input pill").defaultValue(false),
|
|
76
92
|
inputRender: PropTypes.func.description("Custom render function for the input pill").defaultValue(`DSInput`),
|
|
77
93
|
menuButtonProps: PropTypes.shape(menuButtonPropsPropTypes).description("Props for the menu button pill").isRequiredIf((props) => props.type === "menubutton"),
|
|
94
|
+
trailingComma: PropTypes.bool.description(
|
|
95
|
+
"Whether the disabled/aria-disabled/readonly pill should include a trailing comma or not"
|
|
96
|
+
),
|
|
78
97
|
dropdownProps: PropTypes.object.description(
|
|
79
98
|
"Properties that will be used for the dropdown-menu. For accessibility reasons this is deprecated in favour of menuButtonProps"
|
|
80
99
|
).defaultValue({}).deprecated({ version: "25.3" }),
|
|
@@ -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", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { DSButtonT } from '@elliemae/ds-button-v2';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\nimport { DSInput } from '@elliemae/ds-form';\nimport { DSMenuButtonPropTypes, type DSMenuButtonT } from '@elliemae/ds-menu-button';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\n\nexport namespace DSPillT {\n export interface DefaultProps {\n innerRef: TypescriptHelpersT.AnyRef<HTMLElement>;\n disabled: boolean;\n applyAriaDisabled: boolean;\n applyTooltipOverflowWrap: boolean;\n hasError: boolean;\n ariaLabel: string;\n size: 'm' | 's';\n labelTruncated: boolean;\n tooltipValue: string;\n iconLeft: JSX.Element | null;\n IconLeft: React.ComponentType<{ label: string }> | null;\n iconRight: JSX.Element | null;\n onRemove: (e: React.KeyboardEvent | React.MouseEvent) => void;\n inputPlaceholder: string;\n onInputChange: (e: React.ChangeEvent<HTMLInputElement>, newValue: string) => void;\n onInputClear: (e: React.KeyboardEvent | React.MouseEvent) => void;\n inputWidth: number;\n inputRender: React.ComponentType<any>;\n dropdownProps: DSDropdownMenuT.Props;\n onDropdownClick: (e: React.KeyboardEvent | React.MouseEvent) => void;\n tabIndex: TypescriptHelpersT.WCAGTabIndex;\n }\n export interface OptionalProps {\n inputId?: string;\n menuButtonProps?: Omit<DSMenuButtonT.Props, 'children'>;\n }\n export interface RequiredProps {\n label: string;\n type: 'label' | 'value' | 'input' | 'dropdown' | 'removable' | 'readonly' | 'menubutton';\n }\n\n export interface Props\n extends RequiredProps,\n Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps\n >,\n XstyledProps {}\n\n export interface InternalProps\n extends RequiredProps,\n DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps\n >,\n XstyledProps {}\n\n export interface DSPillButtonDefaultPropsT {\n type: 'left' | 'right' | 'only';\n width: string;\n height: string;\n }\n export interface ButtonProps extends Omit<DSButtonT.Props, 'type' | 'buttonType' | 'isV3' | 'dsButtonRoot'> {\n type?: 'left' | 'right' | 'only';\n width?: string;\n height?: string;\n applyAriaDisabled?: boolean;\n }\n export interface InternalButtonProps\n extends Omit<DSButtonT.InternalProps, 'type' | 'buttonType' | 'isV3' | 'dsButtonRoot'> {\n type: 'left' | 'right' | 'only';\n width: string;\n height: string;\n applyAriaDisabled: boolean;\n }\n\n export interface DefaultGroupPropsT {\n width: string;\n innerRef: TypescriptHelpersT.AnyRef<HTMLDivElement>;\n }\n export interface GroupProps extends GlobalAttributesT {\n width?: string;\n innerRef?: TypescriptHelpersT.AnyRef<HTMLDivElement>;\n children: React.ReactNode;\n }\n export interface InternalGroupProps extends GlobalAttributesT {\n width: string;\n innerRef: TypescriptHelpersT.AnyRef<HTMLDivElement>;\n children: React.ReactNode;\n }\n}\n\nexport const DSPillV2DefaultProps: DSPillT.DefaultProps = {\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n applyTooltipOverflowWrap: false, // turn on for > 25.1\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n IconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n // TODO: remove DSInput in favor of V2\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n inputRender: DSInput,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n onDropdownClick: () => null,\n tabIndex: 0,\n};\n\nexport const DSPillButtonDefaultProps: DSPillT.DSPillButtonDefaultPropsT = {\n type: 'right',\n width: '100%',\n height: '100%',\n};\n\nexport const DSPillGroupDefaultProps: DSPillT.DefaultGroupPropsT = {\n width: 'fit-content',\n innerRef: () => null,\n};\n\nconst pillTypes = PropTypes.oneOf(['label', 'value', 'input', 'dropdown', 'removable', 'readonly', 'menubutton']);\n\n// children is embedded by the pill itself, forced to be a chevron pointing down by design\nconst { children, ...menuButtonPropsPropTypes } = DSMenuButtonPropTypes;\n\nexport const DSPillV2PropTypes: DSPropTypesSchema<DSPillT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n label: PropTypes.string.description('Label to show in the pill').isRequired,\n type: pillTypes.description('The type of pill that you want to render').isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the focuseable internal element of each pill (remove icons, inputs, dropdown, etc.)')\n .defaultValue(() => null),\n size: PropTypes.oneOf(['s', 'm']).description('Vertical pill size').defaultValue('m'),\n ariaLabel: PropTypes.string\n .description('Aria label for the pill. If not provided we will use the label')\n .defaultValue(''),\n labelTruncated: PropTypes.bool.description('Whether to truncate the pills label').defaultValue(true),\n tooltipValue: PropTypes.string.description('String to show as a tooltip in the value pill').defaultValue(''),\n iconLeft: PropTypes.node\n .description('A component to show int the left of a readonly pill')\n .defaultValue(null)\n .deprecated({\n version: '4.x',\n message: 'Use IconLeft instead for accessibility reasons',\n }),\n IconLeft: PropTypes.node.description('A component to show int the left of a label pill').defaultValue(null),\n iconRight: PropTypes.node.description('A component to show in the right of a readonly pill').defaultValue(null),\n onRemove: PropTypes.func\n .description('Callback triggered when removing a pill with the close icon')\n .defaultValue(() => null),\n inputPlaceholder: PropTypes.string.description('Placeholder for the input pill').defaultValue(''),\n onInputChange: PropTypes.func\n .description('Callback triggered when user provides input to the input pill')\n .defaultValue(() => null),\n onInputClear: PropTypes.func\n .description('Callback triggered when the user clears an input pill')\n .defaultValue(() => null),\n inputWidth: PropTypes.number.description('Width in pixels for the input tag in the input pill').defaultValue(150),\n inputId: PropTypes.string.description('ID for the input pill').defaultValue(undefined),\n disabled: PropTypes.bool\n .description('Whether the pill should be disabled. Only for value and removable pill')\n .defaultValue(false),\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 applyTooltipOverflowWrap: PropTypes.bool\n .description(\n 'when a tooltip is present, the tooltip text may be too long to fit in the pill. If true, the tooltip will wrap to the next line using overflow-wrap',\n )\n .defaultValue(false),\n hasError: PropTypes.bool\n .description('Whether the pill should be in an error state. Only for input pill')\n .defaultValue(false),\n inputRender: PropTypes.func.description('Custom render function for the input pill').defaultValue(`DSInput`),\n menuButtonProps: PropTypes.shape(menuButtonPropsPropTypes)\n .description('Props for the menu button pill')\n .isRequiredIf((props: DSPillT.Props) => props.type === 'menubutton'),\n dropdownProps: PropTypes.object\n .description(\n 'Properties that will be used for the dropdown-menu. For accessibility reasons this is deprecated in favour of menuButtonProps',\n )\n .defaultValue({})\n .deprecated({ version: '25.3' }),\n onDropdownClick: PropTypes.func\n .description(\n 'Callback when dropdown button is clicked or pressed. For accessibility reasons this is deprecated in favour of menuButtonProps',\n )\n .defaultValue(() => null)\n .deprecated({ version: '25.3' }),\n};\n\nexport const DSPillButtonPropTypes: DSPropTypesSchema<DSPillT.ButtonProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf(['only', 'left', 'right'])\n .description('The position in which this button will be placed. Only used for css styling internally')\n .defaultValue('right'),\n width: PropTypes.string.description('Width of the button').defaultValue('100%'),\n height: PropTypes.string.description('Height of the button').defaultValue('100%'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\n 'data-testid': PropTypes.string.description('root element data-testid'),\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\nexport const DSPillGroupPropTypes: DSPropTypesSchema<DSPillT.GroupProps> = {\n ...globalAttributesPropTypes,\n width: PropTypes.string.description('Width of the group').defaultValue('fit-content'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the pill group wrapper')\n .defaultValue(() => null),\n children: PropTypes.node.description('Pills to render in the group').isRequired,\n};\n\nexport const DSPillV2PropTypesSchema = DSPillV2PropTypes as unknown as ValidationMap<DSPillT.Props>;\n\nexport const DSPillButtonPropTypesSchema = DSPillButtonPropTypes as unknown as ValidationMap<DSPillT.ButtonProps>;\n\nexport const DSPillGroupPropTypesSchema = DSPillGroupPropTypes as unknown as ValidationMap<DSPillT.GroupProps>;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACIvB,SAAS,eAAe;AACxB,SAAS,6BAAiD;AAE1D,SAAS,WAAW,2BAA2B,wBAAwB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { DSButtonT } from '@elliemae/ds-button-v2';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\nimport { DSInput } from '@elliemae/ds-form';\nimport { DSMenuButtonPropTypes, type DSMenuButtonT } from '@elliemae/ds-menu-button';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\n\nexport namespace DSPillT {\n export interface DefaultProps {\n innerRef: TypescriptHelpersT.AnyRef<HTMLElement>;\n disabled: boolean;\n applyAriaDisabled: boolean;\n readOnly: boolean;\n applyTooltipOverflowWrap: boolean;\n hasError: boolean;\n ariaLabel: string;\n size: 'm' | 's';\n labelTruncated: boolean;\n tooltipValue: string;\n iconLeft: JSX.Element | null;\n IconLeft: React.ComponentType<{ label: string }> | null;\n IconRight: React.ComponentType<{ label: string }> | null;\n iconRight: JSX.Element | null;\n onRemove: (e: React.KeyboardEvent | React.MouseEvent) => void;\n inputPlaceholder: string;\n onInputChange: (e: React.ChangeEvent<HTMLInputElement>, newValue: string) => void;\n onInputClear: (e: React.KeyboardEvent | React.MouseEvent) => void;\n inputWidth: number;\n inputRender: React.ComponentType<any>;\n dropdownProps: DSDropdownMenuT.Props;\n onDropdownClick: (e: React.KeyboardEvent | React.MouseEvent) => void;\n tabIndex: TypescriptHelpersT.WCAGTabIndex;\n }\n export interface OptionalProps {\n inputId?: string;\n menuButtonProps?: Omit<DSMenuButtonT.Props, 'children'>;\n trailingComma?: boolean;\n }\n export interface RequiredProps {\n label: string;\n type: 'label' | 'labelOnly' | 'value' | 'input' | 'dropdown' | 'removable' | 'readonly' | 'menubutton';\n }\n\n export interface Props\n extends RequiredProps,\n Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps\n >,\n XstyledProps {}\n\n export interface InternalProps\n extends RequiredProps,\n DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps\n >,\n XstyledProps {}\n\n export interface DSPillButtonDefaultPropsT {\n type: 'left' | 'right' | 'only';\n width: string;\n height: string;\n }\n export interface ButtonProps extends Omit<DSButtonT.Props, 'type' | 'buttonType' | 'isV3' | 'dsButtonRoot'> {\n type?: 'left' | 'right' | 'only';\n width?: string;\n height?: string;\n applyAriaDisabled?: boolean;\n }\n export interface InternalButtonProps\n extends Omit<DSButtonT.InternalProps, 'type' | 'buttonType' | 'isV3' | 'dsButtonRoot'> {\n type: 'left' | 'right' | 'only';\n width: string;\n height: string;\n applyAriaDisabled: boolean;\n }\n\n export interface DefaultGroupPropsT {\n width: string;\n innerRef: TypescriptHelpersT.AnyRef<HTMLDivElement>;\n }\n export interface GroupProps extends GlobalAttributesT {\n width?: string;\n innerRef?: TypescriptHelpersT.AnyRef<HTMLDivElement>;\n children: React.ReactNode;\n }\n export interface InternalGroupProps extends GlobalAttributesT {\n width: string;\n innerRef: TypescriptHelpersT.AnyRef<HTMLDivElement>;\n children: React.ReactNode;\n }\n}\n\nexport const DSPillV2DefaultProps: DSPillT.DefaultProps = {\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n applyTooltipOverflowWrap: false, // turn on for > 25.1\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n IconLeft: null,\n IconRight: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n // TODO: remove DSInput in favor of V2\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n inputRender: DSInput,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n onDropdownClick: () => null,\n tabIndex: 0,\n};\n\nexport const DSPillButtonDefaultProps: DSPillT.DSPillButtonDefaultPropsT = {\n type: 'right',\n width: '100%',\n height: '100%',\n};\n\nexport const DSPillGroupDefaultProps: DSPillT.DefaultGroupPropsT = {\n width: 'fit-content',\n innerRef: () => null,\n};\n\nconst pillTypes = PropTypes.oneOf([\n 'label',\n 'labelOnly',\n 'value',\n 'input',\n 'dropdown',\n 'removable',\n 'readonly',\n 'menubutton',\n]);\n\n// children is embedded by the pill itself, forced to be a chevron pointing down by design\nconst { children, ...menuButtonPropsPropTypes } = DSMenuButtonPropTypes;\n\nexport const DSPillV2PropTypes: DSPropTypesSchema<DSPillT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n label: PropTypes.string.description('Label to show in the pill').isRequired,\n type: pillTypes.description('The type of pill that you want to render').isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the focuseable internal element of each pill (remove icons, inputs, dropdown, etc.)')\n .defaultValue(() => null),\n size: PropTypes.oneOf(['s', 'm']).description('Vertical pill size').defaultValue('m'),\n ariaLabel: PropTypes.string\n .description('Aria label for the pill. If not provided we will use the label')\n .defaultValue(''),\n labelTruncated: PropTypes.bool.description('Whether to truncate the pills label').defaultValue(true),\n tooltipValue: PropTypes.string.description('String to show as a tooltip in the value pill').defaultValue(''),\n iconLeft: PropTypes.node\n .description('A component to show int the left of a readonly pill')\n .defaultValue(null)\n .deprecated({\n version: '4.x',\n message: 'Use IconLeft instead for accessibility reasons',\n }),\n IconLeft: PropTypes.node.description('A component to show int the left of a label pill').defaultValue(null),\n IconRight: PropTypes.node.description('A component to show in the right of a readonly pill').defaultValue(null),\n iconRight: PropTypes.node\n .description('A component to show in the right of a readonly pill')\n .defaultValue(null)\n .deprecated({\n version: '4.x',\n message: 'Use IconRight instead for accessibility reasons',\n }),\n onRemove: PropTypes.func\n .description('Callback triggered when removing a pill with the close icon')\n .defaultValue(() => null),\n inputPlaceholder: PropTypes.string.description('Placeholder for the input pill').defaultValue(''),\n onInputChange: PropTypes.func\n .description('Callback triggered when user provides input to the input pill')\n .defaultValue(() => null),\n onInputClear: PropTypes.func\n .description('Callback triggered when the user clears an input pill')\n .defaultValue(() => null),\n inputWidth: PropTypes.number.description('Width in pixels for the input tag in the input pill').defaultValue(150),\n inputId: PropTypes.string.description('ID for the input pill').defaultValue(undefined),\n disabled: PropTypes.bool\n .description('Whether the pill should be disabled. Only for value and removable pill')\n .defaultValue(false),\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 readOnly: PropTypes.bool.description('Whether the Pill is in readonly state or not.').defaultValue(false),\n applyTooltipOverflowWrap: PropTypes.bool\n .description(\n 'when a tooltip is present, the tooltip text may be too long to fit in the pill. If true, the tooltip will wrap to the next line using overflow-wrap',\n )\n .defaultValue(false),\n hasError: PropTypes.bool\n .description('Whether the pill should be in an error state. Only for input pill')\n .defaultValue(false),\n inputRender: PropTypes.func.description('Custom render function for the input pill').defaultValue(`DSInput`),\n menuButtonProps: PropTypes.shape(menuButtonPropsPropTypes)\n .description('Props for the menu button pill')\n .isRequiredIf((props: DSPillT.Props) => props.type === 'menubutton'),\n trailingComma: PropTypes.bool.description(\n 'Whether the disabled/aria-disabled/readonly pill should include a trailing comma or not',\n ),\n dropdownProps: PropTypes.object\n .description(\n 'Properties that will be used for the dropdown-menu. For accessibility reasons this is deprecated in favour of menuButtonProps',\n )\n .defaultValue({})\n .deprecated({ version: '25.3' }),\n onDropdownClick: PropTypes.func\n .description(\n 'Callback when dropdown button is clicked or pressed. For accessibility reasons this is deprecated in favour of menuButtonProps',\n )\n .defaultValue(() => null)\n .deprecated({ version: '25.3' }),\n};\n\nexport const DSPillButtonPropTypes: DSPropTypesSchema<DSPillT.ButtonProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf(['only', 'left', 'right'])\n .description('The position in which this button will be placed. Only used for css styling internally')\n .defaultValue('right'),\n width: PropTypes.string.description('Width of the button').defaultValue('100%'),\n height: PropTypes.string.description('Height of the button').defaultValue('100%'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\n 'data-testid': PropTypes.string.description('root element data-testid'),\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\nexport const DSPillGroupPropTypes: DSPropTypesSchema<DSPillT.GroupProps> = {\n ...globalAttributesPropTypes,\n width: PropTypes.string.description('Width of the group').defaultValue('fit-content'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n .description('Reference to the pill group wrapper')\n .defaultValue(() => null),\n children: PropTypes.node.description('Pills to render in the group').isRequired,\n};\n\nexport const DSPillV2PropTypesSchema = DSPillV2PropTypes as unknown as ValidationMap<DSPillT.Props>;\n\nexport const DSPillButtonPropTypesSchema = DSPillButtonPropTypes as unknown as ValidationMap<DSPillT.ButtonProps>;\n\nexport const DSPillGroupPropTypesSchema = DSPillGroupPropTypes as unknown as ValidationMap<DSPillT.GroupProps>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACIvB,SAAS,eAAe;AACxB,SAAS,6BAAiD;AAE1D,SAAS,WAAW,2BAA2B,wBAAwB;AA8FhE,MAAM,uBAA6C;AAAA,EACxD,UAAU,MAAM;AAAA,EAChB,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,UAAU;AAAA,EACV,0BAA0B;AAAA;AAAA,EAC1B,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW;AAAA,EACX,UAAU,MAAM;AAAA,EAChB,kBAAkB;AAAA,EAClB,eAAe,MAAM;AAAA,EACrB,cAAc,MAAM;AAAA,EACpB,YAAY;AAAA;AAAA;AAAA,EAGZ,aAAa;AAAA,EACb,eAAe;AAAA,IACb,SAAS,CAAC;AAAA,IACV,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AAAA,EACA,iBAAiB,MAAM;AAAA,EACvB,UAAU;AACZ;AAEO,MAAM,2BAA8D;AAAA,EACzE,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AACV;AAEO,MAAM,0BAAsD;AAAA,EACjE,OAAO;AAAA,EAC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AA,EACvB,OAAO,UAAU,OAAO,YAAY,qBAAqB,EAAE,aAAa,MAAM;AAAA,EAC9E,QAAQ,UAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,MAAM;AAAA,EAChF,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,CAAC,EAAE,YAAY,gCAAgC;AAAA,EAC9G,eAAe,UAAU,OAAO,YAAY,0BAA0B;AAAA,EACtE,mBAAmB,UAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AACvB;AAEO,MAAM,uBAA8D;AAAA,EACzE,GAAG;AAAA,EACH,OAAO,UAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,aAAa;AAAA,EACpF,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,CAAC,EAC7D,YAAY,qCAAqC,EACjD,aAAa,MAAM,IAAI;AAAA,EAC1B,UAAU,UAAU,KAAK,YAAY,8BAA8B,EAAE;AACvE;AAEO,MAAM,0BAA0B;AAEhC,MAAM,8BAA8B;AAEpC,MAAM,6BAA6B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -14,7 +14,8 @@ const testOptionalProps = {
|
|
|
14
14
|
},
|
|
15
15
|
onActivateItem: () => {
|
|
16
16
|
}
|
|
17
|
-
}
|
|
17
|
+
},
|
|
18
|
+
trailingComma: true
|
|
18
19
|
};
|
|
19
20
|
const testPartialDefaults = {
|
|
20
21
|
innerRef: () => null,
|
|
@@ -44,6 +45,7 @@ const testCompleteDefaults = {
|
|
|
44
45
|
innerRef: () => null,
|
|
45
46
|
disabled: false,
|
|
46
47
|
applyAriaDisabled: false,
|
|
48
|
+
readOnly: false,
|
|
47
49
|
hasError: false,
|
|
48
50
|
ariaLabel: "",
|
|
49
51
|
size: "m",
|
|
@@ -52,6 +54,7 @@ const testCompleteDefaults = {
|
|
|
52
54
|
iconLeft: null,
|
|
53
55
|
iconRight: null,
|
|
54
56
|
IconLeft: () => null,
|
|
57
|
+
IconRight: () => null,
|
|
55
58
|
onRemove: () => null,
|
|
56
59
|
inputPlaceholder: "",
|
|
57
60
|
onInputChange: () => null,
|
|
@@ -84,6 +87,7 @@ const testExplicitDefinition = {
|
|
|
84
87
|
innerRef: () => null,
|
|
85
88
|
disabled: false,
|
|
86
89
|
applyAriaDisabled: false,
|
|
90
|
+
readOnly: false,
|
|
87
91
|
hasError: false,
|
|
88
92
|
ariaLabel: "",
|
|
89
93
|
size: "m",
|
|
@@ -102,6 +106,7 @@ const testExplicitDefinition = {
|
|
|
102
106
|
isSkeleton: false,
|
|
103
107
|
isOpened: false
|
|
104
108
|
},
|
|
109
|
+
trailingComma: false,
|
|
105
110
|
onDropdownClick: () => null,
|
|
106
111
|
tabIndex: 0
|
|
107
112
|
};
|
|
@@ -112,6 +117,7 @@ const testInferedTypeCompatibility = {
|
|
|
112
117
|
innerRef: () => null,
|
|
113
118
|
disabled: false,
|
|
114
119
|
applyAriaDisabled: false,
|
|
120
|
+
readOnly: false,
|
|
115
121
|
hasError: false,
|
|
116
122
|
ariaLabel: "",
|
|
117
123
|
size: "m",
|
|
@@ -130,6 +136,7 @@ const testInferedTypeCompatibility = {
|
|
|
130
136
|
isSkeleton: false,
|
|
131
137
|
isOpened: false
|
|
132
138
|
},
|
|
139
|
+
trailingComma: false,
|
|
133
140
|
onDropdownClick: () => null,
|
|
134
141
|
tabIndex: 0
|
|
135
142
|
};
|
|
@@ -140,6 +147,7 @@ const testDefinitionAsConst = {
|
|
|
140
147
|
innerRef: () => null,
|
|
141
148
|
disabled: false,
|
|
142
149
|
applyAriaDisabled: false,
|
|
150
|
+
readOnly: false,
|
|
143
151
|
hasError: false,
|
|
144
152
|
ariaLabel: "",
|
|
145
153
|
size: "m",
|
|
@@ -158,6 +166,7 @@ const testDefinitionAsConst = {
|
|
|
158
166
|
isSkeleton: false,
|
|
159
167
|
isOpened: false
|
|
160
168
|
},
|
|
169
|
+
trailingComma: false,
|
|
161
170
|
onDropdownClick: () => null,
|
|
162
171
|
tabIndex: 0
|
|
163
172
|
};
|
|
@@ -174,6 +183,7 @@ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
|
174
183
|
innerRef: () => null,
|
|
175
184
|
disabled: false,
|
|
176
185
|
applyAriaDisabled: false,
|
|
186
|
+
readOnly: false,
|
|
177
187
|
hasError: false,
|
|
178
188
|
ariaLabel: "",
|
|
179
189
|
size: "m",
|
|
@@ -191,6 +201,7 @@ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
|
191
201
|
isSkeleton: false,
|
|
192
202
|
isOpened: false
|
|
193
203
|
},
|
|
204
|
+
trailingComma: false,
|
|
194
205
|
onDropdownClick: () => null,
|
|
195
206
|
tabIndex: 0,
|
|
196
207
|
children: "Button Label"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-pills-v2-valid.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSPillV2 } from '../index.js';\nimport type { DSPillT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSPillT.Props;\ntype ComponentPropsInternals = DSPillT.InternalProps;\ntype ComponentPropsDefaultProps = DSPillT.DefaultProps;\ntype ComponentPropsOptionalProps = DSPillT.OptionalProps;\ntype ComponentPropsRequiredProps = DSPillT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n type: 'value',\n label: 'label',\n};\nconst testOptionalProps: Required<ComponentPropsOptionalProps> = {\n inputId: 'dsId',\n menuButtonProps: {\n options: [],\n selectedItems: [],\n onItemSelected: () => {},\n onActivateItem: () => {},\n },\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 innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n ariaLabel: '',\n size: 'm',\n tooltipValue: '',\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n inputWidth: 72,\n onDropdownClick: () => null,\n tabIndex: 0,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n IconLeft: () => null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n onDropdownClick: () => null,\n tabIndex: 0,\n applyTooltipOverflowWrap: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\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 type: 'value',\n label: 'label',\n inputId: 'dsId',\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n onDropdownClick: () => null,\n tabIndex: 0,\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 type: 'value',\n label: 'label',\n inputId: 'dsId',\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n onDropdownClick: () => null,\n tabIndex: 0,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n type: 'value',\n label: 'label',\n inputId: 'dsId',\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n onDropdownClick: () => null,\n tabIndex: 0,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSPillV2 {...testExplicitDefinition} />\n <DSPillV2 {...testInferedTypeCompatibility} />\n <DSPillV2 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSPillV2\n type=\"value\"\n label=\"label\"\n inputId=\"dsId\"\n innerRef={() => null}\n disabled={false}\n applyAriaDisabled={false}\n hasError={false}\n ariaLabel=\"\"\n size=\"m\"\n labelTruncated\n tooltipValue=\"\"\n iconLeft={null}\n iconRight={null}\n onRemove={() => null}\n inputPlaceholder=\"\"\n onInputChange={() => null}\n onInputClear={() => null}\n inputWidth={72}\n // inputRender={() => <input type=\"text\"></input>}\n dropdownProps={{\n options: [],\n isSkeleton: false,\n isOpened: false,\n }}\n onDropdownClick={() => null}\n tabIndex={0}\n >\n Button Label\n </DSPillV2>\n </>\n);\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSPillV2 } from '../index.js';\nimport type { DSPillT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSPillT.Props;\ntype ComponentPropsInternals = DSPillT.InternalProps;\ntype ComponentPropsDefaultProps = DSPillT.DefaultProps;\ntype ComponentPropsOptionalProps = DSPillT.OptionalProps;\ntype ComponentPropsRequiredProps = DSPillT.RequiredProps;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n type: 'value',\n label: 'label',\n};\nconst testOptionalProps: Required<ComponentPropsOptionalProps> = {\n inputId: 'dsId',\n menuButtonProps: {\n options: [],\n selectedItems: [],\n onItemSelected: () => {},\n onActivateItem: () => {},\n },\n trailingComma: true,\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 innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n ariaLabel: '',\n size: 'm',\n tooltipValue: '',\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n inputWidth: 72,\n onDropdownClick: () => null,\n tabIndex: 0,\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n IconLeft: () => null,\n IconRight: () => null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n onDropdownClick: () => null,\n tabIndex: 0,\n applyTooltipOverflowWrap: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\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 type: 'value',\n label: 'label',\n inputId: 'dsId',\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n trailingComma: false,\n onDropdownClick: () => null,\n tabIndex: 0,\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 type: 'value',\n label: 'label',\n inputId: 'dsId',\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n trailingComma: false,\n onDropdownClick: () => null,\n tabIndex: 0,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n type: 'value',\n label: 'label',\n inputId: 'dsId',\n innerRef: () => null,\n disabled: false,\n applyAriaDisabled: false,\n readOnly: false,\n hasError: false,\n ariaLabel: '',\n size: 'm',\n labelTruncated: true,\n tooltipValue: '',\n iconLeft: null,\n iconRight: null,\n onRemove: () => null,\n inputPlaceholder: '',\n onInputChange: () => null,\n onInputClear: () => null,\n inputWidth: 72,\n inputRender: () => <input type=\"text\"></input>,\n dropdownProps: {\n options: [],\n isSkeleton: false,\n isOpened: false,\n },\n trailingComma: false,\n onDropdownClick: () => null,\n tabIndex: 0,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSPillV2 {...testExplicitDefinition} />\n <DSPillV2 {...testInferedTypeCompatibility} />\n <DSPillV2 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSPillV2\n type=\"value\"\n label=\"label\"\n inputId=\"dsId\"\n innerRef={() => null}\n disabled={false}\n applyAriaDisabled={false}\n readOnly={false}\n hasError={false}\n ariaLabel=\"\"\n size=\"m\"\n labelTruncated\n tooltipValue=\"\"\n iconLeft={null}\n iconRight={null}\n onRemove={() => null}\n inputPlaceholder=\"\"\n onInputChange={() => null}\n onInputClear={() => null}\n inputWidth={72}\n // inputRender={() => <input type=\"text\"></input>}\n dropdownProps={{\n options: [],\n isSkeleton: false,\n isOpened: false,\n }}\n trailingComma={false}\n onDropdownClick={() => null}\n tabIndex={0}\n >\n Button Label\n </DSPillV2>\n </>\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC4EF,SAuHnB,UAvHmB,KA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kBAAiB;AAAA,MACjB,eAAe,MAAM;AAAA,MACrB,cAAc,MAAM;AAAA,MACpB,YAAY;AAAA,MAEZ,eAAe;AAAA,QACb,SAAS,CAAC;AAAA,QACV,YAAY;AAAA,QACZ,UAAU;AAAA,MACZ;AAAA,MACA,eAAe;AAAA,MACf,iBAAiB,MAAM;AAAA,MACvB,UAAU;AAAA,MACX;AAAA;AAAA,EAED;AAAA,GACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const DSPillName = "DSPill";
|
|
2
|
-
export declare const DSPillButtonName = "
|
|
3
|
-
export declare const DSPillGroupName = "
|
|
2
|
+
export declare const DSPillButtonName = "DSPillbutton";
|
|
3
|
+
export declare const DSPillGroupName = "DSPillgroup";
|
|
@@ -7,6 +7,7 @@ export declare const borderOutside: ({ color, size, zIndex, borderRadius, }: {
|
|
|
7
7
|
}) => import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<{
|
|
8
8
|
disabled?: boolean | undefined;
|
|
9
9
|
applyAriaDisabled?: boolean | undefined;
|
|
10
|
+
readOnly?: boolean | undefined;
|
|
10
11
|
}, import("@xstyled/styled-components").Theme>>;
|
|
11
12
|
interface InputPillWrapperProps {
|
|
12
13
|
value: string;
|
|
@@ -19,6 +20,13 @@ interface InputPillWrapperProps {
|
|
|
19
20
|
export declare const StyledLabelPillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, {
|
|
20
21
|
pillSize: 'm' | 's';
|
|
21
22
|
hasIcon: boolean;
|
|
23
|
+
applyAriaDisabled?: boolean | undefined;
|
|
24
|
+
readOnly?: boolean | undefined;
|
|
25
|
+
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
26
|
+
export declare const StyledLabelOnlyPillWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, {
|
|
27
|
+
pillSize: 'm' | 's';
|
|
28
|
+
hasIcon: boolean;
|
|
29
|
+
applyAriaDisabled?: boolean | undefined;
|
|
22
30
|
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
23
31
|
type StyledValuePillWrapperPropsT = {
|
|
24
32
|
pillSize: 'm' | 's';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { DropdownPill } from './DropdownPill.js';
|
|
2
2
|
export { InputPill } from './InputPill.js';
|
|
3
3
|
export { LabelPill } from './LabelPill.js';
|
|
4
|
+
export { LabelOnlyPill } from './LabelOnlyPill.js';
|
|
4
5
|
export { MenuButtonPill } from './MenuButtonPill.js';
|
|
5
6
|
export { ReadOnlyPill } from './ReadOnlyPill.js';
|
|
6
7
|
export { RemovablePill } from './RemovablePill.js';
|
|
@@ -10,6 +10,7 @@ export declare namespace DSPillT {
|
|
|
10
10
|
innerRef: TypescriptHelpersT.AnyRef<HTMLElement>;
|
|
11
11
|
disabled: boolean;
|
|
12
12
|
applyAriaDisabled: boolean;
|
|
13
|
+
readOnly: boolean;
|
|
13
14
|
applyTooltipOverflowWrap: boolean;
|
|
14
15
|
hasError: boolean;
|
|
15
16
|
ariaLabel: string;
|
|
@@ -20,6 +21,9 @@ export declare namespace DSPillT {
|
|
|
20
21
|
IconLeft: React.ComponentType<{
|
|
21
22
|
label: string;
|
|
22
23
|
}> | null;
|
|
24
|
+
IconRight: React.ComponentType<{
|
|
25
|
+
label: string;
|
|
26
|
+
}> | null;
|
|
23
27
|
iconRight: JSX.Element | null;
|
|
24
28
|
onRemove: (e: React.KeyboardEvent | React.MouseEvent) => void;
|
|
25
29
|
inputPlaceholder: string;
|
|
@@ -34,10 +38,11 @@ export declare namespace DSPillT {
|
|
|
34
38
|
interface OptionalProps {
|
|
35
39
|
inputId?: string;
|
|
36
40
|
menuButtonProps?: Omit<DSMenuButtonT.Props, 'children'>;
|
|
41
|
+
trailingComma?: boolean;
|
|
37
42
|
}
|
|
38
43
|
interface RequiredProps {
|
|
39
44
|
label: string;
|
|
40
|
-
type: 'label' | 'value' | 'input' | 'dropdown' | 'removable' | 'readonly' | 'menubutton';
|
|
45
|
+
type: 'label' | 'labelOnly' | 'value' | 'input' | 'dropdown' | 'removable' | 'readonly' | 'menubutton';
|
|
41
46
|
}
|
|
42
47
|
interface Props extends RequiredProps, Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof RequiredProps | keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>, XstyledProps {
|
|
43
48
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-pills-v2",
|
|
3
|
-
"version": "3.51.0-next.
|
|
3
|
+
"version": "3.51.0-next.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Pills V2",
|
|
6
6
|
"files": [
|
|
@@ -14,58 +14,6 @@
|
|
|
14
14
|
"types": "./dist/types/index.d.ts",
|
|
15
15
|
"import": "./dist/esm/index.js",
|
|
16
16
|
"require": "./dist/cjs/index.js"
|
|
17
|
-
},
|
|
18
|
-
"./props": {
|
|
19
|
-
"import": "./dist/esm/props.js",
|
|
20
|
-
"require": "./dist/cjs/props.js"
|
|
21
|
-
},
|
|
22
|
-
"./components/types/ValuePill": {
|
|
23
|
-
"import": "./dist/esm/components/types/ValuePill.js",
|
|
24
|
-
"require": "./dist/cjs/components/types/ValuePill.js"
|
|
25
|
-
},
|
|
26
|
-
"./components/types/RemovablePill": {
|
|
27
|
-
"import": "./dist/esm/components/types/RemovablePill.js",
|
|
28
|
-
"require": "./dist/cjs/components/types/RemovablePill.js"
|
|
29
|
-
},
|
|
30
|
-
"./components/types/ReadOnlyPill": {
|
|
31
|
-
"import": "./dist/esm/components/types/ReadOnlyPill.js",
|
|
32
|
-
"require": "./dist/cjs/components/types/ReadOnlyPill.js"
|
|
33
|
-
},
|
|
34
|
-
"./components/types/LabelPill": {
|
|
35
|
-
"import": "./dist/esm/components/types/LabelPill.js",
|
|
36
|
-
"require": "./dist/cjs/components/types/LabelPill.js"
|
|
37
|
-
},
|
|
38
|
-
"./components/types/InputPill": {
|
|
39
|
-
"import": "./dist/esm/components/types/InputPill.js",
|
|
40
|
-
"require": "./dist/cjs/components/types/InputPill.js"
|
|
41
|
-
},
|
|
42
|
-
"./components/types": {
|
|
43
|
-
"import": "./dist/esm/components/types/index.js",
|
|
44
|
-
"require": "./dist/cjs/components/types/index.js"
|
|
45
|
-
},
|
|
46
|
-
"./components/types/DropdownPill": {
|
|
47
|
-
"import": "./dist/esm/components/types/DropdownPill.js",
|
|
48
|
-
"require": "./dist/cjs/components/types/DropdownPill.js"
|
|
49
|
-
},
|
|
50
|
-
"./components/styled": {
|
|
51
|
-
"import": "./dist/esm/components/styled.js",
|
|
52
|
-
"require": "./dist/cjs/components/styled.js"
|
|
53
|
-
},
|
|
54
|
-
"./components/PillGroup": {
|
|
55
|
-
"import": "./dist/esm/components/PillGroup.js",
|
|
56
|
-
"require": "./dist/cjs/components/PillGroup.js"
|
|
57
|
-
},
|
|
58
|
-
"./components/PillButton": {
|
|
59
|
-
"import": "./dist/esm/components/PillButton.js",
|
|
60
|
-
"require": "./dist/cjs/components/PillButton.js"
|
|
61
|
-
},
|
|
62
|
-
"./components/Pill": {
|
|
63
|
-
"import": "./dist/esm/components/Pill.js",
|
|
64
|
-
"require": "./dist/cjs/components/Pill.js"
|
|
65
|
-
},
|
|
66
|
-
"./components": {
|
|
67
|
-
"import": "./dist/esm/components/index.js",
|
|
68
|
-
"require": "./dist/cjs/components/index.js"
|
|
69
17
|
}
|
|
70
18
|
},
|
|
71
19
|
"sideEffects": [
|
|
@@ -77,8 +25,8 @@
|
|
|
77
25
|
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
78
26
|
},
|
|
79
27
|
"engines": {
|
|
80
|
-
"pnpm": ">=
|
|
81
|
-
"node": ">=
|
|
28
|
+
"pnpm": ">=9",
|
|
29
|
+
"node": ">=22"
|
|
82
30
|
},
|
|
83
31
|
"author": "ICE MT",
|
|
84
32
|
"jestSonar": {
|
|
@@ -89,23 +37,23 @@
|
|
|
89
37
|
},
|
|
90
38
|
"dependencies": {
|
|
91
39
|
"uid": "~2.0.1",
|
|
92
|
-
"@elliemae/ds-button-v2": "3.51.0-next.
|
|
93
|
-
"@elliemae/ds-dropdownmenu-v2": "3.51.0-next.
|
|
94
|
-
"@elliemae/ds-form": "3.51.0-next.
|
|
95
|
-
"@elliemae/ds-grid": "3.51.0-next.
|
|
96
|
-
"@elliemae/ds-
|
|
97
|
-
"@elliemae/ds-
|
|
98
|
-
"@elliemae/ds-
|
|
99
|
-
"@elliemae/ds-system": "3.51.0-next.
|
|
100
|
-
"@elliemae/ds-tooltip-v3": "3.51.0-next.
|
|
101
|
-
"@elliemae/ds-truncated-tooltip-text": "3.51.0-next.
|
|
102
|
-
"@elliemae/ds-typescript-helpers": "3.51.0-next.
|
|
40
|
+
"@elliemae/ds-button-v2": "3.51.0-next.12",
|
|
41
|
+
"@elliemae/ds-dropdownmenu-v2": "3.51.0-next.12",
|
|
42
|
+
"@elliemae/ds-form": "3.51.0-next.12",
|
|
43
|
+
"@elliemae/ds-grid": "3.51.0-next.12",
|
|
44
|
+
"@elliemae/ds-menu-button": "3.51.0-next.12",
|
|
45
|
+
"@elliemae/ds-props-helpers": "3.51.0-next.12",
|
|
46
|
+
"@elliemae/ds-icons": "3.51.0-next.12",
|
|
47
|
+
"@elliemae/ds-system": "3.51.0-next.12",
|
|
48
|
+
"@elliemae/ds-tooltip-v3": "3.51.0-next.12",
|
|
49
|
+
"@elliemae/ds-truncated-tooltip-text": "3.51.0-next.12",
|
|
50
|
+
"@elliemae/ds-typescript-helpers": "3.51.0-next.12"
|
|
103
51
|
},
|
|
104
52
|
"devDependencies": {
|
|
105
|
-
"@elliemae/pui-cli": "9.0.0-next.
|
|
53
|
+
"@elliemae/pui-cli": "9.0.0-next.55",
|
|
106
54
|
"jest": "~29.7.0",
|
|
107
55
|
"styled-components": "~5.3.9",
|
|
108
|
-
"@elliemae/ds-monorepo-devops": "3.51.0-next.
|
|
56
|
+
"@elliemae/ds-monorepo-devops": "3.51.0-next.12"
|
|
109
57
|
},
|
|
110
58
|
"peerDependencies": {
|
|
111
59
|
"lodash": "^4.17.21",
|