@edu-tosel/design 1.0.51 → 1.0.53

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.
Files changed (65) hide show
  1. package/README.md +42 -42
  2. package/asset/SVG.d.ts +5 -0
  3. package/asset/SVG.tsx +27 -27
  4. package/asset/svg/Close.tsx +32 -32
  5. package/asset/svg/Direction.tsx +36 -36
  6. package/asset/svg/Email.tsx +20 -20
  7. package/asset/svg/Icon.tsx +186 -186
  8. package/asset/svg/Image.tsx +24 -24
  9. package/asset/svg/Notification.tsx +34 -34
  10. package/asset/svg/Operation.d.ts +7 -0
  11. package/asset/svg/Operation.js +8 -0
  12. package/asset/svg/Operation.tsx +104 -66
  13. package/asset/svg/Phone.tsx +20 -20
  14. package/asset/svg/Profile.tsx +27 -27
  15. package/asset/svg/Symbol.tsx +60 -60
  16. package/asset/svg/TOSEL.tsx +63 -63
  17. package/card/design/Card.design.js +4 -2
  18. package/card/design/RollCard.design.d.ts +1 -1
  19. package/card/design/RollCard.design.js +35 -4
  20. package/card/index.d.ts +1 -0
  21. package/card/index.js +1 -0
  22. package/card/template/NavCard.js +2 -2
  23. package/card/template/ProgressCard.d.ts +10 -0
  24. package/card/template/ProgressCard.js +42 -0
  25. package/globals.css +226 -226
  26. package/interface/Action.d.ts +6 -6
  27. package/interface/Card.d.ts +2 -0
  28. package/interface/Modal.d.ts +9 -2
  29. package/interface/Property.d.ts +1 -1
  30. package/interface/Theme.d.ts +2 -0
  31. package/interface/Theme.js +1 -0
  32. package/interface/index.d.ts +1 -0
  33. package/interface/index.js +1 -0
  34. package/layout/widget/dashboard/mypage/Navigate.js +2 -2
  35. package/layout/widget/dashboard/mypage/Profile.js +1 -1
  36. package/modal/design/Modal.design.js +2 -2
  37. package/modal/index.d.ts +2 -1
  38. package/modal/index.js +2 -1
  39. package/modal/template/{ConfirmModal → Confirm}/Tag.d.ts +1 -0
  40. package/modal/template/Confirm/Tag.js +30 -0
  41. package/modal/template/Postcode.d.ts +2 -0
  42. package/modal/template/Postcode.js +27 -0
  43. package/package.json +2 -1
  44. package/tailwind.config.ts +619 -618
  45. package/version.txt +1 -1
  46. package/widget/template/Select/Select.LG.d.ts +2 -0
  47. package/widget/template/Select/Select.LG.js +45 -0
  48. package/widget/template/Select/Select.d.ts +2 -0
  49. package/widget/{design/Select.design.js → template/Select/Select.js} +14 -6
  50. package/widget/template/Select/index.d.ts +6 -0
  51. package/widget/template/Select/index.js +4 -0
  52. package/modal/template/ConfirmModal/Tag.js +0 -19
  53. package/widget/design/Select.design.d.ts +0 -2
  54. package/widget/template/Select.d.ts +0 -3
  55. package/widget/template/Select.js +0 -6
  56. /package/modal/template/{ConfirmModal → Confirm}/Confirm.d.ts +0 -0
  57. /package/modal/template/{ConfirmModal → Confirm}/Confirm.js +0 -0
  58. /package/modal/template/{ConfirmModal → Confirm}/Input.d.ts +0 -0
  59. /package/modal/template/{ConfirmModal → Confirm}/Input.js +0 -0
  60. /package/modal/template/{ConfirmModal → Confirm}/Reimage.d.ts +0 -0
  61. /package/modal/template/{ConfirmModal → Confirm}/Reimage.js +0 -0
  62. /package/modal/template/{ConfirmModal → Confirm}/Switch.d.ts +0 -0
  63. /package/modal/template/{ConfirmModal → Confirm}/Switch.js +0 -0
  64. /package/modal/template/{ConfirmModal → Confirm}/index.d.ts +0 -0
  65. /package/modal/template/{ConfirmModal → Confirm}/index.js +0 -0
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import ConfirmModal from "../../design/ConfirmModal.design";
3
+ import { cn } from "../../../util";
4
+ import { selectOne, selectPlural } from "../../../util/select";
5
+ import { animated, useTransition } from "react-spring";
6
+ export default function Tag(props) {
7
+ const { state, tags, options, process } = props.tag;
8
+ const { selectHow } = options || { selectHow: "plural" };
9
+ const button = (key) => ({
10
+ sizes: "h-10",
11
+ styles: "rounded-full",
12
+ animations: "duration-300",
13
+ boundaries: state[0].includes(key)
14
+ ? "bg-green-dark text-white"
15
+ : "border border-gray-medium",
16
+ });
17
+ const [step, node] = process || [false, null];
18
+ const leaveTransition = useTransition(step, {
19
+ from: { x: 0 },
20
+ leave: { x: -600 },
21
+ });
22
+ const enterTransition = useTransition(step, {
23
+ from: { x: 400 },
24
+ enter: { x: 0 },
25
+ });
26
+ return (_jsx(ConfirmModal, { ...props, children: _jsxs("div", { className: "flex", children: [leaveTransition((styles, item) => !item && (_jsx(animated.div, { style: styles, className: "w-full grid grid-cols-4 gap-2.5 mt-4.75", children: tags.map(([key, value]) => (_jsx("button", { onClick: () => selectHow === "one"
27
+ ? selectOne({ state, key })
28
+ : selectPlural({ state, key }), className: cn(button(key)), children: value }, key))) }))), process &&
29
+ enterTransition((styles, item) => item && (_jsx(animated.div, { style: styles, className: "absolute mt-4.75", children: node })))] }) }));
30
+ }
@@ -0,0 +1,2 @@
1
+ import { DaumPostcodeModalProps } from "../../interface/Modal";
2
+ export default function PostcodeModal({ state, showAction, }: DaumPostcodeModalProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import DaumPostcodeEmbed from "react-daum-postcode";
3
+ import ModalDesign from "../design/Modal.design";
4
+ import { useActionStore } from "../../store";
5
+ import { useEffect, useState } from "react";
6
+ export default function PostcodeModal({ state, showAction, }) {
7
+ const { removeModal } = useActionStore();
8
+ const [value, setValue] = state;
9
+ const [isClient, setIsClient] = useState(false);
10
+ useEffect(() => {
11
+ setIsClient(true);
12
+ }, []);
13
+ const handler = (data) => {
14
+ setValue({
15
+ address: data.address,
16
+ zipcode: data.zonecode,
17
+ });
18
+ return showAction?.event && removeModal(showAction.event);
19
+ };
20
+ return (_jsx(ModalDesign, { titles: {
21
+ title: "주소를 검색하고 선택해주세요",
22
+ subtitle: "주소를 검색하고 선택해주세요",
23
+ }, showAction: showAction, options: {
24
+ width: "lg",
25
+ height: "xl",
26
+ }, children: isClient && _jsx(DaumPostcodeEmbed, { onComplete: handler, className: "mt-16" }) }));
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
@@ -18,6 +18,7 @@
18
18
  "date-fns-tz": "^2.0.1",
19
19
  "react": "^18.2.0",
20
20
  "react-datepicker": "^6.4.0",
21
+ "react-daum-postcode": "^3.1.3",
21
22
  "react-dom": "^18.2.0",
22
23
  "react-icons": "^5.0.1",
23
24
  "react-lottie-player": "^1.5.6",