@ponchia/ui 0.3.0 → 0.3.2
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 +43 -61
- package/behaviors/index.d.ts +46 -0
- package/behaviors/index.js +575 -6
- package/classes/index.d.ts +53 -1
- package/classes/index.js +58 -4
- package/classes/vscode.css-custom-data.json +407 -0
- package/css/app.css +8 -48
- package/css/base.css +0 -1
- package/css/dots.css +25 -1
- package/css/feedback.css +87 -2
- package/css/forms.css +126 -0
- package/css/overlay.css +64 -1
- package/css/primitives.css +252 -4
- package/css/site.css +16 -2
- package/css/table.css +59 -0
- package/css/tokens.css +69 -21
- package/dist/bronto.css +1 -1
- package/dist/css/app.css +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/dots.css +1 -1
- package/dist/css/feedback.css +1 -1
- package/dist/css/forms.css +1 -1
- package/dist/css/overlay.css +1 -1
- package/dist/css/primitives.css +1 -1
- package/dist/css/site.css +1 -1
- package/dist/css/table.css +1 -1
- package/dist/css/tokens.css +1 -1
- package/package.json +13 -7
- package/tokens/index.d.ts +2 -2
- package/tokens/index.js +45 -14
- package/tokens/index.json +90 -28
- package/tokens/tokens.dtcg.json +219 -14
package/classes/index.d.ts
CHANGED
|
@@ -14,15 +14,27 @@ export declare const cls: {
|
|
|
14
14
|
readonly cardHead: 'ui-card__head';
|
|
15
15
|
readonly cardAccent: 'ui-card--accent';
|
|
16
16
|
readonly cardInteractive: 'ui-card--interactive';
|
|
17
|
+
readonly stat: 'ui-stat';
|
|
18
|
+
readonly statgrid: 'ui-statgrid';
|
|
19
|
+
readonly statLabel: 'ui-stat__label';
|
|
20
|
+
readonly statValue: 'ui-stat__value';
|
|
21
|
+
readonly statDelta: 'ui-stat__delta';
|
|
22
|
+
readonly num: 'ui-num';
|
|
23
|
+
readonly numPos: 'ui-num--pos';
|
|
24
|
+
readonly numNeg: 'ui-num--neg';
|
|
25
|
+
readonly numMuted: 'ui-num--muted';
|
|
17
26
|
readonly badge: 'ui-badge';
|
|
18
27
|
readonly badgeAccent: 'ui-badge--accent';
|
|
19
28
|
readonly badgeSuccess: 'ui-badge--success';
|
|
20
29
|
readonly badgeWarning: 'ui-badge--warning';
|
|
21
30
|
readonly badgeDanger: 'ui-badge--danger';
|
|
31
|
+
readonly badgeMuted: 'ui-badge--muted';
|
|
32
|
+
readonly badgeDot: 'ui-badge--dot';
|
|
22
33
|
readonly chip: 'ui-chip';
|
|
23
34
|
readonly chipAccent: 'ui-chip--accent';
|
|
24
35
|
readonly link: 'ui-link';
|
|
25
36
|
readonly linkArrow: 'ui-link--arrow';
|
|
37
|
+
readonly linkCta: 'ui-link--cta';
|
|
26
38
|
readonly keyValue: 'ui-key-value';
|
|
27
39
|
readonly dot: 'ui-dot';
|
|
28
40
|
readonly dotAccent: 'ui-dot--accent';
|
|
@@ -33,6 +45,10 @@ export declare const cls: {
|
|
|
33
45
|
readonly dotgrid: 'ui-dotgrid';
|
|
34
46
|
readonly dotgridAccent: 'ui-dotgrid--accent';
|
|
35
47
|
readonly dotgridDense: 'ui-dotgrid--dense';
|
|
48
|
+
readonly dotmatrix: 'ui-dotmatrix';
|
|
49
|
+
readonly dotmatrixCell: 'ui-dotmatrix__cell';
|
|
50
|
+
readonly dotmatrixCellHot: 'ui-dotmatrix__cell--hot';
|
|
51
|
+
readonly dotmatrixCellAccent: 'ui-dotmatrix__cell--accent';
|
|
36
52
|
readonly dotfield: 'ui-dotfield';
|
|
37
53
|
readonly dotrule: 'ui-dotrule';
|
|
38
54
|
readonly dotbar: 'ui-dotbar';
|
|
@@ -53,6 +69,13 @@ export declare const cls: {
|
|
|
53
69
|
readonly switchThumb: 'ui-switch__thumb';
|
|
54
70
|
readonly hint: 'ui-hint';
|
|
55
71
|
readonly hintError: 'ui-hint--error';
|
|
72
|
+
readonly inputGroup: 'ui-input-group';
|
|
73
|
+
readonly inputGroupAddon: 'ui-input-group__addon';
|
|
74
|
+
readonly file: 'ui-file';
|
|
75
|
+
readonly range: 'ui-range';
|
|
76
|
+
readonly errorSummary: 'ui-error-summary';
|
|
77
|
+
readonly errorSummaryTitle: 'ui-error-summary__title';
|
|
78
|
+
readonly errorSummaryList: 'ui-error-summary__list';
|
|
56
79
|
readonly alert: 'ui-alert';
|
|
57
80
|
readonly alertTitle: 'ui-alert__title';
|
|
58
81
|
readonly alertBody: 'ui-alert__body';
|
|
@@ -62,14 +85,17 @@ export declare const cls: {
|
|
|
62
85
|
readonly alertWarning: 'ui-alert--warning';
|
|
63
86
|
readonly alertDanger: 'ui-alert--danger';
|
|
64
87
|
readonly toastStack: 'ui-toast-stack';
|
|
88
|
+
readonly toastStackAssertive: 'ui-toast-stack--assertive';
|
|
65
89
|
readonly toast: 'ui-toast';
|
|
66
90
|
readonly toastTitle: 'ui-toast__title';
|
|
91
|
+
readonly toastClose: 'ui-toast__close';
|
|
67
92
|
readonly toastAccent: 'ui-toast--accent';
|
|
68
93
|
readonly toastSuccess: 'ui-toast--success';
|
|
69
94
|
readonly toastWarning: 'ui-toast--warning';
|
|
70
95
|
readonly toastDanger: 'ui-toast--danger';
|
|
71
96
|
readonly tooltip: 'ui-tooltip';
|
|
72
97
|
readonly tooltipBubble: 'ui-tooltip__bubble';
|
|
98
|
+
readonly popover: 'ui-popover';
|
|
73
99
|
readonly progress: 'ui-progress';
|
|
74
100
|
readonly progressBar: 'ui-progress__bar';
|
|
75
101
|
readonly progressIndeterminate: 'ui-progress--indeterminate';
|
|
@@ -85,6 +111,11 @@ export declare const cls: {
|
|
|
85
111
|
readonly menuLabel: 'ui-menu__label';
|
|
86
112
|
readonly menuItem: 'ui-menu__item';
|
|
87
113
|
readonly menuSep: 'ui-menu__sep';
|
|
114
|
+
readonly combobox: 'ui-combobox';
|
|
115
|
+
readonly comboboxInput: 'ui-combobox__input';
|
|
116
|
+
readonly comboboxList: 'ui-combobox__list';
|
|
117
|
+
readonly comboboxOption: 'ui-combobox__option';
|
|
118
|
+
readonly comboboxEmpty: 'ui-combobox__empty';
|
|
88
119
|
readonly tabs: 'ui-tabs';
|
|
89
120
|
readonly tabsList: 'ui-tabs__list';
|
|
90
121
|
readonly tab: 'ui-tab';
|
|
@@ -109,6 +140,11 @@ export declare const cls: {
|
|
|
109
140
|
readonly tableLined: 'ui-table--lined';
|
|
110
141
|
readonly tableWrap: 'ui-table-wrap';
|
|
111
142
|
readonly tableEmpty: 'ui-table__empty';
|
|
143
|
+
readonly tableSort: 'ui-table__sort';
|
|
144
|
+
readonly tableSelect: 'ui-table__select';
|
|
145
|
+
readonly tableToolbar: 'ui-table__toolbar';
|
|
146
|
+
readonly tableSelectable: 'ui-table--selectable';
|
|
147
|
+
readonly tableLoading: 'ui-table--loading';
|
|
112
148
|
readonly panel: 'ui-panel';
|
|
113
149
|
readonly panelHead: 'ui-panel__head';
|
|
114
150
|
readonly surface: 'ui-surface';
|
|
@@ -116,18 +152,26 @@ export declare const cls: {
|
|
|
116
152
|
readonly cluster: 'ui-cluster';
|
|
117
153
|
readonly clusterBetween: 'ui-cluster--between';
|
|
118
154
|
readonly grid: 'ui-grid';
|
|
155
|
+
readonly sidebar: 'ui-sidebar';
|
|
156
|
+
readonly switcher: 'ui-switcher';
|
|
157
|
+
readonly center: 'ui-center';
|
|
158
|
+
readonly ratio: 'ui-ratio';
|
|
159
|
+
readonly cq: 'ui-cq';
|
|
119
160
|
readonly divider: 'ui-divider';
|
|
120
161
|
readonly status: 'ui-status';
|
|
121
162
|
readonly eyebrow: 'ui-eyebrow';
|
|
122
163
|
readonly eyebrowMuted: 'ui-eyebrow--muted';
|
|
164
|
+
readonly eyebrowSm: 'ui-eyebrow--sm';
|
|
123
165
|
readonly prose: 'ui-prose';
|
|
124
166
|
readonly proseCompact: 'ui-prose--compact';
|
|
125
167
|
readonly quote: 'ui-quote';
|
|
126
168
|
readonly quoteCite: 'ui-quote__cite';
|
|
127
169
|
readonly container: 'ui-container';
|
|
128
170
|
readonly containerNarrow: 'ui-container--narrow';
|
|
171
|
+
readonly containerWide: 'ui-container--wide';
|
|
129
172
|
readonly skiplink: 'ui-skiplink';
|
|
130
173
|
readonly siteheader: 'ui-siteheader';
|
|
174
|
+
readonly siteheaderSticky: 'ui-siteheader--sticky';
|
|
131
175
|
readonly siteheaderBrand: 'ui-siteheader__brand';
|
|
132
176
|
readonly siteheaderActions: 'ui-siteheader__actions';
|
|
133
177
|
readonly sitenav: 'ui-sitenav';
|
|
@@ -197,13 +241,18 @@ export interface CardOpts {
|
|
|
197
241
|
interactive?: boolean;
|
|
198
242
|
}
|
|
199
243
|
export interface BadgeOpts {
|
|
200
|
-
tone?: 'accent' | 'success' | 'warning' | 'danger';
|
|
244
|
+
tone?: 'accent' | 'success' | 'warning' | 'danger' | 'muted';
|
|
245
|
+
dot?: boolean;
|
|
246
|
+
}
|
|
247
|
+
export interface NumOpts {
|
|
248
|
+
tone?: 'pos' | 'neg' | 'muted';
|
|
201
249
|
}
|
|
202
250
|
export interface ChipOpts {
|
|
203
251
|
accent?: boolean;
|
|
204
252
|
}
|
|
205
253
|
export interface LinkOpts {
|
|
206
254
|
arrow?: boolean;
|
|
255
|
+
cta?: boolean;
|
|
207
256
|
}
|
|
208
257
|
export interface DotOpts {
|
|
209
258
|
tone?: 'accent' | 'success' | 'warning' | 'danger';
|
|
@@ -219,6 +268,7 @@ export interface TableOpts {
|
|
|
219
268
|
}
|
|
220
269
|
export interface EyebrowOpts {
|
|
221
270
|
muted?: boolean;
|
|
271
|
+
sm?: boolean;
|
|
222
272
|
}
|
|
223
273
|
export interface HintOpts {
|
|
224
274
|
error?: boolean;
|
|
@@ -259,6 +309,7 @@ export interface ProseOpts {
|
|
|
259
309
|
}
|
|
260
310
|
export interface ContainerOpts {
|
|
261
311
|
narrow?: boolean;
|
|
312
|
+
wide?: boolean;
|
|
262
313
|
}
|
|
263
314
|
export interface TagOpts {
|
|
264
315
|
accent?: boolean;
|
|
@@ -268,6 +319,7 @@ export interface Ui {
|
|
|
268
319
|
button(opts?: ButtonOpts): string;
|
|
269
320
|
card(opts?: CardOpts): string;
|
|
270
321
|
badge(opts?: BadgeOpts): string;
|
|
322
|
+
num(opts?: NumOpts): string;
|
|
271
323
|
chip(opts?: ChipOpts): string;
|
|
272
324
|
link(opts?: LinkOpts): string;
|
|
273
325
|
dot(opts?: DotOpts): string;
|
package/classes/index.js
CHANGED
|
@@ -27,15 +27,27 @@ export const cls = Object.freeze({
|
|
|
27
27
|
cardHead: 'ui-card__head',
|
|
28
28
|
cardAccent: 'ui-card--accent',
|
|
29
29
|
cardInteractive: 'ui-card--interactive',
|
|
30
|
+
stat: 'ui-stat',
|
|
31
|
+
statgrid: 'ui-statgrid',
|
|
32
|
+
statLabel: 'ui-stat__label',
|
|
33
|
+
statValue: 'ui-stat__value',
|
|
34
|
+
statDelta: 'ui-stat__delta',
|
|
35
|
+
num: 'ui-num',
|
|
36
|
+
numPos: 'ui-num--pos',
|
|
37
|
+
numNeg: 'ui-num--neg',
|
|
38
|
+
numMuted: 'ui-num--muted',
|
|
30
39
|
badge: 'ui-badge',
|
|
31
40
|
badgeAccent: 'ui-badge--accent',
|
|
32
41
|
badgeSuccess: 'ui-badge--success',
|
|
33
42
|
badgeWarning: 'ui-badge--warning',
|
|
34
43
|
badgeDanger: 'ui-badge--danger',
|
|
44
|
+
badgeMuted: 'ui-badge--muted',
|
|
45
|
+
badgeDot: 'ui-badge--dot',
|
|
35
46
|
chip: 'ui-chip',
|
|
36
47
|
chipAccent: 'ui-chip--accent',
|
|
37
48
|
link: 'ui-link',
|
|
38
49
|
linkArrow: 'ui-link--arrow',
|
|
50
|
+
linkCta: 'ui-link--cta',
|
|
39
51
|
keyValue: 'ui-key-value',
|
|
40
52
|
// dots
|
|
41
53
|
dot: 'ui-dot',
|
|
@@ -47,6 +59,10 @@ export const cls = Object.freeze({
|
|
|
47
59
|
dotgrid: 'ui-dotgrid',
|
|
48
60
|
dotgridAccent: 'ui-dotgrid--accent',
|
|
49
61
|
dotgridDense: 'ui-dotgrid--dense',
|
|
62
|
+
dotmatrix: 'ui-dotmatrix',
|
|
63
|
+
dotmatrixCell: 'ui-dotmatrix__cell',
|
|
64
|
+
dotmatrixCellHot: 'ui-dotmatrix__cell--hot',
|
|
65
|
+
dotmatrixCellAccent: 'ui-dotmatrix__cell--accent',
|
|
50
66
|
dotfield: 'ui-dotfield',
|
|
51
67
|
dotrule: 'ui-dotrule',
|
|
52
68
|
dotbar: 'ui-dotbar',
|
|
@@ -68,6 +84,13 @@ export const cls = Object.freeze({
|
|
|
68
84
|
switchThumb: 'ui-switch__thumb',
|
|
69
85
|
hint: 'ui-hint',
|
|
70
86
|
hintError: 'ui-hint--error',
|
|
87
|
+
inputGroup: 'ui-input-group',
|
|
88
|
+
inputGroupAddon: 'ui-input-group__addon',
|
|
89
|
+
file: 'ui-file',
|
|
90
|
+
range: 'ui-range',
|
|
91
|
+
errorSummary: 'ui-error-summary',
|
|
92
|
+
errorSummaryTitle: 'ui-error-summary__title',
|
|
93
|
+
errorSummaryList: 'ui-error-summary__list',
|
|
71
94
|
// feedback
|
|
72
95
|
alert: 'ui-alert',
|
|
73
96
|
alertTitle: 'ui-alert__title',
|
|
@@ -78,14 +101,17 @@ export const cls = Object.freeze({
|
|
|
78
101
|
alertWarning: 'ui-alert--warning',
|
|
79
102
|
alertDanger: 'ui-alert--danger',
|
|
80
103
|
toastStack: 'ui-toast-stack',
|
|
104
|
+
toastStackAssertive: 'ui-toast-stack--assertive',
|
|
81
105
|
toast: 'ui-toast',
|
|
82
106
|
toastTitle: 'ui-toast__title',
|
|
107
|
+
toastClose: 'ui-toast__close',
|
|
83
108
|
toastAccent: 'ui-toast--accent',
|
|
84
109
|
toastSuccess: 'ui-toast--success',
|
|
85
110
|
toastWarning: 'ui-toast--warning',
|
|
86
111
|
toastDanger: 'ui-toast--danger',
|
|
87
112
|
tooltip: 'ui-tooltip',
|
|
88
113
|
tooltipBubble: 'ui-tooltip__bubble',
|
|
114
|
+
popover: 'ui-popover',
|
|
89
115
|
progress: 'ui-progress',
|
|
90
116
|
progressBar: 'ui-progress__bar',
|
|
91
117
|
progressIndeterminate: 'ui-progress--indeterminate',
|
|
@@ -102,6 +128,11 @@ export const cls = Object.freeze({
|
|
|
102
128
|
menuLabel: 'ui-menu__label',
|
|
103
129
|
menuItem: 'ui-menu__item',
|
|
104
130
|
menuSep: 'ui-menu__sep',
|
|
131
|
+
combobox: 'ui-combobox',
|
|
132
|
+
comboboxInput: 'ui-combobox__input',
|
|
133
|
+
comboboxList: 'ui-combobox__list',
|
|
134
|
+
comboboxOption: 'ui-combobox__option',
|
|
135
|
+
comboboxEmpty: 'ui-combobox__empty',
|
|
105
136
|
// disclosure
|
|
106
137
|
tabs: 'ui-tabs',
|
|
107
138
|
tabsList: 'ui-tabs__list',
|
|
@@ -128,6 +159,11 @@ export const cls = Object.freeze({
|
|
|
128
159
|
tableLined: 'ui-table--lined',
|
|
129
160
|
tableWrap: 'ui-table-wrap',
|
|
130
161
|
tableEmpty: 'ui-table__empty',
|
|
162
|
+
tableSort: 'ui-table__sort',
|
|
163
|
+
tableSelect: 'ui-table__select',
|
|
164
|
+
tableToolbar: 'ui-table__toolbar',
|
|
165
|
+
tableSelectable: 'ui-table--selectable',
|
|
166
|
+
tableLoading: 'ui-table--loading',
|
|
131
167
|
// shell / layout
|
|
132
168
|
panel: 'ui-panel',
|
|
133
169
|
panelHead: 'ui-panel__head',
|
|
@@ -136,11 +172,17 @@ export const cls = Object.freeze({
|
|
|
136
172
|
cluster: 'ui-cluster',
|
|
137
173
|
clusterBetween: 'ui-cluster--between',
|
|
138
174
|
grid: 'ui-grid',
|
|
175
|
+
sidebar: 'ui-sidebar',
|
|
176
|
+
switcher: 'ui-switcher',
|
|
177
|
+
center: 'ui-center',
|
|
178
|
+
ratio: 'ui-ratio',
|
|
179
|
+
cq: 'ui-cq',
|
|
139
180
|
divider: 'ui-divider',
|
|
140
181
|
status: 'ui-status',
|
|
141
182
|
// typography / utilities
|
|
142
183
|
eyebrow: 'ui-eyebrow',
|
|
143
184
|
eyebrowMuted: 'ui-eyebrow--muted',
|
|
185
|
+
eyebrowSm: 'ui-eyebrow--sm',
|
|
144
186
|
prose: 'ui-prose',
|
|
145
187
|
proseCompact: 'ui-prose--compact',
|
|
146
188
|
quote: 'ui-quote',
|
|
@@ -148,8 +190,10 @@ export const cls = Object.freeze({
|
|
|
148
190
|
// site shell
|
|
149
191
|
container: 'ui-container',
|
|
150
192
|
containerNarrow: 'ui-container--narrow',
|
|
193
|
+
containerWide: 'ui-container--wide',
|
|
151
194
|
skiplink: 'ui-skiplink',
|
|
152
195
|
siteheader: 'ui-siteheader',
|
|
196
|
+
siteheaderSticky: 'ui-siteheader--sticky',
|
|
153
197
|
siteheaderBrand: 'ui-siteheader__brand',
|
|
154
198
|
siteheaderActions: 'ui-siteheader__actions',
|
|
155
199
|
sitenav: 'ui-sitenav',
|
|
@@ -230,16 +274,25 @@ export const ui = {
|
|
|
230
274
|
),
|
|
231
275
|
card: ({ accent, interactive } = {}) =>
|
|
232
276
|
j(cls.card, accent && cls.cardAccent, interactive && cls.cardInteractive),
|
|
233
|
-
badge: ({ tone } = {}) =>
|
|
277
|
+
badge: ({ tone, dot } = {}) =>
|
|
234
278
|
j(
|
|
235
279
|
cls.badge,
|
|
236
280
|
tone === 'accent' && cls.badgeAccent,
|
|
237
281
|
tone === 'success' && cls.badgeSuccess,
|
|
238
282
|
tone === 'warning' && cls.badgeWarning,
|
|
239
283
|
tone === 'danger' && cls.badgeDanger,
|
|
284
|
+
tone === 'muted' && cls.badgeMuted,
|
|
285
|
+
dot && cls.badgeDot,
|
|
286
|
+
),
|
|
287
|
+
num: ({ tone } = {}) =>
|
|
288
|
+
j(
|
|
289
|
+
cls.num,
|
|
290
|
+
tone === 'pos' && cls.numPos,
|
|
291
|
+
tone === 'neg' && cls.numNeg,
|
|
292
|
+
tone === 'muted' && cls.numMuted,
|
|
240
293
|
),
|
|
241
294
|
chip: ({ accent } = {}) => j(cls.chip, accent && cls.chipAccent),
|
|
242
|
-
link: ({ arrow } = {}) => j(cls.link, arrow && cls.linkArrow),
|
|
295
|
+
link: ({ arrow, cta } = {}) => j(cls.link, arrow && cls.linkArrow, cta && cls.linkCta),
|
|
243
296
|
dot: ({ tone, live } = {}) =>
|
|
244
297
|
j(
|
|
245
298
|
cls.dot,
|
|
@@ -258,7 +311,7 @@ export const ui = {
|
|
|
258
311
|
density === 'comfortable' && cls.tableComfortable,
|
|
259
312
|
lined && cls.tableLined,
|
|
260
313
|
),
|
|
261
|
-
eyebrow: ({ muted } = {}) => j(cls.eyebrow, muted && cls.eyebrowMuted),
|
|
314
|
+
eyebrow: ({ muted, sm } = {}) => j(cls.eyebrow, muted && cls.eyebrowMuted, sm && cls.eyebrowSm),
|
|
262
315
|
hint: ({ error } = {}) => j(cls.hint, error && cls.hintError),
|
|
263
316
|
cluster: ({ between } = {}) => j(cls.cluster, between && cls.clusterBetween),
|
|
264
317
|
stagger: ({ auto } = {}) => j(cls.stagger, auto && cls.staggerAuto),
|
|
@@ -287,7 +340,8 @@ export const ui = {
|
|
|
287
340
|
avatar: ({ size } = {}) =>
|
|
288
341
|
j(cls.avatar, size === 'sm' && cls.avatarSm, size === 'lg' && cls.avatarLg),
|
|
289
342
|
prose: ({ compact } = {}) => j(cls.prose, compact && cls.proseCompact),
|
|
290
|
-
container: ({ narrow } = {}) =>
|
|
343
|
+
container: ({ narrow, wide } = {}) =>
|
|
344
|
+
j(cls.container, narrow && cls.containerNarrow, wide && cls.containerWide),
|
|
291
345
|
tag: ({ accent } = {}) => j(cls.tag, accent && cls.tagAccent),
|
|
292
346
|
};
|
|
293
347
|
|