@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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Logician Design System
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# Logician Design System
|
|
2
|
+
|
|
3
|
+
A comprehensive React design system built on Chakra UI, providing a complete set of reusable UI components for building modern web applications.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🎨 **70+ Components** - Comprehensive set of UI components
|
|
8
|
+
- 🎭 **Built on Chakra UI** - Leverages the power and flexibility of Chakra UI
|
|
9
|
+
- 📱 **Responsive Design** - All components are mobile-first and responsive
|
|
10
|
+
- 🦾 **TypeScript First** - Full TypeScript support with comprehensive type definitions
|
|
11
|
+
- 📚 **Storybook 8.6** - Interactive component documentation and development
|
|
12
|
+
- 🎯 **Accessible** - WAI-ARIA compliant components
|
|
13
|
+
- ⚡ **Performance Optimized** - Tree-shakable exports and optimized bundle size
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
### As an NPM Package
|
|
18
|
+
|
|
19
|
+
Install the design system as an NPM package in your project:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
yarn add logician-ui
|
|
23
|
+
# or
|
|
24
|
+
npm install logician-ui
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Prerequisites
|
|
28
|
+
|
|
29
|
+
Make sure you have the required peer dependencies installed:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
yarn add react react-dom @chakra-ui/react @emotion/react @emotion/styled framer-motion
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### As a Git Submodule (Legacy)
|
|
36
|
+
|
|
37
|
+
> **Note**: Submodule usage is legacy. We recommend using the NPM package for better dependency management and easier updates.
|
|
38
|
+
|
|
39
|
+
If you need to use as a submodule:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Add as submodule
|
|
43
|
+
git submodule add https://github.com/yourusername/logician-ui.git src/components/design-system
|
|
44
|
+
|
|
45
|
+
# Initialize and update
|
|
46
|
+
git submodule update --init --recursive
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
### Basic Setup
|
|
52
|
+
|
|
53
|
+
Wrap your application with Chakra UI's `ChakraProvider`:
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
import { ChakraProvider } from "@chakra-ui/react";
|
|
57
|
+
import { Button, Input, Card } from "logician-ui";
|
|
58
|
+
|
|
59
|
+
function App() {
|
|
60
|
+
return (
|
|
61
|
+
<ChakraProvider>
|
|
62
|
+
<Card>
|
|
63
|
+
<Input placeholder="Enter your name" />
|
|
64
|
+
<Button variant="primary">Submit</Button>
|
|
65
|
+
</Card>
|
|
66
|
+
</ChakraProvider>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Component Categories
|
|
72
|
+
|
|
73
|
+
#### Core Components
|
|
74
|
+
|
|
75
|
+
- **Button** - Primary, secondary, tertiary, and danger variants
|
|
76
|
+
- **Card** - Container component for grouping content
|
|
77
|
+
- **Badge** - Status indicators and labels
|
|
78
|
+
- **Tag** - Interactive tags with various styles
|
|
79
|
+
|
|
80
|
+
#### Form Components
|
|
81
|
+
|
|
82
|
+
- **Input** - Text input with validation support
|
|
83
|
+
- **Textarea** - Multi-line text input
|
|
84
|
+
- **Select** - Dropdown selection component
|
|
85
|
+
- **Checkbox** - Multi-select checkboxes
|
|
86
|
+
- **Radio** - Single-select radio buttons
|
|
87
|
+
- **Switch** - Toggle switches
|
|
88
|
+
- **Slider** - Range selection component
|
|
89
|
+
|
|
90
|
+
#### Navigation
|
|
91
|
+
|
|
92
|
+
- **Breadcrumb** - Navigation breadcrumbs
|
|
93
|
+
- **Pagination** - Page navigation component
|
|
94
|
+
- **Menu** - Dropdown and context menus
|
|
95
|
+
- **Tabs** - Tab navigation component
|
|
96
|
+
|
|
97
|
+
#### Feedback
|
|
98
|
+
|
|
99
|
+
- **Alert** - Status messages and notifications
|
|
100
|
+
- **Toast** - Toast notifications
|
|
101
|
+
- **Modal** - Modal dialogs
|
|
102
|
+
- **Tooltip** - Contextual help tooltips
|
|
103
|
+
|
|
104
|
+
#### Data Display
|
|
105
|
+
|
|
106
|
+
- **Table** - Data tables with sorting and filtering
|
|
107
|
+
- **Avatar** - User profile pictures and initials
|
|
108
|
+
- **Typography** - Text components with consistent styling
|
|
109
|
+
- **Code** - Code syntax highlighting
|
|
110
|
+
|
|
111
|
+
#### Media
|
|
112
|
+
|
|
113
|
+
- **Icon** - Comprehensive icon system
|
|
114
|
+
- **Logo** - Brand logo components
|
|
115
|
+
|
|
116
|
+
## Development
|
|
117
|
+
|
|
118
|
+
### Setup
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Install dependencies
|
|
122
|
+
yarn install
|
|
123
|
+
|
|
124
|
+
# Lint code
|
|
125
|
+
yarn lint
|
|
126
|
+
|
|
127
|
+
# Fix linting issues
|
|
128
|
+
yarn lint:fix
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Storybook Development
|
|
132
|
+
|
|
133
|
+
Run Storybook for interactive component development and documentation:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Start Storybook development server
|
|
137
|
+
yarn storybook
|
|
138
|
+
|
|
139
|
+
# Build Storybook for deployment
|
|
140
|
+
yarn build-storybook
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Storybook will be available at [http://localhost:6006](http://localhost:6006) and provides an interactive environment to develop, test, and document your components.
|
|
144
|
+
|
|
145
|
+
### Versioning & Releases
|
|
146
|
+
|
|
147
|
+
This project uses [Changesets](https://github.com/changesets/changesets) for version management:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Add a changeset for your changes
|
|
151
|
+
yarn changeset
|
|
152
|
+
|
|
153
|
+
# Version packages (updates CHANGELOG and package.json)
|
|
154
|
+
yarn changeset:version
|
|
155
|
+
|
|
156
|
+
# Check changeset status
|
|
157
|
+
yarn changeset:status
|
|
158
|
+
|
|
159
|
+
# Publish to npm (if configured)
|
|
160
|
+
yarn changeset:publish
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Project Structure
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
├── .storybook/ # Storybook configuration
|
|
167
|
+
│ ├── main.ts # Main configuration
|
|
168
|
+
│ └── preview.tsx # Global decorators and parameters
|
|
169
|
+
├── src/ # Source code
|
|
170
|
+
│ ├── components/ # All UI components
|
|
171
|
+
│ │ ├── Button/
|
|
172
|
+
│ │ │ ├── Button.tsx
|
|
173
|
+
│ │ │ ├── Button.types.ts
|
|
174
|
+
│ │ │ ├── Button.styles.ts
|
|
175
|
+
│ │ │ ├── Button.stories.tsx
|
|
176
|
+
│ │ │ └── index.tsx
|
|
177
|
+
│ │ └── ...
|
|
178
|
+
│ ├── utils/ # Utility functions
|
|
179
|
+
│ ├── hooks/ # React hooks
|
|
180
|
+
│ ├── theme/ # Chakra UI theme
|
|
181
|
+
│ └── index.ts # Main export file
|
|
182
|
+
├── package.json
|
|
183
|
+
├── tsconfig.json
|
|
184
|
+
├── vite.config.ts
|
|
185
|
+
└── README.md
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Adding New Components
|
|
189
|
+
|
|
190
|
+
1. Create a new directory under `components/`
|
|
191
|
+
2. Follow the established pattern:
|
|
192
|
+
- `ComponentName.tsx` - Main component
|
|
193
|
+
- `ComponentName.types.ts` - TypeScript types
|
|
194
|
+
- `ComponentName.styles.ts` - Styling (if needed)
|
|
195
|
+
- `ComponentName.stories.tsx` - Storybook stories
|
|
196
|
+
- `index.tsx` - Exports
|
|
197
|
+
3. Add export to main `index.ts`
|
|
198
|
+
|
|
199
|
+
## Contributing
|
|
200
|
+
|
|
201
|
+
1. Fork the repository
|
|
202
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
203
|
+
3. Make your changes and ensure they pass linting (`yarn lint`)
|
|
204
|
+
4. Add a changeset describing your changes (`yarn changeset`)
|
|
205
|
+
5. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
206
|
+
6. Push to the branch (`git push origin feature/amazing-feature`)
|
|
207
|
+
7. Open a Pull Request
|
|
208
|
+
|
|
209
|
+
### Changeset Guidelines
|
|
210
|
+
|
|
211
|
+
When adding changesets, follow these guidelines:
|
|
212
|
+
|
|
213
|
+
- **Major**: Breaking changes, component API changes, removing components
|
|
214
|
+
- **Minor**: New components, new features, new props (non-breaking)
|
|
215
|
+
- **Patch**: Bug fixes, internal improvements, documentation updates
|
|
216
|
+
|
|
217
|
+
Example changeset workflow:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# After making changes
|
|
221
|
+
yarn changeset
|
|
222
|
+
|
|
223
|
+
# Select change type (major/minor/patch)
|
|
224
|
+
# Write a clear description of your changes
|
|
225
|
+
# Commit the changeset file along with your code changes
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## License
|
|
229
|
+
|
|
230
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
231
|
+
|
|
232
|
+
## Changelog
|
|
233
|
+
|
|
234
|
+
See [CHANGELOG.md](CHANGELOG.md) for a list of changes and version history.
|
package/USAGE.md
ADDED
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
# Usage Examples
|
|
2
|
+
|
|
3
|
+
This document provides detailed examples of how to use the Logician Design System in your projects.
|
|
4
|
+
|
|
5
|
+
## Installation & Setup
|
|
6
|
+
|
|
7
|
+
### NPM Package Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Install the package
|
|
11
|
+
yarn add logician-ui
|
|
12
|
+
# or
|
|
13
|
+
npm install logician-ui
|
|
14
|
+
|
|
15
|
+
# Install required peer dependencies
|
|
16
|
+
yarn add react react-dom @chakra-ui/react @emotion/react @emotion/styled framer-motion
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Basic Setup
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { ChakraProvider } from "@chakra-ui/react";
|
|
23
|
+
import { Button, Input, Card } from "logician-ui";
|
|
24
|
+
|
|
25
|
+
function App() {
|
|
26
|
+
return <ChakraProvider>{/* Your app content */}</ChakraProvider>;
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Example Implementations
|
|
31
|
+
|
|
32
|
+
### Basic Form
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
import React from "react";
|
|
36
|
+
import { ChakraProvider } from "@chakra-ui/react";
|
|
37
|
+
import { Button, Input, FormLabel, Card } from "logician-ui";
|
|
38
|
+
|
|
39
|
+
function LoginForm() {
|
|
40
|
+
return (
|
|
41
|
+
<ChakraProvider>
|
|
42
|
+
<Card maxWidth="400px" margin="auto" padding={6}>
|
|
43
|
+
<FormLabel>Email</FormLabel>
|
|
44
|
+
<Input type="email" placeholder="Enter your email" marginBottom={4} />
|
|
45
|
+
|
|
46
|
+
<FormLabel>Password</FormLabel>
|
|
47
|
+
<Input
|
|
48
|
+
type="password"
|
|
49
|
+
placeholder="Enter your password"
|
|
50
|
+
marginBottom={6}
|
|
51
|
+
/>
|
|
52
|
+
|
|
53
|
+
<Button variant="primary" width="100%">
|
|
54
|
+
Sign In
|
|
55
|
+
</Button>
|
|
56
|
+
</Card>
|
|
57
|
+
</ChakraProvider>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Dashboard Layout
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import React from "react";
|
|
66
|
+
import { ChakraProvider, Box, Grid, GridItem } from "@chakra-ui/react";
|
|
67
|
+
import { Button, Card, Badge, Table, Avatar, Typography } from "logician-ui";
|
|
68
|
+
|
|
69
|
+
function Dashboard() {
|
|
70
|
+
return (
|
|
71
|
+
<ChakraProvider>
|
|
72
|
+
<Box padding={6}>
|
|
73
|
+
<Typography variant="h1" marginBottom={6}>
|
|
74
|
+
Dashboard
|
|
75
|
+
</Typography>
|
|
76
|
+
|
|
77
|
+
<Grid templateColumns="repeat(3, 1fr)" gap={6} marginBottom={8}>
|
|
78
|
+
<GridItem>
|
|
79
|
+
<Card>
|
|
80
|
+
<Typography variant="h3">Total Users</Typography>
|
|
81
|
+
<Typography variant="h1" color="blue.500">
|
|
82
|
+
1,234
|
|
83
|
+
</Typography>
|
|
84
|
+
<Badge variant="success">+12%</Badge>
|
|
85
|
+
</Card>
|
|
86
|
+
</GridItem>
|
|
87
|
+
|
|
88
|
+
<GridItem>
|
|
89
|
+
<Card>
|
|
90
|
+
<Typography variant="h3">Revenue</Typography>
|
|
91
|
+
<Typography variant="h1" color="green.500">
|
|
92
|
+
$45,678
|
|
93
|
+
</Typography>
|
|
94
|
+
<Badge variant="success">+8%</Badge>
|
|
95
|
+
</Card>
|
|
96
|
+
</GridItem>
|
|
97
|
+
|
|
98
|
+
<GridItem>
|
|
99
|
+
<Card>
|
|
100
|
+
<Typography variant="h3">Orders</Typography>
|
|
101
|
+
<Typography variant="h1" color="purple.500">
|
|
102
|
+
892
|
|
103
|
+
</Typography>
|
|
104
|
+
<Badge variant="warning">-3%</Badge>
|
|
105
|
+
</Card>
|
|
106
|
+
</GridItem>
|
|
107
|
+
</Grid>
|
|
108
|
+
|
|
109
|
+
<Card>
|
|
110
|
+
<Typography variant="h2" marginBottom={4}>
|
|
111
|
+
Recent Users
|
|
112
|
+
</Typography>
|
|
113
|
+
<Table>{/* Table content */}</Table>
|
|
114
|
+
</Card>
|
|
115
|
+
</Box>
|
|
116
|
+
</ChakraProvider>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Modal Example
|
|
122
|
+
|
|
123
|
+
```tsx
|
|
124
|
+
import React, { useState } from "react";
|
|
125
|
+
import { Button, Modal, Input, FormLabel } from "logician-ui";
|
|
126
|
+
|
|
127
|
+
function UserSettingsModal() {
|
|
128
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
129
|
+
|
|
130
|
+
return (
|
|
131
|
+
<>
|
|
132
|
+
<Button onClick={() => setIsOpen(true)}>Open Settings</Button>
|
|
133
|
+
|
|
134
|
+
<Modal
|
|
135
|
+
isOpen={isOpen}
|
|
136
|
+
onClose={() => setIsOpen(false)}
|
|
137
|
+
title="User Settings"
|
|
138
|
+
>
|
|
139
|
+
<FormLabel>Display Name</FormLabel>
|
|
140
|
+
<Input placeholder="Enter display name" marginBottom={4} />
|
|
141
|
+
|
|
142
|
+
<FormLabel>Email Notifications</FormLabel>
|
|
143
|
+
<Switch defaultChecked marginBottom={6} />
|
|
144
|
+
|
|
145
|
+
<Button variant="primary" marginRight={3}>
|
|
146
|
+
Save Changes
|
|
147
|
+
</Button>
|
|
148
|
+
<Button variant="secondary" onClick={() => setIsOpen(false)}>
|
|
149
|
+
Cancel
|
|
150
|
+
</Button>
|
|
151
|
+
</Modal>
|
|
152
|
+
</>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## TypeScript Configuration
|
|
158
|
+
|
|
159
|
+
### Path Aliases (Optional)
|
|
160
|
+
|
|
161
|
+
If you want to use shorter import paths, you can set up TypeScript path aliases in your `tsconfig.json`:
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"compilerOptions": {
|
|
166
|
+
"baseUrl": ".",
|
|
167
|
+
"paths": {
|
|
168
|
+
"@/ui/*": ["node_modules/logician-ui/src/*"]
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Then import like this:
|
|
175
|
+
|
|
176
|
+
```tsx
|
|
177
|
+
import { Button, Input } from "@/ui/components";
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Legacy: Git Submodule Usage
|
|
181
|
+
|
|
182
|
+
> **⚠️ Deprecated**: The following instructions are for legacy submodule usage. We recommend using the NPM package instead.
|
|
183
|
+
|
|
184
|
+
### Adding the Submodule
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Add as a submodule in your project
|
|
188
|
+
git submodule add https://github.com/yourusername/logician-ui.git src/design-system
|
|
189
|
+
|
|
190
|
+
# Initialize the submodule
|
|
191
|
+
git submodule update --init --recursive
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Importing Components (Submodule)
|
|
195
|
+
|
|
196
|
+
```tsx
|
|
197
|
+
// Import specific components (submodule)
|
|
198
|
+
import { Button, Input, Card } from "../design-system";
|
|
199
|
+
|
|
200
|
+
// Or import from specific component directories (submodule)
|
|
201
|
+
import { Button } from "../design-system/src/components/Button";
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Updating the Submodule
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Update to latest version
|
|
208
|
+
git submodule update --remote
|
|
209
|
+
|
|
210
|
+
# Commit the submodule update
|
|
211
|
+
git add .
|
|
212
|
+
git commit -m "Update design system to latest version"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Path Aliases for Submodules
|
|
216
|
+
|
|
217
|
+
If using submodules, update your `tsconfig.json`:
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"compilerOptions": {
|
|
222
|
+
"baseUrl": ".",
|
|
223
|
+
"paths": {
|
|
224
|
+
"@/design-system/*": ["src/design-system/*"],
|
|
225
|
+
"@/components/*": ["src/design-system/src/components/*"]
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Then import like this:
|
|
232
|
+
|
|
233
|
+
```tsx
|
|
234
|
+
import { Button, Input } from "@/design-system";
|
|
235
|
+
import { Card } from "@/components/Card";
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Theme Customization
|
|
239
|
+
|
|
240
|
+
You can extend the Chakra UI theme to customize the design system:
|
|
241
|
+
|
|
242
|
+
```tsx
|
|
243
|
+
import { ChakraProvider, extendTheme } from "@chakra-ui/react";
|
|
244
|
+
|
|
245
|
+
const customTheme = extendTheme({
|
|
246
|
+
colors: {
|
|
247
|
+
brand: {
|
|
248
|
+
50: "#E6FFFA",
|
|
249
|
+
500: "#38B2AC",
|
|
250
|
+
900: "#234E52",
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
fonts: {
|
|
254
|
+
heading: `'Open Sans', sans-serif`,
|
|
255
|
+
body: `'Raleway', sans-serif`,
|
|
256
|
+
},
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
function App() {
|
|
260
|
+
return <ChakraProvider theme={customTheme}>{/* Your app */}</ChakraProvider>;
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Best Practices
|
|
265
|
+
|
|
266
|
+
### 1. Component Organization
|
|
267
|
+
|
|
268
|
+
- Group related components together
|
|
269
|
+
- Use consistent naming conventions
|
|
270
|
+
- Create wrapper components for complex patterns
|
|
271
|
+
|
|
272
|
+
### 2. Performance
|
|
273
|
+
|
|
274
|
+
- Import only the components you need
|
|
275
|
+
- Use React.lazy() for code splitting when needed
|
|
276
|
+
- Leverage Chakra UI's built-in optimization
|
|
277
|
+
|
|
278
|
+
### 3. Accessibility
|
|
279
|
+
|
|
280
|
+
- Always use semantic HTML elements
|
|
281
|
+
- Provide proper ARIA labels
|
|
282
|
+
- Test with screen readers
|
|
283
|
+
- Ensure proper color contrast
|
|
284
|
+
|
|
285
|
+
### 4. Responsive Design
|
|
286
|
+
|
|
287
|
+
- Use Chakra UI's responsive props
|
|
288
|
+
- Test on multiple device sizes
|
|
289
|
+
- Consider mobile-first approach
|
|
290
|
+
|
|
291
|
+
```tsx
|
|
292
|
+
// Responsive example
|
|
293
|
+
<Button
|
|
294
|
+
size={{ base: "sm", md: "md", lg: "lg" }}
|
|
295
|
+
width={{ base: "100%", md: "auto" }}
|
|
296
|
+
>
|
|
297
|
+
Responsive Button
|
|
298
|
+
</Button>
|
|
299
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk5FHXD7KR_js = require('./chunk-5FHXD7KR.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "Markdown", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunk5FHXD7KR_js.Markdown; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "baseMarkdownComponents", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunk5FHXD7KR_js.baseMarkdownComponents; }
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=Markdown-2D5K42BY.js.map
|
|
16
|
+
//# sourceMappingURL=Markdown-2D5K42BY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"Markdown-2D5K42BY.js"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* src/components/Markdown/Markdown.module.css */
|
|
2
|
+
.markdownStyles {
|
|
3
|
+
color: black;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 1.2em;
|
|
7
|
+
}
|
|
8
|
+
.markdownStyles > h1,
|
|
9
|
+
.markdownStyles > h2,
|
|
10
|
+
.markdownStyles > h3,
|
|
11
|
+
.markdownStyles > h4 {
|
|
12
|
+
margin-bottom: 0.5em !important;
|
|
13
|
+
}
|
|
14
|
+
.markdownStyles > h1:not(:first-child),
|
|
15
|
+
.markdownStyles > h2:not(:first-child),
|
|
16
|
+
.markdownStyles > h3:not(:first-child),
|
|
17
|
+
.markdownStyles > h4:not(:first-child) {
|
|
18
|
+
margin-top: 1em !important;
|
|
19
|
+
}
|
|
20
|
+
.markdownStyles ol,
|
|
21
|
+
.markdownStyles ul {
|
|
22
|
+
margin-top: 8px;
|
|
23
|
+
padding-inline-start: 16px;
|
|
24
|
+
}
|
|
25
|
+
.markdownStyles li {
|
|
26
|
+
line-height: calc(16px * 1.5);
|
|
27
|
+
margin-bottom: 8px;
|
|
28
|
+
}
|
|
29
|
+
/*# sourceMappingURL=Markdown-AZBXO5ZP.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Markdown/Markdown.module.css"],"sourcesContent":[".markdownStyles {\n color: black;\n display: flex;\n flex-direction: column;\n gap: 1.2em; /* Intended for longer form content like update modals */\n}\n\n.markdownStyles > h1,\n.markdownStyles > h2,\n.markdownStyles > h3,\n.markdownStyles > h4 {\n margin-bottom: 0.5em !important;\n}\n.markdownStyles > h1:not(:first-child),\n.markdownStyles > h2:not(:first-child),\n.markdownStyles > h3:not(:first-child),\n.markdownStyles > h4:not(:first-child) {\n margin-top: 1em !important;\n}\n\n.markdownStyles ol,\n.markdownStyles ul {\n margin-top: 8px;\n padding-inline-start: 16px;\n}\n.markdownStyles li {\n /* 1.5x standard line height */\n line-height: calc(16px * 1.5);\n margin-bottom: 8px;\n}\n"],"mappings":";AAAA,CAAC;AACC,SAAO;AACP,WAAS;AACT,kBAAgB;AAChB,OAAK;AACP;AAEA,CAPC,eAOe,EAAE;AAClB,CARC,eAQe,EAAE;AAClB,CATC,eASe,EAAE;AAClB,CAVC,eAUe,EAAE;AAChB,iBAAe;AACjB;AACA,CAbC,eAae,EAAE,EAAE,KAAK;AACzB,CAdC,eAce,EAAE,EAAE,KAAK;AACzB,CAfC,eAee,EAAE,EAAE,KAAK;AACzB,CAhBC,eAgBe,EAAE,EAAE,KAAK;AACvB,cAAY;AACd;AAEA,CApBC,eAoBe;AAChB,CArBC,eAqBe;AACd,cAAY;AACZ,wBAAsB;AACxB;AACA,CAzBC,eAyBe;AAEd,eAAa,KAAK,KAAK,EAAE;AACzB,iBAAe;AACjB;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"Markdown-RJJEQN4R.mjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.667" d="M6 14v-2m4 2v-4m4 4V6M4 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" clip-path="url(#a)"><path d="M12.733 11.247a5.8 5.8 0 0 1-1.78 1.364v1.929a.643.643 0 0 1-.643.643H6.453a.643.643 0 0 1-.643-.643V12.61a5.786 5.786 0 0 1 4.955-10.454m-4.955 16.2h5.143"/><path d="M11.433 6.058c-.451-.078-.451-.726 0-.805a4.09 4.09 0 0 0 3.289-3.15l.027-.126c.098-.446.733-.449.835-.004l.033.146a4.1 4.1 0 0 0 3.298 3.13c.454.08.454.73 0 .81a4.1 4.1 0 0 0-3.297 3.131l-.033.145c-.102.445-.737.443-.835-.004l-.025-.124a4.09 4.09 0 0 0-3.292-3.149"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h20v20H0z"/></clipPath></defs></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><g fill="currentColor" clip-path="url(#a)"><path d="M6.25 19.08c-.84 0-1.67-.2-2.42-.58l-1.8.33a.74.74 0 0 1-.67-.21.78.78 0 0 1-.21-.67l.34-1.8a5.4 5.4 0 0 1-.53-3.11 5.344 5.344 0 0 1 4.59-4.6c1.16-.15 2.35.08 3.36.67 1.01.58 1.81 1.5 2.26 2.58s.53 2.29.22 3.42c-.3 1.13-.98 2.14-1.9 2.85-.93.71-2.08 1.1-3.25 1.1zm-2.29-2.11c.13 0 .26.03.38.1 1.31.75 3.05.64 4.25-.28.67-.51 1.15-1.24 1.37-2.05s.16-1.68-.16-2.46-.9-1.43-1.62-1.85a3.85 3.85 0 0 0-2.42-.48c-.83.11-1.62.5-2.21 1.09s-.98 1.38-1.09 2.21.06 1.69.48 2.42c.09.16.12.34.09.51l-.18.99.99-.18s.09-.01.14-.01z"/><path d="M18.62 5.75a7.3 7.3 0 0 0-1.77-2.71 7.425 7.425 0 0 0-9.04-1.03c-.93.56-1.73 1.34-2.33 2.24-.59.88-.98 1.9-1.14 2.95.33-.1.67-.18 1.02-.22.19-.02.38-.03.57-.04.16-.66.44-1.3.81-1.87.48-.72 1.12-1.34 1.86-1.79a5.95 5.95 0 0 1 5.02-.54c.82.28 1.58.75 2.2 1.36.62.6 1.11 1.35 1.41 2.16s.42 1.7.35 2.56-.34 1.72-.77 2.46c-.09.16-.12.34-.09.51l.36 1.92-1.93-.36c-.18-.03-.36 0-.51.09-.49.28-1.02.47-1.57.6-.02.49-.08.98-.2 1.46-.01.05-.04.09-.05.14h.06c.8-.13 1.56-.39 2.27-.76l2.74.51c.24.04.49-.03.67-.21.17-.17.25-.42.21-.67l-.51-2.74c.46-.88.75-1.85.83-2.84.09-1.08-.06-2.19-.44-3.21z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h20v20H0z"/></clipPath></defs></svg>
|