@edu-tosel/design 1.0.301 → 1.0.303
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.
|
@@ -2,17 +2,19 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Label } from "../../widget";
|
|
3
3
|
import { cn } from "../../util";
|
|
4
4
|
import ModalDesign from "../design/Modal.design";
|
|
5
|
+
import { useResponsive } from "../../hook";
|
|
5
6
|
export default function ConfirmModalDesign({ titles, showAction, buttons, children, option, }) {
|
|
6
7
|
const container = {
|
|
7
|
-
displays: "flex flex-col",
|
|
8
|
+
displays: "flex flex-col justify-between",
|
|
8
9
|
};
|
|
9
10
|
const buttonBox = {
|
|
10
|
-
positions: "absolute bottom-
|
|
11
|
-
displays: "flex gap-1
|
|
11
|
+
positions: "absolute bottom-3.5 right-3.5",
|
|
12
|
+
displays: "flex flex-row gap-1 sm:gap-x-3.5",
|
|
12
13
|
};
|
|
14
|
+
const isSm = useResponsive("sm");
|
|
13
15
|
return (_jsx(ModalDesign, { titles: titles, showAction: showAction, option: option, children: _jsxs("div", { className: cn(container), children: [children, _jsx("div", { className: cn(buttonBox), children: buttons.map(({ title, onClick, option, disabled }) => (_jsx(Label.Button, { title: title, onClick: onClick, disabled: disabled, option: {
|
|
14
16
|
...option,
|
|
15
|
-
width: option?.width ?? "lg",
|
|
17
|
+
width: isSm ? option?.width ?? "lg" : "sm",
|
|
16
18
|
height: "sm",
|
|
17
19
|
} }, title))) })] }) }));
|
|
18
20
|
}
|
|
@@ -59,7 +59,7 @@ function ModalDesign({ titles, showAction, children, option, debug, }) {
|
|
|
59
59
|
const { width, height, noClose, boundary, position } = option ?? {};
|
|
60
60
|
const { event } = showAction ?? {};
|
|
61
61
|
const container = {
|
|
62
|
-
paddings: "p-5
|
|
62
|
+
paddings: "p-5",
|
|
63
63
|
sizes: `${heightSize[height ?? "lg"]} ${widthSize[width ?? "md"]}`,
|
|
64
64
|
styles: "rounded-xl bg-white relative overflow-hidden",
|
|
65
65
|
shadows: !!position && (boundary ?? "box-shadow"),
|
package/package.json
CHANGED
package/tailwind.config.ts
CHANGED
|
@@ -4,7 +4,62 @@ import type { PluginAPI } from "tailwindcss/types/config";
|
|
|
4
4
|
|
|
5
5
|
// import twElements from "tw-elements/dist/plugin";
|
|
6
6
|
// import tailwindcssDirectionalShadows from "tailwindcss-directional-shadows";
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
const colors = [
|
|
9
|
+
"red",
|
|
10
|
+
"orange",
|
|
11
|
+
"amber",
|
|
12
|
+
"yellow",
|
|
13
|
+
"lime",
|
|
14
|
+
"green",
|
|
15
|
+
"emerald",
|
|
16
|
+
"teal",
|
|
17
|
+
"cyan",
|
|
18
|
+
"sky",
|
|
19
|
+
"blue",
|
|
20
|
+
"indigo",
|
|
21
|
+
"violet",
|
|
22
|
+
"purple",
|
|
23
|
+
"fuchsia",
|
|
24
|
+
"pink",
|
|
25
|
+
"rose",
|
|
26
|
+
"slate",
|
|
27
|
+
"gray",
|
|
28
|
+
"zinc",
|
|
29
|
+
"neutral",
|
|
30
|
+
"stone",
|
|
31
|
+
];
|
|
32
|
+
const intensities = [
|
|
33
|
+
"50",
|
|
34
|
+
"100",
|
|
35
|
+
"200",
|
|
36
|
+
"300",
|
|
37
|
+
"400",
|
|
38
|
+
"500",
|
|
39
|
+
"600",
|
|
40
|
+
"700",
|
|
41
|
+
"800",
|
|
42
|
+
"900",
|
|
43
|
+
];
|
|
44
|
+
const variants = ["hover"];
|
|
45
|
+
const safelist = [
|
|
46
|
+
...colors.flatMap((color) =>
|
|
47
|
+
intensities.map((intensity) => `bg-${color}-${intensity}`)
|
|
48
|
+
),
|
|
49
|
+
...colors.flatMap((color) =>
|
|
50
|
+
intensities.map((intensity) => `text-${color}-${intensity}`)
|
|
51
|
+
),
|
|
52
|
+
...variants.flatMap((variant) =>
|
|
53
|
+
colors.flatMap((color) =>
|
|
54
|
+
intensities.map((intensity) => `${variant}:bg-${color}-${intensity}`)
|
|
55
|
+
)
|
|
56
|
+
),
|
|
57
|
+
...variants.flatMap((variant) =>
|
|
58
|
+
colors.flatMap((color) =>
|
|
59
|
+
intensities.map((intensity) => `${variant}:text-${color}-${intensity}`)
|
|
60
|
+
)
|
|
61
|
+
),
|
|
62
|
+
];
|
|
8
63
|
|
|
9
64
|
export default {
|
|
10
65
|
content: [
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.303
|
|
@@ -5,10 +5,10 @@ const widthSize = {
|
|
|
5
5
|
"4xs": "w-7",
|
|
6
6
|
"3xs": "w-10",
|
|
7
7
|
"2xs": "w-13",
|
|
8
|
-
xs: "w-20",
|
|
9
|
-
sm: "w-22.5",
|
|
10
|
-
md: "w-45",
|
|
11
|
-
lg: "w-50",
|
|
8
|
+
xs: "min-w-20",
|
|
9
|
+
sm: "min-w-22.5",
|
|
10
|
+
md: "min-w-45",
|
|
11
|
+
lg: "min-w-50",
|
|
12
12
|
full: "w-full",
|
|
13
13
|
auto: "w-auto",
|
|
14
14
|
};
|
|
@@ -40,6 +40,7 @@ export default function LabelDesign({ title, onClick, disabled, option, hoverSta
|
|
|
40
40
|
texts: text ?? "text-gray-dim",
|
|
41
41
|
animation: "duration-500",
|
|
42
42
|
fonts: "font-pretendard-var font-medium",
|
|
43
|
+
paddings: "px-3.5",
|
|
43
44
|
boundary,
|
|
44
45
|
styles: height === "xs" ||
|
|
45
46
|
height === "2xs" ||
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
const colors = [
|
|
2
|
-
"red",
|
|
3
|
-
"orange",
|
|
4
|
-
"amber",
|
|
5
|
-
"yellow",
|
|
6
|
-
"lime",
|
|
7
|
-
"green",
|
|
8
|
-
"emerald",
|
|
9
|
-
"teal",
|
|
10
|
-
"cyan",
|
|
11
|
-
"sky",
|
|
12
|
-
"blue",
|
|
13
|
-
"indigo",
|
|
14
|
-
"violet",
|
|
15
|
-
"purple",
|
|
16
|
-
"fuchsia",
|
|
17
|
-
"pink",
|
|
18
|
-
"rose",
|
|
19
|
-
"slate",
|
|
20
|
-
"gray",
|
|
21
|
-
"zinc",
|
|
22
|
-
"neutral",
|
|
23
|
-
"stone",
|
|
24
|
-
];
|
|
25
|
-
const intensities = [
|
|
26
|
-
"50",
|
|
27
|
-
"100",
|
|
28
|
-
"200",
|
|
29
|
-
"300",
|
|
30
|
-
"400",
|
|
31
|
-
"500",
|
|
32
|
-
"600",
|
|
33
|
-
"700",
|
|
34
|
-
"800",
|
|
35
|
-
"900",
|
|
36
|
-
];
|
|
37
|
-
const variants = ["hover"];
|
|
38
|
-
const safelist = [
|
|
39
|
-
// bg-{color}-{intensity}
|
|
40
|
-
...colors.flatMap((color) =>
|
|
41
|
-
intensities.map((intensity) => `bg-${color}-${intensity}`)
|
|
42
|
-
),
|
|
43
|
-
|
|
44
|
-
// text-{color}-{intensity}
|
|
45
|
-
...colors.flatMap((color) =>
|
|
46
|
-
intensities.map((intensity) => `text-${color}-${intensity}`)
|
|
47
|
-
),
|
|
48
|
-
|
|
49
|
-
// hover:bg-{color}-{intensity}
|
|
50
|
-
...variants.flatMap((variant) =>
|
|
51
|
-
colors.flatMap((color) =>
|
|
52
|
-
intensities.map((intensity) => `${variant}:bg-${color}-${intensity}`)
|
|
53
|
-
)
|
|
54
|
-
),
|
|
55
|
-
|
|
56
|
-
// hover:text-{color}-{intensity}
|
|
57
|
-
...variants.flatMap((variant) =>
|
|
58
|
-
colors.flatMap((color) =>
|
|
59
|
-
intensities.map((intensity) => `${variant}:text-${color}-${intensity}`)
|
|
60
|
-
)
|
|
61
|
-
),
|
|
62
|
-
];
|
|
63
|
-
export default safelist;
|