master-components-react-ts 2.1.2 → 2.1.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/dist/_virtual/_commonjsHelpers.js +8 -0
- package/dist/_virtual/customParseFormat.js +4 -0
- package/dist/_virtual/jsx-runtime.js +4 -0
- package/dist/_virtual/react-jsx-runtime.production.js +4 -0
- package/dist/assets/Icons/IconArrowUp.js +13 -0
- package/dist/assets/Icons/IconCalendar.js +32 -0
- package/dist/assets/Icons/IconCheck.js +15 -0
- package/dist/assets/Icons/IconCheckCircle.js +16 -0
- package/dist/assets/Icons/IconCheckmark.js +15 -0
- package/dist/assets/Icons/IconCircularLoading.js +36 -0
- package/dist/assets/Icons/IconClose.js +31 -0
- package/dist/assets/Icons/IconCloseBackground.js +15 -0
- package/dist/assets/Icons/IconCloseCircle.js +15 -0
- package/dist/assets/Icons/IconErrorDash.js +15 -0
- package/dist/assets/Icons/IconExclamation.js +15 -0
- package/dist/assets/Icons/IconLeft.js +13 -0
- package/dist/assets/Icons/IconLoading.js +22 -0
- package/dist/assets/Icons/IconMinus.js +7 -0
- package/dist/assets/Icons/IconRadioChecked.js +19 -0
- package/dist/assets/Icons/IconRadioCheckedDisabled.js +19 -0
- package/dist/assets/Icons/IconRadioUnchecked.js +16 -0
- package/dist/assets/Icons/IconRadioUncheckedDisabled.js +16 -0
- package/dist/assets/Icons/IconRight.js +13 -0
- package/dist/assets/Icons/IconSave.js +16 -0
- package/dist/assets/Icons/IconSearch.js +26 -0
- package/dist/assets/Icons/IconSuccess.js +15 -0
- package/dist/assets/Icons/IconTrash.js +16 -0
- package/dist/assets/components/ActionDropdown/ActionDropdown.module-CJpBa8kB.css +85 -0
- package/dist/assets/components/Checkbox/Checkbox.module-_XqqEodq.css +82 -0
- package/dist/assets/components/DatePicker/Calendar.module-D3fcZWFD.css +316 -0
- package/dist/assets/components/DatePicker/Datepicker.module-BxWRyQpP.css +39 -0
- package/dist/assets/components/Dropdown/Dropdown.module-DgjqziBo.css +242 -0
- package/dist/assets/components/FormInput/FormInput.module-DvfUbgbC.css +240 -0
- package/dist/assets/components/InlineLoading/InlineLoading.module-iVTVTMU0.css +40 -0
- package/dist/assets/components/MainButton/MainButton.module-8Us8t8Lb.css +306 -0
- package/dist/assets/components/NotificationToast/NotificationToast.module-mSanXElM.css +179 -0
- package/dist/assets/components/Popup/Popup.module-C1XFPW6u.css +152 -0
- package/dist/assets/components/Radio/Radio.module-BvqKw6WX.css +21 -0
- package/dist/assets/components/Skeleton/Skeleton.module-BxbVrXDg.css +57 -0
- package/dist/assets/components/Textarea/Textarea.module-BxaBUjlU.css +167 -0
- package/dist/assets/components/TimePicker/TimePicker.module-DfRiUaeb.css +150 -0
- package/dist/assets/components/Toggle/Toggle.module-DBfTR8Br.css +75 -0
- package/dist/assets/components/Tooltip/Tooltip.module-DEYqvQtd.css +113 -0
- package/dist/components/ActionDropdown/ActionDropdown.js +74 -0
- package/dist/components/ActionDropdown/ActionDropdown.module.scss.js +29 -0
- package/dist/components/Checkbox/Checkbox.js +54 -0
- package/dist/components/Checkbox/Checkbox.module.scss.js +26 -0
- package/dist/components/DatePicker/Calendar.js +437 -0
- package/dist/components/DatePicker/Calendar.module.scss.js +83 -0
- package/dist/components/DatePicker/DatePicker.js +211 -0
- package/dist/components/DatePicker/Datepicker.module.scss.js +17 -0
- package/dist/components/Dropdown/Dropdown.js +337 -0
- package/dist/components/Dropdown/Dropdown.module.scss.js +74 -0
- package/dist/components/FormInput/FormInput.js +151 -0
- package/dist/components/FormInput/FormInput.module.scss.js +62 -0
- package/dist/components/InlineLoading/InlineLoading.js +24 -0
- package/dist/components/InlineLoading/InlineLoading.module.scss.js +11 -0
- package/dist/components/MainButton/MainButton.js +72 -0
- package/dist/components/MainButton/MainButton.module.scss.js +56 -0
- package/dist/components/NotificationToast/NotificationContext.js +57 -0
- package/dist/components/NotificationToast/NotificationToast.js +66 -0
- package/dist/components/NotificationToast/NotificationToast.module.scss.js +59 -0
- package/dist/components/NotificationToast/createNotificationToast.js +10 -0
- package/dist/components/Popup/Popup.js +116 -0
- package/dist/components/Popup/Popup.module.scss.js +41 -0
- package/dist/components/Radio/Radio.js +46 -0
- package/dist/components/Radio/Radio.module.scss.js +8 -0
- package/dist/components/Skeleton/Skeleton.js +8 -0
- package/dist/components/Skeleton/Skeleton.module.scss.js +20 -0
- package/dist/components/Textarea/Textarea.js +149 -0
- package/dist/components/Textarea/Textarea.module.scss.js +41 -0
- package/dist/components/TimePicker/TimePicker.js +172 -0
- package/dist/components/TimePicker/TimePicker.module.scss.js +50 -0
- package/dist/components/Toggle/Toggle.js +20 -0
- package/dist/components/Toggle/Toggle.module.scss.js +29 -0
- package/dist/components/Tooltip/Tooltip.js +153 -0
- package/dist/components/Tooltip/Tooltip.module.scss.js +35 -0
- package/dist/context/NamespaceContext.js +7 -0
- package/dist/index.js +32 -5154
- package/dist/node_modules/dayjs/plugin/customParseFormat.js +129 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.js +35 -0
- package/dist/node_modules/react/jsx-runtime.js +10 -0
- package/dist/utils/Helpers.js +15 -0
- package/package.json +10 -15
- package/dist/types/css-modules.d.ts +0 -9
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: "Inter-Regular";
|
|
3
|
+
src: url("/assets/Inter_24pt-Regular-C7SEt4-L.woff2") format("woff2"), url("../../assets/fonts/Inter_24pt-Regular.woff") format("woff");
|
|
4
|
+
}
|
|
5
|
+
@font-face {
|
|
6
|
+
font-family: "Inter-SemiBold";
|
|
7
|
+
src: url("/assets/Inter_24pt-SemiBold-DIQUEucn.woff2") format("woff2"), url("../../assets/fonts/Inter_24pt-SemiBold.woff") format("woff");
|
|
8
|
+
}
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: "Inter-Medium";
|
|
11
|
+
src: url("/assets/Inter_24pt-Medium-C1cYvkz2.woff2") format("woff2"), url("../../assets/fonts/Inter_24pt-Medium.woff") format("woff");
|
|
12
|
+
}
|
|
13
|
+
.TimePicker-module__timepickerWrapper {
|
|
14
|
+
user-select: none;
|
|
15
|
+
scroll-behavior: smooth;
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
.TimePicker-module__timepickerWrapper * {
|
|
19
|
+
scrollbar-width: none;
|
|
20
|
+
}
|
|
21
|
+
.TimePicker-module__timepickerWrapper *::-webkit-scrollbar {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerInputWrapper {
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerInputWrapper .TimePicker-module__dropdownRightIcon {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 8px;
|
|
31
|
+
margin: 8px;
|
|
32
|
+
}
|
|
33
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerInputWrapper .TimePicker-module__dropdownRightIcon .TimePicker-module__dropdownRightIconClose {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerInputWrapper .TimePicker-module__dropdownRightIcon .TimePicker-module__dropdownRightIconArrow {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
transition: transform 0.2s ease-in-out;
|
|
45
|
+
}
|
|
46
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerInputWrapper .TimePicker-module__dropdownRightIcon.TimePicker-module__focused .TimePicker-module__dropdownRightIconArrow {
|
|
47
|
+
transform: rotate(180deg);
|
|
48
|
+
}
|
|
49
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper {
|
|
50
|
+
width: 218px;
|
|
51
|
+
border-radius: 12px;
|
|
52
|
+
box-shadow: 0px 2px 4px 0px rgba(19, 19, 20, 0.04);
|
|
53
|
+
border: 1px solid #e6e6e6;
|
|
54
|
+
background: #fff;
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
gap: 8px;
|
|
58
|
+
}
|
|
59
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper .TimePicker-module__timepickerDropdownHeader {
|
|
60
|
+
padding: 8px 8px 0 8px;
|
|
61
|
+
}
|
|
62
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper .TimePicker-module__timepickerDropdownHeader .TimePicker-module__timepickerDropdownHeaderButtons {
|
|
63
|
+
width: 100%;
|
|
64
|
+
display: flex;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
gap: 2px;
|
|
67
|
+
border-radius: 8px;
|
|
68
|
+
background: #f2f2f2;
|
|
69
|
+
padding: 2px;
|
|
70
|
+
}
|
|
71
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper .TimePicker-module__timepickerDropdownHeader p {
|
|
72
|
+
padding: 5px 20px;
|
|
73
|
+
color: #646569;
|
|
74
|
+
font-feature-settings: "liga" off, "clig" off;
|
|
75
|
+
font-family: "Inter-Regular", sans-serif;
|
|
76
|
+
font-size: 14px;
|
|
77
|
+
font-style: normal;
|
|
78
|
+
font-weight: 400;
|
|
79
|
+
line-height: 24px; /* 171.429% */
|
|
80
|
+
letter-spacing: 0.1px;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
}
|
|
83
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper .TimePicker-module__timepickerDropdownHeader p.TimePicker-module__active {
|
|
84
|
+
color: #131314;
|
|
85
|
+
border-radius: 6px 6px 6px 6px;
|
|
86
|
+
background: #fff;
|
|
87
|
+
box-shadow: 0px 2px 4px 0px rgba(19, 19, 20, 0.04);
|
|
88
|
+
}
|
|
89
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper .TimePicker-module__timepickerDropdownBody {
|
|
90
|
+
width: 100%;
|
|
91
|
+
display: flex;
|
|
92
|
+
border-top: 1px solid #e6e6e6;
|
|
93
|
+
border-bottom: 1px solid #e6e6e6;
|
|
94
|
+
}
|
|
95
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper .TimePicker-module__timepickerDropdownBody .TimePicker-module__timepickerDropdownBodyHours {
|
|
96
|
+
width: 50%;
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
align-items: center;
|
|
100
|
+
height: 230px;
|
|
101
|
+
overflow-y: auto;
|
|
102
|
+
border-right: 1px solid #e6e6e6;
|
|
103
|
+
padding: 8px;
|
|
104
|
+
}
|
|
105
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper .TimePicker-module__timepickerDropdownBody .TimePicker-module__timepickerDropdownBodyMinutes {
|
|
106
|
+
width: 50%;
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
align-items: center;
|
|
110
|
+
height: 230px;
|
|
111
|
+
overflow-y: auto;
|
|
112
|
+
padding: 8px;
|
|
113
|
+
}
|
|
114
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper .TimePicker-module__timepickerDropdownBody .TimePicker-module__timepickerDropdownBodyAmPm {
|
|
115
|
+
width: 50%;
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
align-items: center;
|
|
119
|
+
height: 230px;
|
|
120
|
+
overflow-y: auto;
|
|
121
|
+
border-left: 1px solid #e6e6e6;
|
|
122
|
+
padding: 8px;
|
|
123
|
+
}
|
|
124
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper .TimePicker-module__timepickerDropdownBody p {
|
|
125
|
+
padding: 6px 10px;
|
|
126
|
+
border-radius: 4px;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
width: 100%;
|
|
129
|
+
color: #131314;
|
|
130
|
+
text-align: center;
|
|
131
|
+
font-feature-settings: "liga" off, "clig" off;
|
|
132
|
+
text-overflow: ellipsis;
|
|
133
|
+
/* UI/14 regular */
|
|
134
|
+
font-family: "Inter-Regular", sans-serif;
|
|
135
|
+
font-size: 14px;
|
|
136
|
+
font-style: normal;
|
|
137
|
+
font-weight: 400;
|
|
138
|
+
line-height: 24px; /* 171.429% */
|
|
139
|
+
letter-spacing: 0.1px;
|
|
140
|
+
}
|
|
141
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper .TimePicker-module__timepickerDropdownBody p:hover {
|
|
142
|
+
background: #fafafa;
|
|
143
|
+
}
|
|
144
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper .TimePicker-module__timepickerDropdownBody p.TimePicker-module__active {
|
|
145
|
+
background: #ECF3FF;
|
|
146
|
+
color: #0058FF;
|
|
147
|
+
}
|
|
148
|
+
.TimePicker-module__timepickerWrapper .TimePicker-module__timepickerDropdownWrapper .TimePicker-module__timepickerDropdownFooter {
|
|
149
|
+
padding: 8px;
|
|
150
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: "Inter-Regular";
|
|
3
|
+
src: url("/assets/Inter_24pt-Regular-C7SEt4-L.woff2") format("woff2"), url("../../assets/fonts/Inter_24pt-Regular.woff") format("woff");
|
|
4
|
+
}
|
|
5
|
+
@font-face {
|
|
6
|
+
font-family: "Inter-SemiBold";
|
|
7
|
+
src: url("/assets/Inter_24pt-SemiBold-DIQUEucn.woff2") format("woff2"), url("../../assets/fonts/Inter_24pt-SemiBold.woff") format("woff");
|
|
8
|
+
}
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: "Inter-Medium";
|
|
11
|
+
src: url("/assets/Inter_24pt-Medium-C1cYvkz2.woff2") format("woff2"), url("../../assets/fonts/Inter_24pt-Medium.woff") format("woff");
|
|
12
|
+
}
|
|
13
|
+
.Toggle-module__toggleWrapper {
|
|
14
|
+
position: relative;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
border-radius: 13.333px;
|
|
17
|
+
background: #c1c2c7;
|
|
18
|
+
padding: 4px;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
.Toggle-module__toggleWrapper.Toggle-module__checked {
|
|
22
|
+
background: #0058FF;
|
|
23
|
+
}
|
|
24
|
+
.Toggle-module__toggleWrapper.Toggle-module__error {
|
|
25
|
+
background: #e3292f;
|
|
26
|
+
}
|
|
27
|
+
.Toggle-module__toggleWrapper.Toggle-module__disabled {
|
|
28
|
+
background: #d4d5d6;
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
}
|
|
31
|
+
.Toggle-module__toggleWrapper.Toggle-module__disabled.Toggle-module__checked {
|
|
32
|
+
background: #95969c;
|
|
33
|
+
}
|
|
34
|
+
.Toggle-module__toggleWrapper.Toggle-module__sm {
|
|
35
|
+
width: 24px;
|
|
36
|
+
height: 16px;
|
|
37
|
+
}
|
|
38
|
+
.Toggle-module__toggleWrapper.Toggle-module__sm.Toggle-module__checked .Toggle-module__toggleState {
|
|
39
|
+
left: calc(100% - 12px);
|
|
40
|
+
}
|
|
41
|
+
.Toggle-module__toggleWrapper.Toggle-module__sm .Toggle-module__toggleState {
|
|
42
|
+
width: 8px;
|
|
43
|
+
height: 8px;
|
|
44
|
+
}
|
|
45
|
+
.Toggle-module__toggleWrapper.Toggle-module__md {
|
|
46
|
+
width: 32px;
|
|
47
|
+
height: 20px;
|
|
48
|
+
}
|
|
49
|
+
.Toggle-module__toggleWrapper.Toggle-module__md.Toggle-module__checked .Toggle-module__toggleState {
|
|
50
|
+
left: calc(100% - 16px);
|
|
51
|
+
}
|
|
52
|
+
.Toggle-module__toggleWrapper.Toggle-module__md .Toggle-module__toggleState {
|
|
53
|
+
width: 12px;
|
|
54
|
+
height: 12px;
|
|
55
|
+
}
|
|
56
|
+
.Toggle-module__toggleWrapper.Toggle-module__lg {
|
|
57
|
+
width: 40px;
|
|
58
|
+
height: 24px;
|
|
59
|
+
}
|
|
60
|
+
.Toggle-module__toggleWrapper.Toggle-module__lg .Toggle-module__toggleState {
|
|
61
|
+
width: 16px;
|
|
62
|
+
height: 16px;
|
|
63
|
+
}
|
|
64
|
+
.Toggle-module__toggleWrapper.Toggle-module__lg.Toggle-module__checked .Toggle-module__toggleState {
|
|
65
|
+
left: calc(100% - 20px);
|
|
66
|
+
}
|
|
67
|
+
.Toggle-module__toggleWrapper .Toggle-module__toggleState {
|
|
68
|
+
border-radius: 8px;
|
|
69
|
+
background: #fff;
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: 50%;
|
|
72
|
+
left: 4px;
|
|
73
|
+
transform: translateY(-50%);
|
|
74
|
+
transition: 0.2s all;
|
|
75
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: "Inter-Regular";
|
|
3
|
+
src: url("/assets/Inter_24pt-Regular-C7SEt4-L.woff2") format("woff2"), url("../../assets/fonts/Inter_24pt-Regular.woff") format("woff");
|
|
4
|
+
}
|
|
5
|
+
@font-face {
|
|
6
|
+
font-family: "Inter-SemiBold";
|
|
7
|
+
src: url("/assets/Inter_24pt-SemiBold-DIQUEucn.woff2") format("woff2"), url("../../assets/fonts/Inter_24pt-SemiBold.woff") format("woff");
|
|
8
|
+
}
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: "Inter-Medium";
|
|
11
|
+
src: url("/assets/Inter_24pt-Medium-C1cYvkz2.woff2") format("woff2"), url("../../assets/fonts/Inter_24pt-Medium.woff") format("woff");
|
|
12
|
+
}
|
|
13
|
+
.Tooltip-module__tooltipContainer {
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent {
|
|
17
|
+
border-radius: 0.5rem;
|
|
18
|
+
background: #181d27;
|
|
19
|
+
padding: 0.75rem;
|
|
20
|
+
max-width: 200px;
|
|
21
|
+
min-width: 118px;
|
|
22
|
+
position: absolute;
|
|
23
|
+
z-index: 99999;
|
|
24
|
+
word-break: break-word;
|
|
25
|
+
/* Absolute positioning */
|
|
26
|
+
/* CSS border triangles */
|
|
27
|
+
/* Absolute positioning */
|
|
28
|
+
/* CSS border triangles */
|
|
29
|
+
/* Absolute positioning */
|
|
30
|
+
/* CSS border triangles */
|
|
31
|
+
/* Absolute positioning */
|
|
32
|
+
/* CSS border triangles */
|
|
33
|
+
}
|
|
34
|
+
.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent.Tooltip-module__withoutPointer::before {
|
|
35
|
+
all: initial;
|
|
36
|
+
}
|
|
37
|
+
.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent::before {
|
|
38
|
+
content: " ";
|
|
39
|
+
left: 50%;
|
|
40
|
+
border: solid transparent;
|
|
41
|
+
height: 0;
|
|
42
|
+
width: 0;
|
|
43
|
+
position: absolute;
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
border-width: 6px;
|
|
46
|
+
margin-left: -6px;
|
|
47
|
+
}
|
|
48
|
+
.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent.Tooltip-module__top::before {
|
|
49
|
+
top: 100%;
|
|
50
|
+
border-top-color: #181d27;
|
|
51
|
+
left: var(--pointer-position);
|
|
52
|
+
}
|
|
53
|
+
.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent.Tooltip-module__right::before {
|
|
54
|
+
left: -6px;
|
|
55
|
+
top: 50%;
|
|
56
|
+
transform: translateX(0) translateY(-50%);
|
|
57
|
+
border-right-color: #181d27;
|
|
58
|
+
}
|
|
59
|
+
.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent.Tooltip-module__bottom::before {
|
|
60
|
+
bottom: 100%;
|
|
61
|
+
left: var(--pointer-position);
|
|
62
|
+
border-bottom-color: #181d27;
|
|
63
|
+
}
|
|
64
|
+
.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent.Tooltip-module__left::before {
|
|
65
|
+
left: auto;
|
|
66
|
+
right: -12px;
|
|
67
|
+
top: 50%;
|
|
68
|
+
transform: translateX(0) translateY(-50%);
|
|
69
|
+
border-left-color: #181d27;
|
|
70
|
+
}
|
|
71
|
+
.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent .Tooltip-module__tooltipTitle {
|
|
72
|
+
width: 100%;
|
|
73
|
+
word-break: break-word;
|
|
74
|
+
color: #fff;
|
|
75
|
+
font-family: "Inter-Regular", sans-serif;
|
|
76
|
+
font-size: 0.75rem;
|
|
77
|
+
font-style: normal;
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
line-height: 1.125rem; /* 150% */
|
|
80
|
+
}
|
|
81
|
+
.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent .Tooltip-module__tooltipText {
|
|
82
|
+
width: 100%;
|
|
83
|
+
word-break: break-word;
|
|
84
|
+
color: rgba(255, 255, 255, 0.9);
|
|
85
|
+
font-family: "Inter-Regular", sans-serif;
|
|
86
|
+
font-size: 0.75rem;
|
|
87
|
+
font-style: normal;
|
|
88
|
+
font-weight: 500;
|
|
89
|
+
line-height: 1.125rem; /* 150% */
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.Tooltip-module__dark.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent {
|
|
93
|
+
background: #ffffff;
|
|
94
|
+
}
|
|
95
|
+
.Tooltip-module__dark.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent.Tooltip-module__top::before {
|
|
96
|
+
border-top-color: #ffffff;
|
|
97
|
+
left: var(--pointer-position);
|
|
98
|
+
}
|
|
99
|
+
.Tooltip-module__dark.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent.Tooltip-module__right::before {
|
|
100
|
+
border-right-color: #ffffff;
|
|
101
|
+
}
|
|
102
|
+
.Tooltip-module__dark.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent.Tooltip-module__bottom::before {
|
|
103
|
+
border-bottom-color: #ffffff;
|
|
104
|
+
}
|
|
105
|
+
.Tooltip-module__dark.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent.Tooltip-module__left::before {
|
|
106
|
+
border-left-color: #ffffff;
|
|
107
|
+
}
|
|
108
|
+
.Tooltip-module__dark.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent .Tooltip-module__tooltipTitle {
|
|
109
|
+
color: #0c0e12;
|
|
110
|
+
}
|
|
111
|
+
.Tooltip-module__dark.Tooltip-module__tooltipContainer .Tooltip-module__tooltipContent .Tooltip-module__tooltipText {
|
|
112
|
+
color: rgba(12, 14, 18, 0.9);
|
|
113
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import style from "./ActionDropdown.module.scss.js";
|
|
3
|
+
import { IconArrowUp } from "../../assets/Icons/IconArrowUp.js";
|
|
4
|
+
import { useState, useRef, useEffect } from "react";
|
|
5
|
+
const ActionDropdown = ({ title, data, onSelect }) => {
|
|
6
|
+
const [Collapsed, setCollapsed] = useState(false);
|
|
7
|
+
const DropdownRef = useRef(null);
|
|
8
|
+
const ListRef = useRef(null);
|
|
9
|
+
const [Selected, setSelected] = useState(null);
|
|
10
|
+
const HandleSelect = (item) => {
|
|
11
|
+
setSelected(item);
|
|
12
|
+
onSelect?.(item);
|
|
13
|
+
setCollapsed(false);
|
|
14
|
+
};
|
|
15
|
+
const CalculatePos = () => {
|
|
16
|
+
const componentEl = DropdownRef.current;
|
|
17
|
+
const dropdownEl = ListRef.current;
|
|
18
|
+
if (!dropdownEl || !componentEl) return;
|
|
19
|
+
const componentRect = componentEl.getBoundingClientRect();
|
|
20
|
+
const windowHeight = window.innerHeight;
|
|
21
|
+
dropdownEl.style.position = "fixed";
|
|
22
|
+
dropdownEl.style.width = componentRect.width + "px";
|
|
23
|
+
dropdownEl.style.left = `${componentRect.left + window.pageXOffset}px`;
|
|
24
|
+
if (componentRect.bottom + dropdownEl.offsetHeight > windowHeight) {
|
|
25
|
+
dropdownEl.style.top = `${window.scrollY + componentRect.top - dropdownEl.offsetHeight - 4}px`;
|
|
26
|
+
dropdownEl.style.bottom = "unset";
|
|
27
|
+
} else {
|
|
28
|
+
dropdownEl.style.top = `${window.scrollY + componentRect.bottom + 8}px`;
|
|
29
|
+
dropdownEl.style.bottom = "unset";
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
CalculatePos();
|
|
34
|
+
}, [DropdownRef, Collapsed]);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
const ClickHandler = (event) => {
|
|
37
|
+
if (!DropdownRef.current) return;
|
|
38
|
+
if (event.composedPath().includes(DropdownRef.current)) return;
|
|
39
|
+
setCollapsed(false);
|
|
40
|
+
};
|
|
41
|
+
const ScrollHandler = (event) => {
|
|
42
|
+
if (!DropdownRef.current || !ListRef.current) return;
|
|
43
|
+
if (ListRef.current.contains(event.target)) return;
|
|
44
|
+
setCollapsed(false);
|
|
45
|
+
};
|
|
46
|
+
document.addEventListener("click", ClickHandler);
|
|
47
|
+
document.addEventListener("wheel", ScrollHandler);
|
|
48
|
+
return () => {
|
|
49
|
+
document.removeEventListener("click", ClickHandler);
|
|
50
|
+
document.removeEventListener("wheel", ScrollHandler);
|
|
51
|
+
};
|
|
52
|
+
}, []);
|
|
53
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${style.actionDropdownContainer} ${Collapsed ? style.collapsed : ""}`, children: [
|
|
54
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: DropdownRef, className: style.actionDropdownContent, onClick: () => setCollapsed((state) => !state), children: [
|
|
55
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { title, className: style.actionDropdownTitle, children: Selected?.label || title }),
|
|
56
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: style.actionDropdownIcon, children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconArrowUp, { width: "10", height: "6", color: "#131314" }) })
|
|
57
|
+
] }),
|
|
58
|
+
Collapsed && /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { ref: ListRef, onClick: (e) => e.stopPropagation(), className: style.actionDropdownList, children: data.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
59
|
+
"li",
|
|
60
|
+
{
|
|
61
|
+
onClick: (e) => {
|
|
62
|
+
e.stopPropagation();
|
|
63
|
+
HandleSelect(item);
|
|
64
|
+
},
|
|
65
|
+
className: `${style.actionDropdownItem} ${Selected?.id === item.id ? style.selected : ""}`,
|
|
66
|
+
children: item.label
|
|
67
|
+
},
|
|
68
|
+
item.id
|
|
69
|
+
)) }, data.length)
|
|
70
|
+
] });
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
ActionDropdown as default
|
|
74
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const actionDropdownContainer = "ActionDropdown-module__actionDropdownContainer";
|
|
2
|
+
const collapsed = "ActionDropdown-module__collapsed";
|
|
3
|
+
const actionDropdownIcon = "ActionDropdown-module__actionDropdownIcon";
|
|
4
|
+
const actionDropdownContent = "ActionDropdown-module__actionDropdownContent";
|
|
5
|
+
const actionDropdownTitle = "ActionDropdown-module__actionDropdownTitle";
|
|
6
|
+
const actionDropdownList = "ActionDropdown-module__actionDropdownList";
|
|
7
|
+
const actionDropdownItem = "ActionDropdown-module__actionDropdownItem";
|
|
8
|
+
const selected = "ActionDropdown-module__selected";
|
|
9
|
+
const style = {
|
|
10
|
+
actionDropdownContainer,
|
|
11
|
+
collapsed,
|
|
12
|
+
actionDropdownIcon,
|
|
13
|
+
actionDropdownContent,
|
|
14
|
+
actionDropdownTitle,
|
|
15
|
+
actionDropdownList,
|
|
16
|
+
actionDropdownItem,
|
|
17
|
+
selected
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
actionDropdownContainer,
|
|
21
|
+
actionDropdownContent,
|
|
22
|
+
actionDropdownIcon,
|
|
23
|
+
actionDropdownItem,
|
|
24
|
+
actionDropdownList,
|
|
25
|
+
actionDropdownTitle,
|
|
26
|
+
collapsed,
|
|
27
|
+
style as default,
|
|
28
|
+
selected
|
|
29
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { useRef, useState } from "react";
|
|
3
|
+
import style from "./Checkbox.module.scss.js";
|
|
4
|
+
import { useNamespace } from "../../context/NamespaceContext.js";
|
|
5
|
+
import { IconMinus } from "../../assets/Icons/IconMinus.js";
|
|
6
|
+
import { IconCheckmark } from "../../assets/Icons/IconCheckmark.js";
|
|
7
|
+
const Checkbox = ({
|
|
8
|
+
checked,
|
|
9
|
+
change,
|
|
10
|
+
type = "default",
|
|
11
|
+
disabled = false,
|
|
12
|
+
required = false,
|
|
13
|
+
multipleChecked = false,
|
|
14
|
+
activeStyle,
|
|
15
|
+
checkBoxStyle,
|
|
16
|
+
theme = "light"
|
|
17
|
+
}) => {
|
|
18
|
+
const namespace = useNamespace();
|
|
19
|
+
const CheckboxRef = useRef(null);
|
|
20
|
+
const [isActive, setIsActive] = useState(false);
|
|
21
|
+
const onChange = () => {
|
|
22
|
+
if (disabled) return;
|
|
23
|
+
if (change && typeof change === "function") {
|
|
24
|
+
change(!checked);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const getStyle = () => {
|
|
28
|
+
if (isActive) {
|
|
29
|
+
if (disabled) {
|
|
30
|
+
return { boxShadow: "none" };
|
|
31
|
+
}
|
|
32
|
+
return activeStyle ?? {};
|
|
33
|
+
}
|
|
34
|
+
return checkBoxStyle ?? {};
|
|
35
|
+
};
|
|
36
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
style: getStyle(),
|
|
40
|
+
className: `${theme === "dark" ? style.dark : ""} ${style[namespace]} ${style.checkboxWrapper} ${type === "error" ? style.error : ""} ${checked ? style.checked : style.unChecked} ${disabled ? style.disabled : ""}`,
|
|
41
|
+
onMouseDown: () => setIsActive(true),
|
|
42
|
+
onMouseUp: () => setIsActive(false),
|
|
43
|
+
onMouseLeave: () => setIsActive(false),
|
|
44
|
+
onClick: onChange,
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("input", { ref: CheckboxRef, type: "checkbox", disabled, checked: checked ?? false, hidden: true, readOnly: true, required: required ?? false }),
|
|
47
|
+
checked ? multipleChecked ? /* @__PURE__ */ jsxRuntimeExports.jsx(IconMinus, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(IconCheckmark, {}) : ""
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
Checkbox as default
|
|
54
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const checkboxWrapper = "Checkbox-module__checkboxWrapper";
|
|
2
|
+
const checkMark = "Checkbox-module__checkMark";
|
|
3
|
+
const error = "Checkbox-module__error";
|
|
4
|
+
const checked = "Checkbox-module__checked";
|
|
5
|
+
const disabled = "Checkbox-module__disabled";
|
|
6
|
+
const namespaceHr = "Checkbox-module__Namespace_Hr";
|
|
7
|
+
const dark = "Checkbox-module__dark";
|
|
8
|
+
const style = {
|
|
9
|
+
checkboxWrapper,
|
|
10
|
+
checkMark,
|
|
11
|
+
error,
|
|
12
|
+
checked,
|
|
13
|
+
disabled,
|
|
14
|
+
namespaceHr,
|
|
15
|
+
dark
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
checkMark,
|
|
19
|
+
checkboxWrapper,
|
|
20
|
+
checked,
|
|
21
|
+
dark,
|
|
22
|
+
style as default,
|
|
23
|
+
disabled,
|
|
24
|
+
error,
|
|
25
|
+
namespaceHr
|
|
26
|
+
};
|