@auronui/styles 1.0.22 → 1.1.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.
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
.date-time-picker__popover {
|
|
54
54
|
z-index: var(--z-popover);
|
|
55
55
|
@apply origin-(--trigger-anchor-point) overflow-hidden bg-overlay p-0;
|
|
56
|
-
min-width:
|
|
56
|
+
min-width: 24rem;
|
|
57
57
|
box-shadow: var(--shadow-overlay);
|
|
58
58
|
border-radius: calc(var(--radius) * 2.5);
|
|
59
59
|
|
|
@@ -88,107 +88,77 @@
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
/* ───
|
|
91
|
+
/* ─── Side-by-side panel (calendar + time) ───────────────────────────────── */
|
|
92
92
|
|
|
93
|
-
.date-time-
|
|
94
|
-
@apply flex items-
|
|
93
|
+
.date-time-picker__panel {
|
|
94
|
+
@apply flex items-stretch;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
/* Pad the calendar to match the standalone DatePicker's popover padding (p-3),
|
|
98
|
+
so the calendar inside the side-by-side panel has the same breathing room. */
|
|
99
|
+
.date-time-picker__calendar-pane {
|
|
100
|
+
@apply p-3;
|
|
99
101
|
}
|
|
100
102
|
|
|
101
|
-
.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
padding: 0;
|
|
107
|
-
cursor: var(--cursor-interactive);
|
|
108
|
-
will-change: scale;
|
|
109
|
-
transition:
|
|
110
|
-
transform 300ms var(--ease-out),
|
|
111
|
-
background-color 300ms var(--ease-out),
|
|
112
|
-
box-shadow 300ms var(--ease-out),
|
|
113
|
-
opacity 300ms var(--ease-out);
|
|
114
|
-
@apply transform-gpu motion-reduce:transition-none;
|
|
115
|
-
|
|
116
|
-
@media (hover: hover) {
|
|
117
|
-
&:hover {
|
|
118
|
-
@apply bg-default text-accent;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&:active {
|
|
123
|
-
transform: scale(0.95);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&:focus-visible {
|
|
127
|
-
@apply status-focused;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&[data-hidden="true"] {
|
|
131
|
-
@apply invisible pointer-events-none;
|
|
132
|
-
}
|
|
103
|
+
/* Time column = wheels stacked above the Done button. The pane stretches to the
|
|
104
|
+
calendar height (panel items-stretch); mt-auto pins Done to the bottom so it
|
|
105
|
+
lines up with the calendar's bottom edge — no full-width footer row needed. */
|
|
106
|
+
.date-time-picker__time-pane {
|
|
107
|
+
@apply flex flex-col;
|
|
133
108
|
}
|
|
134
109
|
|
|
135
|
-
.date-time-
|
|
136
|
-
@apply
|
|
137
|
-
color: var(--color-accent);
|
|
110
|
+
.date-time-picker__time-done {
|
|
111
|
+
@apply flex justify-end px-3 pb-3 pt-1 mt-auto;
|
|
138
112
|
}
|
|
139
113
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
@apply relative overflow-hidden;
|
|
144
|
-
min-height: 16rem;
|
|
114
|
+
.date-time-picker__divider {
|
|
115
|
+
@apply w-px self-stretch my-3;
|
|
116
|
+
background-color: var(--color-border);
|
|
145
117
|
}
|
|
146
118
|
|
|
147
|
-
/* ─── Time scroller
|
|
119
|
+
/* ─── Time scroller (infinite circular wheels, tap to select) ─────────────── */
|
|
148
120
|
|
|
149
121
|
.date-time-picker__scroller-wrap {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
@apply absolute inset-x-3 rounded-lg bg-default pointer-events-none;
|
|
156
|
-
height: 2.5rem;
|
|
157
|
-
top: 50%;
|
|
158
|
-
transform: translateY(-50%);
|
|
159
|
-
z-index: 0;
|
|
160
|
-
}
|
|
122
|
+
/* flex-none so it keeps its intrinsic column width and never collapses
|
|
123
|
+
when sitting next to the calendar in the side-by-side panel.
|
|
124
|
+
items-center vertically centers the fixed-height wheels against the
|
|
125
|
+
(usually taller) calendar. */
|
|
126
|
+
@apply flex flex-none items-center justify-center gap-1 px-3 py-3;
|
|
161
127
|
}
|
|
162
128
|
|
|
163
129
|
.date-time-picker__scroller-column {
|
|
164
|
-
|
|
165
|
-
|
|
130
|
+
/* Fixed width AND a definite height — the height bounds the scroll
|
|
131
|
+
viewport so the repeated items overflow-scroll instead of expanding
|
|
132
|
+
the whole popover. ~matches the calendar block height. */
|
|
133
|
+
@apply flex-none w-12;
|
|
134
|
+
height: 14rem;
|
|
135
|
+
overflow-y: auto;
|
|
166
136
|
-webkit-overflow-scrolling: touch;
|
|
167
137
|
touch-action: pan-y;
|
|
168
|
-
scroll-snap-type: y mandatory;
|
|
169
138
|
overscroll-behavior: contain;
|
|
170
|
-
height: 10rem;
|
|
171
|
-
padding-top: calc((10rem - 2.5rem) / 2);
|
|
172
|
-
padding-bottom: calc((10rem - 2.5rem) / 2);
|
|
173
139
|
|
|
174
140
|
scrollbar-width: none;
|
|
175
141
|
|
|
176
142
|
&::-webkit-scrollbar {
|
|
177
143
|
display: none;
|
|
178
144
|
}
|
|
145
|
+
|
|
146
|
+
&:focus-visible {
|
|
147
|
+
@apply outline-none;
|
|
148
|
+
}
|
|
179
149
|
}
|
|
180
150
|
|
|
181
151
|
.date-time-picker__scroller-item {
|
|
182
|
-
scroll-snap-align: center;
|
|
183
152
|
height: 2.5rem;
|
|
184
|
-
@apply flex items-center justify-center text-sm select-none cursor-pointer;
|
|
153
|
+
@apply flex items-center justify-center text-sm select-none cursor-pointer rounded-lg;
|
|
185
154
|
color: var(--color-muted-foreground);
|
|
186
|
-
transition:
|
|
155
|
+
transition:
|
|
156
|
+
color 150ms var(--ease-smooth),
|
|
157
|
+
background-color 150ms var(--ease-smooth);
|
|
187
158
|
@apply motion-reduce:transition-none;
|
|
188
159
|
|
|
189
160
|
&[data-selected="true"] {
|
|
190
|
-
@apply font-medium;
|
|
191
|
-
color: var(--color-foreground);
|
|
161
|
+
@apply bg-accent text-accent-foreground font-medium;
|
|
192
162
|
}
|
|
193
163
|
|
|
194
164
|
&[data-disabled="true"] {
|
|
@@ -197,7 +167,7 @@
|
|
|
197
167
|
|
|
198
168
|
@media (hover: hover) {
|
|
199
169
|
&:hover:not([data-selected="true"]) {
|
|
200
|
-
|
|
170
|
+
@apply bg-default text-foreground;
|
|
201
171
|
}
|
|
202
172
|
}
|
|
203
173
|
}
|
package/package.json
CHANGED
|
@@ -8,11 +8,11 @@ export const dateTimePickerVariants = tv({
|
|
|
8
8
|
popover: "date-time-picker__popover",
|
|
9
9
|
trigger: "date-time-picker__trigger",
|
|
10
10
|
triggerIndicator: "date-time-picker__trigger-indicator",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
panel: "date-time-picker__panel",
|
|
12
|
+
calendarPane: "date-time-picker__calendar-pane",
|
|
13
|
+
divider: "date-time-picker__divider",
|
|
14
|
+
timePane: "date-time-picker__time-pane",
|
|
15
|
+
timeDone: "date-time-picker__time-done",
|
|
16
16
|
scrollerWrap: "date-time-picker__scroller-wrap",
|
|
17
17
|
scrollerColumn: "date-time-picker__scroller-column",
|
|
18
18
|
scrollerItem: "date-time-picker__scroller-item",
|