@atelier-ui/react 0.1.10 → 0.1.11

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,200 @@
1
+ /* ============================================================
2
+ llm-table.css — Styles for the React table component
3
+ ============================================================ */
4
+
5
+ /* ---------------------------------------------------------------------------
6
+ Table host container
7
+ --------------------------------------------------------------------------- */
8
+ .llm-table {
9
+ display: block;
10
+ font-family: var(--ui-font-family);
11
+ color: var(--ui-color-text);
12
+ }
13
+
14
+ .llm-table-wrapper {
15
+ width: 100%;
16
+ overflow-x: auto;
17
+ }
18
+
19
+ .llm-table table {
20
+ width: 100%;
21
+ border-collapse: collapse;
22
+ }
23
+
24
+ /* ---------------------------------------------------------------------------
25
+ Header cells
26
+ --------------------------------------------------------------------------- */
27
+ .llm-table thead th {
28
+ font-size: var(--ui-font-size-xs);
29
+ font-weight: var(--ui-font-weight-semibold);
30
+ color: var(--ui-color-text-muted);
31
+ letter-spacing: var(--ui-letter-spacing-wide);
32
+ text-transform: uppercase;
33
+ border-bottom: 2px solid var(--ui-color-border);
34
+ background-color: var(--ui-color-surface);
35
+ padding: var(--ui-spacing-3) var(--ui-spacing-4);
36
+ text-align: start;
37
+ white-space: nowrap;
38
+ }
39
+
40
+ /* ---------------------------------------------------------------------------
41
+ Body cells
42
+ --------------------------------------------------------------------------- */
43
+ .llm-table tbody td {
44
+ border-bottom: 1px solid var(--ui-color-border);
45
+ padding: var(--ui-spacing-3) var(--ui-spacing-4);
46
+ vertical-align: middle;
47
+ background-color: var(--ui-color-surface);
48
+ transition: background-color var(--ui-transition-fast);
49
+ }
50
+
51
+ /* ---------------------------------------------------------------------------
52
+ Size variants
53
+ --------------------------------------------------------------------------- */
54
+ .llm-table.size-sm thead th,
55
+ .llm-table.size-sm tbody td {
56
+ padding: var(--ui-spacing-2) var(--ui-spacing-3);
57
+ font-size: var(--ui-font-size-xs);
58
+ }
59
+
60
+ .llm-table.size-md thead th,
61
+ .llm-table.size-md tbody td {
62
+ padding: var(--ui-spacing-3) var(--ui-spacing-4);
63
+ font-size: var(--ui-font-size-sm);
64
+ }
65
+
66
+ .llm-table.size-lg thead th,
67
+ .llm-table.size-lg tbody td {
68
+ padding: var(--ui-spacing-4) var(--ui-spacing-6);
69
+ font-size: var(--ui-font-size-md);
70
+ }
71
+
72
+ /* ---------------------------------------------------------------------------
73
+ Table variants
74
+ --------------------------------------------------------------------------- */
75
+
76
+ /* Striped: alternate even row background */
77
+ .llm-table.variant-striped tbody tr:nth-child(even) td {
78
+ background-color: var(--ui-color-surface-sunken);
79
+ }
80
+
81
+ /* Bordered: all cell borders */
82
+ .llm-table.variant-bordered thead th,
83
+ .llm-table.variant-bordered tbody td {
84
+ border: 1px solid var(--ui-color-border);
85
+ }
86
+
87
+ /* ---------------------------------------------------------------------------
88
+ Alignment
89
+ --------------------------------------------------------------------------- */
90
+ th.align-start,
91
+ td.align-start {
92
+ text-align: start;
93
+ }
94
+
95
+ th.align-center,
96
+ td.align-center {
97
+ text-align: center;
98
+ }
99
+
100
+ th.align-end,
101
+ td.align-end {
102
+ text-align: end;
103
+ }
104
+
105
+ /* ---------------------------------------------------------------------------
106
+ Row hover and selection
107
+ --------------------------------------------------------------------------- */
108
+ .llm-table tbody tr:hover td {
109
+ background-color: var(--ui-color-surface-sunken);
110
+ }
111
+
112
+ .llm-table tbody tr.is-selected td {
113
+ background-color: var(--ui-color-primary-light);
114
+ }
115
+
116
+ /* Keep selected color on hover */
117
+ .llm-table tbody tr.is-selected:hover td {
118
+ background-color: var(--ui-color-primary-light);
119
+ }
120
+
121
+ /* Selection checkbox cell — fixed narrow width */
122
+ .llm-tr-select-cell {
123
+ width: 2.75rem;
124
+ text-align: center;
125
+ }
126
+
127
+ /* Strip default checkbox layout to center it in the cell */
128
+ .llm-tr-select-cell .llm-checkbox label {
129
+ justify-content: center;
130
+ }
131
+
132
+ /* ---------------------------------------------------------------------------
133
+ Sticky header
134
+ z-index:1 is intentional — above sibling rows but below dropdowns (z-index:100)
135
+ --------------------------------------------------------------------------- */
136
+ .llm-table.is-sticky-header thead th {
137
+ position: sticky;
138
+ top: 0;
139
+ z-index: 1;
140
+ box-shadow: 0 1px 0 0 var(--ui-color-border);
141
+ }
142
+
143
+ /* ---------------------------------------------------------------------------
144
+ Sort button
145
+ --------------------------------------------------------------------------- */
146
+ .llm-th-sort-btn {
147
+ all: unset;
148
+ box-sizing: border-box;
149
+ display: inline-flex;
150
+ align-items: center;
151
+ gap: var(--ui-spacing-2);
152
+ cursor: pointer;
153
+ font: inherit;
154
+ color: inherit;
155
+ font-weight: inherit;
156
+ width: 100%;
157
+ }
158
+
159
+ .llm-th-sort-btn:focus-visible {
160
+ outline: none;
161
+ box-shadow: var(--ui-focus-ring);
162
+ border-radius: var(--ui-radius-sm);
163
+ }
164
+
165
+ .llm-th-sort-icon {
166
+ flex-shrink: 0;
167
+ }
168
+
169
+ .llm-th-sort-asc-arrow,
170
+ .llm-th-sort-desc-arrow {
171
+ opacity: 0.25;
172
+ transition: opacity var(--ui-transition-fast);
173
+ }
174
+
175
+ th.is-sorted .llm-th-sort-icon {
176
+ color: var(--ui-color-primary);
177
+ }
178
+
179
+ th.sort-asc .llm-th-sort-asc-arrow {
180
+ opacity: 1;
181
+ }
182
+
183
+ th.sort-desc .llm-th-sort-desc-arrow {
184
+ opacity: 1;
185
+ }
186
+
187
+ /* ---------------------------------------------------------------------------
188
+ Empty state
189
+ --------------------------------------------------------------------------- */
190
+ .llm-tbody-empty-cell {
191
+ text-align: center;
192
+ padding: var(--ui-spacing-12) var(--ui-spacing-4) !important;
193
+ color: var(--ui-color-text-muted);
194
+ font-size: var(--ui-font-size-md);
195
+ background-color: var(--ui-color-surface) !important;
196
+ }
197
+
198
+ /* ---------------------------------------------------------------------------
199
+ Dark mode — inherited via --ui-* token overrides in tokens.css
200
+ --------------------------------------------------------------------------- */
@@ -0,0 +1,120 @@
1
+ .llm-tab-group {
2
+ display: block;
3
+ font-family: var(--ui-font-family);
4
+ color: var(--ui-color-text);
5
+ }
6
+
7
+ /* ─── Tab list ─── */
8
+ .llm-tab-group .tablist {
9
+ display: flex;
10
+ gap: var(--ui-spacing-2);
11
+ border-bottom: 1px solid var(--ui-color-border);
12
+ overflow-x: auto;
13
+ scrollbar-width: none;
14
+ }
15
+
16
+ .llm-tab-group .tablist::-webkit-scrollbar {
17
+ display: none;
18
+ }
19
+
20
+ /* ─── Tab button ─── */
21
+ .llm-tab-group .tablist button {
22
+ all: unset;
23
+ box-sizing: border-box;
24
+ position: relative;
25
+ display: inline-flex;
26
+ align-items: center;
27
+ min-height: 2.5rem;
28
+ padding: var(--ui-spacing-3) var(--ui-spacing-4);
29
+ font-size: var(--ui-font-size-sm);
30
+ font-weight: var(--ui-font-weight-medium);
31
+ color: var(--ui-color-text-muted);
32
+ cursor: pointer;
33
+ transition: var(--ui-transition-fast);
34
+ transition-property: color, background-color;
35
+ border-radius: var(--ui-radius-md) var(--ui-radius-md) 0 0;
36
+ white-space: nowrap;
37
+ user-select: none;
38
+ }
39
+
40
+ /* Active indicator (underline) — 3px for modern weight */
41
+ .llm-tab-group .tablist button::after {
42
+ content: '';
43
+ position: absolute;
44
+ bottom: -1px;
45
+ left: var(--ui-spacing-2);
46
+ right: var(--ui-spacing-2);
47
+ height: 3px;
48
+ background: transparent;
49
+ border-radius: var(--ui-radius-full) var(--ui-radius-full) 0 0;
50
+ transition: background var(--ui-transition-fast);
51
+ }
52
+
53
+ .llm-tab-group .tablist button.is-active {
54
+ color: var(--ui-color-primary);
55
+ }
56
+
57
+ .llm-tab-group .tablist button.is-active::after {
58
+ background: var(--ui-color-primary);
59
+ }
60
+
61
+ /* Hover */
62
+ .llm-tab-group .tablist button:hover:not(.is-disabled):not(.is-active) {
63
+ color: var(--ui-color-text);
64
+ background: var(--ui-color-surface-sunken);
65
+ }
66
+
67
+ /* Focus */
68
+ .llm-tab-group .tablist button:focus-visible {
69
+ outline: none;
70
+ box-shadow: var(--ui-focus-ring);
71
+ border-radius: var(--ui-radius-md);
72
+ }
73
+
74
+ /* Disabled */
75
+ .llm-tab-group .tablist button.is-disabled {
76
+ opacity: var(--ui-opacity-disabled);
77
+ cursor: not-allowed;
78
+ }
79
+
80
+ /* ─── Tab panel ─── */
81
+ .llm-tab-group [role="tabpanel"] {
82
+ padding: var(--ui-spacing-5) 0;
83
+ }
84
+
85
+ .llm-tab-group [role="tabpanel"]:focus-visible {
86
+ outline: none;
87
+ box-shadow: var(--ui-focus-ring);
88
+ border-radius: var(--ui-radius-md);
89
+ }
90
+
91
+ /* ─── Pills variant ─── */
92
+ .llm-tab-group.variant-pills .tablist {
93
+ border-bottom: none;
94
+ gap: var(--ui-spacing-2);
95
+ padding: var(--ui-spacing-1);
96
+ background: var(--ui-color-surface-sunken);
97
+ border-radius: var(--ui-radius-lg);
98
+ }
99
+
100
+ .llm-tab-group.variant-pills .tablist button {
101
+ border-radius: var(--ui-radius-md);
102
+ min-height: 2rem;
103
+ padding: var(--ui-spacing-2) var(--ui-spacing-4);
104
+ font-size: var(--ui-font-size-sm);
105
+ }
106
+
107
+ .llm-tab-group.variant-pills .tablist button::after {
108
+ display: none;
109
+ }
110
+
111
+ .llm-tab-group.variant-pills .tablist button.is-active {
112
+ background: var(--ui-color-surface);
113
+ color: var(--ui-color-text);
114
+ box-shadow: var(--ui-shadow-sm);
115
+ }
116
+
117
+ .llm-tab-group.variant-pills .tablist button:hover:not(.is-disabled):not(.is-active) {
118
+ background: transparent;
119
+ color: var(--ui-color-text);
120
+ }
@@ -0,0 +1,100 @@
1
+ .llm-textarea {
2
+ display: block;
3
+ font-family: var(--ui-font-family);
4
+ font-size: var(--ui-font-size-md);
5
+ }
6
+
7
+ .llm-textarea textarea {
8
+ display: block;
9
+ width: 100%;
10
+ padding: 0.625rem var(--ui-spacing-4);
11
+ font-size: inherit;
12
+ font-family: inherit;
13
+ line-height: var(--ui-line-height-normal);
14
+ color: var(--ui-color-text);
15
+ background-color: var(--ui-color-input-bg);
16
+ border: 1px solid var(--ui-color-input-border);
17
+ border-radius: var(--ui-radius-md);
18
+ transition: border-color var(--ui-transition-fast),
19
+ box-shadow var(--ui-transition-fast),
20
+ background-color var(--ui-transition-fast);
21
+ outline: none;
22
+ box-sizing: border-box;
23
+ resize: vertical;
24
+ min-height: 5rem;
25
+ }
26
+
27
+ .llm-textarea textarea::placeholder {
28
+ color: var(--ui-color-placeholder);
29
+ }
30
+
31
+ .llm-textarea textarea:hover:not(:disabled):not(:read-only) {
32
+ border-color: var(--ui-color-input-border-hover);
33
+ }
34
+
35
+ .llm-textarea textarea:focus {
36
+ border-color: var(--ui-color-input-border-focus);
37
+ background-color: var(--ui-color-input-bg-focus);
38
+ box-shadow: var(--ui-focus-ring);
39
+ }
40
+
41
+ .llm-textarea .textarea-field {
42
+ position: relative;
43
+ }
44
+
45
+ /* Invalid state */
46
+ .llm-textarea.is-invalid textarea {
47
+ border-color: var(--ui-color-input-border-invalid);
48
+ padding-right: 2.25rem;
49
+ }
50
+
51
+ .llm-textarea.is-invalid textarea:focus {
52
+ border-color: var(--ui-color-input-border-invalid);
53
+ box-shadow: 0 0 0 2px var(--ui-color-surface), 0 0 0 4px var(--ui-color-danger);
54
+ }
55
+
56
+ /* Non-color invalid indicator (WCAG 1.4.1) */
57
+ .llm-textarea.is-invalid .textarea-field::before {
58
+ content: '✕';
59
+ position: absolute;
60
+ top: 0.75rem;
61
+ right: 0.875rem;
62
+ color: var(--ui-color-danger);
63
+ font-weight: 700;
64
+ line-height: 1;
65
+ pointer-events: none;
66
+ }
67
+
68
+ /* Disabled state */
69
+ .llm-textarea.is-disabled {
70
+ opacity: var(--ui-opacity-disabled);
71
+ cursor: not-allowed;
72
+ }
73
+
74
+ .llm-textarea.is-disabled textarea {
75
+ cursor: not-allowed;
76
+ }
77
+
78
+ /* Readonly state */
79
+ .llm-textarea.is-readonly textarea {
80
+ background-color: var(--ui-color-surface-sunken);
81
+ cursor: default;
82
+ }
83
+
84
+ /* Auto-resize: hide manual resize handle when autoResize is active */
85
+ .llm-textarea.is-auto-resize textarea {
86
+ resize: none;
87
+ overflow: hidden;
88
+ }
89
+
90
+ /* Error messages */
91
+ .llm-textarea .errors {
92
+ margin-top: var(--ui-spacing-2);
93
+ }
94
+
95
+ .llm-textarea .error-message {
96
+ margin: 0;
97
+ font-size: var(--ui-font-size-sm);
98
+ color: var(--ui-color-error-text);
99
+ line-height: var(--ui-line-height-normal);
100
+ }
@@ -0,0 +1,137 @@
1
+ /* ── Toast Container ── */
2
+ .llm-toast-container {
3
+ position: fixed;
4
+ z-index: var(--ui-z-toast, 400);
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: var(--ui-spacing-2);
8
+ pointer-events: none;
9
+ max-width: min(24rem, calc(100vw - 2rem));
10
+ box-sizing: border-box;
11
+ }
12
+
13
+ .llm-toast-container.position-bottom-right {
14
+ bottom: var(--ui-spacing-4);
15
+ right: var(--ui-spacing-4);
16
+ align-items: flex-end;
17
+ }
18
+
19
+ .llm-toast-container.position-bottom-center {
20
+ bottom: var(--ui-spacing-4);
21
+ left: 50%;
22
+ transform: translateX(-50%);
23
+ align-items: center;
24
+ }
25
+
26
+ .llm-toast-container.position-top-right {
27
+ top: var(--ui-spacing-4);
28
+ right: var(--ui-spacing-4);
29
+ align-items: flex-end;
30
+ }
31
+
32
+ .llm-toast-container.position-top-center {
33
+ top: var(--ui-spacing-4);
34
+ left: 50%;
35
+ transform: translateX(-50%);
36
+ align-items: center;
37
+ }
38
+
39
+ /* ── Individual Toast ── */
40
+ .llm-toast {
41
+ display: flex;
42
+ align-items: center;
43
+ gap: var(--ui-spacing-3);
44
+ padding: var(--ui-spacing-4) var(--ui-spacing-5);
45
+ border-radius: var(--ui-radius-lg);
46
+ border-left: 4px solid transparent;
47
+ font-family: var(--ui-font-family);
48
+ font-size: var(--ui-font-size-sm);
49
+ line-height: var(--ui-line-height-normal);
50
+ box-shadow: var(--ui-shadow-lg);
51
+ background-color: var(--ui-color-surface-raised, var(--ui-color-surface));
52
+ color: var(--ui-color-text);
53
+ pointer-events: auto;
54
+ min-width: 18rem;
55
+ max-width: 100%;
56
+ box-sizing: border-box;
57
+ animation: toast-enter 0.3s ease-out;
58
+ }
59
+
60
+ /* ── Variant borders & tints ── */
61
+ .llm-toast.variant-default {
62
+ border-left-color: var(--ui-color-border);
63
+ }
64
+
65
+ .llm-toast.variant-success {
66
+ border-left-color: var(--ui-color-success);
67
+ background-color: color-mix(in srgb, var(--ui-color-success) 8%, var(--ui-color-surface-raised, var(--ui-color-surface)));
68
+ }
69
+
70
+ .llm-toast.variant-warning {
71
+ border-left-color: var(--ui-color-warning);
72
+ background-color: color-mix(in srgb, var(--ui-color-warning) 8%, var(--ui-color-surface-raised, var(--ui-color-surface)));
73
+ }
74
+
75
+ .llm-toast.variant-danger {
76
+ border-left-color: var(--ui-color-danger);
77
+ background-color: color-mix(in srgb, var(--ui-color-danger) 8%, var(--ui-color-surface-raised, var(--ui-color-surface)));
78
+ }
79
+
80
+ .llm-toast.variant-info {
81
+ border-left-color: var(--ui-color-info);
82
+ background-color: color-mix(in srgb, var(--ui-color-info) 8%, var(--ui-color-surface-raised, var(--ui-color-surface)));
83
+ }
84
+
85
+ /* ── Message ── */
86
+ .llm-toast .message {
87
+ flex: 1;
88
+ }
89
+
90
+ /* ── Dismiss button ── */
91
+ .llm-toast .dismiss {
92
+ display: inline-flex;
93
+ align-items: center;
94
+ justify-content: center;
95
+ flex-shrink: 0;
96
+ width: 1.75rem;
97
+ height: 1.75rem;
98
+ padding: 0;
99
+ background: transparent;
100
+ border: none;
101
+ border-radius: var(--ui-radius-sm);
102
+ cursor: pointer;
103
+ color: var(--ui-color-text-muted, currentColor);
104
+ opacity: 0.7;
105
+ transition: opacity var(--ui-transition-fast, 150ms), background-color var(--ui-transition-fast, 150ms);
106
+ line-height: 1;
107
+ }
108
+
109
+ .llm-toast .dismiss:hover {
110
+ opacity: 1;
111
+ background-color: color-mix(in srgb, currentColor 10%, transparent);
112
+ }
113
+
114
+ .llm-toast .dismiss:focus-visible {
115
+ outline: none;
116
+ box-shadow: var(--ui-focus-ring);
117
+ opacity: 1;
118
+ }
119
+
120
+ /* ── Enter animation ── */
121
+ @keyframes toast-enter {
122
+ from {
123
+ opacity: 0;
124
+ transform: translateY(0.5rem);
125
+ }
126
+ to {
127
+ opacity: 1;
128
+ transform: translateY(0);
129
+ }
130
+ }
131
+
132
+ /* ── Reduced motion ── */
133
+ @media (prefers-reduced-motion: reduce) {
134
+ .llm-toast {
135
+ animation: none;
136
+ }
137
+ }
@@ -0,0 +1,118 @@
1
+ .llm-toggle {
2
+ display: block;
3
+ font-family: var(--ui-font-family);
4
+ font-size: var(--ui-font-size-md);
5
+ }
6
+
7
+ .llm-toggle label {
8
+ display: inline-flex;
9
+ align-items: center;
10
+ gap: var(--ui-spacing-3);
11
+ cursor: pointer;
12
+ user-select: none;
13
+ color: var(--ui-color-text);
14
+ line-height: var(--ui-line-height-normal);
15
+ min-height: 1.5rem;
16
+ }
17
+
18
+ /* Hide native checkbox visually but keep it accessible */
19
+ .llm-toggle input[type='checkbox'] {
20
+ position: absolute;
21
+ width: 1px;
22
+ height: 1px;
23
+ padding: 0;
24
+ margin: -1px;
25
+ overflow: hidden;
26
+ clip: rect(0, 0, 0, 0);
27
+ white-space: nowrap;
28
+ border: 0;
29
+ }
30
+
31
+ /* Track — pill-shaped container */
32
+ .llm-toggle .track {
33
+ position: relative;
34
+ display: inline-flex;
35
+ align-items: center;
36
+ flex-shrink: 0;
37
+ width: 2.75rem;
38
+ height: 1.5rem;
39
+ border-radius: var(--ui-radius-full);
40
+ border: 1px solid var(--ui-color-border-strong);
41
+ background-color: var(--ui-color-input-bg);
42
+ transition: background-color var(--ui-transition-fast),
43
+ border-color var(--ui-transition-fast),
44
+ box-shadow var(--ui-transition-fast);
45
+ cursor: pointer;
46
+ }
47
+
48
+ /* Thumb — circular slider */
49
+ .llm-toggle .thumb {
50
+ position: absolute;
51
+ left: 0.125rem;
52
+ width: 1.125rem;
53
+ height: 1.125rem;
54
+ border-radius: var(--ui-radius-full);
55
+ background-color: var(--ui-color-border-strong);
56
+ box-shadow: var(--ui-shadow-xs);
57
+ transition: transform var(--ui-transition-normal) var(--ui-ease-out),
58
+ background-color var(--ui-transition-fast);
59
+ }
60
+
61
+ /* Hover state */
62
+ .llm-toggle label:hover:not(:has(input:disabled)) .track {
63
+ border-color: var(--ui-color-primary);
64
+ }
65
+
66
+ /* Focus ring on track when native input is focused */
67
+ .llm-toggle input[type='checkbox']:focus-visible + .track {
68
+ box-shadow: var(--ui-focus-ring);
69
+ border-color: var(--ui-color-primary);
70
+ }
71
+
72
+ /* Checked state — track */
73
+ .llm-toggle.is-checked .track {
74
+ background-color: var(--ui-color-primary);
75
+ border-color: var(--ui-color-primary);
76
+ }
77
+
78
+ /* Checked state — thumb slides right */
79
+ .llm-toggle.is-checked .thumb {
80
+ transform: translateX(1.25rem);
81
+ background-color: var(--ui-color-text-on-primary);
82
+ }
83
+
84
+ /* Invalid state — track border */
85
+ .llm-toggle.is-invalid .track {
86
+ border-color: var(--ui-color-input-border-invalid);
87
+ }
88
+
89
+ .llm-toggle.is-invalid input[type='checkbox']:focus-visible + .track {
90
+ border-color: var(--ui-color-input-border-invalid);
91
+ box-shadow: 0 0 0 2px var(--ui-color-surface), 0 0 0 4px var(--ui-color-danger);
92
+ }
93
+
94
+ /* Disabled state */
95
+ .llm-toggle.is-disabled {
96
+ opacity: var(--ui-opacity-disabled);
97
+ cursor: not-allowed;
98
+ }
99
+
100
+ .llm-toggle.is-disabled label {
101
+ cursor: not-allowed;
102
+ }
103
+
104
+ .llm-toggle.is-disabled .track {
105
+ cursor: not-allowed;
106
+ }
107
+
108
+ /* Error messages */
109
+ .llm-toggle .errors {
110
+ margin-top: var(--ui-spacing-2);
111
+ }
112
+
113
+ .llm-toggle .error-message {
114
+ margin: 0;
115
+ font-size: var(--ui-font-size-sm);
116
+ color: var(--ui-color-error-text);
117
+ line-height: var(--ui-line-height-normal);
118
+ }