@citygross/components_v2 0.0.46 → 0.0.48
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/SideModal/SideModal.css.ts.vanilla.css +7 -2
- package/dist/components/SideModal/SideModal.css.vanilla.js +1 -1
- package/dist/components/SideModal/SideModal.d.ts +12 -11
- package/dist/components/SideModal/SideModal.js +15 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -94,13 +94,18 @@
|
|
|
94
94
|
opacity: 0;
|
|
95
95
|
transition: all 300ms ease-out;
|
|
96
96
|
}
|
|
97
|
-
.
|
|
97
|
+
.SideModal_sideModalOverLayer_animate_in__1scj0sn35 {
|
|
98
98
|
opacity: 1;
|
|
99
99
|
z-index: 5;
|
|
100
100
|
}
|
|
101
|
-
.
|
|
101
|
+
.SideModal_sideModalOverLayer_animate_out__1scj0sn36 {
|
|
102
102
|
animation: SideModal_outOverlay__1scj0sn4 300ms ease-out forwards;
|
|
103
103
|
}
|
|
104
|
+
@media screen and (max-width: 480px) {
|
|
105
|
+
.SideModal_sideModal__1scj0sn7 {
|
|
106
|
+
max-width: 80%;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
104
109
|
@media screen and (min-width: 576px) {
|
|
105
110
|
.SideModal_sideModal__1scj0sn7 {
|
|
106
111
|
max-height: unset;
|
|
@@ -3,6 +3,6 @@ import './SideModal.css.ts.vanilla.css';
|
|
|
3
3
|
import { createRuntimeFn } from '@vanilla-extract/recipes/createRuntimeFn';
|
|
4
4
|
|
|
5
5
|
var sideModal = createRuntimeFn({ defaultClassName: "SideModal_sideModal__1scj0sn7", variantClassNames: { backgroundColor: { primary: "color_backgroundColor_primary__13rr0b21d", secondary: "color_backgroundColor_secondary__13rr0b21e", brandYellow: "color_backgroundColor_brandYellow__13rr0b21f", brandBlue: "color_backgroundColor_brandBlue__13rr0b21g", brandPurple: "color_backgroundColor_brandPurple__13rr0b21h", brandPrio: "color_backgroundColor_brandPrio__13rr0b21i", yellowLighter: "color_backgroundColor_yellowLighter__13rr0b21j", yellowLight: "color_backgroundColor_yellowLight__13rr0b21k", blueLight: "color_backgroundColor_blueLight__13rr0b21l", blueLighter: "color_backgroundColor_blueLighter__13rr0b21m", blueMedium: "color_backgroundColor_blueMedium__13rr0b21n", greenLight: "color_backgroundColor_greenLight__13rr0b21o", greenMedium: "color_backgroundColor_greenMedium__13rr0b21p", redLight: "color_backgroundColor_redLight__13rr0b21q", recipeVego: "color_backgroundColor_recipeVego__13rr0b21r", recipeLactose: "color_backgroundColor_recipeLactose__13rr0b21s", recipeGluten: "color_backgroundColor_recipeGluten__13rr0b21t", myPrioGoldDark: "color_backgroundColor_myPrioGoldDark__13rr0b21u", myPrioGoldLight: "color_backgroundColor_myPrioGoldLight__13rr0b21v", link: "color_backgroundColor_link__13rr0b21w", white: "color_backgroundColor_white__13rr0b21x", black: "color_backgroundColor_black__13rr0b21y", lightest: "color_backgroundColor_lightest__13rr0b21z", lighter: "color_backgroundColor_lighter__13rr0b220", light: "color_backgroundColor_light__13rr0b221", medium: "color_backgroundColor_medium__13rr0b222", mediumDark: "color_backgroundColor_mediumDark__13rr0b223", dark: "color_backgroundColor_dark__13rr0b224", darker: "color_backgroundColor_darker__13rr0b225", darkest: "color_backgroundColor_darkest__13rr0b226", buttonGray: "color_backgroundColor_buttonGray__13rr0b227", disabledGray: "color_backgroundColor_disabledGray__13rr0b228", disabledDarkGray: "color_backgroundColor_disabledDarkGray__13rr0b229", placeholder: "color_backgroundColor_placeholder__13rr0b22a", border: "color_backgroundColor_border__13rr0b22b", boxShadow: "color_backgroundColor_boxShadow__13rr0b22c", boxShadowActive: "color_backgroundColor_boxShadowActive__13rr0b22d", alertRed: "color_backgroundColor_alertRed__13rr0b22e", alertBlue: "color_backgroundColor_alertBlue__13rr0b22f", alertGreen: "color_backgroundColor_alertGreen__13rr0b22g", darkOverlay: "color_backgroundColor_darkOverlay__13rr0b22h", transparent: "color_backgroundColor_transparent__13rr0b22i", brandBlueHover: "color_backgroundColor_brandBlueHover__13rr0b22j", brandYellowHover: "color_backgroundColor_brandYellowHover__13rr0b22k", brandPrioHover: "color_backgroundColor_brandPrioHover__13rr0b22l", brandBlueActive: "color_backgroundColor_brandBlueActive__13rr0b22m", brandYellowActive: "color_backgroundColor_brandYellowActive__13rr0b22n", brandPrioActive: "color_backgroundColor_brandPrioActive__13rr0b22o", none: "color_backgroundColor_none__13rr0b22p" }, slideVariants: { left: "SideModal_slideVariants_left__1scj0sn5", right: "SideModal_slideVariants_right__1scj0sn6" }, slideIn: { leftIn: "SideModal_sideModal_slideIn_leftIn__1scj0sn1n", rightIn: "SideModal_sideModal_slideIn_rightIn__1scj0sn1o", leftOut: "SideModal_sideModal_slideIn_leftOut__1scj0sn1p", rightOut: "SideModal_sideModal_slideIn_rightOut__1scj0sn1q" } }, defaultVariants: {}, compoundVariants: [] });
|
|
6
|
-
var sideModalOverLayer = createRuntimeFn({ defaultClassName: "SideModal_sideModalOverLayer__1scj0sn1r", variantClassNames: { backgroundColor: { primary: "color_backgroundColor_primary__13rr0b21d", secondary: "color_backgroundColor_secondary__13rr0b21e", brandYellow: "color_backgroundColor_brandYellow__13rr0b21f", brandBlue: "color_backgroundColor_brandBlue__13rr0b21g", brandPurple: "color_backgroundColor_brandPurple__13rr0b21h", brandPrio: "color_backgroundColor_brandPrio__13rr0b21i", yellowLighter: "color_backgroundColor_yellowLighter__13rr0b21j", yellowLight: "color_backgroundColor_yellowLight__13rr0b21k", blueLight: "color_backgroundColor_blueLight__13rr0b21l", blueLighter: "color_backgroundColor_blueLighter__13rr0b21m", blueMedium: "color_backgroundColor_blueMedium__13rr0b21n", greenLight: "color_backgroundColor_greenLight__13rr0b21o", greenMedium: "color_backgroundColor_greenMedium__13rr0b21p", redLight: "color_backgroundColor_redLight__13rr0b21q", recipeVego: "color_backgroundColor_recipeVego__13rr0b21r", recipeLactose: "color_backgroundColor_recipeLactose__13rr0b21s", recipeGluten: "color_backgroundColor_recipeGluten__13rr0b21t", myPrioGoldDark: "color_backgroundColor_myPrioGoldDark__13rr0b21u", myPrioGoldLight: "color_backgroundColor_myPrioGoldLight__13rr0b21v", link: "color_backgroundColor_link__13rr0b21w", white: "color_backgroundColor_white__13rr0b21x", black: "color_backgroundColor_black__13rr0b21y", lightest: "color_backgroundColor_lightest__13rr0b21z", lighter: "color_backgroundColor_lighter__13rr0b220", light: "color_backgroundColor_light__13rr0b221", medium: "color_backgroundColor_medium__13rr0b222", mediumDark: "color_backgroundColor_mediumDark__13rr0b223", dark: "color_backgroundColor_dark__13rr0b224", darker: "color_backgroundColor_darker__13rr0b225", darkest: "color_backgroundColor_darkest__13rr0b226", buttonGray: "color_backgroundColor_buttonGray__13rr0b227", disabledGray: "color_backgroundColor_disabledGray__13rr0b228", disabledDarkGray: "color_backgroundColor_disabledDarkGray__13rr0b229", placeholder: "color_backgroundColor_placeholder__13rr0b22a", border: "color_backgroundColor_border__13rr0b22b", boxShadow: "color_backgroundColor_boxShadow__13rr0b22c", boxShadowActive: "color_backgroundColor_boxShadowActive__13rr0b22d", alertRed: "color_backgroundColor_alertRed__13rr0b22e", alertBlue: "color_backgroundColor_alertBlue__13rr0b22f", alertGreen: "color_backgroundColor_alertGreen__13rr0b22g", darkOverlay: "color_backgroundColor_darkOverlay__13rr0b22h", transparent: "color_backgroundColor_transparent__13rr0b22i", brandBlueHover: "color_backgroundColor_brandBlueHover__13rr0b22j", brandYellowHover: "color_backgroundColor_brandYellowHover__13rr0b22k", brandPrioHover: "color_backgroundColor_brandPrioHover__13rr0b22l", brandBlueActive: "color_backgroundColor_brandBlueActive__13rr0b22m", brandYellowActive: "color_backgroundColor_brandYellowActive__13rr0b22n", brandPrioActive: "color_backgroundColor_brandPrioActive__13rr0b22o", none: "color_backgroundColor_none__13rr0b22p" },
|
|
6
|
+
var sideModalOverLayer = createRuntimeFn({ defaultClassName: "SideModal_sideModalOverLayer__1scj0sn1r", variantClassNames: { backgroundColor: { primary: "color_backgroundColor_primary__13rr0b21d", secondary: "color_backgroundColor_secondary__13rr0b21e", brandYellow: "color_backgroundColor_brandYellow__13rr0b21f", brandBlue: "color_backgroundColor_brandBlue__13rr0b21g", brandPurple: "color_backgroundColor_brandPurple__13rr0b21h", brandPrio: "color_backgroundColor_brandPrio__13rr0b21i", yellowLighter: "color_backgroundColor_yellowLighter__13rr0b21j", yellowLight: "color_backgroundColor_yellowLight__13rr0b21k", blueLight: "color_backgroundColor_blueLight__13rr0b21l", blueLighter: "color_backgroundColor_blueLighter__13rr0b21m", blueMedium: "color_backgroundColor_blueMedium__13rr0b21n", greenLight: "color_backgroundColor_greenLight__13rr0b21o", greenMedium: "color_backgroundColor_greenMedium__13rr0b21p", redLight: "color_backgroundColor_redLight__13rr0b21q", recipeVego: "color_backgroundColor_recipeVego__13rr0b21r", recipeLactose: "color_backgroundColor_recipeLactose__13rr0b21s", recipeGluten: "color_backgroundColor_recipeGluten__13rr0b21t", myPrioGoldDark: "color_backgroundColor_myPrioGoldDark__13rr0b21u", myPrioGoldLight: "color_backgroundColor_myPrioGoldLight__13rr0b21v", link: "color_backgroundColor_link__13rr0b21w", white: "color_backgroundColor_white__13rr0b21x", black: "color_backgroundColor_black__13rr0b21y", lightest: "color_backgroundColor_lightest__13rr0b21z", lighter: "color_backgroundColor_lighter__13rr0b220", light: "color_backgroundColor_light__13rr0b221", medium: "color_backgroundColor_medium__13rr0b222", mediumDark: "color_backgroundColor_mediumDark__13rr0b223", dark: "color_backgroundColor_dark__13rr0b224", darker: "color_backgroundColor_darker__13rr0b225", darkest: "color_backgroundColor_darkest__13rr0b226", buttonGray: "color_backgroundColor_buttonGray__13rr0b227", disabledGray: "color_backgroundColor_disabledGray__13rr0b228", disabledDarkGray: "color_backgroundColor_disabledDarkGray__13rr0b229", placeholder: "color_backgroundColor_placeholder__13rr0b22a", border: "color_backgroundColor_border__13rr0b22b", boxShadow: "color_backgroundColor_boxShadow__13rr0b22c", boxShadowActive: "color_backgroundColor_boxShadowActive__13rr0b22d", alertRed: "color_backgroundColor_alertRed__13rr0b22e", alertBlue: "color_backgroundColor_alertBlue__13rr0b22f", alertGreen: "color_backgroundColor_alertGreen__13rr0b22g", darkOverlay: "color_backgroundColor_darkOverlay__13rr0b22h", transparent: "color_backgroundColor_transparent__13rr0b22i", brandBlueHover: "color_backgroundColor_brandBlueHover__13rr0b22j", brandYellowHover: "color_backgroundColor_brandYellowHover__13rr0b22k", brandPrioHover: "color_backgroundColor_brandPrioHover__13rr0b22l", brandBlueActive: "color_backgroundColor_brandBlueActive__13rr0b22m", brandYellowActive: "color_backgroundColor_brandYellowActive__13rr0b22n", brandPrioActive: "color_backgroundColor_brandPrioActive__13rr0b22o", none: "color_backgroundColor_none__13rr0b22p" }, animate: { "in": "SideModal_sideModalOverLayer_animate_in__1scj0sn35", out: "SideModal_sideModalOverLayer_animate_out__1scj0sn36" } }, defaultVariants: {}, compoundVariants: [] });
|
|
7
7
|
|
|
8
8
|
export { sideModal, sideModalOverLayer };
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TPaletteKeys } from '@citygross/design-tokens_v2';
|
|
3
3
|
|
|
4
|
+
declare enum EAnimate {
|
|
5
|
+
In = "in",
|
|
6
|
+
Out = "out"
|
|
7
|
+
}
|
|
4
8
|
declare type TSideModal = {
|
|
5
|
-
|
|
9
|
+
animate?: EAnimate;
|
|
10
|
+
backgroundColor?: TPaletteKeys;
|
|
6
11
|
children?: React.ReactNode;
|
|
7
|
-
|
|
8
|
-
background?: TPaletteKeys;
|
|
9
|
-
isVisible?: boolean;
|
|
10
|
-
querySelector?: string;
|
|
11
|
-
slideFrom?: 'left' | 'right';
|
|
12
|
+
onBackdropClick: () => void;
|
|
12
13
|
overlayBackground?: TPaletteKeys;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
querySelector?: string;
|
|
15
|
+
slideFrom?: 'left' | 'right' | null;
|
|
16
|
+
width?: string;
|
|
16
17
|
};
|
|
17
|
-
declare const SideModal: ({
|
|
18
|
+
declare const SideModal: ({ animate, backgroundColor, children, onBackdropClick, overlayBackground, querySelector, slideFrom, width }: TSideModal) => React.ReactPortal;
|
|
18
19
|
|
|
19
|
-
export { SideModal, TSideModal };
|
|
20
|
+
export { EAnimate, SideModal, TSideModal };
|
|
@@ -2,16 +2,20 @@ import React, { useRef } from 'react';
|
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
import { sideModalOverLayer, sideModal } from './SideModal.css.vanilla.js';
|
|
4
4
|
|
|
5
|
+
var EAnimate = /* @__PURE__ */ ((EAnimate2) => {
|
|
6
|
+
EAnimate2["In"] = "in";
|
|
7
|
+
EAnimate2["Out"] = "out";
|
|
8
|
+
return EAnimate2;
|
|
9
|
+
})(EAnimate || {});
|
|
5
10
|
const SideModal = ({
|
|
11
|
+
animate,
|
|
12
|
+
backgroundColor = "white",
|
|
13
|
+
children,
|
|
6
14
|
onBackdropClick,
|
|
7
|
-
background = "white",
|
|
8
15
|
overlayBackground = "darkOverlay",
|
|
9
|
-
width = "375px",
|
|
10
|
-
isVisible,
|
|
11
|
-
slideFrom,
|
|
12
16
|
querySelector = "#root",
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
slideFrom,
|
|
18
|
+
width = "375px"
|
|
15
19
|
}) => {
|
|
16
20
|
const ref = useRef(null);
|
|
17
21
|
const domSafe = typeof document !== "undefined";
|
|
@@ -21,7 +25,7 @@ const SideModal = ({
|
|
|
21
25
|
{
|
|
22
26
|
className: sideModalOverLayer({
|
|
23
27
|
backgroundColor: overlayBackground,
|
|
24
|
-
|
|
28
|
+
animate
|
|
25
29
|
}),
|
|
26
30
|
ref,
|
|
27
31
|
onMouseDown: (e) => {
|
|
@@ -34,11 +38,11 @@ const SideModal = ({
|
|
|
34
38
|
"div",
|
|
35
39
|
{
|
|
36
40
|
className: sideModal({
|
|
37
|
-
backgroundColor
|
|
41
|
+
backgroundColor,
|
|
38
42
|
slideVariants: slideFrom,
|
|
39
|
-
slideIn: slideFrom === "left" ?
|
|
43
|
+
slideIn: slideFrom === "left" ? animate === "in" /* In */ ? "leftIn" : "leftOut" : animate === "in" /* In */ ? "rightIn" : "rightOut"
|
|
40
44
|
}),
|
|
41
|
-
style: {
|
|
45
|
+
style: { width }
|
|
42
46
|
},
|
|
43
47
|
children
|
|
44
48
|
)
|
|
@@ -47,4 +51,4 @@ const SideModal = ({
|
|
|
47
51
|
) : null;
|
|
48
52
|
};
|
|
49
53
|
|
|
50
|
-
export { SideModal };
|
|
54
|
+
export { EAnimate, SideModal };
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export { BorderPosition, borderStyle, orderTable, orderTd, orderTh, orderThead,
|
|
|
18
18
|
export { MobileOrderLine } from './components/OrderTableMobile/OrderTableMobile.js';
|
|
19
19
|
export { Pagination, TPagination } from './components/Pagination/Pagination.js';
|
|
20
20
|
export { RippleContainer, TRippleContainer } from './components/RippleContainer/RippleContainer.js';
|
|
21
|
-
export { SideModal, TSideModal } from './components/SideModal/SideModal.js';
|
|
21
|
+
export { EAnimate, SideModal, TSideModal } from './components/SideModal/SideModal.js';
|
|
22
22
|
export { Skeleton, TSkeleton } from './components/Skeleton/Skeleton.js';
|
|
23
23
|
export { Spacer, TSpacer } from './components/Spacer/Spacer.js';
|
|
24
24
|
export { Spinner, TSpinner } from './components/Spinner/Spinner.js';
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ export { BorderPosition, borderStyle, orderTable, orderTd, orderTh, orderThead,
|
|
|
18
18
|
export { MobileOrderLine } from './components/OrderTableMobile/OrderTableMobile.js';
|
|
19
19
|
export { Pagination } from './components/Pagination/Pagination.js';
|
|
20
20
|
export { RippleContainer } from './components/RippleContainer/RippleContainer.js';
|
|
21
|
-
export { SideModal } from './components/SideModal/SideModal.js';
|
|
21
|
+
export { EAnimate, SideModal } from './components/SideModal/SideModal.js';
|
|
22
22
|
export { Skeleton } from './components/Skeleton/Skeleton.js';
|
|
23
23
|
export { Spacer } from './components/Spacer/Spacer.js';
|
|
24
24
|
export { Spinner } from './components/Spinner/Spinner.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components_v2",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.48",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"react-slick": "^0.30.1",
|
|
80
80
|
"slick-carousel": "^1.8.1"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "588ff8ea3e9f78236a9aac1a41a42d33339779c2"
|
|
83
83
|
}
|