@rango-dev/ui 0.1.16-next.4 → 0.1.16-next.5
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/components/Alert/index.d.ts +1 -0
- package/dist/components/Alert/index.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +3 -2
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +4 -4
- package/dist/theme.d.ts +113 -1
- package/dist/theme.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Alert/index.ts +1 -0
- package/src/components/Modal/Modal.tsx +6 -15
- package/src/theme.ts +1 -1
package/dist/theme.d.ts
CHANGED
|
@@ -899,7 +899,119 @@ export declare const styled: <Type extends import("@stitches/react/types/util").
|
|
|
899
899
|
};
|
|
900
900
|
zIndices: {};
|
|
901
901
|
transitions: {};
|
|
902
|
-
}, DefaultThemeMap, {}>; })[]) => () => string
|
|
902
|
+
}, DefaultThemeMap, {}>; })[]) => () => string, config: {
|
|
903
|
+
prefix: "";
|
|
904
|
+
media: {
|
|
905
|
+
sm: string;
|
|
906
|
+
md: string;
|
|
907
|
+
lg: string;
|
|
908
|
+
};
|
|
909
|
+
theme: {
|
|
910
|
+
colors: {
|
|
911
|
+
primary: string;
|
|
912
|
+
primary100: string;
|
|
913
|
+
primary200: string;
|
|
914
|
+
primary300: string;
|
|
915
|
+
primary400: string;
|
|
916
|
+
primary500: string;
|
|
917
|
+
primary600: string;
|
|
918
|
+
primary700: string;
|
|
919
|
+
primary800: string;
|
|
920
|
+
primary900: string;
|
|
921
|
+
surface: string;
|
|
922
|
+
neutral100: string;
|
|
923
|
+
neutral200: string;
|
|
924
|
+
neutral300: string;
|
|
925
|
+
neutral400: string;
|
|
926
|
+
neutral500: string;
|
|
927
|
+
neutral600: string;
|
|
928
|
+
neutral700: string;
|
|
929
|
+
neutral800: string;
|
|
930
|
+
neutral900: string;
|
|
931
|
+
background: string;
|
|
932
|
+
foreground: string;
|
|
933
|
+
success: string;
|
|
934
|
+
success100: string;
|
|
935
|
+
success300: string;
|
|
936
|
+
success500: string;
|
|
937
|
+
success700: string;
|
|
938
|
+
warning: string;
|
|
939
|
+
warning100: string;
|
|
940
|
+
warning300: string;
|
|
941
|
+
warning500: string;
|
|
942
|
+
warning700: string;
|
|
943
|
+
error: string;
|
|
944
|
+
error100: string;
|
|
945
|
+
error300: string;
|
|
946
|
+
error500: string;
|
|
947
|
+
error700: string;
|
|
948
|
+
white: string;
|
|
949
|
+
};
|
|
950
|
+
space: {
|
|
951
|
+
2: string;
|
|
952
|
+
4: string;
|
|
953
|
+
6: string;
|
|
954
|
+
8: string;
|
|
955
|
+
10: string;
|
|
956
|
+
12: string;
|
|
957
|
+
16: string;
|
|
958
|
+
20: string;
|
|
959
|
+
24: string;
|
|
960
|
+
28: string;
|
|
961
|
+
30: string;
|
|
962
|
+
32: string;
|
|
963
|
+
};
|
|
964
|
+
fontSizes: {
|
|
965
|
+
10: string;
|
|
966
|
+
12: string;
|
|
967
|
+
14: string;
|
|
968
|
+
16: string;
|
|
969
|
+
18: string;
|
|
970
|
+
20: string;
|
|
971
|
+
24: string;
|
|
972
|
+
32: string;
|
|
973
|
+
36: string;
|
|
974
|
+
40: string;
|
|
975
|
+
48: string;
|
|
976
|
+
};
|
|
977
|
+
fonts: {};
|
|
978
|
+
fontWeights: {
|
|
979
|
+
400: string;
|
|
980
|
+
500: string;
|
|
981
|
+
600: string;
|
|
982
|
+
700: string;
|
|
983
|
+
};
|
|
984
|
+
lineHeights: {};
|
|
985
|
+
letterSpacings: {};
|
|
986
|
+
sizes: {
|
|
987
|
+
4: string;
|
|
988
|
+
6: string;
|
|
989
|
+
8: string;
|
|
990
|
+
12: string;
|
|
991
|
+
16: string;
|
|
992
|
+
20: string;
|
|
993
|
+
24: string;
|
|
994
|
+
28: string;
|
|
995
|
+
32: string;
|
|
996
|
+
36: string;
|
|
997
|
+
40: string;
|
|
998
|
+
48: string;
|
|
999
|
+
};
|
|
1000
|
+
borderWidths: {};
|
|
1001
|
+
borderStyles: {};
|
|
1002
|
+
radii: {
|
|
1003
|
+
5: string;
|
|
1004
|
+
10: string;
|
|
1005
|
+
};
|
|
1006
|
+
shadows: {
|
|
1007
|
+
s: string;
|
|
1008
|
+
};
|
|
1009
|
+
zIndices: {};
|
|
1010
|
+
transitions: {};
|
|
1011
|
+
};
|
|
1012
|
+
themeMap: DefaultThemeMap;
|
|
1013
|
+
utils: {};
|
|
1014
|
+
};
|
|
903
1015
|
export declare const lightTheme: string & {
|
|
904
1016
|
className: string;
|
|
905
1017
|
selector: string;
|
package/dist/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AA4H/D,eAAO,MAAQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAAE,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4KAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWnE,CAAC;AAEH,eAAO,MAAM,UAAU;;;gEAAkB,CAAC;AAE1C,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;MAkBpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSS } from '@stitches/react';
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
|
-
import { styled } from '../../theme';
|
|
4
|
+
import { config, styled } from '../../theme';
|
|
5
5
|
import { CloseIcon } from '../Icon/CloseIcon';
|
|
6
6
|
import { Typography } from '../Typography';
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ export interface PropTypes {
|
|
|
11
11
|
onClose: () => void;
|
|
12
12
|
content: React.ReactNode;
|
|
13
13
|
action?: React.ReactNode;
|
|
14
|
-
containerStyle?:
|
|
14
|
+
containerStyle?: CSS<typeof config>;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const BackDrop = styled('div', {
|
|
@@ -25,7 +25,6 @@ const BackDrop = styled('div', {
|
|
|
25
25
|
height: '100vh',
|
|
26
26
|
backgroundColor: 'rgba(0,0,0,.1)',
|
|
27
27
|
zIndex: 10,
|
|
28
|
-
|
|
29
28
|
});
|
|
30
29
|
|
|
31
30
|
const ModalContainer = styled('div', {
|
|
@@ -48,16 +47,8 @@ const ModalHeader = styled('div', {
|
|
|
48
47
|
marginBottom: '$16',
|
|
49
48
|
});
|
|
50
49
|
|
|
51
|
-
|
|
52
50
|
export function Modal(props: PropTypes) {
|
|
53
|
-
const {
|
|
54
|
-
title,
|
|
55
|
-
content,
|
|
56
|
-
open,
|
|
57
|
-
onClose,
|
|
58
|
-
containerStyle,
|
|
59
|
-
action,
|
|
60
|
-
} = props;
|
|
51
|
+
const { title, content, open, onClose, containerStyle, action } = props;
|
|
61
52
|
|
|
62
53
|
const handleBackDropClick = (event: React.MouseEvent<HTMLDivElement>) => {
|
|
63
54
|
if (event.target === event.currentTarget) onClose();
|
|
@@ -71,7 +62,7 @@ export function Modal(props: PropTypes) {
|
|
|
71
62
|
{open &&
|
|
72
63
|
createPortal(
|
|
73
64
|
<BackDrop onClick={handleBackDropClick}>
|
|
74
|
-
<ModalContainer
|
|
65
|
+
<ModalContainer css={containerStyle}>
|
|
75
66
|
<ModalHeader>
|
|
76
67
|
<Typography variant="h4">{title}</Typography>
|
|
77
68
|
<Row>
|
|
@@ -82,7 +73,7 @@ export function Modal(props: PropTypes) {
|
|
|
82
73
|
{content}
|
|
83
74
|
</ModalContainer>
|
|
84
75
|
</BackDrop>,
|
|
85
|
-
document.body
|
|
76
|
+
document.body,
|
|
86
77
|
)}
|
|
87
78
|
</>
|
|
88
79
|
);
|
package/src/theme.ts
CHANGED
|
@@ -125,7 +125,7 @@ const utils = {
|
|
|
125
125
|
|
|
126
126
|
const typedCreateStiches = createStitches as CreateStitches;
|
|
127
127
|
|
|
128
|
-
export const { styled, css, createTheme, keyframes, globalCss } = typedCreateStiches<
|
|
128
|
+
export const { styled, css, createTheme, keyframes, globalCss, config } = typedCreateStiches<
|
|
129
129
|
'',
|
|
130
130
|
typeof media,
|
|
131
131
|
typeof theme,
|