react-asc 25.3.1 → 25.4.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/components/Tooltip/Tooltip.d.ts +2 -1
- package/components/Tooltip/tooltip.enums.d.ts +6 -0
- package/index.es.js +27 -13
- package/index.js +27 -13
- package/package.json +28 -28
- package/react-asc.scss +354 -354
- package/readme.md +91 -91
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { TooltipPlacement } from './tooltip.enums';
|
|
2
3
|
export interface ITooltipProps extends React.ComponentProps<'div'> {
|
|
3
|
-
placement?:
|
|
4
|
+
placement?: TooltipPlacement;
|
|
4
5
|
text?: string;
|
|
5
6
|
delay?: number;
|
|
6
7
|
isOpen?: boolean;
|
package/index.es.js
CHANGED
|
@@ -2026,8 +2026,16 @@ var css_248z$l = ".Tooltip-module_tooltipContainer__9ZWx3 {\n display: inline;\
|
|
|
2026
2026
|
var styles$l = {"tooltipContainer":"Tooltip-module_tooltipContainer__9ZWx3","tooltip":"Tooltip-module_tooltip__x5HOu","arrow":"Tooltip-module_arrow__B6lfe"};
|
|
2027
2027
|
styleInject(css_248z$l);
|
|
2028
2028
|
|
|
2029
|
+
var TooltipPlacement;
|
|
2030
|
+
(function (TooltipPlacement) {
|
|
2031
|
+
TooltipPlacement["top"] = "top";
|
|
2032
|
+
TooltipPlacement["bottom"] = "bottom";
|
|
2033
|
+
TooltipPlacement["right"] = "right";
|
|
2034
|
+
TooltipPlacement["left"] = "left";
|
|
2035
|
+
})(TooltipPlacement || (TooltipPlacement = {}));
|
|
2036
|
+
|
|
2029
2037
|
const Tooltip = (props) => {
|
|
2030
|
-
const { children, text, placement =
|
|
2038
|
+
const { children, text, placement = TooltipPlacement.bottom, isOpen = false, isShowClose = false, delay = 0 } = props;
|
|
2031
2039
|
const [popperInstance, setPopperInstance] = useState();
|
|
2032
2040
|
const [debounce, setDebounce] = useState(delay);
|
|
2033
2041
|
const [open, setOpen] = useState(isOpen);
|
|
@@ -2047,21 +2055,27 @@ const Tooltip = (props) => {
|
|
|
2047
2055
|
}, [delay]);
|
|
2048
2056
|
useEffect(() => {
|
|
2049
2057
|
if (open === true && refChild && refChild.current && refTooltip && refTooltip.current) {
|
|
2050
|
-
|
|
2051
|
-
placement: placement,
|
|
2052
|
-
modifiers: [
|
|
2053
|
-
{
|
|
2054
|
-
name: 'offset',
|
|
2055
|
-
options: { offset: [0, 8] }
|
|
2056
|
-
},
|
|
2057
|
-
]
|
|
2058
|
-
});
|
|
2059
|
-
setPopperInstance(popperInstance);
|
|
2058
|
+
showTooltip();
|
|
2060
2059
|
}
|
|
2061
2060
|
else {
|
|
2062
|
-
|
|
2061
|
+
hideTooltip();
|
|
2063
2062
|
}
|
|
2064
2063
|
}, [open]);
|
|
2064
|
+
const showTooltip = () => {
|
|
2065
|
+
const popperInstance = createPopper(refChild.current, refTooltip.current, {
|
|
2066
|
+
placement: placement,
|
|
2067
|
+
modifiers: [
|
|
2068
|
+
{
|
|
2069
|
+
name: 'offset',
|
|
2070
|
+
options: { offset: [0, 8] }
|
|
2071
|
+
},
|
|
2072
|
+
]
|
|
2073
|
+
});
|
|
2074
|
+
setPopperInstance(popperInstance);
|
|
2075
|
+
};
|
|
2076
|
+
const hideTooltip = () => {
|
|
2077
|
+
popperInstance?.destroy();
|
|
2078
|
+
};
|
|
2065
2079
|
const handleMouseOver = () => {
|
|
2066
2080
|
setShow(true);
|
|
2067
2081
|
};
|
|
@@ -2078,7 +2092,7 @@ const Tooltip = (props) => {
|
|
|
2078
2092
|
setShow(false);
|
|
2079
2093
|
};
|
|
2080
2094
|
useOnDestroy(() => {
|
|
2081
|
-
|
|
2095
|
+
hideTooltip();
|
|
2082
2096
|
});
|
|
2083
2097
|
return (React.createElement(React.Fragment, null,
|
|
2084
2098
|
React.createElement("div", { ref: refChild, className: styles$l.tooltipContainer, onMouseOver: handleMouseOver, onMouseLeave: handleMouseLeave, onFocus: handleFocus, onBlur: handleBlur }, children),
|
package/index.js
CHANGED
|
@@ -2035,8 +2035,16 @@ var css_248z$l = ".Tooltip-module_tooltipContainer__9ZWx3 {\n display: inline;\
|
|
|
2035
2035
|
var styles$l = {"tooltipContainer":"Tooltip-module_tooltipContainer__9ZWx3","tooltip":"Tooltip-module_tooltip__x5HOu","arrow":"Tooltip-module_arrow__B6lfe"};
|
|
2036
2036
|
styleInject(css_248z$l);
|
|
2037
2037
|
|
|
2038
|
+
var TooltipPlacement;
|
|
2039
|
+
(function (TooltipPlacement) {
|
|
2040
|
+
TooltipPlacement["top"] = "top";
|
|
2041
|
+
TooltipPlacement["bottom"] = "bottom";
|
|
2042
|
+
TooltipPlacement["right"] = "right";
|
|
2043
|
+
TooltipPlacement["left"] = "left";
|
|
2044
|
+
})(TooltipPlacement || (TooltipPlacement = {}));
|
|
2045
|
+
|
|
2038
2046
|
const Tooltip = (props) => {
|
|
2039
|
-
const { children, text, placement =
|
|
2047
|
+
const { children, text, placement = TooltipPlacement.bottom, isOpen = false, isShowClose = false, delay = 0 } = props;
|
|
2040
2048
|
const [popperInstance, setPopperInstance] = React.useState();
|
|
2041
2049
|
const [debounce, setDebounce] = React.useState(delay);
|
|
2042
2050
|
const [open, setOpen] = React.useState(isOpen);
|
|
@@ -2056,21 +2064,27 @@ const Tooltip = (props) => {
|
|
|
2056
2064
|
}, [delay]);
|
|
2057
2065
|
React.useEffect(() => {
|
|
2058
2066
|
if (open === true && refChild && refChild.current && refTooltip && refTooltip.current) {
|
|
2059
|
-
|
|
2060
|
-
placement: placement,
|
|
2061
|
-
modifiers: [
|
|
2062
|
-
{
|
|
2063
|
-
name: 'offset',
|
|
2064
|
-
options: { offset: [0, 8] }
|
|
2065
|
-
},
|
|
2066
|
-
]
|
|
2067
|
-
});
|
|
2068
|
-
setPopperInstance(popperInstance);
|
|
2067
|
+
showTooltip();
|
|
2069
2068
|
}
|
|
2070
2069
|
else {
|
|
2071
|
-
|
|
2070
|
+
hideTooltip();
|
|
2072
2071
|
}
|
|
2073
2072
|
}, [open]);
|
|
2073
|
+
const showTooltip = () => {
|
|
2074
|
+
const popperInstance = core.createPopper(refChild.current, refTooltip.current, {
|
|
2075
|
+
placement: placement,
|
|
2076
|
+
modifiers: [
|
|
2077
|
+
{
|
|
2078
|
+
name: 'offset',
|
|
2079
|
+
options: { offset: [0, 8] }
|
|
2080
|
+
},
|
|
2081
|
+
]
|
|
2082
|
+
});
|
|
2083
|
+
setPopperInstance(popperInstance);
|
|
2084
|
+
};
|
|
2085
|
+
const hideTooltip = () => {
|
|
2086
|
+
popperInstance?.destroy();
|
|
2087
|
+
};
|
|
2074
2088
|
const handleMouseOver = () => {
|
|
2075
2089
|
setShow(true);
|
|
2076
2090
|
};
|
|
@@ -2087,7 +2101,7 @@ const Tooltip = (props) => {
|
|
|
2087
2101
|
setShow(false);
|
|
2088
2102
|
};
|
|
2089
2103
|
useOnDestroy(() => {
|
|
2090
|
-
|
|
2104
|
+
hideTooltip();
|
|
2091
2105
|
});
|
|
2092
2106
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2093
2107
|
React__default["default"].createElement("div", { ref: refChild, className: styles$l.tooltipContainer, onMouseOver: handleMouseOver, onMouseLeave: handleMouseLeave, onFocus: handleFocus, onBlur: handleBlur }, children),
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-asc",
|
|
3
|
-
"version": "25.
|
|
4
|
-
"description": "handcrafted react components",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"module": "index.es.js",
|
|
7
|
-
"jsnext:main": "index.es.js",
|
|
8
|
-
"author": "Ardian Shala",
|
|
9
|
-
"homepage": "https://react-asc.netlify.app",
|
|
10
|
-
"license": "MIT",
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@popperjs/core": "2.11.5",
|
|
13
|
-
"react": "18.2.0",
|
|
14
|
-
"react-dom": "18.2.0",
|
|
15
|
-
"modern-normalize": "1.1.0"
|
|
16
|
-
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"pub": "npm publish --access public"
|
|
19
|
-
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
"react",
|
|
22
|
-
"component library",
|
|
23
|
-
"ui library",
|
|
24
|
-
"components",
|
|
25
|
-
"library",
|
|
26
|
-
"material"
|
|
27
|
-
]
|
|
28
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "react-asc",
|
|
3
|
+
"version": "25.4.0",
|
|
4
|
+
"description": "handcrafted react components",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"module": "index.es.js",
|
|
7
|
+
"jsnext:main": "index.es.js",
|
|
8
|
+
"author": "Ardian Shala",
|
|
9
|
+
"homepage": "https://react-asc.netlify.app",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@popperjs/core": "2.11.5",
|
|
13
|
+
"react": "18.2.0",
|
|
14
|
+
"react-dom": "18.2.0",
|
|
15
|
+
"modern-normalize": "1.1.0"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"pub": "npm publish --access public"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"react",
|
|
22
|
+
"component library",
|
|
23
|
+
"ui library",
|
|
24
|
+
"components",
|
|
25
|
+
"library",
|
|
26
|
+
"material"
|
|
27
|
+
]
|
|
28
|
+
}
|
package/react-asc.scss
CHANGED
|
@@ -1,354 +1,354 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--breakpoint-xs: 0;
|
|
3
|
-
--breakpoint-sm: 576px;
|
|
4
|
-
--breakpoint-md: 768px;
|
|
5
|
-
--breakpoint-lg: 992px;
|
|
6
|
-
--breakpoint-xl: 1200px;
|
|
7
|
-
--breakpoint-xxl: 1400px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
:root {
|
|
11
|
-
--buttonMinWidth: 62px;
|
|
12
|
-
--buttonPadding: 11px 15px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:root {
|
|
16
|
-
--primary-light: #6573c3;
|
|
17
|
-
--primary: #3f51b5;
|
|
18
|
-
--primary-dark: #2c387e;
|
|
19
|
-
--primary-contrast-text: #fff;
|
|
20
|
-
--primary-highlight: #d6dbf7;
|
|
21
|
-
|
|
22
|
-
--secondary-light: #e5e7eb;
|
|
23
|
-
--secondary: #8f8f8f;
|
|
24
|
-
--secondary-dark: #9c9da1;
|
|
25
|
-
--secondary-contrast-text: #fff;
|
|
26
|
-
--secondary-highlight: rgb(233, 233, 233);
|
|
27
|
-
|
|
28
|
-
--accent-light: #fd96b8;
|
|
29
|
-
--accent: #ff4081;
|
|
30
|
-
--accent-dark: #fd2c72;
|
|
31
|
-
--accent-contrast-text: #fff;
|
|
32
|
-
--accent-highlight: #fca9c5;
|
|
33
|
-
|
|
34
|
-
// rename!?
|
|
35
|
-
--light-light: #ffffff;
|
|
36
|
-
--light: #f8f9fa;
|
|
37
|
-
--light-dark: #ebebeb;
|
|
38
|
-
--light-contrast-text: #212529;
|
|
39
|
-
--light-highlight: #f8f9fa;
|
|
40
|
-
|
|
41
|
-
--dark-light: #616468;
|
|
42
|
-
--dark: #343a40;
|
|
43
|
-
--dark-dark: #343a40;
|
|
44
|
-
--dark-contrast-text: #fff;
|
|
45
|
-
--dark-highlight: #5e6164;
|
|
46
|
-
|
|
47
|
-
--white: #fff;
|
|
48
|
-
|
|
49
|
-
--bodyBg: white;
|
|
50
|
-
--bodyColor: #212529;
|
|
51
|
-
|
|
52
|
-
--highlight: rgba(204, 216, 224, 0.2); // ???
|
|
53
|
-
|
|
54
|
-
--shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
|
|
55
|
-
0px 1px 5px 0px rgba(0, 0, 0, 0.12);
|
|
56
|
-
|
|
57
|
-
--shadowColor: rgba(0, 0, 0, 0.12);
|
|
58
|
-
|
|
59
|
-
--muted: #6c757d !important;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
:root {
|
|
63
|
-
--fontFamily: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans",
|
|
64
|
-
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
65
|
-
--fontSize: 16px;
|
|
66
|
-
--fontWeight: 400;
|
|
67
|
-
|
|
68
|
-
--fontLineHeight: 1.5;
|
|
69
|
-
|
|
70
|
-
--textBody1FontSize: 13px;
|
|
71
|
-
--textBody1LineHeight: 18px;
|
|
72
|
-
|
|
73
|
-
--textBody2FontSize: 13px;
|
|
74
|
-
--textBody2LineHeight: 18px;
|
|
75
|
-
|
|
76
|
-
--textOverlineFontSize: 13px;
|
|
77
|
-
--textOverlineLineHeight: 18px;
|
|
78
|
-
--textOverlineTransform: uppercase;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
:root {
|
|
82
|
-
.ml-0 {
|
|
83
|
-
margin-left: var(--0);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.ml-1 {
|
|
87
|
-
margin-left: var(--1);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.ml-2 {
|
|
91
|
-
margin-left: var(--2);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.ml-3 {
|
|
95
|
-
margin-left: var(--3);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.ml-auto {
|
|
99
|
-
margin-left: var(--auto);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.mr-0 {
|
|
103
|
-
margin-right: var(--0);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.mr-1 {
|
|
107
|
-
margin-right: var(--1);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.mr-2 {
|
|
111
|
-
margin-right: var(--2);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.mr-3 {
|
|
115
|
-
margin-right: var(--3);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.mr-auto {
|
|
119
|
-
margin-right: var(--auto);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.mt-0 {
|
|
123
|
-
margin-top: var(--0);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.mt-1 {
|
|
127
|
-
margin-top: var(--1);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.mt-2 {
|
|
131
|
-
margin-top: var(--2);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.mt-3 {
|
|
135
|
-
margin-top: var(--3);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.mt-4 {
|
|
139
|
-
margin-top: var(--4);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.mb-0 {
|
|
143
|
-
margin-bottom: var(--0);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.mb-1 {
|
|
147
|
-
margin-bottom: var(--1);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.mb-2 {
|
|
151
|
-
margin-bottom: var(--2);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.mb-3 {
|
|
155
|
-
margin-bottom: var(--3);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
:root {
|
|
160
|
-
.pt-1 {
|
|
161
|
-
padding-top: var(--1);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.pt-2 {
|
|
165
|
-
padding-top: var(--2);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.pt-3 {
|
|
169
|
-
padding-top: var(--3);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.pb-1 {
|
|
173
|
-
padding-bottom: var(--1);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.pb-2 {
|
|
177
|
-
padding-bottom: var(--2);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.pb-3 {
|
|
181
|
-
padding-bottom: var(--3);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.pb-4 {
|
|
185
|
-
padding-bottom: var(--4);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.p-3 {
|
|
189
|
-
padding: var(--3);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.p-1 {
|
|
193
|
-
padding: var(--1);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.p-2 {
|
|
197
|
-
padding: var(--2);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.p-3 {
|
|
201
|
-
padding: var(--3);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.p-4 {
|
|
205
|
-
padding: var(--3);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.pt-0 {
|
|
209
|
-
padding-top: var(--0);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.pb-0 {
|
|
213
|
-
padding-bottom: var(--0);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
:root {
|
|
218
|
-
--borderRadius: 5px;
|
|
219
|
-
--0: 0px !important;
|
|
220
|
-
--1: 15px !important;
|
|
221
|
-
--2: 25px !important;
|
|
222
|
-
--3: 35px !important;
|
|
223
|
-
--4: 45px !important;
|
|
224
|
-
--auto: auto !important;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.input-group-append {
|
|
228
|
-
.btn {
|
|
229
|
-
min-width: auto;
|
|
230
|
-
|
|
231
|
-
.svg-icon {
|
|
232
|
-
margin-left: 0;
|
|
233
|
-
margin-right: 0;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.text-muted {
|
|
239
|
-
color: var(--muted);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.flex-1 {
|
|
243
|
-
flex: 1;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.d-flex {
|
|
247
|
-
display: flex !important;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.justify-content-center {
|
|
251
|
-
justify-content: center !important;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.align-items-center {
|
|
255
|
-
align-items: center !important;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.flex-wrap {
|
|
259
|
-
flex-wrap: wrap;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.flex-row {
|
|
263
|
-
flex-direction: row;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.flex-row-reverse {
|
|
267
|
-
flex-direction: row-reverse;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.flex-column {
|
|
271
|
-
flex-direction: column;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.flex-column-reverse {
|
|
275
|
-
flex-direction: column-reverse;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.w-100 {
|
|
279
|
-
width: 100%;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.h-100 {
|
|
283
|
-
height: 100%;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.text-center {
|
|
287
|
-
text-align: center;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.text-uppercase {
|
|
291
|
-
text-transform: uppercase;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.rounded-pill {
|
|
295
|
-
border-radius: 50rem !important;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.fw-bold {
|
|
299
|
-
font-weight: 700!important;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
@media (max-width: 576px) {
|
|
303
|
-
.flex-row {
|
|
304
|
-
flex-direction: column !important;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
@media (min-width: 768px) {
|
|
308
|
-
.justify-content-md-center {
|
|
309
|
-
justify-content: center !important;
|
|
310
|
-
}
|
|
311
|
-
.align-items-md-center {
|
|
312
|
-
align-items: center !important;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.modal-open {
|
|
317
|
-
overflow: hidden !important;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
* {
|
|
322
|
-
min-width: 0;
|
|
323
|
-
min-height: 0;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
label.required {
|
|
327
|
-
&::after {
|
|
328
|
-
display: inline-block;
|
|
329
|
-
line-height: 0.8;
|
|
330
|
-
content: "*";
|
|
331
|
-
vertical-align: text-top;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.overline {
|
|
336
|
-
font-size: var(--textOverlineFontSize) !important;
|
|
337
|
-
line-height: var(--textOverlineLineHeight) !important;
|
|
338
|
-
text-transform: var(--textOverlineTransform) !important;
|
|
339
|
-
font-weight: bold;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.body1 {
|
|
343
|
-
font-size: var(--textBody1FontSize) !important;
|
|
344
|
-
line-height: var(--textBody1LineHeight) !important;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
.body2 {
|
|
348
|
-
font-size: var(--textBody2FontSize) !important;
|
|
349
|
-
line-height: var(--textBody2LineHeight) !important;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.uppercase {
|
|
353
|
-
text-transform: uppercase !important;
|
|
354
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--breakpoint-xs: 0;
|
|
3
|
+
--breakpoint-sm: 576px;
|
|
4
|
+
--breakpoint-md: 768px;
|
|
5
|
+
--breakpoint-lg: 992px;
|
|
6
|
+
--breakpoint-xl: 1200px;
|
|
7
|
+
--breakpoint-xxl: 1400px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
--buttonMinWidth: 62px;
|
|
12
|
+
--buttonPadding: 11px 15px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:root {
|
|
16
|
+
--primary-light: #6573c3;
|
|
17
|
+
--primary: #3f51b5;
|
|
18
|
+
--primary-dark: #2c387e;
|
|
19
|
+
--primary-contrast-text: #fff;
|
|
20
|
+
--primary-highlight: #d6dbf7;
|
|
21
|
+
|
|
22
|
+
--secondary-light: #e5e7eb;
|
|
23
|
+
--secondary: #8f8f8f;
|
|
24
|
+
--secondary-dark: #9c9da1;
|
|
25
|
+
--secondary-contrast-text: #fff;
|
|
26
|
+
--secondary-highlight: rgb(233, 233, 233);
|
|
27
|
+
|
|
28
|
+
--accent-light: #fd96b8;
|
|
29
|
+
--accent: #ff4081;
|
|
30
|
+
--accent-dark: #fd2c72;
|
|
31
|
+
--accent-contrast-text: #fff;
|
|
32
|
+
--accent-highlight: #fca9c5;
|
|
33
|
+
|
|
34
|
+
// rename!?
|
|
35
|
+
--light-light: #ffffff;
|
|
36
|
+
--light: #f8f9fa;
|
|
37
|
+
--light-dark: #ebebeb;
|
|
38
|
+
--light-contrast-text: #212529;
|
|
39
|
+
--light-highlight: #f8f9fa;
|
|
40
|
+
|
|
41
|
+
--dark-light: #616468;
|
|
42
|
+
--dark: #343a40;
|
|
43
|
+
--dark-dark: #343a40;
|
|
44
|
+
--dark-contrast-text: #fff;
|
|
45
|
+
--dark-highlight: #5e6164;
|
|
46
|
+
|
|
47
|
+
--white: #fff;
|
|
48
|
+
|
|
49
|
+
--bodyBg: white;
|
|
50
|
+
--bodyColor: #212529;
|
|
51
|
+
|
|
52
|
+
--highlight: rgba(204, 216, 224, 0.2); // ???
|
|
53
|
+
|
|
54
|
+
--shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
|
|
55
|
+
0px 1px 5px 0px rgba(0, 0, 0, 0.12);
|
|
56
|
+
|
|
57
|
+
--shadowColor: rgba(0, 0, 0, 0.12);
|
|
58
|
+
|
|
59
|
+
--muted: #6c757d !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:root {
|
|
63
|
+
--fontFamily: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans",
|
|
64
|
+
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
65
|
+
--fontSize: 16px;
|
|
66
|
+
--fontWeight: 400;
|
|
67
|
+
|
|
68
|
+
--fontLineHeight: 1.5;
|
|
69
|
+
|
|
70
|
+
--textBody1FontSize: 13px;
|
|
71
|
+
--textBody1LineHeight: 18px;
|
|
72
|
+
|
|
73
|
+
--textBody2FontSize: 13px;
|
|
74
|
+
--textBody2LineHeight: 18px;
|
|
75
|
+
|
|
76
|
+
--textOverlineFontSize: 13px;
|
|
77
|
+
--textOverlineLineHeight: 18px;
|
|
78
|
+
--textOverlineTransform: uppercase;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:root {
|
|
82
|
+
.ml-0 {
|
|
83
|
+
margin-left: var(--0);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ml-1 {
|
|
87
|
+
margin-left: var(--1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ml-2 {
|
|
91
|
+
margin-left: var(--2);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.ml-3 {
|
|
95
|
+
margin-left: var(--3);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ml-auto {
|
|
99
|
+
margin-left: var(--auto);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mr-0 {
|
|
103
|
+
margin-right: var(--0);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.mr-1 {
|
|
107
|
+
margin-right: var(--1);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.mr-2 {
|
|
111
|
+
margin-right: var(--2);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.mr-3 {
|
|
115
|
+
margin-right: var(--3);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.mr-auto {
|
|
119
|
+
margin-right: var(--auto);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.mt-0 {
|
|
123
|
+
margin-top: var(--0);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.mt-1 {
|
|
127
|
+
margin-top: var(--1);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.mt-2 {
|
|
131
|
+
margin-top: var(--2);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.mt-3 {
|
|
135
|
+
margin-top: var(--3);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.mt-4 {
|
|
139
|
+
margin-top: var(--4);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.mb-0 {
|
|
143
|
+
margin-bottom: var(--0);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.mb-1 {
|
|
147
|
+
margin-bottom: var(--1);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.mb-2 {
|
|
151
|
+
margin-bottom: var(--2);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.mb-3 {
|
|
155
|
+
margin-bottom: var(--3);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:root {
|
|
160
|
+
.pt-1 {
|
|
161
|
+
padding-top: var(--1);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.pt-2 {
|
|
165
|
+
padding-top: var(--2);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.pt-3 {
|
|
169
|
+
padding-top: var(--3);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.pb-1 {
|
|
173
|
+
padding-bottom: var(--1);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.pb-2 {
|
|
177
|
+
padding-bottom: var(--2);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.pb-3 {
|
|
181
|
+
padding-bottom: var(--3);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.pb-4 {
|
|
185
|
+
padding-bottom: var(--4);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.p-3 {
|
|
189
|
+
padding: var(--3);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.p-1 {
|
|
193
|
+
padding: var(--1);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.p-2 {
|
|
197
|
+
padding: var(--2);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.p-3 {
|
|
201
|
+
padding: var(--3);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.p-4 {
|
|
205
|
+
padding: var(--3);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.pt-0 {
|
|
209
|
+
padding-top: var(--0);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.pb-0 {
|
|
213
|
+
padding-bottom: var(--0);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
:root {
|
|
218
|
+
--borderRadius: 5px;
|
|
219
|
+
--0: 0px !important;
|
|
220
|
+
--1: 15px !important;
|
|
221
|
+
--2: 25px !important;
|
|
222
|
+
--3: 35px !important;
|
|
223
|
+
--4: 45px !important;
|
|
224
|
+
--auto: auto !important;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.input-group-append {
|
|
228
|
+
.btn {
|
|
229
|
+
min-width: auto;
|
|
230
|
+
|
|
231
|
+
.svg-icon {
|
|
232
|
+
margin-left: 0;
|
|
233
|
+
margin-right: 0;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.text-muted {
|
|
239
|
+
color: var(--muted);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.flex-1 {
|
|
243
|
+
flex: 1;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.d-flex {
|
|
247
|
+
display: flex !important;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.justify-content-center {
|
|
251
|
+
justify-content: center !important;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.align-items-center {
|
|
255
|
+
align-items: center !important;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.flex-wrap {
|
|
259
|
+
flex-wrap: wrap;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.flex-row {
|
|
263
|
+
flex-direction: row;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.flex-row-reverse {
|
|
267
|
+
flex-direction: row-reverse;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.flex-column {
|
|
271
|
+
flex-direction: column;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.flex-column-reverse {
|
|
275
|
+
flex-direction: column-reverse;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.w-100 {
|
|
279
|
+
width: 100%;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.h-100 {
|
|
283
|
+
height: 100%;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.text-center {
|
|
287
|
+
text-align: center;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.text-uppercase {
|
|
291
|
+
text-transform: uppercase;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.rounded-pill {
|
|
295
|
+
border-radius: 50rem !important;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.fw-bold {
|
|
299
|
+
font-weight: 700!important;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@media (max-width: 576px) {
|
|
303
|
+
.flex-row {
|
|
304
|
+
flex-direction: column !important;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
@media (min-width: 768px) {
|
|
308
|
+
.justify-content-md-center {
|
|
309
|
+
justify-content: center !important;
|
|
310
|
+
}
|
|
311
|
+
.align-items-md-center {
|
|
312
|
+
align-items: center !important;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.modal-open {
|
|
317
|
+
overflow: hidden !important;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
* {
|
|
322
|
+
min-width: 0;
|
|
323
|
+
min-height: 0;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
label.required {
|
|
327
|
+
&::after {
|
|
328
|
+
display: inline-block;
|
|
329
|
+
line-height: 0.8;
|
|
330
|
+
content: "*";
|
|
331
|
+
vertical-align: text-top;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.overline {
|
|
336
|
+
font-size: var(--textOverlineFontSize) !important;
|
|
337
|
+
line-height: var(--textOverlineLineHeight) !important;
|
|
338
|
+
text-transform: var(--textOverlineTransform) !important;
|
|
339
|
+
font-weight: bold;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.body1 {
|
|
343
|
+
font-size: var(--textBody1FontSize) !important;
|
|
344
|
+
line-height: var(--textBody1LineHeight) !important;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.body2 {
|
|
348
|
+
font-size: var(--textBody2FontSize) !important;
|
|
349
|
+
line-height: var(--textBody2LineHeight) !important;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.uppercase {
|
|
353
|
+
text-transform: uppercase !important;
|
|
354
|
+
}
|
package/readme.md
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
# react-asc
|
|
2
|
-
|
|
3
|
-
handcrafted components inspired by Material Design and bundled with rollup.
|
|
4
|
-
|
|
5
|
-
## showcase
|
|
6
|
-
|
|
7
|
-
react-asc interactive showcase [link](https://react-asc.netlify.app)
|
|
8
|
-
|
|
9
|
-
## usage
|
|
10
|
-
|
|
11
|
-
### install package
|
|
12
|
-
|
|
13
|
-
`npm install react-asc`
|
|
14
|
-
|
|
15
|
-
### install modern-normalize
|
|
16
|
-
|
|
17
|
-
`npm install modern-normalize`
|
|
18
|
-
|
|
19
|
-
### Include styles
|
|
20
|
-
|
|
21
|
-
```scss
|
|
22
|
-
@import "modern-normalize";
|
|
23
|
-
@import "react-asc/react-asc.scss";
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### Usage
|
|
27
|
-
|
|
28
|
-
```js
|
|
29
|
-
import React from "react";
|
|
30
|
-
import { Button } from "react-asc";
|
|
31
|
-
|
|
32
|
-
const MyApp = () => {
|
|
33
|
-
return <Button>some button</Button>;
|
|
34
|
-
};
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
## TypeScript
|
|
39
|
-
react-asc provides built-in ts definition
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## Included Components
|
|
43
|
-
|
|
44
|
-
- Alert (beta)
|
|
45
|
-
- AppBar
|
|
46
|
-
- AutoComplete (beta)
|
|
47
|
-
- Backdrop
|
|
48
|
-
- Badge
|
|
49
|
-
- Breadcrumb
|
|
50
|
-
- Button
|
|
51
|
-
- ButtonGroup
|
|
52
|
-
- Card
|
|
53
|
-
- Checkbox
|
|
54
|
-
- Chip
|
|
55
|
-
- CssTransition
|
|
56
|
-
- ConditionalWrapper
|
|
57
|
-
- DateSelect
|
|
58
|
-
- Drawer
|
|
59
|
-
- ExpansionPanel
|
|
60
|
-
- FileInput
|
|
61
|
-
- FloatingActionButton
|
|
62
|
-
- Form (beta)
|
|
63
|
-
- Grid
|
|
64
|
-
- Icon
|
|
65
|
-
- IconButton
|
|
66
|
-
- Link
|
|
67
|
-
- List
|
|
68
|
-
- LoadingIndicator
|
|
69
|
-
- Menu
|
|
70
|
-
- Modal + ModalService
|
|
71
|
-
- NumberSelect
|
|
72
|
-
Portal
|
|
73
|
-
- Select
|
|
74
|
-
- Sidebar
|
|
75
|
-
- Skeleton (Avatar, Image, Text, SkeletonFooter)
|
|
76
|
-
- Snackbar + SnackbarService
|
|
77
|
-
- SpeedDial
|
|
78
|
-
- Stepper (beta)
|
|
79
|
-
- Table (beta)
|
|
80
|
-
- Tabs
|
|
81
|
-
- Textarea
|
|
82
|
-
- TimeSelect
|
|
83
|
-
- Tooltip
|
|
84
|
-
- TreeView (beta)
|
|
85
|
-
- Typography
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
## Credit
|
|
89
|
-
|
|
90
|
-
uses fontawesome icons as SVGs
|
|
91
|
-
https://fontawesome.com/license
|
|
1
|
+
# react-asc
|
|
2
|
+
|
|
3
|
+
handcrafted components inspired by Material Design and bundled with rollup.
|
|
4
|
+
|
|
5
|
+
## showcase
|
|
6
|
+
|
|
7
|
+
react-asc interactive showcase [link](https://react-asc.netlify.app)
|
|
8
|
+
|
|
9
|
+
## usage
|
|
10
|
+
|
|
11
|
+
### install package
|
|
12
|
+
|
|
13
|
+
`npm install react-asc`
|
|
14
|
+
|
|
15
|
+
### install modern-normalize
|
|
16
|
+
|
|
17
|
+
`npm install modern-normalize`
|
|
18
|
+
|
|
19
|
+
### Include styles
|
|
20
|
+
|
|
21
|
+
```scss
|
|
22
|
+
@import "modern-normalize";
|
|
23
|
+
@import "react-asc/react-asc.scss";
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Usage
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import React from "react";
|
|
30
|
+
import { Button } from "react-asc";
|
|
31
|
+
|
|
32
|
+
const MyApp = () => {
|
|
33
|
+
return <Button>some button</Button>;
|
|
34
|
+
};
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## TypeScript
|
|
39
|
+
react-asc provides built-in ts definition
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## Included Components
|
|
43
|
+
|
|
44
|
+
- Alert (beta)
|
|
45
|
+
- AppBar
|
|
46
|
+
- AutoComplete (beta)
|
|
47
|
+
- Backdrop
|
|
48
|
+
- Badge
|
|
49
|
+
- Breadcrumb
|
|
50
|
+
- Button
|
|
51
|
+
- ButtonGroup
|
|
52
|
+
- Card
|
|
53
|
+
- Checkbox
|
|
54
|
+
- Chip
|
|
55
|
+
- CssTransition
|
|
56
|
+
- ConditionalWrapper
|
|
57
|
+
- DateSelect
|
|
58
|
+
- Drawer
|
|
59
|
+
- ExpansionPanel
|
|
60
|
+
- FileInput
|
|
61
|
+
- FloatingActionButton
|
|
62
|
+
- Form (beta)
|
|
63
|
+
- Grid
|
|
64
|
+
- Icon
|
|
65
|
+
- IconButton
|
|
66
|
+
- Link
|
|
67
|
+
- List
|
|
68
|
+
- LoadingIndicator
|
|
69
|
+
- Menu
|
|
70
|
+
- Modal + ModalService
|
|
71
|
+
- NumberSelect
|
|
72
|
+
Portal
|
|
73
|
+
- Select
|
|
74
|
+
- Sidebar
|
|
75
|
+
- Skeleton (Avatar, Image, Text, SkeletonFooter)
|
|
76
|
+
- Snackbar + SnackbarService
|
|
77
|
+
- SpeedDial
|
|
78
|
+
- Stepper (beta)
|
|
79
|
+
- Table (beta)
|
|
80
|
+
- Tabs
|
|
81
|
+
- Textarea
|
|
82
|
+
- TimeSelect
|
|
83
|
+
- Tooltip
|
|
84
|
+
- TreeView (beta)
|
|
85
|
+
- Typography
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## Credit
|
|
89
|
+
|
|
90
|
+
uses fontawesome icons as SVGs
|
|
91
|
+
https://fontawesome.com/license
|