@elliemae/ds-legacy-chip 1.0.0-rc.1

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.
Files changed (54) hide show
  1. package/dist/cjs/DSChip.js +67 -0
  2. package/dist/cjs/DSChip.js.map +7 -0
  3. package/dist/cjs/config/useConfig.js +45 -0
  4. package/dist/cjs/config/useConfig.js.map +7 -0
  5. package/dist/cjs/constants.js +82 -0
  6. package/dist/cjs/constants.js.map +7 -0
  7. package/dist/cjs/exported_related/data-test-ids.js +40 -0
  8. package/dist/cjs/exported_related/data-test-ids.js.map +7 -0
  9. package/dist/cjs/exported_related/index.js +31 -0
  10. package/dist/cjs/exported_related/index.js.map +7 -0
  11. package/dist/cjs/exported_related/theming.js +43 -0
  12. package/dist/cjs/exported_related/theming.js.map +7 -0
  13. package/dist/cjs/index.js +32 -0
  14. package/dist/cjs/index.js.map +7 -0
  15. package/dist/cjs/package.json +7 -0
  16. package/dist/cjs/react-desc-prop-types.js +53 -0
  17. package/dist/cjs/react-desc-prop-types.js.map +7 -0
  18. package/dist/cjs/sharedTypes.js +28 -0
  19. package/dist/cjs/sharedTypes.js.map +7 -0
  20. package/dist/cjs/styles.js +226 -0
  21. package/dist/cjs/styles.js.map +7 -0
  22. package/dist/esm/DSChip.js +37 -0
  23. package/dist/esm/DSChip.js.map +7 -0
  24. package/dist/esm/config/useConfig.js +20 -0
  25. package/dist/esm/config/useConfig.js.map +7 -0
  26. package/dist/esm/constants.js +52 -0
  27. package/dist/esm/constants.js.map +7 -0
  28. package/dist/esm/exported_related/data-test-ids.js +10 -0
  29. package/dist/esm/exported_related/data-test-ids.js.map +7 -0
  30. package/dist/esm/exported_related/index.js +4 -0
  31. package/dist/esm/exported_related/index.js.map +7 -0
  32. package/dist/esm/exported_related/theming.js +13 -0
  33. package/dist/esm/exported_related/theming.js.map +7 -0
  34. package/dist/esm/index.js +5 -0
  35. package/dist/esm/index.js.map +7 -0
  36. package/dist/esm/package.json +7 -0
  37. package/dist/esm/react-desc-prop-types.js +30 -0
  38. package/dist/esm/react-desc-prop-types.js.map +7 -0
  39. package/dist/esm/sharedTypes.js +2 -0
  40. package/dist/esm/sharedTypes.js.map +7 -0
  41. package/dist/esm/styles.js +196 -0
  42. package/dist/esm/styles.js.map +7 -0
  43. package/dist/types/DSChip.d.ts +5 -0
  44. package/dist/types/config/useConfig.d.ts +12 -0
  45. package/dist/types/constants.d.ts +36 -0
  46. package/dist/types/exported_related/data-test-ids.d.ts +5 -0
  47. package/dist/types/exported_related/index.d.ts +2 -0
  48. package/dist/types/exported_related/theming.d.ts +7 -0
  49. package/dist/types/index.d.ts +3 -0
  50. package/dist/types/sharedTypes.d.ts +4 -0
  51. package/dist/types/styles.d.ts +18 -0
  52. package/dist/types/tests/DSChip.axe.test.d.ts +1 -0
  53. package/dist/types/tests/DSChip.test.d.ts +1 -0
  54. package/package.json +97 -0
