@weing-dev/ui-kit-primitive 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +2 -0
- package/dist/components/Accordion/Accordion.context.d.ts +24 -0
- package/dist/components/Accordion/Accordion.d.ts +24 -0
- package/dist/components/Avatar/Avatar.d.ts +35 -0
- package/dist/components/Badge/Badge.d.ts +17 -0
- package/dist/components/BarCode/BarCode.d.ts +13 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +33 -0
- package/dist/components/Button/Button.colors.d.ts +295 -0
- package/dist/components/Button/Button.context.d.ts +22 -0
- package/dist/components/Button/Button.d.ts +24 -0
- package/dist/components/Button/Button.type.d.ts +10 -0
- package/dist/components/Calendar/Calendar.context.d.ts +56 -0
- package/dist/components/Calendar/Calendar.d.ts +72 -0
- package/dist/components/Calendar/dayjs.util.d.ts +99 -0
- package/dist/components/Cascader/Cacader.data.d.ts +6 -0
- package/dist/components/Cascader/Cascader.context.d.ts +31 -0
- package/dist/components/Cascader/Cascader.d.ts +54 -0
- package/dist/components/Cascader/Cascader.hook.d.ts +95 -0
- package/dist/components/Chart/Chart.d.ts +19 -0
- package/dist/components/Chips/Chips.colors.d.ts +171 -0
- package/dist/components/Chips/Chips.d.ts +16 -0
- package/dist/components/Comment/Comment.d.ts +21 -0
- package/dist/components/Dialog/Dialog.d.ts +2 -0
- package/dist/components/Divider/Divider.d.ts +13 -0
- package/dist/components/Editor/Editor.context.d.ts +8 -0
- package/dist/components/Editor/Editor.d.ts +16 -0
- package/dist/components/Form/CheckBox/CheckBox.context.d.ts +28 -0
- package/dist/components/Form/CheckBox/CheckBox.d.ts +33 -0
- package/dist/components/Form/CheckBox/Checkbox.colors.d.ts +33 -0
- package/dist/components/Form/Dropdown/Dropdown.colors.d.ts +114 -0
- package/dist/components/Form/Dropdown/Dropdown.context.d.ts +47 -0
- package/dist/components/Form/Dropdown/Dropdown.d.ts +59 -0
- package/dist/components/Form/OTPInput/OTPInput.context.d.ts +16 -0
- package/dist/components/Form/OTPInput/OTPInput.d.ts +15 -0
- package/dist/components/Form/Radio/Radio.colors.d.ts +33 -0
- package/dist/components/Form/Radio/Radio.context.d.ts +26 -0
- package/dist/components/Form/Radio/Radio.d.ts +30 -0
- package/dist/components/Form/Switch/Switch.colors.d.ts +33 -0
- package/dist/components/Form/Switch/Switch.context.d.ts +24 -0
- package/dist/components/Form/Switch/Switch.d.ts +28 -0
- package/dist/components/Form/TextArea/TextArea.colors.d.ts +67 -0
- package/dist/components/Form/TextArea/TextArea.context.d.ts +45 -0
- package/dist/components/Form/TextArea/TextArea.d.ts +37 -0
- package/dist/components/Form/TextInput/TextInput.colors.d.ts +67 -0
- package/dist/components/Form/TextInput/TextInput.context.d.ts +52 -0
- package/dist/components/Form/TextInput/TextInput.d.ts +33 -0
- package/dist/components/GlobalStyle/GlobalStyle.d.ts +2 -0
- package/dist/components/HelperText/HelperText.d.ts +28 -0
- package/dist/components/Icon/Icon.d.ts +13 -0
- package/dist/components/Icons/Add.d.ts +3 -0
- package/dist/components/Icons/AddAPhoto.d.ts +3 -0
- package/dist/components/Icons/ApprovalInactive.d.ts +3 -0
- package/dist/components/Icons/ArrowRight.d.ts +3 -0
- package/dist/components/Icons/AttachFile.d.ts +3 -0
- package/dist/components/Icons/Cancle.d.ts +3 -0
- package/dist/components/Icons/CancleFilled.d.ts +3 -0
- package/dist/components/Icons/Cart.d.ts +3 -0
- package/dist/components/Icons/CartFilled.d.ts +3 -0
- package/dist/components/Icons/Check.d.ts +3 -0
- package/dist/components/Icons/CheckBoxRound.d.ts +3 -0
- package/dist/components/Icons/CheckCircle.d.ts +3 -0
- package/dist/components/Icons/Close.d.ts +3 -0
- package/dist/components/Icons/Company.d.ts +3 -0
- package/dist/components/Icons/Download.d.ts +3 -0
- package/dist/components/Icons/DragHandle.d.ts +3 -0
- package/dist/components/Icons/Eco.d.ts +3 -0
- package/dist/components/Icons/EditSquare.d.ts +3 -0
- package/dist/components/Icons/Error.d.ts +3 -0
- package/dist/components/Icons/ErrorFilled.d.ts +3 -0
- package/dist/components/Icons/ExpandAll.d.ts +3 -0
- package/dist/components/Icons/ExpandLess.d.ts +3 -0
- package/dist/components/Icons/ExpandMore.d.ts +3 -0
- package/dist/components/Icons/Factory.d.ts +3 -0
- package/dist/components/Icons/FileUpload.d.ts +3 -0
- package/dist/components/Icons/FilecheckInactive.d.ts +3 -0
- package/dist/components/Icons/GoBefore.d.ts +3 -0
- package/dist/components/Icons/GoNext.d.ts +3 -0
- package/dist/components/Icons/HamburgerMenu.d.ts +3 -0
- package/dist/components/Icons/ImagecheckPlay.d.ts +3 -0
- package/dist/components/Icons/Inventory.d.ts +3 -0
- package/dist/components/Icons/KakaoTalk.d.ts +3 -0
- package/dist/components/Icons/ListAll.d.ts +3 -0
- package/dist/components/Icons/LocalShipping.d.ts +3 -0
- package/dist/components/Icons/Logout.d.ts +3 -0
- package/dist/components/Icons/Menu.d.ts +3 -0
- package/dist/components/Icons/Minus.d.ts +3 -0
- package/dist/components/Icons/ModeEdit.d.ts +3 -0
- package/dist/components/Icons/More.d.ts +3 -0
- package/dist/components/Icons/Naver.d.ts +3 -0
- package/dist/components/Icons/NaverBlog.d.ts +3 -0
- package/dist/components/Icons/OrderApprove.d.ts +3 -0
- package/dist/components/Icons/OrderInactive.d.ts +3 -0
- package/dist/components/Icons/OrderPlay.d.ts +3 -0
- package/dist/components/Icons/Outward.d.ts +3 -0
- package/dist/components/Icons/PayApprove.d.ts +3 -0
- package/dist/components/Icons/PayInactive.d.ts +3 -0
- package/dist/components/Icons/Personcard.d.ts +3 -0
- package/dist/components/Icons/PrintInactive.d.ts +3 -0
- package/dist/components/Icons/PrintPlay.d.ts +3 -0
- package/dist/components/Icons/Product.d.ts +3 -0
- package/dist/components/Icons/Search.d.ts +3 -0
- package/dist/components/Icons/Settings.d.ts +3 -0
- package/dist/components/Icons/ShippingDone.d.ts +3 -0
- package/dist/components/Icons/SupportAgent.d.ts +3 -0
- package/dist/components/Icons/SwapVert.d.ts +3 -0
- package/dist/components/Icons/Task.d.ts +3 -0
- package/dist/components/Icons/Upload.d.ts +3 -0
- package/dist/components/Icons/User.d.ts +3 -0
- package/dist/components/Icons/Warning.d.ts +3 -0
- package/dist/components/Icons/WarningAmber.d.ts +3 -0
- package/dist/components/Icons/WarningFilled.d.ts +3 -0
- package/dist/components/Icons/index.d.ts +62 -0
- package/dist/components/LNB/LNB.context.d.ts +22 -0
- package/dist/components/LNB/LNB.d.ts +48 -0
- package/dist/components/LNB/makeNavigation.d.ts +21 -0
- package/dist/components/Label/Label.colors.d.ts +219 -0
- package/dist/components/Label/Label.d.ts +10 -0
- package/dist/components/LazyImage/LazyImage.d.ts +10 -0
- package/dist/components/List/List.d.ts +22 -0
- package/dist/components/MobilePicker/MobilePicker.context.d.ts +11 -0
- package/dist/components/MobilePicker/MobilePicker.d.ts +47 -0
- package/dist/components/Modal/Modal.d.ts +9 -0
- package/dist/components/Pagination/Pagination.colors.d.ts +75 -0
- package/dist/components/Pagination/Pagination.context.d.ts +18 -0
- package/dist/components/Pagination/Pagination.d.ts +29 -0
- package/dist/components/Popup/Popup.context.d.ts +7 -0
- package/dist/components/Popup/Popup.d.ts +41 -0
- package/dist/components/QRCode/QRCode.d.ts +11 -0
- package/dist/components/ScrollCalendar/ScrollCalendar.context.d.ts +14 -0
- package/dist/components/ScrollCalendar/ScrollCalendar.d.ts +32 -0
- package/dist/components/ScrollSpy/ScrollSpy.d.ts +8 -0
- package/dist/components/Sheet/Sheet.context.d.ts +22 -0
- package/dist/components/Sheet/Sheet.d.ts +16 -0
- package/dist/components/Slider/Slider.backup.d.ts +35 -0
- package/dist/components/Slider/Slider.context.d.ts +36 -0
- package/dist/components/Slider/Slider.d.ts +41 -0
- package/dist/components/Stepper/Stepper.context.d.ts +22 -0
- package/dist/components/Stepper/Stepper.d.ts +24 -0
- package/dist/components/Tab/Tab.colors.d.ts +5 -0
- package/dist/components/Tab/Tab.context.d.ts +26 -0
- package/dist/components/Tab/Tab.d.ts +34 -0
- package/dist/components/Tab/cx.d.ts +2 -0
- package/dist/components/Table/Table.context.d.ts +10 -0
- package/dist/components/Table/Table.d.ts +32 -0
- package/dist/components/Table/Table.hook.d.ts +6 -0
- package/dist/components/Thumbnail/Thumbnail.context.d.ts +27 -0
- package/dist/components/Thumbnail/Thumbnail.d.ts +39 -0
- package/dist/components/TimeInput/TimeInput.colors.d.ts +67 -0
- package/dist/components/TimeInput/TimeInput.context.d.ts +47 -0
- package/dist/components/TimeInput/TimeInput.d.ts +47 -0
- package/dist/components/WeeklyCalendar/WeeklyCalendar.context.d.ts +70 -0
- package/dist/components/WeeklyCalendar/WeeklyCalendar.d.ts +31 -0
- package/dist/components/WeeklyCalendar/dayjs.util.d.ts +100 -0
- package/dist/components/WeeklyCalendar/weeklyCalendar.util.d.ts +76 -0
- package/dist/components/WisywygEditor/Quill/Editor.d.ts +15 -0
- package/dist/constant/locale.constant.d.ts +1 -0
- package/dist/hooks/useColorScheme.d.ts +4 -0
- package/dist/hooks/useElementRect.d.ts +19 -0
- package/dist/hooks/useIntersectionObserver.d.ts +7 -0
- package/dist/index.css +7 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +51685 -0
- package/dist/index.umd.cjs +203 -0
- package/dist/styles/baseColor.d.ts +264 -0
- package/dist/styles/color.d.ts +6 -0
- package/dist/styles/color2.d.ts +102 -0
- package/dist/utils/aws.util.d.ts +60 -0
- package/dist/utils/common.utill.d.ts +4 -0
- package/package.json +4 -1
- package/eslint.config.js +0 -29
- package/index.html +0 -13
- package/scripts/icons/setIcon.cjs +0 -151
- package/scripts/icons/svg-template.cjs +0 -18
- package/scripts/icons/svgo-config.json +0 -9
- package/scripts/icons/svgr-config.json +0 -16
- package/src/@types/color.d.ts +0 -51
- package/src/@types/common.d.ts +0 -6
- package/src/@types/extends/react.extends.d.ts +0 -7
- package/src/@types/quill-image-resize-module-react/index.d.ts +0 -1
- package/src/App.tsx +0 -84
- package/src/assets/react.svg +0 -1
- package/src/components/Accordion/Accordion.context.tsx +0 -62
- package/src/components/Accordion/Accordion.module.scss +0 -163
- package/src/components/Accordion/Accordion.tsx +0 -242
- package/src/components/Accordion/README.md +0 -408
- package/src/components/Accordion/images/as_trigger.gif +0 -0
- package/src/components/Accordion/images/closed.png +0 -0
- package/src/components/Accordion/images/open.png +0 -0
- package/src/components/Accordion/images/thumbnail1.png +0 -0
- package/src/components/Accordion/images/thumbnail2.png +0 -0
- package/src/components/Accordion/images/thumbnail3.png +0 -0
- package/src/components/Avatar/Avatar.module.scss +0 -47
- package/src/components/Avatar/Avatar.tsx +0 -230
- package/src/components/Avatar/README.md +0 -333
- package/src/components/Badge/Badge.module.scss +0 -49
- package/src/components/Badge/Badge.tsx +0 -87
- package/src/components/Badge/README.md +0 -223
- package/src/components/BarCode/BarCode.module.scss +0 -0
- package/src/components/BarCode/BarCode.tsx +0 -153
- package/src/components/Breadcrumb/Breadcrumb.module.scss +0 -36
- package/src/components/Breadcrumb/Breadcrumb.tsx +0 -114
- package/src/components/Breadcrumb/README.md +0 -339
- package/src/components/Button/Button.colors.tsx +0 -322
- package/src/components/Button/Button.context.tsx +0 -47
- package/src/components/Button/Button.module.scss +0 -156
- package/src/components/Button/Button.tsx +0 -190
- package/src/components/Button/Button.type.ts +0 -11
- package/src/components/Calendar/Calendar.context.tsx +0 -138
- package/src/components/Calendar/Calendar.module.scss +0 -116
- package/src/components/Calendar/Calendar.tsx +0 -440
- package/src/components/Calendar/dayjs.util.ts +0 -312
- package/src/components/Cascader/Cacader.data.ts +0 -1185
- package/src/components/Cascader/Cascader.context.tsx +0 -61
- package/src/components/Cascader/Cascader.hook.ts +0 -502
- package/src/components/Cascader/Cascader.module.scss +0 -143
- package/src/components/Cascader/Cascader.tsx +0 -281
- package/src/components/Cascader/README.md +0 -735
- package/src/components/Chart/Chart.module.scss +0 -0
- package/src/components/Chart/Chart.tsx +0 -230
- package/src/components/Chart/README.md +0 -85
- package/src/components/Chart/images/barChart.png +0 -0
- package/src/components/Chips/Chips.colors.tsx +0 -185
- package/src/components/Chips/Chips.module.scss +0 -49
- package/src/components/Chips/Chips.tsx +0 -78
- package/src/components/Comment/Comment.module.scss +0 -14
- package/src/components/Comment/Comment.tsx +0 -105
- package/src/components/Dialog/Dialog.module.scss +0 -0
- package/src/components/Dialog/Dialog.tsx +0 -12
- package/src/components/Divider/Divider.module.scss +0 -12
- package/src/components/Divider/Divider.tsx +0 -33
- package/src/components/Editor/Editor.context.tsx +0 -12
- package/src/components/Editor/Editor.module.scss +0 -40
- package/src/components/Editor/Editor.tsx +0 -174
- package/src/components/Form/CheckBox/CheckBox.context.tsx +0 -56
- package/src/components/Form/CheckBox/CheckBox.module.scss +0 -81
- package/src/components/Form/CheckBox/CheckBox.tsx +0 -196
- package/src/components/Form/CheckBox/Checkbox.colors.tsx +0 -42
- package/src/components/Form/Dropdown/Dropdown.colors.tsx +0 -125
- package/src/components/Form/Dropdown/Dropdown.context.tsx +0 -62
- package/src/components/Form/Dropdown/Dropdown.module.scss +0 -133
- package/src/components/Form/Dropdown/Dropdown.tsx +0 -404
- package/src/components/Form/OTPInput/OTPInput.context.tsx +0 -104
- package/src/components/Form/OTPInput/OTPInput.module.scss +0 -22
- package/src/components/Form/OTPInput/OTPInput.tsx +0 -67
- package/src/components/Form/Radio/Radio.colors.tsx +0 -42
- package/src/components/Form/Radio/Radio.context.tsx +0 -40
- package/src/components/Form/Radio/Radio.module.scss +0 -61
- package/src/components/Form/Radio/Radio.tsx +0 -174
- package/src/components/Form/Switch/Switch.colors.tsx +0 -42
- package/src/components/Form/Switch/Switch.context.tsx +0 -50
- package/src/components/Form/Switch/Switch.module.scss +0 -53
- package/src/components/Form/Switch/Switch.tsx +0 -151
- package/src/components/Form/TextArea/TextArea.colors.tsx +0 -76
- package/src/components/Form/TextArea/TextArea.context.tsx +0 -97
- package/src/components/Form/TextArea/TextArea.module.scss +0 -138
- package/src/components/Form/TextArea/TextArea.tsx +0 -246
- package/src/components/Form/TextInput/TextInput.colors.tsx +0 -76
- package/src/components/Form/TextInput/TextInput.context.tsx +0 -106
- package/src/components/Form/TextInput/TextInput.module.scss +0 -160
- package/src/components/Form/TextInput/TextInput.tsx +0 -225
- package/src/components/GlobalStyle/GlobalStyle.tsx +0 -20
- package/src/components/HelperText/HelperText.module.scss +0 -28
- package/src/components/HelperText/HelperText.tsx +0 -130
- package/src/components/Icon/Icon.tsx +0 -29
- package/src/components/Icons/Add.tsx +0 -20
- package/src/components/Icons/AddAPhoto.tsx +0 -21
- package/src/components/Icons/ApprovalInactive.tsx +0 -26
- package/src/components/Icons/ArrowRight.tsx +0 -24
- package/src/components/Icons/AttachFile.tsx +0 -20
- package/src/components/Icons/Cancle.tsx +0 -20
- package/src/components/Icons/CancleFilled.tsx +0 -20
- package/src/components/Icons/Cart.tsx +0 -20
- package/src/components/Icons/CartFilled.tsx +0 -20
- package/src/components/Icons/Check.tsx +0 -20
- package/src/components/Icons/CheckBoxRound.tsx +0 -21
- package/src/components/Icons/CheckCircle.tsx +0 -35
- package/src/components/Icons/Close.tsx +0 -20
- package/src/components/Icons/Company.tsx +0 -20
- package/src/components/Icons/Download.tsx +0 -20
- package/src/components/Icons/DragHandle.tsx +0 -20
- package/src/components/Icons/Eco.tsx +0 -20
- package/src/components/Icons/EditSquare.tsx +0 -20
- package/src/components/Icons/Error.tsx +0 -20
- package/src/components/Icons/ErrorFilled.tsx +0 -20
- package/src/components/Icons/ExpandAll.tsx +0 -20
- package/src/components/Icons/ExpandLess.tsx +0 -20
- package/src/components/Icons/ExpandMore.tsx +0 -20
- package/src/components/Icons/Factory.tsx +0 -20
- package/src/components/Icons/FileUpload.tsx +0 -20
- package/src/components/Icons/FilecheckInactive.tsx +0 -22
- package/src/components/Icons/GoBefore.tsx +0 -20
- package/src/components/Icons/GoNext.tsx +0 -20
- package/src/components/Icons/HamburgerMenu.tsx +0 -20
- package/src/components/Icons/ImagecheckPlay.tsx +0 -27
- package/src/components/Icons/Inventory.tsx +0 -20
- package/src/components/Icons/KakaoTalk.tsx +0 -22
- package/src/components/Icons/ListAll.tsx +0 -20
- package/src/components/Icons/LocalShipping.tsx +0 -20
- package/src/components/Icons/Logout.tsx +0 -20
- package/src/components/Icons/Menu.tsx +0 -20
- package/src/components/Icons/Minus.tsx +0 -18
- package/src/components/Icons/ModeEdit.tsx +0 -25
- package/src/components/Icons/More.tsx +0 -20
- package/src/components/Icons/Naver.tsx +0 -20
- package/src/components/Icons/NaverBlog.tsx +0 -22
- package/src/components/Icons/OrderApprove.tsx +0 -20
- package/src/components/Icons/OrderInactive.tsx +0 -20
- package/src/components/Icons/OrderPlay.tsx +0 -20
- package/src/components/Icons/Outward.tsx +0 -20
- package/src/components/Icons/PayApprove.tsx +0 -24
- package/src/components/Icons/PayInactive.tsx +0 -24
- package/src/components/Icons/Personcard.tsx +0 -20
- package/src/components/Icons/PrintInactive.tsx +0 -24
- package/src/components/Icons/PrintPlay.tsx +0 -24
- package/src/components/Icons/Product.tsx +0 -20
- package/src/components/Icons/Search.tsx +0 -20
- package/src/components/Icons/Settings.tsx +0 -20
- package/src/components/Icons/ShippingDone.tsx +0 -20
- package/src/components/Icons/SupportAgent.tsx +0 -20
- package/src/components/Icons/SwapVert.tsx +0 -21
- package/src/components/Icons/Task.tsx +0 -20
- package/src/components/Icons/Upload.tsx +0 -20
- package/src/components/Icons/User.tsx +0 -20
- package/src/components/Icons/Warning.tsx +0 -20
- package/src/components/Icons/WarningAmber.tsx +0 -21
- package/src/components/Icons/WarningFilled.tsx +0 -20
- package/src/components/Icons/index.ts +0 -62
- package/src/components/LNB/LNB.context.tsx +0 -32
- package/src/components/LNB/LNB.module.scss +0 -99
- package/src/components/LNB/LNB.tsx +0 -190
- package/src/components/LNB/README.md +0 -411
- package/src/components/LNB/makeNavigation.ts +0 -51
- package/src/components/LNB/navigation.d.ts +0 -15
- package/src/components/LNB/navigation.json +0 -211
- package/src/components/Label/Label.colors.tsx +0 -241
- package/src/components/Label/Label.module.scss +0 -31
- package/src/components/Label/Label.tsx +0 -54
- package/src/components/LazyImage/LazyImage.module.scss +0 -6
- package/src/components/LazyImage/LazyImage.tsx +0 -107
- package/src/components/List/List.module.scss +0 -81
- package/src/components/List/List.tsx +0 -91
- package/src/components/List/README.md +0 -87
- package/src/components/MobilePicker/MobilePicker.context.tsx +0 -22
- package/src/components/MobilePicker/MobilePicker.module.scss +0 -57
- package/src/components/MobilePicker/MobilePicker.tsx +0 -336
- package/src/components/MobilePicker/README.md +0 -159
- package/src/components/Modal/Modal.tsx +0 -77
- package/src/components/Modal/README.md +0 -130
- package/src/components/Pagination/Pagination.colors.tsx +0 -85
- package/src/components/Pagination/Pagination.context.tsx +0 -28
- package/src/components/Pagination/Pagination.module.scss +0 -60
- package/src/components/Pagination/Pagination.tsx +0 -234
- package/src/components/Popup/Popup.context.tsx +0 -15
- package/src/components/Popup/Popup.module.scss +0 -53
- package/src/components/Popup/Popup.tsx +0 -116
- package/src/components/Popup/README.md +0 -170
- package/src/components/QRCode/QRCode.module.scss +0 -2
- package/src/components/QRCode/QRCode.tsx +0 -61
- package/src/components/ScrollCalendar/ScrollCalendar.context.tsx +0 -26
- package/src/components/ScrollCalendar/ScrollCalendar.module.scss +0 -42
- package/src/components/ScrollCalendar/ScrollCalendar.tsx +0 -448
- package/src/components/ScrollSpy/README.md +0 -62
- package/src/components/ScrollSpy/ScrollSpy.tsx +0 -130
- package/src/components/Sheet/README.md +0 -92
- package/src/components/Sheet/Sheet.context.tsx +0 -23
- package/src/components/Sheet/Sheet.module.scss +0 -68
- package/src/components/Sheet/Sheet.tsx +0 -146
- package/src/components/Slider/README.md +0 -639
- package/src/components/Slider/Slider.backup.tsx +0 -477
- package/src/components/Slider/Slider.context.tsx +0 -67
- package/src/components/Slider/Slider.module.scss +0 -123
- package/src/components/Slider/Slider.tsx +0 -467
- package/src/components/Stepper/README.md +0 -320
- package/src/components/Stepper/Stepper.context.tsx +0 -49
- package/src/components/Stepper/Stepper.module.scss +0 -163
- package/src/components/Stepper/Stepper.tsx +0 -219
- package/src/components/Tab/Tab.colors.tsx +0 -54
- package/src/components/Tab/Tab.context.tsx +0 -64
- package/src/components/Tab/Tab.module.scss +0 -239
- package/src/components/Tab/Tab.tsx +0 -123
- package/src/components/Tab/cx.ts +0 -6
- package/src/components/Table/README.md +0 -162
- package/src/components/Table/Table.context.tsx +0 -23
- package/src/components/Table/Table.hook.ts +0 -51
- package/src/components/Table/Table.module.scss +0 -83
- package/src/components/Table/Table.tsx +0 -147
- package/src/components/Thumbnail/README.md +0 -302
- package/src/components/Thumbnail/Thumbnail.context.tsx +0 -42
- package/src/components/Thumbnail/Thumbnail.module.scss +0 -149
- package/src/components/Thumbnail/Thumbnail.tsx +0 -391
- package/src/components/TimeInput/README.md +0 -118
- package/src/components/TimeInput/TimeInput.colors.tsx +0 -76
- package/src/components/TimeInput/TimeInput.context.tsx +0 -58
- package/src/components/TimeInput/TimeInput.module.scss +0 -211
- package/src/components/TimeInput/TimeInput.tsx +0 -411
- package/src/components/WeeklyCalendar/WeeklyCalendar.context.tsx +0 -88
- package/src/components/WeeklyCalendar/WeeklyCalendar.module.scss +0 -225
- package/src/components/WeeklyCalendar/WeeklyCalendar.tsx +0 -772
- package/src/components/WeeklyCalendar/dayjs.util.ts +0 -336
- package/src/components/WeeklyCalendar/weeklyCalendar.util.ts +0 -583
- package/src/components/WisywygEditor/Quill/Editor.tsx +0 -148
- package/src/constant/locale.constant.ts +0 -6
- package/src/globals.scss +0 -80
- package/src/hooks/useColorScheme.tsx +0 -48
- package/src/hooks/useElementRect.tsx +0 -128
- package/src/hooks/useIntersectionObserver.tsx +0 -33
- package/src/index.css +0 -17
- package/src/index.ts +0 -187
- package/src/main.tsx +0 -10
- package/src/styles/_fontSize.mixin.scss +0 -57
- package/src/styles/_fontWeight.mixin.scss +0 -15
- package/src/styles/_lineHeight.mixin.scss +0 -57
- package/src/styles/_scrollbar.mixin.scss +0 -49
- package/src/styles/baseColor.ts +0 -297
- package/src/styles/color.ts +0 -272
- package/src/styles/color2.ts +0 -200
- package/src/styles/scrollbar.README.md +0 -72
- package/src/styles/typography.scss +0 -170
- package/src/utils/aws.util.ts +0 -180
- package/src/utils/common.utill.ts +0 -45
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.app.json +0 -24
- package/tsconfig.json +0 -29
- package/tsconfig.node.json +0 -10
- package/tsconfig.node.tsbuildinfo +0 -1
- package/tsconfig.tsbuildinfo +0 -1
- package/vite.config.d.ts +0 -2
- package/vite.config.js +0 -47
- package/vite.config.ts +0 -50
- /package/{src/App.css → dist/main.d.ts} +0 -0
- /package/{public → dist}/static/icon/Add.svg +0 -0
- /package/{public → dist}/static/icon/ApprovalInactive.svg +0 -0
- /package/{public → dist}/static/icon/ArrowRight.svg +0 -0
- /package/{public → dist}/static/icon/Cancle Filled.svg +0 -0
- /package/{public → dist}/static/icon/Cancle.svg +0 -0
- /package/{public → dist}/static/icon/Cart Filled.svg +0 -0
- /package/{public → dist}/static/icon/Cart.svg +0 -0
- /package/{public → dist}/static/icon/Check.svg +0 -0
- /package/{public → dist}/static/icon/CheckBoxRound.svg +0 -0
- /package/{public → dist}/static/icon/Company.svg +0 -0
- /package/{public → dist}/static/icon/DragHandle.svg +0 -0
- /package/{public → dist}/static/icon/Eco.svg +0 -0
- /package/{public → dist}/static/icon/EditSquare.svg +0 -0
- /package/{public → dist}/static/icon/Error Filled.svg +0 -0
- /package/{public → dist}/static/icon/Error.svg +0 -0
- /package/{public → dist}/static/icon/File Upload.svg +0 -0
- /package/{public → dist}/static/icon/FilecheckInactive.svg +0 -0
- /package/{public → dist}/static/icon/Go Before.svg +0 -0
- /package/{public → dist}/static/icon/Go Next.svg +0 -0
- /package/{public → dist}/static/icon/Hamburger Menu.svg +0 -0
- /package/{public → dist}/static/icon/ImagecheckPlay.svg +0 -0
- /package/{public → dist}/static/icon/Kakao Talk.svg +0 -0
- /package/{public → dist}/static/icon/Minus.svg +0 -0
- /package/{public → dist}/static/icon/Naver Blog.svg +0 -0
- /package/{public → dist}/static/icon/Naver.svg +0 -0
- /package/{public → dist}/static/icon/OrderApprove.svg +0 -0
- /package/{public → dist}/static/icon/OrderInactive.svg +0 -0
- /package/{public → dist}/static/icon/OrderPlay.svg +0 -0
- /package/{public → dist}/static/icon/PayApprove.svg +0 -0
- /package/{public → dist}/static/icon/PayInactive.svg +0 -0
- /package/{public → dist}/static/icon/PrintInactive.svg +0 -0
- /package/{public → dist}/static/icon/PrintPlay.svg +0 -0
- /package/{public → dist}/static/icon/Search.svg +0 -0
- /package/{public → dist}/static/icon/ShippingDone.svg +0 -0
- /package/{public → dist}/static/icon/Support Agent.svg +0 -0
- /package/{public → dist}/static/icon/Task.svg +0 -0
- /package/{public → dist}/static/icon/User.svg +0 -0
- /package/{public → dist}/static/icon/Warning Filled.svg +0 -0
- /package/{public → dist}/static/icon/Warning.svg +0 -0
- /package/{public → dist}/static/icon/add_a_photo.svg +0 -0
- /package/{public → dist}/static/icon/attach_file.svg +0 -0
- /package/{public → dist}/static/icon/check_circle.svg +0 -0
- /package/{public → dist}/static/icon/close.svg +0 -0
- /package/{public → dist}/static/icon/download.svg +0 -0
- /package/{public → dist}/static/icon/expand all.svg +0 -0
- /package/{public → dist}/static/icon/expand_less.svg +0 -0
- /package/{public → dist}/static/icon/expand_more.svg +0 -0
- /package/{public → dist}/static/icon/factory.svg +0 -0
- /package/{public → dist}/static/icon/inventory.svg +0 -0
- /package/{public → dist}/static/icon/listAll.svg +0 -0
- /package/{public → dist}/static/icon/local_shipping.svg +0 -0
- /package/{public → dist}/static/icon/logout.svg +0 -0
- /package/{public → dist}/static/icon/menu.svg +0 -0
- /package/{public → dist}/static/icon/mode_edit.svg +0 -0
- /package/{public → dist}/static/icon/more.svg +0 -0
- /package/{public → dist}/static/icon/outward.svg +0 -0
- /package/{public → dist}/static/icon/personcard.svg +0 -0
- /package/{public → dist}/static/icon/product.svg +0 -0
- /package/{public → dist}/static/icon/settings.svg +0 -0
- /package/{public → dist}/static/icon/swap_vert.svg +0 -0
- /package/{public → dist}/static/icon/upload.svg +0 -0
- /package/{public → dist}/static/icon/warning_amber.svg +0 -0
- /package/{public → dist}/static/image/Thumbnail.png +0 -0
- /package/{public → dist}/vite.svg +0 -0
- /package/{public → dist}/weing_logo_final.png +0 -0
package/src/@types/color.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
declare const grayScaleColorGroupNames = [
|
|
2
|
-
"gray",
|
|
3
|
-
"steelBlue",
|
|
4
|
-
"beige",
|
|
5
|
-
"royalOrange",
|
|
6
|
-
"lubyRed",
|
|
7
|
-
"cyan",
|
|
8
|
-
"mint",
|
|
9
|
-
"mustardYellow",
|
|
10
|
-
"red",
|
|
11
|
-
"green",
|
|
12
|
-
] as const;
|
|
13
|
-
|
|
14
|
-
declare const scaleGroup = [
|
|
15
|
-
0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95, 99, 100,
|
|
16
|
-
] as const;
|
|
17
|
-
|
|
18
|
-
type ScaleColorGroup = (typeof scaleGroup)[number];
|
|
19
|
-
type GrayScaleColorGroup = (typeof grayScaleColorGroupNames)[number];
|
|
20
|
-
type MakeTokenSet<TGroup extends GrayScaleColorGroup> =
|
|
21
|
-
`${TGroup}${ScaleColorGroup}`;
|
|
22
|
-
|
|
23
|
-
type GrayColorToken = MakeTokenSet<"gray">;
|
|
24
|
-
|
|
25
|
-
declare type ColorType = {
|
|
26
|
-
gray: Record<MakeTokenSet<"gray"> | "disabled", string>;
|
|
27
|
-
steelBlue: Record<MakeTokenSet<"steelBlue"> | "disabled", string>;
|
|
28
|
-
beige: Record<MakeTokenSet<"beige"> | "disabled", string>;
|
|
29
|
-
royalOrange: Record<MakeTokenSet<"royalOrange"> | "disabled", string>;
|
|
30
|
-
lubyRed: Record<MakeTokenSet<"lubyRed"> | "disabled", string>;
|
|
31
|
-
cyan: Record<MakeTokenSet<"cyan"> | "disabled", string>;
|
|
32
|
-
mint: Record<MakeTokenSet<"mint"> | "disabled", string>;
|
|
33
|
-
mustardYellow: Record<MakeTokenSet<"mustardYellow"> | "disabled", string>;
|
|
34
|
-
red: Record<MakeTokenSet<"red"> | "disabled", string>;
|
|
35
|
-
green: Record<MakeTokenSet<"green"> | "disabled", string>;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const grayScaleColorGroupNames = [
|
|
39
|
-
"gray",
|
|
40
|
-
"steelBlue",
|
|
41
|
-
"beige",
|
|
42
|
-
"royalOrange",
|
|
43
|
-
"lubyRed",
|
|
44
|
-
"cyan",
|
|
45
|
-
"mint",
|
|
46
|
-
"mustardYellow",
|
|
47
|
-
"red",
|
|
48
|
-
"green",
|
|
49
|
-
] as const;
|
|
50
|
-
|
|
51
|
-
type ColorScheme = (typeof grayScaleColorGroupNames)[number];
|
package/src/@types/common.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module "quill-image-resize-module-react";
|
package/src/App.tsx
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./App.css";
|
|
3
|
-
import "./globals.scss";
|
|
4
|
-
import GlobalStyle from "./components/GlobalStyle/GlobalStyle";
|
|
5
|
-
import QRCode, { QRCodeRef } from "./components/QRCode/QRCode";
|
|
6
|
-
import BarCode from "./components/BarCode/BarCode";
|
|
7
|
-
import Tab from "./components/Tab/Tab";
|
|
8
|
-
import Label from "./components/Label/Label";
|
|
9
|
-
import TextInput from "./components/Form/TextInput/TextInput";
|
|
10
|
-
|
|
11
|
-
function App() {
|
|
12
|
-
const _qr = React.useRef<QRCodeRef>(null);
|
|
13
|
-
|
|
14
|
-
const handleCopy = React.useCallback(async () => {
|
|
15
|
-
await _qr.current?.copy();
|
|
16
|
-
}, []);
|
|
17
|
-
const [active, setActive] = React.useState("0");
|
|
18
|
-
const handleChange = (value: string) => {
|
|
19
|
-
setActive(value);
|
|
20
|
-
};
|
|
21
|
-
const data = [
|
|
22
|
-
{
|
|
23
|
-
title: "제목1",
|
|
24
|
-
content: "내용1",
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
title: "제목2",
|
|
28
|
-
content: "내용2",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
title: "제목3",
|
|
32
|
-
content: "내용3",
|
|
33
|
-
},
|
|
34
|
-
];
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<>
|
|
38
|
-
<GlobalStyle />
|
|
39
|
-
<Label color={"deepGreen"} variant={"inverted"} size={"medium"}>
|
|
40
|
-
Label
|
|
41
|
-
</Label>
|
|
42
|
-
<Tab.Root
|
|
43
|
-
direction={"horizontal"}
|
|
44
|
-
align={"center"}
|
|
45
|
-
isFitted={false}
|
|
46
|
-
size={"medium"}
|
|
47
|
-
tabType={"square"}
|
|
48
|
-
onChange={handleChange}
|
|
49
|
-
active={active}
|
|
50
|
-
>
|
|
51
|
-
<Tab.List>
|
|
52
|
-
{data.map((item, index) => (
|
|
53
|
-
<Tab.Item key={index} id={index.toString()} index={index}>
|
|
54
|
-
{item.content}
|
|
55
|
-
</Tab.Item>
|
|
56
|
-
))}
|
|
57
|
-
</Tab.List>
|
|
58
|
-
<Tab.Panels>
|
|
59
|
-
{data.map((item, index) => {
|
|
60
|
-
return (
|
|
61
|
-
<Tab.Panel key={index} id={index.toString()} index={index}>
|
|
62
|
-
{item.content}
|
|
63
|
-
</Tab.Panel>
|
|
64
|
-
);
|
|
65
|
-
})}
|
|
66
|
-
</Tab.Panels>
|
|
67
|
-
</Tab.Root>
|
|
68
|
-
<QRCode link="https://www.google.com" ref={_qr} />
|
|
69
|
-
<button onClick={handleCopy}>QR코드 복사</button>
|
|
70
|
-
<BarCode value="1234567" />
|
|
71
|
-
{/* <TimeRangePicker
|
|
72
|
-
onTimeChange={(time) => {
|
|
73
|
-
setValue(`${time.start} ~ ${time.end}`);
|
|
74
|
-
}}
|
|
75
|
-
/> */}
|
|
76
|
-
{/* <span>{value}</span> */}
|
|
77
|
-
<TextInput.Root>
|
|
78
|
-
<TextInput.Input />
|
|
79
|
-
</TextInput.Root>
|
|
80
|
-
</>
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export default App;
|
package/src/assets/react.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type IAccordionRootVariant =
|
|
4
|
-
| "contained"
|
|
5
|
-
| "outlined"
|
|
6
|
-
| "adaptived"
|
|
7
|
-
| "sideLined"
|
|
8
|
-
| "bottomLined"
|
|
9
|
-
| "shadow"
|
|
10
|
-
| "unset";
|
|
11
|
-
|
|
12
|
-
type IAccordionRootState = {
|
|
13
|
-
open?: boolean;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
autoClosed?: boolean;
|
|
16
|
-
id?: string;
|
|
17
|
-
variant?: IAccordionRootVariant;
|
|
18
|
-
transition?:
|
|
19
|
-
| boolean
|
|
20
|
-
| {
|
|
21
|
-
/** 0.25s => 2500 */
|
|
22
|
-
duration?: number;
|
|
23
|
-
timingFC?: React.CSSProperties["transitionTimingFunction"];
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
onClick?: (e?: React.MouseEvent<HTMLInputElement>) => void;
|
|
27
|
-
onChange?: (e?: React.ChangeEvent<HTMLInputElement>) => void;
|
|
28
|
-
|
|
29
|
-
["#triggerRef"]?: React.RefObject<HTMLInputElement | null>;
|
|
30
|
-
["#firstClick"]?: boolean;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const initialState: IAccordionRootState = {
|
|
34
|
-
disabled: false,
|
|
35
|
-
autoClosed: true,
|
|
36
|
-
variant: "contained",
|
|
37
|
-
transition: true,
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const AccordionRootContext =
|
|
41
|
-
React.createContext<IAccordionRootState>(initialState);
|
|
42
|
-
|
|
43
|
-
export type AccordionsRootProviderProps = React.PropsWithChildren<
|
|
44
|
-
IAccordionRootState & {
|
|
45
|
-
className?: string;
|
|
46
|
-
}
|
|
47
|
-
>;
|
|
48
|
-
|
|
49
|
-
export const AccordionRootProvider = (props: AccordionsRootProviderProps) => {
|
|
50
|
-
const { children } = props;
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<AccordionRootContext.Provider
|
|
54
|
-
value={{
|
|
55
|
-
...initialState,
|
|
56
|
-
...props,
|
|
57
|
-
}}
|
|
58
|
-
>
|
|
59
|
-
{children}
|
|
60
|
-
</AccordionRootContext.Provider>
|
|
61
|
-
);
|
|
62
|
-
};
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
@layer Accordion {
|
|
2
|
-
.Unset {
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.Root {
|
|
8
|
-
position: relative;
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
width: 100%;
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
background-color: var(--backgroundDefault, #fff);
|
|
14
|
-
border-radius: 8px;
|
|
15
|
-
|
|
16
|
-
&.transition {
|
|
17
|
-
transition: 0.25s ease-in-out;
|
|
18
|
-
overflow: hidden;
|
|
19
|
-
will-change: background-color, border;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&.contained {
|
|
23
|
-
border: 1px solid transparent;
|
|
24
|
-
background-color: var(--componentTextfieldFilled, #919eab14);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&.outlined {
|
|
28
|
-
border: 1px solid var(--actionAction, #919eab);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&.adaptived {
|
|
32
|
-
border: 1px solid transparent;
|
|
33
|
-
background-color: var(--componentTextfieldFilled, #919eab14);
|
|
34
|
-
&.open {
|
|
35
|
-
border: 1px solid var(--actionAction, #919eab);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&.bottomLined {
|
|
40
|
-
border: 1px solid transparent;
|
|
41
|
-
border-bottom: 1px solid var(--actionAction, #919eab);
|
|
42
|
-
border-radius: 0;
|
|
43
|
-
background-color: var(--componentTextfieldFilled, #919eab14);
|
|
44
|
-
&.open {
|
|
45
|
-
border-bottom: 1px solid var(--actionAction, #919eab);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
&.sideLined {
|
|
49
|
-
border: 1px solid transparent;
|
|
50
|
-
border-inline: 1px solid var(--actionAction, #919eab);
|
|
51
|
-
border-radius: 0;
|
|
52
|
-
background-color: var(--componentTextfieldFilled, #919eab14);
|
|
53
|
-
&.open {
|
|
54
|
-
border-inline: 1px solid var(--actionAction, #919eab);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&.shadow {
|
|
59
|
-
border: 1px solid transparent;
|
|
60
|
-
background-color: var(--componentTextfieldFilled, #919eab14);
|
|
61
|
-
box-shadow: 0 2px 2px var(--shadow12, #919eab1f);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&.disabled {
|
|
65
|
-
background-color: var(--actionDisabledBackground, #919eab1f);
|
|
66
|
-
|
|
67
|
-
&.outlined {
|
|
68
|
-
border: 1px solid var(--componentTextfieldOutline, #919eab3d);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&.bottomLined {
|
|
72
|
-
border-bottom: 1px solid var(--componentTextfieldOutline, #919eab3d);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&.sideLined {
|
|
76
|
-
border-inline: 1px solid var(--componentTextfieldOutline, #919eab3d);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&.unset {
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
border-radius: 0;
|
|
83
|
-
border: none;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&.open:not(&.unset) {
|
|
87
|
-
background-color: var(--backgroundDefault, #fff);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.Trigger {
|
|
92
|
-
display: flex;
|
|
93
|
-
align-items: center;
|
|
94
|
-
justify-content: space-between;
|
|
95
|
-
cursor: pointer;
|
|
96
|
-
box-sizing: border-box;
|
|
97
|
-
padding: 12px 16px;
|
|
98
|
-
background-color: transparent;
|
|
99
|
-
-webkit-user-select: none;
|
|
100
|
-
-moz-user-select: none;
|
|
101
|
-
-ms-user-select: none;
|
|
102
|
-
user-select: none;
|
|
103
|
-
color: var(--textPrimary, #1c252e);
|
|
104
|
-
|
|
105
|
-
.TriggerIcon {
|
|
106
|
-
flex-shrink: 0;
|
|
107
|
-
&.open {
|
|
108
|
-
transform: rotate(180deg);
|
|
109
|
-
}
|
|
110
|
-
&.transition {
|
|
111
|
-
transition: transform 0.25s ease-in-out;
|
|
112
|
-
}
|
|
113
|
-
path {
|
|
114
|
-
stroke: var(--textPrimary, #1c252e);
|
|
115
|
-
fill: var(--textPrimary, #1c252e);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
&.disabled {
|
|
120
|
-
cursor: not-allowed;
|
|
121
|
-
color: var(--textDisabled, #c4cdd5);
|
|
122
|
-
|
|
123
|
-
.TriggerIcon {
|
|
124
|
-
path {
|
|
125
|
-
stroke: var(--textTertiary, #919eab);
|
|
126
|
-
fill: var(--textTertiary, #919eab);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.Item {
|
|
133
|
-
display: none;
|
|
134
|
-
padding: 0 16px 12px;
|
|
135
|
-
box-sizing: border-box;
|
|
136
|
-
flex-direction: column;
|
|
137
|
-
overflow: hidden;
|
|
138
|
-
|
|
139
|
-
&.open {
|
|
140
|
-
display: flex;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&.transition {
|
|
144
|
-
display: unset;
|
|
145
|
-
max-height: 0;
|
|
146
|
-
|
|
147
|
-
opacity: 0;
|
|
148
|
-
margin-bottom: -12px;
|
|
149
|
-
will-change: height, opacity, margin-bottom;
|
|
150
|
-
|
|
151
|
-
&.open {
|
|
152
|
-
opacity: 1;
|
|
153
|
-
margin-bottom: 0px;
|
|
154
|
-
max-height: unset;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
&.disabled {
|
|
159
|
-
cursor: not-allowed;
|
|
160
|
-
color: var(--Gray-Gray90, #d6d7da);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
/* eslint-disable react-refresh/only-export-components */
|
|
3
|
-
import React from "react";
|
|
4
|
-
import cn from "classnames/bind";
|
|
5
|
-
import styles from "./Accordion.module.scss";
|
|
6
|
-
import {
|
|
7
|
-
AccordionRootContext,
|
|
8
|
-
AccordionRootProvider,
|
|
9
|
-
AccordionsRootProviderProps,
|
|
10
|
-
} from "./Accordion.context";
|
|
11
|
-
|
|
12
|
-
import { Icon } from "../Icon/Icon";
|
|
13
|
-
|
|
14
|
-
const cx = cn.bind(styles);
|
|
15
|
-
|
|
16
|
-
type ItemProps = React.PropsWithChildren<{
|
|
17
|
-
className?: string;
|
|
18
|
-
}>;
|
|
19
|
-
|
|
20
|
-
const Item = (props: ItemProps) => {
|
|
21
|
-
const { children, className } = props;
|
|
22
|
-
|
|
23
|
-
const itemRef = React.useRef<HTMLDivElement>(null);
|
|
24
|
-
|
|
25
|
-
const rootContext = React.useContext(AccordionRootContext);
|
|
26
|
-
const { open, disabled, transition, "#firstClick": firstClick } = rootContext;
|
|
27
|
-
|
|
28
|
-
React.useEffect(() => {
|
|
29
|
-
if (!itemRef.current || !transition) return;
|
|
30
|
-
const computedStyle = window.getComputedStyle(itemRef.current);
|
|
31
|
-
const pb = computedStyle.paddingBottom;
|
|
32
|
-
|
|
33
|
-
const currMaxHeight = `${Array.from(itemRef.current.childNodes).reduce(
|
|
34
|
-
(acc, child) => acc + (child as HTMLDivElement).scrollHeight,
|
|
35
|
-
+pb.split("px")[0]
|
|
36
|
-
)}`;
|
|
37
|
-
|
|
38
|
-
const animationOptions = {
|
|
39
|
-
duration:
|
|
40
|
-
typeof transition === "boolean" ? 250 : transition?.duration ?? 250,
|
|
41
|
-
easing:
|
|
42
|
-
typeof transition === "boolean"
|
|
43
|
-
? "ease-in-out"
|
|
44
|
-
: transition?.timingFC ?? "ease-in-out",
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const animate = (...keyframes: Keyframe[]) => {
|
|
48
|
-
if (itemRef.current) itemRef.current.animate(keyframes, animationOptions);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
if (open) {
|
|
52
|
-
if (!firstClick) return;
|
|
53
|
-
|
|
54
|
-
animate(
|
|
55
|
-
{ maxHeight: 0, opacity: 0, marginBottom: `-${pb}` },
|
|
56
|
-
{ maxHeight: `${currMaxHeight}px`, opacity: 1, marginBottom: 0 }
|
|
57
|
-
);
|
|
58
|
-
} else {
|
|
59
|
-
if (!firstClick) return;
|
|
60
|
-
animate(
|
|
61
|
-
{
|
|
62
|
-
maxHeight: `${itemRef.current.scrollHeight}px`,
|
|
63
|
-
opacity: 1,
|
|
64
|
-
marginBottom: 0,
|
|
65
|
-
},
|
|
66
|
-
{ maxHeight: 0, opacity: 0, marginBottom: `-${pb}` }
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
}, [firstClick, transition, open]);
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<div
|
|
73
|
-
ref={itemRef}
|
|
74
|
-
className={cx("Item", className, {
|
|
75
|
-
open: open,
|
|
76
|
-
disabled: disabled,
|
|
77
|
-
transition: !!transition,
|
|
78
|
-
})}
|
|
79
|
-
>
|
|
80
|
-
{children}
|
|
81
|
-
</div>
|
|
82
|
-
);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
type AsProps = {
|
|
86
|
-
id?: string;
|
|
87
|
-
open?: boolean;
|
|
88
|
-
disabled?: boolean;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
type TriggerProps = React.PropsWithChildren<{
|
|
92
|
-
as?: (props: AsProps) => React.ReactNode;
|
|
93
|
-
className?: string;
|
|
94
|
-
}>;
|
|
95
|
-
|
|
96
|
-
const Trigger = (props: TriggerProps) => {
|
|
97
|
-
const { as, children, className } = props;
|
|
98
|
-
|
|
99
|
-
const {
|
|
100
|
-
id,
|
|
101
|
-
open,
|
|
102
|
-
disabled,
|
|
103
|
-
transition,
|
|
104
|
-
onClick,
|
|
105
|
-
onChange,
|
|
106
|
-
"#triggerRef": triggerRef,
|
|
107
|
-
} = React.useContext(AccordionRootContext);
|
|
108
|
-
|
|
109
|
-
const inputProps = {
|
|
110
|
-
hidden: true,
|
|
111
|
-
type: "checkbox",
|
|
112
|
-
defaultChecked: open,
|
|
113
|
-
id,
|
|
114
|
-
disabled,
|
|
115
|
-
onClick,
|
|
116
|
-
onChange,
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
return as ? (
|
|
120
|
-
<label htmlFor={id}>
|
|
121
|
-
<input ref={triggerRef} {...inputProps} />
|
|
122
|
-
{as({ id, open, disabled })}
|
|
123
|
-
</label>
|
|
124
|
-
) : (
|
|
125
|
-
<label
|
|
126
|
-
htmlFor={id}
|
|
127
|
-
className={cx("Trigger", className, {
|
|
128
|
-
disabled: disabled,
|
|
129
|
-
})}
|
|
130
|
-
>
|
|
131
|
-
<input ref={triggerRef} {...inputProps} />
|
|
132
|
-
{children}
|
|
133
|
-
<Icon
|
|
134
|
-
name={"ExpandMore"}
|
|
135
|
-
className={cx("TriggerIcon", {
|
|
136
|
-
open,
|
|
137
|
-
transition: !!transition,
|
|
138
|
-
})}
|
|
139
|
-
/>
|
|
140
|
-
</label>
|
|
141
|
-
);
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
const Root = (
|
|
145
|
-
props: Omit<AccordionsRootProviderProps, "#triggerRef" | "#firstClick">
|
|
146
|
-
) => {
|
|
147
|
-
const {
|
|
148
|
-
children,
|
|
149
|
-
className,
|
|
150
|
-
open,
|
|
151
|
-
variant = "contained",
|
|
152
|
-
disabled = false,
|
|
153
|
-
autoClosed = true,
|
|
154
|
-
transition = true,
|
|
155
|
-
onClick,
|
|
156
|
-
} = props;
|
|
157
|
-
|
|
158
|
-
const [privateOpen, setPrivateOpen] = React.useState(false);
|
|
159
|
-
const [firstClick, setFirstClick] = React.useState(false);
|
|
160
|
-
|
|
161
|
-
const privateId = React.useId();
|
|
162
|
-
|
|
163
|
-
const rootRef = React.useRef<HTMLDivElement>(null);
|
|
164
|
-
const triggerRef = React.useRef<HTMLInputElement>(null);
|
|
165
|
-
|
|
166
|
-
const handleTriggerClick = React.useCallback(() => {
|
|
167
|
-
if (disabled) return;
|
|
168
|
-
if (open === undefined) setPrivateOpen?.((curr) => !curr);
|
|
169
|
-
if (!firstClick) setFirstClick?.(true);
|
|
170
|
-
onClick?.();
|
|
171
|
-
}, [disabled, open, firstClick, setPrivateOpen, onClick, setFirstClick]);
|
|
172
|
-
|
|
173
|
-
const currOpen = React.useMemo(
|
|
174
|
-
() => open ?? privateOpen,
|
|
175
|
-
[open, privateOpen]
|
|
176
|
-
);
|
|
177
|
-
const contextValue = React.useMemo(() => {
|
|
178
|
-
return {
|
|
179
|
-
...props,
|
|
180
|
-
id: props.id ?? privateId,
|
|
181
|
-
open: currOpen,
|
|
182
|
-
"#triggerRef": triggerRef,
|
|
183
|
-
"#firstClick": firstClick,
|
|
184
|
-
onClick: handleTriggerClick,
|
|
185
|
-
};
|
|
186
|
-
}, [props, privateId, currOpen, firstClick, handleTriggerClick]);
|
|
187
|
-
|
|
188
|
-
const handleClickOutside = React.useCallback((e: MouseEvent) => {
|
|
189
|
-
const target = e.target as HTMLElement;
|
|
190
|
-
if (!rootRef.current?.contains(target)) {
|
|
191
|
-
triggerRef.current?.click();
|
|
192
|
-
}
|
|
193
|
-
}, []);
|
|
194
|
-
|
|
195
|
-
React.useEffect(() => {
|
|
196
|
-
if (disabled || !currOpen) return;
|
|
197
|
-
if (autoClosed) {
|
|
198
|
-
document.addEventListener("click", handleClickOutside);
|
|
199
|
-
return () => {
|
|
200
|
-
document.removeEventListener("click", handleClickOutside);
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
}, [disabled, currOpen, autoClosed, handleClickOutside]);
|
|
204
|
-
|
|
205
|
-
return (
|
|
206
|
-
<AccordionRootProvider {...contextValue}>
|
|
207
|
-
<div
|
|
208
|
-
ref={rootRef}
|
|
209
|
-
className={cx(
|
|
210
|
-
variant === "unset" ? "Unset" : "Root",
|
|
211
|
-
className,
|
|
212
|
-
variant,
|
|
213
|
-
{
|
|
214
|
-
open: currOpen,
|
|
215
|
-
transition: !!transition,
|
|
216
|
-
disabled,
|
|
217
|
-
}
|
|
218
|
-
)}
|
|
219
|
-
style={{
|
|
220
|
-
...(typeof transition !== "boolean" && {
|
|
221
|
-
transitionDuration: `${+(transition?.duration ?? 250) / 1000}s`,
|
|
222
|
-
transitionTimingFunction: transition?.timingFC ?? "ease-in-out",
|
|
223
|
-
}),
|
|
224
|
-
}}
|
|
225
|
-
>
|
|
226
|
-
{children}
|
|
227
|
-
</div>
|
|
228
|
-
</AccordionRootProvider>
|
|
229
|
-
);
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
interface IAccordion {
|
|
233
|
-
Root: typeof Root;
|
|
234
|
-
Trigger: typeof Trigger;
|
|
235
|
-
Item: typeof Item;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
export default {
|
|
239
|
-
Root,
|
|
240
|
-
Trigger,
|
|
241
|
-
Item,
|
|
242
|
-
} as IAccordion;
|