@toptal/picasso-container 3.1.3-alpha-1757603192867.0 → 3.1.3-alpha-FF-49-enhance-publishing-6b5d306f0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-package/src/Container/Container.d.ts +61 -0
- package/dist-package/src/Container/Container.d.ts.map +1 -0
- package/dist-package/src/Container/Container.js +48 -0
- package/dist-package/src/Container/Container.js.map +1 -0
- package/dist-package/src/Container/constants.d.ts +5 -0
- package/dist-package/src/Container/constants.d.ts.map +1 -0
- package/dist-package/src/Container/constants.js +5 -0
- package/dist-package/src/Container/constants.js.map +1 -0
- package/dist-package/src/Container/index.d.ts +7 -0
- package/dist-package/src/Container/index.d.ts.map +1 -0
- package/dist-package/src/Container/index.js +4 -0
- package/dist-package/src/Container/index.js.map +1 -0
- package/dist-package/src/Container/styles.d.ts +43 -0
- package/dist-package/src/Container/styles.d.ts.map +1 -0
- package/dist-package/src/Container/styles.js +68 -0
- package/dist-package/src/Container/styles.js.map +1 -0
- package/dist-package/src/Container/utils/constants.d.ts +755 -0
- package/dist-package/src/Container/utils/constants.d.ts.map +1 -0
- package/dist-package/src/Container/utils/constants.js +546 -0
- package/dist-package/src/Container/utils/constants.js.map +1 -0
- package/dist-package/src/Container/utils/filter-out-strings-and-picasso-spacings.d.ts +4 -0
- package/dist-package/src/Container/utils/filter-out-strings-and-picasso-spacings.d.ts.map +1 -0
- package/dist-package/src/Container/utils/filter-out-strings-and-picasso-spacings.js +6 -0
- package/dist-package/src/Container/utils/filter-out-strings-and-picasso-spacings.js.map +1 -0
- package/dist-package/src/Container/utils/get-spacing-classes.d.ts +16 -0
- package/dist-package/src/Container/utils/get-spacing-classes.d.ts.map +1 -0
- package/dist-package/src/Container/utils/get-spacing-classes.js +76 -0
- package/dist-package/src/Container/utils/get-spacing-classes.js.map +1 -0
- package/dist-package/src/Container/utils/index.d.ts +3 -0
- package/dist-package/src/Container/utils/index.d.ts.map +1 -0
- package/dist-package/src/Container/utils/index.js +3 -0
- package/dist-package/src/Container/utils/index.js.map +1 -0
- package/dist-package/src/index.d.ts +2 -0
- package/dist-package/src/index.d.ts.map +1 -0
- package/dist-package/src/index.js +2 -0
- package/dist-package/src/index.js.map +1 -0
- package/package.json +7 -7
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { PropTypes } from '@material-ui/core';
|
|
2
|
+
import type { SpacingType } from '@toptal/picasso-provider';
|
|
3
|
+
import type { StandardProps } from '@toptal/picasso-shared';
|
|
4
|
+
import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';
|
|
5
|
+
import type { AlignItemsType, JustifyContentType, VariantType } from './styles';
|
|
6
|
+
declare type ContainerType = 'div' | 'span';
|
|
7
|
+
declare type DirectionType = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
8
|
+
declare type WrapType = 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
9
|
+
declare type BorderableType = 'transparent' | 'white';
|
|
10
|
+
export interface Props<V extends VariantType = VariantType> extends StandardProps, HTMLAttributes<HTMLDivElement | HTMLSpanElement> {
|
|
11
|
+
/** Content of Container */
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/** Whether container should act as inline element `display: inline-block` */
|
|
14
|
+
inline?: boolean;
|
|
15
|
+
/** Use flexbox */
|
|
16
|
+
flex?: boolean;
|
|
17
|
+
/** Set flex direction */
|
|
18
|
+
direction?: DirectionType;
|
|
19
|
+
/** Defines the align-items style property */
|
|
20
|
+
alignItems?: AlignItemsType;
|
|
21
|
+
/** Defines the justify-content style property */
|
|
22
|
+
justifyContent?: JustifyContentType;
|
|
23
|
+
/** Defines flex-wrap style property */
|
|
24
|
+
wrap?: WrapType;
|
|
25
|
+
/** Whether (`white`, `transparent`) container has border or not */
|
|
26
|
+
bordered?: V extends BorderableType ? boolean : never;
|
|
27
|
+
/** Whether container has 8px border-radius applied or not */
|
|
28
|
+
rounded?: boolean;
|
|
29
|
+
/** Style variant of Notification */
|
|
30
|
+
variant?: V;
|
|
31
|
+
/** Component used for the root node */
|
|
32
|
+
as?: ContainerType;
|
|
33
|
+
/** Text align of the inner text */
|
|
34
|
+
align?: PropTypes.Alignment;
|
|
35
|
+
/** margin-top for the container transformed to `rem` */
|
|
36
|
+
top?: SpacingType;
|
|
37
|
+
/** margin-bottom for the container transformed to `rem` */
|
|
38
|
+
bottom?: SpacingType;
|
|
39
|
+
/** margin-left for the container transformed to `rem` */
|
|
40
|
+
left?: SpacingType;
|
|
41
|
+
/** margin-right for the container transformed to `rem` */
|
|
42
|
+
right?: SpacingType;
|
|
43
|
+
/** padding for the container transformed to `rem` */
|
|
44
|
+
padded?: SpacingType;
|
|
45
|
+
/** Gap between elements for a flex container */
|
|
46
|
+
gap?: SpacingType;
|
|
47
|
+
}
|
|
48
|
+
declare type ContainerProps = {
|
|
49
|
+
<V extends VariantType = VariantType>(props: Props<V> & {
|
|
50
|
+
ref?: Ref<HTMLDivElement> | null;
|
|
51
|
+
}): ReactElement;
|
|
52
|
+
displayName?: string;
|
|
53
|
+
defaultProps?: Partial<Props<VariantType>>;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Container component used for spacing 2 elements
|
|
57
|
+
*/
|
|
58
|
+
export declare const Container: ContainerProps;
|
|
59
|
+
export default Container;
|
|
60
|
+
export type { VariantType };
|
|
61
|
+
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../src/Container/Container.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAK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CAAC,EAAE,WAAW,CAAA;IAClB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,qDAAqD;IACrD,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,gDAAgD;IAChD,GAAG,CAAC,EAAE,WAAW,CAAA;CAClB;AAED,aAAK,cAAc,GAAG;IACpB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAClC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,GAAG,IAAI,CAAA;KAAE,GACrD,YAAY,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAA;CAC3C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,cA2FvB,CAAA;AASD,eAAe,SAAS,CAAA;AACxB,YAAY,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { documentable, forwardRef } from '@toptal/picasso-utils';
|
|
14
|
+
import { twMerge } from '@toptal/picasso-tailwind-merge';
|
|
15
|
+
import { alignmentClasses, variantClassesByColor } from './styles';
|
|
16
|
+
import { getSpacingClasses, getSpacingStyles } from './utils';
|
|
17
|
+
/**
|
|
18
|
+
* Container component used for spacing 2 elements
|
|
19
|
+
*/
|
|
20
|
+
export const Container = documentable(forwardRef((props, ref) => {
|
|
21
|
+
const { children, className, inline, flex, direction, alignItems, justifyContent, wrap, style, bordered = false, rounded = false, variant, align, as: Component = inline ? 'span' : 'div', top, bottom, left, right, padded, gap,
|
|
22
|
+
// Avoid passing external classes inside the rest props
|
|
23
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
24
|
+
classes: externalClasses } = props, rest = __rest(props, ["children", "className", "inline", "flex", "direction", "alignItems", "justifyContent", "wrap", "style", "bordered", "rounded", "variant", "align", "as", "top", "bottom", "left", "right", "padded", "gap", "classes"]);
|
|
25
|
+
const spacingProps = { gap, padded, top, bottom, right, left };
|
|
26
|
+
const isBorderedVariant = !variant || variant === 'white' || variant === 'transparent';
|
|
27
|
+
const getDisplayValue = (isInline, isFlex) => {
|
|
28
|
+
return isFlex
|
|
29
|
+
? isInline
|
|
30
|
+
? 'inline-flex'
|
|
31
|
+
: 'flex'
|
|
32
|
+
: isInline
|
|
33
|
+
? 'inline-block'
|
|
34
|
+
: '';
|
|
35
|
+
};
|
|
36
|
+
return (React.createElement(Component, Object.assign({}, rest, { ref: ref, className: twMerge(variant && variantClassesByColor[variant], getSpacingClasses(spacingProps), typeof align === 'string' && alignmentClasses.textAlign[align], alignItems && alignmentClasses.alignItems[alignItems], justifyContent && alignmentClasses.justifyContent[justifyContent], wrap && alignmentClasses.wrap[wrap], bordered &&
|
|
37
|
+
isBorderedVariant &&
|
|
38
|
+
'border border-solid border-gray-200', rounded && 'rounded-md', getDisplayValue(inline, flex), direction &&
|
|
39
|
+
direction !== 'row' &&
|
|
40
|
+
alignmentClasses.direction[direction], className), style: Object.assign(Object.assign({}, getSpacingStyles(spacingProps)), style) }), children));
|
|
41
|
+
}));
|
|
42
|
+
Container.displayName = 'Container';
|
|
43
|
+
Container.defaultProps = {
|
|
44
|
+
as: 'div',
|
|
45
|
+
inline: false,
|
|
46
|
+
};
|
|
47
|
+
export default Container;
|
|
48
|
+
//# sourceMappingURL=Container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../src/Container/Container.tsx"],"names":[],"mappings":";;;;;;;;;;;AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAGxD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AA4D7D;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAmB,YAAY,CACnD,UAAU,CACR,CACE,KAAe,EACf,GAA+B,EAC/B,EAAE;IACF,MAAM,EACJ,QAAQ,EACR,SAAS,EACT,MAAM,EACN,IAAI,EACJ,SAAS,EACT,UAAU,EACV,cAAc,EACd,IAAI,EACJ,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,OAAO,EACP,KAAK,EACL,EAAE,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EACvC,GAAG,EACH,MAAM,EACN,IAAI,EACJ,KAAK,EACL,MAAM,EACN,GAAG;IACH,uDAAuD;IACvD,sDAAsD;IACtD,OAAO,EAAE,eAAe,KAEtB,KAAK,EADJ,IAAI,UACL,KAAK,EAzBH,wNAyBL,CAAQ,CAAA;IAET,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;IAC9D,MAAM,iBAAiB,GACrB,CAAC,OAAO,IAAI,OAAO,KAAK,OAAO,IAAI,OAAO,KAAK,aAAa,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container/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QAAQ,CAAA;AACnC,eAAO,MAAM,UAAU,QAAQ,CAAA;AAC/B,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AACrC,eAAO,MAAM,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/Container/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAA;AACnC,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAA;AAC/B,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAA;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { OmitInternalProps } from '@toptal/picasso-shared';
|
|
2
|
+
import type { Props } from './Container';
|
|
3
|
+
export { default as Container } from './Container';
|
|
4
|
+
export declare type ContainerProps = OmitInternalProps<Props>;
|
|
5
|
+
export * from './Container';
|
|
6
|
+
export * from './styles';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Container/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAExC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,oBAAY,cAAc,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA;AACrD,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Container/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAElD,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare const alignItemsVariants: readonly ["flex-start", "flex-end", "center", "stretch", "baseline"];
|
|
2
|
+
declare const justifyContentVariants: readonly ["flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly"];
|
|
3
|
+
declare const containerVariants: readonly ["transparent", "red", "green", "white", "yellow", "blue", "grey"];
|
|
4
|
+
export declare type VariantType = (typeof containerVariants)[number];
|
|
5
|
+
export declare type AlignItemsType = (typeof alignItemsVariants)[number];
|
|
6
|
+
export declare type JustifyContentType = (typeof justifyContentVariants)[number];
|
|
7
|
+
export declare const alignmentClasses: {
|
|
8
|
+
readonly alignItems: {
|
|
9
|
+
readonly 'flex-start': "items-start";
|
|
10
|
+
readonly 'flex-end': "items-end";
|
|
11
|
+
readonly center: "items-center";
|
|
12
|
+
readonly stretch: "items-stretch";
|
|
13
|
+
readonly baseline: "items-baseline";
|
|
14
|
+
};
|
|
15
|
+
readonly textAlign: {
|
|
16
|
+
readonly inherit: "[text-align:inherit]";
|
|
17
|
+
readonly left: "text-left";
|
|
18
|
+
readonly center: "text-center";
|
|
19
|
+
readonly right: "text-right";
|
|
20
|
+
readonly justify: "text-justify";
|
|
21
|
+
};
|
|
22
|
+
readonly justifyContent: {
|
|
23
|
+
readonly center: "justify-center";
|
|
24
|
+
readonly 'flex-start': "justify-start";
|
|
25
|
+
readonly 'flex-end': "justify-end";
|
|
26
|
+
readonly 'space-between': "justify-between";
|
|
27
|
+
readonly 'space-around': "justify-around";
|
|
28
|
+
readonly 'space-evenly': "justify-evenly";
|
|
29
|
+
};
|
|
30
|
+
readonly direction: {
|
|
31
|
+
readonly column: "flex-col";
|
|
32
|
+
readonly 'row-reverse': "flex-row-reverse";
|
|
33
|
+
readonly 'column-reverse': "flex-col-reverse";
|
|
34
|
+
};
|
|
35
|
+
readonly wrap: {
|
|
36
|
+
readonly wrap: "flex-wrap";
|
|
37
|
+
readonly 'wrap-reverse': "flex-wrap-reverse";
|
|
38
|
+
readonly nowrap: "flex-nowrap";
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export declare const variantClassesByColor: Record<VariantType, string>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Container/styles.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,kBAAkB,sEAMd,CAAA;AAEV,QAAA,MAAM,sBAAsB,gGAOlB,CAAA;AAEV,QAAA,MAAM,iBAAiB,6EAQb,CAAA;AAEV,oBAAY,WAAW,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC5D,oBAAY,cAAc,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA;AAChE,oBAAY,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;AAExE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCnB,CAAA;AAEV,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAQ7D,CAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const alignItemsVariants = [
|
|
2
|
+
'flex-start',
|
|
3
|
+
'flex-end',
|
|
4
|
+
'center',
|
|
5
|
+
'stretch',
|
|
6
|
+
'baseline',
|
|
7
|
+
];
|
|
8
|
+
const justifyContentVariants = [
|
|
9
|
+
'flex-start',
|
|
10
|
+
'flex-end',
|
|
11
|
+
'center',
|
|
12
|
+
'space-between',
|
|
13
|
+
'space-around',
|
|
14
|
+
'space-evenly',
|
|
15
|
+
];
|
|
16
|
+
const containerVariants = [
|
|
17
|
+
'transparent',
|
|
18
|
+
'red',
|
|
19
|
+
'green',
|
|
20
|
+
'white',
|
|
21
|
+
'yellow',
|
|
22
|
+
'blue',
|
|
23
|
+
'grey',
|
|
24
|
+
];
|
|
25
|
+
export const alignmentClasses = {
|
|
26
|
+
alignItems: {
|
|
27
|
+
'flex-start': 'items-start',
|
|
28
|
+
'flex-end': 'items-end',
|
|
29
|
+
center: 'items-center',
|
|
30
|
+
stretch: 'items-stretch',
|
|
31
|
+
baseline: 'items-baseline',
|
|
32
|
+
},
|
|
33
|
+
textAlign: {
|
|
34
|
+
inherit: '[text-align:inherit]',
|
|
35
|
+
left: 'text-left',
|
|
36
|
+
center: 'text-center',
|
|
37
|
+
right: 'text-right',
|
|
38
|
+
justify: 'text-justify',
|
|
39
|
+
},
|
|
40
|
+
justifyContent: {
|
|
41
|
+
center: 'justify-center',
|
|
42
|
+
'flex-start': 'justify-start',
|
|
43
|
+
'flex-end': 'justify-end',
|
|
44
|
+
'space-between': 'justify-between',
|
|
45
|
+
'space-around': 'justify-around',
|
|
46
|
+
'space-evenly': 'justify-evenly',
|
|
47
|
+
},
|
|
48
|
+
direction: {
|
|
49
|
+
column: 'flex-col',
|
|
50
|
+
'row-reverse': 'flex-row-reverse',
|
|
51
|
+
'column-reverse': 'flex-col-reverse',
|
|
52
|
+
},
|
|
53
|
+
wrap: {
|
|
54
|
+
wrap: 'flex-wrap',
|
|
55
|
+
'wrap-reverse': 'flex-wrap-reverse',
|
|
56
|
+
nowrap: 'flex-nowrap',
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
export const variantClassesByColor = {
|
|
60
|
+
white: 'bg-white',
|
|
61
|
+
red: 'bg-red-100 border border-solid border-red-150',
|
|
62
|
+
green: 'bg-green-100 border border-solid border-green-150',
|
|
63
|
+
yellow: 'bg-yellow-100 border border-solid border-yellow-150',
|
|
64
|
+
blue: 'bg-blue-100 border border-solid border-blue-150',
|
|
65
|
+
grey: 'bg-gray-200 border border-solid border-gray-400',
|
|
66
|
+
transparent: '',
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/Container/styles.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG;IACzB,YAAY;IACZ,UAAU;IACV,QAAQ;IACR,SAAS;IACT,UAAU;CACF,CAAA;AAEV,MAAM,sBAAsB,GAAG;IAC7B,YAAY;IACZ,UAAU;IACV,QAAQ;IACR,eAAe;IACf,cAAc;IACd,cAAc;CACN,CAAA;AAEV,MAAM,iBAAiB,GAAG;IACxB,aAAa;IACb,KAAK;IACL,OAAO;IACP,OAAO;IACP,QAAQ;IACR,MAAM;IACN,MAAM;CACE,CAAA;AAMV,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,UAAU,EAAE;QACV,YAAY,EAAE,aAAa;QAC3B,UAAU,EAAE,WAAW;QACvB,MAAM,EAAE,cAAc;QACtB,OAAO,EAAE,eAAe;QACxB,QAAQ,EAAE,gBAAgB;KAC3B;IACD,SAAS,EAAE;QACT,OAAO,EAAE,sBAAsB;QAC/B,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,aAAa;QACrB,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE,cAAc;KACxB;IACD,cAAc,EAAE;QACd,MAAM,EAAE,gBAAgB;QACxB,YAAY,EAAE,eAAe;QAC7B,UAAU,EAAE,aAAa;QACzB,eAAe,EAAE,iBAAiB;QAClC,cAAc,EAAE,gBAAgB;QAChC,cAAc,EAAE,gBAAgB;KACjC;IACD,SAAS,EAAE;QACT,MAAM,EAAE,UAAU;QAClB,aAAa,EAAE,kBAAkB;QACjC,gBAAgB,EAAE,kBAAkB;KACrC;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,cAAc,EAAE,mBAAmB;QACnC,MAAM,EAAE,aAAa;KACtB;CACO,CAAA;AAEV,MAAM,CAAC,MAAM,qBAAqB,GAAgC;IAChE,KAAK,EA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