@@ -0,0 +1,196 @@
1
+ import * as React from "react";
2
+ import { styled, css, xStyledCommonProps } from "@elliemae/ds-legacy-system";
3
+ import { basicSizes, shapeSizes, CHIP_SHAPES, CHIP_SIZES, roundShapeLarge, roundShapeSmall } from "./constants.js";
4
+ import { DSChipName, DSChipSlots } from "./exported_related/index.js";
5
+ const getChipSize = (shape) => shape === CHIP_SHAPES.ROUND ? shapeSizes : basicSizes;
6
+ const StyledChipLabel = styled("div", { name: DSChipName, slot: DSChipSlots.LABEL })`
7
+ font-size: ${({ theme }) => theme.fontSizes.label[200]};
8
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
9
+ word-wrap: break-word;
10
+ text-align: center;
11
+ padding: ${({ size }) => size === CHIP_SIZES.L ? "2px" : "4px"} 6px 6px 6px;
12
+ z-index: 0;
13
+ line-height: 1.27;
14
+ width: inherit;
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ `;
19
+ const StyledSpanWithEllipsis = styled.span`
20
+ white-space: nowrap;
21
+ overflow: hidden;
22
+ text-overflow: ellipsis;
23
+ max-width: 100%;
24
+ `;
25
+ const StyledWrapper = styled("div")`
26
+ display: flex;
27
+ height: ${({ buttonSize, buttonShape }) => getChipSize(buttonShape)[buttonSize].height};
28
+ width: ${({ buttonSize, buttonShape }) => getChipSize(buttonShape)[buttonSize].width};
29
+ ${xStyledCommonProps}
30
+ `;
31
+ const disabledRoundShape = css`
32
+ background-color: ${({ theme }) => theme.colors.neutral[200]};
33
+
34
+ & .DSIcon-root .DSIcon-svg {
35
+ fill: ${({ theme }) => theme.colors.neutral[500]};
36
+ }
37
+ `;
38
+ const StyledRoundShape = styled("div", {
39
+ name: DSChipName,
40
+ slot: DSChipSlots.ROUND_SHAPE
41
+ })`
42
+ background-color: ${({ theme }) => theme.colors.brand[600]};
43
+ width: ${({ size }) => size === CHIP_SIZES.L ? roundShapeLarge : roundShapeSmall};
44
+ height: ${({ size }) => size === CHIP_SIZES.L ? roundShapeLarge : roundShapeSmall};
45
+ border-radius: 50px;
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ margin-top: ${({ size }) => size === CHIP_SIZES.L ? "5px" : "10px"};
50
+ `;
51
+ const StyledChildrenWrapper = styled("div", { name: DSChipName, slot: DSChipSlots.CHILDREN_WRAPPER })`
52
+ width: 100%;
53
+ height: 100%;
54
+ `;
55
+ const styledChipSelectedCss = css`
56
+ ${StyledRoundShape} {
57
+ background-color: ${({ theme }) => theme.colors.brand[800]};
58
+ }
59
+ color: ${({ theme }) => theme.colors.brand[800]};
60
+ background-color: ${({ theme }) => theme.colors.brand[200]};
61
+
62
+ .DSIcon-svg {
63
+ fill: ${({ theme }) => theme.colors.brand[800]};
64
+ }
65
+
66
+ &:before {
67
+ border: 1px solid ${({ theme }) => theme.colors.brand[600]};
68
+ }
69
+
70
+ &:focus {
71
+ &:before {
72
+ border: 2px solid ${({ theme }) => theme.colors.brand[800]};
73
+ }
74
+ }
75
+ `;
76
+ const StyledChip = styled("button", { name: DSChipName, slot: DSChipSlots.BUTTON })`
77
+ position: relative;
78
+ display: flex;
79
+ flex-direction: column;
80
+ align-items: center;
81
+ padding: 0;
82
+ padding-top: ${(props) => props.buttonShape === CHIP_SHAPES.ROUND ? "0" : "10px"};
83
+ border: none;
84
+ min-height: 100%;
85
+ height: fit-content;
86
+ width: 100%;
87
+ background-color: #fff;
88
+ color: ${({ theme }) => theme.colors.brand[600]};
89
+ border-radius: 4px;
90
+ cursor: pointer;
91
+ outline: none;
92
+
93
+ ${StyledRoundShape} {
94
+ & .DSIcon-root .DSIcon-svg {
95
+ fill: #fff;
96
+ height: 24px;
97
+ width: 24px;
98
+ }
99
+ ${({ disabled }) => disabled && disabledRoundShape}
100
+ }
101
+ &:before {
102
+ content: '';
103
+ position: absolute;
104
+ z-index: 20;
105
+ top: 0;
106
+ left: 0;
107
+ width: 100%;
108
+ height: 100%;
109
+ border-radius: 4px;
110
+ border: 2px solid transparent;
111
+ pointer-events: none;
112
+ }
113
+
114
+ & .DSIcon-root .DSIcon-svg {
115
+ fill: ${({ theme }) => theme.colors.brand[600]};
116
+ height: 24px;
117
+ width: 24px;
118
+ }
119
+
120
+ & .DSIcon-root {
121
+ height: 24px;
122
+ width: 24px;
123
+ }
124
+
125
+ &:hover,
126
+ &:focus {
127
+ z-index: 10;
128
+
129
+ ${StyledChipLabel} {
130
+ text-align: left;
131
+ }
132
+
133
+ ${StyledSpanWithEllipsis} {
134
+ overflow-wrap: break-word;
135
+ white-space: pre-wrap;
136
+ overflow: visible;
137
+ }
138
+ }
139
+
140
+ &:hover {
141
+ ${StyledRoundShape} {
142
+ background-color: ${({ theme }) => theme.colors.brand[800]};
143
+ }
144
+ color: ${({ theme }) => theme.colors.brand[800]};
145
+ background-color: ${({ theme }) => theme.colors.brand[200]};
146
+ .DSIcon-svg {
147
+ fill: ${({ theme }) => theme.colors.brand[800]};
148
+ }
149
+ }
150
+
151
+ &:focus {
152
+ &:before {
153
+ border-color: ${({ theme }) => theme.colors.brand[800]};
154
+ }
155
+ }
156
+
157
+ &:disabled {
158
+ color: ${({ theme }) => theme.colors.neutral[500]};
159
+ cursor: not-allowed;
160
+
161
+ .DSIcon-svg {
162
+ fill: ${({ theme }) => theme.colors.neutral[500]};
163
+ }
164
+
165
+ &:focus,
166
+ &:hover {
167
+ ${StyledRoundShape} {
168
+ background-color: ${({ theme }) => theme.colors.neutral[200]};
169
+ }
170
+ background-color: #fff;
171
+ cursor: not-allowed;
172
+ &:before {
173
+ border-color: transparent;
174
+ }
175
+
176
+ ${StyledChipLabel} {
177
+ color: ${({ theme }) => theme.colors.neutral[500]};
178
+ }
179
+ }
180
+
181
+ &:hover .DSIcon-svg {
182
+ fill: ${({ theme }) => theme.colors.neutral[500]};
183
+ }
184
+ }
185
+
186
+ ${({ selected }) => !selected ? "" : styledChipSelectedCss}
187
+ `;
188
+ export {
189
+ StyledChildrenWrapper,
190
+ StyledChip,
191
+ StyledChipLabel,
192
+ StyledRoundShape,
193
+ StyledSpanWithEllipsis,
194
+ StyledWrapper
195
+ };
196
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { styled, css, xStyledCommonProps } from '@elliemae/ds-legacy-system';\nimport { basicSizes, shapeSizes, CHIP_SHAPES, CHIP_SIZES, roundShapeLarge, roundShapeSmall } from './constants.js';\nimport type { ChipShapesT, ChipSizesT } from './sharedTypes.js';\nimport { DSChipName, DSChipSlots } from './exported_related/index.js';\n\nexport interface StyledChipPropsT {\n buttonSize: ChipSizesT;\n buttonShape: ChipShapesT;\n selected?: boolean;\n}\n\nexport interface StyledRoundShapePropsT {\n size: ChipSizesT;\n disabled?: boolean;\n}\n\nconst getChipSize = (shape: ChipShapesT) => (shape === CHIP_SHAPES.ROUND ? shapeSizes : basicSizes);\n\nexport const StyledChipLabel = styled('div', { name: DSChipName, slot: DSChipSlots.LABEL })<{ size: ChipSizesT }>`\n font-size: ${({ theme }) => theme.fontSizes.label[200]};\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n word-wrap: break-word;\n text-align: center;\n padding: ${({ size }) => (size === CHIP_SIZES.L ? '2px' : '4px')} 6px 6px 6px;\n z-index: 0;\n line-height: 1.27;\n width: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const StyledSpanWithEllipsis = styled.span`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n`;\n\nexport const StyledWrapper = styled('div')<StyledChipPropsT>`\n display: flex;\n height: ${({ buttonSize, buttonShape }) => getChipSize(buttonShape)[buttonSize].height};\n width: ${({ buttonSize, buttonShape }) => getChipSize(buttonShape)[buttonSize].width};\n ${xStyledCommonProps}\n`;\n\nconst disabledRoundShape = css`\n background-color: ${({ theme }) => theme.colors.neutral[200]};\n\n & .DSIcon-root .DSIcon-svg {\n fill: ${({ theme }) => theme.colors.neutral[500]};\n }\n`;\n\nexport const StyledRoundShape = styled('div', {\n name: DSChipName,\n slot: DSChipSlots.ROUND_SHAPE,\n})<StyledRoundShapePropsT>`\n background-color: ${({ theme }) => theme.colors.brand[600]};\n width: ${({ size }) => (size === CHIP_SIZES.L ? roundShapeLarge : roundShapeSmall)};\n height: ${({ size }) => (size === CHIP_SIZES.L ? roundShapeLarge : roundShapeSmall)};\n border-radius: 50px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: ${({ size }) => (size === CHIP_SIZES.L ? '5px' : '10px')};\n`;\n\nexport const StyledChildrenWrapper = styled('div', { name: DSChipName, slot: DSChipSlots.CHILDREN_WRAPPER })`\n width: 100%;\n height: 100%;\n`;\n\nconst styledChipSelectedCss = css`\n ${StyledRoundShape} {\n background-color: ${({ theme }) => theme.colors.brand[800]};\n }\n color: ${({ theme }) => theme.colors.brand[800]};\n background-color: ${({ theme }) => theme.colors.brand[200]};\n\n .DSIcon-svg {\n fill: ${({ theme }) => theme.colors.brand[800]};\n }\n\n &:before {\n border: 1px solid ${({ theme }) => theme.colors.brand[600]};\n }\n\n &:focus {\n &:before {\n border: 2px solid ${({ theme }) => theme.colors.brand[800]};\n }\n }\n`;\n\nexport const StyledChip = styled('button', { name: DSChipName, slot: DSChipSlots.BUTTON })<\n Pick<StyledChipPropsT, 'selected' | 'buttonShape'>\n>`\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 0;\n padding-top: ${(props) => (props.buttonShape === CHIP_SHAPES.ROUND ? '0' : '10px')};\n border: none;\n min-height: 100%;\n height: fit-content;\n width: 100%;\n background-color: #fff;\n color: ${({ theme }) => theme.colors.brand[600]};\n border-radius: 4px;\n cursor: pointer;\n outline: none;\n\n ${StyledRoundShape} {\n & .DSIcon-root .DSIcon-svg {\n fill: #fff;\n height: 24px;\n width: 24px;\n }\n ${({ disabled }) => disabled && disabledRoundShape}\n }\n &:before {\n content: '';\n position: absolute;\n z-index: 20;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 4px;\n border: 2px solid transparent;\n pointer-events: none;\n }\n\n & .DSIcon-root .DSIcon-svg {\n fill: ${({ theme }) => theme.colors.brand[600]};\n height: 24px;\n width: 24px;\n }\n\n & .DSIcon-root {\n height: 24px;\n width: 24px;\n }\n\n &:hover,\n &:focus {\n z-index: 10;\n\n ${StyledChipLabel} {\n text-align: left;\n }\n\n ${StyledSpanWithEllipsis} {\n overflow-wrap: break-word;\n white-space: pre-wrap;\n overflow: visible;\n }\n }\n\n &:hover {\n ${StyledRoundShape} {\n background-color: ${({ theme }) => theme.colors.brand[800]};\n }\n color: ${({ theme }) => theme.colors.brand[800]};\n background-color: ${({ theme }) => theme.colors.brand[200]};\n .DSIcon-svg {\n fill: ${({ theme }) => theme.colors.brand[800]};\n }\n }\n\n &:focus {\n &:before {\n border-color: ${({ theme }) => theme.colors.brand[800]};\n }\n }\n\n &:disabled {\n color: ${({ theme }) => theme.colors.neutral[500]};\n cursor: not-allowed;\n\n .DSIcon-svg {\n fill: ${({ theme }) => theme.colors.neutral[500]};\n }\n\n &:focus,\n &:hover {\n ${StyledRoundShape} {\n background-color: ${({ theme }) => theme.colors.neutral[200]};\n }\n background-color: #fff;\n cursor: not-allowed;\n &:before {\n border-color: transparent;\n }\n\n ${StyledChipLabel} {\n color: ${({ theme }) => theme.colors.neutral[500]};\n }\n }\n\n &:hover .DSIcon-svg {\n fill: ${({ theme }) => theme.colors.neutral[500]};\n }\n }\n\n ${({ selected }) => (!selected ? '' : styledChipSelectedCss)}\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,QAAQ,KAAK,0BAA0B;AAChD,SAAS,YAAY,YAAY,aAAa,YAAY,iBAAiB,uBAAuB;AAElG,SAAS,YAAY,mBAAmB;AAaxC,MAAM,cAAc,CAAC,UAAwB,UAAU,YAAY,QAAQ,aAAa;AAEjF,MAAM,kBAAkB,OAAO,OAAO,EAAE,MAAM,YAAY,MAAM,YAAY,MAAM,CAAC;AAAA,eAC3E,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,MAAM,GAAG;AAAA,iBACtC,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY;AAAA;AAAA;AAAA,aAGrC,CAAC,EAAE,KAAK,MAAO,SAAS,WAAW,IAAI,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASrD,MAAM,yBAAyB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOtC,MAAM,gBAAgB,OAAO,KAAK;AAAA;AAAA,YAE7B,CAAC,EAAE,YAAY,YAAY,MAAM,YAAY,WAAW,EAAE,UAAU,EAAE;AAAA,WACvE,CAAC,EAAE,YAAY,YAAY,MAAM,YAAY,WAAW,EAAE,UAAU,EAAE;AAAA,IAC7E;AAAA;AAGJ,MAAM,qBAAqB;AAAA,sBACL,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAAA,YAGjD,CAAC,EAAE,MAAM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AE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAAA;AAAA,IAIjD,CAAC,EAAE,SAAS,MAAO,CAAC,WAAW,KAAK;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { DSChipT } from './react-desc-prop-types.js';
3
+ declare const DSChip: React.ComponentType<DSChipT.Props>;
4
+ declare const DSChipWithSchema: import("@elliemae/ds-legacy-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSChipT.Props>;
5
+ export { DSChip, DSChipWithSchema };
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import type { DSChipT } from '../react-desc-prop-types.js';
3
+ export declare const useConfig: (props: DSChipT.Props) => {
4
+ globalAttrs: import("@elliemae/ds-legacy-props-helpers").GlobalAttributesT<Element>;
5
+ xStyledAttrs: import("@elliemae/ds-legacy-props-helpers").XstyledProps;
6
+ selected: boolean;
7
+ innerRef: import("react").RefObject<HTMLButtonElement> | ((_ref: HTMLButtonElement) => void);
8
+ size: import("../sharedTypes.js").ChipSizesT;
9
+ shape: import("../sharedTypes.js").ChipShapesT;
10
+ label: string;
11
+ icon: () => JSX.Element;
12
+ };
@@ -0,0 +1,36 @@
1
+ export declare const CHIP_SHAPES: {
2
+ DEFAULT: "default";
3
+ ROUND: "round";
4
+ };
5
+ export declare const CHIP_SIZES: {
6
+ S: "s";
7
+ L: "l";
8
+ };
9
+ export declare const roundShapeLarge = "56px";
10
+ export declare const roundShapeSmall = "40px";
11
+ export declare const basicSizes: {
12
+ s: {
13
+ readonly width: "72px";
14
+ readonly height: "67px";
15
+ };
16
+ l: {
17
+ readonly width: "92px";
18
+ readonly height: "67px";
19
+ };
20
+ };
21
+ export declare const shapeSizes: {
22
+ s: {
23
+ readonly width: "72px";
24
+ readonly height: "77px";
25
+ };
26
+ l: {
27
+ readonly width: "92px";
28
+ readonly height: "85px";
29
+ };
30
+ };
31
+ export declare const ChipSizesValuesArray: ("s" | "l")[];
32
+ export declare const ChipShapesValuesArray: ("default" | "round")[];
33
+ export declare const ChipInteractionStates: string[];
34
+ export declare const ChipSizesValuesString: string;
35
+ export declare const ChipShapesValuesString: string;
36
+ export declare const ChipInteractionStatesValuesString: string;
@@ -0,0 +1,5 @@
1
+ export declare const DSChipDataTestIds: {
2
+ BUTTON: string;
3
+ LABEL: string;
4
+ ROUND_SHAPE: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ export * from './data-test-ids.js';
2
+ export * from './theming.js';
@@ -0,0 +1,7 @@
1
+ export declare const DSChipName = "DSChip";
2
+ export declare const DSChipSlots: {
3
+ BUTTON: string;
4
+ LABEL: string;
5
+ ROUND_SHAPE: string;
6
+ CHILDREN_WRAPPER: string;
7
+ };
@@ -0,0 +1,3 @@
1
+ export * from './DSChip.js';
2
+ export * from './constants.js';
3
+ export * from './exported_related/index.js';
@@ -0,0 +1,4 @@
1
+ import type { CHIP_SIZES, CHIP_SHAPES, ChipInteractionStates } from './constants.js';
2
+ export type ChipSizesT = (typeof CHIP_SIZES)[keyof typeof CHIP_SIZES];
3
+ export type ChipShapesT = (typeof CHIP_SHAPES)[keyof typeof CHIP_SHAPES];
4
+ export type ChipInteractionStatesT = (typeof ChipInteractionStates)[number];
@@ -0,0 +1,18 @@
1
+ import type { ChipShapesT, ChipSizesT } from './sharedTypes.js';
2
+ export interface StyledChipPropsT {
3
+ buttonSize: ChipSizesT;
4
+ buttonShape: ChipShapesT;
5
+ selected?: boolean;
6
+ }
7
+ export interface StyledRoundShapePropsT {
8
+ size: ChipSizesT;
9
+ disabled?: boolean;
10
+ }
11
+ export declare const StyledChipLabel: import("styled-components").StyledComponent<"div", import("@elliemae/ds-legacy-system").Theme, {
12
+ size: ChipSizesT;
13
+ } & import("@elliemae/ds-legacy-system").OwnerInterface, never>;
14
+ export declare const StyledSpanWithEllipsis: import("styled-components").StyledComponent<"span", import("@elliemae/ds-legacy-system").Theme, object & import("@elliemae/ds-legacy-system").OwnerInterface, never>;
15
+ export declare const StyledWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-legacy-system").Theme, StyledChipPropsT & import("@elliemae/ds-legacy-system").OwnerInterface, never>;
16
+ export declare const StyledRoundShape: import("styled-components").StyledComponent<"div", import("@elliemae/ds-legacy-system").Theme, StyledRoundShapePropsT & import("@elliemae/ds-legacy-system").OwnerInterface, never>;
17
+ export declare const StyledChildrenWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-legacy-system").Theme, object & import("@elliemae/ds-legacy-system").OwnerInterface, never>;
18
+ export declare const StyledChip: import("styled-components").StyledComponent<"button", import("@elliemae/ds-legacy-system").Theme, Pick<StyledChipPropsT, "selected" | "buttonShape"> & import("@elliemae/ds-legacy-system").OwnerInterface, never>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "@elliemae/ds-legacy-chip",
3
+ "version": "1.0.0-rc.1",
4
+ "license": "MIT",
5
+ "description": "ICE MT - Dimsum - Chip",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "module": "./dist/esm/index.js",
10
+ "main": "./dist/cjs/index.js",
11
+ "types": "./dist/types/index.d.ts",
12
+ "sideEffects": [
13
+ "*.css",
14
+ "*.scss"
15
+ ],
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://git.elliemae.io/platform-ui/dimsum-legacy.git"
19
+ },
20
+ "exports": {
21
+ ".": {
22
+ "import": "./dist/esm/index.js",
23
+ "require": "./dist/cjs/index.js"
24
+ },
25
+ "./useConfig": {
26
+ "import": "./dist/esm/useConfig.js",
27
+ "require": "./dist/cjs/useConfig.js"
28
+ },
29
+ "./types/AppPickerTypes": {
30
+ "import": "./dist/esm/types/AppPickerTypes.js",
31
+ "require": "./dist/cjs/types/AppPickerTypes.js"
32
+ },
33
+ "./styles": {
34
+ "import": "./dist/esm/styles.js",
35
+ "require": "./dist/cjs/styles.js"
36
+ },
37
+ "./constants": {
38
+ "import": "./dist/esm/constants.js",
39
+ "require": "./dist/cjs/constants.js"
40
+ },
41
+ "./DSChip": {
42
+ "import": "./dist/esm/DSChip.js",
43
+ "require": "./dist/cjs/DSChip.js"
44
+ },
45
+ "./react-desc-prop-types": {
46
+ "import": "./dist/esm/react-desc-prop-types.js",
47
+ "require": "./dist/cjs/react-desc-prop-types.js"
48
+ },
49
+ "./sharedTypes": {
50
+ "import": "./dist/esm/sharedTypes.js",
51
+ "require": "./dist/cjs/sharedTypes.js"
52
+ }
53
+ },
54
+ "engines": {
55
+ "pnpm": ">=6",
56
+ "node": ">=16"
57
+ },
58
+ "author": "ICE MT",
59
+ "jestSonar": {
60
+ "sonar56x": true,
61
+ "reportPath": "reports",
62
+ "reportFile": "tests.xml",
63
+ "indent": 4
64
+ },
65
+ "dependencies": {
66
+ "@elliemae/ds-legacy-props-helpers": "1.0.0-rc.1",
67
+ "@elliemae/ds-legacy-system": "1.0.0-rc.1",
68
+ "@elliemae/ds-legacy-utilities": "1.0.0-rc.1"
69
+ },
70
+ "devDependencies": {
71
+ "@elliemae/pui-cli": "~9.0.0-next.31",
72
+ "styled-components": "~5.3.9",
73
+ "@elliemae/ds-legacy-monorepo-devops": "1.0.0-rc.1",
74
+ "@elliemae/ds-legacy-icons": "1.0.0-rc.1"
75
+ },
76
+ "peerDependencies": {
77
+ "lodash": "^4.17.21",
78
+ "react": "^17.0.2",
79
+ "react-dom": "^17.0.2",
80
+ "styled-components": "~5.3.9"
81
+ },
82
+ "publishConfig": {
83
+ "access": "public",
84
+ "typeSafety": false
85
+ },
86
+ "scripts": {
87
+ "dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
88
+ "test": "pui-cli test --passWithNoTests",
89
+ "lint": "node ../../../scripts/lint.mjs",
90
+ "eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../../.eslintrc.js' src/",
91
+ "dts": "node ../../../scripts/dts.mjs",
92
+ "build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
93
+ "dev:build": "pnpm --filter {.}... build",
94
+ "dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
95
+ "checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
96
+ }
97
+ }