@ponchia/ui 0.2.2 → 0.3.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.
- package/README.md +108 -79
- package/behaviors/index.d.ts +53 -0
- package/behaviors/index.js +745 -34
- package/classes/index.d.ts +216 -3
- package/classes/index.js +85 -10
- package/classes/vscode.css-custom-data.json +407 -0
- package/css/app.css +53 -44
- package/css/base.css +14 -23
- package/css/content.css +37 -2
- package/css/core.css +5 -5
- package/css/disclosure.css +17 -5
- package/css/dots.css +1 -1
- package/css/feedback.css +87 -2
- package/css/forms.css +128 -2
- package/css/navigation.css +16 -85
- package/css/overlay.css +73 -2
- package/css/primitives.css +100 -3
- package/css/site.css +295 -0
- package/css/table.css +59 -0
- package/css/tokens.css +79 -24
- 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 +60 -30
- package/shiki/nothing.json +83 -0
- package/tokens/index.d.ts +18 -10
- package/tokens/index.js +49 -16
- package/tokens/index.json +98 -32
- package/tokens/tokens.dtcg.json +241 -22
- 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,214 @@
|
|
|
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 inputGroup: 'ui-input-group';
|
|
57
|
+
readonly inputGroupAddon: 'ui-input-group__addon';
|
|
58
|
+
readonly file: 'ui-file';
|
|
59
|
+
readonly range: 'ui-range';
|
|
60
|
+
readonly errorSummary: 'ui-error-summary';
|
|
61
|
+
readonly errorSummaryTitle: 'ui-error-summary__title';
|
|
62
|
+
readonly errorSummaryList: 'ui-error-summary__list';
|
|
63
|
+
readonly alert: 'ui-alert';
|
|
64
|
+
readonly alertTitle: 'ui-alert__title';
|
|
65
|
+
readonly alertBody: 'ui-alert__body';
|
|
66
|
+
readonly alertDismiss: 'ui-alert__dismiss';
|
|
67
|
+
readonly alertAccent: 'ui-alert--accent';
|
|
68
|
+
readonly alertSuccess: 'ui-alert--success';
|
|
69
|
+
readonly alertWarning: 'ui-alert--warning';
|
|
70
|
+
readonly alertDanger: 'ui-alert--danger';
|
|
71
|
+
readonly toastStack: 'ui-toast-stack';
|
|
72
|
+
readonly toastStackAssertive: 'ui-toast-stack--assertive';
|
|
73
|
+
readonly toast: 'ui-toast';
|
|
74
|
+
readonly toastTitle: 'ui-toast__title';
|
|
75
|
+
readonly toastClose: 'ui-toast__close';
|
|
76
|
+
readonly toastAccent: 'ui-toast--accent';
|
|
77
|
+
readonly toastSuccess: 'ui-toast--success';
|
|
78
|
+
readonly toastWarning: 'ui-toast--warning';
|
|
79
|
+
readonly toastDanger: 'ui-toast--danger';
|
|
80
|
+
readonly tooltip: 'ui-tooltip';
|
|
81
|
+
readonly tooltipBubble: 'ui-tooltip__bubble';
|
|
82
|
+
readonly popover: 'ui-popover';
|
|
83
|
+
readonly progress: 'ui-progress';
|
|
84
|
+
readonly progressBar: 'ui-progress__bar';
|
|
85
|
+
readonly progressIndeterminate: 'ui-progress--indeterminate';
|
|
86
|
+
readonly modal: 'ui-modal';
|
|
87
|
+
readonly modalHead: 'ui-modal__head';
|
|
88
|
+
readonly modalTitle: 'ui-modal__title';
|
|
89
|
+
readonly modalBody: 'ui-modal__body';
|
|
90
|
+
readonly modalFoot: 'ui-modal__foot';
|
|
91
|
+
readonly modalClose: 'ui-modal__close';
|
|
92
|
+
readonly modalDrawer: 'ui-modal--drawer';
|
|
93
|
+
readonly menuHost: 'ui-menu-host';
|
|
94
|
+
readonly menu: 'ui-menu';
|
|
95
|
+
readonly menuLabel: 'ui-menu__label';
|
|
96
|
+
readonly menuItem: 'ui-menu__item';
|
|
97
|
+
readonly menuSep: 'ui-menu__sep';
|
|
98
|
+
readonly combobox: 'ui-combobox';
|
|
99
|
+
readonly comboboxInput: 'ui-combobox__input';
|
|
100
|
+
readonly comboboxList: 'ui-combobox__list';
|
|
101
|
+
readonly comboboxOption: 'ui-combobox__option';
|
|
102
|
+
readonly comboboxEmpty: 'ui-combobox__empty';
|
|
103
|
+
readonly tabs: 'ui-tabs';
|
|
104
|
+
readonly tabsList: 'ui-tabs__list';
|
|
105
|
+
readonly tab: 'ui-tab';
|
|
106
|
+
readonly tabsPanel: 'ui-tabs__panel';
|
|
107
|
+
readonly accordion: 'ui-accordion';
|
|
108
|
+
readonly accordionItem: 'ui-accordion__item';
|
|
109
|
+
readonly accordionSummary: 'ui-accordion__summary';
|
|
110
|
+
readonly accordionBody: 'ui-accordion__body';
|
|
111
|
+
readonly segmented: 'ui-segmented';
|
|
112
|
+
readonly segmentedOption: 'ui-segmented__option';
|
|
113
|
+
readonly breadcrumb: 'ui-breadcrumb';
|
|
114
|
+
readonly breadcrumbItem: 'ui-breadcrumb__item';
|
|
115
|
+
readonly pagination: 'ui-pagination';
|
|
116
|
+
readonly paginationItem: 'ui-pagination__item';
|
|
117
|
+
readonly avatar: 'ui-avatar';
|
|
118
|
+
readonly avatarSm: 'ui-avatar--sm';
|
|
119
|
+
readonly avatarLg: 'ui-avatar--lg';
|
|
120
|
+
readonly avatarGroup: 'ui-avatar-group';
|
|
121
|
+
readonly table: 'ui-table';
|
|
122
|
+
readonly tableDense: 'ui-table--dense';
|
|
123
|
+
readonly tableComfortable: 'ui-table--comfortable';
|
|
124
|
+
readonly tableLined: 'ui-table--lined';
|
|
125
|
+
readonly tableWrap: 'ui-table-wrap';
|
|
126
|
+
readonly tableEmpty: 'ui-table__empty';
|
|
127
|
+
readonly tableSort: 'ui-table__sort';
|
|
128
|
+
readonly tableSelect: 'ui-table__select';
|
|
129
|
+
readonly tableToolbar: 'ui-table__toolbar';
|
|
130
|
+
readonly tableSelectable: 'ui-table--selectable';
|
|
131
|
+
readonly tableLoading: 'ui-table--loading';
|
|
132
|
+
readonly panel: 'ui-panel';
|
|
133
|
+
readonly panelHead: 'ui-panel__head';
|
|
134
|
+
readonly surface: 'ui-surface';
|
|
135
|
+
readonly stack: 'ui-stack';
|
|
136
|
+
readonly cluster: 'ui-cluster';
|
|
137
|
+
readonly clusterBetween: 'ui-cluster--between';
|
|
138
|
+
readonly grid: 'ui-grid';
|
|
139
|
+
readonly sidebar: 'ui-sidebar';
|
|
140
|
+
readonly switcher: 'ui-switcher';
|
|
141
|
+
readonly center: 'ui-center';
|
|
142
|
+
readonly ratio: 'ui-ratio';
|
|
143
|
+
readonly cq: 'ui-cq';
|
|
144
|
+
readonly divider: 'ui-divider';
|
|
145
|
+
readonly status: 'ui-status';
|
|
146
|
+
readonly eyebrow: 'ui-eyebrow';
|
|
147
|
+
readonly eyebrowMuted: 'ui-eyebrow--muted';
|
|
148
|
+
readonly prose: 'ui-prose';
|
|
149
|
+
readonly proseCompact: 'ui-prose--compact';
|
|
150
|
+
readonly quote: 'ui-quote';
|
|
151
|
+
readonly quoteCite: 'ui-quote__cite';
|
|
152
|
+
readonly container: 'ui-container';
|
|
153
|
+
readonly containerNarrow: 'ui-container--narrow';
|
|
154
|
+
readonly skiplink: 'ui-skiplink';
|
|
155
|
+
readonly siteheader: 'ui-siteheader';
|
|
156
|
+
readonly siteheaderBrand: 'ui-siteheader__brand';
|
|
157
|
+
readonly siteheaderActions: 'ui-siteheader__actions';
|
|
158
|
+
readonly sitenav: 'ui-sitenav';
|
|
159
|
+
readonly sitemenu: 'ui-sitemenu';
|
|
160
|
+
readonly sitemenuPanel: 'ui-sitemenu__panel';
|
|
161
|
+
readonly sitefooter: 'ui-sitefooter';
|
|
162
|
+
readonly sitefooterLinks: 'ui-sitefooter__links';
|
|
163
|
+
readonly tags: 'ui-tags';
|
|
164
|
+
readonly tag: 'ui-tag';
|
|
165
|
+
readonly tagAccent: 'ui-tag--accent';
|
|
166
|
+
readonly meta: 'ui-meta';
|
|
167
|
+
readonly metaItem: 'ui-meta__item';
|
|
168
|
+
readonly display: 'ui-display';
|
|
169
|
+
readonly mono: 'ui-mono';
|
|
170
|
+
readonly muted: 'ui-muted';
|
|
171
|
+
readonly visuallyHidden: 'ui-visually-hidden';
|
|
172
|
+
readonly reveal: 'ui-reveal';
|
|
173
|
+
readonly stagger: 'ui-stagger';
|
|
174
|
+
readonly staggerAuto: 'ui-stagger--auto';
|
|
175
|
+
readonly matrix: 'ui-matrix';
|
|
176
|
+
readonly skeleton: 'ui-skeleton';
|
|
177
|
+
readonly spinner: 'ui-spinner';
|
|
178
|
+
readonly caret: 'ui-caret';
|
|
179
|
+
readonly animateIn: 'ui-animate-in';
|
|
180
|
+
readonly animateFade: 'ui-animate-fade';
|
|
181
|
+
readonly animateDot: 'ui-animate-dot';
|
|
182
|
+
readonly animateMatrix: 'ui-animate-matrix';
|
|
183
|
+
readonly appShell: 'ui-app-shell';
|
|
184
|
+
readonly appShellFull: 'ui-app-shell--full';
|
|
185
|
+
readonly appRail: 'ui-app-rail';
|
|
186
|
+
readonly appRailBrand: 'ui-app-rail__brand';
|
|
187
|
+
readonly appRailToggle: 'ui-app-rail__toggle';
|
|
188
|
+
readonly appRailFoot: 'ui-app-rail__foot';
|
|
189
|
+
readonly appTopbar: 'ui-app-topbar';
|
|
190
|
+
readonly appTopbarTitle: 'ui-app-topbar__title';
|
|
191
|
+
readonly appToolbar: 'ui-app-toolbar';
|
|
192
|
+
readonly appToolbarGroup: 'ui-app-toolbar__group';
|
|
193
|
+
readonly appNav: 'ui-app-nav';
|
|
194
|
+
readonly appNavSection: 'ui-app-nav__section';
|
|
195
|
+
readonly appMain: 'ui-app-main';
|
|
196
|
+
readonly appContent: 'ui-app-content';
|
|
197
|
+
readonly appPanel: 'ui-app-panel';
|
|
198
|
+
readonly appPanelHead: 'ui-app-panel__head';
|
|
199
|
+
readonly appPanelTitle: 'ui-app-panel__title';
|
|
200
|
+
readonly appMetrics: 'ui-app-metrics';
|
|
201
|
+
readonly appMetric: 'ui-app-metric';
|
|
202
|
+
readonly appMetricLabel: 'ui-app-metric__label';
|
|
203
|
+
readonly appMetricValue: 'ui-app-metric__value';
|
|
204
|
+
readonly appMetricDelta: 'ui-app-metric__delta';
|
|
205
|
+
readonly appEmptyState: 'ui-app-empty-state';
|
|
206
|
+
readonly themetoggleButton: 'ui-themetoggle__button';
|
|
207
|
+
readonly themetogglePrefix: 'ui-themetoggle__prefix';
|
|
208
|
+
readonly themetoggleLabel: 'ui-themetoggle__label';
|
|
209
|
+
readonly themetoggleTrack: 'ui-themetoggle__track';
|
|
210
|
+
readonly themetoggleThumb: 'ui-themetoggle__thumb';
|
|
211
|
+
};
|
|
7
212
|
|
|
8
213
|
/** classnames-style joiner: skips falsy, flattens arrays. */
|
|
9
214
|
export declare function cx(...parts: ClassValue[]): string;
|
|
@@ -77,6 +282,12 @@ export interface AvatarOpts {
|
|
|
77
282
|
export interface ProseOpts {
|
|
78
283
|
compact?: boolean;
|
|
79
284
|
}
|
|
285
|
+
export interface ContainerOpts {
|
|
286
|
+
narrow?: boolean;
|
|
287
|
+
}
|
|
288
|
+
export interface TagOpts {
|
|
289
|
+
accent?: boolean;
|
|
290
|
+
}
|
|
80
291
|
|
|
81
292
|
export interface Ui {
|
|
82
293
|
button(opts?: ButtonOpts): string;
|
|
@@ -100,6 +311,8 @@ export interface Ui {
|
|
|
100
311
|
tab(opts?: TabOpts): string;
|
|
101
312
|
avatar(opts?: AvatarOpts): string;
|
|
102
313
|
prose(opts?: ProseOpts): string;
|
|
314
|
+
container(opts?: ContainerOpts): string;
|
|
315
|
+
tag(opts?: TagOpts): string;
|
|
103
316
|
}
|
|
104
317
|
|
|
105
318
|
export declare const ui: Ui;
|
package/classes/index.js
CHANGED
|
@@ -68,6 +68,13 @@ export const cls = Object.freeze({
|
|
|
68
68
|
switchThumb: 'ui-switch__thumb',
|
|
69
69
|
hint: 'ui-hint',
|
|
70
70
|
hintError: 'ui-hint--error',
|
|
71
|
+
inputGroup: 'ui-input-group',
|
|
72
|
+
inputGroupAddon: 'ui-input-group__addon',
|
|
73
|
+
file: 'ui-file',
|
|
74
|
+
range: 'ui-range',
|
|
75
|
+
errorSummary: 'ui-error-summary',
|
|
76
|
+
errorSummaryTitle: 'ui-error-summary__title',
|
|
77
|
+
errorSummaryList: 'ui-error-summary__list',
|
|
71
78
|
// feedback
|
|
72
79
|
alert: 'ui-alert',
|
|
73
80
|
alertTitle: 'ui-alert__title',
|
|
@@ -78,14 +85,17 @@ export const cls = Object.freeze({
|
|
|
78
85
|
alertWarning: 'ui-alert--warning',
|
|
79
86
|
alertDanger: 'ui-alert--danger',
|
|
80
87
|
toastStack: 'ui-toast-stack',
|
|
88
|
+
toastStackAssertive: 'ui-toast-stack--assertive',
|
|
81
89
|
toast: 'ui-toast',
|
|
82
90
|
toastTitle: 'ui-toast__title',
|
|
91
|
+
toastClose: 'ui-toast__close',
|
|
83
92
|
toastAccent: 'ui-toast--accent',
|
|
84
93
|
toastSuccess: 'ui-toast--success',
|
|
85
94
|
toastWarning: 'ui-toast--warning',
|
|
86
95
|
toastDanger: 'ui-toast--danger',
|
|
87
96
|
tooltip: 'ui-tooltip',
|
|
88
97
|
tooltipBubble: 'ui-tooltip__bubble',
|
|
98
|
+
popover: 'ui-popover',
|
|
89
99
|
progress: 'ui-progress',
|
|
90
100
|
progressBar: 'ui-progress__bar',
|
|
91
101
|
progressIndeterminate: 'ui-progress--indeterminate',
|
|
@@ -97,10 +107,16 @@ export const cls = Object.freeze({
|
|
|
97
107
|
modalFoot: 'ui-modal__foot',
|
|
98
108
|
modalClose: 'ui-modal__close',
|
|
99
109
|
modalDrawer: 'ui-modal--drawer',
|
|
110
|
+
menuHost: 'ui-menu-host',
|
|
100
111
|
menu: 'ui-menu',
|
|
101
112
|
menuLabel: 'ui-menu__label',
|
|
102
113
|
menuItem: 'ui-menu__item',
|
|
103
114
|
menuSep: 'ui-menu__sep',
|
|
115
|
+
combobox: 'ui-combobox',
|
|
116
|
+
comboboxInput: 'ui-combobox__input',
|
|
117
|
+
comboboxList: 'ui-combobox__list',
|
|
118
|
+
comboboxOption: 'ui-combobox__option',
|
|
119
|
+
comboboxEmpty: 'ui-combobox__empty',
|
|
104
120
|
// disclosure
|
|
105
121
|
tabs: 'ui-tabs',
|
|
106
122
|
tabsList: 'ui-tabs__list',
|
|
@@ -127,6 +143,11 @@ export const cls = Object.freeze({
|
|
|
127
143
|
tableLined: 'ui-table--lined',
|
|
128
144
|
tableWrap: 'ui-table-wrap',
|
|
129
145
|
tableEmpty: 'ui-table__empty',
|
|
146
|
+
tableSort: 'ui-table__sort',
|
|
147
|
+
tableSelect: 'ui-table__select',
|
|
148
|
+
tableToolbar: 'ui-table__toolbar',
|
|
149
|
+
tableSelectable: 'ui-table--selectable',
|
|
150
|
+
tableLoading: 'ui-table--loading',
|
|
130
151
|
// shell / layout
|
|
131
152
|
panel: 'ui-panel',
|
|
132
153
|
panelHead: 'ui-panel__head',
|
|
@@ -135,6 +156,11 @@ export const cls = Object.freeze({
|
|
|
135
156
|
cluster: 'ui-cluster',
|
|
136
157
|
clusterBetween: 'ui-cluster--between',
|
|
137
158
|
grid: 'ui-grid',
|
|
159
|
+
sidebar: 'ui-sidebar',
|
|
160
|
+
switcher: 'ui-switcher',
|
|
161
|
+
center: 'ui-center',
|
|
162
|
+
ratio: 'ui-ratio',
|
|
163
|
+
cq: 'ui-cq',
|
|
138
164
|
divider: 'ui-divider',
|
|
139
165
|
status: 'ui-status',
|
|
140
166
|
// typography / utilities
|
|
@@ -142,6 +168,25 @@ export const cls = Object.freeze({
|
|
|
142
168
|
eyebrowMuted: 'ui-eyebrow--muted',
|
|
143
169
|
prose: 'ui-prose',
|
|
144
170
|
proseCompact: 'ui-prose--compact',
|
|
171
|
+
quote: 'ui-quote',
|
|
172
|
+
quoteCite: 'ui-quote__cite',
|
|
173
|
+
// site shell
|
|
174
|
+
container: 'ui-container',
|
|
175
|
+
containerNarrow: 'ui-container--narrow',
|
|
176
|
+
skiplink: 'ui-skiplink',
|
|
177
|
+
siteheader: 'ui-siteheader',
|
|
178
|
+
siteheaderBrand: 'ui-siteheader__brand',
|
|
179
|
+
siteheaderActions: 'ui-siteheader__actions',
|
|
180
|
+
sitenav: 'ui-sitenav',
|
|
181
|
+
sitemenu: 'ui-sitemenu',
|
|
182
|
+
sitemenuPanel: 'ui-sitemenu__panel',
|
|
183
|
+
sitefooter: 'ui-sitefooter',
|
|
184
|
+
sitefooterLinks: 'ui-sitefooter__links',
|
|
185
|
+
tags: 'ui-tags',
|
|
186
|
+
tag: 'ui-tag',
|
|
187
|
+
tagAccent: 'ui-tag--accent',
|
|
188
|
+
meta: 'ui-meta',
|
|
189
|
+
metaItem: 'ui-meta__item',
|
|
145
190
|
display: 'ui-display',
|
|
146
191
|
mono: 'ui-mono',
|
|
147
192
|
muted: 'ui-muted',
|
|
@@ -158,6 +203,36 @@ export const cls = Object.freeze({
|
|
|
158
203
|
animateFade: 'ui-animate-fade',
|
|
159
204
|
animateDot: 'ui-animate-dot',
|
|
160
205
|
animateMatrix: 'ui-animate-matrix',
|
|
206
|
+
// admin shell (was the legacy .app-* vocabulary; promoted in 0.3.0)
|
|
207
|
+
appShell: 'ui-app-shell',
|
|
208
|
+
appShellFull: 'ui-app-shell--full',
|
|
209
|
+
appRail: 'ui-app-rail',
|
|
210
|
+
appRailBrand: 'ui-app-rail__brand',
|
|
211
|
+
appRailToggle: 'ui-app-rail__toggle',
|
|
212
|
+
appRailFoot: 'ui-app-rail__foot',
|
|
213
|
+
appTopbar: 'ui-app-topbar',
|
|
214
|
+
appTopbarTitle: 'ui-app-topbar__title',
|
|
215
|
+
appToolbar: 'ui-app-toolbar',
|
|
216
|
+
appToolbarGroup: 'ui-app-toolbar__group',
|
|
217
|
+
appNav: 'ui-app-nav',
|
|
218
|
+
appNavSection: 'ui-app-nav__section',
|
|
219
|
+
appMain: 'ui-app-main',
|
|
220
|
+
appContent: 'ui-app-content',
|
|
221
|
+
appPanel: 'ui-app-panel',
|
|
222
|
+
appPanelHead: 'ui-app-panel__head',
|
|
223
|
+
appPanelTitle: 'ui-app-panel__title',
|
|
224
|
+
appMetrics: 'ui-app-metrics',
|
|
225
|
+
appMetric: 'ui-app-metric',
|
|
226
|
+
appMetricLabel: 'ui-app-metric__label',
|
|
227
|
+
appMetricValue: 'ui-app-metric__value',
|
|
228
|
+
appMetricDelta: 'ui-app-metric__delta',
|
|
229
|
+
appEmptyState: 'ui-app-empty-state',
|
|
230
|
+
// theme toggle (was the legacy .theme-toggle__* vocabulary)
|
|
231
|
+
themetoggleButton: 'ui-themetoggle__button',
|
|
232
|
+
themetogglePrefix: 'ui-themetoggle__prefix',
|
|
233
|
+
themetoggleLabel: 'ui-themetoggle__label',
|
|
234
|
+
themetoggleTrack: 'ui-themetoggle__track',
|
|
235
|
+
themetoggleThumb: 'ui-themetoggle__thumb',
|
|
161
236
|
});
|
|
162
237
|
|
|
163
238
|
/** classnames-style joiner: skips falsy, flattens nested arrays of any depth. */
|
|
@@ -176,7 +251,7 @@ export const ui = {
|
|
|
176
251
|
variant === 'ghost' && cls.buttonGhost,
|
|
177
252
|
variant === 'subtle' && cls.buttonSubtle,
|
|
178
253
|
variant === 'danger' && cls.buttonDanger,
|
|
179
|
-
icon && cls.buttonIcon
|
|
254
|
+
icon && cls.buttonIcon,
|
|
180
255
|
),
|
|
181
256
|
card: ({ accent, interactive } = {}) =>
|
|
182
257
|
j(cls.card, accent && cls.cardAccent, interactive && cls.cardInteractive),
|
|
@@ -186,7 +261,7 @@ export const ui = {
|
|
|
186
261
|
tone === 'accent' && cls.badgeAccent,
|
|
187
262
|
tone === 'success' && cls.badgeSuccess,
|
|
188
263
|
tone === 'warning' && cls.badgeWarning,
|
|
189
|
-
tone === 'danger' && cls.badgeDanger
|
|
264
|
+
tone === 'danger' && cls.badgeDanger,
|
|
190
265
|
),
|
|
191
266
|
chip: ({ accent } = {}) => j(cls.chip, accent && cls.chipAccent),
|
|
192
267
|
link: ({ arrow } = {}) => j(cls.link, arrow && cls.linkArrow),
|
|
@@ -197,7 +272,7 @@ export const ui = {
|
|
|
197
272
|
tone === 'success' && cls.dotSuccess,
|
|
198
273
|
tone === 'warning' && cls.dotWarning,
|
|
199
274
|
tone === 'danger' && cls.dotDanger,
|
|
200
|
-
live && cls.dotLive
|
|
275
|
+
live && cls.dotLive,
|
|
201
276
|
),
|
|
202
277
|
dotgrid: ({ accent, dense } = {}) =>
|
|
203
278
|
j(cls.dotgrid, accent && cls.dotgridAccent, dense && cls.dotgridDense),
|
|
@@ -206,7 +281,7 @@ export const ui = {
|
|
|
206
281
|
cls.table,
|
|
207
282
|
density === 'dense' && cls.tableDense,
|
|
208
283
|
density === 'comfortable' && cls.tableComfortable,
|
|
209
|
-
lined && cls.tableLined
|
|
284
|
+
lined && cls.tableLined,
|
|
210
285
|
),
|
|
211
286
|
eyebrow: ({ muted } = {}) => j(cls.eyebrow, muted && cls.eyebrowMuted),
|
|
212
287
|
hint: ({ error } = {}) => j(cls.hint, error && cls.hintError),
|
|
@@ -218,7 +293,7 @@ export const ui = {
|
|
|
218
293
|
tone === 'accent' && cls.alertAccent,
|
|
219
294
|
tone === 'success' && cls.alertSuccess,
|
|
220
295
|
tone === 'warning' && cls.alertWarning,
|
|
221
|
-
tone === 'danger' && cls.alertDanger
|
|
296
|
+
tone === 'danger' && cls.alertDanger,
|
|
222
297
|
),
|
|
223
298
|
toast: ({ tone } = {}) =>
|
|
224
299
|
j(
|
|
@@ -226,19 +301,19 @@ export const ui = {
|
|
|
226
301
|
tone === 'accent' && cls.toastAccent,
|
|
227
302
|
tone === 'success' && cls.toastSuccess,
|
|
228
303
|
tone === 'warning' && cls.toastWarning,
|
|
229
|
-
tone === 'danger' && cls.toastDanger
|
|
304
|
+
tone === 'danger' && cls.toastDanger,
|
|
230
305
|
),
|
|
231
|
-
progress: ({ indeterminate } = {}) =>
|
|
232
|
-
j(cls.progress, indeterminate && cls.progressIndeterminate),
|
|
306
|
+
progress: ({ indeterminate } = {}) => j(cls.progress, indeterminate && cls.progressIndeterminate),
|
|
233
307
|
dotspinner: ({ size } = {}) =>
|
|
234
308
|
j(cls.dotspinner, size === 'sm' && cls.dotspinnerSm, size === 'lg' && cls.dotspinnerLg),
|
|
235
|
-
dotbar: ({ indeterminate } = {}) =>
|
|
236
|
-
j(cls.dotbar, indeterminate && cls.dotbarIndeterminate),
|
|
309
|
+
dotbar: ({ indeterminate } = {}) => j(cls.dotbar, indeterminate && cls.dotbarIndeterminate),
|
|
237
310
|
modal: ({ drawer } = {}) => j(cls.modal, drawer && cls.modalDrawer),
|
|
238
311
|
tab: ({ active } = {}) => j(cls.tab, active && 'is-active'),
|
|
239
312
|
avatar: ({ size } = {}) =>
|
|
240
313
|
j(cls.avatar, size === 'sm' && cls.avatarSm, size === 'lg' && cls.avatarLg),
|
|
241
314
|
prose: ({ compact } = {}) => j(cls.prose, compact && cls.proseCompact),
|
|
315
|
+
container: ({ narrow } = {}) => j(cls.container, narrow && cls.containerNarrow),
|
|
316
|
+
tag: ({ accent } = {}) => j(cls.tag, accent && cls.tagAccent),
|
|
242
317
|
};
|
|
243
318
|
|
|
244
319
|
export default ui;
|