@ttoss/components 2.2.6 → 2.2.8
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/Drawer/index.d.ts +1 -1
- package/dist/esm/Drawer/index.js +48 -37
- package/dist/esm/Menu/index.js +51 -38
- package/package.json +6 -6
package/dist/Drawer/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
import { BoxProps } from '@ttoss/ui';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
import DrawerUi from 'react-modern-drawer';
|
|
5
5
|
|
|
6
6
|
type DrawerUiProps = React.ComponentProps<typeof DrawerUi>;
|
package/dist/esm/Drawer/index.js
CHANGED
|
@@ -2,51 +2,62 @@
|
|
|
2
2
|
|
|
3
3
|
// src/components/Drawer/Drawer.tsx
|
|
4
4
|
import { Box } from "@ttoss/ui";
|
|
5
|
-
import { css as createClassName } from "@emotion/css";
|
|
6
5
|
import DrawerUi from "react-modern-drawer";
|
|
7
6
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
var reactModernDrawerClassName = createClassName(`
|
|
9
|
-
.EZDrawer .EZDrawer__checkbox {
|
|
10
|
-
display: none;
|
|
11
|
-
}
|
|
12
|
-
.EZDrawer .EZDrawer__checkbox:checked ~ .EZDrawer__overlay {
|
|
13
|
-
display: block;
|
|
14
|
-
opacity: 1;
|
|
15
|
-
}
|
|
16
|
-
.EZDrawer .EZDrawer__checkbox:checked ~ .EZDrawer__container {
|
|
17
|
-
visibility: visible;
|
|
18
|
-
transform: translate3d(0, 0, 0) !important;
|
|
19
|
-
}
|
|
20
|
-
.EZDrawer .EZDrawer__overlay {
|
|
21
|
-
display: none;
|
|
22
|
-
height: 100vh;
|
|
23
|
-
left: 0;
|
|
24
|
-
position: fixed;
|
|
25
|
-
top: 0;
|
|
26
|
-
width: 100%;
|
|
27
|
-
}
|
|
28
|
-
.EZDrawer .EZDrawer__container {
|
|
29
|
-
position: fixed;
|
|
30
|
-
visibility: hidden;
|
|
31
|
-
background: white;
|
|
32
|
-
transition: all;
|
|
33
|
-
box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);
|
|
34
|
-
}`);
|
|
35
7
|
var Drawer = ({
|
|
36
8
|
children,
|
|
37
9
|
sx,
|
|
38
10
|
...props
|
|
39
11
|
}) => {
|
|
40
|
-
return /* @__PURE__ */jsx(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
12
|
+
return /* @__PURE__ */jsx(Box, {
|
|
13
|
+
"data-testid": "drawer-container",
|
|
14
|
+
sx: {
|
|
15
|
+
/**
|
|
16
|
+
* https://github.com/Farzin-Firoozi/react-modern-drawer/blob/master/src/styles.css
|
|
17
|
+
*/
|
|
18
|
+
zIndex: "dropdown",
|
|
19
|
+
width: "100%",
|
|
20
|
+
height: "100%",
|
|
21
|
+
".EZDrawer__checkbox": {
|
|
22
|
+
display: "none"
|
|
48
23
|
},
|
|
49
|
-
|
|
24
|
+
".EZDrawer__checkbox:checked ~ .EZDrawer__overlay": {
|
|
25
|
+
display: "block",
|
|
26
|
+
opacity: 1
|
|
27
|
+
},
|
|
28
|
+
".EZDrawer__checkbox:checked ~ .EZDrawer__container": {
|
|
29
|
+
visibility: "visible",
|
|
30
|
+
transform: "translate3d(0, 0, 0) !important"
|
|
31
|
+
},
|
|
32
|
+
".EZDrawer__overlay ": {
|
|
33
|
+
display: "none",
|
|
34
|
+
height: "100vh",
|
|
35
|
+
left: "0",
|
|
36
|
+
position: "fixed",
|
|
37
|
+
top: "0",
|
|
38
|
+
width: "100%"
|
|
39
|
+
},
|
|
40
|
+
".EZDrawer__container": {
|
|
41
|
+
position: "fixed",
|
|
42
|
+
visibility: "hidden",
|
|
43
|
+
backgroundColor: "navigation.background.muted.default",
|
|
44
|
+
transition: "all",
|
|
45
|
+
boxShadow: "0 0 10px 5px rgba(0, 0, 0, 0.1)",
|
|
46
|
+
paddingY: "6",
|
|
47
|
+
paddingX: "6",
|
|
48
|
+
overflowY: "auto"
|
|
49
|
+
},
|
|
50
|
+
...sx
|
|
51
|
+
},
|
|
52
|
+
children: /* @__PURE__ */jsx(DrawerUi, {
|
|
53
|
+
...props,
|
|
54
|
+
children: /* @__PURE__ */jsx(Box, {
|
|
55
|
+
sx: {
|
|
56
|
+
width: "100%",
|
|
57
|
+
height: "100%"
|
|
58
|
+
},
|
|
59
|
+
children
|
|
60
|
+
})
|
|
50
61
|
})
|
|
51
62
|
});
|
|
52
63
|
};
|
package/dist/esm/Menu/index.js
CHANGED
|
@@ -2263,51 +2263,62 @@ import { Box as Box2, Flex, Image, Text, useResponsiveValue } from "@ttoss/ui";
|
|
|
2263
2263
|
|
|
2264
2264
|
// src/components/Drawer/Drawer.tsx
|
|
2265
2265
|
import { Box } from "@ttoss/ui";
|
|
2266
|
-
import { css as createClassName } from "@emotion/css";
|
|
2267
2266
|
import DrawerUi from "react-modern-drawer";
|
|
2268
2267
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
2269
|
-
var reactModernDrawerClassName = createClassName(`
|
|
2270
|
-
.EZDrawer .EZDrawer__checkbox {
|
|
2271
|
-
display: none;
|
|
2272
|
-
}
|
|
2273
|
-
.EZDrawer .EZDrawer__checkbox:checked ~ .EZDrawer__overlay {
|
|
2274
|
-
display: block;
|
|
2275
|
-
opacity: 1;
|
|
2276
|
-
}
|
|
2277
|
-
.EZDrawer .EZDrawer__checkbox:checked ~ .EZDrawer__container {
|
|
2278
|
-
visibility: visible;
|
|
2279
|
-
transform: translate3d(0, 0, 0) !important;
|
|
2280
|
-
}
|
|
2281
|
-
.EZDrawer .EZDrawer__overlay {
|
|
2282
|
-
display: none;
|
|
2283
|
-
height: 100vh;
|
|
2284
|
-
left: 0;
|
|
2285
|
-
position: fixed;
|
|
2286
|
-
top: 0;
|
|
2287
|
-
width: 100%;
|
|
2288
|
-
}
|
|
2289
|
-
.EZDrawer .EZDrawer__container {
|
|
2290
|
-
position: fixed;
|
|
2291
|
-
visibility: hidden;
|
|
2292
|
-
background: white;
|
|
2293
|
-
transition: all;
|
|
2294
|
-
box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.1);
|
|
2295
|
-
}`);
|
|
2296
2268
|
var Drawer = ({
|
|
2297
2269
|
children,
|
|
2298
2270
|
sx,
|
|
2299
2271
|
...props
|
|
2300
2272
|
}) => {
|
|
2301
|
-
return /* @__PURE__ */jsx2(
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2273
|
+
return /* @__PURE__ */jsx2(Box, {
|
|
2274
|
+
"data-testid": "drawer-container",
|
|
2275
|
+
sx: {
|
|
2276
|
+
/**
|
|
2277
|
+
* https://github.com/Farzin-Firoozi/react-modern-drawer/blob/master/src/styles.css
|
|
2278
|
+
*/
|
|
2279
|
+
zIndex: "dropdown",
|
|
2280
|
+
width: "100%",
|
|
2281
|
+
height: "100%",
|
|
2282
|
+
".EZDrawer__checkbox": {
|
|
2283
|
+
display: "none"
|
|
2284
|
+
},
|
|
2285
|
+
".EZDrawer__checkbox:checked ~ .EZDrawer__overlay": {
|
|
2286
|
+
display: "block",
|
|
2287
|
+
opacity: 1
|
|
2288
|
+
},
|
|
2289
|
+
".EZDrawer__checkbox:checked ~ .EZDrawer__container": {
|
|
2290
|
+
visibility: "visible",
|
|
2291
|
+
transform: "translate3d(0, 0, 0) !important"
|
|
2309
2292
|
},
|
|
2310
|
-
|
|
2293
|
+
".EZDrawer__overlay ": {
|
|
2294
|
+
display: "none",
|
|
2295
|
+
height: "100vh",
|
|
2296
|
+
left: "0",
|
|
2297
|
+
position: "fixed",
|
|
2298
|
+
top: "0",
|
|
2299
|
+
width: "100%"
|
|
2300
|
+
},
|
|
2301
|
+
".EZDrawer__container": {
|
|
2302
|
+
position: "fixed",
|
|
2303
|
+
visibility: "hidden",
|
|
2304
|
+
backgroundColor: "navigation.background.muted.default",
|
|
2305
|
+
transition: "all",
|
|
2306
|
+
boxShadow: "0 0 10px 5px rgba(0, 0, 0, 0.1)",
|
|
2307
|
+
paddingY: "6",
|
|
2308
|
+
paddingX: "6",
|
|
2309
|
+
overflowY: "auto"
|
|
2310
|
+
},
|
|
2311
|
+
...sx
|
|
2312
|
+
},
|
|
2313
|
+
children: /* @__PURE__ */jsx2(DrawerUi, {
|
|
2314
|
+
...props,
|
|
2315
|
+
children: /* @__PURE__ */jsx2(Box, {
|
|
2316
|
+
sx: {
|
|
2317
|
+
width: "100%",
|
|
2318
|
+
height: "100%"
|
|
2319
|
+
},
|
|
2320
|
+
children
|
|
2321
|
+
})
|
|
2311
2322
|
})
|
|
2312
2323
|
});
|
|
2313
2324
|
};
|
|
@@ -2364,8 +2375,10 @@ var Menu = ({
|
|
|
2364
2375
|
maxWidth: "200px",
|
|
2365
2376
|
height: "44px",
|
|
2366
2377
|
objectFit: "cover"
|
|
2367
|
-
}
|
|
2378
|
+
},
|
|
2379
|
+
"data-testid": "img"
|
|
2368
2380
|
}), /* @__PURE__ */jsx3(Text, {
|
|
2381
|
+
"data-testid": "button",
|
|
2369
2382
|
sx: {
|
|
2370
2383
|
marginLeft: "auto",
|
|
2371
2384
|
fontSize: "2xl",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/components",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.8",
|
|
4
4
|
"description": "React components for ttoss ecosystem.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
95
|
"react": ">=16.8.0",
|
|
96
|
-
"@ttoss/
|
|
97
|
-
"@ttoss/
|
|
96
|
+
"@ttoss/ui": "^5.5.5",
|
|
97
|
+
"@ttoss/react-hooks": "^2.0.10"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@types/jest": "^29.5.14",
|
|
@@ -103,11 +103,11 @@
|
|
|
103
103
|
"react": "^19.0.0",
|
|
104
104
|
"tsup": "^8.3.5",
|
|
105
105
|
"tsx": "^4.19.2",
|
|
106
|
-
"@ttoss/react-icons": "^0.4.9",
|
|
107
106
|
"@ttoss/config": "^1.35.2",
|
|
108
|
-
"@ttoss/react-hooks": "^2.0.10",
|
|
109
107
|
"@ttoss/test-utils": "^2.1.22",
|
|
110
|
-
"@ttoss/
|
|
108
|
+
"@ttoss/react-icons": "^0.4.9",
|
|
109
|
+
"@ttoss/ui": "^5.5.5",
|
|
110
|
+
"@ttoss/react-hooks": "^2.0.10"
|
|
111
111
|
},
|
|
112
112
|
"keywords": [
|
|
113
113
|
"React",
|