zenkit-css 1.3.0 → 1.4.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.
@@ -0,0 +1,138 @@
1
+ // ========================================
2
+ // PillsInput Component (Mantine-style)
3
+ // ========================================
4
+
5
+ .pills-input {
6
+ --zk-pills-input-min-height: 36px;
7
+ --zk-pills-input-padding: 0.25rem 0.5rem;
8
+ --zk-pills-input-gap: 0.375rem;
9
+
10
+ display: flex;
11
+ flex-wrap: wrap;
12
+ align-items: center;
13
+ gap: var(--zk-pills-input-gap);
14
+ min-height: var(--zk-pills-input-min-height);
15
+ padding: var(--zk-pills-input-padding);
16
+ background: var(--zk-bg-primary);
17
+ border: 1px solid var(--zk-border-color);
18
+ border-radius: var(--zk-radius-md);
19
+ cursor: text;
20
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
21
+
22
+ &:hover:not(&-disabled) {
23
+ border-color: var(--zk-border-hover);
24
+ }
25
+
26
+ &:focus-within {
27
+ border-color: var(--zk-primary);
28
+ box-shadow: 0 0 0 3px rgba(var(--zk-primary-rgb), 0.1);
29
+ }
30
+
31
+ // Input field
32
+ &-field {
33
+ flex: 1;
34
+ min-width: 60px;
35
+ padding: 0.25rem;
36
+ border: none;
37
+ background: transparent;
38
+ font-size: 0.875rem;
39
+ color: var(--zk-text-primary);
40
+ outline: none;
41
+
42
+ &::placeholder {
43
+ color: var(--zk-text-muted);
44
+ }
45
+ }
46
+
47
+ // Sizes
48
+ &-xs {
49
+ --zk-pills-input-min-height: 28px;
50
+ --zk-pills-input-padding: 0.125rem 0.375rem;
51
+ --zk-pills-input-gap: 0.25rem;
52
+
53
+ .pills-input-field {
54
+ font-size: 0.75rem;
55
+ }
56
+ }
57
+
58
+ &-sm {
59
+ --zk-pills-input-min-height: 32px;
60
+ --zk-pills-input-padding: 0.1875rem 0.4375rem;
61
+
62
+ .pills-input-field {
63
+ font-size: 0.8125rem;
64
+ }
65
+ }
66
+
67
+ &-md {
68
+ --zk-pills-input-min-height: 36px;
69
+ }
70
+
71
+ &-lg {
72
+ --zk-pills-input-min-height: 42px;
73
+ --zk-pills-input-padding: 0.375rem 0.625rem;
74
+ --zk-pills-input-gap: 0.5rem;
75
+
76
+ .pills-input-field {
77
+ font-size: 1rem;
78
+ }
79
+ }
80
+
81
+ &-xl {
82
+ --zk-pills-input-min-height: 50px;
83
+ --zk-pills-input-padding: 0.5rem 0.75rem;
84
+ --zk-pills-input-gap: 0.5rem;
85
+
86
+ .pills-input-field {
87
+ font-size: 1.125rem;
88
+ }
89
+ }
90
+
91
+ // States
92
+ &-disabled {
93
+ opacity: 0.5;
94
+ cursor: not-allowed;
95
+ pointer-events: none;
96
+ background: var(--zk-bg-secondary);
97
+ }
98
+
99
+ &-error {
100
+ border-color: var(--zk-danger);
101
+
102
+ &:focus-within {
103
+ border-color: var(--zk-danger);
104
+ box-shadow: 0 0 0 3px rgba(var(--zk-danger-rgb), 0.1);
105
+ }
106
+ }
107
+
108
+ &-readonly {
109
+ background: var(--zk-bg-secondary);
110
+ cursor: default;
111
+ }
112
+
113
+ // Variants
114
+ &-filled {
115
+ background: var(--zk-bg-secondary);
116
+ border-color: transparent;
117
+
118
+ &:hover:not(.pills-input-disabled) {
119
+ background: var(--zk-bg-tertiary);
120
+ }
121
+
122
+ &:focus-within {
123
+ background: var(--zk-bg-primary);
124
+ border-color: var(--zk-primary);
125
+ }
126
+ }
127
+
128
+ &-unstyled {
129
+ background: transparent;
130
+ border: none;
131
+ padding: 0;
132
+ min-height: auto;
133
+
134
+ &:focus-within {
135
+ box-shadow: none;
136
+ }
137
+ }
138
+ }
@@ -0,0 +1,267 @@
1
+ // ========================================
2
+ // RangeCalendar Component (HeroUI-style)
3
+ // ========================================
4
+ // Calendar specifically for selecting date ranges
5
+
6
+ .range-calendar {
7
+ --zk-rcal-bg: var(--zk-bg-primary);
8
+ --zk-rcal-border: var(--zk-border-color);
9
+ --zk-rcal-radius: var(--zk-radius-lg);
10
+ --zk-rcal-cell-size: 36px;
11
+ --zk-rcal-gap: 2px;
12
+
13
+ display: inline-flex;
14
+ flex-direction: column;
15
+ background: var(--zk-rcal-bg);
16
+ border: 1px solid var(--zk-rcal-border);
17
+ border-radius: var(--zk-rcal-radius);
18
+ padding: 1rem;
19
+ user-select: none;
20
+
21
+ // Header with navigation
22
+ &-header {
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: space-between;
26
+ margin-bottom: 1rem;
27
+ }
28
+
29
+ &-title {
30
+ font-size: 0.9375rem;
31
+ font-weight: 600;
32
+ color: var(--zk-text-primary);
33
+ }
34
+
35
+ &-nav {
36
+ display: flex;
37
+ gap: 0.25rem;
38
+ }
39
+
40
+ &-nav-btn {
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ width: 28px;
45
+ height: 28px;
46
+ padding: 0;
47
+ background: transparent;
48
+ border: none;
49
+ border-radius: var(--zk-radius-sm);
50
+ color: var(--zk-text-secondary);
51
+ cursor: pointer;
52
+ transition: background-color 0.15s ease, color 0.15s ease;
53
+
54
+ &:hover {
55
+ background: var(--zk-bg-secondary);
56
+ color: var(--zk-text-primary);
57
+ }
58
+
59
+ &:disabled {
60
+ opacity: 0.3;
61
+ cursor: not-allowed;
62
+ }
63
+ }
64
+
65
+ // Weekday headers
66
+ &-weekdays {
67
+ display: grid;
68
+ grid-template-columns: repeat(7, var(--zk-rcal-cell-size));
69
+ gap: var(--zk-rcal-gap);
70
+ margin-bottom: 0.5rem;
71
+ }
72
+
73
+ &-weekday {
74
+ display: flex;
75
+ align-items: center;
76
+ justify-content: center;
77
+ height: var(--zk-rcal-cell-size);
78
+ font-size: 0.75rem;
79
+ font-weight: 500;
80
+ color: var(--zk-text-muted);
81
+ text-transform: uppercase;
82
+ }
83
+
84
+ // Days grid
85
+ &-days {
86
+ display: grid;
87
+ grid-template-columns: repeat(7, var(--zk-rcal-cell-size));
88
+ gap: var(--zk-rcal-gap);
89
+ }
90
+
91
+ // Day cell
92
+ &-day {
93
+ display: flex;
94
+ align-items: center;
95
+ justify-content: center;
96
+ height: var(--zk-rcal-cell-size);
97
+ font-size: 0.875rem;
98
+ color: var(--zk-text-primary);
99
+ background: transparent;
100
+ border: none;
101
+ border-radius: var(--zk-radius-sm);
102
+ cursor: pointer;
103
+ transition: background-color 0.1s ease, color 0.1s ease;
104
+ position: relative;
105
+
106
+ &:hover:not(&-disabled):not(&-outside) {
107
+ background: var(--zk-bg-secondary);
108
+ }
109
+
110
+ // Outside current month
111
+ &-outside {
112
+ color: var(--zk-text-disabled);
113
+ }
114
+
115
+ // Today
116
+ &-today {
117
+ font-weight: 600;
118
+
119
+ &::after {
120
+ content: "";
121
+ position: absolute;
122
+ bottom: 4px;
123
+ left: 50%;
124
+ transform: translateX(-50%);
125
+ width: 4px;
126
+ height: 4px;
127
+ background: var(--zk-primary);
128
+ border-radius: 50%;
129
+ }
130
+ }
131
+
132
+ // Disabled
133
+ &-disabled {
134
+ color: var(--zk-text-disabled);
135
+ cursor: not-allowed;
136
+ }
137
+
138
+ // Selected start
139
+ &-range-start {
140
+ background: var(--zk-primary);
141
+ color: #fff;
142
+ border-radius: var(--zk-radius-sm) 0 0 var(--zk-radius-sm);
143
+
144
+ &:hover {
145
+ background: var(--zk-primary-dark);
146
+ }
147
+ }
148
+
149
+ // Selected end
150
+ &-range-end {
151
+ background: var(--zk-primary);
152
+ color: #fff;
153
+ border-radius: 0 var(--zk-radius-sm) var(--zk-radius-sm) 0;
154
+
155
+ &:hover {
156
+ background: var(--zk-primary-dark);
157
+ }
158
+ }
159
+
160
+ // In range (between start and end)
161
+ &-in-range {
162
+ background: rgba(var(--zk-primary-rgb), 0.1);
163
+ color: var(--zk-primary);
164
+ border-radius: 0;
165
+
166
+ &:hover {
167
+ background: rgba(var(--zk-primary-rgb), 0.2);
168
+ }
169
+ }
170
+
171
+ // Single day selected (start equals end)
172
+ &-range-start.range-calendar-day-range-end {
173
+ border-radius: var(--zk-radius-sm);
174
+ }
175
+
176
+ // Selection preview on hover
177
+ &-selection-preview {
178
+ background: rgba(var(--zk-primary-rgb), 0.05);
179
+ }
180
+ }
181
+
182
+ // Dual calendar mode
183
+ &-dual {
184
+ flex-direction: row;
185
+ gap: 1.5rem;
186
+
187
+ .range-calendar-month {
188
+ flex: 1;
189
+ }
190
+
191
+ .range-calendar-divider {
192
+ width: 1px;
193
+ background: var(--zk-border-color);
194
+ margin: 0 0.5rem;
195
+ }
196
+ }
197
+
198
+ // Presets panel
199
+ &-presets {
200
+ display: flex;
201
+ flex-direction: column;
202
+ gap: 0.25rem;
203
+ padding-right: 1rem;
204
+ margin-right: 1rem;
205
+ border-right: 1px solid var(--zk-border-color);
206
+ min-width: 140px;
207
+ }
208
+
209
+ &-preset {
210
+ padding: 0.5rem 0.75rem;
211
+ background: transparent;
212
+ border: none;
213
+ border-radius: var(--zk-radius-sm);
214
+ font-size: 0.8125rem;
215
+ color: var(--zk-text-secondary);
216
+ text-align: left;
217
+ cursor: pointer;
218
+ transition: background-color 0.15s ease, color 0.15s ease;
219
+
220
+ &:hover {
221
+ background: var(--zk-bg-secondary);
222
+ color: var(--zk-text-primary);
223
+ }
224
+
225
+ &-active {
226
+ background: rgba(var(--zk-primary-rgb), 0.1);
227
+ color: var(--zk-primary);
228
+ }
229
+ }
230
+
231
+ // With presets layout
232
+ &-with-presets {
233
+ flex-direction: row;
234
+ }
235
+
236
+ // Footer
237
+ &-footer {
238
+ display: flex;
239
+ align-items: center;
240
+ justify-content: space-between;
241
+ margin-top: 1rem;
242
+ padding-top: 1rem;
243
+ border-top: 1px solid var(--zk-border-color);
244
+ }
245
+
246
+ &-selected-range {
247
+ font-size: 0.8125rem;
248
+ color: var(--zk-text-secondary);
249
+ }
250
+
251
+ &-actions {
252
+ display: flex;
253
+ gap: 0.5rem;
254
+ }
255
+
256
+ // Sizes
257
+ &-sm {
258
+ --zk-rcal-cell-size: 28px;
259
+ padding: 0.75rem;
260
+ font-size: 0.8125rem;
261
+ }
262
+
263
+ &-lg {
264
+ --zk-rcal-cell-size: 44px;
265
+ padding: 1.25rem;
266
+ }
267
+ }
@@ -0,0 +1,159 @@
1
+ // ========================================
2
+ // Toggletip Component (Chakra-style)
3
+ // ========================================
4
+ // A toggletip is like a tooltip but triggered by click
5
+ // and is more accessible (works with screen readers)
6
+
7
+ .toggletip {
8
+ position: relative;
9
+ display: inline-flex;
10
+
11
+ // Trigger button
12
+ &-trigger {
13
+ display: inline-flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ padding: 0;
17
+ background: transparent;
18
+ border: none;
19
+ cursor: pointer;
20
+ color: var(--zk-text-secondary);
21
+ transition: color 0.15s ease;
22
+
23
+ &:hover {
24
+ color: var(--zk-text-primary);
25
+ }
26
+
27
+ &:focus-visible {
28
+ outline: 2px solid var(--zk-primary);
29
+ outline-offset: 2px;
30
+ border-radius: var(--zk-radius-sm);
31
+ }
32
+
33
+ // Icon inside trigger
34
+ &-icon {
35
+ width: 16px;
36
+ height: 16px;
37
+ }
38
+ }
39
+
40
+ // Content panel
41
+ &-content {
42
+ --zk-toggletip-bg: var(--zk-bg-elevated);
43
+ --zk-toggletip-color: var(--zk-text-primary);
44
+ --zk-toggletip-shadow: var(--zk-shadow-lg);
45
+ --zk-toggletip-radius: var(--zk-radius-md);
46
+ --zk-toggletip-padding: 0.75rem 1rem;
47
+ --zk-toggletip-max-width: 320px;
48
+
49
+ position: absolute;
50
+ z-index: 1000;
51
+ padding: var(--zk-toggletip-padding);
52
+ background: var(--zk-toggletip-bg);
53
+ color: var(--zk-toggletip-color);
54
+ border-radius: var(--zk-toggletip-radius);
55
+ box-shadow: var(--zk-toggletip-shadow);
56
+ max-width: var(--zk-toggletip-max-width);
57
+ font-size: 0.875rem;
58
+ line-height: 1.5;
59
+
60
+ // Hidden by default
61
+ visibility: hidden;
62
+ opacity: 0;
63
+ transition: opacity 0.15s ease, visibility 0.15s ease;
64
+
65
+ // Arrow
66
+ &::before {
67
+ content: "";
68
+ position: absolute;
69
+ width: 8px;
70
+ height: 8px;
71
+ background: inherit;
72
+ transform: rotate(45deg);
73
+ }
74
+ }
75
+
76
+ // Open state
77
+ &-open &-content {
78
+ visibility: visible;
79
+ opacity: 1;
80
+ }
81
+
82
+ // Placements
83
+ &-top &-content {
84
+ bottom: calc(100% + 8px);
85
+ left: 50%;
86
+ transform: translateX(-50%);
87
+
88
+ &::before {
89
+ bottom: -4px;
90
+ left: 50%;
91
+ margin-left: -4px;
92
+ }
93
+ }
94
+
95
+ &-bottom &-content {
96
+ top: calc(100% + 8px);
97
+ left: 50%;
98
+ transform: translateX(-50%);
99
+
100
+ &::before {
101
+ top: -4px;
102
+ left: 50%;
103
+ margin-left: -4px;
104
+ }
105
+ }
106
+
107
+ &-left &-content {
108
+ right: calc(100% + 8px);
109
+ top: 50%;
110
+ transform: translateY(-50%);
111
+
112
+ &::before {
113
+ right: -4px;
114
+ top: 50%;
115
+ margin-top: -4px;
116
+ }
117
+ }
118
+
119
+ &-right &-content {
120
+ left: calc(100% + 8px);
121
+ top: 50%;
122
+ transform: translateY(-50%);
123
+
124
+ &::before {
125
+ left: -4px;
126
+ top: 50%;
127
+ margin-top: -4px;
128
+ }
129
+ }
130
+
131
+ // Close button inside content
132
+ &-close {
133
+ position: absolute;
134
+ top: 0.5rem;
135
+ right: 0.5rem;
136
+ display: flex;
137
+ align-items: center;
138
+ justify-content: center;
139
+ width: 20px;
140
+ height: 20px;
141
+ padding: 0;
142
+ background: transparent;
143
+ border: none;
144
+ border-radius: var(--zk-radius-sm);
145
+ color: var(--zk-text-muted);
146
+ cursor: pointer;
147
+ transition: background-color 0.15s ease, color 0.15s ease;
148
+
149
+ &:hover {
150
+ background: var(--zk-bg-secondary);
151
+ color: var(--zk-text-primary);
152
+ }
153
+ }
154
+
155
+ // With close button - add padding
156
+ &-with-close &-content {
157
+ padding-right: 2.5rem;
158
+ }
159
+ }
package/scss/zenkit.scss CHANGED
@@ -196,6 +196,18 @@
196
196
  @use 'components/skipnavlink';
197
197
  @use 'components/floatcomponent';
198
198
 
199
+ // ----------------------------------------
200
+ // 5d. Phase 8 Components (100% Library Coverage)
201
+ // ----------------------------------------
202
+ @use 'components/absolutecenter';
203
+ @use 'components/pillsinput';
204
+ @use 'components/burger';
205
+ @use 'components/listbox';
206
+ @use 'components/linkoverlay';
207
+ @use 'components/toggletip';
208
+ @use 'components/disclosure';
209
+ @use 'components/rangecalendar';
210
+
199
211
  // ----------------------------------------
200
212
  // 6. Components - JavaScript Enhanced
201
213
  // ----------------------------------------