@tipp/ui 2.3.4 → 2.3.5
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/app/index.cjs.map +1 -1
- package/dist/app/index.js +38 -38
- package/dist/app/platform/coach-question-list.cjs.map +1 -1
- package/dist/app/platform/coach-question-list.js +2 -2
- package/dist/app/platform/contents-card.cjs.map +1 -1
- package/dist/app/platform/contents-card.js +2 -2
- package/dist/app/platform/curriculum-card.js +2 -2
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +28 -28
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +27 -27
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +27 -27
- package/dist/app/platform/goal-manage-card-read.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-read.js +3 -3
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +27 -27
- package/dist/app/platform/report-card.cjs.map +1 -1
- package/dist/app/platform/report-card.js +2 -2
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +27 -27
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +29 -29
- package/dist/app/platform/session-review-simple-read.cjs.map +1 -1
- package/dist/app/platform/session-review-simple-read.js +2 -2
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +8 -8
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +3 -3
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +3 -3
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +2 -2
- package/dist/app/platform/userInfos/session-user-info-detail.cjs.map +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.js +3 -3
- package/dist/app/platform/userInfos/utils.cjs.map +1 -1
- package/dist/app/platform/userInfos/utils.js +2 -2
- package/dist/atoms/drawer.cjs +8 -14
- package/dist/atoms/drawer.cjs.map +1 -1
- package/dist/atoms/drawer.js +1 -2
- package/dist/atoms/index.cjs +3 -6
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +4 -4
- package/dist/chunk-2QHFHCXL.js +64 -0
- package/dist/chunk-2QHFHCXL.js.map +1 -0
- package/dist/chunk-3GLSHF4F.js +99 -0
- package/dist/chunk-3GLSHF4F.js.map +1 -0
- package/dist/chunk-44VLRAHW.js +74 -0
- package/dist/chunk-44VLRAHW.js.map +1 -0
- package/dist/chunk-5RDI5OIK.js +89 -0
- package/dist/chunk-5RDI5OIK.js.map +1 -0
- package/dist/chunk-5ZEQ33PC.js +57 -0
- package/dist/chunk-5ZEQ33PC.js.map +1 -0
- package/dist/chunk-7AHPQJD2.js +196 -0
- package/dist/chunk-7AHPQJD2.js.map +1 -0
- package/dist/chunk-7PTZCSIA.js +144 -0
- package/dist/chunk-7PTZCSIA.js.map +1 -0
- package/dist/chunk-7ZMY4CAZ.js +30 -0
- package/dist/chunk-7ZMY4CAZ.js.map +1 -0
- package/dist/chunk-AQVIQODP.js +69 -0
- package/dist/chunk-AQVIQODP.js.map +1 -0
- package/dist/chunk-CQSM6JCO.js +65 -0
- package/dist/chunk-CQSM6JCO.js.map +1 -0
- package/dist/chunk-EDDPJB52.js +61 -0
- package/dist/chunk-EDDPJB52.js.map +1 -0
- package/dist/chunk-FGNKLXJK.js +165 -0
- package/dist/chunk-FGNKLXJK.js.map +1 -0
- package/dist/chunk-G52YPZRU.js +95 -0
- package/dist/chunk-G52YPZRU.js.map +1 -0
- package/dist/chunk-JNYTH4BZ.js +151 -0
- package/dist/chunk-JNYTH4BZ.js.map +1 -0
- package/dist/chunk-K4JKFIA2.js +196 -0
- package/dist/chunk-K4JKFIA2.js.map +1 -0
- package/dist/chunk-LKEYLW4N.js +174 -0
- package/dist/chunk-LKEYLW4N.js.map +1 -0
- package/dist/chunk-NJ56ZKR4.js +63 -0
- package/dist/chunk-NJ56ZKR4.js.map +1 -0
- package/dist/chunk-OQPXX6GH.js +89 -0
- package/dist/chunk-OQPXX6GH.js.map +1 -0
- package/dist/chunk-OW53EUJW.js +95 -0
- package/dist/chunk-OW53EUJW.js.map +1 -0
- package/dist/chunk-QFEZIPWJ.js +64 -0
- package/dist/chunk-QFEZIPWJ.js.map +1 -0
- package/dist/chunk-S2M6OJER.js +95 -0
- package/dist/chunk-S2M6OJER.js.map +1 -0
- package/dist/chunk-SZA3RAKD.js +51 -0
- package/dist/chunk-SZA3RAKD.js.map +1 -0
- package/dist/chunk-WS7IOHVK.js +51 -0
- package/dist/chunk-WS7IOHVK.js.map +1 -0
- package/dist/chunk-ZADYUJIV.js +64 -0
- package/dist/chunk-ZADYUJIV.js.map +1 -0
- package/dist/index.cjs +3 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +55 -55
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +7 -7
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +9 -9
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +10 -10
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +13 -13
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-sidebar-item-wrapper.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +4 -4
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +2 -2
- package/dist/molecules/curriculumV2/index.js +22 -22
- package/dist/molecules/index.js +38 -38
- package/package.json +1 -1
- package/src/atoms/drawer.tsx +17 -18
|
@@ -22,6 +22,7 @@ import "../../../chunk-MUPK4L3U.js";
|
|
|
22
22
|
import "../../../chunk-MUNMDHRF.js";
|
|
23
23
|
import "../../../chunk-TVDKGMBI.js";
|
|
24
24
|
import "../../../chunk-X2GMDZ7M.js";
|
|
25
|
+
import "../../../chunk-HYITAA4J.js";
|
|
25
26
|
import "../../../chunk-XQOL7UBI.js";
|
|
26
27
|
import "../../../chunk-TULWX7D6.js";
|
|
27
28
|
import "../../../chunk-DHZVOXFM.js";
|
|
@@ -39,9 +40,8 @@ import "../../../chunk-NFDQJVFA.js";
|
|
|
39
40
|
import "../../../chunk-Q37G2GS6.js";
|
|
40
41
|
import "../../../chunk-VTJZMOSP.js";
|
|
41
42
|
import "../../../chunk-JQ7VQ5SB.js";
|
|
42
|
-
import "../../../chunk-
|
|
43
|
+
import "../../../chunk-G52YPZRU.js";
|
|
43
44
|
import "../../../chunk-645GPOW2.js";
|
|
44
|
-
import "../../../chunk-HYITAA4J.js";
|
|
45
45
|
import "../../../chunk-U7N2PWMO.js";
|
|
46
46
|
import "../../../chunk-XK6VEVOK.js";
|
|
47
47
|
import "../../../chunk-HF6GNDPV.js";
|
package/dist/atoms/drawer.cjs
CHANGED
|
@@ -66,7 +66,7 @@ __export(drawer_exports, {
|
|
|
66
66
|
});
|
|
67
67
|
module.exports = __toCommonJS(drawer_exports);
|
|
68
68
|
var Dialog = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
69
|
-
var
|
|
69
|
+
var import_themes3 = require("@radix-ui/themes");
|
|
70
70
|
|
|
71
71
|
// src/theme/portal-provider.tsx
|
|
72
72
|
var import_react = require("react");
|
|
@@ -128,13 +128,10 @@ ClosePanelArrowIcon.displayName = "ArrowDownIcon";
|
|
|
128
128
|
// src/atoms/flex.tsx
|
|
129
129
|
var import_themes = require("@radix-ui/themes");
|
|
130
130
|
|
|
131
|
-
// src/atoms/separator.tsx
|
|
132
|
-
var import_themes2 = require("@radix-ui/themes");
|
|
133
|
-
|
|
134
131
|
// src/atoms/icon-button.tsx
|
|
135
132
|
var import_react2 = require("react");
|
|
136
133
|
var import_clsx = require("clsx");
|
|
137
|
-
var
|
|
134
|
+
var import_themes2 = require("@radix-ui/themes");
|
|
138
135
|
|
|
139
136
|
// src/utils/convert-icon-button-size.ts
|
|
140
137
|
var convertSizeStr = (size) => {
|
|
@@ -183,7 +180,7 @@ var IconButton = (0, import_react2.forwardRef)(
|
|
|
183
180
|
return (0, import_clsx.clsx)(props.className, { transparent: variant === "transparent" });
|
|
184
181
|
}, [props.className, variant]);
|
|
185
182
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
186
|
-
|
|
183
|
+
import_themes2.IconButton,
|
|
187
184
|
__spreadProps(__spreadValues({
|
|
188
185
|
style,
|
|
189
186
|
type: "button",
|
|
@@ -224,7 +221,7 @@ function Content2(props) {
|
|
|
224
221
|
const desktopHeaderSize = 64;
|
|
225
222
|
const separatorSize = 1;
|
|
226
223
|
const { drawerContainerRef } = usePortalContainer();
|
|
227
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Dialog.Portal, { container: drawerContainerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Dialog.Portal, { container: drawerContainerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_themes3.Theme, { children: [
|
|
228
225
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Dialog.Overlay, { className: "DrawerOverlay" }),
|
|
229
226
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
230
227
|
Dialog.Content,
|
|
@@ -233,7 +230,7 @@ function Content2(props) {
|
|
|
233
230
|
onPointerDownOutside: preventDefault
|
|
234
231
|
}, rest), {
|
|
235
232
|
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
236
|
-
|
|
233
|
+
import_themes3.Grid,
|
|
237
234
|
{
|
|
238
235
|
height: "100%",
|
|
239
236
|
overflow: "hidden",
|
|
@@ -242,12 +239,9 @@ function Content2(props) {
|
|
|
242
239
|
sm: `${desktopHeaderSize}px ${separatorSize}px calc(100% - ${desktopHeaderSize + separatorSize}px)`
|
|
243
240
|
},
|
|
244
241
|
children: [
|
|
245
|
-
!hideHeader && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
246
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.
|
|
247
|
-
|
|
248
|
-
HeaderContent
|
|
249
|
-
] }),
|
|
250
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_themes2.Separator, { orientation: "horizontal", size: "4" })
|
|
242
|
+
!hideHeader && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_themes.Flex, { align: "center", gap: "3", px: { initial: "4", md: "6" }, children: [
|
|
243
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconButton, { color: "gray", variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ClosePanelArrowIcon, {}) }) }),
|
|
244
|
+
HeaderContent
|
|
251
245
|
] }),
|
|
252
246
|
children
|
|
253
247
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/atoms/drawer.tsx","../../src/theme/portal-provider.tsx","../../src/icons/close-panel-arrow.tsx","../../src/atoms/flex.tsx","../../src/atoms/separator.tsx","../../src/atoms/icon-button.tsx","../../src/utils/convert-icon-button-size.ts"],"sourcesContent":["import React from 'react';\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { Grid, Theme } from '@radix-ui/themes';\nimport { usePortalContainer } from '@/theme/portal-provider';\nimport { ClosePanelArrowIcon } from '../icons/close-panel-arrow';\nimport { Flex } from './flex';\nimport { Separator } from './separator';\nimport { IconButton } from './icon-button';\nimport { ToastContainer } from 'react-toastify';\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 HeaderContent?: React.ReactNode;\n hideHeader?: boolean;\n};\n\nconst preventDefault: Dialog.DialogContentProps['onPointerDownOutside'] = (\n e\n) => {\n e.preventDefault();\n};\n\nexport function Content(props: ContentProps): React.ReactNode {\n const {\n position = 'right',\n className,\n children,\n HeaderContent,\n hideHeader,\n ...rest\n } = props;\n\n const mobileHeaderSize = 48;\n const desktopHeaderSize = 64;\n const separatorSize = 1;\n const { drawerContainerRef } = usePortalContainer();\n\n return (\n <Dialog.Portal container={drawerContainerRef.current}>\n <Theme>\n <Dialog.Overlay className=\"DrawerOverlay\" />\n <Dialog.Content\n className={`DrawerContent ${position} ${className || ''}`}\n onPointerDownOutside={preventDefault}\n {...rest}\n >\n <Grid\n height=\"100%\"\n overflow=\"hidden\"\n rows={hideHeader ? \"1\" :{\n initial: `${mobileHeaderSize}px ${separatorSize}px calc(100% - ${mobileHeaderSize + separatorSize}px)`,\n sm: `${desktopHeaderSize}px ${separatorSize}px calc(100% - ${desktopHeaderSize + separatorSize}px)`,\n }}\n >\n {!hideHeader && (\n <>\n <Flex align=\"center\" gap=\"3\" px={{ initial: '4', md: '6' }}>\n <Dialog.Close asChild>\n <IconButton color=\"gray\" variant=\"outline\">\n <ClosePanelArrowIcon />\n </IconButton>\n </Dialog.Close>\n {HeaderContent}\n </Flex>\n <Separator orientation=\"horizontal\" size=\"4\" />\n </>\n )}\n {children}\n </Grid>\n </Dialog.Content> \n </Theme>\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","import React, { createContext, useContext, useRef } from 'react';\n\ninterface PortalProviderProps {\n children: React.ReactNode;\n}\n\ninterface PortalState {\n dialogContainerRef: React.RefObject<HTMLDivElement | null>;\n drawerContainerRef: React.RefObject<HTMLDivElement | null>;\n}\n\nconst PortalContext = createContext<PortalState>(\n null as unknown as PortalState\n);\n\nexport function PortalProvider({\n children,\n}: PortalProviderProps): React.ReactNode {\n const dialogContainerRef = useRef<HTMLDivElement | null>(null);\n const drawerContainerRef = useRef<HTMLDivElement | null>(null);\n\n return (\n <PortalContext.Provider value={{ dialogContainerRef, drawerContainerRef }}>\n {children}\n <div className=\"drawer-portal-container\" ref={drawerContainerRef} />\n <div className=\"dialog-portal-container\" ref={dialogContainerRef} />\n </PortalContext.Provider>\n );\n}\n\nexport const usePortalContainer = (): PortalState => {\n try {\n const state = useContext(PortalContext);\n return state;\n } catch (error) {\n throw new Error('PortalProvider not found');\n }\n};\n\nexport default PortalProvider;\n","import * as React from 'react';\nimport type { IconProps } from './types';\n\nexport const ClosePanelArrowIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ color = 'currentColor', ...props }, forwardedRef) => {\n return (\n <svg\n fill=\"none\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <path\n clipRule=\"evenodd\"\n d=\"M3.19315 2.16529C3.43937 1.93445 3.82611 1.94693 4.05695 2.19315L9.87499 7.15624C9.87499 7.15624 10.4479 7.72916 9.87499 8.30207L4.05695 12.8068C3.82611 13.0531 3.43937 13.0656 3.19315 12.8347C2.94693 12.6038 2.93445 12.2171 3.16529 11.9709L8.72916 7.72916L3.16529 3.02908C2.93445 2.78285 2.94693 2.39612 3.19315 2.16529Z\"\n fill={color}\n fillRule=\"evenodd\"\n />\n <path\n clipRule=\"evenodd\"\n d=\"M12.1733 2.58667C12.1733 2.26266 11.9107 2 11.5867 2C11.2627 2 11 2.26266 11 2.58667V12.7201C11 13.044 11.2627 13.3067 11.5867 13.3067C11.9107 13.3067 12.1733 13.044 12.1733 12.7201V2.58667Z\"\n fill={color}\n fillRule=\"evenodd\"\n />\n </svg>\n );\n }\n);\n\nClosePanelArrowIcon.displayName = 'ArrowDownIcon';\n","export { Flex, type FlexProps } from '@radix-ui/themes';\n","export { Separator, type SeparatorProps } from '@radix-ui/themes';\n","import React, { forwardRef, useMemo } from 'react';\nimport { clsx } from 'clsx';\nimport { IconButton as RadixIconButton } from '@radix-ui/themes';\nimport { convertSize } from '../utils/convert-icon-button-size';\nimport type { ButtonProps } from './button.type';\n\nexport type IconButtonProps = ButtonProps;\nexport const IconButton = forwardRef<HTMLButtonElement, ButtonProps>(\n (props, ref): React.ReactNode => {\n const { size, style, variant, ...restProps } = props;\n\n const radixSize = useMemo(() => {\n return convertSize(size);\n }, [size]);\n\n const radixVariant = useMemo(() => {\n if (variant === 'transparent') return 'ghost';\n return variant;\n }, [variant]);\n\n const className = useMemo(() => {\n return clsx(props.className, { transparent: variant === 'transparent' });\n }, [props.className, variant]);\n\n return (\n <RadixIconButton\n style={style}\n type=\"button\"\n variant={radixVariant}\n {...restProps}\n className={className}\n ref={ref}\n size={radixSize}\n />\n );\n }\n);\n\nIconButton.displayName = 'IconButton';\n","import { type ButtonProps as RadixButtonProps } from '@radix-ui/themes';\nimport type { Breakpoint } from '@radix-ui/themes/props';\nimport type { ButtonProps } from '../atoms/button.type';\n\nexport const convertSizeStr = (\n size: ButtonProps['size']\n): '1' | '2' | '3' | '4' => {\n switch (size) {\n case 'small':\n return '1';\n case 'medium':\n return '2';\n case 'large':\n return '4';\n default:\n return '2';\n }\n};\n\nexport const convertSizeResponse = (\n size: ButtonProps['size']\n): RadixButtonProps['size'] => {\n if (typeof size === 'string' || typeof size === 'undefined') {\n return convertSizeStr(size);\n }\n const radixSize: RadixButtonProps['size'] = {};\n let key: Breakpoint = 'initial';\n for (key in size) {\n radixSize[key] = convertSizeStr(size[key]);\n }\n return radixSize;\n};\n\nexport const convertSize = (\n size: ButtonProps['size']\n): RadixButtonProps['size'] => {\n if (typeof size === 'string') {\n return convertSizeStr(size);\n }\n return convertSizeResponse(size);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iBAAAA;AAAA,EAAA;AAAA,cAAAC;AAAA,EAAA,eAAAC;AAAA;AAAA;AACA,aAAwB;AACxB,IAAAC,iBAA4B;;;ACF5B,mBAAyD;AAsBrD;AAXJ,IAAM,oBAAgB;AAAA,EACpB;AACF;AAiBO,IAAM,qBAAqB,MAAmB;AACnD,MAAI;AACF,UAAM,YAAQ,yBAAW,aAAa;AACtC,WAAO;AAAA,EACT,SAAS,OAAO;AACd,UAAM,IAAI,MAAM,0BAA0B;AAAA,EAC5C;AACF;;;ACrCA,IAAAC,SAAuB;AAMjB,IAAAC,sBAAA;AAHC,IAAM,sBAA4B;AAAA,EACvC,CAAC,IAAsC,iBAAiB;AAAvD,iBAAE,UAAQ,eAJb,IAIG,IAA6B,kBAA7B,IAA6B,CAA3B;AACD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,QAAO;AAAA,QACP,SAAQ;AAAA,QACR,OAAM;AAAA,QACN,OAAM;AAAA,SACF,QANL;AAAA,QAOC,KAAK;AAAA,QAEL;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,UAAS;AAAA,cACT,GAAE;AAAA,cACF,MAAM;AAAA,cACN,UAAS;AAAA;AAAA,UACX;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,UAAS;AAAA,cACT,GAAE;AAAA,cACF,MAAM;AAAA,cACN,UAAS;AAAA;AAAA,UAC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I,EAAE,SAAS,KAAK,IAAI,IAAI,GACvD;AAAA,+DAAQ,cAAP,EAAa,SAAO,MACnB,uDAAC,cAAW,OAAM,QAAO,SAAQ,WAC/B,uDAAC,uBAAoB,GACvB,GACF;AAAA,kBACC;AAAA,mBACH;AAAA,gBACA,6CAAC,4BAAU,aAAY,cAAa,MAAK,KAAI;AAAA,iBAC/C;AAAA,cAED;AAAA;AAAA;AAAA,QACH;AAAA;AAAA,IACF;AAAA,KACF,GACF;AAEJ;AAEO,SAASC,SAAQ,OAAmD;AACzE,SAAO,6CAAQ,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","import_themes","React","import_jsx_runtime","import_themes","import_react","import_themes","import_jsx_runtime","RadixIconButton","import_jsx_runtime","Root","Content","Trigger"]}
|
|
1
|
+
{"version":3,"sources":["../../src/atoms/drawer.tsx","../../src/theme/portal-provider.tsx","../../src/icons/close-panel-arrow.tsx","../../src/atoms/flex.tsx","../../src/atoms/icon-button.tsx","../../src/utils/convert-icon-button-size.ts"],"sourcesContent":["import React from 'react';\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { Grid, Theme } from '@radix-ui/themes';\nimport { usePortalContainer } from '@/theme/portal-provider';\nimport { ClosePanelArrowIcon } from '../icons/close-panel-arrow';\nimport { Flex } from './flex';\nimport { IconButton } from './icon-button';\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 HeaderContent?: React.ReactNode;\n hideHeader?: boolean;\n};\n\nconst preventDefault: Dialog.DialogContentProps['onPointerDownOutside'] = (\n e\n) => {\n e.preventDefault();\n};\n\nexport function Content(props: ContentProps): React.ReactNode {\n const {\n position = 'right',\n className,\n children,\n HeaderContent,\n hideHeader,\n ...rest\n } = props;\n\n const mobileHeaderSize = 48;\n const desktopHeaderSize = 64;\n const separatorSize = 1;\n const { drawerContainerRef } = usePortalContainer();\n\n return (\n <Dialog.Portal container={drawerContainerRef.current}>\n <Theme>\n <Dialog.Overlay className=\"DrawerOverlay\" />\n <Dialog.Content\n className={`DrawerContent ${position} ${className || ''}`}\n onPointerDownOutside={preventDefault}\n {...rest}\n >\n <Grid\n height=\"100%\"\n overflow=\"hidden\"\n rows={\n hideHeader\n ? '1'\n : {\n initial: `${mobileHeaderSize}px ${separatorSize}px calc(100% - ${mobileHeaderSize + separatorSize}px)`,\n sm: `${desktopHeaderSize}px ${separatorSize}px calc(100% - ${desktopHeaderSize + separatorSize}px)`,\n }\n }\n >\n {!hideHeader && (\n <Flex align=\"center\" gap=\"3\" px={{ initial: '4', md: '6' }}>\n <Dialog.Close asChild>\n <IconButton color=\"gray\" variant=\"outline\">\n <ClosePanelArrowIcon />\n </IconButton>\n </Dialog.Close>\n {HeaderContent}\n </Flex>\n )}\n {children}\n </Grid>\n </Dialog.Content>\n </Theme>\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","import React, { createContext, useContext, useRef } from 'react';\n\ninterface PortalProviderProps {\n children: React.ReactNode;\n}\n\ninterface PortalState {\n dialogContainerRef: React.RefObject<HTMLDivElement | null>;\n drawerContainerRef: React.RefObject<HTMLDivElement | null>;\n}\n\nconst PortalContext = createContext<PortalState>(\n null as unknown as PortalState\n);\n\nexport function PortalProvider({\n children,\n}: PortalProviderProps): React.ReactNode {\n const dialogContainerRef = useRef<HTMLDivElement | null>(null);\n const drawerContainerRef = useRef<HTMLDivElement | null>(null);\n\n return (\n <PortalContext.Provider value={{ dialogContainerRef, drawerContainerRef }}>\n {children}\n <div className=\"drawer-portal-container\" ref={drawerContainerRef} />\n <div className=\"dialog-portal-container\" ref={dialogContainerRef} />\n </PortalContext.Provider>\n );\n}\n\nexport const usePortalContainer = (): PortalState => {\n try {\n const state = useContext(PortalContext);\n return state;\n } catch (error) {\n throw new Error('PortalProvider not found');\n }\n};\n\nexport default PortalProvider;\n","import * as React from 'react';\nimport type { IconProps } from './types';\n\nexport const ClosePanelArrowIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ color = 'currentColor', ...props }, forwardedRef) => {\n return (\n <svg\n fill=\"none\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <path\n clipRule=\"evenodd\"\n d=\"M3.19315 2.16529C3.43937 1.93445 3.82611 1.94693 4.05695 2.19315L9.87499 7.15624C9.87499 7.15624 10.4479 7.72916 9.87499 8.30207L4.05695 12.8068C3.82611 13.0531 3.43937 13.0656 3.19315 12.8347C2.94693 12.6038 2.93445 12.2171 3.16529 11.9709L8.72916 7.72916L3.16529 3.02908C2.93445 2.78285 2.94693 2.39612 3.19315 2.16529Z\"\n fill={color}\n fillRule=\"evenodd\"\n />\n <path\n clipRule=\"evenodd\"\n d=\"M12.1733 2.58667C12.1733 2.26266 11.9107 2 11.5867 2C11.2627 2 11 2.26266 11 2.58667V12.7201C11 13.044 11.2627 13.3067 11.5867 13.3067C11.9107 13.3067 12.1733 13.044 12.1733 12.7201V2.58667Z\"\n fill={color}\n fillRule=\"evenodd\"\n />\n </svg>\n );\n }\n);\n\nClosePanelArrowIcon.displayName = 'ArrowDownIcon';\n","export { Flex, type FlexProps } from '@radix-ui/themes';\n","import React, { forwardRef, useMemo } from 'react';\nimport { clsx } from 'clsx';\nimport { IconButton as RadixIconButton } from '@radix-ui/themes';\nimport { convertSize } from '../utils/convert-icon-button-size';\nimport type { ButtonProps } from './button.type';\n\nexport type IconButtonProps = ButtonProps;\nexport const IconButton = forwardRef<HTMLButtonElement, ButtonProps>(\n (props, ref): React.ReactNode => {\n const { size, style, variant, ...restProps } = props;\n\n const radixSize = useMemo(() => {\n return convertSize(size);\n }, [size]);\n\n const radixVariant = useMemo(() => {\n if (variant === 'transparent') return 'ghost';\n return variant;\n }, [variant]);\n\n const className = useMemo(() => {\n return clsx(props.className, { transparent: variant === 'transparent' });\n }, [props.className, variant]);\n\n return (\n <RadixIconButton\n style={style}\n type=\"button\"\n variant={radixVariant}\n {...restProps}\n className={className}\n ref={ref}\n size={radixSize}\n />\n );\n }\n);\n\nIconButton.displayName = 'IconButton';\n","import { type ButtonProps as RadixButtonProps } from '@radix-ui/themes';\nimport type { Breakpoint } from '@radix-ui/themes/props';\nimport type { ButtonProps } from '../atoms/button.type';\n\nexport const convertSizeStr = (\n size: ButtonProps['size']\n): '1' | '2' | '3' | '4' => {\n switch (size) {\n case 'small':\n return '1';\n case 'medium':\n return '2';\n case 'large':\n return '4';\n default:\n return '2';\n }\n};\n\nexport const convertSizeResponse = (\n size: ButtonProps['size']\n): RadixButtonProps['size'] => {\n if (typeof size === 'string' || typeof size === 'undefined') {\n return convertSizeStr(size);\n }\n const radixSize: RadixButtonProps['size'] = {};\n let key: Breakpoint = 'initial';\n for (key in size) {\n radixSize[key] = convertSizeStr(size[key]);\n }\n return radixSize;\n};\n\nexport const convertSize = (\n size: ButtonProps['size']\n): RadixButtonProps['size'] => {\n if (typeof size === 'string') {\n return convertSizeStr(size);\n }\n return convertSizeResponse(size);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iBAAAA;AAAA,EAAA;AAAA,cAAAC;AAAA,EAAA,eAAAC;AAAA;AAAA;AACA,aAAwB;AACxB,IAAAC,iBAA4B;;;ACF5B,mBAAyD;AAsBrD;A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AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAIF,QAAM,mBAAmB;AACzB,QAAM,oBAAoB;AAC1B,QAAM,gBAAgB;AACtB,QAAM,EAAE,mBAAmB,IAAI,mBAAmB;AAElD,SACE,6CAAQ,eAAP,EAAc,WAAW,mBAAmB,SAC3C,wDAAC,wBACC;AAAA,iDAAQ,gBAAP,EAAe,WAAU,iBAAgB;AAAA,IAC1C;AAAA,MAAQ;AAAA,MAAP;AAAA,QACC,WAAW,iBAAiB,QAAQ,IAAI,aAAa,EAAE;AAAA,QACvD,sBAAsB;AAAA,SAClB,OAHL;AAAA,QAKC;AAAA,UAAC;AAAA;AAAA,YACC,QAAO;AAAA,YACP,UAAS;AAAA,YACT,MACE,aACI,MACA;AAAA,cACE,SAAS,GAAG,gBAAgB,MAAM,aAAa,kBAAkB,mBAAmB,aAAa;AAAA,cACjG,IAAI,GAAG,iBAAiB,MAAM,aAAa,kBAAkB,oBAAoB,aAAa;AAAA,YAChG;AAAA,YAGL;AAAA,eAAC,cACA,8CAAC,sBAAK,OAAM,UAAS,KAAI,KAAI,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI,GACvD;AAAA,6DAAQ,cAAP,EAAa,SAAO,MACnB,uDAAC,cAAW,OAAM,QAAO,SAAQ,WAC/B,uDAAC,uBAAoB,GACvB,GACF;AAAA,gBACC;AAAA,iBACH;AAAA,cAED;AAAA;AAAA;AAAA,QACH;AAAA;AAAA,IACF;AAAA,KACF,GACF;AAEJ;AAEO,SAASC,SAAQ,OAAmD;AACzE,SAAO,6CAAQ,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","import_themes","React","import_jsx_runtime","import_react","import_themes","import_jsx_runtime","RadixIconButton","import_jsx_runtime","Root","Content","Trigger"]}
|
package/dist/atoms/drawer.js
CHANGED
|
@@ -3,9 +3,8 @@ import {
|
|
|
3
3
|
Drawer,
|
|
4
4
|
Root,
|
|
5
5
|
Trigger
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-G52YPZRU.js";
|
|
7
7
|
import "../chunk-645GPOW2.js";
|
|
8
|
-
import "../chunk-HYITAA4J.js";
|
|
9
8
|
import "../chunk-U7N2PWMO.js";
|
|
10
9
|
import "../chunk-XK6VEVOK.js";
|
|
11
10
|
import "../chunk-HF6GNDPV.js";
|
package/dist/atoms/index.cjs
CHANGED
|
@@ -1682,12 +1682,9 @@ function Content6(props) {
|
|
|
1682
1682
|
sm: `${desktopHeaderSize}px ${separatorSize}px calc(100% - ${desktopHeaderSize + separatorSize}px)`
|
|
1683
1683
|
},
|
|
1684
1684
|
children: [
|
|
1685
|
-
!hideHeader && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
1686
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.
|
|
1687
|
-
|
|
1688
|
-
HeaderContent
|
|
1689
|
-
] }),
|
|
1690
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_themes39.Separator, { orientation: "horizontal", size: "4" })
|
|
1685
|
+
!hideHeader && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_themes22.Flex, { align: "center", gap: "3", px: { initial: "4", md: "6" }, children: [
|
|
1686
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(IconButton, { color: "gray", variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ClosePanelArrowIcon, {}) }) }),
|
|
1687
|
+
HeaderContent
|
|
1691
1688
|
] }),
|
|
1692
1689
|
children
|
|
1693
1690
|
]
|