@auronui/styles 1.0.2 → 1.0.4

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.
@@ -301,7 +301,7 @@
301
301
  /* ─── Slots ──────────────────────────────────────────────────────────────────── */
302
302
 
303
303
  .autocomplete__input {
304
- @apply flex-1 bg-transparent outline-none border-0 p-0 h-auto text-inherit;
304
+ @apply flex-1 bg-transparent outline-none border-0 p-0 h-auto text-inherit w-full min-w-4;
305
305
  @apply placeholder:text-field-placeholder;
306
306
 
307
307
  &:focus,
@@ -360,6 +360,7 @@
360
360
  /* Push the input caret/text down so it doesn't sit under the floated label.
361
361
  Applied statically (not only in up-state) to keep the input box stable. */
362
362
  .autocomplete__trigger--label-inside .autocomplete__input {
363
+ @apply w-full;
363
364
  padding-top: 1rem;
364
365
  padding-bottom: 0;
365
366
  }
@@ -600,6 +601,19 @@
600
601
  }
601
602
  }
602
603
 
604
+ /* ─── Item text ──────────────────────────────────────────────────────────── */
605
+
606
+ /* By default, item text truncates with an ellipsis when the dropdown is
607
+ constrained to the trigger width. The wrapper span is needed because the
608
+ item itself is a flex row (checkmark + text + end-content). */
609
+ .autocomplete-item__text {
610
+ flex: 1;
611
+ min-width: 0;
612
+ overflow: hidden;
613
+ text-overflow: ellipsis;
614
+ white-space: nowrap;
615
+ }
616
+
603
617
  /* ─── Popover (listbox content) ─────────────────────────────────────────── */
604
618
  /* Similar to popover content styles */
605
619
  .autocomplete__popover {
@@ -682,4 +696,18 @@
682
696
  [data-slot="search-field"] {
683
697
  @apply px-3 py-1 outline-none;
684
698
  }
699
+
700
+ /* truncateItems=false: widen the popover to fit full text instead of clipping */
701
+ &[data-truncate-items="false"] {
702
+ width: max-content;
703
+ min-width: var(--trigger-width);
704
+ max-width: min(90vw, 40rem);
705
+
706
+ .autocomplete-item__text {
707
+ overflow: visible;
708
+ text-overflow: unset;
709
+ white-space: nowrap;
710
+ flex: none;
711
+ }
712
+ }
685
713
  }
@@ -194,14 +194,21 @@
194
194
  @apply bg-default;
195
195
  }
196
196
 
