@mindlogic-ai/logician-ui 2.0.0-alpha.0
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/LICENSE +21 -0
- package/README.md +234 -0
- package/USAGE.md +299 -0
- package/dist/Markdown-2D5K42BY.js +16 -0
- package/dist/Markdown-2D5K42BY.js.map +1 -0
- package/dist/Markdown-AZBXO5ZP.css +29 -0
- package/dist/Markdown-AZBXO5ZP.css.map +1 -0
- package/dist/Markdown-RJJEQN4R.mjs +3 -0
- package/dist/Markdown-RJJEQN4R.mjs.map +1 -0
- package/dist/analytics-GNSHP7X3.svg +1 -0
- package/dist/bulb-24SQINQB.svg +1 -0
- package/dist/chat-TLRFEUAS.svg +1 -0
- package/dist/chunk-5FHXD7KR.js +1735 -0
- package/dist/chunk-5FHXD7KR.js.map +1 -0
- package/dist/chunk-WSOHBA2C.mjs +1693 -0
- package/dist/chunk-WSOHBA2C.mjs.map +1 -0
- package/dist/edit-RWL72JNM.svg +1 -0
- package/dist/face-55KPDCH4.svg +1 -0
- package/dist/filled-analytics-RBC7KWND.svg +1 -0
- package/dist/filled-bulb-RC7E2WSM.svg +1 -0
- package/dist/filled-chat-A6J44Q7A.svg +1 -0
- package/dist/filled-edit-NKKWFSTW.svg +1 -0
- package/dist/filled-face-UML5C3LB.svg +1 -0
- package/dist/filled-layout-HBVCSDFO.svg +1 -0
- package/dist/index.css +51 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +964 -0
- package/dist/index.d.ts +964 -0
- package/dist/index.js +5600 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +5401 -0
- package/dist/index.mjs.map +1 -0
- package/dist/language-VBJ24OPV.svg +1 -0
- package/dist/layout-NDDSWNNV.svg +1 -0
- package/dist/pending-NF7NSBYO.svg +1 -0
- package/dist/receipt-MNLQIFCO.svg +1 -0
- package/dist/sparkles-EOEGVL6G.svg +1 -0
- package/dist/store-3RQPBJWG.svg +1 -0
- package/dist/store_active-SAOAGVKC.svg +1 -0
- package/dist/studio-LYPUIEFA.svg +1 -0
- package/dist/studio_active-BC6O66OI.svg +1 -0
- package/dist/vertical-ellipsis-3G4WEOCW.svg +1 -0
- package/package.json +138 -0
- package/src/components/Accordion/Accordion.stories.tsx +41 -0
- package/src/components/Accordion/Accordion.tsx +14 -0
- package/src/components/Accordion/AccordionButton.tsx +40 -0
- package/src/components/Accordion/AccordionItem.tsx +17 -0
- package/src/components/Accordion/index.ts +4 -0
- package/src/components/Alert/Alert.stories.tsx +38 -0
- package/src/components/Alert/Alert.styles.ts +19 -0
- package/src/components/Alert/Alert.tsx +41 -0
- package/src/components/Alert/Alert.types.ts +5 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/AutowidthInput/AutowidthInput.stories.tsx +23 -0
- package/src/components/AutowidthInput/AutowidthInput.tsx +47 -0
- package/src/components/AutowidthInput/index.ts +1 -0
- package/src/components/Avatar/Avatar.stories.tsx +23 -0
- package/src/components/Avatar/Avatar.tsx +19 -0
- package/src/components/Avatar/index.tsx +1 -0
- package/src/components/Badge/Badge.stories.tsx +23 -0
- package/src/components/Badge/Badge.styles.ts +11 -0
- package/src/components/Badge/Badge.tsx +26 -0
- package/src/components/Badge/index.ts +2 -0
- package/src/components/Banner/Banner.stories.tsx +37 -0
- package/src/components/Banner/Banner.styles.ts +79 -0
- package/src/components/Banner/Banner.tsx +68 -0
- package/src/components/Banner/Banner.types.ts +6 -0
- package/src/components/Banner/index.ts +2 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +14 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +19 -0
- package/src/components/Breadcrumb/Breadcrumb.types.ts +3 -0
- package/src/components/Breadcrumb/BreadcrumbItem/BreadcrumbItem.tsx +12 -0
- package/src/components/Breadcrumb/BreadcrumbItem/BreadcrumbItem.types.ts +3 -0
- package/src/components/Breadcrumb/BreadcrumbItem/index.ts +2 -0
- package/src/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.tsx +30 -0
- package/src/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.types.ts +3 -0
- package/src/components/Breadcrumb/BreadcrumbLink/index.ts +2 -0
- package/src/components/Breadcrumb/index.ts +3 -0
- package/src/components/Button/Button.stories.tsx +52 -0
- package/src/components/Button/Button.styles.ts +59 -0
- package/src/components/Button/Button.tsx +43 -0
- package/src/components/Button/Button.types.ts +13 -0
- package/src/components/Button/index.tsx +3 -0
- package/src/components/Card/Card.stories.tsx +24 -0
- package/src/components/Card/Card.styles.ts +30 -0
- package/src/components/Card/Card.tsx +29 -0
- package/src/components/Card/Card.types.ts +8 -0
- package/src/components/Card/index.ts +2 -0
- package/src/components/Carousel/Carousel.stories.tsx +159 -0
- package/src/components/Carousel/Carousel.tsx +160 -0
- package/src/components/Carousel/Carousel.types.ts +22 -0
- package/src/components/Carousel/index.ts +1 -0
- package/src/components/CarouselModal/CarouselModal.stories.tsx +53 -0
- package/src/components/CarouselModal/CarouselModal.tsx +106 -0
- package/src/components/CarouselModal/CarouselModal.types.ts +16 -0
- package/src/components/CarouselModal/index.ts +2 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +16 -0
- package/src/components/Checkbox/Checkbox.tsx +29 -0
- package/src/components/Checkbox/Checkbox.types.ts +3 -0
- package/src/components/Checkbox/index.ts +2 -0
- package/src/components/Chip/Chip.stories.tsx +44 -0
- package/src/components/Chip/Chip.styles.ts +114 -0
- package/src/components/Chip/Chip.tsx +23 -0
- package/src/components/Chip/Chip.types.ts +14 -0
- package/src/components/Chip/index.ts +2 -0
- package/src/components/ChipButton/Chip.types.ts +4 -0
- package/src/components/ChipButton/ChipButton.tsx +25 -0
- package/src/components/ChipButton/index.ts +1 -0
- package/src/components/Code/Code.stories.tsx +28 -0
- package/src/components/Code/Code.tsx +160 -0
- package/src/components/Code/Code.types.ts +40 -0
- package/src/components/Code/_components/CopyButton.tsx +48 -0
- package/src/components/Code/index.ts +1 -0
- package/src/components/CodeTabs/CodeTabs.stories.tsx +51 -0
- package/src/components/CodeTabs/CodeTabs.tsx +98 -0
- package/src/components/CodeTabs/CodeTabs.types.ts +17 -0
- package/src/components/CodeTabs/index.ts +1 -0
- package/src/components/Container/Container.stories.tsx +28 -0
- package/src/components/Container/Container.tsx +21 -0
- package/src/components/Container/index.ts +1 -0
- package/src/components/Container/useContainerSize.ts +47 -0
- package/src/components/CopyableCode/CopyableCode.stories.tsx +26 -0
- package/src/components/CopyableCode/CopyableCode.tsx +58 -0
- package/src/components/CopyableCode/CopyableCode.types.ts +7 -0
- package/src/components/CopyableCode/index.ts +2 -0
- package/src/components/CrossPageToasts/CrossPageToasts.tsx +33 -0
- package/src/components/CrossPageToasts/index.ts +1 -0
- package/src/components/DataField/DataField.stories.tsx +61 -0
- package/src/components/DataField/DataField.styles.ts +33 -0
- package/src/components/DataField/DataField.tsx +141 -0
- package/src/components/DataField/DataField.types.ts +18 -0
- package/src/components/DataField/index.ts +1 -0
- package/src/components/DatePicker/RangeDatePicker.stories.tsx +45 -0
- package/src/components/DatePicker/RangeDatePicker.tsx +74 -0
- package/src/components/DatePicker/SingleDatePicker.stories.tsx +31 -0
- package/src/components/DatePicker/SingleDatePicker.tsx +72 -0
- package/src/components/DatePicker/index.ts +2 -0
- package/src/components/FileInput/FileInput.stories.tsx +28 -0
- package/src/components/FileInput/FileInput.tsx +117 -0
- package/src/components/FileInput/FileInput.types.ts +14 -0
- package/src/components/FileInput/index.ts +2 -0
- package/src/components/FileItem/FileItem.stories.tsx +27 -0
- package/src/components/FileItem/FileItem.tsx +134 -0
- package/src/components/FileItem/FileItem.types.ts +11 -0
- package/src/components/FileItem/index.ts +1 -0
- package/src/components/FileList/FileList.stories.tsx +65 -0
- package/src/components/FileList/FileList.tsx +97 -0
- package/src/components/FileList/FileList.types.ts +18 -0
- package/src/components/FileList/index.tsx +1 -0
- package/src/components/FormControl/FormControl.stories.tsx +16 -0
- package/src/components/FormControl/FormControl.tsx +12 -0
- package/src/components/FormControl/FormControl.types.ts +3 -0
- package/src/components/FormControl/index.ts +2 -0
- package/src/components/FormLabel/FormLabel.tsx +5 -0
- package/src/components/FormLabel/index.ts +1 -0
- package/src/components/GuideCue/GuideCue.stories.tsx +57 -0
- package/src/components/GuideCue/GuideCue.tsx +231 -0
- package/src/components/GuideCue/GuideCueContext.tsx +70 -0
- package/src/components/GuideCue/index.ts +2 -0
- package/src/components/Icon/Icon.stories.tsx +77 -0
- package/src/components/Icon/Icon.styles.ts +6 -0
- package/src/components/Icon/Icon.tsx +73 -0
- package/src/components/Icon/Icon.types.ts +10 -0
- package/src/components/Icon/IconMap.ts +290 -0
- package/src/components/Icon/icons/analytics.svg +1 -0
- package/src/components/Icon/icons/bulb.svg +1 -0
- package/src/components/Icon/icons/chat.svg +1 -0
- package/src/components/Icon/icons/edit.svg +1 -0
- package/src/components/Icon/icons/face.svg +1 -0
- package/src/components/Icon/icons/filled-analytics.svg +1 -0
- package/src/components/Icon/icons/filled-bulb.svg +1 -0
- package/src/components/Icon/icons/filled-chat.svg +1 -0
- package/src/components/Icon/icons/filled-edit.svg +1 -0
- package/src/components/Icon/icons/filled-face.svg +1 -0
- package/src/components/Icon/icons/filled-layout.svg +1 -0
- package/src/components/Icon/icons/language.svg +1 -0
- package/src/components/Icon/icons/layout.svg +1 -0
- package/src/components/Icon/icons/pending.svg +1 -0
- package/src/components/Icon/icons/receipt.svg +1 -0
- package/src/components/Icon/icons/sparkles.svg +1 -0
- package/src/components/Icon/icons/store.svg +1 -0
- package/src/components/Icon/icons/store_active.svg +1 -0
- package/src/components/Icon/icons/studio.svg +1 -0
- package/src/components/Icon/icons/studio_active.svg +1 -0
- package/src/components/Icon/icons/vertical-ellipsis.svg +1 -0
- package/src/components/Icon/index.tsx +3 -0
- package/src/components/IconButton/IconButton.stories.tsx +51 -0
- package/src/components/IconButton/IconButton.styles.ts +52 -0
- package/src/components/IconButton/IconButton.tsx +36 -0
- package/src/components/IconButton/IconButton.types.ts +12 -0
- package/src/components/IconButton/index.tsx +1 -0
- package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +25 -0
- package/src/components/InfoSprinkle/InfoSprinkle.tsx +48 -0
- package/src/components/InfoSprinkle/index.ts +1 -0
- package/src/components/InlineCode/InlineCode.tsx +18 -0
- package/src/components/InlineCode/index.ts +1 -0
- package/src/components/Input/Input.stories.tsx +55 -0
- package/src/components/Input/Input.tsx +358 -0
- package/src/components/Input/Input.types.ts +19 -0
- package/src/components/Input/index.tsx +2 -0
- package/src/components/LineGraph/LineGraph.stories.tsx +98 -0
- package/src/components/LineGraph/LineGraph.tsx +88 -0
- package/src/components/LineGraph/LineGraph.types.ts +41 -0
- package/src/components/LineGraph/index.ts +1 -0
- package/src/components/Link/Link.styles.ts +13 -0
- package/src/components/Link/Link.tsx +93 -0
- package/src/components/Link/index.ts +1 -0
- package/src/components/Loaders/PageLoader.stories.tsx +29 -0
- package/src/components/Loaders/PageLoader.tsx +30 -0
- package/src/components/Loaders/SectionLoader.stories.tsx +26 -0
- package/src/components/Loaders/SectionLoader.tsx +30 -0
- package/src/components/Loaders/index.ts +1 -0
- package/src/components/MDXEditor/MDXEditor.css +21 -0
- package/src/components/MDXEditor/MDXEditor.stories.tsx +45 -0
- package/src/components/MDXEditor/MDXEditor.tsx +189 -0
- package/src/components/MDXEditor/MDXEditor.types.ts +6 -0
- package/src/components/MDXEditor/index.ts +1 -0
- package/src/components/Markdown/Markdown.module.css +30 -0
- package/src/components/Markdown/Markdown.tsx +133 -0
- package/src/components/Markdown/Markdown.types.ts +5 -0
- package/src/components/Markdown/index.ts +2 -0
- package/src/components/Masonry/Masonry.stories.tsx +288 -0
- package/src/components/Masonry/Masonry.tsx +187 -0
- package/src/components/Masonry/Masonry.types.ts +18 -0
- package/src/components/Masonry/index.ts +2 -0
- package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +26 -0
- package/src/components/MaxLengthIndicator/MaxLengthIndicator.tsx +25 -0
- package/src/components/MaxLengthIndicator/index.tsx +1 -0
- package/src/components/Menu/Menu.stories.tsx +186 -0
- package/src/components/Menu/MenuButton.tsx +8 -0
- package/src/components/Menu/MenuButton.types.ts +23 -0
- package/src/components/Menu/MenuItem.tsx +35 -0
- package/src/components/Menu/MenuItem.types.ts +13 -0
- package/src/components/Menu/MenuList.tsx +19 -0
- package/src/components/Menu/index.ts +7 -0
- package/src/components/Modal/Modal.stories.tsx +83 -0
- package/src/components/Modal/Modal.styles.ts +14 -0
- package/src/components/Modal/Modal.tsx +14 -0
- package/src/components/Modal/Modal.types.ts +3 -0
- package/src/components/Modal/ModalBody.tsx +9 -0
- package/src/components/Modal/ModalCloseButton.tsx +18 -0
- package/src/components/Modal/ModalContent/ModalContent.tsx +8 -0
- package/src/components/Modal/ModalContent/ModalContent.types.ts +3 -0
- package/src/components/Modal/ModalContent/index.ts +1 -0
- package/src/components/Modal/ModalFooter/ModalFooter.module.css +3 -0
- package/src/components/Modal/ModalFooter/ModalFooter.tsx +20 -0
- package/src/components/Modal/ModalFooter/index.ts +1 -0
- package/src/components/Modal/ModalHeader.tsx +9 -0
- package/src/components/Modal/ModalOverlay.tsx +9 -0
- package/src/components/Modal/index.tsx +8 -0
- package/src/components/MonthRangePicker/MonthButton/MonthButton.tsx +105 -0
- package/src/components/MonthRangePicker/MonthButton/MonthButton.types.ts +42 -0
- package/src/components/MonthRangePicker/MonthButton/index.ts +2 -0
- package/src/components/MonthRangePicker/MonthRangePicker.stories.tsx +164 -0
- package/src/components/MonthRangePicker/MonthRangePicker.tsx +274 -0
- package/src/components/MonthRangePicker/MonthRangePicker.types.ts +38 -0
- package/src/components/MonthRangePicker/_utils/hasEnabledMonthsInYear.ts +15 -0
- package/src/components/MonthRangePicker/_utils/index.ts +6 -0
- package/src/components/MonthRangePicker/_utils/isMonthDisabled.ts +20 -0
- package/src/components/MonthRangePicker/_utils/isMonthInPreviewRange.ts +32 -0
- package/src/components/MonthRangePicker/_utils/isMonthInRange.ts +17 -0
- package/src/components/MonthRangePicker/_utils/isMonthSelected.ts +19 -0
- package/src/components/MonthRangePicker/_utils/isSelectionStart.ts +12 -0
- package/src/components/MonthRangePicker/constants.ts +63 -0
- package/src/components/MonthRangePicker/index.ts +2 -0
- package/src/components/Pagination/Pagination.stories.tsx +51 -0
- package/src/components/Pagination/Pagination.tsx +150 -0
- package/src/components/Pagination/Pagination.types.ts +12 -0
- package/src/components/Pagination/index.tsx +1 -0
- package/src/components/PasswordInput/PasswordInput.stories.tsx +16 -0
- package/src/components/PasswordInput/PasswordInput.tsx +42 -0
- package/src/components/PasswordInput/PasswordInput.types.ts +11 -0
- package/src/components/PasswordInput/index.ts +1 -0
- package/src/components/PinInput/PinInput.stories.tsx +26 -0
- package/src/components/PinInput/PinInput.tsx +53 -0
- package/src/components/PinInput/PinInput.types.ts +27 -0
- package/src/components/PinInput/index.tsx +2 -0
- package/src/components/ProgressBar/ProgressBar.stories.tsx +18 -0
- package/src/components/ProgressBar/ProgressBar.styles.ts +4 -0
- package/src/components/ProgressBar/ProgressBar.tsx +27 -0
- package/src/components/ProgressBar/ProgressBar.types.ts +4 -0
- package/src/components/ProgressBar/index.ts +1 -0
- package/src/components/RadialProgress/RadialProgress.stories.tsx +272 -0
- package/src/components/RadialProgress/RadialProgress.tsx +232 -0
- package/src/components/RadialProgress/RadialProgress.types.ts +27 -0
- package/src/components/RadialProgress/index.ts +2 -0
- package/src/components/Radio/Radio.stories.tsx +226 -0
- package/src/components/Radio/Radio.tsx +35 -0
- package/src/components/Radio/Radio.types.ts +21 -0
- package/src/components/Radio/RadioGroup.tsx +26 -0
- package/src/components/Radio/index.ts +3 -0
- package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +48 -0
- package/src/components/SeeMoreButton/SeeMoreButton.styles.ts +11 -0
- package/src/components/SeeMoreButton/SeeMoreButton.tsx +34 -0
- package/src/components/SeeMoreButton/SeeMoreButton.types.ts +6 -0
- package/src/components/SeeMoreButton/index.tsx +1 -0
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +96 -0
- package/src/components/SegmentedControl/SegmentedControl.styles.ts +28 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +89 -0
- package/src/components/SegmentedControl/SegmentedControl.types.ts +15 -0
- package/src/components/SegmentedControl/index.ts +2 -0
- package/src/components/SegmentedProgressBar/ProgressSegment.tsx +18 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +228 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.tsx +25 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +11 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBarContext.tsx +24 -0
- package/src/components/SegmentedProgressBar/index.ts +3 -0
- package/src/components/Select/MenuList/MenuList.tsx +87 -0
- package/src/components/Select/MenuList/MenuList.types.ts +21 -0
- package/src/components/Select/MenuList/VirtualizedMenuList.tsx +140 -0
- package/src/components/Select/MenuList/VirtualizedMenuListContext.tsx +35 -0
- package/src/components/Select/MenuList/index.ts +3 -0
- package/src/components/Select/Select.stories.tsx +70 -0
- package/src/components/Select/Select.styles.ts +102 -0
- package/src/components/Select/Select.tsx +204 -0
- package/src/components/Select/Select.types.ts +18 -0
- package/src/components/Select/_utils/resolveStyle.ts +21 -0
- package/src/components/Select/index.ts +1 -0
- package/src/components/Slider/Slider.stories.tsx +75 -0
- package/src/components/Slider/Slider.tsx +12 -0
- package/src/components/Slider/Slider.types.ts +3 -0
- package/src/components/Slider/SliderFilledTrack/SliderFilledTrack.tsx +14 -0
- package/src/components/Slider/SliderFilledTrack/SliderFilledTrack.types.ts +3 -0
- package/src/components/Slider/SliderFilledTrack/index.ts +2 -0
- package/src/components/Slider/SliderMark/SliderMark.tsx +12 -0
- package/src/components/Slider/SliderMark/SliderMark.types.ts +3 -0
- package/src/components/Slider/SliderMark/index.ts +2 -0
- package/src/components/Slider/SliderThumb/SliderThumb.tsx +22 -0
- package/src/components/Slider/SliderThumb/SliderThumb.types.ts +3 -0
- package/src/components/Slider/SliderThumb/index.ts +2 -0
- package/src/components/Slider/SliderTrack/SliderTrack.tsx +12 -0
- package/src/components/Slider/SliderTrack/SliderTrack.types.ts +3 -0
- package/src/components/Slider/SliderTrack/index.ts +2 -0
- package/src/components/Slider/index.ts +5 -0
- package/src/components/Spinner/Spinner.stories.tsx +16 -0
- package/src/components/Spinner/Spinner.tsx +20 -0
- package/src/components/Spinner/Spinner.types.ts +3 -0
- package/src/components/Spinner/index.ts +2 -0
- package/src/components/Switch/Switch.stories.tsx +63 -0
- package/src/components/Switch/Switch.tsx +8 -0
- package/src/components/Switch/index.ts +1 -0
- package/src/components/Table/ExpandingTr/ExpandingTr.tsx +31 -0
- package/src/components/Table/ExpandingTr/ExpandingTr.types.ts +9 -0
- package/src/components/Table/ExpandingTr/index.ts +2 -0
- package/src/components/Table/Table.stories.tsx +326 -0
- package/src/components/Table/Table.styles.ts +48 -0
- package/src/components/Table/Table.tsx +9 -0
- package/src/components/Table/Table.types.ts +16 -0
- package/src/components/Table/TableContainer.tsx +55 -0
- package/src/components/Table/TableContext.tsx +187 -0
- package/src/components/Table/Tbody.tsx +12 -0
- package/src/components/Table/Td.tsx +138 -0
- package/src/components/Table/Th.tsx +154 -0
- package/src/components/Table/Thead.tsx +5 -0
- package/src/components/Table/Tr.tsx +5 -0
- package/src/components/Table/index.tsx +8 -0
- package/src/components/Tabs/Tab/Tab.styles.ts +35 -0
- package/src/components/Tabs/Tab/Tab.tsx +67 -0
- package/src/components/Tabs/Tab/index.ts +1 -0
- package/src/components/Tabs/TabList/TabList.styles.ts +11 -0
- package/src/components/Tabs/TabList/TabList.tsx +19 -0
- package/src/components/Tabs/TabList/index.ts +1 -0
- package/src/components/Tabs/TabPanel.tsx +5 -0
- package/src/components/Tabs/TabPanels.tsx +5 -0
- package/src/components/Tabs/Tabs.stories.tsx +45 -0
- package/src/components/Tabs/Tabs.tsx +65 -0
- package/src/components/Tabs/Tabs.types.ts +19 -0
- package/src/components/Tabs/TabsContext.tsx +162 -0
- package/src/components/Tabs/index.tsx +5 -0
- package/src/components/Tag/Tag.stories.tsx +28 -0
- package/src/components/Tag/Tag.styles.ts +12 -0
- package/src/components/Tag/Tag.tsx +23 -0
- package/src/components/Tag/Tag.types.ts +5 -0
- package/src/components/Tag/TagCloseButton/TagCloseButton.tsx +12 -0
- package/src/components/Tag/TagCloseButton/TagCloseButton.types.ts +3 -0
- package/src/components/Tag/TagCloseButton/index.ts +2 -0
- package/src/components/Tag/TagLabel/TagLabel.tsx +12 -0
- package/src/components/Tag/TagLabel/TagLabel.types.ts +3 -0
- package/src/components/Tag/TagLabel/index.ts +2 -0
- package/src/components/Tag/TagLeftIcon/TagLeftIcon.tsx +12 -0
- package/src/components/Tag/TagLeftIcon/TagLeftIcon.types.ts +3 -0
- package/src/components/Tag/TagLeftIcon/index.ts +2 -0
- package/src/components/Tag/TagRightIcon/TagRightIcon.tsx +12 -0
- package/src/components/Tag/TagRightIcon/TagRightIcon.types.ts +3 -0
- package/src/components/Tag/TagRightIcon/index.ts +2 -0
- package/src/components/Tag/index.ts +5 -0
- package/src/components/Textarea/Textarea.tsx +56 -0
- package/src/components/Textarea/adjustHeight.tsx +9 -0
- package/src/components/Textarea/index.ts +1 -0
- package/src/components/Toast/Toast.stories.tsx +49 -0
- package/src/components/Toast/Toast.styles.ts +19 -0
- package/src/components/Toast/Toast.tsx +38 -0
- package/src/components/Toast/Toast.types.ts +22 -0
- package/src/components/Toast/ToastIcon/ToastIcon.tsx +26 -0
- package/src/components/Toast/ToastIcon/index.ts +0 -0
- package/src/components/Toast/index.ts +2 -0
- package/src/components/Toast/useToast.tsx +65 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +97 -0
- package/src/components/Tooltip/Tooltip.tsx +22 -0
- package/src/components/Tooltip/Tooltip.types.ts +3 -0
- package/src/components/Tooltip/index.ts +2 -0
- package/src/components/Typography/H1.tsx +17 -0
- package/src/components/Typography/H2.tsx +17 -0
- package/src/components/Typography/H3.tsx +17 -0
- package/src/components/Typography/H4.tsx +17 -0
- package/src/components/Typography/H5.tsx +17 -0
- package/src/components/Typography/Link.tsx +49 -0
- package/src/components/Typography/Subtext.tsx +17 -0
- package/src/components/Typography/Subtitle.tsx +18 -0
- package/src/components/Typography/Text.tsx +22 -0
- package/src/components/Typography/Typography.stories.tsx +54 -0
- package/src/components/Typography/Typography.types.ts +3 -0
- package/src/components/Typography/index.ts +26 -0
- package/src/components/UrlInput/UrlInput.stories.tsx +66 -0
- package/src/components/UrlInput/UrlInput.tsx +47 -0
- package/src/components/UrlInput/index.tsx +1 -0
- package/src/hooks/useLocale.ts +11 -0
- package/src/hooks/useTranslate.ts +57 -0
- package/src/index.ts +96 -0
- package/src/theme/Palette.stories.tsx +171 -0
- package/src/theme/colors.ts +64 -0
- package/src/theme/font.ts +23 -0
- package/src/theme/global.ts +30 -0
- package/src/theme/index.ts +49 -0
- package/src/translations/Defaults.translations.json +100 -0
- package/src/types/css-modules.d.ts +0 -0
- package/src/types/svg.d.ts +15 -0
- package/src/utils/findKeyByValue.ts +17 -0
- package/src/utils/formatDateByLocale.ts +36 -0
- package/src/utils/formatFileSize.ts +14 -0
- package/src/utils/formatNumber.ts +29 -0
- package/src/utils/formatTextForMarkdown.ts +3 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Core Components
|
|
2
|
+
export * from './components/Accordion';
|
|
3
|
+
export * from './components/Alert';
|
|
4
|
+
export * from './components/AutowidthInput';
|
|
5
|
+
export * from './components/Avatar';
|
|
6
|
+
export * from './components/Badge';
|
|
7
|
+
export * from './components/Banner';
|
|
8
|
+
export * from './components/Breadcrumb';
|
|
9
|
+
export * from './components/Button';
|
|
10
|
+
export * from './components/Card';
|
|
11
|
+
export * from './components/Carousel';
|
|
12
|
+
export * from './components/CarouselModal';
|
|
13
|
+
export * from './components/Checkbox';
|
|
14
|
+
export * from './components/Chip';
|
|
15
|
+
export * from './components/ChipButton';
|
|
16
|
+
export * from './components/Code';
|
|
17
|
+
export * from './components/CodeTabs';
|
|
18
|
+
export * from './components/Container';
|
|
19
|
+
export * from './components/CopyableCode';
|
|
20
|
+
export * from './components/CrossPageToasts';
|
|
21
|
+
export * from './components/DataField';
|
|
22
|
+
export * from './components/DatePicker';
|
|
23
|
+
|
|
24
|
+
// File Components
|
|
25
|
+
export * from './components/FileInput';
|
|
26
|
+
export * from './components/FileItem';
|
|
27
|
+
export * from './components/FileList';
|
|
28
|
+
|
|
29
|
+
// Form Components
|
|
30
|
+
export * from './components/FormControl';
|
|
31
|
+
export * from './components/FormLabel';
|
|
32
|
+
export * from './components/GuideCue';
|
|
33
|
+
|
|
34
|
+
// Icon Components
|
|
35
|
+
export * from './components/Icon';
|
|
36
|
+
export * from './components/IconButton';
|
|
37
|
+
|
|
38
|
+
// Info Components
|
|
39
|
+
export * from './components/InfoSprinkle';
|
|
40
|
+
export * from './components/InlineCode';
|
|
41
|
+
|
|
42
|
+
// Input Components
|
|
43
|
+
export * from './components/Input';
|
|
44
|
+
export * from './components/LineGraph';
|
|
45
|
+
export * from './components/Link';
|
|
46
|
+
|
|
47
|
+
// Loading Components
|
|
48
|
+
export * from './components/Loaders';
|
|
49
|
+
export * from './components/Markdown';
|
|
50
|
+
export * from './components/Masonry';
|
|
51
|
+
export * from './components/MaxLengthIndicator';
|
|
52
|
+
export * from './components/MDXEditor';
|
|
53
|
+
export * from './components/Menu';
|
|
54
|
+
export * from './components/Modal';
|
|
55
|
+
export * from './components/MonthRangePicker';
|
|
56
|
+
|
|
57
|
+
// Navigation Components
|
|
58
|
+
export * from './components/Pagination';
|
|
59
|
+
|
|
60
|
+
// Input Variants
|
|
61
|
+
export * from './components/PasswordInput';
|
|
62
|
+
export * from './components/PinInput';
|
|
63
|
+
|
|
64
|
+
// Progress Components
|
|
65
|
+
export * from './components/ProgressBar';
|
|
66
|
+
export * from './components/RadialProgress';
|
|
67
|
+
|
|
68
|
+
// Interactive Components
|
|
69
|
+
export * from './components/Radio';
|
|
70
|
+
export * from './components/SeeMoreButton';
|
|
71
|
+
export * from './components/SegmentedControl';
|
|
72
|
+
export * from './components/SegmentedProgressBar';
|
|
73
|
+
export * from './components/Select';
|
|
74
|
+
export * from './components/Slider';
|
|
75
|
+
export * from './components/Spinner';
|
|
76
|
+
export * from './components/Switch';
|
|
77
|
+
|
|
78
|
+
// Layout Components
|
|
79
|
+
export * from './components/Table';
|
|
80
|
+
export * from './components/Tabs';
|
|
81
|
+
export * from './components/Tag';
|
|
82
|
+
export * from './components/Textarea';
|
|
83
|
+
export * from './components/Toast';
|
|
84
|
+
export * from './components/Tooltip';
|
|
85
|
+
// Typography Components (excluding Link to avoid conflict with Link component)
|
|
86
|
+
export {
|
|
87
|
+
H1,
|
|
88
|
+
H2,
|
|
89
|
+
H3,
|
|
90
|
+
H4,
|
|
91
|
+
H5,
|
|
92
|
+
Subtext,
|
|
93
|
+
Subtitle,
|
|
94
|
+
Text,
|
|
95
|
+
} from './components/Typography';
|
|
96
|
+
export * from './components/UrlInput';
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import React, { MouseEventHandler, useState } from 'react';
|
|
2
|
+
import { Box, Flex, useTheme, useToken, VStack } from '@chakra-ui/react';
|
|
3
|
+
import { Meta, StoryFn } from '@storybook/react';
|
|
4
|
+
import { lighten, readableColor } from 'polished';
|
|
5
|
+
|
|
6
|
+
import { Tooltip } from '../components/Tooltip';
|
|
7
|
+
import { H4, Text } from '../components/Typography';
|
|
8
|
+
|
|
9
|
+
const meta: Meta = {
|
|
10
|
+
title: 'Setup/Theme',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryFn<typeof meta>;
|
|
15
|
+
|
|
16
|
+
const ColorCard = ({
|
|
17
|
+
color,
|
|
18
|
+
shade,
|
|
19
|
+
shadeValue,
|
|
20
|
+
}: {
|
|
21
|
+
color: string;
|
|
22
|
+
shade: string;
|
|
23
|
+
shadeValue: string;
|
|
24
|
+
}) => {
|
|
25
|
+
const [wasCopied, setWasCopied] = useState<boolean>();
|
|
26
|
+
const theme = useTheme();
|
|
27
|
+
|
|
28
|
+
// Function to resolve nested color tokens to final hex values
|
|
29
|
+
const resolveColorToken = (tokenValue: string): string => {
|
|
30
|
+
// If it's already a hex color, return it
|
|
31
|
+
if (tokenValue.startsWith('#')) {
|
|
32
|
+
return tokenValue;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// If it's a token reference like "blue.900", resolve it
|
|
36
|
+
if (tokenValue.includes('.')) {
|
|
37
|
+
const [colorName, shade] = tokenValue.split('.');
|
|
38
|
+
const resolvedColor = theme.colors?.[colorName]?.[shade];
|
|
39
|
+
|
|
40
|
+
// If the resolved color is still a token reference, resolve it recursively
|
|
41
|
+
if (resolvedColor && typeof resolvedColor === 'string') {
|
|
42
|
+
return resolveColorToken(resolvedColor);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return resolvedColor || tokenValue;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Try to get it from useToken as fallback
|
|
49
|
+
return useToken('colors', tokenValue) || tokenValue;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const hexCode = resolveColorToken(shadeValue);
|
|
53
|
+
|
|
54
|
+
const handleClick: MouseEventHandler<HTMLButtonElement> = () => {
|
|
55
|
+
navigator.clipboard.writeText(hexCode);
|
|
56
|
+
setWasCopied(true);
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
setWasCopied(false);
|
|
59
|
+
}, 2000);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// Helper function to safely use polished functions
|
|
63
|
+
const getReadableColor = (bgColor: string) => {
|
|
64
|
+
try {
|
|
65
|
+
return readableColor(bgColor);
|
|
66
|
+
} catch {
|
|
67
|
+
return 'white'; // fallback
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const getLightenedColor = (bgColor: string) => {
|
|
72
|
+
try {
|
|
73
|
+
return lighten(0.2, bgColor);
|
|
74
|
+
} catch {
|
|
75
|
+
return bgColor; // fallback to original color
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<Flex flexDir="column" align="center" key={shade} p={2}>
|
|
81
|
+
<Tooltip label="Copy hex code" placement="top">
|
|
82
|
+
{/* Color block */}
|
|
83
|
+
<Flex
|
|
84
|
+
w="100px"
|
|
85
|
+
h="100px"
|
|
86
|
+
align="flex-end"
|
|
87
|
+
bg={shadeValue}
|
|
88
|
+
borderRadius="md"
|
|
89
|
+
boxShadow="md"
|
|
90
|
+
as="button"
|
|
91
|
+
transition="transform 0.1s ease-in-out"
|
|
92
|
+
// @ts-expect-error as prop
|
|
93
|
+
onClick={handleClick}
|
|
94
|
+
_hover={{
|
|
95
|
+
transform: 'scale(1.05)',
|
|
96
|
+
}}
|
|
97
|
+
>
|
|
98
|
+
{wasCopied ? (
|
|
99
|
+
<Flex
|
|
100
|
+
color={getReadableColor(hexCode)}
|
|
101
|
+
w="100%"
|
|
102
|
+
h="100%"
|
|
103
|
+
justify="center"
|
|
104
|
+
align="center"
|
|
105
|
+
>
|
|
106
|
+
Copied!
|
|
107
|
+
</Flex>
|
|
108
|
+
) : (
|
|
109
|
+
<Box
|
|
110
|
+
// Label
|
|
111
|
+
textAlign="center"
|
|
112
|
+
mt={4}
|
|
113
|
+
color={getReadableColor(getLightenedColor(hexCode))}
|
|
114
|
+
bgColor={getLightenedColor(hexCode)}
|
|
115
|
+
m={2}
|
|
116
|
+
p={1}
|
|
117
|
+
w="100%"
|
|
118
|
+
borderRadius="md"
|
|
119
|
+
>
|
|
120
|
+
<Text color="inherit">{hexCode}</Text>
|
|
121
|
+
</Box>
|
|
122
|
+
)}
|
|
123
|
+
</Flex>
|
|
124
|
+
</Tooltip>
|
|
125
|
+
<Text color="gray.1200" mt={2}>
|
|
126
|
+
{shade ? `${color}.${shade}` : color}
|
|
127
|
+
</Text>
|
|
128
|
+
<Text color="gray.800">{shadeValue !== hexCode && shadeValue}</Text>
|
|
129
|
+
</Flex>
|
|
130
|
+
);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export const Default: Story = (args) => {
|
|
134
|
+
const theme = useTheme();
|
|
135
|
+
return (
|
|
136
|
+
<VStack gap={4} align="flex-start">
|
|
137
|
+
{Object.entries(theme.semanticTokens?.colors || {})
|
|
138
|
+
.filter(([color]) => !color.startsWith('chakra'))
|
|
139
|
+
.map(([color, shades]) => (
|
|
140
|
+
<Flex key={color} gap={4} align="center">
|
|
141
|
+
<H4 mb={2} w="100px" textTransform="capitalize" color="gray.1200">
|
|
142
|
+
{color}
|
|
143
|
+
</H4>
|
|
144
|
+
<Flex gap={2}>
|
|
145
|
+
{typeof shades === 'string' ? (
|
|
146
|
+
// Handle simple string values (e.g., "white", "black")
|
|
147
|
+
<ColorCard
|
|
148
|
+
key={color}
|
|
149
|
+
color={color}
|
|
150
|
+
shade=""
|
|
151
|
+
shadeValue={shades}
|
|
152
|
+
/>
|
|
153
|
+
) : (
|
|
154
|
+
// Handle object values with multiple shades
|
|
155
|
+
Object.entries(shades as Record<string, string>).map(
|
|
156
|
+
([shade, shadeValue]) => (
|
|
157
|
+
<ColorCard
|
|
158
|
+
key={shade}
|
|
159
|
+
color={color}
|
|
160
|
+
shade={shade}
|
|
161
|
+
shadeValue={shadeValue}
|
|
162
|
+
/>
|
|
163
|
+
)
|
|
164
|
+
)
|
|
165
|
+
)}
|
|
166
|
+
</Flex>
|
|
167
|
+
</Flex>
|
|
168
|
+
))}
|
|
169
|
+
</VStack>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export const colors = {
|
|
2
|
+
primary: {
|
|
3
|
+
lighter: 'blue.50',
|
|
4
|
+
light: 'blue.300',
|
|
5
|
+
main: 'blue.900',
|
|
6
|
+
dark: 'blue.1000',
|
|
7
|
+
},
|
|
8
|
+
secondary: {
|
|
9
|
+
lighter: 'purple.50',
|
|
10
|
+
light: 'purple.300',
|
|
11
|
+
main: 'purple.500',
|
|
12
|
+
dark: 'purple.700',
|
|
13
|
+
},
|
|
14
|
+
danger: {
|
|
15
|
+
lighter: 'red.50',
|
|
16
|
+
light: '#FFC9C9',
|
|
17
|
+
main: 'red.500',
|
|
18
|
+
dark: '#961616',
|
|
19
|
+
},
|
|
20
|
+
success: {
|
|
21
|
+
lighter: '#EBFBF1',
|
|
22
|
+
light: '#C1F4D4',
|
|
23
|
+
main: '#019939',
|
|
24
|
+
dark: '#016626',
|
|
25
|
+
},
|
|
26
|
+
warning: {
|
|
27
|
+
lighter: '#FFF6E7',
|
|
28
|
+
light: '#FFE9BA',
|
|
29
|
+
main: 'yellow.400',
|
|
30
|
+
dark: '#9D6508',
|
|
31
|
+
},
|
|
32
|
+
gray: {
|
|
33
|
+
50: '#F4F5F6',
|
|
34
|
+
100: '#EAECEF',
|
|
35
|
+
200: '#E5E7EB',
|
|
36
|
+
300: '#EBF0FB',
|
|
37
|
+
400: '#D1D4DA',
|
|
38
|
+
500: '#C7CAD1',
|
|
39
|
+
600: '#BDC1C9',
|
|
40
|
+
700: '#AEB2BC',
|
|
41
|
+
800: '#9499A5',
|
|
42
|
+
900: '#7F8493',
|
|
43
|
+
1000: '#6B7180',
|
|
44
|
+
1100: '#595E6A',
|
|
45
|
+
1200: '#474B55',
|
|
46
|
+
1300: '#363840',
|
|
47
|
+
1400: '#24262B',
|
|
48
|
+
1500: '#121315',
|
|
49
|
+
},
|
|
50
|
+
blue: {
|
|
51
|
+
100: '#FDFDFF',
|
|
52
|
+
200: '#FAFBFE',
|
|
53
|
+
300: '#EFF4FF',
|
|
54
|
+
400: '#D6E0F7',
|
|
55
|
+
500: '#94b0ec',
|
|
56
|
+
600: '#3182ce',
|
|
57
|
+
700: '#6c92e4',
|
|
58
|
+
800: '#4272dd',
|
|
59
|
+
900: '#1751D0',
|
|
60
|
+
1000: '#113B98',
|
|
61
|
+
},
|
|
62
|
+
white: '#FFFFFF',
|
|
63
|
+
black: '#121212',
|
|
64
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Placeholder font objects that can be overridden by the consuming application
|
|
2
|
+
// The consuming app should define these fonts and pass them via theme customization
|
|
3
|
+
|
|
4
|
+
export const inter = {
|
|
5
|
+
style: {
|
|
6
|
+
fontFamily: '"Inter", sans-serif',
|
|
7
|
+
},
|
|
8
|
+
variable: '--es-font',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const noto = {
|
|
12
|
+
style: {
|
|
13
|
+
fontFamily: '"Noto Sans", sans-serif',
|
|
14
|
+
},
|
|
15
|
+
variable: '--font-noto',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const pretendard = {
|
|
19
|
+
style: {
|
|
20
|
+
fontFamily: '"Pretendard Variable", sans-serif',
|
|
21
|
+
},
|
|
22
|
+
variable: '--font-pretendard',
|
|
23
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { inter, noto, pretendard } from './font';
|
|
2
|
+
|
|
3
|
+
export const global = {
|
|
4
|
+
':root': {
|
|
5
|
+
'--chakra-colors-chakra-body-text': '#121315', // gray.1500 hex value
|
|
6
|
+
'--chakra-colors-chakra-body-bg': '#FFFFFF',
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
html: {
|
|
10
|
+
height: 'var(--chakra-vh)',
|
|
11
|
+
fontSize: 14,
|
|
12
|
+
fontFamily: [
|
|
13
|
+
pretendard.style.fontFamily,
|
|
14
|
+
inter.style.fontFamily,
|
|
15
|
+
noto.style.fontFamily,
|
|
16
|
+
].join(','),
|
|
17
|
+
overflow: 'auto',
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
'html, body': {
|
|
21
|
+
color: 'gray.1500', // Set the default body color
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
'#__next': {
|
|
25
|
+
height: 'var(--chakra-vh)',
|
|
26
|
+
},
|
|
27
|
+
"body[data-lang='es']": {
|
|
28
|
+
fontFamily: inter.style.fontFamily,
|
|
29
|
+
},
|
|
30
|
+
} as const;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { extendTheme } from '@chakra-ui/react';
|
|
2
|
+
|
|
3
|
+
import { colors } from './colors';
|
|
4
|
+
import { global } from './global';
|
|
5
|
+
|
|
6
|
+
const theme = extendTheme({
|
|
7
|
+
colors,
|
|
8
|
+
semanticTokens: {
|
|
9
|
+
colors: {
|
|
10
|
+
...colors,
|
|
11
|
+
'chakra-body-text': 'gray.1500',
|
|
12
|
+
'chakra-body-bg': 'white',
|
|
13
|
+
'chakra-body-text-secondary': 'gray.1200',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
styles: {
|
|
17
|
+
global,
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
fonts: {
|
|
21
|
+
body: '"Pretendard Variable", "Inter", "Noto Sans", sans-serif',
|
|
22
|
+
heading: '"Pretendard Variable", "Inter", "Noto Sans", sans-serif',
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
// 반응형 폰트 사이즈 - 모바일에서는 더 작은 폰트 크기, 데스크톱에서는 기존 크기 유지
|
|
26
|
+
fontSizes: {
|
|
27
|
+
// 커스텀 폰트 크기 토큰 (em 단위 사용)
|
|
28
|
+
// xs: { base: '0.7em', md: '0.7em' },
|
|
29
|
+
subtitle: { base: '0.8em', md: '0.92em' },
|
|
30
|
+
subtext: { base: '0.8em', md: '0.92em' },
|
|
31
|
+
p: { base: '0.9em', md: '1em' },
|
|
32
|
+
h5: { base: '1.1em', md: '1.2em' },
|
|
33
|
+
h4: { base: '1.25em', md: '1.44em' },
|
|
34
|
+
h3: { base: '1.5em', md: '1.75em' },
|
|
35
|
+
h2: { base: '2em', md: '2.5em' },
|
|
36
|
+
h1: { base: '2.4em', md: '3em' },
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
radii: {
|
|
40
|
+
none: '0',
|
|
41
|
+
sm: '6px',
|
|
42
|
+
md: '8px',
|
|
43
|
+
lg: '12px',
|
|
44
|
+
xl: '32px',
|
|
45
|
+
full: '9999px',
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export default theme;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"get_started": {
|
|
3
|
+
"ko": "시작하기",
|
|
4
|
+
"en": "Get Started",
|
|
5
|
+
"zh": "开始",
|
|
6
|
+
"ja": "始める",
|
|
7
|
+
"es": "Comenzar"
|
|
8
|
+
},
|
|
9
|
+
"next": {
|
|
10
|
+
"ko": "다음",
|
|
11
|
+
"en": "Next",
|
|
12
|
+
"zh": "下一个",
|
|
13
|
+
"ja": "次",
|
|
14
|
+
"es": "Siguiente"
|
|
15
|
+
},
|
|
16
|
+
"copy": {
|
|
17
|
+
"ko": "복사",
|
|
18
|
+
"en": "Copy",
|
|
19
|
+
"zh": "复制",
|
|
20
|
+
"ja": "コピー",
|
|
21
|
+
"es": "Copiar"
|
|
22
|
+
},
|
|
23
|
+
"copied": {
|
|
24
|
+
"ko": "복사 완료",
|
|
25
|
+
"en": "Copy completed",
|
|
26
|
+
"zh": "复制完成",
|
|
27
|
+
"ja": "コピー完了",
|
|
28
|
+
"es": "Copia completada"
|
|
29
|
+
},
|
|
30
|
+
"see_more": {
|
|
31
|
+
"ko": "더보기",
|
|
32
|
+
"en": "See more",
|
|
33
|
+
"zh": "查看更多",
|
|
34
|
+
"ja": "もっと見る",
|
|
35
|
+
"es": "Ver más"
|
|
36
|
+
},
|
|
37
|
+
"previous": {
|
|
38
|
+
"ko": "이전",
|
|
39
|
+
"en": "Previous",
|
|
40
|
+
"zh": "以前",
|
|
41
|
+
"ja": "前",
|
|
42
|
+
"es": "Anterior"
|
|
43
|
+
},
|
|
44
|
+
"go_next_page_button": {
|
|
45
|
+
"ko": "다음",
|
|
46
|
+
"en": "Next",
|
|
47
|
+
"zh": "下一个",
|
|
48
|
+
"ja": "次",
|
|
49
|
+
"es": "Siguiente"
|
|
50
|
+
},
|
|
51
|
+
"pagination_range_text": {
|
|
52
|
+
"ko": "{num_total_items}개 중 {range_start} - {range_end} 표시 중",
|
|
53
|
+
"en": "Displaying {range_start} - {range_end} of {num_total_items}",
|
|
54
|
+
"zh": "显示第 {range_start} - {range_end} 项,共 {num_total_items} 项",
|
|
55
|
+
"ja": "{num_total_items} 件中 {range_start} - {range_end} を表示中",
|
|
56
|
+
"es": "Mostrando {range_start} - {range_end} de {num_total_items}"
|
|
57
|
+
},
|
|
58
|
+
"pagination_items_per_page": {
|
|
59
|
+
"ko": "항목 수",
|
|
60
|
+
"en": "items per page",
|
|
61
|
+
"zh": "每页项目数",
|
|
62
|
+
"ja": "ページごとの項目数",
|
|
63
|
+
"es": "elementos por página"
|
|
64
|
+
},
|
|
65
|
+
"code_markdown_raw": {
|
|
66
|
+
"ko": "원문",
|
|
67
|
+
"en": "Raw",
|
|
68
|
+
"zh": "原文",
|
|
69
|
+
"ja": "原文",
|
|
70
|
+
"es": "Crudo"
|
|
71
|
+
},
|
|
72
|
+
"code_markdown_preview": {
|
|
73
|
+
"ko": "미리보기",
|
|
74
|
+
"en": "Preview",
|
|
75
|
+
"zh": "预览",
|
|
76
|
+
"ja": "プレビュー",
|
|
77
|
+
"es": "Vista previa"
|
|
78
|
+
},
|
|
79
|
+
"month_range_placeholder": {
|
|
80
|
+
"ko": "월 범위 선택",
|
|
81
|
+
"en": "Select month range",
|
|
82
|
+
"zh": "选择月份范围",
|
|
83
|
+
"ja": "月範囲を選択",
|
|
84
|
+
"es": "Seleccionar rango de meses"
|
|
85
|
+
},
|
|
86
|
+
"clear": {
|
|
87
|
+
"ko": "지우기",
|
|
88
|
+
"en": "Clear",
|
|
89
|
+
"zh": "清除",
|
|
90
|
+
"ja": "クリア",
|
|
91
|
+
"es": "Borrar"
|
|
92
|
+
},
|
|
93
|
+
"upload_your_file": {
|
|
94
|
+
"ko": "파일 업로드",
|
|
95
|
+
"en": "Upload file",
|
|
96
|
+
"zh": "文件上传",
|
|
97
|
+
"ja": "ファイルをアップロード",
|
|
98
|
+
"es": "Subir archivo"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare module '*.svg' {
|
|
2
|
+
import React from 'react';
|
|
3
|
+
const SVGComponent: React.FunctionComponent<
|
|
4
|
+
React.SVGProps<SVGSVGElement> & { title?: string }
|
|
5
|
+
>;
|
|
6
|
+
export default SVGComponent;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare module '*.svg?react' {
|
|
10
|
+
import React from 'react';
|
|
11
|
+
const SVGComponent: React.FunctionComponent<
|
|
12
|
+
React.SVGProps<SVGSVGElement> & { title?: string }
|
|
13
|
+
>;
|
|
14
|
+
export default SVGComponent;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find the key in an object that corresponds to a given value
|
|
3
|
+
* @param obj - The object to search in
|
|
4
|
+
* @param value - The value to find the key for
|
|
5
|
+
* @returns The key that matches the value, or undefined if not found
|
|
6
|
+
*/
|
|
7
|
+
export const findKeyByValue = <T extends Record<string, unknown>>(
|
|
8
|
+
obj: T,
|
|
9
|
+
value: unknown
|
|
10
|
+
): keyof T | undefined => {
|
|
11
|
+
for (const [key, val] of Object.entries(obj)) {
|
|
12
|
+
if (val === value) {
|
|
13
|
+
return key as keyof T;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a date based on the user's locale.
|
|
3
|
+
* @param {string | Date | undefined} date - The date to format (can be a string, Date object, or undefined).
|
|
4
|
+
* @param {string} locale - The locale to format the date in (e.g., 'en-US', 'ko-KR').
|
|
5
|
+
* @returns {string} - The formatted date string, or an empty string if the date is invalid or undefined.
|
|
6
|
+
*/
|
|
7
|
+
export function formatDateByLocale(
|
|
8
|
+
date?: string | Date,
|
|
9
|
+
locale: string = 'en'
|
|
10
|
+
): string {
|
|
11
|
+
if (!date) {
|
|
12
|
+
// Return an empty string if date is undefined or null
|
|
13
|
+
return '';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const dateObj = typeof date === 'string' ? new Date(date) : date;
|
|
17
|
+
|
|
18
|
+
if (isNaN(dateObj?.getTime())) {
|
|
19
|
+
// Return an empty string if the date is invalid
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const options: Intl.DateTimeFormatOptions = {
|
|
24
|
+
year: 'numeric',
|
|
25
|
+
month: 'short',
|
|
26
|
+
day: '2-digit',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// Adjust options for Korean locale
|
|
30
|
+
if (locale === 'ko') {
|
|
31
|
+
options.month = 'numeric'; // Avoid abbreviations in Korean
|
|
32
|
+
options.day = 'numeric'; // No leading zero
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return new Intl.DateTimeFormat(locale, options).format(dateObj);
|
|
36
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function formatFileSize(sizeInBytes: number): string {
|
|
2
|
+
if (sizeInBytes === 0) return '0 Bytes';
|
|
3
|
+
|
|
4
|
+
const units = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
|
5
|
+
const i = Math.floor(Math.log(sizeInBytes) / Math.log(1024));
|
|
6
|
+
const size = sizeInBytes / Math.pow(1024, i);
|
|
7
|
+
|
|
8
|
+
// Format with or without decimal places depending on whether the size is an integer
|
|
9
|
+
const formattedSize = Number.isInteger(size)
|
|
10
|
+
? size.toString()
|
|
11
|
+
: size.toFixed(2);
|
|
12
|
+
|
|
13
|
+
return `${formattedSize}${units[i]}`;
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format a number with thousands separators
|
|
3
|
+
* @param value - The number to format
|
|
4
|
+
* @param locale - The locale to use for formatting (default: 'en-US')
|
|
5
|
+
* @returns Formatted number string
|
|
6
|
+
*/
|
|
7
|
+
export const formatNumber = (
|
|
8
|
+
value: number | string,
|
|
9
|
+
locale: string = 'en-US'
|
|
10
|
+
): string => {
|
|
11
|
+
const numericValue = typeof value === 'string' ? parseFloat(value) : value;
|
|
12
|
+
|
|
13
|
+
if (isNaN(numericValue)) {
|
|
14
|
+
return '';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return new Intl.NumberFormat(locale).format(numericValue);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Parse a formatted number string back to a number
|
|
22
|
+
* @param formattedValue - The formatted number string
|
|
23
|
+
* @returns Parsed number or NaN if invalid
|
|
24
|
+
*/
|
|
25
|
+
export const parseFormattedNumber = (formattedValue: string): number => {
|
|
26
|
+
// Remove all non-digit characters except decimal point and negative sign
|
|
27
|
+
const cleanedValue = formattedValue.replace(/[^\d.-]/g, '');
|
|
28
|
+
return parseFloat(cleanedValue);
|
|
29
|
+
};
|