@cleartrip/ct-design-chip 1.1.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.
Files changed (38) hide show
  1. package/dist/ct-design-chip.browser.cjs.js +2 -0
  2. package/dist/ct-design-chip.browser.cjs.js.map +1 -0
  3. package/dist/ct-design-chip.browser.esm.js +2 -0
  4. package/dist/ct-design-chip.browser.esm.js.map +1 -0
  5. package/dist/ct-design-chip.cjs.js +141 -0
  6. package/dist/ct-design-chip.cjs.js.map +1 -0
  7. package/dist/ct-design-chip.esm.js +134 -0
  8. package/dist/ct-design-chip.esm.js.map +1 -0
  9. package/dist/ct-design-chip.umd.js +169 -0
  10. package/dist/ct-design-chip.umd.js.map +1 -0
  11. package/dist/src/Chip.d.ts +5 -0
  12. package/dist/src/Chip.d.ts.map +1 -0
  13. package/dist/src/StyledChip/StyledChip.d.ts +4 -0
  14. package/dist/src/StyledChip/StyledChip.d.ts.map +1 -0
  15. package/dist/src/StyledChip/index.d.ts +2 -0
  16. package/dist/src/StyledChip/index.d.ts.map +1 -0
  17. package/dist/src/StyledChip/style.d.ts +7 -0
  18. package/dist/src/StyledChip/style.d.ts.map +1 -0
  19. package/dist/src/StyledChip/type.d.ts +11 -0
  20. package/dist/src/StyledChip/type.d.ts.map +1 -0
  21. package/dist/src/StyledCounter/StyledCounter.d.ts +4 -0
  22. package/dist/src/StyledCounter/StyledCounter.d.ts.map +1 -0
  23. package/dist/src/StyledCounter/index.d.ts +2 -0
  24. package/dist/src/StyledCounter/index.d.ts.map +1 -0
  25. package/dist/src/StyledCounter/style.d.ts +7 -0
  26. package/dist/src/StyledCounter/style.d.ts.map +1 -0
  27. package/dist/src/StyledCounter/type.d.ts +4 -0
  28. package/dist/src/StyledCounter/type.d.ts.map +1 -0
  29. package/dist/src/index.d.ts +3 -0
  30. package/dist/src/index.d.ts.map +1 -0
  31. package/dist/src/style.d.ts +48 -0
  32. package/dist/src/style.d.ts.map +1 -0
  33. package/dist/src/type.d.ts +18 -0
  34. package/dist/src/type.d.ts.map +1 -0
  35. package/dist/stats.html +4838 -0
  36. package/dist/stories/Chip.stories.d.ts +10 -0
  37. package/dist/stories/Chip.stories.d.ts.map +1 -0
  38. package/package.json +42 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../packages/components/Chip/src/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAO1C,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAKnC,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA0E7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { StyledChipProps } from './type';
