@aortl/admin-css 0.17.0 → 0.18.1

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,64 @@
1
+ @layer components {
2
+ /* React's Base UI Root is a transparent wrapper; the visual group is `.number-input`. */
3
+ .number-input-root {
4
+ display: contents;
5
+ }
6
+
7
+ /* Connected group: − | input | +, mirroring .input-group's look. */
8
+ .number-input {
9
+ @apply inline-flex w-full items-stretch
10
+ rounded-lg border border-border bg-surface
11
+ transition-colors duration-150
12
+ focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-focus;
13
+ }
14
+ .number-input:hover {
15
+ @apply border-border-strong;
16
+ }
17
+
18
+ /* Borderless field: right-aligned tabular digits, native spinners hidden. */
19
+ .number-input-field {
20
+ @apply flex-1 min-w-0 w-full px-3 py-2
21
+ bg-transparent text-sm leading-none text-text text-right tabular-nums
22
+ border-0 outline-none
23
+ placeholder:text-text-muted
24
+ disabled:opacity-50 disabled:cursor-not-allowed;
25
+ -moz-appearance: textfield;
26
+ }
27
+ .number-input-field::-webkit-inner-spin-button,
28
+ .number-input-field::-webkit-outer-spin-button {
29
+ -webkit-appearance: none;
30
+ margin: 0;
31
+ }
32
+
33
+ /* Stepper buttons. */
34
+ .number-input-step {
35
+ @apply inline-flex items-center justify-center shrink-0
36
+ w-8 text-text-muted bg-transparent
37
+ cursor-pointer select-none border-0
38
+ hover:bg-surface-muted hover:text-text
39
+ disabled:opacity-50 disabled:cursor-not-allowed;
40
+ }
41
+ .number-input-step:first-child {
42
+ @apply border-r border-border rounded-l-lg;
43
+ }
44
+ .number-input-step:last-child {
45
+ @apply border-l border-border rounded-r-lg;
46
+ }
47
+ .number-input-step > :is(i, svg) {
48
+ font-size: 0.875rem;
49
+ }
50
+
51
+ /* Sizes */
52
+ .number-input-sm .number-input-field {
53
+ @apply text-xs px-2.5 py-1.5;
54
+ }
55
+ .number-input-sm .number-input-step {
56
+ @apply w-7;
57
+ }
58
+ .number-input-lg .number-input-field {
59
+ @apply text-base px-4 py-2.5;
60
+ }
61
+ .number-input-lg .number-input-step {
62
+ @apply w-9;
63
+ }
64
+ }
@@ -21,6 +21,39 @@
21
21
  @apply text-sm text-text-muted;
22
22
  }
23
23
 
24
+ /* Trend delta — caret drawn from borders (no icon dependency) plus a value.
25
+ `data-trend` rotates the caret; `data-intent` colors it, kept independent
26
+ because up is not always good (a rising error rate is bad). */
27
+ .stat-card-trend {
28
+ @apply inline-flex items-center gap-1 text-sm font-medium tabular-nums text-text-muted;
29
+ }
30
+ .stat-card-trend::before {
31
+ content: "";
32
+ width: 0;
33
+ height: 0;
34
+ border-inline: 0.3em solid transparent;
35
+ border-block-end: 0.42em solid currentColor;
36
+ }
37
+ .stat-card-trend[data-trend="down"]::before {
38
+ border-block-end: 0;
39
+ border-block-start: 0.42em solid currentColor;
40
+ }
41
+ .stat-card-trend[data-trend="flat"]::before {
42
+ width: 0.55em;
43
+ border-inline: 0;
44
+ border-block-end: 0;
45
+ border-block-start: 0.16em solid currentColor;
46
+ }
47
+ .stat-card-trend[data-intent="positive"] {
48
+ @apply text-success;
49
+ }
50
+ .stat-card-trend[data-intent="negative"] {
51
+ @apply text-danger;
52
+ }
53
+ .stat-card-trend[data-intent="neutral"] {
54
+ @apply text-text-muted;
55
+ }
56
+
24
57
  /* `.card-compact` targets `.card-body`; with no body, step the root instead. */
