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,150 @@
|
|
|
1
|
+
.checkbox-label {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 12px;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
user-select: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.checkbox-label input {
|
|
11
|
+
position: absolute;
|
|
12
|
+
opacity: 0;
|
|
13
|
+
width: 0;
|
|
14
|
+
height: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.checkbox-box {
|
|
18
|
+
position: relative;
|
|
19
|
+
display: inline-block;
|
|
20
|
+
width: 20px;
|
|
21
|
+
height: 20px;
|
|
22
|
+
border: 2px solid hsl(var(--muted));
|
|
23
|
+
border-radius: 4px;
|
|
24
|
+
transition: all 0.2s;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.checkbox-label:not(:has(input:disabled)):hover .checkbox-box {
|
|
28
|
+
border-color: hsl(var(--primary-200));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.checkbox-box::after {
|
|
32
|
+
content: "";
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 2px;
|
|
35
|
+
left: 6px;
|
|
36
|
+
width: 5px;
|
|
37
|
+
height: 10px;
|
|
38
|
+
border: solid white;
|
|
39
|
+
border-width: 0 2px 2px 0;
|
|
40
|
+
transform: rotate(45deg) scale(0);
|
|
41
|
+
opacity: 0;
|
|
42
|
+
transition: all 0.2s;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Indeterminate state */
|
|
46
|
+
.checkbox-label input:indeterminate + .checkbox-box {
|
|
47
|
+
background-color: hsl(var(--primary));
|
|
48
|
+
border-color: hsl(var(--primary));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.checkbox-label input:indeterminate + .checkbox-box::after {
|
|
52
|
+
transform: none;
|
|
53
|
+
opacity: 1;
|
|
54
|
+
border: none;
|
|
55
|
+
width: 10px;
|
|
56
|
+
height: 2px;
|
|
57
|
+
background: white;
|
|
58
|
+
top: 7px;
|
|
59
|
+
left: 3px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.checkbox-label input:checked + .checkbox-box {
|
|
63
|
+
background-color: hsl(var(--primary));
|
|
64
|
+
border-color: hsl(var(--primary));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.checkbox-label:not(:has(input:disabled)):hover input:checked + .checkbox-box,
|
|
68
|
+
.checkbox-label:not(:has(input:disabled)):hover
|
|
69
|
+
input:indeterminate
|
|
70
|
+
+ .checkbox-box {
|
|
71
|
+
background-color: hsl(var(--primary-200));
|
|
72
|
+
border-color: hsl(var(--primary-200));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.checkbox-label input:checked + .checkbox-box::after {
|
|
76
|
+
transform: rotate(45deg) scale(1);
|
|
77
|
+
opacity: 1;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.checkbox-text {
|
|
81
|
+
color: hsl(var(--foreground));
|
|
82
|
+
max-width: 80%;
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
text-overflow: ellipsis;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.checkbox-label:has(input:disabled) .checkbox-text {
|
|
89
|
+
color: hsl(var(--muted));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Card style checkbox */
|
|
93
|
+
.checkbox-card {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
padding: 0.5rem 0.7rem;
|
|
98
|
+
border: 1.5px solid hsl(var(--muted));
|
|
99
|
+
border-radius: 0.5rem;
|
|
100
|
+
transition: border-color 0.2s;
|
|
101
|
+
width: 100%;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.checkbox-card:not(:has(input:disabled)):hover {
|
|
105
|
+
border-color: hsl(var(--primary-200));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.checkbox-card:not(:has(input:disabled)):has(input:checked):hover
|
|
109
|
+
.checkbox-text {
|
|
110
|
+
color: hsl(var(--primary-200));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.checkbox-card:has(input:checked) {
|
|
114
|
+
border-color: hsl(var(--primary));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.checkbox-card:has(input:checked) .checkbox-text {
|
|
118
|
+
color: hsl(var(--primary));
|
|
119
|
+
font-weight: 500;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.checkbox-card:has(input:checked:disabled) {
|
|
123
|
+
border-color: hsl(var(--primary-disabled));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.checkbox-card:has(input:checked:disabled) .checkbox-text {
|
|
127
|
+
color: hsl(var(--primary-disabled));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Checkbox Group */
|
|
131
|
+
.checkbox-group {
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
gap: 0.5rem;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.checkbox-group-children {
|
|
138
|
+
margin-left: 2rem;
|
|
139
|
+
display: flex;
|
|
140
|
+
flex-direction: column;
|
|
141
|
+
gap: 0.5rem;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.checkbox-label:has(input:disabled) {
|
|
145
|
+
cursor: not-allowed;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.checkbox-label:has(input:disabled) .checkbox-box {
|
|
149
|
+
opacity: 0.5;
|
|
150
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.content-switch-secondary {
|
|
2
|
+
display: flex;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
width: fit-content;
|
|
5
|
+
border: 1px solid hsl(var(--muted));
|
|
6
|
+
transition: border-color 0.3s ease-in-out;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.content-switch-secondary .content-switch-option:not(:last-child) {
|
|
11
|
+
border-right: 1px solid hsl(var(--muted));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.content-switch-secondary:hover {
|
|
15
|
+
border-color: hsl(var(--primary));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.content-switch-secondary:hover > .content-switch-option {
|
|
19
|
+
border-color: hsl(var(--primary));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.content-switch-secondary .content-switch-option {
|
|
23
|
+
padding: 0.3rem 1rem;
|
|
24
|
+
transition: background-color 0.3s ease-in-out;
|
|
25
|
+
&:hover {
|
|
26
|
+
background-color: hsl(var(--primary-disabled));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.content-switch-secondary .content-switch-option-selected {
|
|
31
|
+
background-color: hsl(var(--primary));
|
|
32
|
+
color: white;
|
|
33
|
+
transition: all 0.3s ease-in-out;
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: hsl(var(--primary-200));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.content-switch-primary {
|
|
41
|
+
display: flex;
|
|
42
|
+
gap: 0.5rem;
|
|
43
|
+
border-radius: 12px;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
padding: 0.5rem;
|
|
46
|
+
border: 1px solid transparent;
|
|
47
|
+
transition: border-color 0.3s ease-in-out;
|
|
48
|
+
width: fit-content;
|
|
49
|
+
&:hover {
|
|
50
|
+
border-color: hsl(var(--primary-disabled));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.content-switch-primary .content-switch-option {
|
|
55
|
+
border-radius: 8px;
|
|
56
|
+
padding: 0.3rem 1rem;
|
|
57
|
+
transition: all 0.3s ease-in-out;
|
|
58
|
+
&:hover {
|
|
59
|
+
border-color: hsl(var(--primary));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.content-switch-primary .content-switch-option-selected {
|
|
64
|
+
background-color: hsl(var(--primary-disabled));
|
|
65
|
+
color: hsl(var(--primary));
|
|
66
|
+
font-weight: 500;
|
|
67
|
+
transition: all 0.3s ease-in-out;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.content-switch-primary .content-switch-option:hover {
|
|
71
|
+
background-color: hsl(var(--primary-disabled));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.content-switch-primary .content-switch-option-selected:hover {
|
|
75
|
+
background-color: hsl(var(--primary-200));
|
|
76
|
+
color: white;
|
|
77
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
.dropdown-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0.375rem;
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.dropdown-header {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.dropdown-label {
|
|
15
|
+
font-size: 0.875rem;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
color: hsl(var(--foreground));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dropdown-clear {
|
|
21
|
+
font-size: 0.875rem;
|
|
22
|
+
color: hsl(var(--muted-100));
|
|
23
|
+
background: none;
|
|
24
|
+
border: none;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
transition: color 0.2s;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dropdown-clear:hover {
|
|
30
|
+
color: hsl(var(--primary));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dropdown-wrapper {
|
|
34
|
+
position: relative;
|
|
35
|
+
display: flex;
|
|
36
|
+
width: 100%;
|
|
37
|
+
border-radius: 0.375rem;
|
|
38
|
+
border: 1.5px solid hsl(var(--muted));
|
|
39
|
+
transition: border-color 0.2s, background-color 0.2s;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.dropdown-wrapper:not(.dropdown-disabled):not(.dropdown-error):hover {
|
|
43
|
+
border-color: hsl(var(--primary));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.dropdown-wrapper.dropdown-focused:not(.dropdown-disabled):not(
|
|
47
|
+
.dropdown-error
|
|
48
|
+
) {
|
|
49
|
+
border-color: hsl(var(--primary-300));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.dropdown-wrapper.dropdown-error {
|
|
53
|
+
border-color: hsl(var(--destructive));
|
|
54
|
+
background-color: hsl(var(--destructive) / 0.05);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dropdown-wrapper.dropdown-error:hover,
|
|
58
|
+
.dropdown-wrapper.dropdown-error.dropdown-focused {
|
|
59
|
+
border-color: hsl(var(--destructive));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.dropdown-wrapper.dropdown-disabled {
|
|
63
|
+
opacity: 0.5;
|
|
64
|
+
cursor: not-allowed;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dropdown {
|
|
68
|
+
width: 100%;
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: space-between;
|
|
72
|
+
background: transparent;
|
|
73
|
+
border: none;
|
|
74
|
+
outline: none;
|
|
75
|
+
color: hsl(var(--foreground));
|
|
76
|
+
padding: 0 0.5rem 0 0.8rem;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
font-family: inherit;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.dropdown:disabled {
|
|
82
|
+
cursor: not-allowed;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.dropdown-value {
|
|
86
|
+
flex: 1;
|
|
87
|
+
text-align: left;
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
text-overflow: ellipsis;
|
|
90
|
+
white-space: nowrap;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.dropdown-chevron {
|
|
94
|
+
flex-shrink: 0;
|
|
95
|
+
margin-left: 0.5rem;
|
|
96
|
+
color: hsl(var(--muted));
|
|
97
|
+
transition: transform 0.2s ease;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.dropdown-chevron-open {
|
|
101
|
+
transform: rotate(180deg);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Dropdown sizes */
|
|
105
|
+
.dropdown-sm {
|
|
106
|
+
height: 2rem;
|
|
107
|
+
font-size: 0.875rem;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.dropdown-md {
|
|
111
|
+
height: 2.5rem;
|
|
112
|
+
font-size: 1rem;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.dropdown-lg {
|
|
116
|
+
height: 3rem;
|
|
117
|
+
font-size: 1.125rem;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Dropdown menu */
|
|
121
|
+
.dropdown-menu {
|
|
122
|
+
z-index: 50;
|
|
123
|
+
margin-top: 0.25rem;
|
|
124
|
+
margin-bottom: 0.25rem;
|
|
125
|
+
padding: 0.25rem;
|
|
126
|
+
border-radius: 0.375rem;
|
|
127
|
+
background-color: hsl(var(--background));
|
|
128
|
+
border: 1px solid hsl(var(--muted));
|
|
129
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
130
|
+
max-height: 15rem;
|
|
131
|
+
overflow-y: auto;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.dropdown-menu-top {
|
|
135
|
+
transform-origin: bottom;
|
|
136
|
+
animation: dropdownSlideUp 0.1s ease-out;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.dropdown-menu-bottom {
|
|
140
|
+
transform-origin: top;
|
|
141
|
+
animation: dropdownSlideDown 0.1s ease-out;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@keyframes dropdownSlideDown {
|
|
145
|
+
from {
|
|
146
|
+
opacity: 0;
|
|
147
|
+
transform: translateY(-0.5rem);
|
|
148
|
+
}
|
|
149
|
+
to {
|
|
150
|
+
opacity: 1;
|
|
151
|
+
transform: translateY(0);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@keyframes dropdownSlideUp {
|
|
156
|
+
from {
|
|
157
|
+
opacity: 0;
|
|
158
|
+
transform: translateY(0.5rem);
|
|
159
|
+
}
|
|
160
|
+
to {
|
|
161
|
+
opacity: 1;
|
|
162
|
+
transform: translateY(0);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.dropdown-option {
|
|
167
|
+
width: 100%;
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
padding: 0.5rem 0.75rem;
|
|
171
|
+
border: none;
|
|
172
|
+
background: none;
|
|
173
|
+
color: hsl(var(--foreground));
|
|
174
|
+
font-size: inherit;
|
|
175
|
+
text-align: left;
|
|
176
|
+
cursor: pointer;
|
|
177
|
+
border-radius: 0.25rem;
|
|
178
|
+
transition: all 0.2s;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.dropdown-option:hover:not(.dropdown-option-disabled):not(
|
|
182
|
+
.dropdown-option-selected
|
|
183
|
+
) {
|
|
184
|
+
background-color: hsl(var(--primary-disabled));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.dropdown-option-selected {
|
|
188
|
+
background-color: hsl(var(--primary));
|
|
189
|
+
color: white;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.dropdown-option-selected:hover {
|
|
193
|
+
background-color: hsl(var(--primary-200));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.dropdown-option-disabled {
|
|
197
|
+
opacity: 0.5;
|
|
198
|
+
cursor: not-allowed;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.dropdown-note {
|
|
202
|
+
font-size: 0.875rem;
|
|
203
|
+
color: hsl(var(--muted-100));
|
|
204
|
+
transition: color 0.2s;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.dropdown-wrapper:not(.dropdown-disabled):not(.dropdown-error):hover
|
|
208
|
+
+ .dropdown-note {
|
|
209
|
+
color: hsl(var(--primary));
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.dropdown-wrapper.dropdown-focused:not(.dropdown-disabled):not(.dropdown-error)
|
|
213
|
+
+ .dropdown-note {
|
|
214
|
+
color: hsl(var(--primary));
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.dropdown-error-message {
|
|
218
|
+
font-size: 0.875rem;
|
|
219
|
+
color: hsl(var(--destructive));
|
|
220
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--background: 0 0% 100%;
|
|
3
|
+
--foreground: 160 10% 10%;
|
|
4
|
+
|
|
5
|
+
--primary-disabled: 225 100% 88%;
|
|
6
|
+
--primary-muted: 221 100% 95%;
|
|
7
|
+
--primary: 225 91% 59%;
|
|
8
|
+
--primary-200: 225 100% 43%;
|
|
9
|
+
--primary-300: 225 91% 40%;
|
|
10
|
+
--primary-400: 225 91% 18%;
|
|
11
|
+
|
|
12
|
+
--success-bg: 143 26% 86%;
|
|
13
|
+
--success: 130 35% 46%;
|
|
14
|
+
--success-200: 130 76% 26%;
|
|
15
|
+
--success-300: 130 100% 18%;
|
|
16
|
+
|
|
17
|
+
--warn-bg: 45 100% 84%;
|
|
18
|
+
--warn: 45 100% 61%;
|
|
19
|
+
--warn-200: 45 100% 45%;
|
|
20
|
+
--warn-300: 45 100% 32%;
|
|
21
|
+
|
|
22
|
+
--destructive-bg: 357 100% 92%;
|
|
23
|
+
--destructive: 0 83% 60%;
|
|
24
|
+
--destructive-200: 0 100% 42%;
|
|
25
|
+
--destructive-300: 0 100% 29%;
|
|
26
|
+
|
|
27
|
+
--muted-25: 0 0 98%;
|
|
28
|
+
--muted-50: 0 0 96%;
|
|
29
|
+
--muted: 0 0 80%;
|
|
30
|
+
--muted-200: 0 0 67%;
|
|
31
|
+
|
|
32
|
+
--radius-sm: 0.25rem;
|
|
33
|
+
--radius-md: 0.375rem;
|
|
34
|
+
--radius-lg: 0.5rem;
|
|
35
|
+
--radius-full: 9999px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@import "./src/accordion.css";
|
|
39
|
+
@import "./src/button.css";
|
|
40
|
+
@import "./src/calendar.css";
|
|
41
|
+
@import "./src/checkbox.css";
|
|
42
|
+
@import "./src/content-switch.css";
|
|
43
|
+
@import "./src/dropdown.css";
|
|
44
|
+
@import "./src/input.css";
|
|
45
|
+
@import "./src/modal.css";
|
|
46
|
+
@import "./src/multi-select.css";
|
|
47
|
+
@import "./src/popover.css";
|
|
48
|
+
@import "./src/radio.css";
|
|
49
|
+
@import "./src/search.css";
|
|
50
|
+
@import "./src/side-panel.css";
|
|
51
|
+
@import "./src/status.css";
|
|
52
|
+
@import "./src/tabs.css";
|
|
53
|
+
@import "./src/tag.css";
|
|
54
|
+
@import "./src/textarea.css";
|
|
55
|
+
@import "./src/toggle.css";
|
|
56
|
+
@import "./src/tooltip.css";
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
.input-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0.375rem;
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.input-header {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.input-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
|
+
.input-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
|
+
}
|
|
31
|
+
|
|
32
|
+
.input-clear:hover {
|
|
33
|
+
color: hsl(var(--primary));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.input-wrapper {
|
|
37
|
+
position: relative;
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
width: 100%;
|
|
41
|
+
border-radius: var(--radius-md);
|
|
42
|
+
border: 1.5px solid hsl(var(--muted));
|
|
43
|
+
transition: border-color 0.2s, background-color 0.2s;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.input-wrapper:not(.input-disabled):not(.input-error):hover {
|
|
47
|
+
border-color: hsl(var(--primary));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.input-wrapper:not(.input-disabled):not(.input-error):has(input:focus) {
|
|
51
|
+
border-color: hsl(var(--primary-300));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.input-wrapper.input-error {
|
|
55
|
+
border-color: hsl(var(--destructive));
|
|
56
|
+
background-color: hsl(var(--destructive) / 0.05);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.input-wrapper.input-error:hover,
|
|
60
|
+
.input-wrapper.input-error:has(input:focus) {
|
|
61
|
+
border-color: hsl(var(--destructive));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.input-wrapper.input-disabled {
|
|
65
|
+
opacity: 0.5;
|
|
66
|
+
cursor: not-allowed;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.input {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
background: transparent;
|
|
73
|
+
border: none;
|
|
74
|
+
outline: none;
|
|
75
|
+
color: hsl(var(--foreground));
|
|
76
|
+
padding: 0 0.8rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.input::placeholder {
|
|
80
|
+
color: hsl(var(--muted));
|
|
81
|
+
font-size: 0.875rem;
|
|
82
|
+
font-weight: 400;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.input:disabled {
|
|
86
|
+
cursor: not-allowed;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Input sizes */
|
|
90
|
+
.input-sm {
|
|
91
|
+
height: 2rem;
|
|
92
|
+
font-size: 0.875rem;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.input-md {
|
|
96
|
+
height: 2.5rem;
|
|
97
|
+
font-size: 1rem;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.input-lg {
|
|
101
|
+
height: 3rem;
|
|
102
|
+
font-size: 1.125rem;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Icon positioning */
|
|
106
|
+
.input-icon-left,
|
|
107
|
+
.input-icon-right {
|
|
108
|
+
position: absolute;
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
height: 100%;
|
|
112
|
+
color: hsl(var(--muted-100));
|
|
113
|
+
transition: color 0.2s;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.input-icon-left {
|
|
117
|
+
left: 0.75rem;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.input-icon-right {
|
|
121
|
+
right: 0.75rem;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Icon hover states */
|
|
125
|
+
.input-wrapper:not(.input-disabled):not(.input-error):hover .input-icon-left,
|
|
126
|
+
.input-wrapper:not(.input-disabled):not(.input-error):hover .input-icon-right {
|
|
127
|
+
color: hsl(var(--primary));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.input-wrapper:not(.input-disabled):not(.input-error):has(input:focus)
|
|
131
|
+
.input-icon-left,
|
|
132
|
+
.input-wrapper:not(.input-disabled):not(.input-error):has(input:focus)
|
|
133
|
+
.input-icon-right {
|
|
134
|
+
color: hsl(var(--primary));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Input padding with icons */
|
|
138
|
+
.input-has-left-icon {
|
|
139
|
+
padding-left: 2.5rem;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.input-has-right-icon {
|
|
143
|
+
padding-right: 2.5rem;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.input-has-both-icons {
|
|
147
|
+
padding-left: 2.5rem;
|
|
148
|
+
padding-right: 2.5rem;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Password toggle button */
|
|
152
|
+
.password-toggle {
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
justify-content: center;
|
|
156
|
+
background: none;
|
|
157
|
+
border: none;
|
|
158
|
+
padding: 0;
|
|
159
|
+
height: 100%;
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
transition: color 0.2s;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.password-toggle:hover:not(:disabled) {
|
|
165
|
+
color: hsl(var(--primary-300));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.password-toggle:disabled {
|
|
169
|
+
cursor: not-allowed;
|
|
170
|
+
opacity: 0.5;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Note and error message */
|
|
174
|
+
.input-note {
|
|
175
|
+
font-size: 0.875rem;
|
|
176
|
+
color: hsl(var(--muted-100));
|
|
177
|
+
transition: color 0.2s;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.input-wrapper:not(.input-disabled):not(.input-error):hover + .input-note {
|
|
181
|
+
color: hsl(var(--primary));
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.input-wrapper:not(.input-disabled):not(.input-error):has(input:focus)
|
|
185
|
+
+ .input-note {
|
|
186
|
+
color: hsl(var(--primary));
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.input-error-message {
|
|
190
|
+
font-size: 0.875rem;
|
|
191
|
+
color: hsl(var(--destructive));
|
|
192
|
+
}
|