@tipp/ui 1.2.11 → 1.2.12
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/dialog.cjs +44 -10
- package/dist/atoms/dialog.cjs.map +1 -1
- package/dist/atoms/dialog.js +3 -1
- package/dist/atoms/index.cjs +90 -83
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +1 -1
- package/dist/chunk-6CZBINAI.js +94 -0
- package/dist/chunk-6CZBINAI.js.map +1 -0
- package/dist/index.cjs +144 -137
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/molecules/expand-table/index.js +1 -1
- package/dist/molecules/expand-table/row.js +1 -1
- package/dist/molecules/index.cjs +24 -24
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +1 -1
- package/dist/molecules/navigation.js +1 -1
- package/dist/molecules/tag-selector.js +1 -1
- package/package.json +1 -1
- package/src/atoms/dialog.tsx +2 -0
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_icons2 = require("@radix-ui/react-icons");
|
|
67
|
+
var import_themes3 = require("@radix-ui/themes");
|
|
68
68
|
var import_react2 = require("react");
|
|
69
69
|
|
|
70
70
|
// src/atoms/button.tsx
|
|
@@ -112,8 +112,39 @@ var Button = (0, import_react.forwardRef)(
|
|
|
112
112
|
);
|
|
113
113
|
Button.displayName = "Button";
|
|
114
114
|
|
|
115
|
-
// src/atoms/
|
|
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");
|
|
116
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
|
+
// src/atoms/dialog.tsx
|
|
147
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
117
148
|
function Content2(props) {
|
|
118
149
|
const _a = props, {
|
|
119
150
|
children,
|
|
@@ -138,7 +169,7 @@ function Content2(props) {
|
|
|
138
169
|
(0, import_react2.useEffect)(() => {
|
|
139
170
|
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
140
171
|
}, []);
|
|
141
|
-
return /* @__PURE__ */ (0,
|
|
172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RadixDialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RadixDialog.Overlay, { className: "DialogOverlay", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
142
173
|
RadixDialog.Content,
|
|
143
174
|
__spreadProps(__spreadValues({
|
|
144
175
|
className: "DialogContent",
|
|
@@ -151,10 +182,13 @@ function Content2(props) {
|
|
|
151
182
|
minHeight
|
|
152
183
|
}, style)
|
|
153
184
|
}, rest), {
|
|
154
|
-
children:
|
|
155
|
-
/* @__PURE__ */ (0,
|
|
156
|
-
|
|
157
|
-
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_themes3.Flex, { direction: "column", style: { position: "relative" }, children: [
|
|
187
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RadixDialog.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Button, { color: "gray", variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_icons2.Cross1Icon, { height: "18px", width: "18px" }) }) }),
|
|
188
|
+
children
|
|
189
|
+
] }),
|
|
190
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ToastContainer, {})
|
|
191
|
+
]
|
|
158
192
|
})
|
|
159
193
|
) }) });
|
|
160
194
|
}
|
|
@@ -164,7 +198,7 @@ function Close2(_a) {
|
|
|
164
198
|
} = _b, rest = __objRest(_b, [
|
|
165
199
|
"children"
|
|
166
200
|
]);
|
|
167
|
-
return /* @__PURE__ */ (0,
|
|
201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RadixDialog.Close, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
168
202
|
}
|
|
169
203
|
function Trigger2(_a) {
|
|
170
204
|
var _b = _a, {
|
|
@@ -172,7 +206,7 @@ function Trigger2(_a) {
|
|
|
172
206
|
} = _b, rest = __objRest(_b, [
|
|
173
207
|
"children"
|
|
174
208
|
]);
|
|
175
|
-
return /* @__PURE__ */ (0,
|
|
209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
176
210
|
}
|
|
177
211
|
var Dialog = {
|
|
178
212
|
Root: RadixDialog.Root,
|
|
@@ -1 +1 @@
|
|
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6B;AAC7B,
|
|
1
|
+
{"version":3,"sources":["../../src/atoms/dialog.tsx","../../src/atoms/button.tsx","../../src/atoms/toast.tsx","../../src/atoms/icon-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';\nimport { ToastContainer } from './toast';\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 <ToastContainer />\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","import { Cross1Icon } from '@radix-ui/react-icons';\nimport type { Theme, ToastContainerProps, TypeOptions } from 'react-toastify';\nimport { ToastContainer as ToastifyToastContainer } from 'react-toastify';\nimport { IconButton } from './icon-button';\n\nexport { toast } from 'react-toastify';\n\ninterface CloseButtonProps {\n closeToast: (e: React.MouseEvent<HTMLElement>) => void;\n type: TypeOptions;\n ariaLabel?: string;\n theme: Theme;\n}\nfunction CloseButton({ closeToast }: CloseButtonProps): React.ReactNode {\n return (\n <IconButton color=\"gray\" onClick={closeToast} variant=\"ghost\">\n <Cross1Icon />\n </IconButton>\n );\n}\n\nexport function ToastContainer(props: ToastContainerProps): React.ReactElement {\n return (\n <ToastifyToastContainer\n autoClose={5000}\n closeButton={CloseButton}\n closeOnClick\n draggable\n hideProgressBar\n newestOnTop\n pauseOnFocusLoss\n pauseOnHover\n position=\"bottom-right\"\n rtl={false}\n {...props}\n />\n );\n}\n","export { IconButton, type IconButtonProps } from '@radix-ui/themes';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6B;AAC7B,IAAAA,sBAA2B;AA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V;AAAA,IADH;AAAA;AAGA,SACE,6CAAa,mBAAZ,+BAAkB,SAAO,QAAK,OAA9B,EACE,WACH;AAEJ;AAEA,SAASC,SAAQ,IAGsC;AAHtC,eACf;AAAA;AAAA,EA7EF,IA4EiB,IAEZ,iBAFY,IAEZ;AAAA,IADH;AAAA;AAGA,SACE,6CAAa,qBAAZ,+BAAoB,SAAO,QAAK,OAAhC,EACE,WACH;AAEJ;AAEO,IAAM,SAAS;AAAA,EACpB,MAAkB;AAAA,EAClB,SAAAA;AAAA,EACA,SAAAF;AAAA,EACA,OAAAC;AAAA,EACA,aAAyB;AAAA,EACzB,OAAmB;AACrB;","names":["import_react_icons","import_themes","import_react","RadixButton","import_themes","import_react_toastify","import_jsx_runtime","ToastifyToastContainer","import_jsx_runtime","Content","Close","Trigger"]}
|
package/dist/atoms/dialog.js
CHANGED
package/dist/atoms/index.cjs
CHANGED
|
@@ -81,14 +81,14 @@ __export(atoms_exports, {
|
|
|
81
81
|
Drawer: () => Drawer,
|
|
82
82
|
DropdownMenu: () => DropdownMenu,
|
|
83
83
|
EllipsisTooltip: () => EllipsisTooltip,
|
|
84
|
-
Em: () =>
|
|
84
|
+
Em: () => import_themes19.Em,
|
|
85
85
|
FieldErrorWrapper: () => FieldErrorWrapper,
|
|
86
|
-
Flex: () =>
|
|
86
|
+
Flex: () => import_themes20.Flex,
|
|
87
87
|
Form: () => Form,
|
|
88
|
-
Grid: () =>
|
|
88
|
+
Grid: () => import_themes21.Grid,
|
|
89
89
|
Heading: () => Heading2,
|
|
90
|
-
HoverCard: () =>
|
|
91
|
-
IconButton: () =>
|
|
90
|
+
HoverCard: () => import_themes24.HoverCard,
|
|
91
|
+
IconButton: () => import_themes16.IconButton,
|
|
92
92
|
Inset: () => import_themes25.Inset,
|
|
93
93
|
Kbd: () => import_themes26.Kbd,
|
|
94
94
|
Link: () => Link,
|
|
@@ -335,10 +335,43 @@ var import_themes15 = require("@radix-ui/themes");
|
|
|
335
335
|
|
|
336
336
|
// src/atoms/dialog.tsx
|
|
337
337
|
var RadixDialog = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
338
|
+
var import_react_icons2 = require("@radix-ui/react-icons");
|
|
339
|
+
var import_themes17 = require("@radix-ui/themes");
|
|
340
|
+
var import_react7 = require("react");
|
|
341
|
+
|
|
342
|
+
// src/atoms/toast.tsx
|
|
338
343
|
var import_react_icons = require("@radix-ui/react-icons");
|
|
344
|
+
var import_react_toastify = require("react-toastify");
|
|
345
|
+
|
|
346
|
+
// src/atoms/icon-button.tsx
|
|
339
347
|
var import_themes16 = require("@radix-ui/themes");
|
|
340
|
-
|
|
348
|
+
|
|
349
|
+
// src/atoms/toast.tsx
|
|
350
|
+
var import_react_toastify2 = require("react-toastify");
|
|
341
351
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
352
|
+
function CloseButton({ closeToast }) {
|
|
353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_themes16.IconButton, { color: "gray", onClick: closeToast, variant: "ghost", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_icons.Cross1Icon, {}) });
|
|
354
|
+
}
|
|
355
|
+
function ToastContainer(props) {
|
|
356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
357
|
+
import_react_toastify.ToastContainer,
|
|
358
|
+
__spreadValues({
|
|
359
|
+
autoClose: 5e3,
|
|
360
|
+
closeButton: CloseButton,
|
|
361
|
+
closeOnClick: true,
|
|
362
|
+
draggable: true,
|
|
363
|
+
hideProgressBar: true,
|
|
364
|
+
newestOnTop: true,
|
|
365
|
+
pauseOnFocusLoss: true,
|
|
366
|
+
pauseOnHover: true,
|
|
367
|
+
position: "bottom-right",
|
|
368
|
+
rtl: false
|
|
369
|
+
}, props)
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// src/atoms/dialog.tsx
|
|
374
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
342
375
|
function Content2(props) {
|
|
343
376
|
const _a = props, {
|
|
344
377
|
children,
|
|
@@ -363,7 +396,7 @@ function Content2(props) {
|
|
|
363
396
|
(0, import_react7.useEffect)(() => {
|
|
364
397
|
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
365
398
|
}, []);
|
|
366
|
-
return /* @__PURE__ */ (0,
|
|
399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RadixDialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RadixDialog.Overlay, { className: "DialogOverlay", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
367
400
|
RadixDialog.Content,
|
|
368
401
|
__spreadProps(__spreadValues({
|
|
369
402
|
className: "DialogContent",
|
|
@@ -376,10 +409,13 @@ function Content2(props) {
|
|
|
376
409
|
minHeight
|
|
377
410
|
}, style)
|
|
378
411
|
}, rest), {
|
|
379
|
-
children:
|
|
380
|
-
/* @__PURE__ */ (0,
|
|
381
|
-
|
|
382
|
-
|
|
412
|
+
children: [
|
|
413
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_themes17.Flex, { direction: "column", style: { position: "relative" }, children: [
|
|
414
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RadixDialog.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, { color: "gray", variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_icons2.Cross1Icon, { height: "18px", width: "18px" }) }) }),
|
|
415
|
+
children
|
|
416
|
+
] }),
|
|
417
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ToastContainer, {})
|
|
418
|
+
]
|
|
383
419
|
})
|
|
384
420
|
) }) });
|
|
385
421
|
}
|
|
@@ -389,7 +425,7 @@ function Close2(_a) {
|
|
|
389
425
|
} = _b, rest = __objRest(_b, [
|
|
390
426
|
"children"
|
|
391
427
|
]);
|
|
392
|
-
return /* @__PURE__ */ (0,
|
|
428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RadixDialog.Close, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
393
429
|
}
|
|
394
430
|
function Trigger2(_a) {
|
|
395
431
|
var _b = _a, {
|
|
@@ -397,7 +433,7 @@ function Trigger2(_a) {
|
|
|
397
433
|
} = _b, rest = __objRest(_b, [
|
|
398
434
|
"children"
|
|
399
435
|
]);
|
|
400
|
-
return /* @__PURE__ */ (0,
|
|
436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
401
437
|
}
|
|
402
438
|
var Dialog = {
|
|
403
439
|
Root: RadixDialog.Root,
|
|
@@ -409,17 +445,17 @@ var Dialog = {
|
|
|
409
445
|
};
|
|
410
446
|
|
|
411
447
|
// src/atoms/dropdown-menu.tsx
|
|
412
|
-
var
|
|
448
|
+
var import_themes18 = require("@radix-ui/themes");
|
|
413
449
|
var import_react8 = require("react");
|
|
414
|
-
var
|
|
450
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
415
451
|
var Content3 = (0, import_react8.forwardRef)((props, ref) => {
|
|
416
452
|
const _a = props, { isNavigation, className } = _a, rest = __objRest(_a, ["isNavigation", "className"]);
|
|
417
453
|
const contentClassName = (0, import_react8.useMemo)(() => {
|
|
418
454
|
const cls = isNavigation ? "dropdown-navigation" : "";
|
|
419
455
|
return [cls, className].join(" ");
|
|
420
456
|
}, [isNavigation, className]);
|
|
421
|
-
return /* @__PURE__ */ (0,
|
|
422
|
-
|
|
457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
458
|
+
import_themes18.DropdownMenu.Content,
|
|
423
459
|
__spreadProps(__spreadValues({
|
|
424
460
|
ref
|
|
425
461
|
}, rest), {
|
|
@@ -428,24 +464,24 @@ var Content3 = (0, import_react8.forwardRef)((props, ref) => {
|
|
|
428
464
|
);
|
|
429
465
|
});
|
|
430
466
|
Content3.displayName = "DropdownMenu.Content";
|
|
431
|
-
var DropdownMenu = __spreadProps(__spreadValues({},
|
|
467
|
+
var DropdownMenu = __spreadProps(__spreadValues({}, import_themes18.DropdownMenu), {
|
|
432
468
|
Content: Content3
|
|
433
469
|
});
|
|
434
470
|
|
|
435
471
|
// src/atoms/em.tsx
|
|
436
|
-
var
|
|
472
|
+
var import_themes19 = require("@radix-ui/themes");
|
|
437
473
|
|
|
438
474
|
// src/atoms/flex.tsx
|
|
439
|
-
var
|
|
475
|
+
var import_themes20 = require("@radix-ui/themes");
|
|
440
476
|
|
|
441
477
|
// src/atoms/grid.tsx
|
|
442
|
-
var
|
|
478
|
+
var import_themes21 = require("@radix-ui/themes");
|
|
443
479
|
|
|
444
480
|
// src/atoms/heading.tsx
|
|
445
|
-
var import_themes21 = require("@radix-ui/themes");
|
|
446
|
-
var import_react9 = require("react");
|
|
447
481
|
var import_themes22 = require("@radix-ui/themes");
|
|
448
|
-
var
|
|
482
|
+
var import_react9 = require("react");
|
|
483
|
+
var import_themes23 = require("@radix-ui/themes");
|
|
484
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
449
485
|
function Heading2(props) {
|
|
450
486
|
const _a = props, { size, children, variant } = _a, rest = __objRest(_a, ["size", "children", "variant"]);
|
|
451
487
|
const radixSize = (0, import_react9.useMemo)(() => {
|
|
@@ -464,13 +500,10 @@ function Heading2(props) {
|
|
|
464
500
|
return size;
|
|
465
501
|
}
|
|
466
502
|
}, [size, variant]);
|
|
467
|
-
return /* @__PURE__ */ (0,
|
|
503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_themes22.Heading, __spreadProps(__spreadValues({}, rest), { size: radixSize, children }));
|
|
468
504
|
}
|
|
469
505
|
|
|
470
506
|
// src/atoms/hover-card.tsx
|
|
471
|
-
var import_themes23 = require("@radix-ui/themes");
|
|
472
|
-
|
|
473
|
-
// src/atoms/icon-button.tsx
|
|
474
507
|
var import_themes24 = require("@radix-ui/themes");
|
|
475
508
|
|
|
476
509
|
// src/atoms/inset.tsx
|
|
@@ -483,7 +516,7 @@ var import_themes26 = require("@radix-ui/themes");
|
|
|
483
516
|
var import_themes27 = require("@radix-ui/themes");
|
|
484
517
|
var import_react10 = require("react");
|
|
485
518
|
var import_themes28 = require("@radix-ui/themes");
|
|
486
|
-
var
|
|
519
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
487
520
|
function Link(props) {
|
|
488
521
|
const _a = props, { size, children, variant } = _a, rest = __objRest(_a, ["size", "children", "variant"]);
|
|
489
522
|
const radixSize = (0, import_react10.useMemo)(() => {
|
|
@@ -498,7 +531,7 @@ function Link(props) {
|
|
|
498
531
|
return size;
|
|
499
532
|
}
|
|
500
533
|
}, [size, variant]);
|
|
501
|
-
return /* @__PURE__ */ (0,
|
|
534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_themes27.Link, __spreadProps(__spreadValues({}, rest), { size: radixSize, children }));
|
|
502
535
|
}
|
|
503
536
|
|
|
504
537
|
// src/atoms/popover.tsx
|
|
@@ -531,14 +564,14 @@ var import_themes37 = require("@radix-ui/themes");
|
|
|
531
564
|
// src/atoms/select.tsx
|
|
532
565
|
var import_themes38 = require("@radix-ui/themes");
|
|
533
566
|
var import_react11 = require("react");
|
|
534
|
-
var
|
|
567
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
535
568
|
var Content4 = (0, import_react11.forwardRef)((props, ref) => {
|
|
536
569
|
const _a = props, { className, isNavigation } = _a, rest = __objRest(_a, ["className", "isNavigation"]);
|
|
537
570
|
const cls = (0, import_react11.useMemo)(() => {
|
|
538
571
|
const etc = isNavigation ? "nav-select" : "";
|
|
539
572
|
return [etc, className].join(" ");
|
|
540
573
|
}, [className, isNavigation]);
|
|
541
|
-
return /* @__PURE__ */ (0,
|
|
574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
542
575
|
import_themes38.Select.Content,
|
|
543
576
|
__spreadProps(__spreadValues({
|
|
544
577
|
position: "popper"
|
|
@@ -577,7 +610,7 @@ var import_themes45 = require("@radix-ui/themes");
|
|
|
577
610
|
// src/atoms/typo.tsx
|
|
578
611
|
var import_themes46 = require("@radix-ui/themes");
|
|
579
612
|
var import_react12 = require("react");
|
|
580
|
-
var
|
|
613
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
581
614
|
var Typo = (0, import_react12.forwardRef)(
|
|
582
615
|
(props, ref) => {
|
|
583
616
|
const _a = props, { size, variant, children } = _a, rest = __objRest(_a, ["size", "variant", "children"]);
|
|
@@ -594,7 +627,7 @@ var Typo = (0, import_react12.forwardRef)(
|
|
|
594
627
|
return "2";
|
|
595
628
|
}
|
|
596
629
|
}, [size, variant]);
|
|
597
|
-
return /* @__PURE__ */ (0,
|
|
630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_themes46.Text, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize, children }));
|
|
598
631
|
}
|
|
599
632
|
);
|
|
600
633
|
Typo.displayName = "Typo";
|
|
@@ -607,7 +640,7 @@ var import_themes48 = require("@radix-ui/themes");
|
|
|
607
640
|
|
|
608
641
|
// src/atoms/collapse.tsx
|
|
609
642
|
var import_react13 = require("react");
|
|
610
|
-
var
|
|
643
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
611
644
|
function Collapse(props) {
|
|
612
645
|
const { children, closedHeight = "0" } = props;
|
|
613
646
|
const [open, setOpen] = (0, import_react13.useState)(() => {
|
|
@@ -624,7 +657,7 @@ function Collapse(props) {
|
|
|
624
657
|
return;
|
|
625
658
|
ref.current.style.maxHeight = open ? `${ref.current.scrollHeight}px` : closedHeight;
|
|
626
659
|
}, [closedHeight, open]);
|
|
627
|
-
return /* @__PURE__ */ (0,
|
|
660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "collapse", ref, children });
|
|
628
661
|
}
|
|
629
662
|
|
|
630
663
|
// src/atoms/spinner.tsx
|
|
@@ -634,10 +667,10 @@ var import_themes49 = require("@radix-ui/themes");
|
|
|
634
667
|
var import_react14 = require("react");
|
|
635
668
|
|
|
636
669
|
// src/icon.ts
|
|
637
|
-
var
|
|
670
|
+
var import_react_icons3 = require("@radix-ui/react-icons");
|
|
638
671
|
|
|
639
672
|
// src/atoms/pagination.tsx
|
|
640
|
-
var
|
|
673
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
641
674
|
function Pagination(props) {
|
|
642
675
|
const { onChange, count = 0, siblingCount = 2 } = props;
|
|
643
676
|
const [page, setPage] = (0, import_react14.useState)(() => props.page || props.defaultPage || 1);
|
|
@@ -703,19 +736,19 @@ function Pagination(props) {
|
|
|
703
736
|
};
|
|
704
737
|
if (!page)
|
|
705
738
|
return null;
|
|
706
|
-
return /* @__PURE__ */ (0,
|
|
707
|
-
/* @__PURE__ */ (0,
|
|
708
|
-
|
|
739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_themes20.Flex, { align: "center", className: "tipp-pagination", gap: "4", children: [
|
|
740
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
741
|
+
import_themes16.IconButton,
|
|
709
742
|
__spreadProps(__spreadValues({
|
|
710
743
|
disabled: !doublePrev,
|
|
711
744
|
onClick: onClickDoublePrev
|
|
712
745
|
}, moveButtonProps), {
|
|
713
|
-
children: /* @__PURE__ */ (0,
|
|
746
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_icons3.DoubleArrowLeftIcon, __spreadValues({}, iconSize))
|
|
714
747
|
})
|
|
715
748
|
),
|
|
716
|
-
/* @__PURE__ */ (0,
|
|
717
|
-
/* @__PURE__ */ (0,
|
|
718
|
-
return /* @__PURE__ */ (0,
|
|
749
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_themes16.IconButton, __spreadProps(__spreadValues({ disabled: !prev, onClick: onClickPrev }, moveButtonProps), { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_icons3.ChevronLeftIcon, __spreadValues({}, iconSize)) })),
|
|
750
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_themes20.Flex, { gap: "1", children: visibleItems.map((item) => {
|
|
751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
719
752
|
"button",
|
|
720
753
|
{
|
|
721
754
|
className: `page-button ${item === page ? "active" : ""}`,
|
|
@@ -723,39 +756,39 @@ function Pagination(props) {
|
|
|
723
756
|
setPage(item);
|
|
724
757
|
},
|
|
725
758
|
type: "button",
|
|
726
|
-
children: /* @__PURE__ */ (0,
|
|
759
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Typo, { variant: "body", children: item })
|
|
727
760
|
},
|
|
728
761
|
item
|
|
729
762
|
);
|
|
730
763
|
}) }),
|
|
731
|
-
/* @__PURE__ */ (0,
|
|
732
|
-
/* @__PURE__ */ (0,
|
|
733
|
-
|
|
764
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_themes16.IconButton, __spreadProps(__spreadValues({ disabled: !next, onClick: onClickNext }, moveButtonProps), { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_icons3.ChevronRightIcon, __spreadValues({}, iconSize)) })),
|
|
765
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
766
|
+
import_themes16.IconButton,
|
|
734
767
|
__spreadProps(__spreadValues({
|
|
735
768
|
disabled: !doubleNext,
|
|
736
769
|
onClick: onClickDoubleNext
|
|
737
770
|
}, moveButtonProps), {
|
|
738
|
-
children: /* @__PURE__ */ (0,
|
|
771
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_icons3.DoubleArrowRightIcon, __spreadValues({}, iconSize))
|
|
739
772
|
})
|
|
740
773
|
)
|
|
741
774
|
] });
|
|
742
775
|
}
|
|
743
776
|
|
|
744
777
|
// src/atoms/field-error-wrapper.tsx
|
|
745
|
-
var
|
|
778
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
746
779
|
function FieldErrorWrapper({
|
|
747
780
|
children,
|
|
748
781
|
error
|
|
749
782
|
}) {
|
|
750
|
-
return /* @__PURE__ */ (0,
|
|
783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_themes20.Flex, { direction: "column", gap: "1", children: [
|
|
751
784
|
children,
|
|
752
|
-
error ? /* @__PURE__ */ (0,
|
|
785
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typo, { color: "red", variant: "caption", children: error }) : null
|
|
753
786
|
] });
|
|
754
787
|
}
|
|
755
788
|
|
|
756
789
|
// src/atoms/ellipsis-tooltip.tsx
|
|
757
790
|
var import_react15 = require("react");
|
|
758
|
-
var
|
|
791
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
759
792
|
function EllipsisTooltip(props) {
|
|
760
793
|
const _a = props, { children, style, lineClamp = 2 } = _a, rest = __objRest(_a, ["children", "style", "lineClamp"]);
|
|
761
794
|
const ref = (0, import_react15.useRef)(null);
|
|
@@ -777,7 +810,7 @@ function EllipsisTooltip(props) {
|
|
|
777
810
|
ref.current.addEventListener("mouseleave", mouseOut);
|
|
778
811
|
}
|
|
779
812
|
}, [children]);
|
|
780
|
-
return /* @__PURE__ */ (0,
|
|
813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_themes48.Tooltip, { content: children, style: { display: tooltipDisplay }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
781
814
|
Typo,
|
|
782
815
|
__spreadProps(__spreadValues({}, rest), {
|
|
783
816
|
ref,
|
|
@@ -801,35 +834,9 @@ var Dialog2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
|
801
834
|
|
|
802
835
|
// src/theme/theme-provider.tsx
|
|
803
836
|
var import_themes50 = require("@radix-ui/themes");
|
|
804
|
-
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
805
|
-
function ThemeProvider(props) {
|
|
806
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_themes50.Theme, __spreadValues({ accentColor: "iris", radius: "medium" }, props));
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
// src/atoms/toast.tsx
|
|
810
|
-
var import_react_icons3 = require("@radix-ui/react-icons");
|
|
811
|
-
var import_react_toastify = require("react-toastify");
|
|
812
|
-
var import_react_toastify2 = require("react-toastify");
|
|
813
837
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
814
|
-
function
|
|
815
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
816
|
-
}
|
|
817
|
-
function ToastContainer(props) {
|
|
818
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
819
|
-
import_react_toastify.ToastContainer,
|
|
820
|
-
__spreadValues({
|
|
821
|
-
autoClose: 5e3,
|
|
822
|
-
closeButton: CloseButton,
|
|
823
|
-
closeOnClick: true,
|
|
824
|
-
draggable: true,
|
|
825
|
-
hideProgressBar: true,
|
|
826
|
-
newestOnTop: true,
|
|
827
|
-
pauseOnFocusLoss: true,
|
|
828
|
-
pauseOnHover: true,
|
|
829
|
-
position: "bottom-right",
|
|
830
|
-
rtl: false
|
|
831
|
-
}, props)
|
|
832
|
-
);
|
|
838
|
+
function ThemeProvider(props) {
|
|
839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes50.Theme, __spreadValues({ accentColor: "iris", radius: "medium" }, props));
|
|
833
840
|
}
|
|
834
841
|
|
|
835
842
|
// src/atoms/drawer.tsx
|