@tipp/ui 1.2.13 → 1.2.15
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/atoms/badge.cjs +2 -0
- package/dist/atoms/badge.cjs.map +1 -1
- package/dist/atoms/badge.d.cts +2 -2
- package/dist/atoms/badge.d.ts +2 -2
- package/dist/atoms/badge.js +1 -1
- package/dist/atoms/dialog.cjs +24 -58
- package/dist/atoms/dialog.cjs.map +1 -1
- package/dist/atoms/dialog.js +1 -3
- package/dist/atoms/drawer.cjs +7 -50
- package/dist/atoms/drawer.cjs.map +1 -1
- package/dist/atoms/drawer.d.cts +1 -1
- package/dist/atoms/drawer.d.ts +1 -1
- package/dist/atoms/drawer.js +1 -4
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.cjs +116 -131
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +46 -47
- package/dist/atoms/pagination.js +2 -2
- package/dist/atoms/toast.cjs +7 -10
- package/dist/atoms/toast.cjs.map +1 -1
- package/dist/atoms/toast.js +1 -2
- package/dist/chunk-2FIAJ3FS.js +59 -0
- package/dist/chunk-2FIAJ3FS.js.map +1 -0
- package/dist/chunk-2QDLO3YM.js +97 -0
- package/dist/chunk-2QDLO3YM.js.map +1 -0
- package/dist/chunk-33YXJNZC.js +39 -0
- package/dist/chunk-33YXJNZC.js.map +1 -0
- package/dist/chunk-3PKH6B5Q.js +90 -0
- package/dist/chunk-3PKH6B5Q.js.map +1 -0
- package/dist/chunk-3QK6FAST.js +88 -0
- package/dist/chunk-3QK6FAST.js.map +1 -0
- package/dist/chunk-4BPB2XGG.js +94 -0
- package/dist/chunk-4BPB2XGG.js.map +1 -0
- package/dist/chunk-4LU6NFEH.js +59 -0
- package/dist/chunk-4LU6NFEH.js.map +1 -0
- package/dist/chunk-4SMYMKD7.js +59 -0
- package/dist/chunk-4SMYMKD7.js.map +1 -0
- package/dist/chunk-5T5OBKU6.js +38 -0
- package/dist/chunk-5T5OBKU6.js.map +1 -0
- package/dist/chunk-6IUPU7DC.js +44 -0
- package/dist/chunk-6IUPU7DC.js.map +1 -0
- package/dist/chunk-6MWBFGPV.js +44 -0
- package/dist/chunk-6MWBFGPV.js.map +1 -0
- package/dist/chunk-7JIZ5JRE.js +97 -0
- package/dist/chunk-7JIZ5JRE.js.map +1 -0
- package/dist/chunk-7MGIYERY.js +340 -0
- package/dist/chunk-7MGIYERY.js.map +1 -0
- package/dist/chunk-7MGKSZWD.js +59 -0
- package/dist/chunk-7MGKSZWD.js.map +1 -0
- package/dist/chunk-7NEEBOE5.js +59 -0
- package/dist/chunk-7NEEBOE5.js.map +1 -0
- package/dist/chunk-7TLF23E7.js +50 -0
- package/dist/chunk-7TLF23E7.js.map +1 -0
- package/dist/chunk-AAAQKCFX.js +39 -0
- package/dist/chunk-AAAQKCFX.js.map +1 -0
- package/dist/chunk-AOUTNRVR.js +94 -0
- package/dist/chunk-AOUTNRVR.js.map +1 -0
- package/dist/chunk-AOY2722L.js +43 -0
- package/dist/chunk-AOY2722L.js.map +1 -0
- package/dist/chunk-CA3KCVF3.js +44 -0
- package/dist/chunk-CA3KCVF3.js.map +1 -0
- package/dist/chunk-DWRAPSVA.js +94 -0
- package/dist/chunk-DWRAPSVA.js.map +1 -0
- package/dist/chunk-E2EF6AJK.js +340 -0
- package/dist/chunk-E2EF6AJK.js.map +1 -0
- package/dist/chunk-EBIISCYP.js +59 -0
- package/dist/chunk-EBIISCYP.js.map +1 -0
- package/dist/chunk-EWD4AO5N.js +49 -0
- package/dist/chunk-EWD4AO5N.js.map +1 -0
- package/dist/chunk-EYP37NAX.js +39 -0
- package/dist/chunk-EYP37NAX.js.map +1 -0
- package/dist/chunk-FLPWMNPQ.js +340 -0
- package/dist/chunk-FLPWMNPQ.js.map +1 -0
- package/dist/chunk-FYQHXVVC.js +39 -0
- package/dist/chunk-FYQHXVVC.js.map +1 -0
- package/dist/chunk-G653JNTD.js +59 -0
- package/dist/chunk-G653JNTD.js.map +1 -0
- package/dist/chunk-G7BR6KSX.js +130 -0
- package/dist/chunk-G7BR6KSX.js.map +1 -0
- package/dist/chunk-GXID5CO5.js +92 -0
- package/dist/chunk-GXID5CO5.js.map +1 -0
- package/dist/chunk-HDIMW26M.js +40 -0
- package/dist/chunk-HDIMW26M.js.map +1 -0
- package/dist/chunk-HJQQMAUB.js +50 -0
- package/dist/chunk-HJQQMAUB.js.map +1 -0
- package/dist/chunk-HMLPXWJ6.js +94 -0
- package/dist/chunk-HMLPXWJ6.js.map +1 -0
- package/dist/chunk-HWJLK6WM.js +39 -0
- package/dist/chunk-HWJLK6WM.js.map +1 -0
- package/dist/chunk-I2PIGNYP.js +97 -0
- package/dist/chunk-I2PIGNYP.js.map +1 -0
- package/dist/chunk-IX7WVKHI.js +59 -0
- package/dist/chunk-IX7WVKHI.js.map +1 -0
- package/dist/chunk-J4DYXLNJ.js +88 -0
- package/dist/chunk-J4DYXLNJ.js.map +1 -0
- package/dist/chunk-JGEN42KT.js +35 -0
- package/dist/chunk-JGEN42KT.js.map +1 -0
- package/dist/chunk-KK5BCWBR.js +42 -0
- package/dist/chunk-KK5BCWBR.js.map +1 -0
- package/dist/chunk-KLOQQGZ3.js +42 -0
- package/dist/chunk-KLOQQGZ3.js.map +1 -0
- package/dist/chunk-KVGCDBJ4.js +42 -0
- package/dist/chunk-KVGCDBJ4.js.map +1 -0
- package/dist/chunk-L3UVJ67X.js +340 -0
- package/dist/chunk-L3UVJ67X.js.map +1 -0
- package/dist/chunk-LS64FVRE.js +59 -0
- package/dist/chunk-LS64FVRE.js.map +1 -0
- package/dist/chunk-LVXTFKVJ.js +49 -0
- package/dist/chunk-LVXTFKVJ.js.map +1 -0
- package/dist/chunk-MFVWAA4Y.js +56 -0
- package/dist/chunk-MFVWAA4Y.js.map +1 -0
- package/dist/chunk-MKYNSWMI.js +340 -0
- package/dist/chunk-MKYNSWMI.js.map +1 -0
- package/dist/chunk-NJTNP47L.js +340 -0
- package/dist/chunk-NJTNP47L.js.map +1 -0
- package/dist/chunk-NUEMI3QO.js +340 -0
- package/dist/chunk-NUEMI3QO.js.map +1 -0
- package/dist/chunk-NY6E6TKU.js +94 -0
- package/dist/chunk-NY6E6TKU.js.map +1 -0
- package/dist/chunk-OJQJLBBK.js +39 -0
- package/dist/chunk-OJQJLBBK.js.map +1 -0
- package/dist/chunk-P7633BEQ.js +340 -0
- package/dist/chunk-P7633BEQ.js.map +1 -0
- package/dist/chunk-P7NBEL7J.js +88 -0
- package/dist/chunk-P7NBEL7J.js.map +1 -0
- package/dist/chunk-PLXOVGG4.js +39 -0
- package/dist/chunk-PLXOVGG4.js.map +1 -0
- package/dist/chunk-PT5CZAR3.js +94 -0
- package/dist/chunk-PT5CZAR3.js.map +1 -0
- package/dist/chunk-PXABCUAT.js +44 -0
- package/dist/chunk-PXABCUAT.js.map +1 -0
- package/dist/chunk-QNYKTW7L.js +45 -0
- package/dist/chunk-QNYKTW7L.js.map +1 -0
- package/dist/chunk-QVQCTPDU.js +130 -0
- package/dist/chunk-QVQCTPDU.js.map +1 -0
- package/dist/chunk-RXCENPRG.js +38 -0
- package/dist/chunk-RXCENPRG.js.map +1 -0
- package/dist/chunk-SSI6JRBA.js +92 -0
- package/dist/chunk-SSI6JRBA.js.map +1 -0
- package/dist/chunk-T2DBM2OA.js +59 -0
- package/dist/chunk-T2DBM2OA.js.map +1 -0
- package/dist/chunk-TAU5LFOR.js +39 -0
- package/dist/chunk-TAU5LFOR.js.map +1 -0
- package/dist/chunk-UFW4DFY5.js +39 -0
- package/dist/chunk-UFW4DFY5.js.map +1 -0
- package/dist/chunk-US7J5XUZ.js +36 -0
- package/dist/chunk-US7J5XUZ.js.map +1 -0
- package/dist/chunk-VPHZV3J2.js +340 -0
- package/dist/chunk-VPHZV3J2.js.map +1 -0
- package/dist/chunk-WZJWP4AC.js +59 -0
- package/dist/chunk-WZJWP4AC.js.map +1 -0
- package/dist/chunk-X2VREBVY.js +39 -0
- package/dist/chunk-X2VREBVY.js.map +1 -0
- package/dist/chunk-X55DKUZS.js +39 -0
- package/dist/chunk-X55DKUZS.js.map +1 -0
- package/dist/chunk-XFPO6ULS.js +39 -0
- package/dist/chunk-XFPO6ULS.js.map +1 -0
- package/dist/chunk-XKOYSFH4.js +43 -0
- package/dist/chunk-XKOYSFH4.js.map +1 -0
- package/dist/chunk-XXKNNYIJ.js +59 -0
- package/dist/chunk-XXKNNYIJ.js.map +1 -0
- package/dist/chunk-Y3L7BYDF.js +169 -0
- package/dist/chunk-Y3L7BYDF.js.map +1 -0
- package/dist/chunk-YA3PXLPU.js +53 -0
- package/dist/chunk-YA3PXLPU.js.map +1 -0
- package/dist/chunk-YAAL4JEU.js +59 -0
- package/dist/chunk-YAAL4JEU.js.map +1 -0
- package/dist/chunk-YESWEUM2.js +1 -0
- package/dist/chunk-YESWEUM2.js.map +1 -0
- package/dist/chunk-YILB2DTL.js +39 -0
- package/dist/chunk-YILB2DTL.js.map +1 -0
- package/dist/chunk-YNVFLDKB.js +92 -0
- package/dist/chunk-YNVFLDKB.js.map +1 -0
- package/dist/chunk-YSBOFKXT.js +39 -0
- package/dist/chunk-YSBOFKXT.js.map +1 -0
- package/dist/chunk-YTYGMU6L.js +169 -0
- package/dist/chunk-YTYGMU6L.js.map +1 -0
- package/dist/chunk-ZC7IMWRE.js +38 -0
- package/dist/chunk-ZC7IMWRE.js.map +1 -0
- package/dist/chunk-ZUUS4QZE.js +59 -0
- package/dist/chunk-ZUUS4QZE.js.map +1 -0
- package/dist/chunk-ZYNW3VYG.js +53 -0
- package/dist/chunk-ZYNW3VYG.js.map +1 -0
- package/dist/index.cjs +244 -252
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +67 -38
- package/dist/index.css.map +1 -1
- package/dist/index.js +72 -72
- package/dist/molecules/date-picker/index.js +2 -2
- package/dist/molecules/expand-table/index.js +24 -25
- package/dist/molecules/expand-table/row.js +21 -22
- package/dist/molecules/index.cjs +26 -24
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +28 -29
- package/dist/molecules/navigation.js +22 -23
- package/dist/molecules/stepper.js +3 -3
- package/dist/molecules/tag-selector.cjs +2 -0
- package/dist/molecules/tag-selector.cjs.map +1 -1
- package/dist/molecules/tag-selector.js +22 -23
- package/package.json +1 -1
- package/src/atoms/badge.tsx +3 -1
- package/src/atoms/dialog.tsx +0 -2
- package/src/atoms/drawer.tsx +8 -14
- package/src/atoms/toast.tsx +12 -19
package/dist/atoms/badge.cjs
CHANGED
package/dist/atoms/badge.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/atoms/badge.tsx"],"sourcesContent":["import {\n Badge as RadixBadge,\n type BadgeProps as RadixBadgeProps,\n} from '@radix-ui/themes';\nimport { useMemo, forwardRef } from 'react';\n\nexport type BadgeProps = Omit<RadixBadgeProps, 'color' | 'size'> & {\n size?: 'small' | 'large';\n color?: 'error' | 'accent' | 'neutral' | 'success';\n};\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n (props: BadgeProps, ref): React.ReactElement => {\n const { size = 'small', color = 'accent', ...rest } = props;\n\n const radixSize = useMemo(() => {\n switch (size) {\n case 'small':\n return '1';\n case 'large':\n return '3';\n default:\n return '1';\n }\n }, [size]);\n\n const radixColor = useMemo(() => {\n switch (color) {\n case 'error':\n return 'red';\n case 'neutral':\n return 'gray';\n case 'success':\n return 'green';\n case 'accent':\n default:\n return undefined;\n }\n }, [color]);\n\n return (\n <RadixBadge {...rest} color={radixColor} ref={ref} size={radixSize} />\n );\n }\n);\n\nBadge.displayName = 'Badge';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAGO;AACP,mBAAoC;
|
|
1
|
+
{"version":3,"sources":["../../src/atoms/badge.tsx"],"sourcesContent":["import {\n Badge as RadixBadge,\n type BadgeProps as RadixBadgeProps,\n} from '@radix-ui/themes';\nimport { useMemo, forwardRef } from 'react';\n\nexport type BadgeProps = Omit<RadixBadgeProps, 'color' | 'size'> & {\n size?: 'small' | 'medium' | 'large';\n color?: 'error' | 'accent' | 'neutral' | 'success';\n};\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n (props: BadgeProps, ref): React.ReactElement => {\n const { size = 'small', color = 'accent', ...rest } = props;\n\n const radixSize = useMemo(() => {\n switch (size) {\n case 'small':\n return '1';\n case 'medium':\n return '2';\n case 'large':\n return '3';\n default:\n return '1';\n }\n }, [size]);\n\n const radixColor = useMemo(() => {\n switch (color) {\n case 'error':\n return 'red';\n case 'neutral':\n return 'gray';\n case 'success':\n return 'green';\n case 'accent':\n default:\n return undefined;\n }\n }, [color]);\n\n return (\n <RadixBadge {...rest} color={radixColor} ref={ref} size={radixSize} />\n );\n }\n);\n\nBadge.displayName = 'Badge';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAGO;AACP,mBAAoC;AAuC9B;AAhCC,IAAM,YAAQ;AAAA,EACnB,CAAC,OAAmB,QAA4B;AAC9C,UAAsD,YAA9C,SAAO,SAAS,QAAQ,SAbpC,IAa0D,IAAT,iBAAS,IAAT,CAArC,QAAgB;AAExB,UAAM,gBAAY,sBAAQ,MAAM;AAC9B,cAAQ,MAAM;AAAA,QACZ,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT;AACE,iBAAO;AAAA,MACX;AAAA,IACF,GAAG,CAAC,IAAI,CAAC;AAET,UAAM,iBAAa,sBAAQ,MAAM;AAC/B,cAAQ,OAAO;AAAA,QACb,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AAAA,QACL;AACE,iBAAO;AAAA,MACX;AAAA,IACF,GAAG,CAAC,KAAK,CAAC;AAEV,WACE,4CAAC,cAAAA,OAAA,iCAAe,OAAf,EAAqB,OAAO,YAAY,KAAU,MAAM,YAAW;AAAA,EAExE;AACF;AAEA,MAAM,cAAc;","names":["RadixBadge"]}
|
package/dist/atoms/badge.d.cts
CHANGED
|
@@ -2,11 +2,11 @@ import * as react from 'react';
|
|
|
2
2
|
import { BadgeProps as BadgeProps$1 } from '@radix-ui/themes';
|
|
3
3
|
|
|
4
4
|
type BadgeProps = Omit<BadgeProps$1, 'color' | 'size'> & {
|
|
5
|
-
size?: 'small' | 'large';
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
6
|
color?: 'error' | 'accent' | 'neutral' | 'success';
|
|
7
7
|
};
|
|
8
8
|
declare const Badge: react.ForwardRefExoticComponent<Omit<BadgeProps$1, "size" | "color"> & {
|
|
9
|
-
size?: "small" | "large" | undefined;
|
|
9
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
10
10
|
color?: "error" | "accent" | "neutral" | "success" | undefined;
|
|
11
11
|
} & react.RefAttributes<HTMLSpanElement>>;
|
|
12
12
|
|
package/dist/atoms/badge.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import * as react from 'react';
|
|
|
2
2
|
import { BadgeProps as BadgeProps$1 } from '@radix-ui/themes';
|
|
3
3
|
|
|
4
4
|
type BadgeProps = Omit<BadgeProps$1, 'color' | 'size'> & {
|
|
5
|
-
size?: 'small' | 'large';
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
6
|
color?: 'error' | 'accent' | 'neutral' | 'success';
|
|
7
7
|
};
|
|
8
8
|
declare const Badge: react.ForwardRefExoticComponent<Omit<BadgeProps$1, "size" | "color"> & {
|
|
9
|
-
size?: "small" | "large" | undefined;
|
|
9
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
10
10
|
color?: "error" | "accent" | "neutral" | "success" | undefined;
|
|
11
11
|
} & react.RefAttributes<HTMLSpanElement>>;
|
|
12
12
|
|
package/dist/atoms/badge.js
CHANGED
package/dist/atoms/dialog.cjs
CHANGED
|
@@ -63,8 +63,8 @@ __export(dialog_exports, {
|
|
|
63
63
|
});
|
|
64
64
|
module.exports = __toCommonJS(dialog_exports);
|
|
65
65
|
var RadixDialog = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
66
|
-
var
|
|
67
|
-
var
|
|
66
|
+
var import_react_icons = require("@radix-ui/react-icons");
|
|
67
|
+
var import_themes2 = require("@radix-ui/themes");
|
|
68
68
|
var import_react2 = require("react");
|
|
69
69
|
|
|
70
70
|
// src/atoms/button.tsx
|
|
@@ -112,39 +112,8 @@ var Button = (0, import_react.forwardRef)(
|
|
|
112
112
|
);
|
|
113
113
|
Button.displayName = "Button";
|
|
114
114
|
|
|
115
|
-
// src/atoms/toast.tsx
|
|
116
|
-
var import_react_icons = require("@radix-ui/react-icons");
|
|
117
|
-
var import_react_toastify = require("react-toastify");
|
|
118
|
-
|
|
119
|
-
// src/atoms/icon-button.tsx
|
|
120
|
-
var import_themes2 = require("@radix-ui/themes");
|
|
121
|
-
|
|
122
|
-
// src/atoms/toast.tsx
|
|
123
|
-
var import_react_toastify2 = require("react-toastify");
|
|
124
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
125
|
-
function CloseButton({ closeToast }) {
|
|
126
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_themes2.IconButton, { color: "gray", onClick: closeToast, variant: "ghost", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_icons.Cross1Icon, {}) });
|
|
127
|
-
}
|
|
128
|
-
function ToastContainer(props) {
|
|
129
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
130
|
-
import_react_toastify.ToastContainer,
|
|
131
|
-
__spreadValues({
|
|
132
|
-
autoClose: 5e3,
|
|
133
|
-
closeButton: CloseButton,
|
|
134
|
-
closeOnClick: true,
|
|
135
|
-
draggable: true,
|
|
136
|
-
hideProgressBar: true,
|
|
137
|
-
newestOnTop: true,
|
|
138
|
-
pauseOnFocusLoss: true,
|
|
139
|
-
pauseOnHover: true,
|
|
140
|
-
position: "bottom-right",
|
|
141
|
-
rtl: false
|
|
142
|
-
}, props)
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
115
|
// src/atoms/dialog.tsx
|
|
147
|
-
var
|
|
116
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
148
117
|
function Content2(props) {
|
|
149
118
|
const _a = props, {
|
|
150
119
|
children,
|
|
@@ -169,28 +138,25 @@ function Content2(props) {
|
|
|
169
138
|
(0, import_react2.useEffect)(() => {
|
|
170
139
|
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
171
140
|
}, []);
|
|
172
|
-
return /* @__PURE__ */ (0,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
),
|
|
192
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ToastContainer, {})
|
|
193
|
-
] }) });
|
|
141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RadixDialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RadixDialog.Overlay, { className: "DialogOverlay", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
142
|
+
RadixDialog.Content,
|
|
143
|
+
__spreadProps(__spreadValues({
|
|
144
|
+
className: "DialogContent",
|
|
145
|
+
style: __spreadValues({
|
|
146
|
+
width,
|
|
147
|
+
maxWidth,
|
|
148
|
+
minWidth,
|
|
149
|
+
maxHeight,
|
|
150
|
+
height,
|
|
151
|
+
minHeight
|
|
152
|
+
}, style)
|
|
153
|
+
}, rest), {
|
|
154
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_themes2.Flex, { direction: "column", style: { position: "relative" }, children: [
|
|
155
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RadixDialog.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Button, { color: "gray", variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_icons.Cross1Icon, { height: "18px", width: "18px" }) }) }),
|
|
156
|
+
children
|
|
157
|
+
] })
|
|
158
|
+
})
|
|
159
|
+
) }) });
|
|
194
160
|
}
|
|
195
161
|
function Close2(_a) {
|
|
196
162
|
var _b = _a, {
|
|
@@ -198,7 +164,7 @@ function Close2(_a) {
|
|
|
198
164
|
} = _b, rest = __objRest(_b, [
|
|
199
165
|
"children"
|
|
200
166
|
]);
|
|
201
|
-
return /* @__PURE__ */ (0,
|
|
167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RadixDialog.Close, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
202
168
|
}
|
|
203
169
|
function Trigger2(_a) {
|
|
204
170
|
var _b = _a, {
|
|
@@ -206,7 +172,7 @@ function Trigger2(_a) {
|
|
|
206
172
|
} = _b, rest = __objRest(_b, [
|
|
207
173
|
"children"
|
|
208
174
|
]);
|
|
209
|
-
return /* @__PURE__ */ (0,
|
|
175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
210
176
|
}
|
|
211
177
|
var Dialog = {
|
|
212
178
|
Root: RadixDialog.Root,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/atoms/dialog.tsx","../../src/atoms/button.tsx"
|
|
1
|
+
{"version":3,"sources":["../../src/atoms/dialog.tsx","../../src/atoms/button.tsx"],"sourcesContent":["import * as RadixDialog from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { Flex } from '@radix-ui/themes';\nimport { useEffect, useRef } from 'react';\nimport { Button } from './button';\n\ntype ContentProps = RadixDialog.DialogContentProps & {\n width?: string;\n maxWidth?: string;\n minWidth?: string;\n height?: string;\n maxHeight?: string;\n minHeight?: string;\n};\n\nfunction Content(props: ContentProps): React.ReactElement {\n const {\n children,\n style = {},\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...rest\n } = props;\n const containerRef = useRef<Element | null>(null);\n\n useEffect(() => {\n containerRef.current = document.getElementsByClassName('radix-themes')[0];\n }, []);\n\n return (\n <RadixDialog.Portal container={containerRef.current}>\n <RadixDialog.Overlay className=\"DialogOverlay\">\n <RadixDialog.Content\n className=\"DialogContent\"\n style={{\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...style,\n }}\n {...rest}\n >\n <Flex direction=\"column\" style={{ position: 'relative' }}>\n <RadixDialog.Close asChild className=\"DialogClose\">\n <Button color=\"gray\" variant=\"transparent\">\n <Cross1Icon height=\"18px\" width=\"18px\" />\n </Button>\n </RadixDialog.Close>\n {children}\n </Flex>\n </RadixDialog.Content>\n </RadixDialog.Overlay>\n </RadixDialog.Portal>\n );\n}\n\nfunction Close({\n children,\n ...rest\n}: RadixDialog.DialogCloseProps): React.ReactElement {\n return (\n <RadixDialog.Close asChild {...rest}>\n {children}\n </RadixDialog.Close>\n );\n}\n\nfunction Trigger({\n children,\n ...rest\n}: RadixDialog.DialogTriggerProps): React.ReactElement {\n return (\n <RadixDialog.Trigger asChild {...rest}>\n {children}\n </RadixDialog.Trigger>\n );\n}\n\nexport const Dialog = {\n Root: RadixDialog.Root,\n Trigger,\n Content,\n Close,\n Description: RadixDialog.Description,\n Title: RadixDialog.Title,\n};\n","import {\n Button as RadixButton,\n type ButtonProps as RadixButtonProps,\n} from '@radix-ui/themes';\nimport React, { forwardRef, useMemo } from 'react';\n\nexport type ButtonProps = Omit<RadixButtonProps, 'size' | 'variant'> & {\n size?: 'small' | 'medium' | 'large';\n variant?: RadixButtonProps['variant'] | 'transparent';\n};\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (props, ref): React.ReactElement => {\n const { size, style, variant, ...restProps } = props;\n\n const radixSize = useMemo(() => {\n switch (size) {\n case 'small':\n return '1';\n case 'medium':\n return '2';\n case 'large':\n return '3';\n default:\n return '2';\n }\n }, [size]);\n\n const mergedStyle = useMemo<ButtonProps['style']>(() => {\n const baseStyle = {\n background: variant === 'transparent' ? 'transparent' : undefined,\n fontWeight: 400,\n };\n return { ...baseStyle, ...style };\n }, [style, variant]);\n\n const radixVariant = useMemo(() => {\n if (variant === 'transparent') return 'ghost';\n return variant;\n }, [variant]);\n\n return (\n <RadixButton\n style={mergedStyle}\n variant={radixVariant}\n {...restProps}\n ref={ref}\n size={radixSize}\n />\n );\n }\n);\n\nButton.displayName = 'Button';\n"],"mappings":"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","names":["import_themes","import_react","RadixButton","import_jsx_runtime","Content","Close","Trigger"]}
|
package/dist/atoms/dialog.js
CHANGED
package/dist/atoms/drawer.cjs
CHANGED
|
@@ -67,49 +67,9 @@ __export(drawer_exports, {
|
|
|
67
67
|
module.exports = __toCommonJS(drawer_exports);
|
|
68
68
|
var import_react = require("react");
|
|
69
69
|
var Dialog = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
70
|
-
|
|
71
|
-
// src/theme/theme-provider.tsx
|
|
72
|
-
var import_themes = require("@radix-ui/themes");
|
|
73
70
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
74
|
-
function ThemeProvider(props) {
|
|
75
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_themes.Theme, __spreadValues({ accentColor: "iris", radius: "medium" }, props));
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// src/atoms/toast.tsx
|
|
79
|
-
var import_react_icons = require("@radix-ui/react-icons");
|
|
80
|
-
var import_react_toastify = require("react-toastify");
|
|
81
|
-
|
|
82
|
-
// src/atoms/icon-button.tsx
|
|
83
|
-
var import_themes2 = require("@radix-ui/themes");
|
|
84
|
-
|
|
85
|
-
// src/atoms/toast.tsx
|
|
86
|
-
var import_react_toastify2 = require("react-toastify");
|
|
87
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
88
|
-
function CloseButton({ closeToast }) {
|
|
89
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_themes2.IconButton, { color: "gray", onClick: closeToast, variant: "ghost", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_icons.Cross1Icon, {}) });
|
|
90
|
-
}
|
|
91
|
-
function ToastContainer(props) {
|
|
92
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
93
|
-
import_react_toastify.ToastContainer,
|
|
94
|
-
__spreadValues({
|
|
95
|
-
autoClose: 5e3,
|
|
96
|
-
closeButton: CloseButton,
|
|
97
|
-
closeOnClick: true,
|
|
98
|
-
draggable: true,
|
|
99
|
-
hideProgressBar: true,
|
|
100
|
-
newestOnTop: true,
|
|
101
|
-
pauseOnFocusLoss: true,
|
|
102
|
-
pauseOnHover: true,
|
|
103
|
-
position: "bottom-right",
|
|
104
|
-
rtl: false
|
|
105
|
-
}, props)
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// src/atoms/drawer.tsx
|
|
110
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
111
71
|
function Root2(props) {
|
|
112
|
-
return /* @__PURE__ */ (0,
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Dialog.Root, __spreadValues({}, props));
|
|
113
73
|
}
|
|
114
74
|
function Content2(props) {
|
|
115
75
|
const _a = props, { position = "right", className, children } = _a, rest = __objRest(_a, ["position", "className", "children"]);
|
|
@@ -117,23 +77,20 @@ function Content2(props) {
|
|
|
117
77
|
(0, import_react.useEffect)(() => {
|
|
118
78
|
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
119
79
|
}, []);
|
|
120
|
-
return /* @__PURE__ */ (0,
|
|
121
|
-
/* @__PURE__ */ (0,
|
|
122
|
-
/* @__PURE__ */ (0,
|
|
80
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Dialog.Portal, { container: containerRef.current, children: [
|
|
81
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Dialog.Overlay, { className: "DrawerOverlay" }),
|
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
123
83
|
Dialog.Content,
|
|
124
84
|
__spreadProps(__spreadValues({
|
|
125
85
|
className: `DrawerContent ${position} ${className || ""}`
|
|
126
86
|
}, rest), {
|
|
127
|
-
children
|
|
128
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ToastContainer, {}),
|
|
129
|
-
children
|
|
130
|
-
]
|
|
87
|
+
children
|
|
131
88
|
})
|
|
132
89
|
)
|
|
133
|
-
] })
|
|
90
|
+
] });
|
|
134
91
|
}
|
|
135
92
|
function Trigger2(props) {
|
|
136
|
-
return /* @__PURE__ */ (0,
|
|
93
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Dialog.Trigger, __spreadValues({ asChild: true }, props));
|
|
137
94
|
}
|
|
138
95
|
var Drawer = {
|
|
139
96
|
Root: Dialog.Root,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/atoms/drawer.tsx"
|
|
1
|
+
{"version":3,"sources":["../../src/atoms/drawer.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport * as Dialog from '@radix-ui/react-dialog';\n\nexport function Root(props: Dialog.DialogProps): React.ReactNode {\n return <Dialog.Root {...props} />;\n}\n\ntype ContentProps = Dialog.DialogContentProps & {\n /** Drawer가 붙는 위치, 기본값 right */\n position?: 'left' | 'right' | 'bottom' | 'top';\n};\n\nexport function Content(props: ContentProps): React.ReactElement {\n const { position = 'right', className, children, ...rest } = props;\n\n const containerRef = useRef<Element | null>(null);\n useEffect(() => {\n containerRef.current = document.getElementsByClassName('radix-themes')[0];\n }, []);\n\n return (\n <Dialog.Portal container={containerRef.current}>\n <Dialog.Overlay className=\"DrawerOverlay\" />\n <Dialog.Content\n className={`DrawerContent ${position} ${className || ''}`}\n {...rest}\n >\n {children}\n </Dialog.Content>\n </Dialog.Portal>\n );\n}\n\nexport function Trigger(props: Dialog.DialogTriggerProps): React.ReactNode {\n return <Dialog.Trigger asChild {...props} />;\n}\n\nexport const Drawer = {\n Root: Dialog.Root,\n Trigger,\n Content,\n Close: Dialog.Close,\n Title: Dialog.Title,\n Description: Dialog.Description,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iBAAAA;AAAA,EAAA;AAAA,cAAAC;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,mBAAyC;AACzC,aAAwB;AAGf;AADF,SAASC,MAAK,OAA4C;AAC/D,SAAO,4CAAQ,aAAP,mBAAgB,MAAO;AACjC;AAOO,SAASC,SAAQ,OAAyC;AAC/D,QAA6D,YAArD,aAAW,SAAS,WAAW,SAbzC,IAa+D,IAAT,iBAAS,IAAT,CAA5C,YAAoB,aAAW;AAEvC,QAAM,mBAAe,qBAAuB,IAAI;AAChD,8BAAU,MAAM;AACd,iBAAa,UAAU,SAAS,uBAAuB,cAAc,EAAE,CAAC;AAAA,EAC1E,GAAG,CAAC,CAAC;AAEL,SACE,6CAAQ,eAAP,EAAc,WAAW,aAAa,SACrC;AAAA,gDAAQ,gBAAP,EAAe,WAAU,iBAAgB;AAAA,IAC1C;AAAA,MAAQ;AAAA,MAAP;AAAA,QACC,WAAW,iBAAiB,QAAQ,IAAI,aAAa,EAAE;AAAA,SACnD,OAFL;AAAA,QAIE;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAEO,SAASC,SAAQ,OAAmD;AACzE,SAAO,4CAAQ,gBAAP,iBAAe,SAAO,QAAK,MAAO;AAC5C;AAEO,IAAM,SAAS;AAAA,EACpB,MAAa;AAAA,EACb,SAAAA;AAAA,EACA,SAAAD;AAAA,EACA,OAAc;AAAA,EACd,OAAc;AAAA,EACd,aAAoB;AACtB;","names":["Content","Root","Trigger","Root","Content","Trigger"]}
|
package/dist/atoms/drawer.d.cts
CHANGED
|
@@ -6,7 +6,7 @@ type ContentProps = Dialog.DialogContentProps & {
|
|
|
6
6
|
/** Drawer가 붙는 위치, 기본값 right */
|
|
7
7
|
position?: 'left' | 'right' | 'bottom' | 'top';
|
|
8
8
|
};
|
|
9
|
-
declare function Content(props: ContentProps): react__default.
|
|
9
|
+
declare function Content(props: ContentProps): react__default.ReactElement;
|
|
10
10
|
declare function Trigger(props: Dialog.DialogTriggerProps): react__default.ReactNode;
|
|
11
11
|
declare const Drawer: {
|
|
12
12
|
Root: react__default.FC<Dialog.DialogProps>;
|
package/dist/atoms/drawer.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ type ContentProps = Dialog.DialogContentProps & {
|
|
|
6
6
|
/** Drawer가 붙는 위치, 기본값 right */
|
|
7
7
|
position?: 'left' | 'right' | 'bottom' | 'top';
|
|
8
8
|
};
|
|
9
|
-
declare function Content(props: ContentProps): react__default.
|
|
9
|
+
declare function Content(props: ContentProps): react__default.ReactElement;
|
|
10
10
|
declare function Trigger(props: Dialog.DialogTriggerProps): react__default.ReactNode;
|
|
11
11
|
declare const Drawer: {
|
|
12
12
|
Root: react__default.FC<Dialog.DialogProps>;
|
package/dist/atoms/drawer.js
CHANGED