197
- /* Unavailable dates */
198
- &[data-unavailable="true"] {
197
+ /* Unavailable dates — Reka places data-unavailable="" on the inner CalendarCellTrigger
198
+ button, not the outer td. Use :has() to match the parent cell when its child trigger
199
+ carries the attribute (consistent with :has([data-today]) and :has([data-outside-view])
200
+ patterns used above). */
201
+ &:has([data-unavailable]) {
199
202
  @apply status-disabled;
200
203
  }
201
204
 
202
- /* Disabled state */
205
+ /* Disabled state — Reka places data-disabled="" on CalendarCell (td) only for
206
+ isDateDisabled() and disableDaysOutsideCurrentView. For minValue/maxValue out-of-range
207
+ dates Reka sets data-disabled="" on CalendarCellTrigger (inner button), so we also
208
+ match via :has() to ensure out-of-range dates are visually disabled. */
203
209
  &:disabled:not([data-outside-month="true"]),
204
- &[data-disabled]:not([data-outside-month="true"]) {
210
+ &[data-disabled]:not([data-outside-month="true"]),
211
+ &:has([data-disabled]):not([data-outside-month="true"]) {
205
212
  @apply status-disabled;
206
213
 
207
214
  text-decoration: line-through;
@@ -0,0 +1,239 @@
1
+ /* ==========================================================================
2
+ DateTimePicker — three-step date + time + timezone picker
3
+ ========================================================================== */
4
+
5
+ .date-time-picker {
6
+ @apply inline-flex flex-col gap-1;
7
+ }
8
+
9
+ .date-time-picker--full-width {
10
+ @apply w-full;
11
+ }
12
+
13
+ .date-time-picker--invalid {
14
+ /* invalid state propagated to child DateInput via isInvalid prop */
15
+ }
16
+
17
+ .date-time-picker--disabled {
18
+ @apply opacity-60 cursor-not-allowed pointer-events-none;
19
+ }
20
+
21
+ /* ─── Trigger (calendar icon button) ─────────────────────────────────────── */
22
+
23
+ .date-time-picker__trigger {
24
+ @apply inline-flex items-center justify-center rounded-field p-1 no-highlight bg-transparent border-0 cursor-pointer outline-none shrink-0;
25
+ color: var(--color-field-placeholder);
26
+ cursor: var(--cursor-interactive);
27
+
28
+ /**
29
+ * Transitions
30
+ * CRITICAL: motion-reduce must be AFTER transition for correct override specificity
31
+ */
32
+ transition: box-shadow 300ms var(--ease-out);
33
+ @apply motion-reduce:transition-none;
34
+
35
+ &:focus-visible:not(:focus),
36
+ &[data-focus-visible="true"] {
37
+ @apply status-focused;
38
+ }
39
+
40
+ &:disabled,
41
+ &[data-disabled],
42
+ &[aria-disabled="true"] {
43
+ @apply status-disabled;
44
+ }
45
+ }
46
+
47
+ .date-time-picker__trigger-indicator {
48
+ @apply inline-flex size-4 items-center justify-center text-field-placeholder;
49
+ }
50
+
51
+ /* ─── Popover shell ───────────────────────────────────────────────────────── */
52
+
53
+ .date-time-picker__popover {
54
+ @apply origin-(--trigger-anchor-point) overflow-hidden bg-overlay p-0;
55
+ min-width: 17rem;
56
+ box-shadow: var(--shadow-overlay);
57
+ border-radius: calc(var(--radius) * 2.5);
58
+
59
+ &:focus-visible:not(:focus),
60
+ &[data-focus-visible="true"] {
61
+ @apply outline-none;
62
+ }
63
+
64
+ & {
65
+ @apply animate-in duration-300 ease-smooth fade-in-0 zoom-in-95;
66
+
67
+ &[data-placement^="top"] {
68
+ @apply slide-in-from-bottom-1;
69
+ }
70
+
71
+ &[data-placement^="bottom"] {
72
+ @apply slide-in-from-top-1;
73
+ }
74
+
75
+ &[data-placement^="left"] {
76
+ @apply slide-in-from-right-1;
77
+ }
78
+
79
+ &[data-placement^="right"] {
80
+ @apply slide-in-from-left-1;
81
+ }
82
+ }
83
+
84
+ &,
85
+ & {
86
+ @apply will-change-[opacity,transform];
87
+ }
88
+ }
89
+
90
+ /* ─── Step header ─────────────────────────────────────────────────────────── */
91
+
92
+ .date-time-picker__step-header {
93
+ @apply flex items-center justify-between px-3 pt-3 pb-1;
94
+ }
95
+
96
+ .date-time-picker__step-title {
97
+ @apply flex flex-1 items-center justify-center text-center text-xs font-medium select-none;
98
+ }
99
+
100
+ .date-time-picker__nav-button {
101
+ @apply flex size-6 items-center justify-center rounded-full bg-transparent text-accent outline-none no-highlight;
102
+ appearance: none;
103
+ -webkit-appearance: none;
104
+ border: none;
105
+ padding: 0;
106
+ cursor: var(--cursor-interactive);
107
+ will-change: scale;
108
+ transition:
109
+ transform 300ms var(--ease-out),
110
+ background-color 300ms var(--ease-out),
111
+ box-shadow 300ms var(--ease-out),
112
+ opacity 300ms var(--ease-out);
113
+ @apply transform-gpu motion-reduce:transition-none;
114
+
115
+ @media (hover: hover) {
116
+ &:hover {
117
+ @apply bg-default text-accent;
118
+ }
119
+ }
120
+
121
+ &:active {
122
+ transform: scale(0.95);
123
+ }
124
+
125
+ &:focus-visible {
126
+ @apply status-focused;
127
+ }
128
+
129
+ &[data-hidden="true"] {
130
+ @apply invisible pointer-events-none;
131
+ }
132
+ }
133
+
134
+ .date-time-picker__done-label {
135
+ @apply text-xs font-medium px-1;
136
+ color: var(--color-accent);
137
+ }
138
+
139
+ /* ─── Panel wrap (clips sliding panels) ──────────────────────────────────── */
140
+
141
+ .date-time-picker__panel-wrap {
142
+ @apply relative overflow-hidden;
143
+ min-height: 16rem;
144
+ }
145
+
146
+ /* ─── Time scroller ───────────────────────────────────────────────────────── */
147
+
148
+ .date-time-picker__scroller-wrap {
149
+ @apply flex items-stretch justify-center gap-0 px-3 pb-4;
150
+ position: relative;
151
+
152
+ &::before {
153
+ content: '';
154
+ @apply absolute inset-x-3 rounded-lg bg-default pointer-events-none;
155
+ height: 2.5rem;
156
+ top: 50%;
157
+ transform: translateY(-50%);
158
+ z-index: 0;
159
+ }
160
+ }
161
+
162
+ .date-time-picker__scroller-column {
163
+ @apply flex-1 relative z-10;
164
+ overflow-y: scroll;
165
+ -webkit-overflow-scrolling: touch;
166
+ touch-action: pan-y;
167
+ scroll-snap-type: y mandatory;
168
+ overscroll-behavior: contain;
169
+ height: 10rem;
170
+ padding-top: calc((10rem - 2.5rem) / 2);
171
+ padding-bottom: calc((10rem - 2.5rem) / 2);
172
+
173
+ scrollbar-width: none;
174
+
175
+ &::-webkit-scrollbar {
176
+ display: none;
177
+ }
178
+ }
179
+
180
+ .date-time-picker__scroller-item {
181
+ scroll-snap-align: center;
182
+ height: 2.5rem;
183
+ @apply flex items-center justify-center text-sm select-none cursor-pointer;
184
+ color: var(--color-muted-foreground);
185
+ transition: color 150ms var(--ease-smooth);
186
+ @apply motion-reduce:transition-none;
187
+
188
+ &[data-selected="true"] {
189
+ @apply font-medium;
190
+ color: var(--color-foreground);
191
+ }
192
+
193
+ &[data-disabled="true"] {
194
+ @apply opacity-40 cursor-not-allowed pointer-events-none;
195
+ }
196
+
197
+ @media (hover: hover) {
198
+ &:hover:not([data-selected="true"]) {
199
+ color: var(--color-foreground);
200
+ }
201
+ }
202
+ }
203
+
204
+ /* ─── Timezone panel ──────────────────────────────────────────────────────── */
205
+
206
+ .date-time-picker__tz-search {
207
+ @apply w-full bg-transparent border-0 border-b outline-none px-3 py-2 text-sm;
208
+ border-color: var(--color-border);
209
+ color: var(--color-foreground);
210
+
211
+ &::placeholder {
212
+ color: var(--color-field-placeholder);
213
+ }
214
+
215
+ &:focus {
216
+ outline: none;
217
+ border-color: var(--color-field-border-focus);
218
+ }
219
+ }
220
+
221
+ .date-time-picker__tz-list {
222
+ @apply overflow-y-auto p-1;
223
+ max-height: 14rem;
224
+ scrollbar-width: thin;
225
+ }
226
+
227
+ .date-time-picker__tz-item {
228
+ @apply list-item min-h-8 gap-2 rounded-lg text-sm;
229
+
230
+ &[aria-selected="true"] {
231
+ @apply bg-default font-medium text-foreground;
232
+ }
233
+
234
+ @media (hover: hover) {
235
+ &:hover:not([aria-selected="true"]) {
236
+ @apply bg-default-hover;
237
+ }
238
+ }
239
+ }
@@ -114,6 +114,7 @@
114
114
  @import "./time-field.css";
115
115
  @import "./date-picker.css";
116
116
  @import "./date-range-picker.css";
117
+ @import "./date-time-picker.css";
117
118
 
118
119
  /* ------------------------------------------------------------------------------------------------
119
120
  * Layout
@@ -47,7 +47,6 @@
47
47
  }
48
48
 
49
49
  /* Invalid state */
50
- &:has(> input:invalid),
51
50
  &[data-invalid="true"] {
52
51
  @apply status-invalid-field;
53
52
  background-color: var(--color-field-focus);
@@ -451,7 +450,6 @@
451
450
  }
452
451
 
453
452
  /* Invalid state — label color flips to danger */
454
- .input--label-inside:has(> input:invalid) .input__label,
455
453
  .input--label-inside[data-invalid="true"] .input__label {
456
454
  color: var(--color-danger);
457
455
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auronui/styles",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Auron core styles — adapted for Reka UI",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -0,0 +1,44 @@
1
+ import type {VariantProps} from "../../utils";
2
+
3
+ import {tv} from "tailwind-variants";
4
+
5
+ export const dateTimePickerVariants = tv({
6
+ slots: {
7
+ base: "date-time-picker",
8
+ popover: "date-time-picker__popover",
9
+ trigger: "date-time-picker__trigger",
10
+ triggerIndicator: "date-time-picker__trigger-indicator",
11
+ stepHeader: "date-time-picker__step-header",
12
+ navButton: "date-time-picker__nav-button",
13
+ stepTitle: "date-time-picker__step-title",
14
+ doneLabel: "date-time-picker__done-label",
15
+ panelWrap: "date-time-picker__panel-wrap",
16
+ scrollerWrap: "date-time-picker__scroller-wrap",
17
+ scrollerColumn: "date-time-picker__scroller-column",
18
+ scrollerItem: "date-time-picker__scroller-item",
19
+ tzSearch: "date-time-picker__tz-search",
20
+ tzList: "date-time-picker__tz-list",
21
+ tzItem: "date-time-picker__tz-item",
22
+ },
23
+ defaultVariants: {
24
+ isInvalid: false,
25
+ isDisabled: false,
26
+ fullWidth: false,
27
+ },
28
+ variants: {
29
+ isInvalid: {
30
+ true: {base: "date-time-picker--invalid"},
31
+ false: {},
32
+ },
33
+ isDisabled: {
34
+ true: {base: "date-time-picker--disabled"},
35
+ false: {},
36
+ },
37
+ fullWidth: {
38
+ true: {base: "date-time-picker--full-width"},
39
+ false: {},
40
+ },
41
+ },
42
+ });
43
+
44
+ export type DateTimePickerVariants = VariantProps<typeof dateTimePickerVariants>;
@@ -0,0 +1 @@
1
+ export * from "./date-time-picker.styles";
@@ -28,6 +28,7 @@ export * from "./date-input";
28
28
  export * from "./date-picker";
29
29
  export * from "./date-range-field";
30
30
  export * from "./date-range-picker";
31
+ export * from "./date-time-picker";
31
32
  export * from "./description";
32
33
  export * from "./drawer";
33
34
  export * from "./collapsible";