@cashub/ui-elv 1.0.2 → 1.0.3
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/datetimePicker/index.js +2 -37
- package/esm/Tab/Tab.js +21 -0
- package/esm/Tab/TabList.js +160 -0
- package/esm/Tab/TabPanel.js +42 -0
- package/esm/Tab/TabTab.js +98 -0
- package/esm/Tab/index.js +23 -0
- package/esm/Tab/subComponent/TabContext.js +3 -0
- package/esm/Tab/subComponent/TabListV2.js +18 -0
- package/esm/Tab/subComponent/TabPanelV2.js +45 -0
- package/esm/Tab/subComponent/TabTabV2.js +56 -0
- package/esm/VerticalTab/TabList.js +20 -0
- package/esm/VerticalTab/TabPanel.js +45 -0
- package/esm/VerticalTab/TabTab.js +63 -0
- package/esm/VerticalTab/VerticalTab.js +34 -0
- package/esm/VerticalTab/index.js +9 -0
- package/esm/VerticalTab/subComponent/TabContext.js +3 -0
- package/esm/alert/Alert.js +22 -0
- package/esm/alert/index.js +1 -0
- package/esm/animate/Collapse.js +65 -0
- package/esm/animate/Loader.js +51 -0
- package/esm/animate/NumberCounter.js +45 -0
- package/esm/animate/PulseRing.js +26 -0
- package/esm/animate/Spinner.js +11 -0
- package/esm/animate/index.js +5 -0
- package/esm/assets/css/autocomplete.css +16 -0
- package/esm/assets/css/font.css +4 -0
- package/esm/assets/css/global.css +2 -0
- package/esm/assets/font/helvetica/Helvetica.ttf +0 -0
- package/esm/assets/font/nanumGothic/NanumGothic-Bold.ttf +0 -0
- package/esm/assets/font/nanumGothic/NanumGothic-ExtraBold.ttf +0 -0
- package/esm/assets/font/nanumGothic/NanumGothic-Regular.ttf +0 -0
- package/esm/assets/icons/app-management.png +0 -0
- package/esm/assets/icons/burger-black.png +0 -0
- package/esm/assets/icons/burger-white.png +0 -0
- package/esm/assets/icons/burger.png +0 -0
- package/esm/assets/icons/file.svg +1 -0
- package/esm/assets/icons/map_icon1.png +0 -0
- package/esm/assets/icons/map_icon4.png +0 -0
- package/esm/assets/images/bg-aside.png +0 -0
- package/esm/assets/images/bg-chart-circle.png +0 -0
- package/esm/assets/images/bg-chart-triangle.png +0 -0
- package/esm/assets/images/cashub-logo-only.png +0 -0
- package/esm/assets/images/default-user.jpg +0 -0
- package/esm/assets/images/logo-cashub.png +0 -0
- package/esm/assets/images/map.png +0 -0
- package/esm/assets/images/qrcode.png +0 -0
- package/esm/backdrop/BaseBackdrop.js +11 -0
- package/esm/backdrop/LoadingBackdrop.js +10 -0
- package/esm/backdrop/ModalBackdrop.js +8 -0
- package/esm/backdrop/index.js +3 -0
- package/esm/badge/Badge.js +19 -0
- package/esm/badge/BadgeDot.js +11 -0
- package/esm/badge/BadgeFill.js +42 -0
- package/esm/badge/BadgeFillTriangle.js +138 -0
- package/esm/badge/BadgeWithText.js +24 -0
- package/esm/badge/index.js +5 -0
- package/esm/billing/BarChart.js +45 -0
- package/esm/billing/Grid.js +38 -0
- package/esm/billing/Header2.js +19 -0
- package/esm/billing/Header3.js +31 -0
- package/esm/billing/Paragraph.js +27 -0
- package/esm/billing/ParagraphGroup.js +16 -0
- package/esm/billing/ParagraphText.js +20 -0
- package/esm/billing/Section.js +44 -0
- package/esm/billing/SectionBody.js +11 -0
- package/esm/billing/SectionHeader.js +20 -0
- package/esm/billing/__stories__/BarChart.stories.js_bak +46 -0
- package/esm/billing/__stories__/Grid.stories.js_bak +57 -0
- package/esm/billing/__stories__/Header2.stories.js_bak +62 -0
- package/esm/billing/__stories__/Header3.stories.js_bak +69 -0
- package/esm/billing/__stories__/Paragraph.stories.js_bak +84 -0
- package/esm/billing/__stories__/ParagraphGroup.stories.js_bak +68 -0
- package/esm/billing/__stories__/ParagraphText.stories.js_bak +64 -0
- package/esm/billing/__stories__/Section.stories.js_bak +115 -0
- package/esm/billing/__stories__/SectionBody.stories.js_bak +62 -0
- package/esm/billing/__stories__/SectionHeader.stories.js-bak +68 -0
- package/esm/breadcrumb/Breadcrumb.js +71 -0
- package/esm/breadcrumb/index.js +1 -0
- package/esm/button/Button.js +145 -0
- package/esm/button/ButtonGroup.js +54 -0
- package/esm/button/IconButton.js +64 -0
- package/esm/button/ScrollToTopButton.js +47 -0
- package/esm/button/index.js +4 -0
- package/esm/callout/Callout.js +45 -0
- package/esm/callout/index.js +1 -0
- package/esm/chart/BarChart.js +147 -0
- package/esm/chart/DoughnutChart.js +110 -0
- package/esm/chart/LineChart.js +140 -0
- package/esm/chart/SingleBarChart.js +35 -0
- package/esm/chart/index.js +5 -0
- package/esm/chart/utils/centerTextPlugin.js +56 -0
- package/esm/chart/utils/customTooltip.js +84 -0
- package/esm/chart/utils/customTooltipLifecyclePlugin.js +16 -0
- package/esm/chart/utils/htmlLegendPlugin.js +83 -0
- package/esm/chart/utils/index.js +3 -0
- package/esm/chart/utils/padEmptyChartBar.js +47 -0
- package/esm/chart/utils/tooltipElement.js +17 -0
- package/esm/chart/utils/xAxisLabelTooltipPlugin.js +101 -0
- package/esm/chart/utils/yAxisTopTitlePlugin.js +43 -0
- package/esm/container/FlexContainer.js +33 -0
- package/esm/container/index.js +1 -0
- package/esm/cropper/Cropper.js +47 -0
- package/esm/cropper/CropperModalHandler.js +34 -0
- package/esm/cropper/index.js +2 -0
- package/esm/cropper/subComponent/CropImageModal.js +72 -0
- package/{datetimePicker/DatetimePicker.js → esm/datetimePicker/DatetimePickerV3.js} +63 -31
- package/esm/datetimePicker/TimeInput.js +49 -0
- package/esm/datetimePicker/TimePickerStyle.js +58 -0
- package/esm/datetimePicker/TimePickerV2.js +199 -0
- package/esm/datetimePicker/accordion/Month.js +245 -0
- package/esm/datetimePicker/accordion/Year.js +275 -0
- package/esm/datetimePicker/index.js +4 -0
- package/esm/datetimePicker/provider/constant.js +38 -0
- package/esm/datetimePicker/subComponent/DateTimePickerContext.js +3 -0
- package/esm/datetimePicker/utils/GMTDate.js +9 -0
- package/esm/datetimePicker/utils/pad.js +7 -0
- package/esm/datetimePicker/utils/toUTC0.js +7 -0
- package/esm/descriptionList/DescriptionDetail.js +21 -0
- package/esm/descriptionList/DescriptionList.js +18 -0
- package/esm/descriptionList/DescriptionTerm.js +7 -0
- package/esm/descriptionList/index.js +3 -0
- package/esm/divider/Divider.js +24 -0
- package/esm/divider/index.js +1 -0
- package/esm/dropdown/Dropdown.js +48 -0
- package/esm/dropdown/DropdownButtonOption.js +36 -0
- package/esm/dropdown/DropdownContent.js +83 -0
- package/esm/dropdown/DropdownDivOption.js +19 -0
- package/esm/dropdown/DropdownItem.js +19 -0
- package/esm/dropdown/DropdownLinkOption.js +17 -0
- package/esm/dropdown/DropdownToggle.js +31 -0
- package/esm/dropdown/index.js +11 -0
- package/esm/dropdown/subComponent/DropdownContext.js +3 -0
- package/esm/dropzone/FileDropzone.js +472 -0
- package/esm/dropzone/ImageDropzone.js +327 -0
- package/esm/dropzone/index.js +2 -0
- package/esm/dropzone/subComponent/Message.js +19 -0
- package/esm/figure/IconFigure.js +35 -0
- package/esm/figure/ImageFigure.js +31 -0
- package/esm/figure/index.js +2 -0
- package/esm/file/HiddenFileInput.js +8 -0
- package/esm/file/index.js +1 -0
- package/esm/form/Checkbox.js +157 -0
- package/esm/form/Fieldset.js +11 -0
- package/esm/form/FormItem.js +15 -0
- package/esm/form/Input.js +59 -0
- package/esm/form/Label.js +54 -0
- package/esm/form/MutedText.js +14 -0
- package/esm/form/PasswordInput.js +40 -0
- package/esm/form/RadioButton.js +94 -0
- package/esm/form/SearchSelect.js +174 -0
- package/esm/form/Searchbox.js +91 -0
- package/esm/form/Slider.js +39 -0
- package/esm/form/SwitchButton.js +97 -0
- package/esm/form/Textarea.js +34 -0
- package/esm/form/TreeView.js +66 -0
- package/esm/form/index.js +14 -0
- package/esm/grid/Column.js +39 -0
- package/esm/grid/Grid.js +28 -0
- package/esm/grid/index.js +2 -0
- package/esm/heading/Heading1.js +14 -0
- package/esm/heading/Heading2.js +21 -0
- package/esm/heading/Heading3.js +42 -0
- package/esm/heading/index.js +3 -0
- package/esm/helmet/Helmet.js +17 -0
- package/esm/helmet/index.js +2 -0
- package/esm/iconbox/ApplicationIconBox.js +74 -0
- package/esm/iconbox/IconBox.js +60 -0
- package/esm/iconbox/IconBoxV2.js +63 -0
- package/esm/iconbox/index.js +3 -0
- package/esm/iconbox/subComponent/IconBoxFigure.js +43 -0
- package/esm/iconbox/subComponent/IconBoxImage.js +35 -0
- package/esm/image/ImageFluid.js +10 -0
- package/esm/image/UploadImage.js +243 -0
- package/esm/image/index.js +2 -0
- package/esm/index.js +47 -0
- package/esm/keyframe/Pulse.js +15 -0
- package/esm/keyframe/Spin.js +7 -0
- package/esm/layout/Aside.js +39 -0
- package/esm/layout/AsideHeader.jsx +27 -0
- package/esm/layout/Backdrop.js +16 -0
- package/esm/layout/Container.js +30 -0
- package/esm/layout/Footer.js +36 -0
- package/esm/layout/Header.jsx +55 -0
- package/esm/layout/Layout.jsx +84 -0
- package/esm/layout/Logo.jsx +17 -0
- package/esm/layout/MenuIcon.jsx +27 -0
- package/esm/layout/Sidebar.jsx +271 -0
- package/esm/layout/index.js +1 -0
- package/esm/link/LinkSpan.js +62 -0
- package/esm/link/index.js +1 -0
- package/esm/map/GoogleMap.js +439 -0
- package/esm/map/GoogleReverseGeolocation.js +193 -0
- package/esm/map/LeafletMap.js +224 -0
- package/esm/map/LeafletReverseGeolocation.js +94 -0
- package/esm/map/index.js +4 -0
- package/esm/map/subComponent/BasicLeafletMap.js +27 -0
- package/esm/map/subComponent/GoogleMapContainer.js +22 -0
- package/esm/map/subComponent/GoogleMapPopup.js +103 -0
- package/esm/map/subComponent/GoogleMapWrapper.js +34 -0
- package/esm/map/subComponent/LeafletDrawControl.js +116 -0
- package/esm/map/subComponent/LeafletMapContainer.js +166 -0
- package/esm/map/subComponent/MapSearchBoxControl.js +47 -0
- package/esm/modal/StateModal.js +169 -0
- package/esm/modal/TitleModal.js +241 -0
- package/esm/modal/index.js +2 -0
- package/esm/page/Disclaimer.js +121 -0
- package/esm/page/index.js +1 -0
- package/esm/paginate/Paginate.js +129 -0
- package/esm/paginate/index.js +1 -0
- package/esm/popover/Popover.js +82 -0
- package/esm/popover/index.js +1 -0
- package/esm/qrcode/QRCode.js +51 -0
- package/esm/qrcode/QRCodeContainter.js +27 -0
- package/esm/qrcode/index.js +2 -0
- package/esm/ribbon/Ribbon.js +35 -0
- package/esm/ribbon/index.js +1 -0
- package/esm/section/Section.js +126 -0
- package/esm/section/SectionBody.js +43 -0
- package/esm/section/SectionHeader.js +61 -0
- package/esm/section/SectionToolbar.js +11 -0
- package/esm/section/SectionToolbarItem.js +10 -0
- package/esm/section/index.js +5 -0
- package/esm/select/InputSelect.js +263 -0
- package/esm/select/Select.js +811 -0
- package/esm/select/index.js +2 -0
- package/esm/select/subComponent/Checkbox.js +40 -0
- package/esm/select/subComponent/Footer.js +6 -0
- package/esm/select/subComponent/ListBox.js +23 -0
- package/esm/select/subComponent/Option.js +37 -0
- package/esm/select/subComponent/OptionGroup.js +16 -0
- package/esm/select/subComponent/Options.js +25 -0
- package/esm/select/subComponent/SearchBox.js +51 -0
- package/esm/select/subComponent/SelectedMultipleCount.js +32 -0
- package/esm/select/subComponent/SelectedMultipleTags.js +47 -0
- package/esm/select/subComponent/SelectedMultipleText.js +63 -0
- package/esm/select/subComponent/SelectedSingle.js +10 -0
- package/esm/styles/GlobalStyle.js +328 -0
- package/esm/styles/config/breakpoint.style.js +7 -0
- package/esm/styles/config/header.style.js +4 -0
- package/esm/styles/config/sidebar.style.js +11 -0
- package/esm/styles/index.js +2 -0
- package/esm/styles/mixin/backgroundColor.js +38 -0
- package/esm/styles/mixin/borderColor.js +31 -0
- package/esm/styles/mixin/color.js +31 -0
- package/esm/styles/mixin/colorOnBackground.js +31 -0
- package/esm/styles/mixin/inputPlaceholder.js +24 -0
- package/esm/styles/mixin/media.js +15 -0
- package/esm/styles/mixin/rounded.js +24 -0
- package/esm/styles/mixin/scrollbar.js +26 -0
- package/esm/styles/theme/dark.theme.js +91 -0
- package/esm/styles/theme/light.theme.js +91 -0
- package/esm/styles/theme/white.theme.js +91 -0
- package/esm/styles/themes.js +9 -0
- package/esm/table/GridTable.js +329 -0
- package/esm/table/ImageBox.js +38 -0
- package/esm/table/InfiniteGridTable.js +396 -0
- package/esm/table/PermissionTable.js +57 -0
- package/esm/table/SimpleGridTable.js +136 -0
- package/esm/table/Table.js +559 -0
- package/esm/table/__mock__/columns.js +64 -0
- package/esm/table/__mock__/data.js +530 -0
- package/esm/table/hooks/index.js +2 -0
- package/esm/table/hooks/useCalculateDataRange.js +22 -0
- package/esm/table/hooks/useGenerateSort.js +32 -0
- package/esm/table/index.js +6 -0
- package/esm/table/subComponent/BaseTableHeadCell.js +54 -0
- package/esm/table/subComponent/GridTableFooter.js +17 -0
- package/esm/table/subComponent/GridTableHeadCell.js +13 -0
- package/esm/table/subComponent/Resizer.js +70 -0
- package/esm/table/subComponent/TableFooter.js +24 -0
- package/esm/table/subComponent/TableFooterInfo.js +6 -0
- package/esm/table/subComponent/TableFooterPager.js +26 -0
- package/esm/table/subComponent/TableHeadCell.js +12 -0
- package/esm/table/subComponent/TableSort.js +31 -0
- package/esm/tagify/TagifyStyle.js +54 -0
- package/esm/tagify/Tags.js +49 -0
- package/esm/tagify/index.js +3 -0
- package/esm/tagify/templates/getCreateButtonTemplate.js +12 -0
- package/esm/text/Paragraph.js +79 -0
- package/esm/text/index.js +1 -0
- package/esm/timeline/Timeline.js +132 -0
- package/esm/timeline/index.js +1 -0
- package/esm/toast/CustomToastContainer.js +38 -0
- package/esm/toast/MessageContainer.js +44 -0
- package/esm/toast/index.js +3 -0
- package/esm/toast/show.js +29 -0
- package/esm/toast/style.css +1 -0
- package/esm/tooltip/Tooltip.js +133 -0
- package/esm/tooltip/index.js +1 -0
- package/esm/treeView/TreeViewV2.js +32 -0
- package/esm/treeView/TreeflexStyle.js +43 -0
- package/esm/treeView/index.js +2 -0
- package/esm/wizard/Wizard.js +244 -0
- package/esm/wizard/index.js +1 -0
- package/index.js +0 -12
- package/layout/Sidebar.jsx +1 -1
- package/package.json +5 -4
- package/datetimePicker/DatePicker.js +0 -363
- package/datetimePicker/DatePickerV2.js +0 -407
- package/datetimePicker/DatetimePickerV2.js +0 -395
- package/datetimePicker/TimePicker.js +0 -317
- package/datetimePicker/hooks/index.js +0 -27
- package/datetimePicker/hooks/useChangeNumber.js +0 -42
- package/datetimePicker/hooks/useDecrease.js +0 -38
- package/datetimePicker/hooks/useIncrease.js +0 -38
- package/datetimePicker/subComponent/Accordion.js +0 -373
- package/datetimePicker/subComponent/CustomTimeInput.js +0 -47
- package/jsoneditor/JsonEditor.js +0 -142
- package/jsoneditor/index.js +0 -13
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { MdDone } from 'react-icons/md/index.esm';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const Checkbox = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
selected
|
|
7
|
+
} = _ref;
|
|
8
|
+
return /*#__PURE__*/_jsx(Container, {
|
|
9
|
+
selected: selected,
|
|
10
|
+
children: selected && /*#__PURE__*/_jsx(MdDone, {})
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
const Container = styled.div`
|
|
14
|
+
position: relative;
|
|
15
|
+
width: 24px;
|
|
16
|
+
height: 24px;
|
|
17
|
+
border: var(--border-width) solid var(--border-color);
|
|
18
|
+
margin-right: var(--spacing-xs);
|
|
19
|
+
border-radius: 4px;
|
|
20
|
+
|
|
21
|
+
${_ref2 => {
|
|
22
|
+
let {
|
|
23
|
+
selected
|
|
24
|
+
} = _ref2;
|
|
25
|
+
return selected && css`
|
|
26
|
+
background: var(--color-primary);
|
|
27
|
+
border-color: var(--color-primary);
|
|
28
|
+
`;
|
|
29
|
+
}}
|
|
30
|
+
|
|
31
|
+
> svg {
|
|
32
|
+
position: absolute;
|
|
33
|
+
color: var(--font-on-primary);
|
|
34
|
+
font-size: var(--font-h3);
|
|
35
|
+
top: 50%;
|
|
36
|
+
left: 50%;
|
|
37
|
+
transform: translate(-50%, -50%);
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
export default Checkbox;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
const ListBox = styled.div`
|
|
3
|
+
visibility: ${_ref => {
|
|
4
|
+
let {
|
|
5
|
+
$display
|
|
6
|
+
} = _ref;
|
|
7
|
+
return $display ? 'visible' : 'hidden';
|
|
8
|
+
}};
|
|
9
|
+
background: var(--color-background1);
|
|
10
|
+
color: var(--font-on-background);
|
|
11
|
+
border: var(--border-width) solid var(--border-color);
|
|
12
|
+
border-radius: var(--border-radius);
|
|
13
|
+
box-shadow: var(--box-shadow);
|
|
14
|
+
width: ${_ref2 => {
|
|
15
|
+
let {
|
|
16
|
+
width
|
|
17
|
+
} = _ref2;
|
|
18
|
+
return width;
|
|
19
|
+
}}px;
|
|
20
|
+
z-index: 85;
|
|
21
|
+
`;
|
|
22
|
+
ListBox.displayName = 'ListBox';
|
|
23
|
+
export default ListBox;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
const Option = styled.div`
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
word-break: break-all;
|
|
7
|
+
padding: 12px var(--spacing-s);
|
|
8
|
+
background: var(--color-background1);
|
|
9
|
+
transition: background 0.3s;
|
|
10
|
+
|
|
11
|
+
&:hover {
|
|
12
|
+
background: var(--color-hover);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
${_ref => {
|
|
16
|
+
let {
|
|
17
|
+
selected,
|
|
18
|
+
focus
|
|
19
|
+
} = _ref;
|
|
20
|
+
return (selected || focus) && css`
|
|
21
|
+
background: var(--color-hover);
|
|
22
|
+
`;
|
|
23
|
+
}}
|
|
24
|
+
|
|
25
|
+
${_ref2 => {
|
|
26
|
+
let {
|
|
27
|
+
disabled
|
|
28
|
+
} = _ref2;
|
|
29
|
+
return disabled && css`
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
color: var(--font-on-mute);
|
|
33
|
+
`;
|
|
34
|
+
}}
|
|
35
|
+
`;
|
|
36
|
+
Option.displayName = 'Option';
|
|
37
|
+
export default Option;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
const OptionGroup = styled.div`
|
|
3
|
+
[role='presentation'] {
|
|
4
|
+
font-weight: bold;
|
|
5
|
+
|
|
6
|
+
&:hover {
|
|
7
|
+
background: var(--color-background1);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
[role='option'] {
|
|
12
|
+
padding-left: calc(var(--spacing-s) * 2);
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
OptionGroup.displayName = 'OptionGroup';
|
|
16
|
+
export default OptionGroup;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import scrollbar from '../../styles/mixin/scrollbar';
|
|
3
|
+
const Options = styled.div`
|
|
4
|
+
position: relative;
|
|
5
|
+
padding: var(--spacing-xs) 0;
|
|
6
|
+
max-height: min(320px, calc(50vh - 36px - 20px - 36px));
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
overflow-x: visible;
|
|
9
|
+
border-radius: var(--border-radius);
|
|
10
|
+
|
|
11
|
+
${_ref => {
|
|
12
|
+
let {
|
|
13
|
+
allowSearch
|
|
14
|
+
} = _ref;
|
|
15
|
+
return allowSearch && `
|
|
16
|
+
padding-top: 0;
|
|
17
|
+
border-top-left-radius: 0;
|
|
18
|
+
border-top-right-radius: 0;
|
|
19
|
+
`;
|
|
20
|
+
}}
|
|
21
|
+
|
|
22
|
+
${scrollbar}
|
|
23
|
+
`;
|
|
24
|
+
Options.displayName = 'Options';
|
|
25
|
+
export default Options;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { GoSearch } from 'react-icons/go/index.esm';
|
|
4
|
+
import inputPlaceholder from '../../styles/mixin/inputPlaceholder';
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
const SearchBox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
7
|
+
const handleClick = event => {
|
|
8
|
+
event.stopPropagation();
|
|
9
|
+
};
|
|
10
|
+
return /*#__PURE__*/_jsxs(Wrapper, {
|
|
11
|
+
onClick: handleClick,
|
|
12
|
+
children: [/*#__PURE__*/_jsx(GoSearch, {}), /*#__PURE__*/_jsx(SearchInput, {
|
|
13
|
+
type: "text",
|
|
14
|
+
ref: ref,
|
|
15
|
+
...props
|
|
16
|
+
})]
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
const Wrapper = styled.div`
|
|
20
|
+
position: relative;
|
|
21
|
+
padding: var(--spacing-xs);
|
|
22
|
+
|
|
23
|
+
> svg {
|
|
24
|
+
color: var(--font-on-mute);
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 50%;
|
|
27
|
+
transform: translateY(-50%);
|
|
28
|
+
left: calc(var(--spacing-s) + var(--spacing-xs));
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
Wrapper.displayName = 'Wrapper';
|
|
32
|
+
const SearchInput = styled.input`
|
|
33
|
+
background: var(--color-background1);
|
|
34
|
+
color: var(--font-on-background);
|
|
35
|
+
border-radius: var(--border-radius-l);
|
|
36
|
+
border: var(--border-width) solid var(--border-color);
|
|
37
|
+
outline: none;
|
|
38
|
+
width: 100%;
|
|
39
|
+
padding: 10px var(--spacing-s) 10px calc(var(--spacing-s) * 2 + 8px);
|
|
40
|
+
max-height: 36px;
|
|
41
|
+
|
|
42
|
+
&:disabled {
|
|
43
|
+
cursor: not-allowed;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
${inputPlaceholder`
|
|
47
|
+
color: var(--font-on-mute);
|
|
48
|
+
`}
|
|
49
|
+
`;
|
|
50
|
+
SearchInput.displayName = 'SearchInput';
|
|
51
|
+
export default SearchBox;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
const SelectedMultipleCount = _ref => {
|
|
4
|
+
let {
|
|
5
|
+
placeholder,
|
|
6
|
+
count
|
|
7
|
+
} = _ref;
|
|
8
|
+
return /*#__PURE__*/_jsxs(Text, {
|
|
9
|
+
children: [placeholder, count > 0 && /*#__PURE__*/_jsx(CountBadge, {
|
|
10
|
+
children: count
|
|
11
|
+
})]
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
const Text = styled.span`
|
|
15
|
+
color: var(--font-on-background);
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
text-overflow: ellipsis;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
`;
|
|
22
|
+
const CountBadge = styled.span`
|
|
23
|
+
display: inline-block;
|
|
24
|
+
margin-left: 6px;
|
|
25
|
+
padding: 0 6px;
|
|
26
|
+
border-radius: var(--border-radius-l);
|
|
27
|
+
background: var(--color-primary);
|
|
28
|
+
color: #fff;
|
|
29
|
+
font-size: var(--font-caption);
|
|
30
|
+
line-height: 18px;
|
|
31
|
+
`;
|
|
32
|
+
export default SelectedMultipleCount;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { FaTimes } from 'react-icons/fa/index.esm';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
const SelectedMultipleTags = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
content,
|
|
7
|
+
onClick,
|
|
8
|
+
disabled
|
|
9
|
+
} = _ref;
|
|
10
|
+
return /*#__PURE__*/_jsxs(Selected, {
|
|
11
|
+
$disabled: disabled,
|
|
12
|
+
children: [!disabled && /*#__PURE__*/_jsx("span", {
|
|
13
|
+
onClick: onClick,
|
|
14
|
+
"data-testid": "removeOption",
|
|
15
|
+
children: /*#__PURE__*/_jsx(FaTimes, {})
|
|
16
|
+
}), content]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const Selected = styled.div`
|
|
20
|
+
align-items: center;
|
|
21
|
+
display: flex;
|
|
22
|
+
background: var(--color-primary);
|
|
23
|
+
border-radius: var(--border-radius-l);
|
|
24
|
+
padding: 0.25rem calc(var(--spacing-xs) + 4px);
|
|
25
|
+
margin: 4px 10px 4px 0;
|
|
26
|
+
color: var(--font-on-primary);
|
|
27
|
+
font-weight: var(--font-normal);
|
|
28
|
+
word-break: break-all;
|
|
29
|
+
|
|
30
|
+
> span {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
|
|
34
|
+
> svg {
|
|
35
|
+
margin-right: var(--spacing-xs);
|
|
36
|
+
color: var(--font-on-primary);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
${_ref2 => {
|
|
41
|
+
let {
|
|
42
|
+
$disabled
|
|
43
|
+
} = _ref2;
|
|
44
|
+
return $disabled && 'cursor: not-allowed;opacity: 0.5;';
|
|
45
|
+
}}
|
|
46
|
+
`;
|
|
47
|
+
export default SelectedMultipleTags;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { useRef, useState } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
const SelectedMultipleText = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
children
|
|
7
|
+
} = _ref;
|
|
8
|
+
const textRef = useRef(null);
|
|
9
|
+
const [position, setPosition] = useState({
|
|
10
|
+
x: 0,
|
|
11
|
+
y: 0
|
|
12
|
+
});
|
|
13
|
+
const [show, setShow] = useState(false);
|
|
14
|
+
const handleMouseEnter = () => {
|
|
15
|
+
const element = textRef.current;
|
|
16
|
+
// show tooltip on content width exceeds container width only
|
|
17
|
+
if (element.scrollWidth > element.clientWidth) {
|
|
18
|
+
const rect = element.getBoundingClientRect();
|
|
19
|
+
setPosition({
|
|
20
|
+
x: rect.left,
|
|
21
|
+
y: rect.bottom + 8
|
|
22
|
+
});
|
|
23
|
+
setShow(true);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
27
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
28
|
+
ref: textRef,
|
|
29
|
+
onMouseEnter: handleMouseEnter,
|
|
30
|
+
onMouseLeave: () => {
|
|
31
|
+
setShow(false);
|
|
32
|
+
},
|
|
33
|
+
children: children
|
|
34
|
+
}), show && /*#__PURE__*/_jsx(Tooltip, {
|
|
35
|
+
style: {
|
|
36
|
+
left: position.x,
|
|
37
|
+
top: position.y
|
|
38
|
+
},
|
|
39
|
+
children: children
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const Text = styled.span`
|
|
44
|
+
color: var(--font-on-background);
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
text-overflow: ellipsis;
|
|
48
|
+
`;
|
|
49
|
+
const Tooltip = styled.div`
|
|
50
|
+
position: fixed;
|
|
51
|
+
border: 1px solid var(--border-color);
|
|
52
|
+
color: var(--font-on-background);
|
|
53
|
+
background: var(--color-background2);
|
|
54
|
+
box-shadow: var(--box-shadow);
|
|
55
|
+
border-radius: calc(var(--border-radius) / 2);
|
|
56
|
+
padding: var(--spacing-xs);
|
|
57
|
+
font-size: var(--font-body1);
|
|
58
|
+
font-weight: var(--font-normal);
|
|
59
|
+
z-index: 90;
|
|
60
|
+
width: max-content;
|
|
61
|
+
max-width: 50vw;
|
|
62
|
+
`;
|
|
63
|
+
export default SelectedMultipleText;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
const SelectedSingle = styled.div`
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
color: var(--font-on-background);
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
text-overflow: ellipsis;
|
|
8
|
+
`;
|
|
9
|
+
SelectedSingle.displayName = 'SelectedSingle';
|
|
10
|
+
export default SelectedSingle;
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { createGlobalStyle } from 'styled-components';
|
|
2
|
+
import 'normalize.css';
|
|
3
|
+
import '../assets/css/global.css';
|
|
4
|
+
const GlobalStyle = createGlobalStyle`
|
|
5
|
+
body {
|
|
6
|
+
--color-white: ${_ref => {
|
|
7
|
+
let {
|
|
8
|
+
theme
|
|
9
|
+
} = _ref;
|
|
10
|
+
return theme.colorWhite;
|
|
11
|
+
}};
|
|
12
|
+
--color-dark: ${_ref2 => {
|
|
13
|
+
let {
|
|
14
|
+
theme
|
|
15
|
+
} = _ref2;
|
|
16
|
+
return theme.colorDark;
|
|
17
|
+
}};
|
|
18
|
+
--color-grey: ${_ref3 => {
|
|
19
|
+
let {
|
|
20
|
+
theme
|
|
21
|
+
} = _ref3;
|
|
22
|
+
return theme.colorGrey;
|
|
23
|
+
}};
|
|
24
|
+
--color-primary: ${_ref4 => {
|
|
25
|
+
let {
|
|
26
|
+
theme
|
|
27
|
+
} = _ref4;
|
|
28
|
+
return theme.colorPrimary;
|
|
29
|
+
}};
|
|
30
|
+
--color-success: ${_ref5 => {
|
|
31
|
+
let {
|
|
32
|
+
theme
|
|
33
|
+
} = _ref5;
|
|
34
|
+
return theme.colorSuccess;
|
|
35
|
+
}};
|
|
36
|
+
--color-warning: ${_ref6 => {
|
|
37
|
+
let {
|
|
38
|
+
theme
|
|
39
|
+
} = _ref6;
|
|
40
|
+
return theme.colorWarning;
|
|
41
|
+
}};
|
|
42
|
+
--color-danger: ${_ref7 => {
|
|
43
|
+
let {
|
|
44
|
+
theme
|
|
45
|
+
} = _ref7;
|
|
46
|
+
return theme.colorDanger;
|
|
47
|
+
}};
|
|
48
|
+
--color-hover: ${_ref8 => {
|
|
49
|
+
let {
|
|
50
|
+
theme
|
|
51
|
+
} = _ref8;
|
|
52
|
+
return theme.colorHover;
|
|
53
|
+
}};
|
|
54
|
+
--color-active: ${_ref9 => {
|
|
55
|
+
let {
|
|
56
|
+
theme
|
|
57
|
+
} = _ref9;
|
|
58
|
+
return theme.colorActive;
|
|
59
|
+
}};
|
|
60
|
+
--color-scroll-bar: ${_ref10 => {
|
|
61
|
+
let {
|
|
62
|
+
theme
|
|
63
|
+
} = _ref10;
|
|
64
|
+
return theme.scrollBarColor;
|
|
65
|
+
}};
|
|
66
|
+
--color-background1: ${_ref11 => {
|
|
67
|
+
let {
|
|
68
|
+
theme
|
|
69
|
+
} = _ref11;
|
|
70
|
+
return theme.bgColor1;
|
|
71
|
+
}};
|
|
72
|
+
--color-background2: ${_ref12 => {
|
|
73
|
+
let {
|
|
74
|
+
theme
|
|
75
|
+
} = _ref12;
|
|
76
|
+
return theme.bgColor2;
|
|
77
|
+
}};
|
|
78
|
+
--color-background3: ${_ref13 => {
|
|
79
|
+
let {
|
|
80
|
+
theme
|
|
81
|
+
} = _ref13;
|
|
82
|
+
return theme.bgColor3;
|
|
83
|
+
}};
|
|
84
|
+
--color-backdrop: ${_ref14 => {
|
|
85
|
+
let {
|
|
86
|
+
theme
|
|
87
|
+
} = _ref14;
|
|
88
|
+
return theme.backdropBg;
|
|
89
|
+
}};
|
|
90
|
+
|
|
91
|
+
--font-h1: ${_ref15 => {
|
|
92
|
+
let {
|
|
93
|
+
theme
|
|
94
|
+
} = _ref15;
|
|
95
|
+
return theme.fontH1;
|
|
96
|
+
}};
|
|
97
|
+
--font-h2: ${_ref16 => {
|
|
98
|
+
let {
|
|
99
|
+
theme
|
|
100
|
+
} = _ref16;
|
|
101
|
+
return theme.fontH2;
|
|
102
|
+
}};
|
|
103
|
+
--font-h3: ${_ref17 => {
|
|
104
|
+
let {
|
|
105
|
+
theme
|
|
106
|
+
} = _ref17;
|
|
107
|
+
return theme.fontH3;
|
|
108
|
+
}};
|
|
109
|
+
--font-body1: ${_ref18 => {
|
|
110
|
+
let {
|
|
111
|
+
theme
|
|
112
|
+
} = _ref18;
|
|
113
|
+
return theme.fontBody1;
|
|
114
|
+
}};
|
|
115
|
+
--font-body2: ${_ref19 => {
|
|
116
|
+
let {
|
|
117
|
+
theme
|
|
118
|
+
} = _ref19;
|
|
119
|
+
return theme.fontBody2;
|
|
120
|
+
}};
|
|
121
|
+
--font-button: ${_ref20 => {
|
|
122
|
+
let {
|
|
123
|
+
theme
|
|
124
|
+
} = _ref20;
|
|
125
|
+
return theme.fontButton;
|
|
126
|
+
}};
|
|
127
|
+
--font-caption: ${_ref21 => {
|
|
128
|
+
let {
|
|
129
|
+
theme
|
|
130
|
+
} = _ref21;
|
|
131
|
+
return theme.fontCaption;
|
|
132
|
+
}};
|
|
133
|
+
--font-family: ${_ref22 => {
|
|
134
|
+
let {
|
|
135
|
+
theme
|
|
136
|
+
} = _ref22;
|
|
137
|
+
return theme.fontFamily;
|
|
138
|
+
}};
|
|
139
|
+
--font-normal: ${_ref23 => {
|
|
140
|
+
let {
|
|
141
|
+
theme
|
|
142
|
+
} = _ref23;
|
|
143
|
+
return theme.fontWeightNormal;
|
|
144
|
+
}};
|
|
145
|
+
--font-bold: ${_ref24 => {
|
|
146
|
+
let {
|
|
147
|
+
theme
|
|
148
|
+
} = _ref24;
|
|
149
|
+
return theme.fontWeightBold;
|
|
150
|
+
}};
|
|
151
|
+
--font-on-primary: ${_ref25 => {
|
|
152
|
+
let {
|
|
153
|
+
theme
|
|
154
|
+
} = _ref25;
|
|
155
|
+
return theme.fontOnPrimary;
|
|
156
|
+
}};
|
|
157
|
+
--font-on-success: ${_ref26 => {
|
|
158
|
+
let {
|
|
159
|
+
theme
|
|
160
|
+
} = _ref26;
|
|
161
|
+
return theme.fontOnSuccess;
|
|
162
|
+
}};
|
|
163
|
+
--font-on-warning: ${_ref27 => {
|
|
164
|
+
let {
|
|
165
|
+
theme
|
|
166
|
+
} = _ref27;
|
|
167
|
+
return theme.fontOnWarning;
|
|
168
|
+
}};
|
|
169
|
+
--font-on-danger: ${_ref28 => {
|
|
170
|
+
let {
|
|
171
|
+
theme
|
|
172
|
+
} = _ref28;
|
|
173
|
+
return theme.fontOnDanger;
|
|
174
|
+
}};
|
|
175
|
+
--font-on-background: ${_ref29 => {
|
|
176
|
+
let {
|
|
177
|
+
theme
|
|
178
|
+
} = _ref29;
|
|
179
|
+
return theme.fontOnBg;
|
|
180
|
+
}};
|
|
181
|
+
--font-on-mute: ${_ref30 => {
|
|
182
|
+
let {
|
|
183
|
+
theme
|
|
184
|
+
} = _ref30;
|
|
185
|
+
return theme.fontMutedColor;
|
|
186
|
+
}};
|
|
187
|
+
|
|
188
|
+
--box-shadow: ${_ref31 => {
|
|
189
|
+
let {
|
|
190
|
+
theme
|
|
191
|
+
} = _ref31;
|
|
192
|
+
return theme.boxShadow;
|
|
193
|
+
}};
|
|
194
|
+
--border-color: ${_ref32 => {
|
|
195
|
+
let {
|
|
196
|
+
theme
|
|
197
|
+
} = _ref32;
|
|
198
|
+
return theme.borderColor;
|
|
199
|
+
}};
|
|
200
|
+
--border-color-transparent: ${_ref33 => {
|
|
201
|
+
let {
|
|
202
|
+
theme
|
|
203
|
+
} = _ref33;
|
|
204
|
+
return theme.borderColorTransparent;
|
|
205
|
+
}};
|
|
206
|
+
--border-width: ${_ref34 => {
|
|
207
|
+
let {
|
|
208
|
+
theme
|
|
209
|
+
} = _ref34;
|
|
210
|
+
return theme.borderWidth;
|
|
211
|
+
}};
|
|
212
|
+
--border-radius-s: ${_ref35 => {
|
|
213
|
+
let {
|
|
214
|
+
theme
|
|
215
|
+
} = _ref35;
|
|
216
|
+
return theme.borderRadiusS;
|
|
217
|
+
}};
|
|
218
|
+
--border-radius: ${_ref36 => {
|
|
219
|
+
let {
|
|
220
|
+
theme
|
|
221
|
+
} = _ref36;
|
|
222
|
+
return theme.borderRadius;
|
|
223
|
+
}};
|
|
224
|
+
--border-radius-l: ${_ref37 => {
|
|
225
|
+
let {
|
|
226
|
+
theme
|
|
227
|
+
} = _ref37;
|
|
228
|
+
return theme.borderRadiusL;
|
|
229
|
+
}};
|
|
230
|
+
--border-radius-round: ${_ref38 => {
|
|
231
|
+
let {
|
|
232
|
+
theme
|
|
233
|
+
} = _ref38;
|
|
234
|
+
return theme.borderRadiusRound;
|
|
235
|
+
}};
|
|
236
|
+
|
|
237
|
+
--spacing-xs: ${_ref39 => {
|
|
238
|
+
let {
|
|
239
|
+
theme
|
|
240
|
+
} = _ref39;
|
|
241
|
+
return theme.spacerXS;
|
|
242
|
+
}};
|
|
243
|
+
--spacing-s: ${_ref40 => {
|
|
244
|
+
let {
|
|
245
|
+
theme
|
|
246
|
+
} = _ref40;
|
|
247
|
+
return theme.spacerS;
|
|
248
|
+
}};
|
|
249
|
+
--spacing: ${_ref41 => {
|
|
250
|
+
let {
|
|
251
|
+
theme
|
|
252
|
+
} = _ref41;
|
|
253
|
+
return theme.spacer;
|
|
254
|
+
}};
|
|
255
|
+
--spacing-l: ${_ref42 => {
|
|
256
|
+
let {
|
|
257
|
+
theme
|
|
258
|
+
} = _ref42;
|
|
259
|
+
return theme.spacerL;
|
|
260
|
+
}};
|
|
261
|
+
|
|
262
|
+
/* Global style */
|
|
263
|
+
font-size: 16px;
|
|
264
|
+
font-family: Helvetica;
|
|
265
|
+
overflow-x: hidden;
|
|
266
|
+
background: var(--color-background1);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* Custom normalize */
|
|
270
|
+
*,
|
|
271
|
+
*::before,
|
|
272
|
+
*::after {
|
|
273
|
+
box-sizing: border-box;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
html {
|
|
277
|
+
line-height: 1;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
h1,
|
|
281
|
+
h2,
|
|
282
|
+
h3,
|
|
283
|
+
h4,
|
|
284
|
+
h5,
|
|
285
|
+
h6 {
|
|
286
|
+
margin: 0;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
a {
|
|
290
|
+
text-decoration: none;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
button,
|
|
294
|
+
input,
|
|
295
|
+
optgroup,
|
|
296
|
+
select,
|
|
297
|
+
textarea {
|
|
298
|
+
line-height: 1;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
ul {
|
|
302
|
+
padding: 0;
|
|
303
|
+
margin: 0;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
li {
|
|
307
|
+
list-style: none;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
figure {
|
|
311
|
+
margin: 0;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
p {
|
|
315
|
+
margin: 0;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
dl,
|
|
319
|
+
dt,
|
|
320
|
+
dd {
|
|
321
|
+
margin: 0;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.margin-bottom-s {
|
|
325
|
+
margin-bottom: var(--spacing-s);
|
|
326
|
+
}
|
|
327
|
+
`;
|
|
328
|
+
export default GlobalStyle;
|