@tcn/ui 0.14.0 → 0.16.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/dist/column.css +1 -1
- package/dist/inputs/multiselect/multiselect_inline_values.js +9 -7
- package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_values.js +4 -2
- package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
- package/dist/layouts/containers/columns/column.d.ts +6 -0
- package/dist/layouts/containers/columns/column.d.ts.map +1 -0
- package/dist/layouts/containers/columns/column.js +20 -0
- package/dist/layouts/containers/columns/column.js.map +1 -0
- package/dist/layouts/containers/columns/columns.d.ts +6 -0
- package/dist/layouts/containers/columns/columns.d.ts.map +1 -0
- package/dist/layouts/containers/columns/columns.js +11 -0
- package/dist/layouts/containers/columns/columns.js.map +1 -0
- package/dist/layouts/index.d.ts +3 -5
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +27 -27
- package/dist/layouts/section/detail.d.ts +4 -0
- package/dist/layouts/section/detail.d.ts.map +1 -0
- package/dist/layouts/section/detail.js +11 -0
- package/dist/layouts/section/detail.js.map +1 -0
- package/dist/layouts/section/heading.js +1 -1
- package/dist/layouts/section/index.d.ts +4 -0
- package/dist/layouts/section/index.d.ts.map +1 -0
- package/dist/layouts/section/index.js +9 -0
- package/dist/layouts/section/index.js.map +1 -0
- package/dist/layouts/section/section.js +1 -1
- package/dist/section.css +1 -1
- package/dist/section.module-BXlxYmJK.js +5 -0
- package/dist/section.module-BXlxYmJK.js.map +1 -0
- package/dist/surfaces/pop_confirm/pop_confirm.js +4 -4
- package/dist/term.css +1 -0
- package/dist/themes/build_stylesheet.d.ts +2 -0
- package/dist/themes/build_stylesheet.d.ts.map +1 -0
- package/dist/themes/build_stylesheet.js +9 -0
- package/dist/themes/build_stylesheet.js.map +1 -0
- package/dist/themes/theme_variables.d.ts +7 -0
- package/dist/themes/theme_variables.d.ts.map +1 -1
- package/dist/themes/theme_variables.js +16 -9
- package/dist/themes/theme_variables.js.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.css +1 -1
- package/dist/themes/themes/ergo/ergo_theme.d.ts.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.js +281 -161
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
- package/dist/themes/themes/ergo/tokens/system_tokens.css +1 -0
- package/dist/themes/themes/ergo/tokens/theme_tokens.css +1 -0
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +4 -2
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/key/key.d.ts +8 -1
- package/dist/tokens/key/key.d.ts.map +1 -1
- package/dist/tokens/key/key.js +20 -3
- package/dist/tokens/key/key.js.map +1 -1
- package/dist/tokens/term/term.d.ts +4 -0
- package/dist/tokens/term/term.d.ts.map +1 -0
- package/dist/tokens/term/term.js +20 -0
- package/dist/tokens/term/term.js.map +1 -0
- package/dist/tokens/value/value.d.ts +8 -1
- package/dist/tokens/value/value.d.ts.map +1 -1
- package/dist/tokens/value/value.js +23 -5
- package/dist/tokens/value/value.js.map +1 -1
- package/dist/utils/types/variations.d.ts +1 -0
- package/dist/utils/types/variations.d.ts.map +1 -1
- package/dist/value.css +1 -0
- package/dist/value.module-DFaCouFD.js +5 -0
- package/dist/value.module-DFaCouFD.js.map +1 -0
- package/package.json +1 -1
- package/src/layouts/__stories__/columns.stories.tsx +46 -0
- package/src/layouts/__stories__/rail.stories.tsx +4 -4
- package/src/layouts/__stories__/utils.tsx +4 -4
- package/src/layouts/containers/columns/column.module.css +14 -0
- package/src/layouts/containers/columns/column.tsx +22 -0
- package/src/layouts/containers/columns/columns.tsx +16 -0
- package/src/layouts/index.ts +3 -5
- package/src/layouts/section/__stories__/section.stories.tsx +79 -50
- package/src/layouts/section/detail.tsx +14 -0
- package/src/layouts/section/index.ts +3 -0
- package/src/layouts/section/section.module.css +0 -36
- package/src/surfaces/page/page.stories.tsx +32 -28
- package/src/surfaces/panel/__stories__/panel.stories.tsx +147 -40
- package/src/themes/build_stylesheet.ts +5 -0
- package/src/themes/theme_variables.ts +9 -0
- package/src/themes/themes/ergo/ergo_theme.css +175 -222
- package/src/themes/themes/ergo/ergo_theme.ts +4 -2
- package/src/themes/themes/ergo/tokens/system_tokens.css +68 -0
- package/src/themes/themes/ergo/tokens/theme_tokens.css +99 -0
- package/src/tokens/index.ts +1 -0
- package/src/tokens/key/key.tsx +23 -2
- package/src/tokens/term/term.module.css +14 -0
- package/src/tokens/term/term.stories.tsx +84 -0
- package/src/tokens/term/term.tsx +20 -0
- package/src/tokens/value/value.module.css +5 -0
- package/src/tokens/value/value.tsx +24 -2
- package/src/utils/types/variations.ts +1 -0
- package/dist/layouts/column/column.d.ts +0 -10
- package/dist/layouts/column/column.d.ts.map +0 -1
- package/dist/layouts/column/column.js +0 -52
- package/dist/layouts/column/column.js.map +0 -1
- package/dist/layouts/containers/side/side.d.ts +0 -6
- package/dist/layouts/containers/side/side.d.ts.map +0 -1
- package/dist/layouts/containers/side/side.js +0 -22
- package/dist/layouts/containers/side/side.js.map +0 -1
- package/dist/layouts/row/row.d.ts +0 -4
- package/dist/layouts/row/row.d.ts.map +0 -1
- package/dist/layouts/row/row.js +0 -11
- package/dist/layouts/row/row.js.map +0 -1
- package/dist/row.css +0 -1
- package/dist/section.module-0wyGkhDg.js +0 -5
- package/dist/section.module-0wyGkhDg.js.map +0 -1
- package/dist/side.css +0 -1
- package/src/layouts/column/column.module.css +0 -35
- package/src/layouts/column/column.tsx +0 -57
- package/src/layouts/containers/side/side.module.css +0 -7
- package/src/layouts/containers/side/side.tsx +0 -25
- package/src/layouts/row/row.module.css +0 -5
- package/src/layouts/row/row.tsx +0 -15
|
@@ -2,7 +2,9 @@ import { GridOneIcon } from '@tcn/icons/grid_one_icon.js';
|
|
|
2
2
|
import { Button } from '../../../actions/button/button/button.js';
|
|
3
3
|
import { Footer } from '../../../layouts/footer/footer.js';
|
|
4
4
|
import { Header } from '../../../layouts/header/header.js';
|
|
5
|
-
import {
|
|
5
|
+
import { Column } from '../../../layouts/containers/columns/column.js';
|
|
6
|
+
import { Columns } from '../../../layouts/containers/columns/columns.js';
|
|
7
|
+
import { Detail, Heading, Scaffold, Section } from '../../../layouts/index.js';
|
|
6
8
|
import { UtilityBar } from '../../../layouts/utility_bar/utility_bar.js';
|
|
7
9
|
import { Box, HStack, Spacer } from '../../../stacks/index.js';
|
|
8
10
|
import { Title } from '../../../typography/title/title.js';
|
|
@@ -19,9 +21,11 @@ import { ChevronsRightIcon } from '@tcn/icons/chevrons_right_icon.js';
|
|
|
19
21
|
import { ChevronRightIcon } from '@tcn/icons/chevron_right_icon.js';
|
|
20
22
|
import { Toggle } from '../../../actions/toggle/toggle.js';
|
|
21
23
|
import { CrossIcon } from '@tcn/icons/cross_icon.js';
|
|
22
|
-
import { BodyText } from '../../../typography/index.js';
|
|
23
24
|
import { Card } from '../../card/card.js';
|
|
24
|
-
import {
|
|
25
|
+
import { Callout } from '../../../typography/index.js';
|
|
26
|
+
import { Term } from '../../../tokens/term/term.js';
|
|
27
|
+
import { Key } from '../../../tokens/key/key.js';
|
|
28
|
+
import { Value } from '../../../tokens/value/value.js';
|
|
25
29
|
|
|
26
30
|
export default {
|
|
27
31
|
title: 'Surfaces/Panel',
|
|
@@ -49,7 +53,9 @@ const SectionMockData: React.FC<{
|
|
|
49
53
|
<Spacer />
|
|
50
54
|
<UtilGroupExample />
|
|
51
55
|
</Heading>
|
|
52
|
-
<
|
|
56
|
+
<Detail>
|
|
57
|
+
<Ipsum />
|
|
58
|
+
</Detail>
|
|
53
59
|
{children}
|
|
54
60
|
</Section>
|
|
55
61
|
);
|
|
@@ -204,12 +210,24 @@ export const WithTable = () => {
|
|
|
204
210
|
<Scaffold>
|
|
205
211
|
<Section>
|
|
206
212
|
<Heading>Personal Information</Heading>
|
|
207
|
-
<
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
+
<Detail>
|
|
214
|
+
<Callout>
|
|
215
|
+
John Doe is a software engineer at FooBaz. He is a very smart guy and he
|
|
216
|
+
loves to code.
|
|
217
|
+
</Callout>
|
|
218
|
+
<Term>
|
|
219
|
+
<Key>Name</Key>
|
|
220
|
+
<Value>John Doe</Value>
|
|
221
|
+
</Term>
|
|
222
|
+
<Term>
|
|
223
|
+
<Key>Age</Key>
|
|
224
|
+
<Value>25</Value>
|
|
225
|
+
</Term>
|
|
226
|
+
<Term>
|
|
227
|
+
<Key>Email</Key>
|
|
228
|
+
<Value>john.doe@example.com</Value>
|
|
229
|
+
</Term>
|
|
230
|
+
</Detail>
|
|
213
231
|
</Section>
|
|
214
232
|
</Scaffold>
|
|
215
233
|
</Panel>
|
|
@@ -237,7 +255,7 @@ export const WithCards = () => {
|
|
|
237
255
|
<Scaffold>
|
|
238
256
|
<Section>
|
|
239
257
|
<Heading>Section with Cards</Heading>
|
|
240
|
-
<
|
|
258
|
+
<Detail>
|
|
241
259
|
<Card>
|
|
242
260
|
<Header>
|
|
243
261
|
<Title>Card One</Title>
|
|
@@ -246,8 +264,6 @@ export const WithCards = () => {
|
|
|
246
264
|
<CardIpsum />
|
|
247
265
|
</Scaffold>
|
|
248
266
|
</Card>
|
|
249
|
-
</Row>
|
|
250
|
-
<Row>
|
|
251
267
|
<Card>
|
|
252
268
|
<Header>
|
|
253
269
|
<Title>Card Two</Title>
|
|
@@ -256,11 +272,11 @@ export const WithCards = () => {
|
|
|
256
272
|
<CardIpsum />
|
|
257
273
|
</Scaffold>
|
|
258
274
|
</Card>
|
|
259
|
-
</
|
|
275
|
+
</Detail>
|
|
260
276
|
</Section>
|
|
261
277
|
<Section>
|
|
262
278
|
<Heading>Another Section with a Card</Heading>
|
|
263
|
-
<
|
|
279
|
+
<Detail>
|
|
264
280
|
<Card>
|
|
265
281
|
<Header>
|
|
266
282
|
<Title>Card Three</Title>
|
|
@@ -269,7 +285,7 @@ export const WithCards = () => {
|
|
|
269
285
|
<CardIpsum />
|
|
270
286
|
</Scaffold>
|
|
271
287
|
</Card>
|
|
272
|
-
</
|
|
288
|
+
</Detail>
|
|
273
289
|
</Section>
|
|
274
290
|
</Scaffold>
|
|
275
291
|
</Panel>
|
|
@@ -280,33 +296,124 @@ export const WithCards = () => {
|
|
|
280
296
|
<UtilGroupExample />
|
|
281
297
|
</Header>
|
|
282
298
|
<Scaffold>
|
|
283
|
-
<
|
|
284
|
-
<
|
|
285
|
-
<
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
<
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
<
|
|
293
|
-
<
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
<
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
<
|
|
301
|
-
<
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
<
|
|
305
|
-
|
|
306
|
-
|
|
299
|
+
<Detail>
|
|
300
|
+
<Card>
|
|
301
|
+
<Header>
|
|
302
|
+
<Title>Card A</Title>
|
|
303
|
+
</Header>
|
|
304
|
+
<Scaffold>
|
|
305
|
+
<CardIpsum />
|
|
306
|
+
</Scaffold>
|
|
307
|
+
</Card>
|
|
308
|
+
<Card>
|
|
309
|
+
<Header>
|
|
310
|
+
<Title>Card B</Title>
|
|
311
|
+
</Header>
|
|
312
|
+
<Scaffold>
|
|
313
|
+
<CardIpsum />
|
|
314
|
+
</Scaffold>
|
|
315
|
+
</Card>
|
|
316
|
+
<Card>
|
|
317
|
+
<Header>
|
|
318
|
+
<Title>Card C</Title>
|
|
319
|
+
</Header>
|
|
320
|
+
<Scaffold>
|
|
321
|
+
<CardIpsum />
|
|
322
|
+
</Scaffold>
|
|
323
|
+
</Card>
|
|
324
|
+
</Detail>
|
|
307
325
|
</Scaffold>
|
|
308
326
|
</Panel>
|
|
309
327
|
</HStack>
|
|
310
328
|
</Box>
|
|
311
329
|
);
|
|
312
330
|
};
|
|
331
|
+
|
|
332
|
+
export const WithColumns = () => {
|
|
333
|
+
return (
|
|
334
|
+
<Box className={styles['stories-container']}>
|
|
335
|
+
<Panel maxHeight="600px">
|
|
336
|
+
<Header>
|
|
337
|
+
<Title emphasis="strong">Panel With Columns</Title>
|
|
338
|
+
<Spacer />
|
|
339
|
+
<UtilGroupExample />
|
|
340
|
+
</Header>
|
|
341
|
+
<Scaffold>
|
|
342
|
+
<Columns>
|
|
343
|
+
<Column minWidth="300px">
|
|
344
|
+
<Section>
|
|
345
|
+
<Heading>General</Heading>
|
|
346
|
+
<Detail>
|
|
347
|
+
<Term>
|
|
348
|
+
<Key>Agent</Key>
|
|
349
|
+
<Value>John Doe</Value>
|
|
350
|
+
</Term>
|
|
351
|
+
<Term>
|
|
352
|
+
<Key>Queue</Key>
|
|
353
|
+
<Value>Support</Value>
|
|
354
|
+
</Term>
|
|
355
|
+
<Term>
|
|
356
|
+
<Key>Status</Key>
|
|
357
|
+
<Value>Active</Value>
|
|
358
|
+
</Term>
|
|
359
|
+
</Detail>
|
|
360
|
+
</Section>
|
|
361
|
+
</Column>
|
|
362
|
+
<Column minWidth="300px">
|
|
363
|
+
<Section>
|
|
364
|
+
<Heading>Contact</Heading>
|
|
365
|
+
<Detail>
|
|
366
|
+
<Term>
|
|
367
|
+
<Key>Email</Key>
|
|
368
|
+
<Value>john.doe@example.com</Value>
|
|
369
|
+
</Term>
|
|
370
|
+
<Term>
|
|
371
|
+
<Key>Phone</Key>
|
|
372
|
+
<Value>+1 555 000 1234</Value>
|
|
373
|
+
</Term>
|
|
374
|
+
<Term>
|
|
375
|
+
<Key>Start Date</Key>
|
|
376
|
+
<Value>05/27/2023</Value>
|
|
377
|
+
</Term>
|
|
378
|
+
</Detail>
|
|
379
|
+
</Section>
|
|
380
|
+
</Column>
|
|
381
|
+
</Columns>
|
|
382
|
+
</Scaffold>
|
|
383
|
+
<Footer>
|
|
384
|
+
<Spacer />
|
|
385
|
+
<Button hierarchy="secondary">Cancel</Button>
|
|
386
|
+
<Button hierarchy="primary">Save</Button>
|
|
387
|
+
</Footer>
|
|
388
|
+
</Panel>
|
|
389
|
+
</Box>
|
|
390
|
+
);
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
export const WithDetailOnly = () => {
|
|
394
|
+
return (
|
|
395
|
+
<Box className={styles['stories-container']}>
|
|
396
|
+
<Panel maxHeight="400px" width="300px">
|
|
397
|
+
<Header>
|
|
398
|
+
<Title emphasis="strong">Request Details</Title>
|
|
399
|
+
</Header>
|
|
400
|
+
<Scaffold>
|
|
401
|
+
<Detail>
|
|
402
|
+
<Term>
|
|
403
|
+
<Key>Agent</Key>
|
|
404
|
+
<Value>John Doe</Value>
|
|
405
|
+
</Term>
|
|
406
|
+
<Term>
|
|
407
|
+
<Key>Start Date</Key>
|
|
408
|
+
<Value>12:00 05/27/2023</Value>
|
|
409
|
+
</Term>
|
|
410
|
+
<Term>
|
|
411
|
+
<Key>End Date</Key>
|
|
412
|
+
<Value>12:00 05/29/2023</Value>
|
|
413
|
+
</Term>
|
|
414
|
+
</Detail>
|
|
415
|
+
</Scaffold>
|
|
416
|
+
</Panel>
|
|
417
|
+
</Box>
|
|
418
|
+
);
|
|
419
|
+
};
|
|
@@ -24,6 +24,14 @@ const asyncColors = {
|
|
|
24
24
|
failed: 'var(--async-color-failed)',
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
const actionSeverity = {
|
|
28
|
+
dangerous: 'var(--action-severity-dangerous)',
|
|
29
|
+
cautious: 'var(--action-severity-cautious)',
|
|
30
|
+
neutral: 'var(--action-severity-neutral)',
|
|
31
|
+
suggested: 'var(--action-severity-suggested)',
|
|
32
|
+
encouraged: 'var(--action-severity-encouraged)',
|
|
33
|
+
};
|
|
34
|
+
|
|
27
35
|
const colors = {
|
|
28
36
|
primary: {
|
|
29
37
|
faint: 'var(--primary-color-faint)',
|
|
@@ -78,4 +86,5 @@ export const theme = {
|
|
|
78
86
|
accentColor: 'var(--accent-color)',
|
|
79
87
|
statusColors,
|
|
80
88
|
asyncColors,
|
|
89
|
+
actionSeverity,
|
|
81
90
|
};
|