@uniai-fe/ui-legacy 0.1.1
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 +27 -0
- package/README.md +3 -0
- package/package.json +141 -0
- package/src/alternate/components/empty/Cage.tsx +29 -0
- package/src/alternate/components/empty/Data.tsx +35 -0
- package/src/alternate/components/empty/Table.tsx +38 -0
- package/src/alternate/components/index.tsx +19 -0
- package/src/alternate/components/loading/Default.tsx +38 -0
- package/src/alternate/components/loading/Icon.tsx +26 -0
- package/src/alternate/components/loading/Table.tsx +46 -0
- package/src/alternate/components/notice/SelectFlock.tsx +21 -0
- package/src/alternate/components/notice/SelectLabel.tsx +15 -0
- package/src/alternate/index.tsx +3 -0
- package/src/alternate/styles/styled/alternate.ts +92 -0
- package/src/asset-url.ts +7 -0
- package/src/button/button.scss +3 -0
- package/src/button/components/array/Add.tsx +39 -0
- package/src/button/components/array/Remove.tsx +34 -0
- package/src/button/components/base/Default.tsx +76 -0
- package/src/button/components/base/Expand.tsx +39 -0
- package/src/button/components/base/Link.tsx +40 -0
- package/src/button/components/base/Refresh.tsx +43 -0
- package/src/button/components/base/Reset.tsx +43 -0
- package/src/button/components/base/ResetSelected.tsx +35 -0
- package/src/button/components/base/Text.tsx +35 -0
- package/src/button/components/base/Tooltip.tsx +35 -0
- package/src/button/components/multiple/Container.tsx +70 -0
- package/src/button/components/select/SelectBox.tsx +37 -0
- package/src/button/icons/Expand.tsx +16 -0
- package/src/button/icons/Loading.tsx +20 -0
- package/src/button/icons/Refresh.tsx +20 -0
- package/src/button/icons/Reset.tsx +20 -0
- package/src/button/icons/ResetSelected.tsx +21 -0
- package/src/button/index.tsx +29 -0
- package/src/button/styled.tsx +12 -0
- package/src/button/styles/scss/multiple.scss +17 -0
- package/src/button/styles/scss/size.scss +46 -0
- package/src/button/styles/scss/theme.scss +36 -0
- package/src/button/styles/styled-components/button.ts +311 -0
- package/src/button/styles/styled-components/icon.ts +30 -0
- package/src/button/styles/styled-components/multiple.ts +75 -0
- package/src/button/styles/styled-components/template.ts +43 -0
- package/src/chart/chart.scss +11 -0
- package/src/chart/components/Contents.tsx +17 -0
- package/src/chart/components/control/Button.tsx +39 -0
- package/src/chart/components/control/Container.tsx +27 -0
- package/src/chart/components/control/Provider.tsx +117 -0
- package/src/chart/components/control/index.tsx +12 -0
- package/src/chart/components/custom/ActivePieSector.tsx +29 -0
- package/src/chart/components/graphs/ArcGauge.tsx +58 -0
- package/src/chart/components/graphs/ArcMeter.tsx +112 -0
- package/src/chart/components/graphs/Area.tsx +132 -0
- package/src/chart/components/graphs/Bar.tsx +179 -0
- package/src/chart/components/graphs/Doughnut.tsx +90 -0
- package/src/chart/components/graphs/Line.tsx +123 -0
- package/src/chart/components/graphs/index.tsx +17 -0
- package/src/chart/components/ticks/XAxis.tsx +39 -0
- package/src/chart/components/ticks/index.tsx +7 -0
- package/src/chart/index.tsx +17 -0
- package/src/chart/styled.tsx +3 -0
- package/src/chart/styles/scss/arc-gauge.scss +11 -0
- package/src/chart/styles/scss/arc-meter.scss +6 -0
- package/src/chart/styles/scss/control.scss +34 -0
- package/src/chart/styles/scss/filter.scss +0 -0
- package/src/chart/styles/scss/graph.scss +3 -0
- package/src/chart/styles/scss/legend.scss +35 -0
- package/src/chart/styles/scss/level.color.scss +7 -0
- package/src/chart/styles/scss/tick.scss +48 -0
- package/src/chart/styles/scss/tooltip.scss +70 -0
- package/src/chart/styles/styled/arc-gauge.ts +65 -0
- package/src/chart/styles/styled/arc-meter.ts +42 -0
- package/src/chart/styles/styled/common.ts +14 -0
- package/src/chart/styles/styled/control.ts +31 -0
- package/src/chart/styles/styled/legend.ts +11 -0
- package/src/chart/svg/gauge-track.min.svg +1 -0
- package/src/chart/utils/getLevel.ts +23 -0
- package/src/chip/chip.scss +1 -0
- package/src/chip/components/Default.tsx +40 -0
- package/src/chip/index.tsx +5 -0
- package/src/chip/styled.tsx +7 -0
- package/src/chip/styles/scss/variables.scss +15 -0
- package/src/chip/styles/styled/base.ts +41 -0
- package/src/components.tsx +42 -0
- package/src/delta/components/Rounded.tsx +72 -0
- package/src/delta/components/Square.tsx +72 -0
- package/src/delta/index.tsx +6 -0
- package/src/delta/styles/styled/delta.ts +126 -0
- package/src/dot/components/Location.tsx +55 -0
- package/src/dot/index.tsx +7 -0
- package/src/dot/styles/styled/location.ts +78 -0
- package/src/dropdown/components/Container.tsx +36 -0
- package/src/dropdown/components/ParentContainer.tsx +32 -0
- package/src/dropdown/dropdown.scss +1 -0
- package/src/dropdown/index.tsx +9 -0
- package/src/dropdown/styled.tsx +3 -0
- package/src/dropdown/styles/scss/variables.scss +24 -0
- package/src/dropdown/styles/styled-components/dropdown.ts +79 -0
- package/src/form/components/Provider.tsx +37 -0
- package/src/form/index.tsx +5 -0
- package/src/form-field/common/components/item-contents/Container.tsx +51 -0
- package/src/form-field/common/components/item-contents/Label.tsx +21 -0
- package/src/form-field/common/components/item-contents/Wrapper.tsx +24 -0
- package/src/form-field/common/components/item-contents/index.tsx +11 -0
- package/src/form-field/common/field.scss +2 -0
- package/src/form-field/common/hook.tsx +1 -0
- package/src/form-field/common/hooks/index.tsx +13 -0
- package/src/form-field/common/hooks/types.ts +16 -0
- package/src/form-field/common/hooks/useChangeEvents.ts +171 -0
- package/src/form-field/common/hooks/useInputCountdown.ts +115 -0
- package/src/form-field/common/hooks/useInputFile.ts +94 -0
- package/src/form-field/common/hooks/useInputMask.ts +56 -0
- package/src/form-field/common/hooks/useOpenDaumPostCodePopup.tsx +55 -0
- package/src/form-field/common/index.tsx +7 -0
- package/src/form-field/common/jotai/find-address.ts +4 -0
- package/src/form-field/common/jotai/password-hide.ts +6 -0
- package/src/form-field/common/styled.tsx +7 -0
- package/src/form-field/common/styles/scss/reset.scss +52 -0
- package/src/form-field/common/styles/scss/variables.scss +52 -0
- package/src/form-field/common/styles/styled-components/item.ts +148 -0
- package/src/form-field/input/components/Container.tsx +54 -0
- package/src/form-field/input/components/assets/button/ResetButton.tsx +24 -0
- package/src/form-field/input/components/assets/calendar/DatePicker.tsx +184 -0
- package/src/form-field/input/components/assets/calendar/DateTimePicker.tsx +187 -0
- package/src/form-field/input/components/assets/calendar/TimePicker.tsx +163 -0
- package/src/form-field/input/components/assets/calendar/custom/ButtonContainer.tsx +15 -0
- package/src/form-field/input/components/assets/calendar/custom/TodayButton.tsx +23 -0
- package/src/form-field/input/components/assets/icon/CalendarIcon.tsx +14 -0
- package/src/form-field/input/components/assets/icon/CheckIcon.tsx +14 -0
- package/src/form-field/input/components/assets/icon/ExpandIcon.tsx +14 -0
- package/src/form-field/input/components/assets/icon/StatusIcon.tsx +17 -0
- package/src/form-field/input/components/assets/util/Countdown.tsx +34 -0
- package/src/form-field/input/components/assets/util/StatusNotice.tsx +22 -0
- package/src/form-field/input/components/click/Checkbox.tsx +99 -0
- package/src/form-field/input/components/click/Radio.tsx +77 -0
- package/src/form-field/input/components/click/index.tsx +9 -0
- package/src/form-field/input/components/date-time/Date.tsx +74 -0
- package/src/form-field/input/components/date-time/DateTime.tsx +72 -0
- package/src/form-field/input/components/date-time/Time.tsx +60 -0
- package/src/form-field/input/components/file-upload/Container.tsx +117 -0
- package/src/form-field/input/components/file-upload/DragAndDrop.tsx +65 -0
- package/src/form-field/input/components/text/Box.tsx +134 -0
- package/src/form-field/input/components/text/index.tsx +7 -0
- package/src/form-field/input/index.tsx +19 -0
- package/src/form-field/input/input.scss +2 -0
- package/src/form-field/input/styled.tsx +5 -0
- package/src/form-field/input/styles/scss/size.scss +39 -0
- package/src/form-field/input/styles/scss/theme.scss +39 -0
- package/src/form-field/input/styles/styled-components/base.ts +96 -0
- package/src/form-field/input/styles/styled-components/calendar.ts +18 -0
- package/src/form-field/input/styles/styled-components/click.ts +37 -0
- package/src/form-field/input/styles/styled-components/input-file.ts +26 -0
- package/src/form-field/input/styles/styled-components/mixin.ts +200 -0
- package/src/form-field/input/styles/styled-components/util.ts +47 -0
- package/src/form-field/select/components/Default.tsx +222 -0
- package/src/form-field/select/components/MultipleCategoryList.tsx +47 -0
- package/src/form-field/select/components/MultipleDefault.tsx +63 -0
- package/src/form-field/select/components/assets/Container.tsx +40 -0
- package/src/form-field/select/components/assets/dropdown/Default.tsx +114 -0
- package/src/form-field/select/components/assets/dropdown/MultipleCategoryList.tsx +95 -0
- package/src/form-field/select/components/assets/dropdown/MultipleDefault.tsx +149 -0
- package/src/form-field/select/components/assets/dropdown/Selected.tsx +48 -0
- package/src/form-field/select/index.tsx +13 -0
- package/src/form-field/select/select.scss +1 -0
- package/src/form-field/select/styled.tsx +5 -0
- package/src/form-field/select/styles/scss/variable.scss +14 -0
- package/src/form-field/select/styles/styled-components/base.ts +135 -0
- package/src/frame/components/breadcrumb/Arrow.tsx +18 -0
- package/src/frame/components/breadcrumb/Container.tsx +20 -0
- package/src/frame/components/breadcrumb/Dropdown.tsx +28 -0
- package/src/frame/components/breadcrumb/Item.tsx +30 -0
- package/src/frame/components/breadcrumb/Label.tsx +11 -0
- package/src/frame/components/breadcrumb/SelectBox.tsx +48 -0
- package/src/frame/components/breadcrumb/SelectItem.tsx +47 -0
- package/src/frame/components/breadcrumb/Selected.tsx +25 -0
- package/src/frame/components/breadcrumb/index.tsx +15 -0
- package/src/frame/components/header/Container.tsx +11 -0
- package/src/frame/components/header/Logo.tsx +19 -0
- package/src/frame/components/header/index.tsx +27 -0
- package/src/frame/components/header/util/Button.tsx +31 -0
- package/src/frame/components/header/util/Container.tsx +15 -0
- package/src/frame/components/header/util/Item.tsx +16 -0
- package/src/frame/components/header/util/logout/Logout.tsx +22 -0
- package/src/frame/components/header/util/notify/Container.tsx +57 -0
- package/src/frame/components/header/util/notify/Dropdown.tsx +24 -0
- package/src/frame/components/header/util/notify/List.tsx +56 -0
- package/src/frame/components/header/util/notify/OpenButton.tsx +35 -0
- package/src/frame/components/header/util/notify/RefreshButton.tsx +31 -0
- package/src/frame/components/header/util/profile/Avatar.tsx +19 -0
- package/src/frame/components/header/util/profile/Container.tsx +61 -0
- package/src/frame/components/header/util/profile/Dropdown.tsx +30 -0
- package/src/frame/components/header/util/profile/DropdownButton.tsx +27 -0
- package/src/frame/components/header/util/profile/Selected.tsx +29 -0
- package/src/frame/components/header/util/setting/Button.tsx +39 -0
- package/src/frame/components/header/util/time/Container.tsx +13 -0
- package/src/frame/components/header/util/time/Time.tsx +11 -0
- package/src/frame/components/index.tsx +17 -0
- package/src/frame/components/nav/Button.tsx +22 -0
- package/src/frame/components/nav/Container.tsx +64 -0
- package/src/frame/components/nav/Logo.tsx +24 -0
- package/src/frame/components/nav/index.tsx +5 -0
- package/src/frame/components/page/Container.tsx +11 -0
- package/src/frame/components/page/ServiceFrame.tsx +13 -0
- package/src/frame/components/page/ServiceMain.tsx +13 -0
- package/src/frame/components/page/ServiceMainWrapper.tsx +26 -0
- package/src/frame/components/page/index.tsx +14 -0
- package/src/frame/components/popup/Container.tsx +21 -0
- package/src/frame/components/popup/frame/Body.tsx +17 -0
- package/src/frame/components/popup/frame/Container.tsx +20 -0
- package/src/frame/components/popup/frame/Header.tsx +27 -0
- package/src/frame/components/popup/frame/index.tsx +11 -0
- package/src/frame/components/popup/index.tsx +9 -0
- package/src/frame/frame.scss +2 -0
- package/src/frame/index.tsx +3 -0
- package/src/frame/styled.tsx +3 -0
- package/src/frame/styles/scss/size.variables.scss +28 -0
- package/src/frame/styles/scss/theme.variables.scss +23 -0
- package/src/frame/styles/styled-components/breadcrumb/base.ts +126 -0
- package/src/frame/styles/styled-components/index.ts +13 -0
- package/src/frame/styles/styled-components/page/common.ts +66 -0
- package/src/frame/styles/styled-components/page/header.ts +44 -0
- package/src/frame/styles/styled-components/page/nav.ts +127 -0
- package/src/frame/styles/styled-components/page/util.common.ts +48 -0
- package/src/frame/styles/styled-components/page/util.notify.ts +116 -0
- package/src/frame/styles/styled-components/page/util.profile.ts +78 -0
- package/src/frame/styles/styled-components/popup/popup.ts +66 -0
- package/src/icon/components/alternate/Loading.tsx +15 -0
- package/src/icon/components/alternate/index.tsx +7 -0
- package/src/icon/components/arrow/dropdown/Breadcrumb.tsx +20 -0
- package/src/icon/components/arrow/dropdown/Select.tsx +20 -0
- package/src/icon/components/arrow/index.tsx +11 -0
- package/src/icon/components/button/Close.tsx +20 -0
- package/src/icon/components/button/Filter.tsx +19 -0
- package/src/icon/components/button/Refresh.tsx +18 -0
- package/src/icon/components/button/Reset.tsx +18 -0
- package/src/icon/components/button/add/Outline.tsx +23 -0
- package/src/icon/components/button/add/Solid.tsx +23 -0
- package/src/icon/components/button/add/index.tsx +9 -0
- package/src/icon/components/button/index.tsx +17 -0
- package/src/icon/components/button/remove/Outline.tsx +23 -0
- package/src/icon/components/button/remove/Solid.tsx +23 -0
- package/src/icon/components/button/remove/index.tsx +9 -0
- package/src/icon/components/cage/Fan.tsx +48 -0
- package/src/icon/components/cage/index.tsx +7 -0
- package/src/icon/components/chart/Control.tsx +40 -0
- package/src/icon/components/chart/index.tsx +7 -0
- package/src/icon/components/delta/Delta.tsx +79 -0
- package/src/icon/components/delta/index.tsx +3 -0
- package/src/icon/components/health-score/HealthScore.tsx +46 -0
- package/src/icon/components/health-score/index.tsx +3 -0
- package/src/icon/components/input/Checkbox.tsx +33 -0
- package/src/icon/components/input/Radio.tsx +17 -0
- package/src/icon/components/input/Search.tsx +12 -0
- package/src/icon/components/input/index.tsx +11 -0
- package/src/icon/components/nav/common/Farm.tsx +12 -0
- package/src/icon/components/nav/factory-service/CCTV.tsx +12 -0
- package/src/icon/components/nav/factory-service/Dashboard.tsx +12 -0
- package/src/icon/components/nav/factory-service/Home.tsx +12 -0
- package/src/icon/components/nav/factory-service/Message.tsx +12 -0
- package/src/icon/components/nav/factory-service/Productivity.tsx +12 -0
- package/src/icon/components/nav/farm-service/Analysis.tsx +12 -0
- package/src/icon/components/nav/farm-service/Control.tsx +12 -0
- package/src/icon/components/nav/farm-service/Dashboard.tsx +12 -0
- package/src/icon/components/nav/farm-service/Eggs.tsx +12 -0
- package/src/icon/components/nav/farm-service/Feeding.tsx +12 -0
- package/src/icon/components/nav/farm-service/Feeds.tsx +12 -0
- package/src/icon/components/nav/farm-service/Flock.tsx +12 -0
- package/src/icon/components/nav/farm-service/Medicine.tsx +12 -0
- package/src/icon/components/nav/farm-service/Summary.tsx +12 -0
- package/src/icon/components/nav/index.tsx +44 -0
- package/src/icon/components/page-header/Check.tsx +12 -0
- package/src/icon/components/page-header/index.tsx +5 -0
- package/src/icon/components/tab-menu/Graph.tsx +12 -0
- package/src/icon/components/tab-menu/Table.tsx +12 -0
- package/src/icon/components/tab-menu/index.tsx +9 -0
- package/src/icon/components/table/index.tsx +9 -0
- package/src/icon/components/table/pagination/First.tsx +18 -0
- package/src/icon/components/table/pagination/Last.tsx +18 -0
- package/src/icon/components/table/pagination/Next.tsx +18 -0
- package/src/icon/components/table/pagination/Prev.tsx +18 -0
- package/src/icon/components/table/pagination/index.tsx +13 -0
- package/src/icon/components/table/sort/Asc.tsx +12 -0
- package/src/icon/components/table/sort/Common.tsx +12 -0
- package/src/icon/components/table/sort/Desc.tsx +12 -0
- package/src/icon/components/table/sort/index.tsx +11 -0
- package/src/icon/components/tooltip/Outline.tsx +7 -0
- package/src/icon/components/tooltip/Solid.tsx +7 -0
- package/src/icon/components/tooltip/index.tsx +9 -0
- package/src/icon/icon.scss +5 -0
- package/src/icon/index.tsx +31 -0
- package/src/icon/styled.tsx +17 -0
- package/src/icon/styles/scss/arrow.scss +6 -0
- package/src/icon/styles/scss/chart.scss +3 -0
- package/src/icon/styles/scss/input.scss +11 -0
- package/src/icon/styles/scss/page-header.scss +6 -0
- package/src/icon/styles/scss/table.scss +6 -0
- package/src/icon/styles/styled/arrow.ts +18 -0
- package/src/icon/styles/styled/chart.ts +17 -0
- package/src/icon/styles/styled/common.ts +27 -0
- package/src/icon/styles/styled/delta.ts +25 -0
- package/src/icon/styles/styled/input.ts +76 -0
- package/src/icon/styles/styled/page-header.ts +17 -0
- package/src/icon/styles/styled/table.ts +19 -0
- package/src/icon/svg/arrow/depth.svg +3 -0
- package/src/icon/svg/arrow/dropdown/breadcrumb.svg +3 -0
- package/src/icon/svg/arrow/dropdown/select.svg +3 -0
- package/src/icon/svg/button/add-outline.svg +4 -0
- package/src/icon/svg/button/add-solid.svg +3 -0
- package/src/icon/svg/button/close.svg +3 -0
- package/src/icon/svg/button/filter.svg +5 -0
- package/src/icon/svg/button/loading.svg +4 -0
- package/src/icon/svg/button/refresh.svg +4 -0
- package/src/icon/svg/button/remove-outline.svg +3 -0
- package/src/icon/svg/button/remove-solid.svg +3 -0
- package/src/icon/svg/button/reset.svg +3 -0
- package/src/icon/svg/chart/control/pan-left.svg +4 -0
- package/src/icon/svg/chart/control/pan-right.svg +4 -0
- package/src/icon/svg/chart/control/zoom-in.svg +4 -0
- package/src/icon/svg/chart/control/zoom-out.svg +4 -0
- package/src/icon/svg/delta/down-arrow.svg +4 -0
- package/src/icon/svg/delta/down-flat.svg +10 -0
- package/src/icon/svg/delta/down-rounded.svg +10 -0
- package/src/icon/svg/delta/up-arrow.svg +4 -0
- package/src/icon/svg/delta/up-flat.svg +10 -0
- package/src/icon/svg/delta/up-rounded.svg +10 -0
- package/src/icon/svg/input/search.svg +4 -0
- package/src/icon/svg/nav/factory-service/cctv.svg +3 -0
- package/src/icon/svg/nav/factory-service/dashboard.svg +3 -0
- package/src/icon/svg/nav/factory-service/farm.svg +3 -0
- package/src/icon/svg/nav/factory-service/home.svg +5 -0
- package/src/icon/svg/nav/factory-service/message.svg +3 -0
- package/src/icon/svg/nav/farm-service/analysis.svg +3 -0
- package/src/icon/svg/nav/farm-service/cctv.svg +3 -0
- package/src/icon/svg/nav/farm-service/control.svg +3 -0
- package/src/icon/svg/nav/farm-service/dashboard.svg +5 -0
- package/src/icon/svg/nav/farm-service/eggs.svg +3 -0
- package/src/icon/svg/nav/farm-service/feeds.svg +14 -0
- package/src/icon/svg/nav/farm-service/flock.svg +14 -0
- package/src/icon/svg/nav/farm-service/medicine.svg +4 -0
- package/src/icon/svg/nav/farm-service/summary.svg +7 -0
- package/src/icon/svg/nav/farm.svg +3 -0
- package/src/icon/svg/nav/grid.svg +3 -0
- package/src/icon/svg/nav/lock.svg +1 -0
- package/src/icon/svg/page-header/check.svg +3 -0
- package/src/icon/svg/tab-menu/graph.svg +3 -0
- package/src/icon/svg/tab-menu/table.svg +8 -0
- package/src/icon/svg/table/pagination/first.svg +4 -0
- package/src/icon/svg/table/pagination/last.svg +4 -0
- package/src/icon/svg/table/pagination/next.svg +3 -0
- package/src/icon/svg/table/pagination/prev.svg +3 -0
- package/src/icon/svg/table/sort/asc.svg +3 -0
- package/src/icon/svg/table/sort/common.svg +6 -0
- package/src/icon/svg/table/sort/desc.svg +3 -0
- package/src/icon/svg/tooltip/outline.svg +5 -0
- package/src/icon/svg/tooltip/solid.svg +3 -0
- package/src/index.scss +20 -0
- package/src/index.tsx +16 -0
- package/src/modal/components/assets/alert/MessageBox.tsx +26 -0
- package/src/modal/components/assets/alert/index.tsx +7 -0
- package/src/modal/components/assets/button/ButtonClose.tsx +34 -0
- package/src/modal/components/assets/button/ButtonDialog.tsx +32 -0
- package/src/modal/components/assets/button/index.tsx +6 -0
- package/src/modal/components/assets/form/ButtonContainer.tsx +18 -0
- package/src/modal/components/assets/form/Provider.tsx +12 -0
- package/src/modal/components/assets/form/index.tsx +9 -0
- package/src/modal/components/assets/layout/Body.tsx +7 -0
- package/src/modal/components/assets/layout/Container.tsx +37 -0
- package/src/modal/components/assets/layout/Footer.tsx +25 -0
- package/src/modal/components/assets/layout/Header.tsx +45 -0
- package/src/modal/components/assets/layout/index.tsx +14 -0
- package/src/modal/components/basic/Container.tsx +45 -0
- package/src/modal/components/basic/Provider.tsx +30 -0
- package/src/modal/components/basic/Root.tsx +84 -0
- package/src/modal/components/basic/index.tsx +11 -0
- package/src/modal/components/draggable/Container.tsx +75 -0
- package/src/modal/components/draggable/Provider.tsx +26 -0
- package/src/modal/components/draggable/index.tsx +9 -0
- package/src/modal/components/index.tsx +17 -0
- package/src/modal/hooks/useModal.ts +295 -0
- package/src/modal/index.tsx +3 -0
- package/src/modal/jotai/modal.ts +18 -0
- package/src/modal/modal.scss +2 -0
- package/src/modal/styled.tsx +15 -0
- package/src/modal/styles/scss/legacy.scss +254 -0
- package/src/modal/styles/scss/variables.scss +32 -0
- package/src/modal/styles/styled-components/alert.ts +24 -0
- package/src/modal/styles/styled-components/basic.ts +41 -0
- package/src/modal/styles/styled-components/draggable.ts +35 -0
- package/src/modal/styles/styled-components/form.ts +23 -0
- package/src/modal/styles/styled-components/layout.ts +106 -0
- package/src/modal/util.ts +4 -0
- package/src/scrollbar/components/Container.tsx +70 -0
- package/src/scrollbar/index.tsx +5 -0
- package/src/scrollbar/scrollbar.scss +2 -0
- package/src/scrollbar/styled.tsx +3 -0
- package/src/scrollbar/styles/scss/reset.scss +59 -0
- package/src/scrollbar/styles/scss/size.scss +4 -0
- package/src/scrollbar/styles/styled-components/scrollbar.ts +82 -0
- package/src/style-base/base.scss +6 -0
- package/src/style-base/essentials/calendar.scss +557 -0
- package/src/style-base/essentials/colors.scss +195 -0
- package/src/style-base/essentials/document.scss +14 -0
- package/src/style-base/essentials/fonts.scss +24 -0
- package/src/style-base/essentials/icon.scss +11 -0
- package/src/style-base/essentials/palette.scss +146 -0
- package/src/style-base/essentials/reset.scss +156 -0
- package/src/style-base/mantine.css +4 -0
- package/src/style-base/responsive.scss +57 -0
- package/src/style-config/index.ts +5 -0
- package/src/style-config/postcss/postcss-config.ts +9 -0
- package/src/styled.components.tsx +31 -0
- package/src/styled.template.tsx +5 -0
- package/src/tab-menu/components/custom/AddButton.tsx +32 -0
- package/src/tab-menu/components/custom/Container.tsx +60 -0
- package/src/tab-menu/components/custom/MenuButton.tsx +39 -0
- package/src/tab-menu/components/filter/Default.tsx +3 -0
- package/src/tab-menu/components/filter/WithData.tsx +36 -0
- package/src/tab-menu/components/mode/List.tsx +66 -0
- package/src/tab-menu/components/page/List.tsx +88 -0
- package/src/tab-menu/components/separated-square/List.tsx +66 -0
- package/src/tab-menu/components/text/List.tsx +53 -0
- package/src/tab-menu/index.tsx +21 -0
- package/src/tab-menu/styled.tsx +21 -0
- package/src/tab-menu/styles/scss/mode.scss +5 -0
- package/src/tab-menu/styles/scss/page-menu.scss +4 -0
- package/src/tab-menu/styles/scss/text-menu.scss +7 -0
- package/src/tab-menu/styles/styled-components/custom-menu.ts +80 -0
- package/src/tab-menu/styles/styled-components/filter-with-data.ts +72 -0
- package/src/tab-menu/styles/styled-components/mode-menu.ts +114 -0
- package/src/tab-menu/styles/styled-components/page-menu.ts +90 -0
- package/src/tab-menu/styles/styled-components/separated-square.ts +78 -0
- package/src/tab-menu/styles/styled-components/tab-menu.ts +21 -0
- package/src/tab-menu/styles/styled-components/text-menu.ts +73 -0
- package/src/tab-menu/tab-menu.scss +3 -0
- package/src/table/components/pagination/Button.tsx +61 -0
- package/src/table/components/pagination/Container.tsx +148 -0
- package/src/table/components/pagination/Icon.tsx +26 -0
- package/src/table/components/sort/Button.tsx +34 -0
- package/src/table/components/tables/Container.tsx +41 -0
- package/src/table/components/tables/basic/Container.tsx +52 -0
- package/src/table/components/tables/basic/index.tsx +13 -0
- package/src/table/components/tables/common/Body.tsx +29 -0
- package/src/table/components/tables/common/Cell.tsx +32 -0
- package/src/table/components/tables/common/CellWrap.tsx +27 -0
- package/src/table/components/tables/common/ColGroup.tsx +30 -0
- package/src/table/components/tables/common/DefaultTemplate.tsx +37 -0
- package/src/table/components/tables/common/Foot.tsx +25 -0
- package/src/table/components/tables/common/Head.tsx +25 -0
- package/src/table/components/tables/common/HeadDefault.tsx +42 -0
- package/src/table/components/tables/common/Row.tsx +36 -0
- package/src/table/components/tables/common/TopLine.tsx +11 -0
- package/src/table/components/tables/common/index.tsx +37 -0
- package/src/table/components/tables/grid/Cell.tsx +25 -0
- package/src/table/components/tables/grid/Container.tsx +23 -0
- package/src/table/components/tables/grid/Contents.tsx +25 -0
- package/src/table/components/tables/grid/index.tsx +19 -0
- package/src/table/components/tables/list/Container.tsx +36 -0
- package/src/table/components/tables/list/index.tsx +13 -0
- package/src/table/components/tables/sheet/Container.tsx +39 -0
- package/src/table/components/tables/sheet/index.tsx +13 -0
- package/src/table/hooks/index.ts +5 -0
- package/src/table/hooks/useTableColumns.ts +24 -0
- package/src/table/hooks/useTablePage.ts +150 -0
- package/src/table/hooks/useTableRowCheck.ts +112 -0
- package/src/table/hooks/useTableSearch.ts +69 -0
- package/src/table/hooks/useTableSort.ts +108 -0
- package/src/table/index.tsx +37 -0
- package/src/table/styled.tsx +3 -0
- package/src/table/styles/scss/common.scss +31 -0
- package/src/table/styles/scss/pagination.scss +14 -0
- package/src/table/styles/scss/reset.scss +7 -0
- package/src/table/styles/styled/basic.ts +59 -0
- package/src/table/styles/styled/common.ts +123 -0
- package/src/table/styles/styled/grid.ts +62 -0
- package/src/table/styles/styled/index.ts +20 -0
- package/src/table/styles/styled/list.ts +38 -0
- package/src/table/styles/styled/pagination.ts +77 -0
- package/src/table/styles/styled/sort.ts +25 -0
- package/src/table/styles/styled/spreadsheet.ts +86 -0
- package/src/table/table.scss +3 -0
- package/src/table/util.ts +1 -0
- package/src/template/compare/compare.scss +1 -0
- package/src/template/compare/components/box/Container.tsx +33 -0
- package/src/template/compare/components/box/TextStrong.tsx +15 -0
- package/src/template/compare/components/box/TextSub.tsx +15 -0
- package/src/template/compare/components/box/index.tsx +11 -0
- package/src/template/compare/components/button/Remove.tsx +28 -0
- package/src/template/compare/components/button/index.tsx +5 -0
- package/src/template/compare/components/chart/Container.tsx +33 -0
- package/src/template/compare/components/chart/graph/Container.tsx +15 -0
- package/src/template/compare/components/chart/graph/Item.tsx +13 -0
- package/src/template/compare/components/chart/index.tsx +16 -0
- package/src/template/compare/components/chart/legend/Container.tsx +23 -0
- package/src/template/compare/components/chart/legend/Section.tsx +31 -0
- package/src/template/compare/components/select-list/Container.tsx +15 -0
- package/src/template/compare/components/select-list/Header.tsx +15 -0
- package/src/template/compare/components/select-list/Item.tsx +15 -0
- package/src/template/compare/components/select-list/List.tsx +18 -0
- package/src/template/compare/components/select-list/index.tsx +13 -0
- package/src/template/compare/index.tsx +13 -0
- package/src/template/compare/styled.tsx +17 -0
- package/src/template/compare/styles/scss/variables.scss +17 -0
- package/src/template/compare/styles/styled-components/chart/graph.ts +26 -0
- package/src/template/compare/styles/styled-components/chart/layout.ts +38 -0
- package/src/template/compare/styles/styled-components/chart/legend.ts +64 -0
- package/src/template/compare/styles/styled-components/common.ts +57 -0
- package/src/template/compare/styles/styled-components/select-list.ts +36 -0
- package/src/template/filter/components/Container.tsx +39 -0
- package/src/template/filter/components/Group.tsx +100 -0
- package/src/template/filter/components/ToggleButton.tsx +27 -0
- package/src/template/filter/index.tsx +5 -0
- package/src/template/filter/styled.tsx +3 -0
- package/src/template/filter/styles/styled-components/filter.ts +66 -0
- package/src/template/health-score/components/Chart.tsx +38 -0
- package/src/template/health-score/index.tsx +3 -0
- package/src/template/health-score/styled.tsx +3 -0
- package/src/template/health-score/styles/styled/chart.ts +26 -0
- package/src/template.tsx +5 -0
- package/src/text-editor/components/Container.tsx +68 -0
- package/src/text-editor/components/Contents.tsx +14 -0
- package/src/text-editor/components/toolbar/Container.tsx +20 -0
- package/src/text-editor/components/toolbar/ControlsGroup.tsx +18 -0
- package/src/text-editor/components/toolbar/align/Center.tsx +23 -0
- package/src/text-editor/components/toolbar/align/Justify.tsx +23 -0
- package/src/text-editor/components/toolbar/align/Left.tsx +23 -0
- package/src/text-editor/components/toolbar/align/Right.tsx +23 -0
- package/src/text-editor/components/toolbar/index.tsx +35 -0
- package/src/text-editor/components/toolbar/list/Bullet.tsx +23 -0
- package/src/text-editor/components/toolbar/list/Ordered.tsx +23 -0
- package/src/text-editor/components/toolbar/text/Bold.tsx +23 -0
- package/src/text-editor/components/toolbar/text/Italic.tsx +23 -0
- package/src/text-editor/components/toolbar/text/Strike.tsx +27 -0
- package/src/text-editor/components/toolbar/text/Underline.tsx +23 -0
- package/src/text-editor/index.tsx +11 -0
- package/src/text-editor/styled.tsx +5 -0
- package/src/text-editor/styles/scss/style.scss +10 -0
- package/src/text-editor/styles/scss/theme.scss +17 -0
- package/src/text-editor/styles/styled/editor.ts +73 -0
- package/src/text-editor/svg/align/center.svg +6 -0
- package/src/text-editor/svg/align/justify.svg +6 -0
- package/src/text-editor/svg/align/left.svg +6 -0
- package/src/text-editor/svg/align/right.svg +6 -0
- package/src/text-editor/svg/list/bullet.svg +8 -0
- package/src/text-editor/svg/list/ordered.svg +8 -0
- package/src/text-editor/svg/text/bold.svg +4 -0
- package/src/text-editor/svg/text/italic.svg +5 -0
- package/src/text-editor/svg/text/strikethrough.svg +4 -0
- package/src/text-editor/svg/text/underline.svg +4 -0
- package/src/text-editor/text-editor.scss +2 -0
- package/src/tooltip/components/Help.tsx +38 -0
- package/src/tooltip/components/MessageBox.tsx +26 -0
- package/src/tooltip/components/Wrapper.tsx +34 -0
- package/src/tooltip/index.tsx +11 -0
- package/src/tooltip/styled.tsx +9 -0
- package/src/tooltip/styles/scss/size.scss +4 -0
- package/src/tooltip/styles/styled-components/base.ts +20 -0
- package/src/tooltip/styles/styled-components/help.ts +17 -0
- package/src/tooltip/styles/styled-components/message-box.ts +74 -0
- package/src/tooltip/tooltip.scss +1 -0
- package/src/types/button/base.d.ts +91 -0
- package/src/types/button/index.d.ts +2 -0
- package/src/types/button/multiple.d.ts +6 -0
- package/src/types/chart/axis.d.ts +15 -0
- package/src/types/chart/control.d.ts +109 -0
- package/src/types/chart/data.d.ts +41 -0
- package/src/types/chart/dot.d.ts +3 -0
- package/src/types/chart/index.d.ts +7 -0
- package/src/types/chart/legend.d.ts +124 -0
- package/src/types/chart/props.d.ts +271 -0
- package/src/types/chart/tick.d.ts +30 -0
- package/src/types/chip/index.d.ts +1 -0
- package/src/types/chip/props.d.ts +14 -0
- package/src/types/common.d.ts +16 -0
- package/src/types/delta/index.d.ts +1 -0
- package/src/types/delta/option.d.ts +57 -0
- package/src/types/form/common/format.d.ts +15 -0
- package/src/types/form/common/hook.d.ts +74 -0
- package/src/types/form/common/index.d.ts +6 -0
- package/src/types/form/common/label.d.ts +11 -0
- package/src/types/form/common/props.d.ts +136 -0
- package/src/types/form/common/state.d.ts +96 -0
- package/src/types/form/common/validation.d.ts +18 -0
- package/src/types/form/index.d.ts +5 -0
- package/src/types/form/input/index.d.ts +7 -0
- package/src/types/form/input/legacy/auto-complete.d.ts +77 -0
- package/src/types/form/input/legacy/base.d.ts +159 -0
- package/src/types/form/input/legacy/find-address.d.ts +7 -0
- package/src/types/form/input/legacy/refer.d.ts +84 -0
- package/src/types/form/input/legacy/select.options.d.ts +123 -0
- package/src/types/form/input/props.d.ts +156 -0
- package/src/types/form/search/index.d.ts +1 -0
- package/src/types/form/search/search.d.ts +4 -0
- package/src/types/form/select/index.d.ts +2 -0
- package/src/types/form/select/option.d.ts +43 -0
- package/src/types/form/select/props.d.ts +101 -0
- package/src/types/form/util/find-address.d.ts +7 -0
- package/src/types/form/util/index.d.ts +1 -0
- package/src/types/frame/index.d.ts +2 -0
- package/src/types/frame/notify.d.ts +7 -0
- package/src/types/frame/sitemap.d.ts +38 -0
- package/src/types/icon/delta.d.ts +32 -0
- package/src/types/icon/fan.d.ts +17 -0
- package/src/types/icon/index.d.ts +2 -0
- package/src/types/index.d.ts +15 -0
- package/src/types/location/geojson.d.ts +59 -0
- package/src/types/location/index.d.ts +2 -0
- package/src/types/location/region.d.ts +19 -0
- package/src/types/modal/index.d.ts +2 -0
- package/src/types/modal/modal.d.ts +88 -0
- package/src/types/modal/modal.options.d.ts +33 -0
- package/src/types/style-option.d.ts +33 -0
- package/src/types/tab-menu/index.d.ts +1 -0
- package/src/types/tab-menu/tab-menu.d.ts +37 -0
- package/src/types/table/components/pagination.d.ts +7 -0
- package/src/types/table/components/props.d.ts +104 -0
- package/src/types/table/data/column.d.ts +60 -0
- package/src/types/table/data/row.d.ts +26 -0
- package/src/types/table/index.d.ts +10 -0
- package/src/types/table/layout/grid.d.ts +8 -0
- package/src/types/table/layout/layout.d.ts +3 -0
- package/src/types/table/utils/row.check.d.ts +37 -0
- package/src/types/template/compare/chart.d.ts +8 -0
- package/src/types/template/filter.d.ts +39 -0
- package/src/types/template/index.d.ts +2 -0
- package/src/types/weather/api.d.ts +184 -0
- package/src/types/weather/base.d.ts +14 -0
- package/src/types/weather/index.d.ts +4 -0
- package/src/types/weather/korea.d.ts +163 -0
- package/src/types/weather/open-weather-map.d.ts +181 -0
- package/src/weather/apis/index.ts +4 -0
- package/src/weather/apis/korea/client.ts +93 -0
- package/src/weather/apis/korea/server.ts +250 -0
- package/src/weather/apis/open-weather-map/client.ts +69 -0
- package/src/weather/apis/open-weather-map/server.ts +134 -0
- package/src/weather/components/icon/Address.tsx +17 -0
- package/src/weather/components/icon/Weather.tsx +33 -0
- package/src/weather/components/index.tsx +7 -0
- package/src/weather/components/page-header/Address.tsx +21 -0
- package/src/weather/components/page-header/Alert.tsx +42 -0
- package/src/weather/components/page-header/Container.tsx +14 -0
- package/src/weather/components/page-header/Forecast.tsx +23 -0
- package/src/weather/components/page-header/NextDays.tsx +34 -0
- package/src/weather/components/page-header/Today.tsx +153 -0
- package/src/weather/data/alert-regions-meta.json +1286 -0
- package/src/weather/data/response.ts +36 -0
- package/src/weather/data/weather-regions-meta.json +9833 -0
- package/src/weather/hooks/index.ts +4 -0
- package/src/weather/hooks/useOpenWeatherMap.ts +31 -0
- package/src/weather/hooks/useWeatherKorea.ts +58 -0
- package/src/weather/hooks/useWeatherKoreaAlert.ts +22 -0
- package/src/weather/index.tsx +4 -0
- package/src/weather/jotai/coordinate.ts +16 -0
- package/src/weather/jotai/farm-idx.ts +5 -0
- package/src/weather/jotai/index.ts +2 -0
- package/src/weather/styled.tsx +13 -0
- package/src/weather/styles/styled-components/alert.ts +30 -0
- package/src/weather/styles/styled-components/base.ts +79 -0
- package/src/weather/styles/styled-components/next-days.ts +25 -0
- package/src/weather/styles/styled-components/today.ts +40 -0
- package/src/weather/utils/alert.ts +30 -0
- package/src/weather/utils/date-time.ts +68 -0
- package/src/weather/utils/index.ts +4 -0
- package/src/weather/utils/location.ts +159 -0
- package/src/weather/utils/validate.ts +9 -0
- package/src/weather/utils/weather.ts +304 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useEffect, useState } from "react";
|
|
4
|
+
import { useAtom } from "jotai";
|
|
5
|
+
|
|
6
|
+
import { modalDraggableState, modalState } from "../jotai/modal";
|
|
7
|
+
|
|
8
|
+
import type { CloseFlagType, ModalStateType } from "../../types";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 모달 Hook
|
|
12
|
+
* - 모달 스택 추가 -> 스택 추가 시, 자동 open 처리
|
|
13
|
+
*/
|
|
14
|
+
export default function useModal(isDraggable?: "draggable") {
|
|
15
|
+
// 활성화된 모든 모달 스택 상태관리
|
|
16
|
+
const [modalStacks, updateModalStack] = useAtom<ModalStateType[]>(modalState);
|
|
17
|
+
// 드래거블 모달 스택관리
|
|
18
|
+
const [modalDraggableStacks, updateModalDraggableStack] =
|
|
19
|
+
useAtom<ModalStateType[]>(modalDraggableState);
|
|
20
|
+
|
|
21
|
+
// 모달 닫기 시, 지연시간 적용을 위한 플래그
|
|
22
|
+
const [closeFlag, setCloseFlag] = useState<CloseFlagType>({
|
|
23
|
+
stackKey: "",
|
|
24
|
+
showDelay: 400,
|
|
25
|
+
callback: undefined,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// 스택 중복 확인
|
|
29
|
+
const isExistStack = useCallback(
|
|
30
|
+
(stackState: ModalStateType[], stackKey: string): boolean => {
|
|
31
|
+
const matched = stackState.filter(
|
|
32
|
+
stack => stack.stackKey === stackKey,
|
|
33
|
+
)[0];
|
|
34
|
+
return matched?.stackKey ? true : false;
|
|
35
|
+
},
|
|
36
|
+
[],
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 모달 스택 추가
|
|
41
|
+
* @param {ModalStateType} newStack 새로 추가할 모달스택 상태객체
|
|
42
|
+
*/
|
|
43
|
+
const newModal = useCallback(
|
|
44
|
+
(newStack: ModalStateType) => {
|
|
45
|
+
if (isDraggable) {
|
|
46
|
+
// 드래거블 모달 열기
|
|
47
|
+
if (isExistStack(modalDraggableStacks, newStack.stackKey)) {
|
|
48
|
+
console.log(`이미 열려있는 모달입니다.`, newStack.stackKey);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
updateModalDraggableStack((stacks: ModalStateType[]) => [
|
|
52
|
+
...stacks,
|
|
53
|
+
{
|
|
54
|
+
...newStack,
|
|
55
|
+
modalProps: { ...newStack.modalProps, show: "init" },
|
|
56
|
+
},
|
|
57
|
+
]);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// 일반 모달 열기
|
|
62
|
+
if (isExistStack(modalStacks, newStack.stackKey)) {
|
|
63
|
+
console.log(`이미 열려있는 모달입니다.`, newStack.stackKey);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
updateModalStack((stacks: ModalStateType[]) => [
|
|
67
|
+
...stacks,
|
|
68
|
+
{ ...newStack, modalProps: { ...newStack.modalProps, show: "init" } },
|
|
69
|
+
]);
|
|
70
|
+
|
|
71
|
+
// console.log(`[useModal :: newModal] newStack: `, newStack);
|
|
72
|
+
// console.log(`[useModal :: newModal] modalStacks: `, modalStacks);
|
|
73
|
+
},
|
|
74
|
+
[
|
|
75
|
+
isDraggable,
|
|
76
|
+
isExistStack,
|
|
77
|
+
modalDraggableStacks,
|
|
78
|
+
modalStacks,
|
|
79
|
+
updateModalDraggableStack,
|
|
80
|
+
updateModalStack,
|
|
81
|
+
],
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 모달 스택 상태 업데이트
|
|
86
|
+
* @param {ModalStateType} updateStack 업데이트할 모달스택 상태객체
|
|
87
|
+
*/
|
|
88
|
+
const updateModal = useCallback(
|
|
89
|
+
(updateStack: ModalStateType) => {
|
|
90
|
+
// console.log(`[useModal :: updateModal] updateStack: `, updateStack);
|
|
91
|
+
// console.log(`[useModal :: updateModal] modalStacks: `, modalStacks);
|
|
92
|
+
|
|
93
|
+
// 드래거블 모달 상태 업데이트
|
|
94
|
+
if (isDraggable) {
|
|
95
|
+
updateModalDraggableStack((stacks: ModalStateType[]) => {
|
|
96
|
+
const { stackKey } = updateStack;
|
|
97
|
+
const updatedStacks = stacks.map((stack: ModalStateType) => {
|
|
98
|
+
if (stack.stackKey === stackKey)
|
|
99
|
+
return {
|
|
100
|
+
...stack,
|
|
101
|
+
...updateStack,
|
|
102
|
+
modalProps: { ...stack.modalProps, ...updateStack.modalProps },
|
|
103
|
+
};
|
|
104
|
+
return stack;
|
|
105
|
+
});
|
|
106
|
+
return updatedStacks;
|
|
107
|
+
});
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// 일반 모달 상태 업데이트
|
|
112
|
+
updateModalStack((stacks: ModalStateType[]) => {
|
|
113
|
+
const { stackKey } = updateStack;
|
|
114
|
+
const updatedStacks = stacks.map((stack: ModalStateType) => {
|
|
115
|
+
if (stack.stackKey === stackKey)
|
|
116
|
+
return {
|
|
117
|
+
...stack,
|
|
118
|
+
...updateStack,
|
|
119
|
+
modalProps: { ...stack.modalProps, ...updateStack.modalProps },
|
|
120
|
+
};
|
|
121
|
+
return stack;
|
|
122
|
+
});
|
|
123
|
+
return updatedStacks;
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
[isDraggable, updateModalDraggableStack, updateModalStack],
|
|
127
|
+
// [modalStacks, updateModalStack],
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 모달 스택 닫기
|
|
132
|
+
* @param {string} stackKey 모달창을 닫을 스택의 stackKey
|
|
133
|
+
*/
|
|
134
|
+
const closeModal = useCallback(
|
|
135
|
+
({
|
|
136
|
+
stackKey: closeStackKey,
|
|
137
|
+
callback,
|
|
138
|
+
}: {
|
|
139
|
+
stackKey: string;
|
|
140
|
+
callback?: () => void;
|
|
141
|
+
}) => {
|
|
142
|
+
// console.log(`[useModal :: closeModal] stackKey:`, closeStackKey);
|
|
143
|
+
// console.log(`[useModal :: closeModal] modalStacks:`, modalStacks);
|
|
144
|
+
|
|
145
|
+
// 모달스택 존재여부 체크
|
|
146
|
+
if (
|
|
147
|
+
(isDraggable && modalDraggableStacks.length === 0) ||
|
|
148
|
+
(!isDraggable && modalStacks.length === 0)
|
|
149
|
+
) {
|
|
150
|
+
console.log(`[useModal :: closeModal] modalStacks 없음`);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// console.log(
|
|
155
|
+
// `modalStacks`,
|
|
156
|
+
// modalStacks.map(stack => stack.stackKey),
|
|
157
|
+
// );
|
|
158
|
+
// 지정 키와 일치하는 스택 체크
|
|
159
|
+
const filteredStacks = isDraggable
|
|
160
|
+
? modalDraggableStacks.filter(stack => {
|
|
161
|
+
// console.log(
|
|
162
|
+
// `stack.stackKey(${stack.stackKey}) === closeStackKey${closeStackKey}`,
|
|
163
|
+
// );
|
|
164
|
+
return stack.stackKey === closeStackKey;
|
|
165
|
+
})
|
|
166
|
+
: modalStacks.filter(stack => {
|
|
167
|
+
// console.log(
|
|
168
|
+
// `stack.stackKey(${stack.stackKey}) === closeStackKey${closeStackKey}`,
|
|
169
|
+
// );
|
|
170
|
+
return stack.stackKey === closeStackKey;
|
|
171
|
+
});
|
|
172
|
+
// console.log(`[useModal :: closeModal] filteredStacks: `, filteredStacks);
|
|
173
|
+
|
|
174
|
+
if (filteredStacks.length === 0) {
|
|
175
|
+
console.log(
|
|
176
|
+
`[useModal :: closeModal] 지정된 모달 스택키와 일치하는 스택 없음. `,
|
|
177
|
+
);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const closeStack = filteredStacks[0] as ModalStateType;
|
|
182
|
+
// console.log(`[useModal :: closeModal] closeStack: `, closeStack);
|
|
183
|
+
|
|
184
|
+
const {
|
|
185
|
+
modalProps: { showDelay },
|
|
186
|
+
} = closeStack;
|
|
187
|
+
|
|
188
|
+
// 효과 먼저 적용
|
|
189
|
+
if (isDraggable)
|
|
190
|
+
updateModalDraggableStack((stacks: ModalStateType[]) => {
|
|
191
|
+
return stacks.map((stack: ModalStateType) => {
|
|
192
|
+
if (stack.stackKey === closeStackKey) {
|
|
193
|
+
return {
|
|
194
|
+
...stack,
|
|
195
|
+
modalProps: { ...stack.modalProps, show: false },
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
return stack;
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
else
|
|
202
|
+
updateModalStack((stacks: ModalStateType[]) => {
|
|
203
|
+
return stacks.map((stack: ModalStateType) => {
|
|
204
|
+
if (stack.stackKey === closeStackKey) {
|
|
205
|
+
return {
|
|
206
|
+
...stack,
|
|
207
|
+
modalProps: { ...stack.modalProps, show: false },
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
return stack;
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
// 닫기 상태 업데이트
|
|
215
|
+
const updateCloseFlag = {
|
|
216
|
+
stackKey: closeStackKey,
|
|
217
|
+
showDelay: typeof showDelay === "number" ? showDelay : 400,
|
|
218
|
+
callback,
|
|
219
|
+
};
|
|
220
|
+
setCloseFlag(updateCloseFlag);
|
|
221
|
+
},
|
|
222
|
+
[
|
|
223
|
+
isDraggable,
|
|
224
|
+
modalDraggableStacks,
|
|
225
|
+
modalStacks,
|
|
226
|
+
updateModalDraggableStack,
|
|
227
|
+
updateModalStack,
|
|
228
|
+
],
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
// 닫기 동작 시, 닫기 모션 후 스택 제거
|
|
232
|
+
useEffect(() => {
|
|
233
|
+
if (!closeFlag.stackKey) return;
|
|
234
|
+
// console.log(`[useModal :: closeModal - useEffect] closeFlag:`, closeFlag);
|
|
235
|
+
|
|
236
|
+
// 효과 지연시간 이후 모달스택 제거
|
|
237
|
+
let closeTimer: NodeJS.Timeout | undefined = undefined;
|
|
238
|
+
|
|
239
|
+
// 지연 시간 뒤 동작
|
|
240
|
+
closeTimer = setTimeout(() => {
|
|
241
|
+
// 모달 스택 업데이트
|
|
242
|
+
if (isDraggable)
|
|
243
|
+
updateModalDraggableStack((stacks: ModalStateType[]) => {
|
|
244
|
+
// 스택이 없는 경우, 그대로 반환
|
|
245
|
+
if (stacks.length === 0) return stacks;
|
|
246
|
+
|
|
247
|
+
// 닫아야하는 모달 스택키와 불일치하는 배열로만 반환
|
|
248
|
+
const filteredStacks = stacks.filter(
|
|
249
|
+
stack => stack.stackKey !== closeFlag.stackKey,
|
|
250
|
+
);
|
|
251
|
+
|
|
252
|
+
// console.log(
|
|
253
|
+
// `[useModal :: closeModal - useEffect] update filteredStacks:`,
|
|
254
|
+
// filteredStacks,
|
|
255
|
+
// );
|
|
256
|
+
return filteredStacks;
|
|
257
|
+
});
|
|
258
|
+
else
|
|
259
|
+
updateModalStack((stacks: ModalStateType[]) => {
|
|
260
|
+
// 스택이 없는 경우, 그대로 반환
|
|
261
|
+
if (stacks.length === 0) return stacks;
|
|
262
|
+
|
|
263
|
+
// 닫아야하는 모달 스택키와 불일치하는 배열로만 반환
|
|
264
|
+
const filteredStacks = stacks.filter(
|
|
265
|
+
stack => stack.stackKey !== closeFlag.stackKey,
|
|
266
|
+
);
|
|
267
|
+
|
|
268
|
+
// console.log(
|
|
269
|
+
// `[useModal :: closeModal - useEffect] update filteredStacks:`,
|
|
270
|
+
// filteredStacks,
|
|
271
|
+
// );
|
|
272
|
+
return filteredStacks;
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
if (closeFlag.callback) closeFlag.callback();
|
|
276
|
+
|
|
277
|
+
// 닫기 상태 초기화
|
|
278
|
+
setCloseFlag({ stackKey: "", showDelay: 400 });
|
|
279
|
+
}, closeFlag.showDelay);
|
|
280
|
+
|
|
281
|
+
// 언마운트 시 타이머 초기화
|
|
282
|
+
return () => {
|
|
283
|
+
if (closeTimer !== undefined) clearTimeout(closeTimer);
|
|
284
|
+
closeTimer = undefined;
|
|
285
|
+
};
|
|
286
|
+
}, [closeFlag, isDraggable, updateModalDraggableStack, updateModalStack]);
|
|
287
|
+
|
|
288
|
+
return {
|
|
289
|
+
modalStacks,
|
|
290
|
+
modalDraggableStacks,
|
|
291
|
+
newModal,
|
|
292
|
+
updateModal,
|
|
293
|
+
closeModal,
|
|
294
|
+
};
|
|
295
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { atom } from "jotai";
|
|
2
|
+
import type { ModalStateType } from "../../types";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 모달 상태관리
|
|
6
|
+
* @state
|
|
7
|
+
* @desc
|
|
8
|
+
* - 스택을 배열로 관리
|
|
9
|
+
*/
|
|
10
|
+
export const modalState = atom<ModalStateType[]>([]);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 드래거블 모달 상태관리
|
|
14
|
+
* @state
|
|
15
|
+
* @desc
|
|
16
|
+
* - 스택을 배열로 관리
|
|
17
|
+
*/
|
|
18
|
+
export const modalDraggableState = atom<ModalStateType[]>([]);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import StyledModalAlert from "./styles/styled-components/alert";
|
|
2
|
+
import StyledModalBasic from "./styles/styled-components/basic";
|
|
3
|
+
import StyledModalDraggable from "./styles/styled-components/draggable";
|
|
4
|
+
import StyledModalForm from "./styles/styled-components/form";
|
|
5
|
+
import StyledModalLayout from "./styles/styled-components/layout";
|
|
6
|
+
|
|
7
|
+
const StyledModal = {
|
|
8
|
+
layout: StyledModalLayout,
|
|
9
|
+
basic: StyledModalBasic,
|
|
10
|
+
draggable: StyledModalDraggable,
|
|
11
|
+
form: StyledModalForm,
|
|
12
|
+
alert: StyledModalAlert,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default StyledModal;
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
.modal-container {
|
|
2
|
+
&[modal-type="dialog-with-header"] {
|
|
3
|
+
width: var(--modal-width-type-dialog-with-header);
|
|
4
|
+
}
|
|
5
|
+
&[modal-type="dialog-without-header"] {
|
|
6
|
+
width: var(--modal-width-type-dialog-without-header);
|
|
7
|
+
}
|
|
8
|
+
&[modal-type="dialog-without-header-no-buttons"] {
|
|
9
|
+
width: var(--modal-width-type-dialog-without-header-no-buttons);
|
|
10
|
+
}
|
|
11
|
+
&[modal-type="info-without-header"] {
|
|
12
|
+
width: var(--modal-width-type-info-without-header);
|
|
13
|
+
}
|
|
14
|
+
&[modal-type="dialog-form-with-header"] {
|
|
15
|
+
width: var(--modal-width-type-dialog-with-header);
|
|
16
|
+
}
|
|
17
|
+
&[modal-type="dialog-form-without-header"] {
|
|
18
|
+
width: var(--modal-width-type-dialog-without-header);
|
|
19
|
+
}
|
|
20
|
+
&[modal-type="form-row"] {
|
|
21
|
+
width: var(--modal-width-type-form-row);
|
|
22
|
+
}
|
|
23
|
+
&[modal-type="form-row-wider"] {
|
|
24
|
+
width: var(--modal-width-type-form-row-wider);
|
|
25
|
+
}
|
|
26
|
+
&[modal-type="form-table-view"] {
|
|
27
|
+
width: var(--modal-width-type-form-table-view);
|
|
28
|
+
}
|
|
29
|
+
&[modal-type="form-table-view-larger"] {
|
|
30
|
+
width: var(--modal-width-type-form-table-view-larger);
|
|
31
|
+
}
|
|
32
|
+
&[modal-type="form-table-simple"] {
|
|
33
|
+
width: var(--modal-width-type-form-table-simple);
|
|
34
|
+
}
|
|
35
|
+
&[modal-type="form-table-massive"] {
|
|
36
|
+
width: var(--modal-width-type-form-table-massive);
|
|
37
|
+
}
|
|
38
|
+
&[modal-type="form-search"] {
|
|
39
|
+
width: var(--modal-width-type-form-search);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&[modal-type^="dialog"] {
|
|
43
|
+
display: block;
|
|
44
|
+
border-radius: 8px;
|
|
45
|
+
.modal-body {
|
|
46
|
+
flex: 0;
|
|
47
|
+
// padding: 20px;
|
|
48
|
+
}
|
|
49
|
+
.modal-dialog-message-container {
|
|
50
|
+
width: 100%;
|
|
51
|
+
&.only-message {
|
|
52
|
+
padding: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
&[modal-type^="dialog-without"] {
|
|
57
|
+
padding: 20px;
|
|
58
|
+
--button-name-size-modal: 14px;
|
|
59
|
+
.modal-header {
|
|
60
|
+
--modal-header-height: 24px;
|
|
61
|
+
--modal-header-bg: transparent;
|
|
62
|
+
--modal-header-border-color: transparent;
|
|
63
|
+
margin-top: 20px;
|
|
64
|
+
padding: 0;
|
|
65
|
+
margin: 0;
|
|
66
|
+
}
|
|
67
|
+
.modal-body {
|
|
68
|
+
padding-top: 20px;
|
|
69
|
+
padding-bottom: 20px;
|
|
70
|
+
}
|
|
71
|
+
.modal-footer {
|
|
72
|
+
padding: 0;
|
|
73
|
+
margin-top: 20px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
&[modal-type="dialog-info-without-header"] {
|
|
77
|
+
padding: 20px;
|
|
78
|
+
--button-name-size-modal: 14px;
|
|
79
|
+
.modal-header {
|
|
80
|
+
--modal-header-height: 24px;
|
|
81
|
+
--modal-header-bg: transparent;
|
|
82
|
+
--modal-header-border-color: transparent;
|
|
83
|
+
margin-top: 20px;
|
|
84
|
+
padding: 0;
|
|
85
|
+
margin: 0;
|
|
86
|
+
}
|
|
87
|
+
.modal-body {
|
|
88
|
+
padding: 0;
|
|
89
|
+
}
|
|
90
|
+
.modal-footer {
|
|
91
|
+
padding: 0;
|
|
92
|
+
margin-top: 20px;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
&[modal-type="dialog-without-header-no-buttons"] {
|
|
96
|
+
.modal-header {
|
|
97
|
+
.modal-header-close-button {
|
|
98
|
+
width: 18px;
|
|
99
|
+
height: 18px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
p {
|
|
103
|
+
margin-bottom: 24px;
|
|
104
|
+
font-size: 16px;
|
|
105
|
+
line-height: 24px;
|
|
106
|
+
&:last-child {
|
|
107
|
+
margin-bottom: 0;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
&[modal-type^="dialog-form"] {
|
|
112
|
+
.modal-form-button-container {
|
|
113
|
+
padding-top: 20px;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
&[modal-type^="dialog-form-without"] {
|
|
117
|
+
padding: 20px;
|
|
118
|
+
.modal-header {
|
|
119
|
+
--modal-header-height: 24px;
|
|
120
|
+
--modal-header-bg: transparent;
|
|
121
|
+
--modal-header-border-color: transparent;
|
|
122
|
+
margin-top: 20px;
|
|
123
|
+
padding: 0;
|
|
124
|
+
margin: 0;
|
|
125
|
+
}
|
|
126
|
+
.modal-body {
|
|
127
|
+
padding: 20px 0 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.modal-dialog-message-container {
|
|
133
|
+
// width: 340px;
|
|
134
|
+
&.only-message {
|
|
135
|
+
padding: 30px 0;
|
|
136
|
+
text-align: center;
|
|
137
|
+
}
|
|
138
|
+
p {
|
|
139
|
+
font-size: 18px;
|
|
140
|
+
color: var(--color_90);
|
|
141
|
+
line-height: 27px;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.modal-radio-menu-container {
|
|
146
|
+
padding-top: 15px;
|
|
147
|
+
.input-item {
|
|
148
|
+
padding: 12px 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.input-container {
|
|
152
|
+
.input-label {
|
|
153
|
+
font-size: 16px;
|
|
154
|
+
color: var(--color_90);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.modal-table-header {
|
|
160
|
+
width: 100%;
|
|
161
|
+
padding: 8px 0;
|
|
162
|
+
font-size: 16px;
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
.input-item {
|
|
166
|
+
flex: 0;
|
|
167
|
+
width: 160px;
|
|
168
|
+
margin-left: auto;
|
|
169
|
+
font-size: 12px;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.modal-row-item {
|
|
174
|
+
width: 100%;
|
|
175
|
+
margin-top: 20px;
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: flex-start;
|
|
178
|
+
&:first-child {
|
|
179
|
+
margin-top: 0;
|
|
180
|
+
}
|
|
181
|
+
.modal-row-title {
|
|
182
|
+
width: var(--modal-row-title-width);
|
|
183
|
+
height: var(--modal-row-title-height);
|
|
184
|
+
margin-right: var(--modal-row-title-margin);
|
|
185
|
+
display: flex;
|
|
186
|
+
align-items: center;
|
|
187
|
+
}
|
|
188
|
+
.modal-row-contents {
|
|
189
|
+
width: calc(
|
|
190
|
+
100% - (var(--modal-row-title-width) + var(--modal-row-title-margin))
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.input-label {
|
|
195
|
+
font-size: 16px;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.modal-scroll-container {
|
|
200
|
+
width: 100%;
|
|
201
|
+
max-height: calc(
|
|
202
|
+
100vh - var(--modal-root-padding) *
|
|
203
|
+
2 - var(--modal-header-height) - var(--modal-footer-height) - var(
|
|
204
|
+
--modal-padding
|
|
205
|
+
) *
|
|
206
|
+
2
|
|
207
|
+
);
|
|
208
|
+
overflow: hidden auto;
|
|
209
|
+
position: relative;
|
|
210
|
+
|
|
211
|
+
.modal-scroll-wrapper {
|
|
212
|
+
width: 99%;
|
|
213
|
+
height: fit-content;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.modal-form-button-container {
|
|
217
|
+
position: sticky;
|
|
218
|
+
bottom: 0;
|
|
219
|
+
z-index: 100;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.modal-massive-table-container {
|
|
224
|
+
width: 100%;
|
|
225
|
+
.modal-massive-table-header {
|
|
226
|
+
width: 100%;
|
|
227
|
+
height: 36px;
|
|
228
|
+
margin-bottom: 10px;
|
|
229
|
+
display: flex;
|
|
230
|
+
align-items: center;
|
|
231
|
+
}
|
|
232
|
+
.modal-massive-table-header-title {
|
|
233
|
+
width: fit-content;
|
|
234
|
+
font-size: 20px;
|
|
235
|
+
color: var(--color_90);
|
|
236
|
+
font-weight: 600;
|
|
237
|
+
}
|
|
238
|
+
.modal-massive-table-header-util-container {
|
|
239
|
+
margin-left: auto;
|
|
240
|
+
display: flex;
|
|
241
|
+
align-items: center;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.modal-dialog-input-box-container {
|
|
246
|
+
margin-top: 10px;
|
|
247
|
+
--input-height: 52px;
|
|
248
|
+
.modal-dialog-input-notice-container {
|
|
249
|
+
margin-top: 10px;
|
|
250
|
+
font-size: 14px;
|
|
251
|
+
color: var(--color_60);
|
|
252
|
+
line-height: 21px;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--modal-padding-basic-root: 6rem;
|
|
3
|
+
--modal-padding: 3rem;
|
|
4
|
+
--modal-border-radius: 2rem;
|
|
5
|
+
|
|
6
|
+
--modal-header-height: 6rem;
|
|
7
|
+
--modal-header-border-color: var(--color_20);
|
|
8
|
+
--modal-header-bg: var(--color_5);
|
|
9
|
+
--modal-header-title-size: 2rem;
|
|
10
|
+
|
|
11
|
+
--modal-header-close-button-color: var(--color_90);
|
|
12
|
+
|
|
13
|
+
--modal-footer-height: calc(
|
|
14
|
+
var(--button-height-modal) + var(--modal-padding)
|
|
15
|
+
);
|
|
16
|
+
--modal-row-title-width: 5rem;
|
|
17
|
+
--modal-row-title-height: 3.6rem;
|
|
18
|
+
--modal-row-title-margin: 2rem;
|
|
19
|
+
|
|
20
|
+
// --modal-width-type-form-row: 530px;
|
|
21
|
+
// --modal-width-type-form-row-wider: 600px;
|
|
22
|
+
// --modal-width-type-form-table-view: 530px;
|
|
23
|
+
// --modal-width-type-form-table-view-larger: 560px;
|
|
24
|
+
// --modal-width-type-form-table-simple: 660px;
|
|
25
|
+
// --modal-width-type-form-table-massive: 1100px;
|
|
26
|
+
// --modal-width-type-form-search: 560px;
|
|
27
|
+
// --modal-width-type-dialog-with-header: 400px;
|
|
28
|
+
// --modal-width-type-dialog-without-header: 330px;
|
|
29
|
+
// --modal-width-type-dialog-without-header-no-buttons: 400px;
|
|
30
|
+
// --modal-width-type-info-without-header-: 400px;
|
|
31
|
+
// --modal-width-type-: 400px;
|
|
32
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { styled } from "styled-components";
|
|
4
|
+
import { styleBaseSize } from "@uniai-fe/util-functions";
|
|
5
|
+
|
|
6
|
+
type StyledAlertProps = Partial<{
|
|
7
|
+
$align: "center" | "left" | "right";
|
|
8
|
+
$size: number | string;
|
|
9
|
+
}>;
|
|
10
|
+
const messageBox = styled.div<StyledAlertProps>`
|
|
11
|
+
width: 100%;
|
|
12
|
+
text-align: ${({ $align }) => $align || "center"};
|
|
13
|
+
p {
|
|
14
|
+
font-size: ${({ $size }) => styleBaseSize("rem", $size, 18)};
|
|
15
|
+
color: var(--color_90);
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
line-height: 1.5em;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
const StyledModalAlert = {
|
|
21
|
+
messageBox,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default StyledModalAlert;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { styled } from "styled-components";
|
|
4
|
+
import StyledModalLayout from "./layout";
|
|
5
|
+
|
|
6
|
+
type StyledModalBasicRootProps = {
|
|
7
|
+
$stackIndex: number;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const root = styled.div<StyledModalBasicRootProps>`
|
|
11
|
+
position: fixed;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
z-index: ${({ $stackIndex }) =>
|
|
15
|
+
9999 +
|
|
16
|
+
$stackIndex *
|
|
17
|
+
100}; // modal 스택에 따라 javascript에서 동적으로 계산된다. 최소값 9999, 100단위로 증가
|
|
18
|
+
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100vh;
|
|
21
|
+
padding: var(--modal-padding-basic-root);
|
|
22
|
+
background: rgba(0, 0, 0, 0.4);
|
|
23
|
+
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
|
|
28
|
+
transition: opacity 0.3s;
|
|
29
|
+
opacity: 0;
|
|
30
|
+
&.show {
|
|
31
|
+
opacity: 1;
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
const container = styled(StyledModalLayout.container)``;
|
|
35
|
+
|
|
36
|
+
const StyledModalBasic = {
|
|
37
|
+
root,
|
|
38
|
+
container,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default StyledModalBasic;
|