@ponchia/ui 0.2.1 → 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 +128 -54
- package/behaviors/index.d.ts +36 -0
- package/behaviors/index.js +321 -7
- package/classes/index.d.ts +228 -3
- package/classes/index.js +139 -4
- package/css/app.css +64 -64
- package/css/base.css +136 -24
- package/css/content.css +324 -0
- package/css/core.css +9 -5
- package/css/disclosure.css +323 -0
- package/css/dots.css +125 -8
- package/css/feedback.css +243 -0
- package/css/fonts.css +11 -0
- package/css/forms.css +41 -14
- package/css/motion.css +29 -5
- package/css/navigation.css +22 -86
- package/css/overlay.css +206 -0
- package/css/primitives.css +37 -18
- package/css/site.css +295 -0
- package/css/table.css +9 -9
- package/css/tokens.css +84 -20
- package/dist/bronto.css +1 -0
- 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 +62 -21
- package/shiki/nothing.json +83 -0
- package/tokens/index.d.ts +18 -10
- package/tokens/index.js +16 -14
- package/tokens/index.json +32 -28
- package/tokens/tokens.dtcg.json +589 -0
- 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/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;
|
|
@@ -49,6 +229,40 @@ export interface ClusterOpts {
|
|
|
49
229
|
export interface StaggerOpts {
|
|
50
230
|
auto?: boolean;
|
|
51
231
|
}
|
|
232
|
+
export type Tone = 'accent' | 'success' | 'warning' | 'danger';
|
|
233
|
+
export interface AlertOpts {
|
|
234
|
+
tone?: Tone;
|
|
235
|
+
}
|
|
236
|
+
export interface ToastOpts {
|
|
237
|
+
tone?: Tone;
|
|
238
|
+
}
|
|
239
|
+
export interface ProgressOpts {
|
|
240
|
+
indeterminate?: boolean;
|
|
241
|
+
}
|
|
242
|
+
export interface DotspinnerOpts {
|
|
243
|
+
size?: 'sm' | 'lg';
|
|
244
|
+
}
|
|
245
|
+
export interface DotbarOpts {
|
|
246
|
+
indeterminate?: boolean;
|
|
247
|
+
}
|
|
248
|
+
export interface ModalOpts {
|
|
249
|
+
drawer?: boolean;
|
|
250
|
+
}
|
|
251
|
+
export interface TabOpts {
|
|
252
|
+
active?: boolean;
|
|
253
|
+
}
|
|
254
|
+
export interface AvatarOpts {
|
|
255
|
+
size?: 'sm' | 'lg';
|
|
256
|
+
}
|
|
257
|
+
export interface ProseOpts {
|
|
258
|
+
compact?: boolean;
|
|
259
|
+
}
|
|
260
|
+
export interface ContainerOpts {
|
|
261
|
+
narrow?: boolean;
|
|
262
|
+
}
|
|
263
|
+
export interface TagOpts {
|
|
264
|
+
accent?: boolean;
|
|
265
|
+
}
|
|
52
266
|
|
|
53
267
|
export interface Ui {
|
|
54
268
|
button(opts?: ButtonOpts): string;
|
|
@@ -63,6 +277,17 @@ export interface Ui {
|
|
|
63
277
|
hint(opts?: HintOpts): string;
|
|
64
278
|
cluster(opts?: ClusterOpts): string;
|
|
65
279
|
stagger(opts?: StaggerOpts): string;
|
|
280
|
+
alert(opts?: AlertOpts): string;
|
|
281
|
+
toast(opts?: ToastOpts): string;
|
|
282
|
+
progress(opts?: ProgressOpts): string;
|
|
283
|
+
dotspinner(opts?: DotspinnerOpts): string;
|
|
284
|
+
dotbar(opts?: DotbarOpts): string;
|
|
285
|
+
modal(opts?: ModalOpts): string;
|
|
286
|
+
tab(opts?: TabOpts): string;
|
|
287
|
+
avatar(opts?: AvatarOpts): string;
|
|
288
|
+
prose(opts?: ProseOpts): string;
|
|
289
|
+
container(opts?: ContainerOpts): string;
|
|
290
|
+
tag(opts?: TagOpts): string;
|
|
66
291
|
}
|
|
67
292
|
|
|
68
293
|
export declare const ui: Ui;
|
package/classes/index.js
CHANGED
|
@@ -50,7 +50,11 @@ export const cls = Object.freeze({
|
|
|
50
50
|
dotfield: 'ui-dotfield',
|
|
51
51
|
dotrule: 'ui-dotrule',
|
|
52
52
|
dotbar: 'ui-dotbar',
|
|
53
|
+
dotbarIndeterminate: 'ui-dotbar--indeterminate',
|
|
53
54
|
dotloader: 'ui-dotloader',
|
|
55
|
+
dotspinner: 'ui-dotspinner',
|
|
56
|
+
dotspinnerSm: 'ui-dotspinner--sm',
|
|
57
|
+
dotspinnerLg: 'ui-dotspinner--lg',
|
|
54
58
|
// forms
|
|
55
59
|
field: 'ui-field',
|
|
56
60
|
label: 'ui-label',
|
|
@@ -64,6 +68,59 @@ export const cls = Object.freeze({
|
|
|
64
68
|
switchThumb: 'ui-switch__thumb',
|
|
65
69
|
hint: 'ui-hint',
|
|
66
70
|
hintError: 'ui-hint--error',
|
|
71
|
+
// feedback
|
|
72
|
+
alert: 'ui-alert',
|
|
73
|
+
alertTitle: 'ui-alert__title',
|
|
74
|
+
alertBody: 'ui-alert__body',
|
|
75
|
+
alertDismiss: 'ui-alert__dismiss',
|
|
76
|
+
alertAccent: 'ui-alert--accent',
|
|
77
|
+
alertSuccess: 'ui-alert--success',
|
|
78
|
+
alertWarning: 'ui-alert--warning',
|
|
79
|
+
alertDanger: 'ui-alert--danger',
|
|
80
|
+
toastStack: 'ui-toast-stack',
|
|
81
|
+
toast: 'ui-toast',
|
|
82
|
+
toastTitle: 'ui-toast__title',
|
|
83
|
+
toastAccent: 'ui-toast--accent',
|
|
84
|
+
toastSuccess: 'ui-toast--success',
|
|
85
|
+
toastWarning: 'ui-toast--warning',
|
|
86
|
+
toastDanger: 'ui-toast--danger',
|
|
87
|
+
tooltip: 'ui-tooltip',
|
|
88
|
+
tooltipBubble: 'ui-tooltip__bubble',
|
|
89
|
+
progress: 'ui-progress',
|
|
90
|
+
progressBar: 'ui-progress__bar',
|
|
91
|
+
progressIndeterminate: 'ui-progress--indeterminate',
|
|
92
|
+
// overlay
|
|
93
|
+
modal: 'ui-modal',
|
|
94
|
+
modalHead: 'ui-modal__head',
|
|
95
|
+
modalTitle: 'ui-modal__title',
|
|
96
|
+
modalBody: 'ui-modal__body',
|
|
97
|
+
modalFoot: 'ui-modal__foot',
|
|
98
|
+
modalClose: 'ui-modal__close',
|
|
99
|
+
modalDrawer: 'ui-modal--drawer',
|
|
100
|
+
menuHost: 'ui-menu-host',
|
|
101
|
+
menu: 'ui-menu',
|
|
102
|
+
menuLabel: 'ui-menu__label',
|
|
103
|
+
menuItem: 'ui-menu__item',
|
|
104
|
+
menuSep: 'ui-menu__sep',
|
|
105
|
+
// disclosure
|
|
106
|
+
tabs: 'ui-tabs',
|
|
107
|
+
tabsList: 'ui-tabs__list',
|
|
108
|
+
tab: 'ui-tab',
|
|
109
|
+
tabsPanel: 'ui-tabs__panel',
|
|
110
|
+
accordion: 'ui-accordion',
|
|
111
|
+
accordionItem: 'ui-accordion__item',
|
|
112
|
+
accordionSummary: 'ui-accordion__summary',
|
|
113
|
+
accordionBody: 'ui-accordion__body',
|
|
114
|
+
segmented: 'ui-segmented',
|
|
115
|
+
segmentedOption: 'ui-segmented__option',
|
|
116
|
+
breadcrumb: 'ui-breadcrumb',
|
|
117
|
+
breadcrumbItem: 'ui-breadcrumb__item',
|
|
118
|
+
pagination: 'ui-pagination',
|
|
119
|
+
paginationItem: 'ui-pagination__item',
|
|
120
|
+
avatar: 'ui-avatar',
|
|
121
|
+
avatarSm: 'ui-avatar--sm',
|
|
122
|
+
avatarLg: 'ui-avatar--lg',
|
|
123
|
+
avatarGroup: 'ui-avatar-group',
|
|
67
124
|
// table
|
|
68
125
|
table: 'ui-table',
|
|
69
126
|
tableDense: 'ui-table--dense',
|
|
@@ -84,6 +141,27 @@ export const cls = Object.freeze({
|
|
|
84
141
|
// typography / utilities
|
|
85
142
|
eyebrow: 'ui-eyebrow',
|
|
86
143
|
eyebrowMuted: 'ui-eyebrow--muted',
|
|
144
|
+
prose: 'ui-prose',
|
|
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',
|
|
87
165
|
display: 'ui-display',
|
|
88
166
|
mono: 'ui-mono',
|
|
89
167
|
muted: 'ui-muted',
|
|
@@ -100,6 +178,36 @@ export const cls = Object.freeze({
|
|
|
100
178
|
animateFade: 'ui-animate-fade',
|
|
101
179
|
animateDot: 'ui-animate-dot',
|
|
102
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',
|
|
103
211
|
});
|
|
104
212
|
|
|
105
213
|
/** classnames-style joiner: skips falsy, flattens nested arrays of any depth. */
|
|
@@ -118,7 +226,7 @@ export const ui = {
|
|
|
118
226
|
variant === 'ghost' && cls.buttonGhost,
|
|
119
227
|
variant === 'subtle' && cls.buttonSubtle,
|
|
120
228
|
variant === 'danger' && cls.buttonDanger,
|
|
121
|
-
icon && cls.buttonIcon
|
|
229
|
+
icon && cls.buttonIcon,
|
|
122
230
|
),
|
|
123
231
|
card: ({ accent, interactive } = {}) =>
|
|
124
232
|
j(cls.card, accent && cls.cardAccent, interactive && cls.cardInteractive),
|
|
@@ -128,7 +236,7 @@ export const ui = {
|
|
|
128
236
|
tone === 'accent' && cls.badgeAccent,
|
|
129
237
|
tone === 'success' && cls.badgeSuccess,
|
|
130
238
|
tone === 'warning' && cls.badgeWarning,
|
|
131
|
-
tone === 'danger' && cls.badgeDanger
|
|
239
|
+
tone === 'danger' && cls.badgeDanger,
|
|
132
240
|
),
|
|
133
241
|
chip: ({ accent } = {}) => j(cls.chip, accent && cls.chipAccent),
|
|
134
242
|
link: ({ arrow } = {}) => j(cls.link, arrow && cls.linkArrow),
|
|
@@ -139,7 +247,7 @@ export const ui = {
|
|
|
139
247
|
tone === 'success' && cls.dotSuccess,
|
|
140
248
|
tone === 'warning' && cls.dotWarning,
|
|
141
249
|
tone === 'danger' && cls.dotDanger,
|
|
142
|
-
live && cls.dotLive
|
|
250
|
+
live && cls.dotLive,
|
|
143
251
|
),
|
|
144
252
|
dotgrid: ({ accent, dense } = {}) =>
|
|
145
253
|
j(cls.dotgrid, accent && cls.dotgridAccent, dense && cls.dotgridDense),
|
|
@@ -148,12 +256,39 @@ export const ui = {
|
|
|
148
256
|
cls.table,
|
|
149
257
|
density === 'dense' && cls.tableDense,
|
|
150
258
|
density === 'comfortable' && cls.tableComfortable,
|
|
151
|
-
lined && cls.tableLined
|
|
259
|
+
lined && cls.tableLined,
|
|
152
260
|
),
|
|
153
261
|
eyebrow: ({ muted } = {}) => j(cls.eyebrow, muted && cls.eyebrowMuted),
|
|
154
262
|
hint: ({ error } = {}) => j(cls.hint, error && cls.hintError),
|
|
155
263
|
cluster: ({ between } = {}) => j(cls.cluster, between && cls.clusterBetween),
|
|
156
264
|
stagger: ({ auto } = {}) => j(cls.stagger, auto && cls.staggerAuto),
|
|
265
|
+
alert: ({ tone } = {}) =>
|
|
266
|
+
j(
|
|
267
|
+
cls.alert,
|
|
268
|
+
tone === 'accent' && cls.alertAccent,
|
|
269
|
+
tone === 'success' && cls.alertSuccess,
|
|
270
|
+
tone === 'warning' && cls.alertWarning,
|
|
271
|
+
tone === 'danger' && cls.alertDanger,
|
|
272
|
+
),
|
|
273
|
+
toast: ({ tone } = {}) =>
|
|
274
|
+
j(
|
|
275
|
+
cls.toast,
|
|
276
|
+
tone === 'accent' && cls.toastAccent,
|
|
277
|
+
tone === 'success' && cls.toastSuccess,
|
|
278
|
+
tone === 'warning' && cls.toastWarning,
|
|
279
|
+
tone === 'danger' && cls.toastDanger,
|
|
280
|
+
),
|
|
281
|
+
progress: ({ indeterminate } = {}) => j(cls.progress, indeterminate && cls.progressIndeterminate),
|
|
282
|
+
dotspinner: ({ size } = {}) =>
|
|
283
|
+
j(cls.dotspinner, size === 'sm' && cls.dotspinnerSm, size === 'lg' && cls.dotspinnerLg),
|
|
284
|
+
dotbar: ({ indeterminate } = {}) => j(cls.dotbar, indeterminate && cls.dotbarIndeterminate),
|
|
285
|
+
modal: ({ drawer } = {}) => j(cls.modal, drawer && cls.modalDrawer),
|
|
286
|
+
tab: ({ active } = {}) => j(cls.tab, active && 'is-active'),
|
|
287
|
+
avatar: ({ size } = {}) =>
|
|
288
|
+
j(cls.avatar, size === 'sm' && cls.avatarSm, size === 'lg' && cls.avatarLg),
|
|
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),
|
|
157
292
|
};
|
|
158
293
|
|
|
159
294
|
export default ui;
|