@tipp/ui 1.0.13 → 1.0.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/.DS_Store +0 -0
- package/dist/atoms/date-picker/index.cjs +102 -6
- package/dist/atoms/date-picker/index.cjs.map +1 -1
- package/dist/atoms/date-picker/index.d.cts +4 -2
- package/dist/atoms/date-picker/index.d.ts +4 -2
- package/dist/atoms/date-picker/index.js +5 -1
- package/dist/atoms/index.cjs +128 -52
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.d.cts +2 -0
- package/dist/atoms/index.d.ts +2 -0
- package/dist/atoms/index.js +11 -5
- package/dist/atoms/pagination.cjs.map +1 -1
- package/dist/atoms/pagination.js +2 -2
- package/dist/atoms/toast.cjs +67 -0
- package/dist/atoms/toast.cjs.map +1 -0
- package/dist/atoms/toast.d.cts +6 -0
- package/dist/atoms/toast.d.ts +6 -0
- package/dist/atoms/toast.js +10 -0
- package/dist/atoms/toast.js.map +1 -0
- package/dist/chunk-2ANGYYEV.js +1 -0
- package/dist/chunk-2ANGYYEV.js.map +1 -0
- package/dist/chunk-2IUGEOUJ.js +90 -0
- package/dist/chunk-2IUGEOUJ.js.map +1 -0
- package/dist/chunk-4ZFANZDW.js +35 -0
- package/dist/chunk-4ZFANZDW.js.map +1 -0
- package/dist/chunk-54NO6UR7.js +32 -0
- package/dist/chunk-54NO6UR7.js.map +1 -0
- package/dist/{chunk-IFRVKLSE.js → chunk-7BE66BFO.js} +2 -2
- package/dist/chunk-ABEJI3S7.js +36 -0
- package/dist/chunk-ABEJI3S7.js.map +1 -0
- package/dist/chunk-AMXLPHAY.js +47 -0
- package/dist/chunk-AMXLPHAY.js.map +1 -0
- package/dist/{chunk-6ZO2L5PO.js → chunk-ANLWB2QF.js} +9 -9
- package/dist/chunk-DJC4JM23.js +175 -0
- package/dist/chunk-DJC4JM23.js.map +1 -0
- package/dist/chunk-E73BVMP5.js +11 -0
- package/dist/chunk-E73BVMP5.js.map +1 -0
- package/dist/chunk-FXW6IDLO.js +67 -0
- package/dist/chunk-FXW6IDLO.js.map +1 -0
- package/dist/{chunk-EK4ZFDYD.js → chunk-HUBPQ7ZR.js} +9 -3
- package/dist/{chunk-M474I6JB.js.map → chunk-HUBPQ7ZR.js.map} +1 -1
- package/dist/{chunk-M474I6JB.js → chunk-IHQVLRFK.js} +5 -3
- package/dist/chunk-IHQVLRFK.js.map +1 -0
- package/dist/{chunk-LPUSIN3M.js → chunk-JGV5KQM5.js} +5 -5
- package/dist/chunk-JHBYBQ7L.js +95 -0
- package/dist/chunk-JHBYBQ7L.js.map +1 -0
- package/dist/chunk-LKRALOEW.js +45 -0
- package/dist/chunk-LKRALOEW.js.map +1 -0
- package/dist/{chunk-PCWFGDAX.js → chunk-M65KRCQ2.js} +5 -5
- package/dist/{chunk-MDPBP64D.js → chunk-NSZVLXRG.js} +6 -6
- package/dist/chunk-PF27W53W.js +104 -0
- package/dist/chunk-PQJ2I6L3.js +67 -0
- package/dist/chunk-PQJ2I6L3.js.map +1 -0
- package/dist/chunk-Q7IXT5CM.js +119 -0
- package/dist/chunk-Q7IXT5CM.js.map +1 -0
- package/dist/chunk-QEASTIX4.js +10 -0
- package/dist/chunk-QEASTIX4.js.map +1 -0
- package/dist/chunk-QIR4QA4A.js +70 -0
- package/dist/chunk-QIR4QA4A.js.map +1 -0
- package/dist/chunk-TW4EKVGY.js +90 -0
- package/dist/chunk-TW4EKVGY.js.map +1 -0
- package/dist/chunk-VY43KT3C.js +90 -0
- package/dist/chunk-VY43KT3C.js.map +1 -0
- package/dist/chunk-ZWTCGCM4.js +95 -0
- package/dist/chunk-ZWTCGCM4.js.map +1 -0
- package/dist/icon.cjs +4 -0
- package/dist/icon.cjs.map +1 -1
- package/dist/icon.d.cts +1 -1
- package/dist/icon.d.ts +1 -1
- package/dist/icon.js +5 -1
- package/dist/index.cjs +161 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +879 -9
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +16 -6
- package/dist/molecules/expand-table/index.cjs +124 -51
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.js +7 -6
- package/dist/molecules/expand-table/row.cjs +106 -33
- package/dist/molecules/expand-table/row.cjs.map +1 -1
- package/dist/molecules/expand-table/row.js +6 -5
- package/dist/molecules/index.cjs +131 -58
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +7 -6
- package/dist/molecules/navigation.cjs +107 -34
- package/dist/molecules/navigation.cjs.map +1 -1
- package/dist/molecules/navigation.js +5 -4
- package/package.json +5 -4
- package/src/atoms/date-picker/index.tsx +157 -5
- package/src/atoms/index.ts +2 -0
- package/src/atoms/toast.tsx +23 -0
- package/src/icon.ts +2 -0
- package/src/molecules/expand-table/row.tsx +1 -1
- package/dist/chunk-3ZUBNWIB.js +0 -43
- package/dist/chunk-3ZUBNWIB.js.map +0 -1
- package/dist/chunk-7FECZT7I.js +0 -45
- package/dist/chunk-7FECZT7I.js.map +0 -1
- package/dist/chunk-7WNX674B.js +0 -42
- package/dist/chunk-7WNX674B.js.map +0 -1
- package/dist/chunk-AAXOSNY3.js +0 -41
- package/dist/chunk-AAXOSNY3.js.map +0 -1
- package/dist/chunk-D6MXCND3.js +0 -33
- package/dist/chunk-D6MXCND3.js.map +0 -1
- package/dist/chunk-EK4ZFDYD.js.map +0 -1
- package/dist/chunk-HVTHVIGL.js +0 -38
- package/dist/chunk-HVTHVIGL.js.map +0 -1
- package/dist/chunk-LW3VKJJS.js +0 -33
- package/dist/chunk-LW3VKJJS.js.map +0 -1
- package/dist/chunk-O5IB6OHB.js +0 -41
- package/dist/chunk-O5IB6OHB.js.map +0 -1
- package/dist/chunk-R6PYUH56.js +0 -104
- package/dist/chunk-S3SAB2S2.js +0 -104
- package/dist/chunk-S3SAB2S2.js.map +0 -1
- package/dist/chunk-TPTFBY6E.js +0 -40
- package/dist/chunk-TPTFBY6E.js.map +0 -1
- package/dist/chunk-VRFAOMNZ.js +0 -33
- package/dist/chunk-VRFAOMNZ.js.map +0 -1
- package/dist/chunk-WJY4BPLR.js +0 -43
- package/dist/chunk-WJY4BPLR.js.map +0 -1
- package/dist/chunk-WVS3CXK5.js +0 -104
- package/dist/chunk-WVS3CXK5.js.map +0 -1
- package/dist/chunk-YQQVYFIL.js +0 -37
- package/dist/chunk-YQQVYFIL.js.map +0 -1
- package/dist/chunk-ZRCRQ7IC.js +0 -42
- package/dist/chunk-ZRCRQ7IC.js.map +0 -1
- /package/dist/{chunk-IFRVKLSE.js.map → chunk-7BE66BFO.js.map} +0 -0
- /package/dist/{chunk-6ZO2L5PO.js.map → chunk-ANLWB2QF.js.map} +0 -0
- /package/dist/{chunk-LPUSIN3M.js.map → chunk-JGV5KQM5.js.map} +0 -0
- /package/dist/{chunk-MDPBP64D.js.map → chunk-M65KRCQ2.js.map} +0 -0
- /package/dist/{chunk-PCWFGDAX.js.map → chunk-NSZVLXRG.js.map} +0 -0
- /package/dist/{chunk-R6PYUH56.js.map → chunk-PF27W53W.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/molecules/navigation.tsx","../../src/atoms/alert-dialog.tsx","../../src/atoms/aspect-ratio.tsx","../../src/atoms/avatar.tsx","../../src/atoms/badge.tsx","../../src/atoms/blockquote.tsx","../../src/atoms/box.tsx","../../src/atoms/button.tsx","../../src/atoms/call-out.tsx","../../src/atoms/card.tsx","../../src/atoms/check-box.tsx","../../src/atoms/check-box-card.tsx","../../src/atoms/check-box-group.tsx","../../src/atoms/code.tsx","../../src/atoms/container.tsx","../../src/atoms/data-list.tsx","../../src/atoms/date-picker/index.tsx","../../src/atoms/dialog.tsx","../../src/atoms/dropdown-menu.tsx","../../src/atoms/em.tsx","../../src/atoms/flex.tsx","../../src/atoms/grid.tsx","../../src/atoms/heading.tsx","../../src/atoms/hover-card.tsx","../../src/atoms/icon-button.tsx","../../src/atoms/inset.tsx","../../src/atoms/kbd.tsx","../../src/atoms/link.tsx","../../src/atoms/popover.tsx","../../src/atoms/progress.tsx","../../src/atoms/quote.tsx","../../src/atoms/radio.tsx","../../src/atoms/radio-cards.tsx","../../src/atoms/radio-group.tsx","../../src/atoms/scroll-area.tsx","../../src/atoms/section.tsx","../../src/atoms/segmented-control.tsx","../../src/atoms/select.tsx","../../src/atoms/separator.tsx","../../src/atoms/skeleton.tsx","../../src/atoms/strong.tsx","../../src/atoms/switch.tsx","../../src/atoms/tab-nav.tsx","../../src/atoms/tabs.tsx","../../src/atoms/text-area.tsx","../../src/atoms/typo.tsx","../../src/atoms/text-field.tsx","../../src/atoms/tooltip.tsx","../../src/atoms/collapse.tsx","../../src/atoms/spinner.tsx","../../src/atoms/pagination.tsx","../../src/icon.ts","../../src/atoms/field-error-wrapper.tsx","../../src/atoms/ellipsis-tooltip.tsx","../../src/atoms/drawer.tsx","../../src/theme/theme-provider.tsx"],"sourcesContent":["import React from 'react';\nimport { Button, Flex, Typo } from '../atoms';\n\ninterface Item {\n itemRender?: (item: Item) => React.ReactNode;\n key: string;\n onClick?: () => void;\n title: string;\n icon?: React.ReactNode;\n children?: Item[];\n}\n\nexport interface NavigationProps {\n items?: Item[];\n fontColor?: string;\n backgroundColor?: string;\n activeKey?: string;\n}\n\nexport function Navigation({\n items,\n fontColor,\n backgroundColor,\n activeKey,\n}: NavigationProps): React.ReactNode {\n return (\n <Flex\n direction=\"column\"\n gap=\"4\"\n pr=\"3\"\n style={{\n color: fontColor || 'var(--white-a12)',\n backgroundColor: backgroundColor || 'var(--black-a12)',\n }}\n >\n {items?.map((item) => {\n const { key, title, icon, itemRender, onClick, children } = item;\n return (\n <Flex direction=\"column\" key={key} onClick={onClick}>\n {itemRender ? (\n itemRender(item)\n ) : (\n <Flex align=\"center\" gap=\"3\" height=\"36px\" pl=\"4\" pr=\"4\">\n {icon}\n <Typo variant=\"subtitle\">{title}</Typo>\n </Flex>\n )}\n {children?.map((menu) => {\n return menu.itemRender ? (\n menu.itemRender(menu)\n ) : (\n <Button\n className={`tipp-navigation-button ${activeKey === menu.key ? 'active' : ''}`}\n key={menu.key}\n ml=\"6\"\n onClick={menu.onClick}\n size=\"large\"\n style={{ color: 'var(--white-a12)' }}\n >\n {menu.title}\n </Button>\n );\n })}\n </Flex>\n );\n })}\n </Flex>\n );\n}\n","export { AlertDialog } from '@radix-ui/themes';\n","export { AspectRatio } from '@radix-ui/themes';\n","import {\n Avatar as RadixAvatar,\n type AvatarProps as RadixAvatarProps,\n} from '@radix-ui/themes';\nimport { useMemo, forwardRef } from 'react';\n\nexport type AvatarProps = Omit<RadixAvatarProps, 'size'> & {\n size?: 'small' | 'medium' | 'large' | 'full';\n};\n\nexport const Avatar = forwardRef<HTMLImageElement, AvatarProps>(\n (props: AvatarProps, ref): React.ReactNode => {\n const { children, size, variant = 'soft', ...rest } = props;\n const radixSize = useMemo<RadixAvatarProps['size']>(() => {\n switch (size) {\n case 'small':\n return '1';\n case 'medium':\n return '2';\n case 'large':\n return '3';\n case 'full':\n return '4';\n default:\n return size;\n }\n }, [size]);\n\n return (\n <RadixAvatar {...rest} ref={ref} size={radixSize} variant={variant}>\n {children}\n </RadixAvatar>\n );\n }\n);\n\nAvatar.displayName = 'Avatar';\n","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'> & {\n size: 'small' | 'large';\n color: 'error' | 'accent' | 'neutral' | 'success';\n};\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n (props: BadgeProps, ref): React.ReactNode => {\n const { size, color, ...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","export { Blockquote, type BlockquoteProps } from '@radix-ui/themes';\n","export { Box, type BoxProps } from '@radix-ui/themes';\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'> & {\n size?: 'small' | 'medium' | 'large';\n};\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (props, ref): React.ReactNode => {\n const { size, ...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 return <RadixButton {...restProps} ref={ref} size={radixSize} />;\n }\n);\n\nButton.displayName = 'Button';\n","export { Callout } from '@radix-ui/themes';\n","export { Card, type CardProps } from '@radix-ui/themes';\n","import {\n Checkbox as RadixCheckbox,\n type CheckboxProps as RadixCheckboxProps,\n} from '@radix-ui/themes';\nimport { useMemo, forwardRef } from 'react';\n\nexport type CheckboxProps = Omit<RadixCheckboxProps, 'size'> & {\n size?: 'small' | 'medium' | 'large';\n};\n\nexport const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(\n (props, ref): React.ReactNode => {\n const { size = 'medium', ...rest } = props;\n\n const radixSize = useMemo<RadixCheckboxProps['size']>(() => {\n switch (size) {\n case 'small':\n return '1';\n case 'medium':\n return '2';\n case 'large':\n return '3';\n }\n }, [size]);\n\n return <RadixCheckbox {...rest} ref={ref} size={radixSize} />;\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n","export { CheckboxCards } from '@radix-ui/themes';\n","import { CheckboxGroup as RadixCheckboxGroup } from '@radix-ui/themes';\nimport React, { forwardRef, useMemo } from 'react';\n\ntype RadixCheckboxGroupProps = React.ComponentPropsWithoutRef<\n typeof RadixCheckboxGroup.Root\n>;\ntype CheckboxGroupProps = Omit<RadixCheckboxGroupProps, 'size'> & {\n size: 'small' | 'medium' | 'large';\n};\n\nconst Root = forwardRef<HTMLDivElement, CheckboxGroupProps>((props, ref) => {\n const { children, size, ...rest } = props;\n\n const groupSize = useMemo<RadixCheckboxGroupProps['size']>(() => {\n switch (size) {\n case 'small':\n return '1';\n case 'large':\n return '3';\n case 'medium':\n default:\n return '2';\n }\n }, [size]);\n\n return (\n <RadixCheckboxGroup.Root {...rest} ref={ref} size={groupSize}>\n {children}\n </RadixCheckboxGroup.Root>\n );\n});\n\nRoot.displayName = 'CheckboxGroup.Root';\n\nexport const CheckboxGroup = {\n Root,\n Item: RadixCheckboxGroup.Item,\n};\n","export { Code, type CodeProps } from '@radix-ui/themes';\n","export { Container, type ContainerProps } from '@radix-ui/themes';\n","export { DataList } from '@radix-ui/themes';\n","import type { ElementRef } from 'react';\nimport React, { forwardRef } from 'react';\nimport type { DatePickerProps as ReactDatePickerProps } from 'react-datepicker';\nimport ReactDatePicker from 'react-datepicker';\n\ntype DatePickerProps = ReactDatePickerProps;\ntype DatePickerRef = ElementRef<typeof ReactDatePicker>;\n\nconst DatePicker = forwardRef<DatePickerRef, DatePickerProps>(\n (props: DatePickerProps, ref): React.ReactNode => {\n return (\n <ReactDatePicker\n {...props}\n // calendarClassName=\"tipp_datepicker__calendar\"\n open\n ref={ref}\n wrapperClassName=\"tipp_datePicker\"\n />\n );\n }\n);\n\nDatePicker.displayName = 'DatePicker';\n\nexport { DatePicker, type DatePickerProps };\n","export { Dialog } from '@radix-ui/themes';\n","export { DropdownMenu } from '@radix-ui/themes';\n","export { Em, type EmProps } from '@radix-ui/themes';\n","export { Flex, type FlexProps } from '@radix-ui/themes';\n","export { Grid, type GridProps } from '@radix-ui/themes';\n","import {\n Heading as RadixHeading,\n type HeadingProps as RadixHeadingProps,\n} from '@radix-ui/themes';\nimport { useMemo } from 'react';\n\nexport { Heading as RadixHeading } from '@radix-ui/themes';\n\nexport type HeadingProps = RadixHeadingProps & {\n variant?: 'subtitle1' | 'heading1' | 'heading2' | 'heading3';\n};\n\nexport function Heading(props: HeadingProps): React.ReactNode {\n const { size, children, variant, ...rest } = props;\n const radixSize = useMemo<RadixHeadingProps['size']>(() => {\n switch (variant) {\n case 'subtitle1':\n return '4';\n case 'heading1':\n return '7';\n case 'heading2':\n return '6';\n case 'heading3':\n return '5';\n default:\n return size;\n }\n }, [size, variant]);\n\n return (\n <RadixHeading {...rest} size={radixSize}>\n {children}\n </RadixHeading>\n );\n}\n","export { HoverCard } from '@radix-ui/themes';\n","export { IconButton, type IconButtonProps } from '@radix-ui/themes';\n","export { Inset, type InsetProps } from '@radix-ui/themes';\n","export { Kbd, type KbdProps } from '@radix-ui/themes';\n","import {\n Link as RadixLink,\n type LinkProps as RadixLinkProps,\n} from '@radix-ui/themes';\nimport { useMemo } from 'react';\n\nexport { Heading as RadixHeading } from '@radix-ui/themes';\n\nexport type LinkProps = RadixLinkProps & {\n variant?: 'caption' | 'body' | 'subtitle';\n};\n\nexport function Link(props: LinkProps): React.ReactNode {\n const { size, children, variant, ...rest } = props;\n const radixSize = useMemo<RadixLinkProps['size']>(() => {\n switch (variant) {\n case 'caption':\n return '1';\n case 'body':\n return '2';\n case 'subtitle':\n return '3';\n default:\n return size;\n }\n }, [size, variant]);\n\n return (\n <RadixLink {...rest} size={radixSize}>\n {children}\n </RadixLink>\n );\n}\n","export { Popover } from '@radix-ui/themes';\n","export { Progress, type ProgressProps } from '@radix-ui/themes';\n","export { Quote, type QuoteProps } from '@radix-ui/themes';\n","export { Radio, type RadioProps } from '@radix-ui/themes';\n","export { RadioCards } from '@radix-ui/themes';\n","export { RadioGroup } from '@radix-ui/themes';\n","export { ScrollArea, type ScrollAreaProps } from '@radix-ui/themes';\n","export { Section, type SectionProps } from '@radix-ui/themes';\n","export { SegmentedControl } from '@radix-ui/themes';\n","export { Select } from '@radix-ui/themes';\n","export { Separator, type SeparatorProps } from '@radix-ui/themes';\n","export { Skeleton, type SkeletonProps } from '@radix-ui/themes';\n","export { Strong, type StrongProps } from '@radix-ui/themes';\n","export { Switch, type SwitchProps } from '@radix-ui/themes';\n","export { TabNav } from '@radix-ui/themes';\n","export { Tabs } from '@radix-ui/themes';\n","export { TextArea, type TextAreaProps } from '@radix-ui/themes';\n","import type { TextProps as RadixTextProps } from '@radix-ui/themes';\nimport { Text as RadixText } from '@radix-ui/themes';\nimport React, { useMemo, forwardRef } from 'react';\n\nexport type TypoProps = RadixTextProps & {\n variant?: 'body' | 'caption' | 'subtitle';\n};\n\nexport const Typo = forwardRef<HTMLSpanElement, TypoProps>(\n (props: TypoProps, ref): React.ReactNode => {\n const { size, variant, children, ...rest } = props;\n\n const radixSize = useMemo<RadixTextProps['size']>(() => {\n if (size !== undefined) return size;\n switch (variant) {\n case 'caption':\n return '1';\n case 'subtitle':\n return '3';\n case 'body':\n default:\n return '2';\n }\n }, [size, variant]);\n\n return (\n <RadixText {...rest} ref={ref} size={radixSize}>\n {children}\n </RadixText>\n );\n }\n);\n\nTypo.displayName = 'Typo';\n","export { TextField } from '@radix-ui/themes';\n","export { Tooltip, type TooltipProps } from '@radix-ui/themes';\n","import React, { useEffect, useRef, useState } from 'react';\n\nexport interface CollapseProps {\n children: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n}\n\nexport function Collapse(props: CollapseProps): React.ReactNode {\n const { children } = props;\n const [open, setOpen] = useState(() => {\n return props.open || props.defaultOpen || false;\n });\n\n useEffect(() => {\n if (props.open === undefined) return;\n setOpen(props.open);\n }, [props.open]);\n\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!ref.current) return;\n ref.current.style.maxHeight = open ? `${ref.current.scrollHeight}px` : '0';\n }, [open]);\n\n return (\n <div className=\"collapse\" ref={ref}>\n {children}\n </div>\n );\n}\n","export { Spinner, type SpinnerProps } from '@radix-ui/themes';\n","import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon } from '../icon';\nimport type { IconButtonProps } from './icon-button';\nimport { IconButton } from './icon-button';\nimport { Flex } from './flex';\nimport { Typo } from './typo';\n\nexport interface PaginationProps {\n /** 현재 선택된 페이지 */\n page?: number;\n /** 기본 선택 페이지, page보다 낮은 우선 순위를 갖는다 */\n defaultPage?: number;\n /** 선택한 페이지 변경 이벤트 cb */\n onChange?: (page: number) => void;\n /** 전체 페이지의 수 */\n count?: number;\n}\n\nexport function Pagination(props: PaginationProps): React.ReactNode {\n const { onChange, count = 0 } = props;\n const siblingCount = 2;\n\n const [page, setPage] = useState(() => props.page || props.defaultPage || 1);\n\n const visibleItems = useMemo(() => {\n let start = Math.max(1, page - siblingCount);\n let end = Math.min(count, page + siblingCount);\n if (page - siblingCount <= 0 && end < count) {\n end = Math.min(count, end + Math.abs(page - siblingCount) + 1);\n } else if (page + siblingCount > count && start > 1) {\n start = Math.max(1, start - (page + siblingCount - count));\n }\n\n return Array.from({ length: end - start + 1 }, (_, i) => i + start);\n }, [count, page]);\n\n useEffect(() => {\n onChange?.(page);\n }, [onChange, page]);\n\n useEffect(() => {\n if (props.page) {\n setPage(props.page);\n }\n }, [props.page]);\n\n const onClickPrev = useCallback(() => {\n setPage((prev) => Math.max(1, prev - 1));\n }, []);\n\n const onClickNext = useCallback(() => {\n setPage((prev) => Math.min(count, prev + 1));\n }, [count]);\n\n const moveButtonProps: IconButtonProps = {\n variant: 'ghost',\n size: '3',\n style: { borderRadius: '50%' },\n };\n\n const iconSize = {\n height: 24,\n width: 24,\n };\n\n const prevDisabled = useMemo(() => {\n return page - siblingCount <= 1;\n }, [page]);\n\n const nextDisabled = useMemo(() => {\n return page + siblingCount >= count;\n }, [count, page]);\n\n return (\n <Flex align=\"center\" className=\"tipp-pagination\" gap=\"4\">\n <IconButton\n disabled={prevDisabled}\n onClick={onClickPrev}\n {...moveButtonProps}\n >\n <ChevronLeftIcon {...iconSize} />\n </IconButton>\n <Flex gap=\"1\">\n {visibleItems.map((item) => {\n return (\n <button\n className={`page-button ${item === page ? 'active' : ''}`}\n key={item}\n onClick={() => {\n setPage(item);\n }}\n type=\"button\"\n >\n <Typo variant=\"body\">{item}</Typo>\n </button>\n );\n })}\n </Flex>\n <IconButton\n disabled={nextDisabled}\n onClick={onClickNext}\n {...moveButtonProps}\n >\n <ChevronRightIcon {...iconSize} />\n </IconButton>\n </Flex>\n );\n}\n","export {\n BookmarkIcon,\n ExitIcon,\n InfoCircledIcon,\n ExclamationTriangleIcon,\n MagnifyingGlassIcon,\n DotsHorizontalIcon,\n ChatBubbleIcon,\n PlusIcon,\n BookmarkFilledIcon,\n MixerHorizontalIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n ClipboardIcon,\n BarChartIcon,\n PersonIcon,\n GearIcon,\n DotsVerticalIcon,\n} from '@radix-ui/react-icons';\n","import React from 'react';\nimport { Flex } from './flex';\nimport { Typo } from './typo';\n\nexport interface FieldErrorWrapperProps {\n children?: React.ReactNode;\n error?: React.ReactNode;\n}\n\nexport function FieldErrorWrapper({\n children,\n error,\n}: FieldErrorWrapperProps): JSX.Element {\n return (\n <Flex direction=\"column\" gap=\"1\">\n {children}\n {error ? (\n <Typo color=\"red\" variant=\"caption\">\n {error}\n </Typo>\n ) : null}\n </Flex>\n );\n}\n","import React, { useEffect, useRef, useState } from 'react';\nimport { Tooltip } from './tooltip';\nimport { Typo, type TypoProps } from './typo';\n\nexport type EllipsisTooltipProps = TypoProps & {\n lineClamp?: number;\n children?: string;\n};\n\nexport function EllipsisTooltip(props: EllipsisTooltipProps): React.ReactNode {\n const { children, style, lineClamp = 2, ...rest } = props;\n const ref = useRef<HTMLSpanElement>(null);\n\n const [tooltipDisplay, setTooltipDisplay] = useState<'none' | 'block'>(\n 'none'\n );\n\n useEffect(() => {\n if (ref.current) {\n const typo = ref.current;\n const mouseOver = (): void => {\n if (typo.clientHeight < typo.scrollHeight) {\n setTooltipDisplay('block');\n }\n };\n\n const mouseOut = (): void => {\n setTooltipDisplay('none');\n };\n\n ref.current.addEventListener('mouseenter', mouseOver);\n ref.current.addEventListener('mouseleave', mouseOut);\n }\n }, [children]);\n\n return (\n <Tooltip content={children} style={{ display: tooltipDisplay }}>\n <Typo\n {...rest}\n ref={ref}\n style={{\n width: '100%',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n WebkitLineClamp: lineClamp,\n\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n wordBreak: 'break-word',\n ...style,\n }}\n >\n {children}\n </Typo>\n </Tooltip>\n );\n}\n","import React from 'react';\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { ThemeProvider } from '../theme/theme-provider';\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.ReactNode {\n const { position = 'right', className, ...rest } = props;\n return (\n <Dialog.Portal>\n <ThemeProvider>\n <Dialog.Overlay className=\"DrawerOverlay\" />\n <Dialog.Content\n className={`DrawerContent ${position} ${className || ''}`}\n {...rest}\n />\n </ThemeProvider>\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 from 'react';\nimport { Theme } from '@radix-ui/themes';\n\ntype ThemeProps = React.ComponentProps<typeof Theme>;\n\ninterface ThemeProviderProps extends ThemeProps {\n children: React.ReactNode;\n}\n\nexport function ThemeProvider(props: ThemeProviderProps): React.ReactNode {\n return <Theme accentColor=\"iris\" radius=\"large\" {...props} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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E,yBAkBO;;;ADwDH,IAAAC,uBAAA;;;AE5DA,IAAAC,uBAAA;;;ACdJ,IAAAC,iBAAmD;AAqC7C,IAAAC,uBAAA;;;ACpCN,IAAAC,UAAwB;;;ACAxB,IAAAC,kBAAsB;AASb,IAAAC,uBAAA;;;ADLA,IAAAC,uBAAA;;;AtDqCK,IAAAC,uBAAA;AAvBP,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAqC;AACnC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,KAAI;AAAA,MACJ,IAAG;AAAA,MACH,OAAO;AAAA,QACL,OAAO,aAAa;AAAA,QACpB,iBAAiB,mBAAmB;AAAA,MACtC;AAAA,MAEC,yCAAO,IAAI,CAAC,SAAS;AACpB,cAAM,EAAE,KAAK,OAAO,MAAM,YAAY,SAAS,SAAS,IAAI;AAC5D,eACE,+CAAC,wBAAK,WAAU,UAAmB,SAChC;AAAA,uBACC,WAAW,IAAI,IAEf,+CAAC,wBAAK,OAAM,UAAS,KAAI,KAAI,QAAO,QAAO,IAAG,KAAI,IAAG,KAClD;AAAA;AAAA,YACD,8CAAC,QAAK,SAAQ,YAAY,iBAAM;AAAA,aAClC;AAAA,UAED,qCAAU,IAAI,CAAC,SAAS;AACvB,mBAAO,KAAK,aACV,KAAK,WAAW,IAAI,IAEpB;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW,0BAA0B,cAAc,KAAK,MAAM,WAAW,EAAE;AAAA,gBAE3E,IAAG;AAAA,gBACH,SAAS,KAAK;AAAA,gBACd,MAAK;AAAA,gBACL,OAAO,EAAE,OAAO,mBAAmB;AAAA,gBAElC,eAAK;AAAA;AAAA,cAND,KAAK;AAAA,YAOZ;AAAA,UAEJ;AAAA,aAxB4B,GAyB9B;AAAA,MAEJ;AAAA;AAAA,EACF;AAEJ;","names":["import_themes","import_themes","RadixAvatar","import_themes","import_react","import_jsx_runtime","RadixBadge","import_themes","import_themes","import_themes","import_react","import_jsx_runtime","RadixButton","import_themes","import_themes","import_themes","import_react","import_jsx_runtime","RadixCheckbox","import_themes","import_themes","import_react","import_jsx_runtime","RadixCheckboxGroup","import_themes","import_themes","import_themes","import_react","import_jsx_runtime","ReactDatePicker","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_react","import_jsx_runtime","import_themes","import_themes","import_themes","import_themes","import_themes","import_react","import_jsx_runtime","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_react","import_jsx_runtime","RadixText","import_themes","import_themes","import_react","import_jsx_runtime","import_themes","import_react","import_jsx_runtime","import_jsx_runtime","import_react","import_jsx_runtime","Dialog","import_themes","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/molecules/navigation.tsx","../../src/atoms/alert-dialog.tsx","../../src/atoms/aspect-ratio.tsx","../../src/atoms/avatar.tsx","../../src/atoms/badge.tsx","../../src/atoms/blockquote.tsx","../../src/atoms/box.tsx","../../src/atoms/button.tsx","../../src/atoms/call-out.tsx","../../src/atoms/card.tsx","../../src/atoms/check-box.tsx","../../src/atoms/check-box-card.tsx","../../src/atoms/check-box-group.tsx","../../src/atoms/code.tsx","../../src/atoms/container.tsx","../../src/atoms/data-list.tsx","../../src/atoms/date-picker/index.tsx","../../src/atoms/icon-button.tsx","../../src/atoms/flex.tsx","../../src/icon.ts","../../src/atoms/heading.tsx","../../src/atoms/dialog.tsx","../../src/atoms/dropdown-menu.tsx","../../src/atoms/em.tsx","../../src/atoms/grid.tsx","../../src/atoms/hover-card.tsx","../../src/atoms/inset.tsx","../../src/atoms/kbd.tsx","../../src/atoms/link.tsx","../../src/atoms/popover.tsx","../../src/atoms/progress.tsx","../../src/atoms/quote.tsx","../../src/atoms/radio.tsx","../../src/atoms/radio-cards.tsx","../../src/atoms/radio-group.tsx","../../src/atoms/scroll-area.tsx","../../src/atoms/section.tsx","../../src/atoms/segmented-control.tsx","../../src/atoms/select.tsx","../../src/atoms/separator.tsx","../../src/atoms/skeleton.tsx","../../src/atoms/strong.tsx","../../src/atoms/switch.tsx","../../src/atoms/tab-nav.tsx","../../src/atoms/tabs.tsx","../../src/atoms/text-area.tsx","../../src/atoms/typo.tsx","../../src/atoms/text-field.tsx","../../src/atoms/tooltip.tsx","../../src/atoms/collapse.tsx","../../src/atoms/spinner.tsx","../../src/atoms/pagination.tsx","../../src/atoms/field-error-wrapper.tsx","../../src/atoms/ellipsis-tooltip.tsx","../../src/atoms/drawer.tsx","../../src/theme/theme-provider.tsx","../../src/atoms/toast.tsx"],"sourcesContent":["import React from 'react';\nimport { Button, Flex, Typo } from '../atoms';\n\ninterface Item {\n itemRender?: (item: Item) => React.ReactNode;\n key: string;\n onClick?: () => void;\n title: string;\n icon?: React.ReactNode;\n children?: Item[];\n}\n\nexport interface NavigationProps {\n items?: Item[];\n fontColor?: string;\n backgroundColor?: string;\n activeKey?: string;\n}\n\nexport function Navigation({\n items,\n fontColor,\n backgroundColor,\n activeKey,\n}: NavigationProps): React.ReactNode {\n return (\n <Flex\n direction=\"column\"\n gap=\"4\"\n pr=\"3\"\n style={{\n color: fontColor || 'var(--white-a12)',\n backgroundColor: backgroundColor || 'var(--black-a12)',\n }}\n >\n {items?.map((item) => {\n const { key, title, icon, itemRender, onClick, children } = item;\n return (\n <Flex direction=\"column\" key={key} onClick={onClick}>\n {itemRender ? (\n itemRender(item)\n ) : (\n <Flex align=\"center\" gap=\"3\" height=\"36px\" pl=\"4\" pr=\"4\">\n {icon}\n <Typo variant=\"subtitle\">{title}</Typo>\n </Flex>\n )}\n {children?.map((menu) => {\n return menu.itemRender ? (\n menu.itemRender(menu)\n ) : (\n <Button\n className={`tipp-navigation-button ${activeKey === menu.key ? 'active' : ''}`}\n key={menu.key}\n ml=\"6\"\n onClick={menu.onClick}\n size=\"large\"\n style={{ color: 'var(--white-a12)' }}\n >\n {menu.title}\n </Button>\n );\n })}\n </Flex>\n );\n })}\n </Flex>\n );\n}\n","export { AlertDialog } from '@radix-ui/themes';\n","export { AspectRatio } from '@radix-ui/themes';\n","import {\n Avatar as RadixAvatar,\n type AvatarProps as RadixAvatarProps,\n} from '@radix-ui/themes';\nimport { useMemo, forwardRef } from 'react';\n\nexport type AvatarProps = Omit<RadixAvatarProps, 'size'> & {\n size?: 'small' | 'medium' | 'large' | 'full';\n};\n\nexport const Avatar = forwardRef<HTMLImageElement, AvatarProps>(\n (props: AvatarProps, ref): React.ReactNode => {\n const { children, size, variant = 'soft', ...rest } = props;\n const radixSize = useMemo<RadixAvatarProps['size']>(() => {\n switch (size) {\n case 'small':\n return '1';\n case 'medium':\n return '2';\n case 'large':\n return '3';\n case 'full':\n return '4';\n default:\n return size;\n }\n }, [size]);\n\n return (\n <RadixAvatar {...rest} ref={ref} size={radixSize} variant={variant}>\n {children}\n </RadixAvatar>\n );\n }\n);\n\nAvatar.displayName = 'Avatar';\n","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'> & {\n size: 'small' | 'large';\n color: 'error' | 'accent' | 'neutral' | 'success';\n};\n\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n (props: BadgeProps, ref): React.ReactNode => {\n const { size, color, ...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","export { Blockquote, type BlockquoteProps } from '@radix-ui/themes';\n","export { Box, type BoxProps } from '@radix-ui/themes';\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'> & {\n size?: 'small' | 'medium' | 'large';\n};\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (props, ref): React.ReactNode => {\n const { size, ...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 return <RadixButton {...restProps} ref={ref} size={radixSize} />;\n }\n);\n\nButton.displayName = 'Button';\n","export { Callout } from '@radix-ui/themes';\n","export { Card, type CardProps } from '@radix-ui/themes';\n","import {\n Checkbox as RadixCheckbox,\n type CheckboxProps as RadixCheckboxProps,\n} from '@radix-ui/themes';\nimport { useMemo, forwardRef } from 'react';\n\nexport type CheckboxProps = Omit<RadixCheckboxProps, 'size'> & {\n size?: 'small' | 'medium' | 'large';\n};\n\nexport const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(\n (props, ref): React.ReactNode => {\n const { size = 'medium', ...rest } = props;\n\n const radixSize = useMemo<RadixCheckboxProps['size']>(() => {\n switch (size) {\n case 'small':\n return '1';\n case 'medium':\n return '2';\n case 'large':\n return '3';\n }\n }, [size]);\n\n return <RadixCheckbox {...rest} ref={ref} size={radixSize} />;\n }\n);\n\nCheckbox.displayName = 'Checkbox';\n","export { CheckboxCards } from '@radix-ui/themes';\n","import { CheckboxGroup as RadixCheckboxGroup } from '@radix-ui/themes';\nimport React, { forwardRef, useMemo } from 'react';\n\ntype RadixCheckboxGroupProps = React.ComponentPropsWithoutRef<\n typeof RadixCheckboxGroup.Root\n>;\ntype CheckboxGroupProps = Omit<RadixCheckboxGroupProps, 'size'> & {\n size: 'small' | 'medium' | 'large';\n};\n\nconst Root = forwardRef<HTMLDivElement, CheckboxGroupProps>((props, ref) => {\n const { children, size, ...rest } = props;\n\n const groupSize = useMemo<RadixCheckboxGroupProps['size']>(() => {\n switch (size) {\n case 'small':\n return '1';\n case 'large':\n return '3';\n case 'medium':\n default:\n return '2';\n }\n }, [size]);\n\n return (\n <RadixCheckboxGroup.Root {...rest} ref={ref} size={groupSize}>\n {children}\n </RadixCheckboxGroup.Root>\n );\n});\n\nRoot.displayName = 'CheckboxGroup.Root';\n\nexport const CheckboxGroup = {\n Root,\n Item: RadixCheckboxGroup.Item,\n};\n","export { Code, type CodeProps } from '@radix-ui/themes';\n","export { Container, type ContainerProps } from '@radix-ui/themes';\n","export { DataList } from '@radix-ui/themes';\n","import type { ElementRef } from 'react';\nimport React, { forwardRef } from 'react';\nimport type { DatePickerProps as ReactDatePickerProps } from 'react-datepicker';\nimport ReactDatePicker from 'react-datepicker';\nimport { IconButton } from '../icon-button';\nimport { Flex } from '../flex';\nimport { ChevronLeftIcon, ChevronRightIcon } from '../../icon';\nimport { Heading } from '../heading';\n\ntype DatePickerProps = ReactDatePickerProps & {\n size?: 'small' | 'medium' | 'large';\n};\ntype DatePickerRef = ElementRef<typeof ReactDatePicker>;\n\nconst DatePicker = forwardRef<DatePickerRef, DatePickerProps>(\n (props: DatePickerProps, ref): React.ReactNode => {\n const { size = 'medium', ...rest } = props;\n\n return (\n <ReactDatePicker\n placeholderText=\"yyyy/mm/dd\"\n ref={ref}\n showPopperArrow={false}\n {...rest}\n calendarClassName={`tipp_datePicker_calendar ${rest.calendarClassName || ''}`}\n dateFormat=\"yyyy/MM/dd\"\n nextMonthButtonLabel=\"다음 달\"\n previousMonthButtonLabel=\"이전 달\"\n renderCustomHeader={renderCustomHeader}\n wrapperClassName={`tipp_datePicker ${size} ${rest.wrapperClassName || ''}`}\n />\n );\n }\n);\nconst renderCustomHeader: ReactDatePickerProps['renderCustomHeader'] = (\n props\n) => {\n const {\n date,\n decreaseMonth,\n increaseMonth,\n prevMonthButtonDisabled,\n nextMonthButtonDisabled,\n } = props;\n\n const year = date.getFullYear();\n const month = date.getMonth();\n\n return (\n <Flex align=\"center\" justify=\"between\" pb=\"2\" pl=\"2\" pr=\"2\">\n <IconButton\n disabled={prevMonthButtonDisabled}\n onClick={decreaseMonth}\n variant=\"ghost\"\n >\n <ChevronLeftIcon />\n </IconButton>\n <Flex gap=\"3\">\n <Heading variant=\"subtitle1\" weight=\"regular\">\n {year}년\n </Heading>\n <Heading variant=\"subtitle1\" weight=\"regular\">\n {month + 1}월\n </Heading>\n </Flex>\n\n <IconButton\n disabled={nextMonthButtonDisabled}\n onClick={increaseMonth}\n variant=\"ghost\"\n >\n <ChevronRightIcon />\n </IconButton>\n </Flex>\n );\n};\n\n// const renderCustomHeader: ReactDatePickerProps['renderCustomHeader'] = (\n// props\n// ) => {\n// const {\n// date,\n// decreaseMonth,\n// increaseMonth,\n// changeMonth,\n// changeYear,\n// prevMonthButtonDisabled,\n// nextMonthButtonDisabled,\n// } = props;\n\n// const SelectTriggerProps: Select.TriggerProps = {\n// variant: 'ghost',\n// };\n// const year = date.getFullYear();\n// const month = date.getMonth();\n\n// return (\n// <Flex align=\"center\" justify=\"between\" pb=\"2\" pl=\"2\" pr=\"2\">\n// <IconButton\n// disabled={prevMonthButtonDisabled}\n// onClick={decreaseMonth}\n// variant=\"ghost\"\n// >\n// <ChevronLeftIcon />\n// </IconButton>\n// <Flex gap=\"3\">\n// <Select.Root\n// onValueChange={(value) => {\n// console.log({ value });\n// changeYear(Number(value));\n// }}\n// value={year.toString()}\n// >\n// <Select.Trigger {...SelectTriggerProps}>\n// <Heading variant=\"subtitle1\" weight=\"regular\">\n// {year}년\n// </Heading>\n// </Select.Trigger>\n// <Select.Content>\n// {Array.from({ length: 5 })\n// .map((_, i) => {\n// const toYear = new Date().getFullYear();\n// const v = toYear + i + 1;\n// return (\n// <Select.Item key={v} value={v.toString()}>\n// {v}년\n// </Select.Item>\n// );\n// })\n// .reverse()}\n\n// {Array.from({ length: 60 }).map((_, i) => {\n// const toYear = new Date().getFullYear();\n// const v = toYear - i;\n// return (\n// <Select.Item key={v} value={v.toString()}>\n// {v}년\n// </Select.Item>\n// );\n// })}\n// </Select.Content>\n// </Select.Root>\n// <Select.Root\n// onValueChange={(value) => {\n// changeMonth(Number(value));\n// }}\n// value={month.toString()}\n// >\n// <Select.Trigger {...SelectTriggerProps}>\n// <Heading variant=\"subtitle1\" weight=\"regular\">\n// {month + 1}월\n// </Heading>\n// </Select.Trigger>\n// <Select.Content>\n// {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map((m) => (\n// <Select.Item key={m} value={m.toString()}>\n// {m + 1}월\n// </Select.Item>\n// ))}\n// </Select.Content>\n// </Select.Root>\n// </Flex>\n\n// <IconButton\n// disabled={nextMonthButtonDisabled}\n// onClick={increaseMonth}\n// variant=\"ghost\"\n// >\n// <ChevronRightIcon />\n// </IconButton>\n// </Flex>\n// );\n// };\n\nDatePicker.displayName = 'DatePicker';\n\nexport { DatePicker, type DatePickerProps };\n","export { IconButton, type IconButtonProps } from '@radix-ui/themes';\n","export { Flex, type FlexProps } from '@radix-ui/themes';\n","export {\n BookmarkIcon,\n ExitIcon,\n InfoCircledIcon,\n ExclamationTriangleIcon,\n MagnifyingGlassIcon,\n DotsHorizontalIcon,\n ChatBubbleIcon,\n PlusIcon,\n BookmarkFilledIcon,\n MixerHorizontalIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n ClipboardIcon,\n BarChartIcon,\n PersonIcon,\n GearIcon,\n DotsVerticalIcon,\n Pencil1Icon,\n Cross1Icon\n} from '@radix-ui/react-icons';\n","import {\n Heading as RadixHeading,\n type HeadingProps as RadixHeadingProps,\n} from '@radix-ui/themes';\nimport { useMemo } from 'react';\n\nexport { Heading as RadixHeading } from '@radix-ui/themes';\n\nexport type HeadingProps = RadixHeadingProps & {\n variant?: 'subtitle1' | 'heading1' | 'heading2' | 'heading3';\n};\n\nexport function Heading(props: HeadingProps): React.ReactNode {\n const { size, children, variant, ...rest } = props;\n const radixSize = useMemo<RadixHeadingProps['size']>(() => {\n switch (variant) {\n case 'subtitle1':\n return '4';\n case 'heading1':\n return '7';\n case 'heading2':\n return '6';\n case 'heading3':\n return '5';\n default:\n return size;\n }\n }, [size, variant]);\n\n return (\n <RadixHeading {...rest} size={radixSize}>\n {children}\n </RadixHeading>\n );\n}\n","export { Dialog } from '@radix-ui/themes';\n","export { DropdownMenu } from '@radix-ui/themes';\n","export { Em, type EmProps } from '@radix-ui/themes';\n","export { Grid, type GridProps } from '@radix-ui/themes';\n","export { HoverCard } from '@radix-ui/themes';\n","export { Inset, type InsetProps } from '@radix-ui/themes';\n","export { Kbd, type KbdProps } from '@radix-ui/themes';\n","import {\n Link as RadixLink,\n type LinkProps as RadixLinkProps,\n} from '@radix-ui/themes';\nimport { useMemo } from 'react';\n\nexport { Heading as RadixHeading } from '@radix-ui/themes';\n\nexport type LinkProps = RadixLinkProps & {\n variant?: 'caption' | 'body' | 'subtitle';\n};\n\nexport function Link(props: LinkProps): React.ReactNode {\n const { size, children, variant, ...rest } = props;\n const radixSize = useMemo<RadixLinkProps['size']>(() => {\n switch (variant) {\n case 'caption':\n return '1';\n case 'body':\n return '2';\n case 'subtitle':\n return '3';\n default:\n return size;\n }\n }, [size, variant]);\n\n return (\n <RadixLink {...rest} size={radixSize}>\n {children}\n </RadixLink>\n );\n}\n","export { Popover } from '@radix-ui/themes';\n","export { Progress, type ProgressProps } from '@radix-ui/themes';\n","export { Quote, type QuoteProps } from '@radix-ui/themes';\n","export { Radio, type RadioProps } from '@radix-ui/themes';\n","export { RadioCards } from '@radix-ui/themes';\n","export { RadioGroup } from '@radix-ui/themes';\n","export { ScrollArea, type ScrollAreaProps } from '@radix-ui/themes';\n","export { Section, type SectionProps } from '@radix-ui/themes';\n","export { SegmentedControl } from '@radix-ui/themes';\n","export { Select } from '@radix-ui/themes';\n","export { Separator, type SeparatorProps } from '@radix-ui/themes';\n","export { Skeleton, type SkeletonProps } from '@radix-ui/themes';\n","export { Strong, type StrongProps } from '@radix-ui/themes';\n","export { Switch, type SwitchProps } from '@radix-ui/themes';\n","export { TabNav } from '@radix-ui/themes';\n","export { Tabs } from '@radix-ui/themes';\n","export { TextArea, type TextAreaProps } from '@radix-ui/themes';\n","import type { TextProps as RadixTextProps } from '@radix-ui/themes';\nimport { Text as RadixText } from '@radix-ui/themes';\nimport React, { useMemo, forwardRef } from 'react';\n\nexport type TypoProps = RadixTextProps & {\n variant?: 'body' | 'caption' | 'subtitle';\n};\n\nexport const Typo = forwardRef<HTMLSpanElement, TypoProps>(\n (props: TypoProps, ref): React.ReactNode => {\n const { size, variant, children, ...rest } = props;\n\n const radixSize = useMemo<RadixTextProps['size']>(() => {\n if (size !== undefined) return size;\n switch (variant) {\n case 'caption':\n return '1';\n case 'subtitle':\n return '3';\n case 'body':\n default:\n return '2';\n }\n }, [size, variant]);\n\n return (\n <RadixText {...rest} ref={ref} size={radixSize}>\n {children}\n </RadixText>\n );\n }\n);\n\nTypo.displayName = 'Typo';\n","export { TextField } from '@radix-ui/themes';\n","export { Tooltip, type TooltipProps } from '@radix-ui/themes';\n","import React, { useEffect, useRef, useState } from 'react';\n\nexport interface CollapseProps {\n children: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n}\n\nexport function Collapse(props: CollapseProps): React.ReactNode {\n const { children } = props;\n const [open, setOpen] = useState(() => {\n return props.open || props.defaultOpen || false;\n });\n\n useEffect(() => {\n if (props.open === undefined) return;\n setOpen(props.open);\n }, [props.open]);\n\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!ref.current) return;\n ref.current.style.maxHeight = open ? `${ref.current.scrollHeight}px` : '0';\n }, [open]);\n\n return (\n <div className=\"collapse\" ref={ref}>\n {children}\n </div>\n );\n}\n","export { Spinner, type SpinnerProps } from '@radix-ui/themes';\n","import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon } from '../icon';\nimport type { IconButtonProps } from './icon-button';\nimport { IconButton } from './icon-button';\nimport { Flex } from './flex';\nimport { Typo } from './typo';\n\nexport interface PaginationProps {\n /** 현재 선택된 페이지 */\n page?: number;\n /** 기본 선택 페이지, page보다 낮은 우선 순위를 갖는다 */\n defaultPage?: number;\n /** 선택한 페이지 변경 이벤트 cb */\n onChange?: (page: number) => void;\n /** 전체 페이지의 수 */\n count?: number;\n}\n\nexport function Pagination(props: PaginationProps): React.ReactNode {\n const { onChange, count = 0 } = props;\n const siblingCount = 2;\n\n const [page, setPage] = useState(() => props.page || props.defaultPage || 1);\n\n const visibleItems = useMemo(() => {\n let start = Math.max(1, page - siblingCount);\n let end = Math.min(count, page + siblingCount);\n if (page - siblingCount <= 0 && end < count) {\n end = Math.min(count, end + Math.abs(page - siblingCount) + 1);\n } else if (page + siblingCount > count && start > 1) {\n start = Math.max(1, start - (page + siblingCount - count));\n }\n\n return Array.from({ length: end - start + 1 }, (_, i) => i + start);\n }, [count, page]);\n\n useEffect(() => {\n onChange?.(page);\n }, [onChange, page]);\n\n useEffect(() => {\n if (props.page) {\n setPage(props.page);\n }\n }, [props.page]);\n\n const onClickPrev = useCallback(() => {\n setPage((prev) => Math.max(1, prev - 1));\n }, []);\n\n const onClickNext = useCallback(() => {\n setPage((prev) => Math.min(count, prev + 1));\n }, [count]);\n\n const moveButtonProps: IconButtonProps = {\n variant: 'ghost',\n size: '3',\n style: { borderRadius: '50%' },\n };\n\n const iconSize = {\n height: 24,\n width: 24,\n };\n\n const prevDisabled = useMemo(() => {\n return page - siblingCount <= 1;\n }, [page]);\n\n const nextDisabled = useMemo(() => {\n return page + siblingCount >= count;\n }, [count, page]);\n\n return (\n <Flex align=\"center\" className=\"tipp-pagination\" gap=\"4\">\n <IconButton\n disabled={prevDisabled}\n onClick={onClickPrev}\n {...moveButtonProps}\n >\n <ChevronLeftIcon {...iconSize} />\n </IconButton>\n <Flex gap=\"1\">\n {visibleItems.map((item) => {\n return (\n <button\n className={`page-button ${item === page ? 'active' : ''}`}\n key={item}\n onClick={() => {\n setPage(item);\n }}\n type=\"button\"\n >\n <Typo variant=\"body\">{item}</Typo>\n </button>\n );\n })}\n </Flex>\n <IconButton\n disabled={nextDisabled}\n onClick={onClickNext}\n {...moveButtonProps}\n >\n <ChevronRightIcon {...iconSize} />\n </IconButton>\n </Flex>\n );\n}\n","import React from 'react';\nimport { Flex } from './flex';\nimport { Typo } from './typo';\n\nexport interface FieldErrorWrapperProps {\n children?: React.ReactNode;\n error?: React.ReactNode;\n}\n\nexport function FieldErrorWrapper({\n children,\n error,\n}: FieldErrorWrapperProps): JSX.Element {\n return (\n <Flex direction=\"column\" gap=\"1\">\n {children}\n {error ? (\n <Typo color=\"red\" variant=\"caption\">\n {error}\n </Typo>\n ) : null}\n </Flex>\n );\n}\n","import React, { useEffect, useRef, useState } from 'react';\nimport { Tooltip } from './tooltip';\nimport { Typo, type TypoProps } from './typo';\n\nexport type EllipsisTooltipProps = TypoProps & {\n lineClamp?: number;\n children?: string;\n};\n\nexport function EllipsisTooltip(props: EllipsisTooltipProps): React.ReactNode {\n const { children, style, lineClamp = 2, ...rest } = props;\n const ref = useRef<HTMLSpanElement>(null);\n\n const [tooltipDisplay, setTooltipDisplay] = useState<'none' | 'block'>(\n 'none'\n );\n\n useEffect(() => {\n if (ref.current) {\n const typo = ref.current;\n const mouseOver = (): void => {\n if (typo.clientHeight < typo.scrollHeight) {\n setTooltipDisplay('block');\n }\n };\n\n const mouseOut = (): void => {\n setTooltipDisplay('none');\n };\n\n ref.current.addEventListener('mouseenter', mouseOver);\n ref.current.addEventListener('mouseleave', mouseOut);\n }\n }, [children]);\n\n return (\n <Tooltip content={children} style={{ display: tooltipDisplay }}>\n <Typo\n {...rest}\n ref={ref}\n style={{\n width: '100%',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n WebkitLineClamp: lineClamp,\n\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n wordBreak: 'break-word',\n ...style,\n }}\n >\n {children}\n </Typo>\n </Tooltip>\n );\n}\n","import React from 'react';\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { ThemeProvider } from '../theme/theme-provider';\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.ReactNode {\n const { position = 'right', className, ...rest } = props;\n return (\n <Dialog.Portal>\n <ThemeProvider>\n <Dialog.Overlay className=\"DrawerOverlay\" />\n <Dialog.Content\n className={`DrawerContent ${position} ${className || ''}`}\n {...rest}\n />\n </ThemeProvider>\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 from 'react';\nimport { Theme } from '@radix-ui/themes';\n\ntype ThemeProps = React.ComponentProps<typeof Theme>;\n\ninterface ThemeProviderProps extends ThemeProps {\n children: React.ReactNode;\n}\n\nexport function ThemeProvider(props: ThemeProviderProps): React.ReactNode {\n return <Theme accentColor=\"iris\" radius=\"large\" {...props} />;\n}\n","import { Cross1Icon } from '@radix-ui/react-icons';\nimport type { ToastContainerProps } from 'react-toastify';\nimport { ToastContainer as ToastifyToastContainer } from 'react-toastify';\n\nexport { toast } from 'react-toastify';\n\nexport function ToastContainer(props: ToastContainerProps): React.ReactNode {\n return (\n <ToastifyToastContainer\n autoClose={5000}\n closeButton={<Cross1Icon />}\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,oBA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L,OAAO,EAAE,OAAO,mBAAmB;AAAA,gBAElC,eAAK;AAAA;AAAA,cAND,KAAK;AAAA,YAOZ;AAAA,UAEJ;AAAA,aAxB4B,GAyB9B;AAAA,MAEJ;AAAA;AAAA,EACF;AAEJ;","names":["import_themes","import_themes","RadixAvatar","import_themes","import_react","import_jsx_runtime","RadixBadge","import_themes","import_themes","import_themes","import_react","import_jsx_runtime","RadixButton","import_themes","import_themes","import_themes","import_react","import_jsx_runtime","RadixCheckbox","import_themes","import_themes","import_react","import_jsx_runtime","RadixCheckboxGroup","import_themes","import_themes","import_themes","import_react","import_themes","import_themes","import_themes","import_react","import_jsx_runtime","Heading","RadixHeading","import_jsx_runtime","ReactDatePicker","Heading","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_react","import_jsx_runtime","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_themes","import_react","import_jsx_runtime","RadixText","import_themes","import_themes","import_react","import_jsx_runtime","import_themes","import_react","import_jsx_runtime","import_jsx_runtime","import_react","import_jsx_runtime","Dialog","import_themes","import_jsx_runtime","import_jsx_runtime","import_react_icons","import_react_toastify","import_jsx_runtime","import_jsx_runtime"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Navigation
|
|
3
3
|
} from "../chunk-IBR5PQVX.js";
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
import "../chunk-2ANGYYEV.js";
|
|
5
|
+
import "../chunk-VY43KT3C.js";
|
|
6
|
+
import "../chunk-54NO6UR7.js";
|
|
6
7
|
import "../chunk-5H3YPCZK.js";
|
|
7
8
|
import "../chunk-FR2GDOU2.js";
|
|
8
9
|
import "../chunk-74DX4CU7.js";
|
|
@@ -22,7 +23,7 @@ import "../chunk-HYITAA4J.js";
|
|
|
22
23
|
import "../chunk-XQOL7UBI.js";
|
|
23
24
|
import "../chunk-TULWX7D6.js";
|
|
24
25
|
import "../chunk-XQOZWYUA.js";
|
|
25
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-NSZVLXRG.js";
|
|
26
27
|
import "../chunk-5AVBYDPB.js";
|
|
27
28
|
import "../chunk-365QMK4D.js";
|
|
28
29
|
import "../chunk-YO3BQW6S.js";
|
|
@@ -53,7 +54,7 @@ import "../chunk-B6XJN6EC.js";
|
|
|
53
54
|
import "../chunk-FYEASFUU.js";
|
|
54
55
|
import "../chunk-MIMJ7LON.js";
|
|
55
56
|
import "../chunk-IQEEPHOY.js";
|
|
56
|
-
import "../chunk-
|
|
57
|
+
import "../chunk-HUBPQ7ZR.js";
|
|
57
58
|
import "../chunk-J242TTFH.js";
|
|
58
59
|
import "../chunk-EAXUQEO5.js";
|
|
59
60
|
import "../chunk-CZEGRZBK.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tipp/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -66,7 +66,8 @@
|
|
|
66
66
|
"react": "^18.3.1",
|
|
67
67
|
"react-datepicker": "^7.3.0",
|
|
68
68
|
"react-dom": "^18.3.1",
|
|
69
|
-
"react-resize-detector": "^11.0.1"
|
|
69
|
+
"react-resize-detector": "^11.0.1",
|
|
70
|
+
"react-toastify": "^10.0.5"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
72
73
|
"@types/echarts": "^4.9.22",
|
|
@@ -84,8 +85,8 @@
|
|
|
84
85
|
"postcss-nesting": "12.0.2",
|
|
85
86
|
"tsup": "^8.0.2",
|
|
86
87
|
"typescript": "^5.3.3",
|
|
87
|
-
"@tipp/
|
|
88
|
-
"@tipp/
|
|
88
|
+
"@tipp/typescript-config": "0.0.4",
|
|
89
|
+
"@tipp/eslint-config": "0.2.3"
|
|
89
90
|
},
|
|
90
91
|
"scripts": {
|
|
91
92
|
"build": "pnpm run build:js & pnpm run build:css",
|
|
@@ -2,23 +2,175 @@ import type { ElementRef } from 'react';
|
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import type { DatePickerProps as ReactDatePickerProps } from 'react-datepicker';
|
|
4
4
|
import ReactDatePicker from 'react-datepicker';
|
|
5
|
+
import { IconButton } from '../icon-button';
|
|
6
|
+
import { Flex } from '../flex';
|
|
7
|
+
import { ChevronLeftIcon, ChevronRightIcon } from '../../icon';
|
|
8
|
+
import { Heading } from '../heading';
|
|
5
9
|
|
|
6
|
-
type DatePickerProps = ReactDatePickerProps
|
|
10
|
+
type DatePickerProps = ReactDatePickerProps & {
|
|
11
|
+
size?: 'small' | 'medium' | 'large';
|
|
12
|
+
};
|
|
7
13
|
type DatePickerRef = ElementRef<typeof ReactDatePicker>;
|
|
8
14
|
|
|
9
15
|
const DatePicker = forwardRef<DatePickerRef, DatePickerProps>(
|
|
10
16
|
(props: DatePickerProps, ref): React.ReactNode => {
|
|
17
|
+
const { size = 'medium', ...rest } = props;
|
|
18
|
+
|
|
11
19
|
return (
|
|
12
20
|
<ReactDatePicker
|
|
13
|
-
|
|
14
|
-
// calendarClassName="tipp_datepicker__calendar"
|
|
15
|
-
open
|
|
21
|
+
placeholderText="yyyy/mm/dd"
|
|
16
22
|
ref={ref}
|
|
17
|
-
|
|
23
|
+
showPopperArrow={false}
|
|
24
|
+
{...rest}
|
|
25
|
+
calendarClassName={`tipp_datePicker_calendar ${rest.calendarClassName || ''}`}
|
|
26
|
+
dateFormat="yyyy/MM/dd"
|
|
27
|
+
nextMonthButtonLabel="다음 달"
|
|
28
|
+
previousMonthButtonLabel="이전 달"
|
|
29
|
+
renderCustomHeader={renderCustomHeader}
|
|
30
|
+
wrapperClassName={`tipp_datePicker ${size} ${rest.wrapperClassName || ''}`}
|
|
18
31
|
/>
|
|
19
32
|
);
|
|
20
33
|
}
|
|
21
34
|
);
|
|
35
|
+
const renderCustomHeader: ReactDatePickerProps['renderCustomHeader'] = (
|
|
36
|
+
props
|
|
37
|
+
) => {
|
|
38
|
+
const {
|
|
39
|
+
date,
|
|
40
|
+
decreaseMonth,
|
|
41
|
+
increaseMonth,
|
|
42
|
+
prevMonthButtonDisabled,
|
|
43
|
+
nextMonthButtonDisabled,
|
|
44
|
+
} = props;
|
|
45
|
+
|
|
46
|
+
const year = date.getFullYear();
|
|
47
|
+
const month = date.getMonth();
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<Flex align="center" justify="between" pb="2" pl="2" pr="2">
|
|
51
|
+
<IconButton
|
|
52
|
+
disabled={prevMonthButtonDisabled}
|
|
53
|
+
onClick={decreaseMonth}
|
|
54
|
+
variant="ghost"
|
|
55
|
+
>
|
|
56
|
+
<ChevronLeftIcon />
|
|
57
|
+
</IconButton>
|
|
58
|
+
<Flex gap="3">
|
|
59
|
+
<Heading variant="subtitle1" weight="regular">
|
|
60
|
+
{year}년
|
|
61
|
+
</Heading>
|
|
62
|
+
<Heading variant="subtitle1" weight="regular">
|
|
63
|
+
{month + 1}월
|
|
64
|
+
</Heading>
|
|
65
|
+
</Flex>
|
|
66
|
+
|
|
67
|
+
<IconButton
|
|
68
|
+
disabled={nextMonthButtonDisabled}
|
|
69
|
+
onClick={increaseMonth}
|
|
70
|
+
variant="ghost"
|
|
71
|
+
>
|
|
72
|
+
<ChevronRightIcon />
|
|
73
|
+
</IconButton>
|
|
74
|
+
</Flex>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// const renderCustomHeader: ReactDatePickerProps['renderCustomHeader'] = (
|
|
79
|
+
// props
|
|
80
|
+
// ) => {
|
|
81
|
+
// const {
|
|
82
|
+
// date,
|
|
83
|
+
// decreaseMonth,
|
|
84
|
+
// increaseMonth,
|
|
85
|
+
// changeMonth,
|
|
86
|
+
// changeYear,
|
|
87
|
+
// prevMonthButtonDisabled,
|
|
88
|
+
// nextMonthButtonDisabled,
|
|
89
|
+
// } = props;
|
|
90
|
+
|
|
91
|
+
// const SelectTriggerProps: Select.TriggerProps = {
|
|
92
|
+
// variant: 'ghost',
|
|
93
|
+
// };
|
|
94
|
+
// const year = date.getFullYear();
|
|
95
|
+
// const month = date.getMonth();
|
|
96
|
+
|
|
97
|
+
// return (
|
|
98
|
+
// <Flex align="center" justify="between" pb="2" pl="2" pr="2">
|
|
99
|
+
// <IconButton
|
|
100
|
+
// disabled={prevMonthButtonDisabled}
|
|
101
|
+
// onClick={decreaseMonth}
|
|
102
|
+
// variant="ghost"
|
|
103
|
+
// >
|
|
104
|
+
// <ChevronLeftIcon />
|
|
105
|
+
// </IconButton>
|
|
106
|
+
// <Flex gap="3">
|
|
107
|
+
// <Select.Root
|
|
108
|
+
// onValueChange={(value) => {
|
|
109
|
+
// console.log({ value });
|
|
110
|
+
// changeYear(Number(value));
|
|
111
|
+
// }}
|
|
112
|
+
// value={year.toString()}
|
|
113
|
+
// >
|
|
114
|
+
// <Select.Trigger {...SelectTriggerProps}>
|
|
115
|
+
// <Heading variant="subtitle1" weight="regular">
|
|
116
|
+
// {year}년
|
|
117
|
+
// </Heading>
|
|
118
|
+
// </Select.Trigger>
|
|
119
|
+
// <Select.Content>
|
|
120
|
+
// {Array.from({ length: 5 })
|
|
121
|
+
// .map((_, i) => {
|
|
122
|
+
// const toYear = new Date().getFullYear();
|
|
123
|
+
// const v = toYear + i + 1;
|
|
124
|
+
// return (
|
|
125
|
+
// <Select.Item key={v} value={v.toString()}>
|
|
126
|
+
// {v}년
|
|
127
|
+
// </Select.Item>
|
|
128
|
+
// );
|
|
129
|
+
// })
|
|
130
|
+
// .reverse()}
|
|
131
|
+
|
|
132
|
+
// {Array.from({ length: 60 }).map((_, i) => {
|
|
133
|
+
// const toYear = new Date().getFullYear();
|
|
134
|
+
// const v = toYear - i;
|
|
135
|
+
// return (
|
|
136
|
+
// <Select.Item key={v} value={v.toString()}>
|
|
137
|
+
// {v}년
|
|
138
|
+
// </Select.Item>
|
|
139
|
+
// );
|
|
140
|
+
// })}
|
|
141
|
+
// </Select.Content>
|
|
142
|
+
// </Select.Root>
|
|
143
|
+
// <Select.Root
|
|
144
|
+
// onValueChange={(value) => {
|
|
145
|
+
// changeMonth(Number(value));
|
|
146
|
+
// }}
|
|
147
|
+
// value={month.toString()}
|
|
148
|
+
// >
|
|
149
|
+
// <Select.Trigger {...SelectTriggerProps}>
|
|
150
|
+
// <Heading variant="subtitle1" weight="regular">
|
|
151
|
+
// {month + 1}월
|
|
152
|
+
// </Heading>
|
|
153
|
+
// </Select.Trigger>
|
|
154
|
+
// <Select.Content>
|
|
155
|
+
// {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map((m) => (
|
|
156
|
+
// <Select.Item key={m} value={m.toString()}>
|
|
157
|
+
// {m + 1}월
|
|
158
|
+
// </Select.Item>
|
|
159
|
+
// ))}
|
|
160
|
+
// </Select.Content>
|
|
161
|
+
// </Select.Root>
|
|
162
|
+
// </Flex>
|
|
163
|
+
|
|
164
|
+
// <IconButton
|
|
165
|
+
// disabled={nextMonthButtonDisabled}
|
|
166
|
+
// onClick={increaseMonth}
|
|
167
|
+
// variant="ghost"
|
|
168
|
+
// >
|
|
169
|
+
// <ChevronRightIcon />
|
|
170
|
+
// </IconButton>
|
|
171
|
+
// </Flex>
|
|
172
|
+
// );
|
|
173
|
+
// };
|
|
22
174
|
|
|
23
175
|
DatePicker.displayName = 'DatePicker';
|
|
24
176
|
|
package/src/atoms/index.ts
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Cross1Icon } from '@radix-ui/react-icons';
|
|
2
|
+
import type { ToastContainerProps } from 'react-toastify';
|
|
3
|
+
import { ToastContainer as ToastifyToastContainer } from 'react-toastify';
|
|
4
|
+
|
|
5
|
+
export { toast } from 'react-toastify';
|
|
6
|
+
|
|
7
|
+
export function ToastContainer(props: ToastContainerProps): React.ReactNode {
|
|
8
|
+
return (
|
|
9
|
+
<ToastifyToastContainer
|
|
10
|
+
autoClose={5000}
|
|
11
|
+
closeButton={<Cross1Icon />}
|
|
12
|
+
closeOnClick
|
|
13
|
+
draggable
|
|
14
|
+
hideProgressBar
|
|
15
|
+
newestOnTop
|
|
16
|
+
pauseOnFocusLoss
|
|
17
|
+
pauseOnHover
|
|
18
|
+
position="bottom-right"
|
|
19
|
+
rtl={false}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
package/src/icon.ts
CHANGED
package/dist/chunk-3ZUBNWIB.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__objRest,
|
|
3
|
-
__spreadProps,
|
|
4
|
-
__spreadValues
|
|
5
|
-
} from "./chunk-N552FDTV.js";
|
|
6
|
-
|
|
7
|
-
// src/atoms/drawer.tsx
|
|
8
|
-
import * as Dialog from "@radix-ui/react-dialog";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
function Root2(props) {
|
|
11
|
-
return /* @__PURE__ */ jsx(Dialog.Root, __spreadValues({}, props));
|
|
12
|
-
}
|
|
13
|
-
function Content2(props) {
|
|
14
|
-
const _a = props, { position = "left", className } = _a, rest = __objRest(_a, ["position", "className"]);
|
|
15
|
-
return /* @__PURE__ */ jsxs(Dialog.Portal, { children: [
|
|
16
|
-
/* @__PURE__ */ jsx(Dialog.Overlay, { className: "DrawerOverlay" }),
|
|
17
|
-
/* @__PURE__ */ jsx(
|
|
18
|
-
Dialog.Content,
|
|
19
|
-
__spreadProps(__spreadValues({}, rest), {
|
|
20
|
-
className: `DrawerContent ${position} ${className || ""}`
|
|
21
|
-
})
|
|
22
|
-
)
|
|
23
|
-
] });
|
|
24
|
-
}
|
|
25
|
-
function Trigger2(props) {
|
|
26
|
-
return /* @__PURE__ */ jsx(Dialog.Trigger, __spreadValues({ asChild: true }, props));
|
|
27
|
-
}
|
|
28
|
-
var Drawer = {
|
|
29
|
-
Root: Dialog.Root,
|
|
30
|
-
Trigger: Trigger2,
|
|
31
|
-
Content: Content2,
|
|
32
|
-
Close: Dialog.Close,
|
|
33
|
-
Title: Dialog.Title,
|
|
34
|
-
Description: Dialog.Description
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export {
|
|
38
|
-
Root2 as Root,
|
|
39
|
-
Content2 as Content,
|
|
40
|
-
Trigger2 as Trigger,
|
|
41
|
-
Drawer
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=chunk-3ZUBNWIB.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/atoms/drawer.tsx"],"sourcesContent":["import React 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.ReactNode {\n const { position = 'left', className, ...rest } = props;\n return (\n <Dialog.Portal>\n <Dialog.Overlay className=\"DrawerOverlay\" />\n <Dialog.Content\n {...rest}\n className={`DrawerContent ${position} ${className || ''}`}\n />\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":";;;;;;;AACA,YAAY,YAAY;AAGf,cAWL,YAXK;AADF,SAASA,MAAK,OAA4C;AAC/D,SAAO,oBAAQ,aAAP,mBAAgB,MAAO;AACjC;AAOO,SAASC,SAAQ,OAAsC;AAC5D,QAAkD,YAA1C,aAAW,QAAQ,UAb7B,IAaoD,IAAT,iBAAS,IAAT,CAAjC,YAAmB;AAC3B,SACE,qBAAQ,eAAP,EACC;AAAA,wBAAQ,gBAAP,EAAe,WAAU,iBAAgB;AAAA,IAC1C;AAAA,MAAQ;AAAA,MAAP,iCACK,OADL;AAAA,QAEC,WAAW,iBAAiB,QAAQ,IAAI,aAAa,EAAE;AAAA;AAAA,IACzD;AAAA,KACF;AAEJ;AAEO,SAASC,SAAQ,OAAmD;AACzE,SAAO,oBAAQ,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":["Root","Content","Trigger"]}
|
package/dist/chunk-7FECZT7I.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ThemeProvider
|
|
3
|
-
} from "./chunk-PL3Q4UVY.js";
|
|
4
|
-
import {
|
|
5
|
-
__objRest,
|
|
6
|
-
__spreadValues
|
|
7
|
-
} from "./chunk-N552FDTV.js";
|
|
8
|
-
|
|
9
|
-
// src/atoms/drawer.tsx
|
|
10
|
-
import * as Dialog from "@radix-ui/react-dialog";
|
|
11
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
function Root2(props) {
|
|
13
|
-
return /* @__PURE__ */ jsx(Dialog.Root, __spreadValues({}, props));
|
|
14
|
-
}
|
|
15
|
-
function Content2(props) {
|
|
16
|
-
const _a = props, { position = "left", className } = _a, rest = __objRest(_a, ["position", "className"]);
|
|
17
|
-
return /* @__PURE__ */ jsx(Dialog.Portal, { children: /* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
18
|
-
/* @__PURE__ */ jsx(Dialog.Overlay, { className: "DrawerOverlay" }),
|
|
19
|
-
/* @__PURE__ */ jsx(
|
|
20
|
-
Dialog.Content,
|
|
21
|
-
__spreadValues({
|
|
22
|
-
className: `DrawerContent ${position} ${className || ""}`
|
|
23
|
-
}, rest)
|
|
24
|
-
)
|
|
25
|
-
] }) });
|
|
26
|
-
}
|
|
27
|
-
function Trigger2(props) {
|
|
28
|
-
return /* @__PURE__ */ jsx(Dialog.Trigger, __spreadValues({ asChild: true }, props));
|
|
29
|
-
}
|
|
30
|
-
var Drawer = {
|
|
31
|
-
Root: Dialog.Root,
|
|
32
|
-
Trigger: Trigger2,
|
|
33
|
-
Content: Content2,
|
|
34
|
-
Close: Dialog.Close,
|
|
35
|
-
Title: Dialog.Title,
|
|
36
|
-
Description: Dialog.Description
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export {
|
|
40
|
-
Root2 as Root,
|
|
41
|
-
Content2 as Content,
|
|
42
|
-
Trigger2 as Trigger,
|
|
43
|
-
Drawer
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=chunk-7FECZT7I.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/atoms/drawer.tsx"],"sourcesContent":["import React from 'react';\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { ThemeProvider } from '../theme/theme-provider';\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.ReactNode {\n const { position = 'left', className, ...rest } = props;\n return (\n <Dialog.Portal>\n <ThemeProvider>\n <Dialog.Overlay className=\"DrawerOverlay\" />\n <Dialog.Content\n className={`DrawerContent ${position} ${className || ''}`}\n {...rest}\n />\n </ThemeProvider>\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":";;;;;;;;;AACA,YAAY,YAAY;AAIf,cAYH,YAZG;AADF,SAASA,MAAK,OAA4C;AAC/D,SAAO,oBAAQ,aAAP,mBAAgB,MAAO;AACjC;AAOO,SAASC,SAAQ,OAAsC;AAC5D,QAAkD,YAA1C,aAAW,QAAQ,UAd7B,IAcoD,IAAT,iBAAS,IAAT,CAAjC,YAAmB;AAC3B,SACE,oBAAQ,eAAP,EACC,+BAAC,iBACC;AAAA,wBAAQ,gBAAP,EAAe,WAAU,iBAAgB;AAAA,IAC1C;AAAA,MAAQ;AAAA,MAAP;AAAA,QACC,WAAW,iBAAiB,QAAQ,IAAI,aAAa,EAAE;AAAA,SACnD;AAAA,IACN;AAAA,KACF,GACF;AAEJ;AAEO,SAASC,SAAQ,OAAmD;AACzE,SAAO,oBAAQ,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":["Root","Content","Trigger"]}
|
package/dist/chunk-7WNX674B.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__objRest,
|
|
3
|
-
__spreadValues
|
|
4
|
-
} from "./chunk-N552FDTV.js";
|
|
5
|
-
|
|
6
|
-
// src/atoms/drawer.tsx
|
|
7
|
-
import * as Dialog from "@radix-ui/react-dialog";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
function Root2(props) {
|
|
10
|
-
return /* @__PURE__ */ jsx(Dialog.Root, __spreadValues({}, props));
|
|
11
|
-
}
|
|
12
|
-
function Content2(props) {
|
|
13
|
-
const _a = props, { position = "left", className } = _a, rest = __objRest(_a, ["position", "className"]);
|
|
14
|
-
return /* @__PURE__ */ jsxs(Dialog.Portal, { children: [
|
|
15
|
-
/* @__PURE__ */ jsx(Dialog.Overlay, { className: "DrawerOverlay" }),
|
|
16
|
-
/* @__PURE__ */ jsx(
|
|
17
|
-
Dialog.Content,
|
|
18
|
-
__spreadValues({
|
|
19
|
-
className: `DrawerContent ${position} ${className || ""}`
|
|
20
|
-
}, rest)
|
|
21
|
-
)
|
|
22
|
-
] });
|
|
23
|
-
}
|
|
24
|
-
function Trigger2(props) {
|
|
25
|
-
return /* @__PURE__ */ jsx(Dialog.Trigger, __spreadValues({ asChild: true }, props));
|
|
26
|
-
}
|
|
27
|
-
var Drawer = {
|
|
28
|
-
Root: Dialog.Root,
|
|
29
|
-
Trigger: Trigger2,
|
|
30
|
-
Content: Content2,
|
|
31
|
-
Close: Dialog.Close,
|
|
32
|
-
Title: Dialog.Title,
|
|
33
|
-
Description: Dialog.Description
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export {
|
|
37
|
-
Root2 as Root,
|
|
38
|
-
Content2 as Content,
|
|
39
|
-
Trigger2 as Trigger,
|
|
40
|
-
Drawer
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=chunk-7WNX674B.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/atoms/drawer.tsx"],"sourcesContent":["import React 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.ReactNode {\n const { position = 'left', className, ...rest } = props;\n return (\n <Dialog.Portal>\n <Dialog.Overlay className=\"DrawerOverlay\" />\n <Dialog.Content\n className={`DrawerContent ${position} ${className || ''}`}\n {...rest}\n />\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":";;;;;;AACA,YAAY,YAAY;AAGf,cAWL,YAXK;AADF,SAASA,MAAK,OAA4C;AAC/D,SAAO,oBAAQ,aAAP,mBAAgB,MAAO;AACjC;AAOO,SAASC,SAAQ,OAAsC;AAC5D,QAAkD,YAA1C,aAAW,QAAQ,UAb7B,IAaoD,IAAT,iBAAS,IAAT,CAAjC,YAAmB;AAC3B,SACE,qBAAQ,eAAP,EACC;AAAA,wBAAQ,gBAAP,EAAe,WAAU,iBAAgB;AAAA,IAC1C;AAAA,MAAQ;AAAA,MAAP;AAAA,QACC,WAAW,iBAAiB,QAAQ,IAAI,aAAa,EAAE;AAAA,SACnD;AAAA,IACN;AAAA,KACF;AAEJ;AAEO,SAASC,SAAQ,OAAmD;AACzE,SAAO,oBAAQ,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":["Root","Content","Trigger"]}
|