25
58
  .card-compact.stat-card {
26
59
  @apply p-3 gap-0.5;
@@ -121,4 +121,48 @@
121
121
  .table-row-link:focus-within {
122
122
  @apply outline-2 -outline-offset-2 outline-focus;
123
123
  }
124
+
125
+ /* Compact density — mirrors table-relaxed at the tight end. */
126
+ .table-compact :where(th, td),
127
+ .table-compact .table-cell,
128
+ .table-compact .table-header-cell {
129
+ @apply px-2 py-1 text-xs;
130
+ }
131
+
132
+ /* Empty state — a centered, muted message row (author sets colspan). */
133
+ .table :where(td).table-empty,
134
+ .table-empty {
135
+ @apply text-center text-text-muted py-8;
136
+ }
137
+ /* No hover affordance on the empty-state row. */
138
+ .table tbody tr:has(> .table-empty):hover :where(td) {
139
+ background-color: transparent;
140
+ }
141
+
142
+ /* Pinned first column — sticky against horizontal scroll. Requires an
143
+ overflow-x ancestor (the table adds no wrapper, same stance as table-sticky).
144
+ Each row state repaints the cell so scrolled content doesn't bleed through. */
145
+ .table-pin-col :where(thead th, tbody td, tfoot :is(td, th)):first-child {
146
+ position: sticky;
147
+ inset-inline-start: 0;
148
+ }
149
+ .table-pin-col tbody td:first-child {
150
+ z-index: 1;
151
+ background-color: var(--color-surface);
152
+ }
153
+ /* Header corner sits above the body column and the sticky header row. */
154
+ .table-pin-col :where(thead th):first-child {
155
+ z-index: 11;
156
+ }
157
+ .table-pin-col.table-striped tbody tr:nth-child(even) td:first-child {
158
+ background-color: var(--color-surface-muted);
159
+ }
160
+ .table-pin-col tbody tr:hover td:first-child {
161
+ background-color: var(--color-surface-muted);
162
+ }
163
+ .table-pin-col tbody tr:has(input[type="checkbox"]:checked) td:first-child,
164
+ .table-pin-col tbody tr:has(.checkbox[data-checked]) td:first-child,
165
+ .table-pin-col tbody tr[data-selected] td:first-child {
166
+ background-color: var(--color-primary-muted);
167
+ }
124
168
  }
@@ -0,0 +1,113 @@
1
+ @layer components {
2
+ /* Vertical event rail: an indicator gutter and a content column per <li>, with
3
+ a connector line drawn down the gutter that stops at the last item. */
4
+ .timeline {
5
+ list-style: none;
6
+ margin: 0;
7
+ padding: 0;
8
+ }
9
+
10
+ .timeline-item {
11
+ display: grid;
12
+ grid-template-columns: 1.5rem 1fr;
13
+ column-gap: 0.75rem;
14
+ padding-bottom: 1rem;
15
+ position: relative;
16
+ }
17
+ .timeline-item:last-child {
18
+ padding-bottom: 0;
19
+ }
20
+
21
+ /* Connector — vertical line centred in the gutter, hidden on the last item. */
22
+ .timeline-item:not(:last-child)::before {
23
+ content: "";
24
+ position: absolute;
25
+ inset-block: 0.75rem 0;
26
+ inset-inline-start: 0.75rem;
27
+ width: 2px;
28
+ transform: translateX(-50%);
29
+ background-color: var(--color-border);
30
+ }
31
+
32
+ .timeline-indicator {
33
+ grid-column: 1;
34
+ align-self: start;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ height: 1.5rem;
39
+ position: relative;
40
+ z-index: 1;
41
+ }
42
+ .timeline-dot {
43
+ display: inline-block;
44
+ width: 0.625rem;
45
+ height: 0.625rem;
46
+ border-radius: 9999px;
47
+ background-color: var(--color-border-strong);
48
+ box-shadow: 0 0 0 3px var(--color-surface);
49
+ }
50
+ /* Surface backing masks the connector running behind an icon indicator. */
51
+ .timeline-indicator > :is(i, svg) {
52
+ font-size: 1rem;
53
+ color: var(--color-text-muted);
54
+ background-color: var(--color-surface);
55
+ border-radius: 9999px;
56
+ }
57
+
58
+ .timeline-content {
59
+ grid-column: 2;
60
+ display: flex;
61
+ flex-direction: column;
62
+ gap: 0.125rem;
63
+ min-width: 0;
64
+ padding-block: 0.125rem 0;
65
+ }
66
+ .timeline-title {
67
+ @apply text-sm font-medium text-text leading-tight;
68
+ }
69
+ .timeline-time {
70
+ @apply text-xs text-text-muted tabular-nums;
71
+ }
72
+ .timeline-description {
73
+ @apply text-sm text-text-muted;
74
+ text-wrap: pretty;
75
+ }
76
+
77
+ /* Status accents on the dot. */
78
+ .timeline-item-info .timeline-dot {
79
+ background-color: var(--color-info);
80
+ }
81
+ .timeline-item-success .timeline-dot {
82
+ background-color: var(--color-success);
83
+ }
84
+ .timeline-item-warning .timeline-dot {
85
+ background-color: var(--color-warning);
86
+ }
87
+ .timeline-item-danger .timeline-dot {
88
+ background-color: var(--color-danger);
89
+ }
90
+
91
+ /* Numbered variant — the gutter holds a numbered/checked marker (steps rail). */
92
+ .timeline-numbered .timeline-item {
93
+ grid-template-columns: 1.75rem 1fr;
94
+ }
95
+ .timeline-numbered .timeline-item:not(:last-child)::before {
96
+ inset-inline-start: 0.875rem;
97
+ inset-block: 1.75rem 0;
98
+ }
99
+ .timeline-numbered .timeline-indicator {
100
+ height: 1.75rem;
101
+ }
102
+ .timeline-marker {
103
+ @apply inline-flex items-center justify-center
104
+ size-7 rounded-full text-xs font-semibold tabular-nums
105
+ bg-surface-strong text-text-muted;
106
+ box-shadow: 0 0 0 3px var(--color-surface);
107
+ }
108
+ /* Completed and current steps fill with the primary ink. */
109
+ .timeline-item-success .timeline-marker,
110
+ .timeline-item-current .timeline-marker {
111
+ @apply bg-primary text-primary-content;
112
+ }
113
+ }