h2o-library 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +9 -0
- package/dist/components/index.d.ts +21 -0
- package/dist/components/src/accordion.d.ts +9 -0
- package/dist/components/src/button.d.ts +14 -0
- package/dist/components/src/checkbox.d.ts +17 -0
- package/dist/components/src/content-switch.d.ts +14 -0
- package/dist/components/src/date-picker.d.ts +13 -0
- package/dist/components/src/dropdown.d.ts +19 -0
- package/dist/components/src/expandable.d.ts +8 -0
- package/dist/components/src/icon.d.ts +9 -0
- package/dist/components/src/input.d.ts +16 -0
- package/dist/components/src/modal.d.ts +10 -0
- package/dist/components/src/multi-select.d.ts +16 -0
- package/dist/components/src/popover.d.ts +14 -0
- package/dist/components/src/radio-group.d.ts +17 -0
- package/dist/components/src/radio.d.ts +6 -0
- package/dist/components/src/side-panel.d.ts +10 -0
- package/dist/components/src/status.d.ts +8 -0
- package/dist/components/src/tabs.d.ts +10 -0
- package/dist/components/src/tag.d.ts +9 -0
- package/dist/components/src/textarea.d.ts +13 -0
- package/dist/components/src/toggle.d.ts +8 -0
- package/dist/components/src/tooltip.d.ts +9 -0
- package/dist/css/index.css +1 -0
- package/dist/css/src/accordion.css +45 -0
- package/dist/css/src/button.css +195 -0
- package/dist/css/src/calendar.css +16 -0
- package/dist/css/src/checkbox.css +150 -0
- package/dist/css/src/content-switch.css +77 -0
- package/dist/css/src/dropdown.css +220 -0
- package/dist/css/src/index.css +56 -0
- package/dist/css/src/input.css +192 -0
- package/dist/css/src/modal.css +86 -0
- package/dist/css/src/multi-select.css +84 -0
- package/dist/css/src/popover.css +17 -0
- package/dist/css/src/radio-group.css +44 -0
- package/dist/css/src/radio.css +146 -0
- package/dist/css/src/search.css +148 -0
- package/dist/css/src/side-panel.css +76 -0
- package/dist/css/src/status.css +31 -0
- package/dist/css/src/tabs.css +33 -0
- package/dist/css/src/tag.css +52 -0
- package/dist/css/src/textarea.css +156 -0
- package/dist/css/src/toggle.css +122 -0
- package/dist/css/src/tooltip.css +103 -0
- package/dist/esm/components/index.d.ts +21 -0
- package/dist/esm/components/src/accordion.d.ts +9 -0
- package/dist/esm/components/src/button.d.ts +14 -0
- package/dist/esm/components/src/checkbox.d.ts +17 -0
- package/dist/esm/components/src/content-switch.d.ts +14 -0
- package/dist/esm/components/src/date-picker.d.ts +13 -0
- package/dist/esm/components/src/dropdown.d.ts +19 -0
- package/dist/esm/components/src/expandable.d.ts +8 -0
- package/dist/esm/components/src/icon.d.ts +9 -0
- package/dist/esm/components/src/input.d.ts +16 -0
- package/dist/esm/components/src/modal.d.ts +10 -0
- package/dist/esm/components/src/multi-select.d.ts +16 -0
- package/dist/esm/components/src/popover.d.ts +14 -0
- package/dist/esm/components/src/radio-group.d.ts +17 -0
- package/dist/esm/components/src/radio.d.ts +6 -0
- package/dist/esm/components/src/side-panel.d.ts +10 -0
- package/dist/esm/components/src/status.d.ts +8 -0
- package/dist/esm/components/src/tabs.d.ts +10 -0
- package/dist/esm/components/src/tag.d.ts +9 -0
- package/dist/esm/components/src/textarea.d.ts +13 -0
- package/dist/esm/components/src/toggle.d.ts +8 -0
- package/dist/esm/components/src/tooltip.d.ts +9 -0
- package/dist/esm/css/index.css +1 -0
- package/dist/esm/hooks/index.d.ts +1 -0
- package/dist/esm/hooks/src/use-click-outside.d.ts +4 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/esm/types/src/icon.d.ts +1 -0
- package/dist/esm/utils/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/src/use-click-outside.d.ts +4 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/src/icon.d.ts +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +43 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
.textarea-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0.375rem;
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.textarea-header {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.textarea-label {
|
|
15
|
+
font-size: 0.875rem;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
color: hsl(var(--foreground));
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 0.2rem;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.textarea-clear {
|
|
24
|
+
font-size: 0.875rem;
|
|
25
|
+
color: hsl(var(--muted-100));
|
|
26
|
+
background: none;
|
|
27
|
+
border: none;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
transition: color 0.2s;
|
|
30
|
+
padding: 0;
|
|
31
|
+
outline: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.textarea-clear:focus {
|
|
35
|
+
outline: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.textarea-clear:hover {
|
|
39
|
+
color: hsl(var(--primary));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.textarea-wrapper {
|
|
43
|
+
position: relative;
|
|
44
|
+
display: flex;
|
|
45
|
+
width: 100%;
|
|
46
|
+
border-radius: 0.375rem;
|
|
47
|
+
border: 1.5px solid hsl(var(--muted));
|
|
48
|
+
transition: border-color 0.2s, background-color 0.2s;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.textarea-wrapper::after {
|
|
52
|
+
content: "";
|
|
53
|
+
position: absolute;
|
|
54
|
+
right: 0;
|
|
55
|
+
bottom: 0;
|
|
56
|
+
width: 24px;
|
|
57
|
+
height: 24px;
|
|
58
|
+
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.5 15C18.6709 15 18 14.3291 18 13.5C18 12.6709 18.6709 12 19.5 12C20.3291 12 21 12.6709 21 13.5C21 14.3291 20.3291 15 19.5 15ZM19.5 9C18.6709 9 18 8.32908 18 7.5C18 6.67092 18.6709 6 19.5 6C20.3291 6 21 6.67092 21 7.5C21 8.32908 20.3291 9 19.5 9ZM13.5 21C12.6709 21 12 20.3291 12 19.5C12 18.6738 12.6709 18 13.5 18C14.3291 18 15 18.6738 15 19.5C15 20.3291 14.3291 21 13.5 21ZM13.5 15C12.6709 15 12 14.3291 12 13.5C12 12.6709 12.6709 12 13.5 12C14.3291 12 15 12.6709 15 13.5C15 14.3291 14.3291 15 13.5 15ZM7.5 21C6.67383 21 6 20.3291 6 19.5C6 18.6738 6.67383 18 7.5 18C8.32912 18 9 18.6738 9 19.5C9 20.3291 8.32912 21 7.5 21ZM19.5 18C20.3291 18 21 18.6738 21 19.5C21 20.3291 20.3291 21 19.5 21C18.6709 21 18 20.3291 18 19.5C18 18.6738 18.6709 18 19.5 18Z' fill='black'/%3E%3C/svg%3E");
|
|
59
|
+
background-repeat: no-repeat;
|
|
60
|
+
background-position: center;
|
|
61
|
+
background-size: 16px;
|
|
62
|
+
cursor: se-resize;
|
|
63
|
+
opacity: 0.5;
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
transition: opacity 0.2s;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.textarea-wrapper:hover::after {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.textarea-wrapper:not(.textarea-disabled):not(.textarea-error):hover {
|
|
73
|
+
border-color: hsl(var(--primary));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.textarea-wrapper:not(.textarea-disabled):not(.textarea-error):has(
|
|
77
|
+
textarea:focus
|
|
78
|
+
) {
|
|
79
|
+
border-color: hsl(var(--primary-300));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.textarea-wrapper.textarea-error {
|
|
83
|
+
border-color: hsl(var(--destructive));
|
|
84
|
+
background-color: hsl(var(--destructive) / 0.05);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.textarea-wrapper.textarea-error:hover,
|
|
88
|
+
.textarea-wrapper.textarea-error:has(textarea:focus) {
|
|
89
|
+
border-color: hsl(var(--destructive));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.textarea-wrapper.textarea-disabled {
|
|
93
|
+
opacity: 0.5;
|
|
94
|
+
cursor: not-allowed;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.textarea {
|
|
98
|
+
width: 100%;
|
|
99
|
+
min-height: 100px;
|
|
100
|
+
background: transparent;
|
|
101
|
+
border: none;
|
|
102
|
+
outline: none;
|
|
103
|
+
color: hsl(var(--foreground));
|
|
104
|
+
padding: 0.75rem 1rem;
|
|
105
|
+
resize: vertical;
|
|
106
|
+
appearance: none;
|
|
107
|
+
-webkit-appearance: none;
|
|
108
|
+
font-family: inherit;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.textarea::-webkit-resizer {
|
|
112
|
+
display: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.textarea:disabled {
|
|
116
|
+
cursor: not-allowed;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Textarea sizes */
|
|
120
|
+
.textarea-sm {
|
|
121
|
+
font-size: 0.875rem;
|
|
122
|
+
min-height: 80px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.textarea-md {
|
|
126
|
+
font-size: 1rem;
|
|
127
|
+
min-height: 100px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.textarea-lg {
|
|
131
|
+
font-size: 1.125rem;
|
|
132
|
+
min-height: 120px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.textarea-note {
|
|
136
|
+
font-size: 0.875rem;
|
|
137
|
+
color: hsl(var(--muted-100));
|
|
138
|
+
transition: color 0.2s;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.textarea-wrapper:not(.textarea-disabled):not(.textarea-error):hover
|
|
142
|
+
+ .textarea-note {
|
|
143
|
+
color: hsl(var(--primary));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.textarea-wrapper:not(.textarea-disabled):not(.textarea-error):has(
|
|
147
|
+
textarea:focus
|
|
148
|
+
)
|
|
149
|
+
+ .textarea-note {
|
|
150
|
+
color: hsl(var(--primary));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.textarea-error-message {
|
|
154
|
+
font-size: 0.875rem;
|
|
155
|
+
color: hsl(var(--destructive));
|
|
156
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
.toggle-label {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
user-select: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.toggle-text {
|
|
10
|
+
color: hsl(var(--foreground));
|
|
11
|
+
max-width: 80%;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
text-overflow: ellipsis;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.toggle-label input {
|
|
18
|
+
position: absolute;
|
|
19
|
+
opacity: 0;
|
|
20
|
+
width: 0;
|
|
21
|
+
height: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.toggle-container {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 12px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Toggle Switch */
|
|
31
|
+
|
|
32
|
+
.toggle-switch {
|
|
33
|
+
position: relative;
|
|
34
|
+
display: inline-block;
|
|
35
|
+
width: 44px;
|
|
36
|
+
height: 24px;
|
|
37
|
+
background-color: hsl(var(--muted));
|
|
38
|
+
border-radius: 24px;
|
|
39
|
+
transition: all 0.2s;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.toggle-label:not(:has(input:disabled)):hover .toggle-switch {
|
|
43
|
+
background-color: hsl(var(--muted-200));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.toggle-switch::after {
|
|
47
|
+
content: "";
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 3px;
|
|
50
|
+
left: 3px;
|
|
51
|
+
width: 18px;
|
|
52
|
+
height: 18px;
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
background-color: white;
|
|
55
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
56
|
+
transition: transform 0.2s;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Checked Toggle */
|
|
60
|
+
|
|
61
|
+
.toggle-label input:checked + .toggle-switch {
|
|
62
|
+
background-color: hsl(var(--primary));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.toggle-label:not(:has(input:disabled)):hover input:checked + .toggle-switch {
|
|
66
|
+
background-color: hsl(var(--primary-200));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.toggle-label input:checked + .toggle-switch::after {
|
|
70
|
+
transform: translateX(20px);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.toggle-label input:disabled + .toggle-switch {
|
|
74
|
+
opacity: 0.5;
|
|
75
|
+
cursor: not-allowed;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.toggle-card-container {
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
width: 100%;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Toggle Card Style */
|
|
86
|
+
|
|
87
|
+
.toggle-card {
|
|
88
|
+
display: flex;
|
|
89
|
+
padding: 0.5rem 0.8rem;
|
|
90
|
+
border-radius: 0.5rem;
|
|
91
|
+
transition: background-color 0.2s;
|
|
92
|
+
gap: 12px;
|
|
93
|
+
width: 100%;
|
|
94
|
+
background-color: hsl(var(--muted-50));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.toggle-card:not(:has(input:disabled)):hover {
|
|
98
|
+
background-color: hsl(var(--muted));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.toggle-drag-handle {
|
|
102
|
+
color: hsl(var(--muted-100));
|
|
103
|
+
cursor: grab;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.toggle-drag-handle:active {
|
|
107
|
+
cursor: grabbing;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Disabled Toggle */
|
|
111
|
+
|
|
112
|
+
.toggle-label:has(input:disabled) {
|
|
113
|
+
cursor: not-allowed;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.toggle-label:has(input:disabled) .toggle-switch {
|
|
117
|
+
opacity: 0.5;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.toggle-label:has(input:disabled) .toggle-text {
|
|
121
|
+
color: hsl(var(--muted-100));
|
|
122
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
.tooltip-container {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.tooltip-container::before {
|
|
7
|
+
content: attr(data-tooltip);
|
|
8
|
+
position: absolute;
|
|
9
|
+
background-color: hsl(var(--muted-50));
|
|
10
|
+
color: black;
|
|
11
|
+
padding: 0.5rem 1rem;
|
|
12
|
+
border-radius: 4px;
|
|
13
|
+
font-size: 0.875rem;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
opacity: 0;
|
|
16
|
+
visibility: hidden;
|
|
17
|
+
transition: opacity 0.2s ease;
|
|
18
|
+
z-index: 1001;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Arrow */
|
|
23
|
+
.tooltip-container::after {
|
|
24
|
+
content: "";
|
|
25
|
+
position: absolute;
|
|
26
|
+
border: 8px solid transparent;
|
|
27
|
+
opacity: 0;
|
|
28
|
+
visibility: hidden;
|
|
29
|
+
transition: opacity 0.2s ease;
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
z-index: 1000;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Show on hover */
|
|
35
|
+
.tooltip-container:hover::before,
|
|
36
|
+
.tooltip-container:hover::after {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
visibility: visible;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Position: Top */
|
|
42
|
+
.tooltip-container[data-position="top"]::before {
|
|
43
|
+
bottom: 100%;
|
|
44
|
+
left: 50%;
|
|
45
|
+
transform: translateX(-50%);
|
|
46
|
+
margin-bottom: 8px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.tooltip-container[data-position="top"]::after {
|
|
50
|
+
bottom: 100%;
|
|
51
|
+
left: 50%;
|
|
52
|
+
transform: translateX(-50%);
|
|
53
|
+
border-top-color: hsl(var(--muted-50));
|
|
54
|
+
margin-bottom: -8px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Position: Bottom */
|
|
58
|
+
.tooltip-container[data-position="bottom"]::before {
|
|
59
|
+
top: 100%;
|
|
60
|
+
left: 50%;
|
|
61
|
+
transform: translateX(-50%);
|
|
62
|
+
margin-top: 8px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.tooltip-container[data-position="bottom"]::after {
|
|
66
|
+
top: 100%;
|
|
67
|
+
left: 50%;
|
|
68
|
+
transform: translateX(-50%);
|
|
69
|
+
border-bottom-color: hsl(var(--muted-50));
|
|
70
|
+
margin-top: -8px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Position: Left */
|
|
74
|
+
.tooltip-container[data-position="left"]::before {
|
|
75
|
+
right: 100%;
|
|
76
|
+
top: 50%;
|
|
77
|
+
transform: translateY(-50%);
|
|
78
|
+
margin-right: 8px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.tooltip-container[data-position="left"]::after {
|
|
82
|
+
right: 100%;
|
|
83
|
+
top: 50%;
|
|
84
|
+
transform: translateY(-50%);
|
|
85
|
+
border-left-color: hsl(var(--muted-50));
|
|
86
|
+
margin-right: -8px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Position: Right */
|
|
90
|
+
.tooltip-container[data-position="right"]::before {
|
|
91
|
+
left: 100%;
|
|
92
|
+
top: 50%;
|
|
93
|
+
transform: translateY(-50%);
|
|
94
|
+
margin-left: 8px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.tooltip-container[data-position="right"]::after {
|
|
98
|
+
left: 100%;
|
|
99
|
+
top: 50%;
|
|
100
|
+
transform: translateY(-50%);
|
|
101
|
+
border-right-color: hsl(var(--muted-50));
|
|
102
|
+
margin-left: -8px;
|
|
103
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from "./src/button";
|
|
2
|
+
export * from "./src/checkbox";
|
|
3
|
+
export * from "./src/icon";
|
|
4
|
+
export * from "./src/radio";
|
|
5
|
+
export * from "./src/tooltip";
|
|
6
|
+
export * from "./src/toggle";
|
|
7
|
+
export * from "./src/expandable";
|
|
8
|
+
export * from "./src/content-switch";
|
|
9
|
+
export * from "./src/input";
|
|
10
|
+
export * from "./src/textarea";
|
|
11
|
+
export * from "./src/dropdown";
|
|
12
|
+
export * from "./src/side-panel";
|
|
13
|
+
export * from "./src/modal";
|
|
14
|
+
export * from "./src/tag";
|
|
15
|
+
export * from "./src/accordion";
|
|
16
|
+
export * from "./src/date-picker";
|
|
17
|
+
export * from "./src/multi-select";
|
|
18
|
+
export * from "./src/radio-group";
|
|
19
|
+
export * from "./src/tabs";
|
|
20
|
+
export * from "./src/status";
|
|
21
|
+
export * from "./src/popover";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface AccordionProps {
|
|
3
|
+
title: string;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Accordion: ({ title, isOpen, setIsOpen, children, className, }: AccordionProps) => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IconType, TooltipPosition } from "../../types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
variant?: "primary" | "secondary" | "ghost" | "danger";
|
|
5
|
+
size?: "sm" | "md" | "lg";
|
|
6
|
+
label?: string;
|
|
7
|
+
icon?: IconType;
|
|
8
|
+
iconOnly?: boolean;
|
|
9
|
+
isLoading?: boolean;
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
tooltipPosition?: TooltipPosition;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function Button({ variant, size, label, icon, iconOnly, isLoading, tooltip, tooltipPosition, className, disabled, children, ...props }: ButtonProps): React.JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
3
|
+
label?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
isCard?: boolean;
|
|
6
|
+
isIndeterminate?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const Checkbox: React.FC<CheckboxProps>;
|
|
9
|
+
export interface CheckboxGroupProps {
|
|
10
|
+
label: string;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
checked?: boolean;
|
|
14
|
+
indeterminate?: boolean;
|
|
15
|
+
onChange?: (checked: boolean) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const CheckboxGroup: React.FC<CheckboxGroupProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type ContentSwitchProps = {
|
|
3
|
+
options: {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}[];
|
|
7
|
+
variant?: "primary" | "secondary";
|
|
8
|
+
className?: string;
|
|
9
|
+
optionClassName?: string;
|
|
10
|
+
selected: string;
|
|
11
|
+
onChange: (value: string) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const ContentSwitch: ({ options, selected, onChange, variant, className, optionClassName, }: ContentSwitchProps) => React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface DatePickerProps {
|
|
3
|
+
initialDate: Date;
|
|
4
|
+
onDateChange: (date: Date, view: string) => void;
|
|
5
|
+
view?: string;
|
|
6
|
+
onViewChange?: (view: string) => void;
|
|
7
|
+
icons?: Record<string, string>;
|
|
8
|
+
externalView?: string;
|
|
9
|
+
startDay?: number;
|
|
10
|
+
weekDuration?: number;
|
|
11
|
+
}
|
|
12
|
+
declare const DatePicker: React.FC<DatePickerProps>;
|
|
13
|
+
export { DatePicker };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DropdownOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface DropdownProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "value" | "onChange"> {
|
|
8
|
+
size?: "sm" | "md" | "lg";
|
|
9
|
+
label?: string;
|
|
10
|
+
showClear?: boolean;
|
|
11
|
+
note?: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
containerClassName?: string;
|
|
14
|
+
options: DropdownOption[];
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
value?: string;
|
|
17
|
+
onChange?: (value: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconType, TooltipPosition } from "../../types";
|
|
3
|
+
export interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
4
|
+
icon: IconType;
|
|
5
|
+
size?: number;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
tooltipPosition?: TooltipPosition;
|
|
8
|
+
}
|
|
9
|
+
export declare const Icon: React.FC<IconProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconType, TooltipPosition } from "../../types";
|
|
3
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
4
|
+
size?: "sm" | "md" | "lg";
|
|
5
|
+
label?: string;
|
|
6
|
+
leftIcon?: IconType;
|
|
7
|
+
rightIcon?: IconType;
|
|
8
|
+
onRightIconClick?: () => void;
|
|
9
|
+
showClear?: boolean;
|
|
10
|
+
note?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
containerClassName?: string;
|
|
13
|
+
tooltip?: string;
|
|
14
|
+
tooltipPosition?: TooltipPosition;
|
|
15
|
+
}
|
|
16
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Modal: ({ isOpen, onClose, title, description, children, className, }: ModalProps) => React.ReactPortal | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface Option {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
interface MultiSelectProps {
|
|
7
|
+
options: Option[];
|
|
8
|
+
selectedOptions: Option[];
|
|
9
|
+
setSelectedOptions: (options: Option[]) => void;
|
|
10
|
+
optionsType: string;
|
|
11
|
+
maxSelectedOptions?: number;
|
|
12
|
+
toggleLabel?: string;
|
|
13
|
+
onToggle?: (checked: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const MultiSelect: ({ options, selectedOptions, setSelectedOptions, optionsType, maxSelectedOptions, toggleLabel, onToggle, }: MultiSelectProps) => React.JSX.Element;
|
|
16
|
+
export { MultiSelect };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface PopOverProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const PopOver: ({ children, isOpen, setIsOpen }: PopOverProps) => React.JSX.Element;
|
|
8
|
+
export declare const PopOverTrigger: ({ children }: {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}) => React.JSX.Element;
|
|
11
|
+
export declare const PopOverContent: ({ children }: {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}) => React.ReactPortal | null;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconType } from "../../types";
|
|
3
|
+
interface RadioOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
icon?: IconType;
|
|
7
|
+
dot?: "active" | "inactive";
|
|
8
|
+
}
|
|
9
|
+
interface RadioGroupProps {
|
|
10
|
+
options: RadioOption[];
|
|
11
|
+
selected: string;
|
|
12
|
+
onSelect: (value: string) => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
optionClassName?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const RadioGroup: ({ options, selected, onSelect, className, optionClassName, }: RadioGroupProps) => React.JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SidePanelProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const SidePanel: ({ isOpen, onClose, title, description, children, className, }: SidePanelProps) => React.ReactPortal | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface TabsProps {
|
|
3
|
+
tabs: string[];
|
|
4
|
+
selectedTab: string;
|
|
5
|
+
onSelectTab: (tab: string) => void;
|
|
6
|
+
tabClassName?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Tabs: ({ tabs, selectedTab, onSelectTab, tabClassName, className, }: TabsProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type TagProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
variant?: "primary" | "secondary";
|
|
5
|
+
onRemove: () => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const Tag: ({ label, variant, onRemove, className, }: TagProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TooltipPosition } from "../../types";
|
|
3
|
+
export interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> {
|
|
4
|
+
size?: "sm" | "md" | "lg";
|
|
5
|
+
label?: string;
|
|
6
|
+
showClear?: boolean;
|
|
7
|
+
note?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
containerClassName?: string;
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
tooltipPosition?: TooltipPosition;
|
|
12
|
+
}
|
|
13
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ToggleProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
3
|
+
label?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
isCard?: boolean;
|
|
6
|
+
isDraggable?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const Toggle: React.FC<ToggleProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TooltipPosition } from "../../types";
|
|
3
|
+
export interface TooltipProps {
|
|
4
|
+
text: string;
|
|
5
|
+
position?: TooltipPosition;
|
|
6
|
+
className?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|