@ponchia/ui 0.2.2 → 0.3.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.
- package/README.md +93 -46
- package/behaviors/index.d.ts +7 -0
- package/behaviors/index.js +170 -28
- package/classes/index.d.ts +191 -3
- package/classes/index.js +60 -10
- package/css/app.css +42 -42
- package/css/base.css +14 -22
- package/css/content.css +37 -2
- package/css/core.css +5 -5
- package/css/disclosure.css +17 -5
- package/css/forms.css +2 -2
- package/css/navigation.css +16 -85
- package/css/overlay.css +9 -1
- package/css/primitives.css +5 -3
- package/css/site.css +295 -0
- package/css/tokens.css +10 -3
- package/dist/bronto.css +1 -1
- package/dist/css/app.css +1 -0
- package/dist/css/base.css +1 -0
- package/dist/css/content.css +1 -0
- package/dist/css/disclosure.css +1 -0
- package/dist/css/dots.css +1 -0
- package/dist/css/feedback.css +1 -0
- package/dist/css/fonts.css +1 -0
- package/dist/css/forms.css +1 -0
- package/dist/css/motion.css +1 -0
- package/dist/css/navigation.css +1 -0
- package/dist/css/overlay.css +1 -0
- package/dist/css/primitives.css +1 -0
- package/dist/css/site.css +1 -0
- package/dist/css/table.css +1 -0
- package/dist/css/tokens.css +1 -0
- package/package.json +51 -27
- package/shiki/nothing.json +83 -0
- package/tokens/index.d.ts +18 -10
- package/tokens/index.js +4 -2
- package/tokens/index.json +8 -4
- package/tokens/tokens.dtcg.json +22 -8
- package/css/cards.css +0 -336
- package/css/index.css +0 -5
- package/css/layout.css +0 -219
- package/css/responsive.css +0 -157
- package/css/typography.css +0 -139
- package/dist/bronto-core.css +0 -1
package/classes/index.d.ts
CHANGED
|
@@ -1,9 +1,189 @@
|
|
|
1
|
-
/** @ponchia/ui —
|
|
1
|
+
/** @ponchia/ui — GENERATED from classes/index.js by scripts/gen-dts.mjs.
|
|
2
|
+
* Do not edit by hand; run `npm run dts:build`. Drift-checked in CI. */
|
|
2
3
|
|
|
3
4
|
export type ClassValue = string | false | null | undefined | ClassValue[];
|
|
4
5
|
|
|
5
|
-
/** The flat registry of every class @ponchia/ui defines. */
|
|
6
|
-
export declare const cls:
|
|
6
|
+
/** The flat registry of every class @ponchia/ui defines (literal). */
|
|
7
|
+
export declare const cls: {
|
|
8
|
+
readonly button: 'ui-button';
|
|
9
|
+
readonly buttonGhost: 'ui-button--ghost';
|
|
10
|
+
readonly buttonSubtle: 'ui-button--subtle';
|
|
11
|
+
readonly buttonDanger: 'ui-button--danger';
|
|
12
|
+
readonly buttonIcon: 'ui-button--icon';
|
|
13
|
+
readonly card: 'ui-card';
|
|
14
|
+
readonly cardHead: 'ui-card__head';
|
|
15
|
+
readonly cardAccent: 'ui-card--accent';
|
|
16
|
+
readonly cardInteractive: 'ui-card--interactive';
|
|
17
|
+
readonly badge: 'ui-badge';
|
|
18
|
+
readonly badgeAccent: 'ui-badge--accent';
|
|
19
|
+
readonly badgeSuccess: 'ui-badge--success';
|
|
20
|
+
readonly badgeWarning: 'ui-badge--warning';
|
|
21
|
+
readonly badgeDanger: 'ui-badge--danger';
|
|
22
|
+
readonly chip: 'ui-chip';
|
|
23
|
+
readonly chipAccent: 'ui-chip--accent';
|
|
24
|
+
readonly link: 'ui-link';
|
|
25
|
+
readonly linkArrow: 'ui-link--arrow';
|
|
26
|
+
readonly keyValue: 'ui-key-value';
|
|
27
|
+
readonly dot: 'ui-dot';
|
|
28
|
+
readonly dotAccent: 'ui-dot--accent';
|
|
29
|
+
readonly dotSuccess: 'ui-dot--success';
|
|
30
|
+
readonly dotWarning: 'ui-dot--warning';
|
|
31
|
+
readonly dotDanger: 'ui-dot--danger';
|
|
32
|
+
readonly dotLive: 'ui-dot--live';
|
|
33
|
+
readonly dotgrid: 'ui-dotgrid';
|
|
34
|
+
readonly dotgridAccent: 'ui-dotgrid--accent';
|
|
35
|
+
readonly dotgridDense: 'ui-dotgrid--dense';
|
|
36
|
+
readonly dotfield: 'ui-dotfield';
|
|
37
|
+
readonly dotrule: 'ui-dotrule';
|
|
38
|
+
readonly dotbar: 'ui-dotbar';
|
|
39
|
+
readonly dotbarIndeterminate: 'ui-dotbar--indeterminate';
|
|
40
|
+
readonly dotloader: 'ui-dotloader';
|
|
41
|
+
readonly dotspinner: 'ui-dotspinner';
|
|
42
|
+
readonly dotspinnerSm: 'ui-dotspinner--sm';
|
|
43
|
+
readonly dotspinnerLg: 'ui-dotspinner--lg';
|
|
44
|
+
readonly field: 'ui-field';
|
|
45
|
+
readonly label: 'ui-label';
|
|
46
|
+
readonly input: 'ui-input';
|
|
47
|
+
readonly select: 'ui-select';
|
|
48
|
+
readonly textarea: 'ui-textarea';
|
|
49
|
+
readonly search: 'ui-search';
|
|
50
|
+
readonly check: 'ui-check';
|
|
51
|
+
readonly switch: 'ui-switch';
|
|
52
|
+
readonly switchTrack: 'ui-switch__track';
|
|
53
|
+
readonly switchThumb: 'ui-switch__thumb';
|
|
54
|
+
readonly hint: 'ui-hint';
|
|
55
|
+
readonly hintError: 'ui-hint--error';
|
|
56
|
+
readonly alert: 'ui-alert';
|
|
57
|
+
readonly alertTitle: 'ui-alert__title';
|
|
58
|
+
readonly alertBody: 'ui-alert__body';
|
|
59
|
+
readonly alertDismiss: 'ui-alert__dismiss';
|
|
60
|
+
readonly alertAccent: 'ui-alert--accent';
|
|
61
|
+
readonly alertSuccess: 'ui-alert--success';
|
|
62
|
+
readonly alertWarning: 'ui-alert--warning';
|
|
63
|
+
readonly alertDanger: 'ui-alert--danger';
|
|
64
|
+
readonly toastStack: 'ui-toast-stack';
|
|
65
|
+
readonly toast: 'ui-toast';
|
|
66
|
+
readonly toastTitle: 'ui-toast__title';
|
|
67
|
+
readonly toastAccent: 'ui-toast--accent';
|
|
68
|
+
readonly toastSuccess: 'ui-toast--success';
|
|
69
|
+
readonly toastWarning: 'ui-toast--warning';
|
|
70
|
+
readonly toastDanger: 'ui-toast--danger';
|
|
71
|
+
readonly tooltip: 'ui-tooltip';
|
|
72
|
+
readonly tooltipBubble: 'ui-tooltip__bubble';
|
|
73
|
+
readonly progress: 'ui-progress';
|
|
74
|
+
readonly progressBar: 'ui-progress__bar';
|
|
75
|
+
readonly progressIndeterminate: 'ui-progress--indeterminate';
|
|
76
|
+
readonly modal: 'ui-modal';
|
|
77
|
+
readonly modalHead: 'ui-modal__head';
|
|
78
|
+
readonly modalTitle: 'ui-modal__title';
|
|
79
|
+
readonly modalBody: 'ui-modal__body';
|
|
80
|
+
readonly modalFoot: 'ui-modal__foot';
|
|
81
|
+
readonly modalClose: 'ui-modal__close';
|
|
82
|
+
readonly modalDrawer: 'ui-modal--drawer';
|
|
83
|
+
readonly menuHost: 'ui-menu-host';
|
|
84
|
+
readonly menu: 'ui-menu';
|
|
85
|
+
readonly menuLabel: 'ui-menu__label';
|
|
86
|
+
readonly menuItem: 'ui-menu__item';
|
|
87
|
+
readonly menuSep: 'ui-menu__sep';
|
|
88
|
+
readonly tabs: 'ui-tabs';
|
|
89
|
+
readonly tabsList: 'ui-tabs__list';
|
|
90
|
+
readonly tab: 'ui-tab';
|
|
91
|
+
readonly tabsPanel: 'ui-tabs__panel';
|
|
92
|
+
readonly accordion: 'ui-accordion';
|
|
93
|
+
readonly accordionItem: 'ui-accordion__item';
|
|
94
|
+
readonly accordionSummary: 'ui-accordion__summary';
|
|
95
|
+
readonly accordionBody: 'ui-accordion__body';
|
|
96
|
+
readonly segmented: 'ui-segmented';
|
|
97
|
+
readonly segmentedOption: 'ui-segmented__option';
|
|
98
|
+
readonly breadcrumb: 'ui-breadcrumb';
|
|
99
|
+
readonly breadcrumbItem: 'ui-breadcrumb__item';
|
|
100
|
+
readonly pagination: 'ui-pagination';
|
|
101
|
+
readonly paginationItem: 'ui-pagination__item';
|
|
102
|
+
readonly avatar: 'ui-avatar';
|
|
103
|
+
readonly avatarSm: 'ui-avatar--sm';
|
|
104
|
+
readonly avatarLg: 'ui-avatar--lg';
|
|
105
|
+
readonly avatarGroup: 'ui-avatar-group';
|
|
106
|
+
readonly table: 'ui-table';
|
|
107
|
+
readonly tableDense: 'ui-table--dense';
|
|
108
|
+
readonly tableComfortable: 'ui-table--comfortable';
|
|
109
|
+
readonly tableLined: 'ui-table--lined';
|
|
110
|
+
readonly tableWrap: 'ui-table-wrap';
|
|
111
|
+
readonly tableEmpty: 'ui-table__empty';
|
|
112
|
+
readonly panel: 'ui-panel';
|
|
113
|
+
readonly panelHead: 'ui-panel__head';
|
|
114
|
+
readonly surface: 'ui-surface';
|
|
115
|
+
readonly stack: 'ui-stack';
|
|
116
|
+
readonly cluster: 'ui-cluster';
|
|
117
|
+
readonly clusterBetween: 'ui-cluster--between';
|
|
118
|
+
readonly grid: 'ui-grid';
|
|
119
|
+
readonly divider: 'ui-divider';
|
|
120
|
+
readonly status: 'ui-status';
|
|
121
|
+
readonly eyebrow: 'ui-eyebrow';
|
|
122
|
+
readonly eyebrowMuted: 'ui-eyebrow--muted';
|
|
123
|
+
readonly prose: 'ui-prose';
|
|
124
|
+
readonly proseCompact: 'ui-prose--compact';
|
|
125
|
+
readonly quote: 'ui-quote';
|
|
126
|
+
readonly quoteCite: 'ui-quote__cite';
|
|
127
|
+
readonly container: 'ui-container';
|
|
128
|
+
readonly containerNarrow: 'ui-container--narrow';
|
|
129
|
+
readonly skiplink: 'ui-skiplink';
|
|
130
|
+
readonly siteheader: 'ui-siteheader';
|
|
131
|
+
readonly siteheaderBrand: 'ui-siteheader__brand';
|
|
132
|
+
readonly siteheaderActions: 'ui-siteheader__actions';
|
|
133
|
+
readonly sitenav: 'ui-sitenav';
|
|
134
|
+
readonly sitemenu: 'ui-sitemenu';
|
|
135
|
+
readonly sitemenuPanel: 'ui-sitemenu__panel';
|
|
136
|
+
readonly sitefooter: 'ui-sitefooter';
|
|
137
|
+
readonly sitefooterLinks: 'ui-sitefooter__links';
|
|
138
|
+
readonly tags: 'ui-tags';
|
|
139
|
+
readonly tag: 'ui-tag';
|
|
140
|
+
readonly tagAccent: 'ui-tag--accent';
|
|
141
|
+
readonly meta: 'ui-meta';
|
|
142
|
+
readonly metaItem: 'ui-meta__item';
|
|
143
|
+
readonly display: 'ui-display';
|
|
144
|
+
readonly mono: 'ui-mono';
|
|
145
|
+
readonly muted: 'ui-muted';
|
|
146
|
+
readonly visuallyHidden: 'ui-visually-hidden';
|
|
147
|
+
readonly reveal: 'ui-reveal';
|
|
148
|
+
readonly stagger: 'ui-stagger';
|
|
149
|
+
readonly staggerAuto: 'ui-stagger--auto';
|
|
150
|
+
readonly matrix: 'ui-matrix';
|
|
151
|
+
readonly skeleton: 'ui-skeleton';
|
|
152
|
+
readonly spinner: 'ui-spinner';
|
|
153
|
+
readonly caret: 'ui-caret';
|
|
154
|
+
readonly animateIn: 'ui-animate-in';
|
|
155
|
+
readonly animateFade: 'ui-animate-fade';
|
|
156
|
+
readonly animateDot: 'ui-animate-dot';
|
|
157
|
+
readonly animateMatrix: 'ui-animate-matrix';
|
|
158
|
+
readonly appShell: 'ui-app-shell';
|
|
159
|
+
readonly appShellFull: 'ui-app-shell--full';
|
|
160
|
+
readonly appRail: 'ui-app-rail';
|
|
161
|
+
readonly appRailBrand: 'ui-app-rail__brand';
|
|
162
|
+
readonly appRailToggle: 'ui-app-rail__toggle';
|
|
163
|
+
readonly appRailFoot: 'ui-app-rail__foot';
|
|
164
|
+
readonly appTopbar: 'ui-app-topbar';
|
|
165
|
+
readonly appTopbarTitle: 'ui-app-topbar__title';
|
|
166
|
+
readonly appToolbar: 'ui-app-toolbar';
|
|
167
|
+
readonly appToolbarGroup: 'ui-app-toolbar__group';
|
|
168
|
+
readonly appNav: 'ui-app-nav';
|
|
169
|
+
readonly appNavSection: 'ui-app-nav__section';
|
|
170
|
+
readonly appMain: 'ui-app-main';
|
|
171
|
+
readonly appContent: 'ui-app-content';
|
|
172
|
+
readonly appPanel: 'ui-app-panel';
|
|
173
|
+
readonly appPanelHead: 'ui-app-panel__head';
|
|
174
|
+
readonly appPanelTitle: 'ui-app-panel__title';
|
|
175
|
+
readonly appMetrics: 'ui-app-metrics';
|
|
176
|
+
readonly appMetric: 'ui-app-metric';
|
|
177
|
+
readonly appMetricLabel: 'ui-app-metric__label';
|
|
178
|
+
readonly appMetricValue: 'ui-app-metric__value';
|
|
179
|
+
readonly appMetricDelta: 'ui-app-metric__delta';
|
|
180
|
+
readonly appEmptyState: 'ui-app-empty-state';
|
|
181
|
+
readonly themetoggleButton: 'ui-themetoggle__button';
|
|
182
|
+
readonly themetogglePrefix: 'ui-themetoggle__prefix';
|
|
183
|
+
readonly themetoggleLabel: 'ui-themetoggle__label';
|
|
184
|
+
readonly themetoggleTrack: 'ui-themetoggle__track';
|
|
185
|
+
readonly themetoggleThumb: 'ui-themetoggle__thumb';
|
|
186
|
+
};
|
|
7
187
|
|
|
8
188
|
/** classnames-style joiner: skips falsy, flattens arrays. */
|
|
9
189
|
export declare function cx(...parts: ClassValue[]): string;
|
|
@@ -77,6 +257,12 @@ export interface AvatarOpts {
|
|
|
77
257
|
export interface ProseOpts {
|
|
78
258
|
compact?: boolean;
|
|
79
259
|
}
|
|
260
|
+
export interface ContainerOpts {
|
|
261
|
+
narrow?: boolean;
|
|
262
|
+
}
|
|
263
|
+
export interface TagOpts {
|
|
264
|
+
accent?: boolean;
|
|
265
|
+
}
|
|
80
266
|
|
|
81
267
|
export interface Ui {
|
|
82
268
|
button(opts?: ButtonOpts): string;
|
|
@@ -100,6 +286,8 @@ export interface Ui {
|
|
|
100
286
|
tab(opts?: TabOpts): string;
|
|
101
287
|
avatar(opts?: AvatarOpts): string;
|
|
102
288
|
prose(opts?: ProseOpts): string;
|
|
289
|
+
container(opts?: ContainerOpts): string;
|
|
290
|
+
tag(opts?: TagOpts): string;
|
|
103
291
|
}
|
|
104
292
|
|
|
105
293
|
export declare const ui: Ui;
|
package/classes/index.js
CHANGED
|
@@ -97,6 +97,7 @@ export const cls = Object.freeze({
|
|
|
97
97
|
modalFoot: 'ui-modal__foot',
|
|
98
98
|
modalClose: 'ui-modal__close',
|
|
99
99
|
modalDrawer: 'ui-modal--drawer',
|
|
100
|
+
menuHost: 'ui-menu-host',
|
|
100
101
|
menu: 'ui-menu',
|
|
101
102
|
menuLabel: 'ui-menu__label',
|
|
102
103
|
menuItem: 'ui-menu__item',
|
|
@@ -142,6 +143,25 @@ export const cls = Object.freeze({
|
|
|
142
143
|
eyebrowMuted: 'ui-eyebrow--muted',
|
|
143
144
|
prose: 'ui-prose',
|
|
144
145
|
proseCompact: 'ui-prose--compact',
|
|
146
|
+
quote: 'ui-quote',
|
|
147
|
+
quoteCite: 'ui-quote__cite',
|
|
148
|
+
// site shell
|
|
149
|
+
container: 'ui-container',
|
|
150
|
+
containerNarrow: 'ui-container--narrow',
|
|
151
|
+
skiplink: 'ui-skiplink',
|
|
152
|
+
siteheader: 'ui-siteheader',
|
|
153
|
+
siteheaderBrand: 'ui-siteheader__brand',
|
|
154
|
+
siteheaderActions: 'ui-siteheader__actions',
|
|
155
|
+
sitenav: 'ui-sitenav',
|
|
156
|
+
sitemenu: 'ui-sitemenu',
|
|
157
|
+
sitemenuPanel: 'ui-sitemenu__panel',
|
|
158
|
+
sitefooter: 'ui-sitefooter',
|
|
159
|
+
sitefooterLinks: 'ui-sitefooter__links',
|
|
160
|
+
tags: 'ui-tags',
|
|
161
|
+
tag: 'ui-tag',
|
|
162
|
+
tagAccent: 'ui-tag--accent',
|
|
163
|
+
meta: 'ui-meta',
|
|
164
|
+
metaItem: 'ui-meta__item',
|
|
145
165
|
display: 'ui-display',
|
|
146
166
|
mono: 'ui-mono',
|
|
147
167
|
muted: 'ui-muted',
|
|
@@ -158,6 +178,36 @@ export const cls = Object.freeze({
|
|
|
158
178
|
animateFade: 'ui-animate-fade',
|
|
159
179
|
animateDot: 'ui-animate-dot',
|
|
160
180
|
animateMatrix: 'ui-animate-matrix',
|
|
181
|
+
// admin shell (was the legacy .app-* vocabulary; promoted in 0.3.0)
|
|
182
|
+
appShell: 'ui-app-shell',
|
|
183
|
+
appShellFull: 'ui-app-shell--full',
|
|
184
|
+
appRail: 'ui-app-rail',
|
|
185
|
+
appRailBrand: 'ui-app-rail__brand',
|
|
186
|
+
appRailToggle: 'ui-app-rail__toggle',
|
|
187
|
+
appRailFoot: 'ui-app-rail__foot',
|
|
188
|
+
appTopbar: 'ui-app-topbar',
|
|
189
|
+
appTopbarTitle: 'ui-app-topbar__title',
|
|
190
|
+
appToolbar: 'ui-app-toolbar',
|
|
191
|
+
appToolbarGroup: 'ui-app-toolbar__group',
|
|
192
|
+
appNav: 'ui-app-nav',
|
|
193
|
+
appNavSection: 'ui-app-nav__section',
|
|
194
|
+
appMain: 'ui-app-main',
|
|
195
|
+
appContent: 'ui-app-content',
|
|
196
|
+
appPanel: 'ui-app-panel',
|
|
197
|
+
appPanelHead: 'ui-app-panel__head',
|
|
198
|
+
appPanelTitle: 'ui-app-panel__title',
|
|
199
|
+
appMetrics: 'ui-app-metrics',
|
|
200
|
+
appMetric: 'ui-app-metric',
|
|
201
|
+
appMetricLabel: 'ui-app-metric__label',
|
|
202
|
+
appMetricValue: 'ui-app-metric__value',
|
|
203
|
+
appMetricDelta: 'ui-app-metric__delta',
|
|
204
|
+
appEmptyState: 'ui-app-empty-state',
|
|
205
|
+
// theme toggle (was the legacy .theme-toggle__* vocabulary)
|
|
206
|
+
themetoggleButton: 'ui-themetoggle__button',
|
|
207
|
+
themetogglePrefix: 'ui-themetoggle__prefix',
|
|
208
|
+
themetoggleLabel: 'ui-themetoggle__label',
|
|
209
|
+
themetoggleTrack: 'ui-themetoggle__track',
|
|
210
|
+
themetoggleThumb: 'ui-themetoggle__thumb',
|
|
161
211
|
});
|
|
162
212
|
|
|
163
213
|
/** classnames-style joiner: skips falsy, flattens nested arrays of any depth. */
|
|
@@ -176,7 +226,7 @@ export const ui = {
|
|
|
176
226
|
variant === 'ghost' && cls.buttonGhost,
|
|
177
227
|
variant === 'subtle' && cls.buttonSubtle,
|
|
178
228
|
variant === 'danger' && cls.buttonDanger,
|
|
179
|
-
icon && cls.buttonIcon
|
|
229
|
+
icon && cls.buttonIcon,
|
|
180
230
|
),
|
|
181
231
|
card: ({ accent, interactive } = {}) =>
|
|
182
232
|
j(cls.card, accent && cls.cardAccent, interactive && cls.cardInteractive),
|
|
@@ -186,7 +236,7 @@ export const ui = {
|
|
|
186
236
|
tone === 'accent' && cls.badgeAccent,
|
|
187
237
|
tone === 'success' && cls.badgeSuccess,
|
|
188
238
|
tone === 'warning' && cls.badgeWarning,
|
|
189
|
-
tone === 'danger' && cls.badgeDanger
|
|
239
|
+
tone === 'danger' && cls.badgeDanger,
|
|
190
240
|
),
|
|
191
241
|
chip: ({ accent } = {}) => j(cls.chip, accent && cls.chipAccent),
|
|
192
242
|
link: ({ arrow } = {}) => j(cls.link, arrow && cls.linkArrow),
|
|
@@ -197,7 +247,7 @@ export const ui = {
|
|
|
197
247
|
tone === 'success' && cls.dotSuccess,
|
|
198
248
|
tone === 'warning' && cls.dotWarning,
|
|
199
249
|
tone === 'danger' && cls.dotDanger,
|
|
200
|
-
live && cls.dotLive
|
|
250
|
+
live && cls.dotLive,
|
|
201
251
|
),
|
|
202
252
|
dotgrid: ({ accent, dense } = {}) =>
|
|
203
253
|
j(cls.dotgrid, accent && cls.dotgridAccent, dense && cls.dotgridDense),
|
|
@@ -206,7 +256,7 @@ export const ui = {
|
|
|
206
256
|
cls.table,
|
|
207
257
|
density === 'dense' && cls.tableDense,
|
|
208
258
|
density === 'comfortable' && cls.tableComfortable,
|
|
209
|
-
lined && cls.tableLined
|
|
259
|
+
lined && cls.tableLined,
|
|
210
260
|
),
|
|
211
261
|
eyebrow: ({ muted } = {}) => j(cls.eyebrow, muted && cls.eyebrowMuted),
|
|
212
262
|
hint: ({ error } = {}) => j(cls.hint, error && cls.hintError),
|
|
@@ -218,7 +268,7 @@ export const ui = {
|
|
|
218
268
|
tone === 'accent' && cls.alertAccent,
|
|
219
269
|
tone === 'success' && cls.alertSuccess,
|
|
220
270
|
tone === 'warning' && cls.alertWarning,
|
|
221
|
-
tone === 'danger' && cls.alertDanger
|
|
271
|
+
tone === 'danger' && cls.alertDanger,
|
|
222
272
|
),
|
|
223
273
|
toast: ({ tone } = {}) =>
|
|
224
274
|
j(
|
|
@@ -226,19 +276,19 @@ export const ui = {
|
|
|
226
276
|
tone === 'accent' && cls.toastAccent,
|
|
227
277
|
tone === 'success' && cls.toastSuccess,
|
|
228
278
|
tone === 'warning' && cls.toastWarning,
|
|
229
|
-
tone === 'danger' && cls.toastDanger
|
|
279
|
+
tone === 'danger' && cls.toastDanger,
|
|
230
280
|
),
|
|
231
|
-
progress: ({ indeterminate } = {}) =>
|
|
232
|
-
j(cls.progress, indeterminate && cls.progressIndeterminate),
|
|
281
|
+
progress: ({ indeterminate } = {}) => j(cls.progress, indeterminate && cls.progressIndeterminate),
|
|
233
282
|
dotspinner: ({ size } = {}) =>
|
|
234
283
|
j(cls.dotspinner, size === 'sm' && cls.dotspinnerSm, size === 'lg' && cls.dotspinnerLg),
|
|
235
|
-
dotbar: ({ indeterminate } = {}) =>
|
|
236
|
-
j(cls.dotbar, indeterminate && cls.dotbarIndeterminate),
|
|
284
|
+
dotbar: ({ indeterminate } = {}) => j(cls.dotbar, indeterminate && cls.dotbarIndeterminate),
|
|
237
285
|
modal: ({ drawer } = {}) => j(cls.modal, drawer && cls.modalDrawer),
|
|
238
286
|
tab: ({ active } = {}) => j(cls.tab, active && 'is-active'),
|
|
239
287
|
avatar: ({ size } = {}) =>
|
|
240
288
|
j(cls.avatar, size === 'sm' && cls.avatarSm, size === 'lg' && cls.avatarLg),
|
|
241
289
|
prose: ({ compact } = {}) => j(cls.prose, compact && cls.proseCompact),
|
|
290
|
+
container: ({ narrow } = {}) => j(cls.container, narrow && cls.containerNarrow),
|
|
291
|
+
tag: ({ accent } = {}) => j(cls.tag, accent && cls.tagAccent),
|
|
242
292
|
};
|
|
243
293
|
|
|
244
294
|
export default ui;
|
package/css/app.css
CHANGED
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
For admin / operator dashboards.
|
|
4
4
|
========================================================================== */
|
|
5
5
|
|
|
6
|
-
.app-shell {
|
|
6
|
+
.ui-app-shell {
|
|
7
7
|
display: grid;
|
|
8
8
|
grid-template-columns: var(--app-rail, 14rem) minmax(0, 1fr);
|
|
9
9
|
min-block-size: 100vh;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.app-shell--full {
|
|
12
|
+
.ui-app-shell--full {
|
|
13
13
|
grid-template-columns: minmax(0, 1fr);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/* --- Sidebar rail --- */
|
|
17
17
|
|
|
18
|
-
.app-rail {
|
|
18
|
+
.ui-app-rail {
|
|
19
19
|
background: var(--panel);
|
|
20
20
|
border-inline-end: 1px solid var(--line);
|
|
21
21
|
display: flex;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
overflow-y: auto;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.app-rail__brand {
|
|
31
|
+
.ui-app-rail__brand {
|
|
32
32
|
align-items: center;
|
|
33
33
|
color: var(--text);
|
|
34
34
|
display: flex;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
text-transform: uppercase;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
.app-rail__brand::before {
|
|
43
|
+
.ui-app-rail__brand::before {
|
|
44
44
|
background: var(--accent);
|
|
45
45
|
border-radius: 50%;
|
|
46
46
|
content: '';
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
inline-size: 0.5rem;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.app-nav {
|
|
51
|
+
.ui-app-nav {
|
|
52
52
|
display: grid;
|
|
53
53
|
gap: 0.15rem;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.app-nav__section {
|
|
56
|
+
.ui-app-nav__section {
|
|
57
57
|
color: var(--text-dim);
|
|
58
58
|
font-family: var(--mono);
|
|
59
59
|
font-size: var(--text-2xs);
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
text-transform: uppercase;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.app-nav a {
|
|
66
|
+
.ui-app-nav a {
|
|
67
67
|
align-items: center;
|
|
68
68
|
border-inline-start: 2px solid transparent;
|
|
69
69
|
color: var(--text-soft);
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
color var(--duration-fast) var(--ease-standard);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.app-nav a::before {
|
|
81
|
+
.ui-app-nav a::before {
|
|
82
82
|
background: currentColor;
|
|
83
83
|
border-radius: 50%;
|
|
84
84
|
content: '';
|
|
@@ -87,22 +87,22 @@
|
|
|
87
87
|
inline-size: 0.34rem;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
.app-nav a:hover {
|
|
90
|
+
.ui-app-nav a:hover {
|
|
91
91
|
background: var(--bg-accent);
|
|
92
92
|
color: var(--text);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.app-nav a.is-active {
|
|
95
|
+
.ui-app-nav a.is-active {
|
|
96
96
|
background: var(--accent-soft);
|
|
97
97
|
border-inline-start-color: var(--accent);
|
|
98
|
-
color: var(--accent);
|
|
98
|
+
color: var(--accent-text);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
.app-nav a.is-active::before {
|
|
101
|
+
.ui-app-nav a.is-active::before {
|
|
102
102
|
opacity: 1;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
.app-rail__foot {
|
|
105
|
+
.ui-app-rail__foot {
|
|
106
106
|
border-block-start: 1px solid var(--line);
|
|
107
107
|
color: var(--text-dim);
|
|
108
108
|
font-family: var(--mono);
|
|
@@ -113,13 +113,13 @@
|
|
|
113
113
|
|
|
114
114
|
/* --- Main column --- */
|
|
115
115
|
|
|
116
|
-
.app-main {
|
|
116
|
+
.ui-app-main {
|
|
117
117
|
display: flex;
|
|
118
118
|
flex-direction: column;
|
|
119
119
|
min-inline-size: 0;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
.app-topbar {
|
|
122
|
+
.ui-app-topbar {
|
|
123
123
|
align-items: center;
|
|
124
124
|
background: color-mix(in srgb, var(--bg) 86%, transparent);
|
|
125
125
|
backdrop-filter: blur(8px);
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
z-index: 10;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
.app-topbar__title {
|
|
136
|
+
.ui-app-topbar__title {
|
|
137
137
|
color: var(--text);
|
|
138
138
|
font-family: var(--display);
|
|
139
139
|
font-size: 1.1rem;
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
text-transform: uppercase;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
.app-content {
|
|
145
|
+
.ui-app-content {
|
|
146
146
|
display: grid;
|
|
147
147
|
gap: var(--space-lg);
|
|
148
148
|
padding: var(--space-lg);
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
|
|
151
151
|
/* --- Toolbar --- */
|
|
152
152
|
|
|
153
|
-
.app-toolbar {
|
|
153
|
+
.ui-app-toolbar {
|
|
154
154
|
align-items: center;
|
|
155
155
|
background: var(--panel);
|
|
156
156
|
border: 1px solid var(--line);
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
padding: 0.7rem 0.85rem;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
.app-toolbar__group {
|
|
165
|
+
.ui-app-toolbar__group {
|
|
166
166
|
align-items: center;
|
|
167
167
|
display: flex;
|
|
168
168
|
flex-wrap: wrap;
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
|
|
172
172
|
/* --- Panel --- */
|
|
173
173
|
|
|
174
|
-
.app-panel {
|
|
174
|
+
.ui-app-panel {
|
|
175
175
|
background: var(--panel);
|
|
176
176
|
border: 1px solid var(--line);
|
|
177
177
|
border-radius: var(--radius-md);
|
|
@@ -180,14 +180,14 @@
|
|
|
180
180
|
padding: var(--space-md);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
.app-panel__head {
|
|
183
|
+
.ui-app-panel__head {
|
|
184
184
|
align-items: flex-start;
|
|
185
185
|
display: flex;
|
|
186
186
|
gap: 0.7rem;
|
|
187
187
|
justify-content: space-between;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
.app-panel__title {
|
|
190
|
+
.ui-app-panel__title {
|
|
191
191
|
color: var(--text);
|
|
192
192
|
font-family: var(--display);
|
|
193
193
|
font-size: 0.95rem;
|
|
@@ -196,21 +196,21 @@
|
|
|
196
196
|
text-transform: uppercase;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
.app-panel__head p,
|
|
200
|
-
.app-empty-state p {
|
|
199
|
+
.ui-app-panel__head p,
|
|
200
|
+
.ui-app-empty-state p {
|
|
201
201
|
color: var(--text-dim);
|
|
202
202
|
margin: 0.3rem 0 0;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
/* --- Metric tiles --- */
|
|
206
206
|
|
|
207
|
-
.app-metrics {
|
|
207
|
+
.ui-app-metrics {
|
|
208
208
|
display: grid;
|
|
209
209
|
gap: var(--space-md);
|
|
210
210
|
grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
.app-metric {
|
|
213
|
+
.ui-app-metric {
|
|
214
214
|
background: var(--panel);
|
|
215
215
|
border: 1px solid var(--line);
|
|
216
216
|
border-radius: var(--radius-md);
|
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
padding: var(--space-md);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
.app-metric__label {
|
|
222
|
+
.ui-app-metric__label {
|
|
223
223
|
color: var(--text-dim);
|
|
224
224
|
font-family: var(--mono);
|
|
225
225
|
font-size: var(--text-2xs);
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
text-transform: uppercase;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
.app-metric__value {
|
|
230
|
+
.ui-app-metric__value {
|
|
231
231
|
color: var(--text);
|
|
232
232
|
font-family: var(--display);
|
|
233
233
|
font-size: 1.9rem;
|
|
@@ -236,22 +236,22 @@
|
|
|
236
236
|
line-height: 1;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
.app-metric__delta {
|
|
239
|
+
.ui-app-metric__delta {
|
|
240
240
|
font-family: var(--mono);
|
|
241
241
|
font-size: var(--text-xs);
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
.app-metric__delta.is-pos {
|
|
244
|
+
.ui-app-metric__delta.is-pos {
|
|
245
245
|
color: var(--success);
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
.app-metric__delta.is-neg {
|
|
248
|
+
.ui-app-metric__delta.is-neg {
|
|
249
249
|
color: var(--danger);
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
/* --- Empty state --- */
|
|
253
253
|
|
|
254
|
-
.app-empty-state {
|
|
254
|
+
.ui-app-empty-state {
|
|
255
255
|
border: 1px dashed var(--line-strong);
|
|
256
256
|
border-radius: var(--radius-md);
|
|
257
257
|
color: var(--text-dim);
|
|
@@ -261,16 +261,16 @@
|
|
|
261
261
|
|
|
262
262
|
/* --- Mobile rail collapse --- */
|
|
263
263
|
|
|
264
|
-
.app-rail__toggle {
|
|
264
|
+
.ui-app-rail__toggle {
|
|
265
265
|
display: none;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
@media (max-width: 880px) {
|
|
269
|
-
.app-shell {
|
|
269
|
+
.ui-app-shell {
|
|
270
270
|
grid-template-columns: minmax(0, 1fr);
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
.app-rail {
|
|
273
|
+
.ui-app-rail {
|
|
274
274
|
flex-direction: row;
|
|
275
275
|
block-size: auto;
|
|
276
276
|
overflow-x: auto;
|
|
@@ -279,31 +279,31 @@
|
|
|
279
279
|
z-index: 11;
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
-
.app-rail__foot {
|
|
282
|
+
.ui-app-rail__foot {
|
|
283
283
|
display: none;
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
.app-nav {
|
|
286
|
+
.ui-app-nav {
|
|
287
287
|
grid-auto-flow: column;
|
|
288
288
|
gap: 0.15rem;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
.app-nav__section {
|
|
291
|
+
.ui-app-nav__section {
|
|
292
292
|
display: none;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
.app-nav a {
|
|
295
|
+
.ui-app-nav a {
|
|
296
296
|
border-inline-start: 0;
|
|
297
297
|
border-block-end: 2px solid transparent;
|
|
298
298
|
white-space: nowrap;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
.app-nav a.is-active {
|
|
301
|
+
.ui-app-nav a.is-active {
|
|
302
302
|
border-inline-start: 0;
|
|
303
303
|
border-block-end-color: var(--accent);
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
.app-content {
|
|
306
|
+
.ui-app-content {
|
|
307
307
|
padding: var(--space-md);
|
|
308
308
|
}
|
|
309
309
|
}
|