@lunit/oui 1.0.1 → 1.1.0-alpha.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/README.md +3 -0
- package/dist/components/EllipsisTypography/EllipsisTypography.js +62 -0
- package/dist/components/EllipsisTypography/EllipsisTypography.styled.js +16 -0
- package/dist/components/EllipsisTypography/EllipsisTypography.types.js +2 -0
- package/dist/components/EllipsisTypography/index.js +3 -0
- package/dist/components/MuiCssBaseline.js +16 -0
- package/dist/components/ResizeObserver/ResizeObserverContext.js +56 -0
- package/dist/components/ResizeObserver/index.js +3 -0
- package/dist/components/index.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/EllipsisTypography/EllipsisTypography.d.ts +3 -0
- package/dist/types/components/EllipsisTypography/EllipsisTypography.styled.d.ts +6 -0
- package/dist/types/components/EllipsisTypography/EllipsisTypography.types.d.ts +9 -0
- package/dist/types/components/EllipsisTypography/index.d.ts +4 -0
- package/dist/types/components/ResizeObserver/ResizeObserverContext.d.ts +9 -0
- package/dist/types/components/ResizeObserver/index.d.ts +2 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +14 -7
- package/.git-ftp-include +0 -1
- package/src/assets/ic-bell-noti-outlined-20px.tsx +0 -21
- package/src/assets/ic-close-large-outlined-20px.tsx +0 -17
- package/src/assets/ic-close-small-outlined-20px.tsx +0 -17
- package/src/assets/ic-download-pdf-outlined-20px.tsx +0 -18
- package/src/assets/ic-ellipse-outlined-20px.tsx +0 -17
- package/src/assets/ic-filter-noti-outlined-20px.tsx +0 -21
- package/src/assets/ic-hide-large-outlined-20px.tsx +0 -13
- package/src/assets/ic-hide-small-outlined-20px.tsx +0 -17
- package/src/assets/ic-information-large-outlined-20px.tsx +0 -17
- package/src/assets/ic-information-small-outlined-20px.tsx +0 -17
- package/src/assets/ic-manufacturer-outlined-20px.tsx +0 -19
- package/src/assets/ic-rectangle-outlined-20px.tsx +0 -17
- package/src/assets/ic-refresh-left-outlined-20px.tsx +0 -17
- package/src/assets/ic-refresh-right-outlined-20px.tsx +0 -13
- package/src/assets/ic-show-large-outlined-20px.tsx +0 -17
- package/src/assets/ic-show-small-outlined-20px.tsx +0 -17
- package/src/assets/ic_bell_noti=outlined_20px.svg +0 -5
- package/src/assets/ic_close_large=outlined_20px.svg +0 -4
- package/src/assets/ic_close_small=outlined_20px.svg +0 -4
- package/src/assets/ic_download_pdf=outlined_20px.svg +0 -7
- package/src/assets/ic_ellipse=outlined_20px.svg +0 -4
- package/src/assets/ic_filter_noti=outlined_20px.svg +0 -5
- package/src/assets/ic_hide_large=outlined_20px.svg +0 -4
- package/src/assets/ic_hide_small=outlined_20px.svg +0 -4
- package/src/assets/ic_information_large=outlined_20px.svg +0 -4
- package/src/assets/ic_information_small=outlined_20px.svg +0 -4
- package/src/assets/ic_manufacturer=outlined_20px.svg +0 -3
- package/src/assets/ic_rectangle=outlined_20px.svg +0 -4
- package/src/assets/ic_refresh_left=outlined_20px.svg +0 -4
- package/src/assets/ic_refresh_right=outlined_20px.svg +0 -4
- package/src/assets/ic_show_large=outlined_20px.svg +0 -4
- package/src/assets/ic_show_small=outlined_20px.svg +0 -4
- package/src/assets/index.ts +0 -16
- package/src/components/Alert/Alert.styled.ts +0 -44
- package/src/components/Alert/Alert.tsx +0 -39
- package/src/components/Alert/Alert.types.ts +0 -5
- package/src/components/Alert/Alert.utils.tsx +0 -43
- package/src/components/Alert/index.ts +0 -5
- package/src/components/BaseTextField/BaseTextField.styled.ts +0 -110
- package/src/components/BaseTextField/BaseTextField.types.ts +0 -25
- package/src/components/BaseTextField/BaseTextField.utils.ts +0 -10
- package/src/components/Button/BaseButton.tsx +0 -19
- package/src/components/Button/Button.tsx +0 -117
- package/src/components/Button/Button.types.ts +0 -36
- package/src/components/Button/Button.utils.ts +0 -13
- package/src/components/Button/index.ts +0 -6
- package/src/components/Button/styleds/BaseButton.styled.ts +0 -57
- package/src/components/Button/styleds/ContainedButton.styled.ts +0 -123
- package/src/components/Button/styleds/GhostButton.styled.ts +0 -139
- package/src/components/Button/styleds/IconButton.styled.ts +0 -25
- package/src/components/Button/styleds/OutlinedButton.styled.ts +0 -144
- package/src/components/Card/Card.styled.tsx +0 -18
- package/src/components/Card/Card.tsx +0 -18
- package/src/components/Card/Card.types.ts +0 -10
- package/src/components/Card/index.ts +0 -5
- package/src/components/Checkbox/Checkbox.styled.tsx +0 -27
- package/src/components/Checkbox/Checkbox.tsx +0 -64
- package/src/components/Checkbox/Checkbox.types.ts +0 -16
- package/src/components/Checkbox/Checkbox.utils.tsx +0 -42
- package/src/components/Checkbox/index.ts +0 -5
- package/src/components/Chip/Chip.styled.ts +0 -120
- package/src/components/Chip/Chip.tsx +0 -33
- package/src/components/Chip/Chip.types.ts +0 -18
- package/src/components/Chip/Chip.utils.tsx +0 -50
- package/src/components/Chip/index.ts +0 -4
- package/src/components/DataTable/DataTable.styled.ts +0 -66
- package/src/components/DataTable/DataTable.tsx +0 -29
- package/src/components/DataTable/index.ts +0 -1
- package/src/components/DatePicker/DatePicker.styled.ts +0 -19
- package/src/components/DatePicker/DatePicker.tsx +0 -194
- package/src/components/DatePicker/DatePicker.types.ts +0 -8
- package/src/components/DatePicker/index.ts +0 -4
- package/src/components/Dialog/Dialog.styled.ts +0 -87
- package/src/components/Dialog/Dialog.tsx +0 -111
- package/src/components/Dialog/Dialog.types.ts +0 -19
- package/src/components/Dialog/index.ts +0 -5
- package/src/components/Divider/Divider.styled.ts +0 -24
- package/src/components/Divider/Divider.tsx +0 -13
- package/src/components/Divider/Divider.types.ts +0 -7
- package/src/components/Divider/index.ts +0 -5
- package/src/components/Dropdown/Dropdown.styled.tsx +0 -127
- package/src/components/Dropdown/Dropdown.tsx +0 -116
- package/src/components/Dropdown/Dropdown.types.ts +0 -31
- package/src/components/Dropdown/Dropdown.utils.ts +0 -13
- package/src/components/Dropdown/DropdownItem.styled.tsx +0 -66
- package/src/components/Dropdown/DropdownItem.tsx +0 -45
- package/src/components/Dropdown/DropdownItem.types.ts +0 -14
- package/src/components/Dropdown/DropdownItem.utils.ts +0 -14
- package/src/components/Dropdown/DropdownSubtitle.styled.ts +0 -13
- package/src/components/Dropdown/DropdownSubtitle.tsx +0 -9
- package/src/components/Dropdown/DropdownSubtitle.types.ts +0 -6
- package/src/components/Dropdown/IconDropdown.styled.tsx +0 -82
- package/src/components/Dropdown/IconDropdown.tsx +0 -56
- package/src/components/Dropdown/IconDropdown.types.ts +0 -22
- package/src/components/Dropdown/index.ts +0 -22
- package/src/components/FileDnDZone/FileDnDZone.styled.ts +0 -43
- package/src/components/FileDnDZone/FileDnDZone.tsx +0 -81
- package/src/components/FileDnDZone/FileDnDZone.types.ts +0 -14
- package/src/components/FileDnDZone/FileDnDZone.utils.ts +0 -3
- package/src/components/FileDnDZone/index.ts +0 -5
- package/src/components/List/List.styled.ts +0 -31
- package/src/components/List/List.tsx +0 -71
- package/src/components/List/List.types.ts +0 -24
- package/src/components/List/List.utils.ts +0 -14
- package/src/components/List/ListItem.styled.tsx +0 -61
- package/src/components/List/ListItem.tsx +0 -66
- package/src/components/List/ListItem.types.ts +0 -40
- package/src/components/List/ListItemCaption.styled.tsx +0 -7
- package/src/components/List/ListItemCaption.tsx +0 -18
- package/src/components/List/ListItemCaption.types.ts +0 -2
- package/src/components/List/index.ts +0 -8
- package/src/components/LoadingIndicator/LoadingIndicator.styled.tsx +0 -40
- package/src/components/LoadingIndicator/LoadingIndicator.tsx +0 -44
- package/src/components/LoadingIndicator/LoadingIndicator.types.ts +0 -7
- package/src/components/LoadingIndicator/assets/DnaLoadingAnimation.json +0 -769
- package/src/components/LoadingIndicator/assets/DotLoadingAnimation.json +0 -426
- package/src/components/LoadingIndicator/index.ts +0 -5
- package/src/components/Menu/Menu.styled.tsx +0 -42
- package/src/components/Menu/Menu.tsx +0 -28
- package/src/components/Menu/Menu.types.ts +0 -18
- package/src/components/Menu/MenuItem.styled.ts +0 -62
- package/src/components/Menu/MenuItem.tsx +0 -45
- package/src/components/Menu/MenuItem.types.ts +0 -14
- package/src/components/Menu/index.ts +0 -5
- package/src/components/MuiCssBaseline.ts +0 -78
- package/src/components/MuiInputBase.ts +0 -25
- package/src/components/MuiOutlinedInput.ts +0 -57
- package/src/components/MuiTextField.ts +0 -17
- package/src/components/Pagination/Pagination.styled.tsx +0 -71
- package/src/components/Pagination/Pagination.tsx +0 -182
- package/src/components/Pagination/Pagination.types.ts +0 -39
- package/src/components/Pagination/index.ts +0 -2
- package/src/components/ProductLabel/ProductLabel.styled.ts +0 -61
- package/src/components/ProductLabel/ProductLabel.tsx +0 -57
- package/src/components/ProductLabel/ProductLabel.types.ts +0 -10
- package/src/components/ProductLabel/index.ts +0 -5
- package/src/components/Progress/CircularProgress.styled.ts +0 -10
- package/src/components/Progress/CircularProgress.tsx +0 -15
- package/src/components/Progress/CircularProgress.types.ts +0 -6
- package/src/components/Progress/LinearProgress.styled.ts +0 -15
- package/src/components/Progress/LinearProgress.tsx +0 -16
- package/src/components/Progress/LinearProgress.types.ts +0 -7
- package/src/components/Progress/index.ts +0 -4
- package/src/components/Radio/Radio.styled.ts +0 -35
- package/src/components/Radio/Radio.tsx +0 -60
- package/src/components/Radio/Radio.types.ts +0 -15
- package/src/components/Radio/RadioGroup.styled.ts +0 -6
- package/src/components/Radio/RadioGroup.tsx +0 -23
- package/src/components/Radio/RadioGroup.types.ts +0 -10
- package/src/components/Radio/index.ts +0 -7
- package/src/components/Stepper/Stepper.styled.ts +0 -38
- package/src/components/Stepper/Stepper.tsx +0 -24
- package/src/components/Stepper/Stepper.types.ts +0 -13
- package/src/components/Stepper/index.ts +0 -5
- package/src/components/TabbedPanel/TabbedPanel.styled.ts +0 -129
- package/src/components/TabbedPanel/TabbedPanel.tsx +0 -70
- package/src/components/TabbedPanel/TabbedPanel.types.ts +0 -36
- package/src/components/TabbedPanel/TabbedPanel.utils.ts +0 -21
- package/src/components/TabbedPanel/index.ts +0 -5
- package/src/components/TextField/TextArea.styled.tsx +0 -36
- package/src/components/TextField/TextArea.tsx +0 -35
- package/src/components/TextField/TextArea.types.ts +0 -28
- package/src/components/TextField/TextInput.styled.tsx +0 -115
- package/src/components/TextField/TextInput.tsx +0 -27
- package/src/components/TextField/TextInput.types.ts +0 -46
- package/src/components/TextField/TextInput.utils.ts +0 -7
- package/src/components/TextField/components/Buttons.tsx +0 -26
- package/src/components/TextField/components/NormalTextInput.tsx +0 -95
- package/src/components/TextField/components/PasswordInput.tsx +0 -92
- package/src/components/TextField/index.ts +0 -7
- package/src/components/Tooltip/Tooltip.styled.tsx +0 -36
- package/src/components/Tooltip/Tooltip.tsx +0 -58
- package/src/components/Tooltip/Tooltip.types.ts +0 -24
- package/src/components/Tooltip/Tooltip.utils.ts +0 -46
- package/src/components/Tooltip/index.ts +0 -5
- package/src/components/UploadManager/UploadManager.styled.ts +0 -49
- package/src/components/UploadManager/UploadManager.tsx +0 -271
- package/src/components/UploadManager/UploadManager.types.ts +0 -16
- package/src/components/UploadManager/index.ts +0 -5
- package/src/components/index.ts +0 -23
- package/src/foundations/index.ts +0 -4
- package/src/foundations/palette.ts +0 -418
- package/src/foundations/spacing.ts +0 -5
- package/src/foundations/styles.ts +0 -9
- package/src/foundations/typography.ts +0 -492
- package/src/icons/BellNoti/index.tsx +0 -28
- package/src/icons/CloseLarge/index.tsx +0 -28
- package/src/icons/CloseSmall/index.tsx +0 -28
- package/src/icons/DownloadPdf/index.tsx +0 -28
- package/src/icons/Ellipse/index.tsx +0 -28
- package/src/icons/FilterNoti/index.tsx +0 -28
- package/src/icons/HideLarge/index.tsx +0 -28
- package/src/icons/HideSmall/index.tsx +0 -28
- package/src/icons/InformationLarge/index.tsx +0 -28
- package/src/icons/InformationSmall/index.tsx +0 -28
- package/src/icons/Manufacturer/index.tsx +0 -28
- package/src/icons/Rectangle/index.tsx +0 -28
- package/src/icons/RefreshLeft/index.tsx +0 -28
- package/src/icons/RefreshRight/index.tsx +0 -28
- package/src/icons/ShowLarge/index.tsx +0 -28
- package/src/icons/ShowSmall/index.tsx +0 -28
- package/src/icons/index.ts +0 -180
- package/src/index.ts +0 -4
- package/src/react-app-env.d.ts +0 -71
- package/src/reportWebVitals.ts +0 -15
- package/src/setupTests.ts +0 -5
- package/src/systems/drawer.ts +0 -27
- package/src/systems/index.ts +0 -7
- package/src/theme.ts +0 -22
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 9.29291L5.85355 5.14645C5.65829 4.95118 5.34171 4.95118 5.14645 5.14645C4.95118 5.34171 4.95118 5.65829 5.14645 5.85355L9.29291 10L5.14645 14.1465C4.95118 14.3417 4.95118 14.6583 5.14645 14.8536C5.34171 15.0488 5.65829 15.0488 5.85355 14.8536L10 10.7071L14.1464 14.8536C14.3417 15.0488 14.6583 15.0488 14.8536 14.8536C15.0488 14.6583 15.0488 14.3417 14.8536 14.1464L10.7071 10L14.8536 5.85358C15.0488 5.65832 15.0488 5.34174 14.8536 5.14648C14.6583 4.95121 14.3417 4.95122 14.1464 5.14648L10 9.29291Z" fill="currentColor"/>
|
|
4
|
-
</svg>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.05106 2.34253V7.99999H4.06488V6.08562H5.15327C6.4599 6.08562 7.16156 5.30109 7.16156 4.21546C7.16156 3.13535 6.46819 2.34253 5.16709 2.34253H3.05106ZM4.06488 5.24861V3.19336H5.01239C5.78035 3.19336 6.12289 3.61325 6.12289 4.21546C6.12289 4.81767 5.78035 5.24861 5.01791 5.24861H4.06488Z" fill="currentColor"/>
|
|
4
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.93884 2.34253H7.98856V7.99999H9.90293C11.6267 7.99999 12.6433 6.93369 12.6433 5.16573C12.6433 3.4033 11.6267 2.34253 9.93884 2.34253ZM9.00238 7.11877V3.22374H9.88359C11.0355 3.22374 11.635 3.86739 11.635 5.16573C11.635 6.46684 11.0355 7.11877 9.8532 7.11877H9.00238Z" fill="currentColor"/>
|
|
5
|
-
<path d="M14.5649 5.59391V7.99999H13.5511V2.34253H17.1698V3.19888H14.5649V4.74032H16.9212V5.59391H14.5649Z" fill="currentColor"/>
|
|
6
|
-
<path d="M13.1237 13.6708L10.5 16.6693L10.5 11C10.5 10.7239 10.2762 10.5 10 10.5C9.72387 10.5 9.50002 10.7239 9.50002 11L9.50002 16.6693L6.8763 13.6708C6.69446 13.4629 6.37857 13.4419 6.17076 13.6237C5.96294 13.8056 5.94188 14.1214 6.12372 14.3293L9.62372 18.3293C9.71866 18.4378 9.85583 18.5 10 18.5C10.1442 18.5 10.2814 18.4378 10.3763 18.3293L13.8763 14.3293C14.0581 14.1214 14.0371 13.8056 13.8293 13.6237C13.6214 13.4419 13.3056 13.4629 13.1237 13.6708Z" fill="currentColor"/>
|
|
7
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18ZM10 19C14.9706 19 19 14.9706 19 10C19 5.02944 14.9706 1 10 1C5.02944 1 1 5.02944 1 10C1 14.9706 5.02944 19 10 19Z" fill="currentColor"/>
|
|
4
|
-
</svg>
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1 5H6.93699C6.71497 4.13739 5.93192 3.5 5 3.5C4.06808 3.5 3.28503 4.13739 3.06301 5H2C1.72386 5 1.5 5.22386 1.5 5.5C1.5 5.77614 1.72386 6 2 6H3.06301C3.28503 6.86261 4.06808 7.5 5 7.5C5.93192 7.5 6.71497 6.86261 6.93699 6H10C10 5.65753 10.0344 5.32311 10.1 5ZM12.6505 9.23758C12.9502 8.51121 13.6654 8 14.5 8C15.4319 8 16.215 8.63739 16.437 9.5H16.938C16.502 9.74193 16.0161 9.90476 15.4995 9.96911C15.4832 9.43112 15.0419 9 14.5 9C14.0433 9 13.658 9.30622 13.5384 9.72456C13.2206 9.59973 12.9226 9.43539 12.6505 9.23758ZM11.4293 9.5H2C1.72386 9.5 1.5 9.72386 1.5 10C1.5 10.2761 1.72386 10.5 2 10.5H12.563C12.785 11.3626 13.5681 12 14.5 12C15.3112 12 16.0096 11.5171 16.3234 10.823C15.9019 10.9384 15.4581 11 15 11C14.8837 11 14.7683 10.996 14.654 10.9882C14.6038 10.996 14.5524 11 14.5 11C14.3615 11 14.2296 10.9719 14.1097 10.921C13.0687 10.7339 12.1396 10.2246 11.4293 9.5ZM17.1821 10.5H18C18.2761 10.5 18.5 10.2761 18.5 10C18.5 9.87846 18.4566 9.76705 18.3845 9.68039C18.0277 10.0087 17.623 10.2858 17.1821 10.5ZM11 6C11 5.6547 11.0438 5.31962 11.126 5H18C18.2761 5 18.5 5.22386 18.5 5.5C18.5 5.77614 18.2761 6 18 6H11ZM4 5.5C4 4.94772 4.44772 4.5 5 4.5C5.55228 4.5 6 4.94772 6 5.5C6 6.05228 5.55228 6.5 5 6.5C4.44772 6.5 4 6.05228 4 5.5ZM10.437 15C10.215 15.8626 9.43192 16.5 8.5 16.5C7.56808 16.5 6.78503 15.8626 6.56301 15H2C1.72386 15 1.5 14.7761 1.5 14.5C1.5 14.2239 1.72386 14 2 14H6.56301C6.78503 13.1374 7.56808 12.5 8.5 12.5C9.43192 12.5 10.215 13.1374 10.437 14H18C18.2761 14 18.5 14.2239 18.5 14.5C18.5 14.7761 18.2761 15 18 15H10.437ZM7.5 14.5C7.5 13.9477 7.94772 13.5 8.5 13.5C9.05228 13.5 9.5 13.9477 9.5 14.5C9.5 15.0523 9.05228 15.5 8.5 15.5C7.94772 15.5 7.5 15.0523 7.5 14.5Z" fill="currentColor"/>
|
|
4
|
-
<path d="M19 6C19 8.20914 17.2091 10 15 10C12.7909 10 11 8.20914 11 6C11 3.79086 12.7909 2 15 2C17.2091 2 19 3.79086 19 6Z" fill="#E63B28"/>
|
|
5
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path d="M3.97517 6.34411C3.88924 6.08243 3.60772 5.93943 3.34559 6.02462C3.08297 6.10997 2.93927 6.39206 3.02462 6.65468L3.50014 6.50014C3.02462 6.65468 3.02457 6.65452 3.02462 6.65468L3.02509 6.65613L3.02572 6.65803L3.02744 6.6632L3.03281 6.67886C3.03726 6.69163 3.04347 6.70899 3.05155 6.73061C3.0677 6.77384 3.09137 6.83417 3.12348 6.90881C3.18764 7.05798 3.28582 7.26506 3.42553 7.50764C3.64755 7.89315 3.9764 8.3717 4.44304 8.85012L3.14657 10.1466C2.95131 10.3418 2.95131 10.6584 3.14657 10.8537C3.34183 11.049 3.65841 11.049 3.85368 10.8537L5.19378 9.51359C5.65189 9.86153 6.19663 10.183 6.84016 10.4374L6.04055 12.3032C5.93177 12.557 6.04935 12.8509 6.30317 12.9597C6.55698 13.0685 6.85092 12.9509 6.9597 12.6971L7.7971 10.7431C8.31452 10.872 8.881 10.9579 9.50028 10.9881L9.50014 11.0001V13.5001C9.50014 13.7763 9.724 14.0001 10.0001 14.0001C10.2763 14.0001 10.5001 13.7763 10.5001 13.5001V11.0001L10.5 10.9881C11.1193 10.9579 11.6857 10.872 12.2031 10.7431L13.0406 12.6971C13.1493 12.9509 13.4433 13.0685 13.6971 12.9597C13.9509 12.8509 14.0685 12.557 13.9597 12.3032L13.1601 10.4374C13.8036 10.183 14.3484 9.86154 14.8065 9.5136L16.1968 10.9039C16.3817 11.0888 16.6574 11.0748 16.8276 10.878C16.8365 10.8703 16.8452 10.8622 16.8537 10.8537C17.0489 10.6584 17.0489 10.3418 16.8537 10.1466L15.5572 8.85012C16.0239 8.3717 16.3527 7.89316 16.5747 7.50765C16.7144 7.26506 16.8126 7.05798 16.8768 6.90881C16.9089 6.83417 16.9326 6.77385 16.9487 6.73062C16.9568 6.70899 16.963 6.69163 16.9675 6.67886L16.9728 6.6632L16.9746 6.65803L16.9752 6.65613L16.9756 6.655C16.9756 6.65484 16.9757 6.65468 16.5001 6.50014L16.9756 6.655C17.0609 6.39238 16.9173 6.10997 16.6547 6.02462C16.3922 5.9393 16.1102 6.08286 16.0247 6.3453L16.0231 6.34982C16.0211 6.35577 16.0174 6.36614 16.012 6.3806C16.0012 6.40954 15.9835 6.45477 15.9582 6.51366C15.9075 6.63155 15.8263 6.80345 15.7082 7.00858C15.4715 7.41953 15.0895 7.95844 14.5114 8.46454C13.9752 8.93398 13.2672 9.3779 12.3415 9.66646C11.6832 9.87164 10.9089 10.0001 10.0001 10.0001C9.09133 10.0001 8.31702 9.87163 7.65877 9.66645C6.73304 9.3779 6.0251 8.93397 5.48886 8.46454C4.91072 7.95843 4.52876 7.41953 4.2921 7.00858C4.17396 6.80345 4.0928 6.63155 4.04209 6.51366C4.01676 6.45477 3.9991 6.40954 3.98829 6.3806C3.98289 6.36614 3.9792 6.35577 3.97713 6.34982L3.97517 6.34411Z" fill="currentColor"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.9257 7.6444C15.0042 7.37966 14.8557 7.10066 14.5941 7.02124C14.3325 6.94184 14.0567 7.09222 13.9781 7.35678L13.9777 7.35802C13.9647 7.3972 13.9507 7.43595 13.9356 7.47437C13.9021 7.55967 13.8482 7.68491 13.7695 7.83468C13.6115 8.13528 13.3576 8.52748 12.975 8.89453C12.6208 9.23442 12.1551 9.55402 11.5473 9.76169C11.1149 9.90939 10.6038 10.0029 10 10.0029C9.39624 10.0029 8.88505 9.90939 8.45273 9.76169C7.84486 9.55402 7.37924 9.23442 7.025 8.89453C6.64245 8.52748 6.38847 8.13528 6.23052 7.83468C6.15183 7.68491 6.09791 7.55967 6.06443 7.47437C6.04772 7.43178 6.03618 7.39936 6.02926 7.37906L6.02229 7.35802L6.02133 7.35494C5.94209 7.09135 5.667 6.942 5.40594 7.02124C5.14715 7.09978 4.99671 7.38423 5.07468 7.64572L5.07518 7.64739L5.07651 7.65175L5.08049 7.66449C5.08375 7.67474 5.08823 7.68847 5.09401 7.70541C5.10555 7.73928 5.12232 7.78609 5.14495 7.84375C5.19015 7.95893 5.25906 8.11818 5.35697 8.30451C5.44994 8.48145 5.56991 8.68441 5.72166 8.89798L4.66472 9.89091C4.46551 10.0781 4.44397 10.4048 4.61662 10.6208C4.78927 10.8367 5.09072 10.8601 5.28993 10.6729L6.37686 9.65181C6.64957 9.90872 6.97379 10.1553 7.35631 10.3659L6.69372 11.6228C6.56293 11.8709 6.64245 12.187 6.87133 12.3288C7.10021 12.4706 7.39178 12.3844 7.52257 12.1363L8.25405 10.7487C8.63225 10.8677 9.04843 10.9504 9.50534 10.9852V12.4995C9.50534 12.7759 9.7268 13 9.99999 13C10.2732 13 10.4947 12.7759 10.4947 12.4995V10.9852C10.9358 10.9516 11.339 10.8733 11.7067 10.7608L12.4318 12.1363C12.5625 12.3844 12.8541 12.4706 13.083 12.3288C13.3119 12.1871 13.3914 11.871 13.2606 11.6229L12.6082 10.3853C13.0062 10.1705 13.342 9.91663 13.6232 9.65181L14.7101 10.6729C14.9093 10.8601 15.2107 10.8367 15.3834 10.6208C15.556 10.4048 15.5345 10.0781 15.3353 9.89091L14.2783 8.89797C14.4301 8.68441 14.5501 8.48145 14.643 8.30451C14.7409 8.11819 14.8099 7.95893 14.8551 7.84375C14.8777 7.78609 14.8945 7.73928 14.906 7.70541C14.9118 7.68847 14.9163 7.67474 14.9195 7.66449L14.9235 7.65175L14.9248 7.64739L14.9253 7.64572L14.9257 7.6444Z" fill="currentColor"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2ZM1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10ZM9.25 14.2466C9.25 14.6268 9.53288 14.9409 9.89965 14.9899C9.93207 14.9965 9.96563 15 10 15C10.0344 15 10.0679 14.9965 10.1004 14.9899C10.4671 14.9409 10.75 14.6268 10.75 14.2466V8.74658C10.75 8.33237 10.4142 7.99658 10 7.99658C9.58579 7.99658 9.25 8.33237 9.25 8.74658V14.2466ZM10 5C9.44772 5 9 5.44772 9 6C9 6.55228 9.44771 7 10 7C10.5523 7 11 6.55228 11 6C11 5.44772 10.5523 5 10 5Z" fill="currentColor"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 10C4 6.68629 6.68629 4 10 4C13.3137 4 16 6.68629 16 10C16 13.3137 13.3137 16 10 16C6.68629 16 4 13.3137 4 10ZM10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3ZM10.0892 9.00794C10.0603 9.00272 10.0305 9 10 9C9.96955 9 9.93973 9.00272 9.91078 9.00794C9.53862 9.05205 9.25 9.36866 9.25 9.75269V13.2527C9.25 13.6669 9.58579 14.0027 10 14.0027C10.4142 14.0027 10.75 13.6669 10.75 13.2527V9.75269C10.75 9.36866 10.4614 9.05205 10.0892 9.00794ZM10 8C9.44772 8 9 7.55228 9 7C9 6.44772 9.44772 6 10 6C10.5523 6 11 6.44772 11 7C11 7.55228 10.5523 8 10 8Z" fill="currentColor"/>
|
|
4
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="20" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.4805 0.00415039V23.0042H0V14.4609L2.9769 8.28318L5.23029 12.9653L7.48368 8.28318L9.74026 12.9653L11.9937 8.28318L14.2502 12.9653V0.00415039H19.4805Z" fill="#000"></path>
|
|
3
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M1 2C1 1.44772 1.44771 1 2 1H18C18.5523 1 19 1.44771 19 2V18C19 18.5523 18.5523 19 18 19H2C1.44772 19 1 18.5523 1 18V2ZM2 2V18H18V2L2 2Z" fill="currentColor"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.67349 7C4.79743 4.63419 7.20839 3 9.99999 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 9.99999 17C6.95293 17 4.35937 15.0528 3.39818 12.3334C3.30615 12.073 3.02049 11.9366 2.76013 12.0286C2.49978 12.1206 2.36331 12.4063 2.45534 12.6666C3.55333 15.7731 6.51596 18 9.99999 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 9.99999 2C6.98718 2 4.36428 3.66538 3 6.12421L3 3.5C3 3.22386 2.77614 3 2.5 3C2.22386 3 2 3.22386 2 3.5V7.5C2 7.77614 2.22386 8 2.5 8L6.5 8C6.77614 8 7 7.77614 7 7.5C7 7.22386 6.77614 7 6.5 7H3.67349Z" fill="currentColor"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path d="M14.4362 3.3427C12.8211 2.26644 10.8698 1.81403 8.94585 2.06977C7.02191 2.32552 5.25655 3.27197 3.97868 4.73279C2.70081 6.19361 1.99758 8.06917 2.00001 10.01C2.00244 11.9509 2.71036 13.8247 3.99189 15.2823C5.27342 16.7399 7.04114 17.682 8.96572 17.9329C10.8903 18.1838 12.8405 17.7265 14.4529 16.6462C16.0653 15.5659 17.23 13.9362 17.73 12.0609C17.8011 11.7941 17.6425 11.5201 17.3757 11.449C17.1088 11.3778 16.8349 11.5365 16.7637 11.8033C16.3262 13.4442 15.3071 14.8702 13.8963 15.8154C12.4854 16.7607 10.779 17.1608 9.095 16.9413C7.411 16.7217 5.86424 15.8974 4.7429 14.622C3.62157 13.3466 3.00213 11.707 3.00001 10.0088C2.99788 8.31053 3.61321 6.66941 4.73134 5.39119C5.84948 4.11297 7.39417 3.28483 9.07762 3.06106C10.7611 2.83728 12.4685 3.23313 13.8817 4.17487C15.055 4.95671 15.9591 6.07056 16.485 7.36464C16.4869 7.36936 16.4889 7.37404 16.4909 7.37867H13.5341C13.258 7.37867 13.0341 7.60253 13.0341 7.87867C13.0341 8.15482 13.258 8.37867 13.5341 8.37867L17.7767 8.37867C18.0529 8.37867 18.2768 8.15482 18.2767 7.87867L18.2768 3.63603C18.2768 3.35989 18.0529 3.13603 17.7767 3.13603C17.5006 3.13603 17.2767 3.35989 17.2767 3.63603V6.676C16.662 5.33018 15.6818 4.17274 14.4362 3.3427Z" fill="currentColor"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.02506 10.2283C3.4458 9.23806 5.17764 6 9.97734 6C14.7656 6 16.5358 9.22232 16.9735 10.2239C17.0052 10.2963 17.0013 10.3671 16.9697 10.4277C16.523 11.2853 14.7482 14 9.97734 14C5.19465 14 3.45804 11.2719 3.02876 10.4245C2.99909 10.366 2.99543 10.298 3.02506 10.2283ZM9.97734 5C4.58863 5 2.59009 8.68489 2.09982 9.83875C1.95925 10.1696 1.96469 10.5451 2.13177 10.8748C2.67253 11.9422 4.69952 15 9.97734 15C15.2386 15 17.3025 11.9613 17.8616 10.888C18.0373 10.5506 18.0428 10.1637 17.8947 9.82494C17.3863 8.66178 15.3489 5 9.97734 5ZM7.96814 10C7.96814 8.89543 8.86769 8 9.97734 8C11.087 8 11.9865 8.89543 11.9865 10C11.9865 11.1046 11.087 12 9.97734 12C8.86769 12 7.96814 11.1046 7.96814 10ZM9.97734 7C8.31286 7 6.96354 8.34315 6.96354 10C6.96354 11.6569 8.31286 13 9.97734 13C11.6418 13 12.9911 11.6569 12.9911 10C12.9911 8.34315 11.6418 7 9.97734 7Z" fill="currentColor"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" fill="currentColor"
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 7C13.3054 7 14.5914 9.34545 14.9748 10.2758C14.5929 11.0424 13.3121 13 10 13C6.68788 13 5.40711 11.0424 5.02517 10.2758C5.40864 9.34545 6.69463 7 10 7ZM15.9495 10.0208C16.0209 10.2057 16.0172 10.407 15.9343 10.5871C15.538 11.4476 14.0235 14 10 14C5.97651 14 4.46197 11.4476 4.0657 10.5871C3.98276 10.407 3.9791 10.2057 4.05047 10.0208C4.42213 9.05757 5.923 6 10 6C14.077 6 15.5779 9.05757 15.9495 10.0208ZM10.9998 10C10.9998 10.5523 10.5522 11 9.99997 11C9.44778 11 9.00014 10.5523 9.00014 10C9.00014 9.44772 9.44778 9 9.99997 9C10.5522 9 10.9998 9.44772 10.9998 10ZM11.9997 10C11.9997 11.1046 11.1044 12 9.99997 12C8.89558 12 8.0003 11.1046 8.0003 10C8.0003 8.89543 8.89558 8 9.99997 8C11.1044 8 11.9997 8.89543 11.9997 10Z" fill="currentColor"/>
|
|
4
|
-
</svg>
|
package/src/assets/index.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { default as IcBellNotiOutlined20Px } from './ic-bell-noti-outlined-20px';
|
|
2
|
-
export { default as IcCloseLargeOutlined20Px } from './ic-close-large-outlined-20px';
|
|
3
|
-
export { default as IcCloseSmallOutlined20Px } from './ic-close-small-outlined-20px';
|
|
4
|
-
export { default as IcDownloadPdfOutlined20Px } from './ic-download-pdf-outlined-20px';
|
|
5
|
-
export { default as IcEllipseOutlined20Px } from './ic-ellipse-outlined-20px';
|
|
6
|
-
export { default as IcFilterNotiOutlined20Px } from './ic-filter-noti-outlined-20px';
|
|
7
|
-
export { default as IcHideLargeOutlined20Px } from './ic-hide-large-outlined-20px';
|
|
8
|
-
export { default as IcHideSmallOutlined20Px } from './ic-hide-small-outlined-20px';
|
|
9
|
-
export { default as IcInformationLargeOutlined20Px } from './ic-information-large-outlined-20px';
|
|
10
|
-
export { default as IcInformationSmallOutlined20Px } from './ic-information-small-outlined-20px';
|
|
11
|
-
export { default as IcManufacturerOutlined20Px } from './ic-manufacturer-outlined-20px';
|
|
12
|
-
export { default as IcRectangleOutlined20Px } from './ic-rectangle-outlined-20px';
|
|
13
|
-
export { default as IcRefreshLeftOutlined20Px } from './ic-refresh-left-outlined-20px';
|
|
14
|
-
export { default as IcRefreshRightOutlined20Px } from './ic-refresh-right-outlined-20px';
|
|
15
|
-
export { default as IcShowLargeOutlined20Px } from './ic-show-large-outlined-20px';
|
|
16
|
-
export { default as IcShowSmallOutlined20Px } from './ic-show-small-outlined-20px';
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Alert as MuiAlert, alertClasses, styled, svgIconClasses } from '@mui/material';
|
|
2
|
-
import type { AlertProps } from './Alert.types';
|
|
3
|
-
import { getAccentColor, getBackgroundColor } from './Alert.utils';
|
|
4
|
-
|
|
5
|
-
const BaseAlert = styled(MuiAlert)<AlertProps>(({ theme, severity }) => ({
|
|
6
|
-
[`&.${alertClasses.root}`]: {
|
|
7
|
-
display: 'flex',
|
|
8
|
-
padding: `${theme.spacing(2)} ${theme.spacing(4)}`,
|
|
9
|
-
maxWidth: '456px',
|
|
10
|
-
borderRadius: '8px',
|
|
11
|
-
border: `1px solid ${getAccentColor(severity)}`,
|
|
12
|
-
backgroundColor: getBackgroundColor(severity),
|
|
13
|
-
boxShadow: 'none',
|
|
14
|
-
},
|
|
15
|
-
[`& .${alertClasses.icon}`]: {
|
|
16
|
-
fontSize: '20px',
|
|
17
|
-
alignItems: 'center',
|
|
18
|
-
padding: `${theme.spacing(1)} 0`,
|
|
19
|
-
marginRight: theme.spacing(2),
|
|
20
|
-
color: `${getAccentColor(severity)} !important`,
|
|
21
|
-
},
|
|
22
|
-
[`& .${alertClasses.message}`]: {
|
|
23
|
-
padding: `${theme.spacing(1)} 0`,
|
|
24
|
-
width: '100%',
|
|
25
|
-
overflow: 'hidden',
|
|
26
|
-
display: '-webkit-box',
|
|
27
|
-
textOverflow: 'ellipsis',
|
|
28
|
-
WebkitLineClamp: '5',
|
|
29
|
-
WebkitBoxOrient: 'vertical',
|
|
30
|
-
color: theme.palette.neutralGrey[0],
|
|
31
|
-
},
|
|
32
|
-
[`& .${alertClasses.action}`]: {
|
|
33
|
-
margin: 0,
|
|
34
|
-
padding: 0,
|
|
35
|
-
paddingLeft: theme.spacing(2),
|
|
36
|
-
alignItems: 'center',
|
|
37
|
-
},
|
|
38
|
-
[`& .${svgIconClasses.root}`]: {
|
|
39
|
-
height: '20px',
|
|
40
|
-
width: '20px',
|
|
41
|
-
},
|
|
42
|
-
}));
|
|
43
|
-
|
|
44
|
-
export default BaseAlert;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import { Close } from '../../icons';
|
|
4
|
-
import BaseAlert from './Alert.styled';
|
|
5
|
-
import type { AlertProps } from './Alert.types';
|
|
6
|
-
import { getAccentColor, getIcons } from './Alert.utils';
|
|
7
|
-
import { Button } from '../Button';
|
|
8
|
-
|
|
9
|
-
const Alert = forwardRef<HTMLDivElement, AlertProps>(
|
|
10
|
-
({ title, severity, children, onClose, ...rest }: AlertProps, ref) => {
|
|
11
|
-
return (
|
|
12
|
-
<div ref={ref}>
|
|
13
|
-
<BaseAlert
|
|
14
|
-
severity={severity}
|
|
15
|
-
icon={getIcons(severity)}
|
|
16
|
-
slots={{
|
|
17
|
-
closeButton: () => (
|
|
18
|
-
<Button
|
|
19
|
-
variant="ghost"
|
|
20
|
-
icon={<Close fontSize="small" />}
|
|
21
|
-
onClick={onClose}
|
|
22
|
-
size="small"
|
|
23
|
-
sx={{
|
|
24
|
-
color: getAccentColor(severity),
|
|
25
|
-
}}
|
|
26
|
-
/>
|
|
27
|
-
),
|
|
28
|
-
}}
|
|
29
|
-
onClose={onClose}
|
|
30
|
-
{...rest}
|
|
31
|
-
>
|
|
32
|
-
{children}
|
|
33
|
-
</BaseAlert>
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
36
|
-
},
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
export default Alert;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AlertColor } from '@mui/material';
|
|
3
|
-
import { Success, Error, Information } from '../../icons';
|
|
4
|
-
import theme from '../../theme';
|
|
5
|
-
|
|
6
|
-
export const getIcons = (severity: AlertColor | undefined) => {
|
|
7
|
-
switch (severity) {
|
|
8
|
-
case 'info':
|
|
9
|
-
return <Information />;
|
|
10
|
-
case 'success':
|
|
11
|
-
return <Success />;
|
|
12
|
-
case 'error':
|
|
13
|
-
return <Error />;
|
|
14
|
-
default:
|
|
15
|
-
return <Error />;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const getBackgroundColor = (severity: AlertColor | undefined) => {
|
|
20
|
-
switch (severity) {
|
|
21
|
-
case 'info':
|
|
22
|
-
return theme.palette.alert.InfoBG;
|
|
23
|
-
case 'success':
|
|
24
|
-
return theme.palette.alert.SuccessBG;
|
|
25
|
-
case 'error':
|
|
26
|
-
return theme.palette.alert.ErrorBG;
|
|
27
|
-
default:
|
|
28
|
-
return theme.palette.alert.WarningBG;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const getAccentColor = (severity: AlertColor | undefined) => {
|
|
33
|
-
switch (severity) {
|
|
34
|
-
case 'info':
|
|
35
|
-
return theme.palette.blue[25];
|
|
36
|
-
case 'success':
|
|
37
|
-
return theme.palette.lunitTeal[40];
|
|
38
|
-
case 'error':
|
|
39
|
-
return theme.palette.red[5];
|
|
40
|
-
default:
|
|
41
|
-
return theme.palette.yellow[20];
|
|
42
|
-
}
|
|
43
|
-
};
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
// This file facilitates style sharing between text input and text area
|
|
2
|
-
import { Box, Theme, Typography } from '@mui/material';
|
|
3
|
-
import { styled } from '@mui/material/styles';
|
|
4
|
-
import type { BaseTextFieldContainerProps, HelperMsgProps } from './BaseTextField.types';
|
|
5
|
-
import { formatCSSSize } from './BaseTextField.utils';
|
|
6
|
-
|
|
7
|
-
const baseTextFieldStyle = (theme: Theme) => {
|
|
8
|
-
return {
|
|
9
|
-
backgroundColor: theme.palette.neutralGrey[75],
|
|
10
|
-
borderRadius: '8px',
|
|
11
|
-
border: '1px solid',
|
|
12
|
-
borderColor: 'transparent',
|
|
13
|
-
color: theme.palette.neutralGrey[5],
|
|
14
|
-
fontWeight: '400',
|
|
15
|
-
fontSize: '14px',
|
|
16
|
-
fontFamily:
|
|
17
|
-
'Pretendard,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"',
|
|
18
|
-
lineHeight: '20px',
|
|
19
|
-
padding: '7px 16px',
|
|
20
|
-
|
|
21
|
-
'&::placeholder': {
|
|
22
|
-
color: theme.palette.neutralGrey[45],
|
|
23
|
-
},
|
|
24
|
-
'&:focus': {
|
|
25
|
-
outline: 'none',
|
|
26
|
-
border: '1px solid',
|
|
27
|
-
borderColor: theme.palette.lunitTeal[10],
|
|
28
|
-
},
|
|
29
|
-
'&:hover': {
|
|
30
|
-
borderColor: theme.palette.neutralGrey[45],
|
|
31
|
-
},
|
|
32
|
-
'&:disabled': {
|
|
33
|
-
opacity: '0.8',
|
|
34
|
-
pointerEvents: 'none',
|
|
35
|
-
},
|
|
36
|
-
'&:read-only': {
|
|
37
|
-
border: `1px solid ${theme.palette.neutralGrey[70]}`,
|
|
38
|
-
backgroundColor: 'transparent',
|
|
39
|
-
color: theme.palette.neutralGrey[45],
|
|
40
|
-
pointerEvents: 'none',
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const baseTextFieldErrorStyle = (theme: Theme) => {
|
|
46
|
-
return {
|
|
47
|
-
borderColor: theme.palette.red[5],
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const baseTextFieldMsgStyle = (theme: Theme) => {
|
|
52
|
-
return {
|
|
53
|
-
width: '312px',
|
|
54
|
-
maxWidth: '312px',
|
|
55
|
-
minHeight: '20px',
|
|
56
|
-
color: theme.palette.neutralGrey[45],
|
|
57
|
-
padding: '4px',
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const baseTextFieldMsgErrorStyle = (theme: Theme) => {
|
|
62
|
-
return {
|
|
63
|
-
color: theme.palette.red[5],
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
const BaseTextFieldBox = styled(Box, {
|
|
68
|
-
shouldForwardProp: (prop) => prop !== 'width',
|
|
69
|
-
})<BaseTextFieldContainerProps>(({ width }) => {
|
|
70
|
-
return {
|
|
71
|
-
width: formatCSSSize(width),
|
|
72
|
-
minWidth: formatCSSSize(width) ? 'unset' : '208px',
|
|
73
|
-
};
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
const BaseTextFieldContainer = styled(Box, {
|
|
77
|
-
shouldForwardProp: (prop) => !['width'].includes(prop.toString()),
|
|
78
|
-
})<BaseTextFieldContainerProps>(({ width }) => {
|
|
79
|
-
return {
|
|
80
|
-
position: 'relative',
|
|
81
|
-
display: 'flex',
|
|
82
|
-
flexDirection: 'column',
|
|
83
|
-
width: formatCSSSize(width),
|
|
84
|
-
minWidth: formatCSSSize(width) ? 'unset' : '208px',
|
|
85
|
-
};
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
const InputMsg = styled(Typography, {
|
|
89
|
-
shouldForwardProp: (prop) => prop !== 'error',
|
|
90
|
-
})<HelperMsgProps>(({ theme, error }) => {
|
|
91
|
-
let resultStyle = baseTextFieldMsgStyle(theme);
|
|
92
|
-
|
|
93
|
-
if (error) {
|
|
94
|
-
resultStyle = {
|
|
95
|
-
...resultStyle,
|
|
96
|
-
...baseTextFieldMsgErrorStyle(theme),
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return resultStyle;
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
const styles = {
|
|
104
|
-
baseTextFieldStyle,
|
|
105
|
-
baseTextFieldErrorStyle,
|
|
106
|
-
baseTextFieldMsgStyle,
|
|
107
|
-
baseTextFieldMsgErrorStyle,
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export { styles, BaseTextFieldContainer, BaseTextFieldBox, InputMsg };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// Props for all text fields
|
|
2
|
-
|
|
3
|
-
import type { BoxProps } from '@mui/material';
|
|
4
|
-
|
|
5
|
-
// It redefines certain intrinsic properties because of MUI interference
|
|
6
|
-
interface BaseTextFieldContainerProps {
|
|
7
|
-
width?: string | number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface RootTextFieldProps extends BaseTextFieldContainerProps {
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
readOnly?: boolean;
|
|
13
|
-
value?: string;
|
|
14
|
-
defaultValue?: string;
|
|
15
|
-
error?: boolean;
|
|
16
|
-
BoxProps?: BoxProps;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Props for helper message specifically
|
|
20
|
-
interface HelperMsgProps {
|
|
21
|
-
error?: boolean;
|
|
22
|
-
helperMsg?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { RootTextFieldProps, BaseTextFieldContainerProps, HelperMsgProps };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { BaseButtonProps } from './Button.types';
|
|
3
|
-
import { BaseContainedButton } from './styleds/ContainedButton.styled';
|
|
4
|
-
import { BaseGhostButton } from './styleds/GhostButton.styled';
|
|
5
|
-
import { BaseOutlinedButton } from './styleds/OutlinedButton.styled';
|
|
6
|
-
|
|
7
|
-
const BaseButton = ({ variant, ...otherProps }: BaseButtonProps) => {
|
|
8
|
-
if (variant === 'ghost') {
|
|
9
|
-
return <BaseGhostButton {...otherProps} />;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
if (variant === 'outlined') {
|
|
13
|
-
return <BaseOutlinedButton {...otherProps} />;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return <BaseContainedButton {...otherProps} />;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export default BaseButton;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Box } from '@mui/system';
|
|
3
|
-
import BaseButton from './BaseButton';
|
|
4
|
-
import { CircularProgress } from '../Progress';
|
|
5
|
-
import theme from '../../theme';
|
|
6
|
-
|
|
7
|
-
import { isIconButton } from './Button.utils';
|
|
8
|
-
import type { ButtonProps } from './Button.types';
|
|
9
|
-
|
|
10
|
-
function Button(props: ButtonProps) {
|
|
11
|
-
if (isIconButton(props)) {
|
|
12
|
-
const {
|
|
13
|
-
icon,
|
|
14
|
-
loading,
|
|
15
|
-
onClick,
|
|
16
|
-
disableRipple = true,
|
|
17
|
-
focusOutline = false,
|
|
18
|
-
...otherProps
|
|
19
|
-
} = props;
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<BaseButton
|
|
23
|
-
{...otherProps}
|
|
24
|
-
isIconOnly
|
|
25
|
-
disableRipple={disableRipple}
|
|
26
|
-
focusOutline={focusOutline}
|
|
27
|
-
onClick={
|
|
28
|
-
loading
|
|
29
|
-
? (e) => {
|
|
30
|
-
e.preventDefault();
|
|
31
|
-
}
|
|
32
|
-
: onClick
|
|
33
|
-
}
|
|
34
|
-
>
|
|
35
|
-
{loading ? (
|
|
36
|
-
<CircularProgress
|
|
37
|
-
circleColor={theme.palette.neutralGrey[0]}
|
|
38
|
-
size={20}
|
|
39
|
-
sx={{
|
|
40
|
-
display: 'flex',
|
|
41
|
-
justifyContent: 'center',
|
|
42
|
-
alignItems: 'center',
|
|
43
|
-
}}
|
|
44
|
-
/>
|
|
45
|
-
) : (
|
|
46
|
-
icon
|
|
47
|
-
)}
|
|
48
|
-
</BaseButton>
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const {
|
|
53
|
-
icon,
|
|
54
|
-
label,
|
|
55
|
-
size,
|
|
56
|
-
focusOutline = false,
|
|
57
|
-
disableRipple = true,
|
|
58
|
-
loading,
|
|
59
|
-
onClick,
|
|
60
|
-
...otherProps
|
|
61
|
-
} = props;
|
|
62
|
-
return (
|
|
63
|
-
<BaseButton
|
|
64
|
-
isIconOnly={false}
|
|
65
|
-
variant={otherProps.variant ?? 'contained'}
|
|
66
|
-
disableRipple={disableRipple}
|
|
67
|
-
size={size}
|
|
68
|
-
color={otherProps.color}
|
|
69
|
-
focusOutline={focusOutline}
|
|
70
|
-
onClick={
|
|
71
|
-
loading
|
|
72
|
-
? (e) => {
|
|
73
|
-
e.preventDefault();
|
|
74
|
-
}
|
|
75
|
-
: onClick
|
|
76
|
-
}
|
|
77
|
-
sx={
|
|
78
|
-
loading
|
|
79
|
-
? {
|
|
80
|
-
'&:not(.loadingCircle)': {
|
|
81
|
-
color: 'transparent',
|
|
82
|
-
},
|
|
83
|
-
}
|
|
84
|
-
: {}
|
|
85
|
-
}
|
|
86
|
-
{...otherProps}
|
|
87
|
-
>
|
|
88
|
-
<>
|
|
89
|
-
{icon}
|
|
90
|
-
{label}
|
|
91
|
-
|
|
92
|
-
{loading && (
|
|
93
|
-
<Box
|
|
94
|
-
className="loadingCircle"
|
|
95
|
-
sx={{
|
|
96
|
-
position: 'absolute',
|
|
97
|
-
top: '50%',
|
|
98
|
-
left: '50%',
|
|
99
|
-
transform: 'translate3d(-50%, -50%, 0)',
|
|
100
|
-
}}
|
|
101
|
-
>
|
|
102
|
-
<CircularProgress
|
|
103
|
-
circleColor={theme.palette.neutralGrey[0]}
|
|
104
|
-
size={20}
|
|
105
|
-
sx={{
|
|
106
|
-
display: 'flex',
|
|
107
|
-
justifyContent: 'center',
|
|
108
|
-
alignItems: 'center',
|
|
109
|
-
}}
|
|
110
|
-
/>
|
|
111
|
-
</Box>
|
|
112
|
-
)}
|
|
113
|
-
</>
|
|
114
|
-
</BaseButton>
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
export default Button;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { ButtonProps as MuiButtonProps } from '@mui/material';
|
|
2
|
-
|
|
3
|
-
type ButtonVariant = 'contained' | 'ghost' | 'outlined';
|
|
4
|
-
type ButtonColor = 'primary' | 'secondary' | 'error';
|
|
5
|
-
type ButtonSize = 'small' | 'medium' | 'large';
|
|
6
|
-
|
|
7
|
-
interface BaseButtonProps extends Omit<MuiButtonProps, 'variant' | 'color'> {
|
|
8
|
-
variant?: ButtonVariant;
|
|
9
|
-
color?: ButtonColor;
|
|
10
|
-
size?: ButtonSize;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
focusOutline?: boolean;
|
|
13
|
-
isIconOnly: boolean;
|
|
14
|
-
loading?: boolean;
|
|
15
|
-
label?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface IconButtonProps extends Omit<BaseButtonProps, 'isIconOnly'> {
|
|
19
|
-
icon: React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
interface NormalButtonProps extends Omit<BaseButtonProps, 'isIconOnly'> {
|
|
23
|
-
label: string;
|
|
24
|
-
icon?: React.ReactNode;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
type ButtonProps = IconButtonProps | NormalButtonProps;
|
|
28
|
-
|
|
29
|
-
export type {
|
|
30
|
-
ButtonVariant,
|
|
31
|
-
ButtonColor,
|
|
32
|
-
BaseButtonProps,
|
|
33
|
-
IconButtonProps,
|
|
34
|
-
NormalButtonProps,
|
|
35
|
-
ButtonProps,
|
|
36
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ButtonProps, IconButtonProps, NormalButtonProps } from './Button.types';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @param props
|
|
5
|
-
* @returns boolean
|
|
6
|
-
* @description checks for presence of `label` prop to assert between Icon and Normal Button
|
|
7
|
-
*/
|
|
8
|
-
function isIconButton(props: ButtonProps): props is IconButtonProps {
|
|
9
|
-
const p = props as NormalButtonProps;
|
|
10
|
-
return !p.label;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { isIconButton };
|