2
+ declare const StyledChip: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledChipProps, never>;
3
+ export default StyledChip;
4
+ //# sourceMappingURL=StyledChip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StyledChip.d.ts","sourceRoot":"","sources":["../../../packages/components/Chip/src/StyledChip/StyledChip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,QAAA,MAAM,UAAU,sHAYf,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as StyledChip } from './StyledChip';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Chip/src/StyledChip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { CSSObject } from 'styled-components';
2
+ import { Theme } from '@cleartrip/ct-design-tokens';
3
+ import { StyledChipProps } from './type';
4
+ export declare const getStyledChipStyles: ({ theme, backgroundColor, borderColor, borderRadius, borderWidth, cursor, paddingTop, paddingBottom, }: StyledChipProps & {
5
+ theme: Theme;
6
+ }) => CSSObject;
7
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../packages/components/Chip/src/StyledChip/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,eAAO,MAAM,mBAAmB;WASF,KAAK;MAAK,SAevC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { CSSObject } from 'styled-components';
2
+ export interface StyledChipProps {
3
+ borderColor?: string;
4
+ borderRadius?: string;
5
+ borderWidth?: string;
6
+ backgroundColor?: string;
7
+ paddingTop?: string;
8
+ paddingBottom?: string;
9
+ cursor?: CSSObject['cursor'];
10
+ }
11
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../packages/components/Chip/src/StyledChip/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;CAC9B"}
@@ -0,0 +1,4 @@
1
+ import { StyledCounterProps } from './type';
2
+ declare const StyledCounter: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledCounterProps, never>;
3
+ export default StyledCounter;
4
+ //# sourceMappingURL=StyledCounter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StyledCounter.d.ts","sourceRoot":"","sources":["../../../packages/components/Chip/src/StyledCounter/StyledCounter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAE5C,QAAA,MAAM,aAAa,yHAElB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as StyledCounter } from './StyledCounter';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Chip/src/StyledCounter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { CSSObject } from 'styled-components';
2
+ import { Theme } from '@cleartrip/ct-design-tokens';
3
+ import { StyledCounterProps } from './type';
4
+ export declare const getStyledCounterStyles: ({ backgroundColor, theme, }: StyledCounterProps & {
5
+ theme: Theme;
6
+ }) => CSSObject;
7
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../packages/components/Chip/src/StyledCounter/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAE5C,eAAO,MAAM,sBAAsB;WAGF,KAAK;MAAK,SAU1C,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface StyledCounterProps {
2
+ backgroundColor?: string;
3
+ }
4
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../packages/components/Chip/src/StyledCounter/type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1,3 @@
1
+ export { default as Chip } from './Chip';
2
+ export * from './type';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/Chip/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { Theme } from '@cleartrip/ct-design-tokens';
2
+ export declare const getDisabledChipStyles: (theme: Theme, borderWidth: string) => {
3
+ backgroundColor: string;
4
+ borderWidth: any;
5
+ borderColor: string;
6
+ borderRadius: "30px";
7
+ cursor: string;
8
+ };
9
+ export declare const getSelectedChipStyles: (theme: Theme, borderWidth: string) => {
10
+ backgroundColor: string;
11
+ borderWidth: any;
12
+ borderColor: string;
13
+ borderRadius: "30px";
14
+ cursor: string;
15
+ };
16
+ export declare const getDefaultChipStyles: (theme: Theme, borderWidth: string) => {
17
+ backgroundColor: string;
18
+ borderWidth: any;
19
+ borderColor: string;
20
+ borderRadius: "30px";
21
+ cursor: string;
22
+ };
23
+ export declare const getChipLabelColor: ({ isSelected, isDisabled, theme, }: {
24
+ isSelected: boolean;
25
+ isDisabled: boolean;
26
+ theme: Theme;
27
+ }) => string;
28
+ export declare const getCounterStyles: ({ theme }: {
29
+ theme: Theme;
30
+ }) => {
31
+ backgroundColor: string;
32
+ };
33
+ export declare const getChipStyles: ({ isSelected, isDisabled, showTopIcon, theme, borderWidth, }: {
34
+ isSelected: boolean;
35
+ isDisabled: boolean;
36
+ showTopIcon: boolean;
37
+ theme: Theme;
38
+ borderWidth: string;
39
+ }) => {
40
+ backgroundColor: string;
41
+ borderWidth: any;
42
+ borderColor: string;
43
+ borderRadius: "30px";
44
+ cursor: string;
45
+ paddingTop: string;
46
+ paddingBottom: string;
47
+ };
48
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../packages/components/Chip/src/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEpD,eAAO,MAAM,qBAAqB,UAAW,KAAK,eAAe,MAAM;;;;;;CAQtE,CAAC;AAEF,eAAO,MAAM,qBAAqB,UAAW,KAAK,eAAe,MAAM;;;;;;CAQtE,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAAW,KAAK,eAAe,MAAM;;;;;;CAQrE,CAAC;AAEF,eAAO,MAAM,iBAAiB;gBAKhB,OAAO;gBACP,OAAO;WACZ,KAAK;YAWb,CAAC;AAEF,eAAO,MAAM,gBAAgB;WAAwB,KAAK;;;CAIzD,CAAC;AAEF,eAAO,MAAM,aAAa;gBAOZ,OAAO;gBACP,OAAO;iBACN,OAAO;WACb,KAAK;iBACC,MAAM;;;;;;;;;CA4BpB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ import { IconPosition } from '@cleartrip/ct-design-types';
3
+ export interface ChipProps {
4
+ id?: string;
5
+ label: ReactNode | string;
6
+ showIcon?: boolean;
7
+ iconPosition?: `${IconPosition}`;
8
+ Icon?: ReactNode;
9
+ showCounter?: boolean;
10
+ count?: number;
11
+ isDismissible?: boolean;
12
+ isSelected?: boolean;
13
+ isDisabled?: boolean;
14
+ onClick?: () => void;
15
+ onDismiss?: () => void;
16
+ borderWidth?: 'none' | 'sm' | 'md' | 'lg';
17
+ }
18
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../packages/components/Chip/src/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,WAAW,SAAS;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,GAAG,YAAY,EAAE,CAAC;IACjC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3C"}