@roy-ui/ui 0.0.5 → 0.0.6

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,108 @@
1
+ .royui-pagination {
2
+ --royui-pagination-fg: rgba(20, 20, 20, 0.95);
3
+ --royui-pagination-muted: rgba(20, 20, 20, 0.55);
4
+ --royui-pagination-bg-hover: rgba(20, 20, 20, 0.04);
5
+ --royui-pagination-border: rgba(20, 20, 20, 0.1);
6
+ --royui-pagination-current-bg: rgb(20, 20, 20);
7
+ --royui-pagination-current-fg: #ffffff;
8
+ --royui-pagination-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
9
+ --royui-pagination-dur: 160ms;
10
+
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: space-between;
14
+ gap: 16px;
15
+ font-family:
16
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
17
+ sans-serif;
18
+ }
19
+
20
+ .royui-pagination__summary {
21
+ font-size: 12.5px;
22
+ color: var(--royui-pagination-muted);
23
+ font-variant-numeric: tabular-nums;
24
+ }
25
+
26
+ .royui-pagination__group {
27
+ display: flex;
28
+ align-items: center;
29
+ gap: 8px;
30
+ margin-left: auto;
31
+ }
32
+
33
+ .royui-pagination__step,
34
+ .royui-pagination__page {
35
+ appearance: none;
36
+ border: 1px solid transparent;
37
+ background: transparent;
38
+ color: var(--royui-pagination-fg);
39
+ font: inherit;
40
+ font-size: 13px;
41
+ font-weight: 500;
42
+ letter-spacing: -0.005em;
43
+ padding: 6px 11px;
44
+ border-radius: 7px;
45
+ cursor: pointer;
46
+ font-variant-numeric: tabular-nums;
47
+ transition:
48
+ background var(--royui-pagination-dur) var(--royui-pagination-ease),
49
+ color var(--royui-pagination-dur) var(--royui-pagination-ease),
50
+ border-color var(--royui-pagination-dur) var(--royui-pagination-ease),
51
+ transform 220ms var(--royui-pagination-ease);
52
+ }
53
+
54
+ .royui-pagination__step {
55
+ color: var(--royui-pagination-muted);
56
+ }
57
+
58
+ .royui-pagination__step:hover:not(:disabled),
59
+ .royui-pagination__page:hover:not([aria-current='page']) {
60
+ background: var(--royui-pagination-bg-hover);
61
+ color: var(--royui-pagination-fg);
62
+ }
63
+
64
+ .royui-pagination__step:disabled {
65
+ opacity: 0.38;
66
+ cursor: not-allowed;
67
+ }
68
+
69
+ .royui-pagination__pages {
70
+ list-style: none;
71
+ margin: 0;
72
+ padding: 0;
73
+ display: flex;
74
+ align-items: center;
75
+ gap: 2px;
76
+ }
77
+
78
+ .royui-pagination__gap {
79
+ width: 24px;
80
+ text-align: center;
81
+ color: var(--royui-pagination-muted);
82
+ font-size: 14px;
83
+ line-height: 1;
84
+ }
85
+
86
+ .royui-pagination__page--current {
87
+ background: var(--royui-pagination-current-bg);
88
+ color: var(--royui-pagination-current-fg);
89
+ transform: scale(1.02);
90
+ cursor: default;
91
+ }
92
+
93
+ .royui-pagination__page:focus-visible,
94
+ .royui-pagination__step:focus-visible {
95
+ outline: 2px solid var(--royui-pagination-current-bg);
96
+ outline-offset: 2px;
97
+ }
98
+
99
+ @media (prefers-color-scheme: dark) {
100
+ .royui-pagination {
101
+ --royui-pagination-fg: rgba(255, 255, 255, 0.94);
102
+ --royui-pagination-muted: rgba(255, 255, 255, 0.52);
103
+ --royui-pagination-bg-hover: rgba(255, 255, 255, 0.06);
104
+ --royui-pagination-border: rgba(255, 255, 255, 0.12);
105
+ --royui-pagination-current-bg: rgba(255, 255, 255, 0.95);
106
+ --royui-pagination-current-fg: #0a0a0a;
107
+ }
108
+ }
@@ -0,0 +1,239 @@
1
+ .royui-table {
2
+ /* Theming surface — override on .royui-table (or :root) to retheme. */
3
+ --royui-table-bg: #ffffff;
4
+ --royui-table-fg: rgb(20, 20, 20);
5
+ --royui-table-muted: rgba(20, 20, 20, 0.58);
6
+ --royui-table-subtle: rgba(20, 20, 20, 0.35);
7
+ --royui-table-border: rgba(20, 20, 20, 0.08);
8
+ --royui-table-border-strong: rgba(20, 20, 20, 0.14);
9
+ --royui-table-row-hover: rgba(20, 20, 20, 0.025);
10
+ --royui-table-row-stripe: rgba(20, 20, 20, 0.012);
11
+ --royui-table-header-bg: #f7f7f7;
12
+ --royui-table-radius: 12px;
13
+ --royui-table-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
14
+ --royui-table-dur: 140ms;
15
+
16
+ /* Per-zone typography (props override these via inline style) */
17
+ --royui-table-base-font:
18
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
19
+ sans-serif;
20
+ --royui-table-header-font: var(--royui-table-base-font);
21
+ --royui-table-header-size: 12px;
22
+ --royui-table-header-weight: 600;
23
+ --royui-table-header-tracking: 0.02em;
24
+
25
+ --royui-table-row-header-font: var(--royui-table-base-font);
26
+ --royui-table-row-header-size: 13.5px;
27
+ --royui-table-row-header-weight: 600;
28
+ --royui-table-row-header-tracking: -0.005em;
29
+
30
+ --royui-table-cell-font: var(--royui-table-base-font);
31
+ --royui-table-cell-size: 13.5px;
32
+ --royui-table-cell-weight: 400;
33
+ --royui-table-cell-tracking: -0.005em;
34
+
35
+ position: relative;
36
+ color: var(--royui-table-fg);
37
+ background: var(--royui-table-bg);
38
+ border: 1px solid var(--royui-table-border);
39
+ border-radius: var(--royui-table-radius);
40
+ overflow: hidden;
41
+ font-family: var(--royui-table-base-font);
42
+ }
43
+
44
+ .royui-table__scroll {
45
+ position: relative;
46
+ max-height: var(--royui-table-max-h);
47
+ overflow: auto;
48
+ scrollbar-width: thin;
49
+ scrollbar-color: var(--royui-table-border-strong) transparent;
50
+ }
51
+
52
+ /* Fit-columns mode — every column stretches to share the available width,
53
+ cells wrap instead of clipping, and the X scrollbar is suppressed. */
54
+ .royui-table--fit .royui-table__scroll {
55
+ overflow-x: hidden;
56
+ }
57
+ .royui-table--fit .royui-table__th,
58
+ .royui-table--fit .royui-table__td,
59
+ .royui-table--fit .royui-table__row-header {
60
+ white-space: normal;
61
+ word-break: break-word;
62
+ overflow-wrap: anywhere;
63
+ }
64
+
65
+ .royui-table__scroll::-webkit-scrollbar {
66
+ width: 10px;
67
+ height: 10px;
68
+ }
69
+ .royui-table__scroll::-webkit-scrollbar-track {
70
+ background: transparent;
71
+ }
72
+ .royui-table__scroll::-webkit-scrollbar-thumb {
73
+ background: var(--royui-table-border-strong);
74
+ border-radius: 999px;
75
+ border: 2px solid transparent;
76
+ background-clip: padding-box;
77
+ }
78
+ .royui-table__scroll::-webkit-scrollbar-thumb:hover {
79
+ background: var(--royui-table-subtle);
80
+ background-clip: padding-box;
81
+ }
82
+
83
+ .royui-table__table {
84
+ width: 100%;
85
+ border-collapse: separate;
86
+ border-spacing: 0;
87
+ table-layout: fixed;
88
+ }
89
+
90
+ /* ── Header ─────────────────────────────────────────────── */
91
+
92
+ .royui-table__thead .royui-table__tr {
93
+ background: var(--royui-table-header-bg);
94
+ }
95
+
96
+ .royui-table--sticky .royui-table__thead .royui-table__th {
97
+ position: sticky;
98
+ top: 0;
99
+ z-index: 3;
100
+ background: var(--royui-table-header-bg);
101
+ /* second border draws under the sticky row to hide any subpixel seam with
102
+ the first body row as it scrolls underneath. */
103
+ box-shadow: inset 0 -1px 0 0 var(--royui-table-border);
104
+ }
105
+
106
+ .royui-table__th {
107
+ text-align: left;
108
+ font-family: var(--royui-table-header-font);
109
+ font-size: var(--royui-table-header-size);
110
+ font-weight: var(--royui-table-header-weight);
111
+ letter-spacing: var(--royui-table-header-tracking);
112
+ font-feature-settings: var(--royui-table-header-features, normal);
113
+ color: var(--royui-table-muted);
114
+ text-transform: uppercase;
115
+ padding: 12px 14px;
116
+ border-bottom: 1px solid var(--royui-table-border);
117
+ white-space: nowrap;
118
+ vertical-align: middle;
119
+ user-select: none;
120
+ width: var(--royui-col-w, auto);
121
+ }
122
+
123
+ .royui-table__th--right { text-align: right; }
124
+ .royui-table__th--center { text-align: center; }
125
+
126
+ /* ── Body ───────────────────────────────────────────────── */
127
+
128
+ .royui-table__tbody .royui-table__tr {
129
+ transition: background var(--royui-table-dur) var(--royui-table-ease);
130
+ }
131
+ .royui-table__tbody .royui-table__tr:hover {
132
+ background: var(--royui-table-row-hover);
133
+ }
134
+
135
+ .royui-table__td,
136
+ .royui-table__row-header {
137
+ padding: 12px 14px;
138
+ border-bottom: 1px solid var(--royui-table-border);
139
+ vertical-align: middle;
140
+ font-family: var(--royui-table-cell-font);
141
+ font-size: var(--royui-table-cell-size);
142
+ font-weight: var(--royui-table-cell-weight);
143
+ letter-spacing: var(--royui-table-cell-tracking);
144
+ font-feature-settings: var(--royui-table-cell-features, normal);
145
+ color: var(--royui-table-fg);
146
+ text-align: left;
147
+ width: var(--royui-col-w, auto);
148
+ }
149
+
150
+ .royui-table__row-header {
151
+ font-family: var(--royui-table-row-header-font);
152
+ font-size: var(--royui-table-row-header-size);
153
+ font-weight: var(--royui-table-row-header-weight);
154
+ letter-spacing: var(--royui-table-row-header-tracking);
155
+ font-feature-settings: var(--royui-table-row-header-features, normal);
156
+ }
157
+
158
+ .royui-table__td--right { text-align: right; }
159
+ .royui-table__td--center { text-align: center; }
160
+
161
+ .royui-table__tbody .royui-table__tr:last-child .royui-table__td,
162
+ .royui-table__tbody .royui-table__tr:last-child .royui-table__row-header {
163
+ border-bottom: 0;
164
+ }
165
+
166
+ /* Tabular numerals on numeric columns */
167
+ .royui-table__td--num,
168
+ .royui-table__row-header--num {
169
+ font-variant-numeric: tabular-nums;
170
+ }
171
+
172
+ /* ── Density ────────────────────────────────────────────── */
173
+
174
+ .royui-table--compact .royui-table__th,
175
+ .royui-table--compact .royui-table__td,
176
+ .royui-table--compact .royui-table__row-header {
177
+ padding: 8px 12px;
178
+ }
179
+ .royui-table--comfortable .royui-table__th,
180
+ .royui-table--comfortable .royui-table__td,
181
+ .royui-table--comfortable .royui-table__row-header {
182
+ padding: 16px 16px;
183
+ }
184
+
185
+ /* ── Loading + empty ────────────────────────────────────── */
186
+
187
+ .royui-table--loading .royui-table__tbody {
188
+ opacity: 0.55;
189
+ pointer-events: none;
190
+ }
191
+
192
+ .royui-table__loading {
193
+ position: absolute;
194
+ inset: 0;
195
+ display: flex;
196
+ align-items: center;
197
+ justify-content: center;
198
+ pointer-events: none;
199
+ color: var(--royui-table-muted);
200
+ }
201
+
202
+ .royui-table__empty {
203
+ padding: 40px 16px;
204
+ text-align: center;
205
+ color: var(--royui-table-muted);
206
+ font-size: 13.5px;
207
+ }
208
+
209
+ /* ── Spinner ────────────────────────────────────────────── */
210
+
211
+ .royui-spinner {
212
+ display: inline-flex;
213
+ color: inherit;
214
+ }
215
+ .royui-spinner svg {
216
+ animation: royui-spinner-rot 720ms linear infinite;
217
+ }
218
+ @keyframes royui-spinner-rot {
219
+ to { transform: rotate(360deg); }
220
+ }
221
+ @media (prefers-reduced-motion: reduce) {
222
+ .royui-spinner svg { animation-duration: 2400ms; }
223
+ }
224
+
225
+ /* ── Dark scheme ────────────────────────────────────────── */
226
+
227
+ @media (prefers-color-scheme: dark) {
228
+ .royui-table {
229
+ --royui-table-bg: #0d0d0e;
230
+ --royui-table-fg: rgba(255, 255, 255, 0.92);
231
+ --royui-table-muted: rgba(255, 255, 255, 0.55);
232
+ --royui-table-subtle: rgba(255, 255, 255, 0.32);
233
+ --royui-table-border: rgba(255, 255, 255, 0.08);
234
+ --royui-table-border-strong: rgba(255, 255, 255, 0.18);
235
+ --royui-table-row-hover: rgba(255, 255, 255, 0.03);
236
+ --royui-table-row-stripe: rgba(255, 255, 255, 0.015);
237
+ --royui-table-header-bg: #161618;
238
+ }
239
+ }
@@ -0,0 +1,87 @@
1
+ .royui-tablesearch {
2
+ --royui-tablesearch-bg: #ffffff;
3
+ --royui-tablesearch-bg-hover: rgba(20, 20, 20, 0.02);
4
+ --royui-tablesearch-border: rgba(20, 20, 20, 0.12);
5
+ --royui-tablesearch-border-focus: rgba(20, 20, 20, 0.4);
6
+ --royui-tablesearch-fg: rgb(20, 20, 20);
7
+ --royui-tablesearch-placeholder: rgba(20, 20, 20, 0.42);
8
+ --royui-tablesearch-dot: rgba(20, 20, 20, 0.45);
9
+ --royui-tablesearch-clear: rgba(20, 20, 20, 0.5);
10
+ --royui-tablesearch-clear-hover: rgba(20, 20, 20, 0.95);
11
+ --royui-tablesearch-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
12
+
13
+ position: relative;
14
+ display: inline-flex;
15
+ align-items: center;
16
+ height: 34px;
17
+ background: var(--royui-tablesearch-bg);
18
+ border: 1px solid var(--royui-tablesearch-border);
19
+ border-radius: 8px;
20
+ padding: 0 10px;
21
+ transition:
22
+ border-color 140ms var(--royui-tablesearch-ease),
23
+ background 140ms var(--royui-tablesearch-ease);
24
+ }
25
+
26
+ .royui-tablesearch:hover {
27
+ background: var(--royui-tablesearch-bg-hover);
28
+ }
29
+
30
+ .royui-tablesearch:focus-within {
31
+ border-color: var(--royui-tablesearch-border-focus);
32
+ }
33
+
34
+ .royui-tablesearch__dot {
35
+ width: 5px;
36
+ height: 5px;
37
+ border-radius: 999px;
38
+ background: var(--royui-tablesearch-dot);
39
+ margin-right: 9px;
40
+ flex: 0 0 5px;
41
+ }
42
+
43
+ .royui-tablesearch__input {
44
+ flex: 1;
45
+ min-width: 0;
46
+ height: 100%;
47
+ background: transparent;
48
+ border: 0;
49
+ outline: none;
50
+ color: var(--royui-tablesearch-fg);
51
+ font: inherit;
52
+ font-size: 13.5px;
53
+ letter-spacing: -0.005em;
54
+ }
55
+
56
+ .royui-tablesearch__input::placeholder {
57
+ color: var(--royui-tablesearch-placeholder);
58
+ }
59
+
60
+ .royui-tablesearch__clear {
61
+ margin-left: 8px;
62
+ padding: 0 4px;
63
+ background: transparent;
64
+ border: 0;
65
+ font: inherit;
66
+ font-size: 11.5px;
67
+ color: var(--royui-tablesearch-clear);
68
+ cursor: pointer;
69
+ transition: color 140ms var(--royui-tablesearch-ease);
70
+ }
71
+ .royui-tablesearch__clear:hover {
72
+ color: var(--royui-tablesearch-clear-hover);
73
+ }
74
+
75
+ @media (prefers-color-scheme: dark) {
76
+ .royui-tablesearch {
77
+ --royui-tablesearch-bg: rgba(255, 255, 255, 0.03);
78
+ --royui-tablesearch-bg-hover: rgba(255, 255, 255, 0.05);
79
+ --royui-tablesearch-border: rgba(255, 255, 255, 0.1);
80
+ --royui-tablesearch-border-focus: rgba(255, 255, 255, 0.45);
81
+ --royui-tablesearch-fg: rgba(255, 255, 255, 0.94);
82
+ --royui-tablesearch-placeholder: rgba(255, 255, 255, 0.38);
83
+ --royui-tablesearch-dot: rgba(255, 255, 255, 0.5);
84
+ --royui-tablesearch-clear: rgba(255, 255, 255, 0.5);
85
+ --royui-tablesearch-clear-hover: rgba(255, 255, 255, 0.95);
86
+ }
87
+ }