@atomic-ui/ui 0.7.1 → 0.7.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 +8 -8
- package/custom-elements.json +460 -28
- package/dist/base/FieldElement.d.ts +4 -0
- package/dist/{chunk-TRZO5CHU.js → chunk-26BO3W56.js} +8 -4
- package/dist/chunk-26BO3W56.js.map +1 -0
- package/dist/{chunk-4ZQTXTPA.js → chunk-2EP3IV3G.js} +8 -4
- package/dist/chunk-2EP3IV3G.js.map +1 -0
- package/dist/{chunk-NU34ZQFR.js → chunk-2ZF3J7OO.js} +8 -5
- package/dist/chunk-2ZF3J7OO.js.map +1 -0
- package/dist/{chunk-WP5WJ4V5.js → chunk-3NEWOO2P.js} +3 -3
- package/dist/chunk-3NEWOO2P.js.map +1 -0
- package/dist/{chunk-AMDTBUUL.js → chunk-3T7J66Z2.js} +16 -4
- package/dist/chunk-3T7J66Z2.js.map +1 -0
- package/dist/{chunk-XU2XODVH.js → chunk-5OJAJA3U.js} +3 -3
- package/dist/chunk-5OJAJA3U.js.map +1 -0
- package/dist/{chunk-3EF4T242.js → chunk-6PMA6NHE.js} +8 -4
- package/dist/chunk-6PMA6NHE.js.map +1 -0
- package/dist/{chunk-HNBG2POR.js → chunk-7C56LPNJ.js} +2 -2
- package/dist/{chunk-HNBG2POR.js.map → chunk-7C56LPNJ.js.map} +1 -1
- package/dist/{chunk-EJSX4WCD.js → chunk-7UWJXPR3.js} +12 -8
- package/dist/chunk-7UWJXPR3.js.map +1 -0
- package/dist/{chunk-WH43U4IY.js → chunk-A4M3A4SZ.js} +4 -4
- package/dist/{chunk-WH43U4IY.js.map → chunk-A4M3A4SZ.js.map} +1 -1
- package/dist/{chunk-I54DOEZB.js → chunk-AG4EP3OY.js} +3 -3
- package/dist/{chunk-I54DOEZB.js.map → chunk-AG4EP3OY.js.map} +1 -1
- package/dist/{chunk-WS4AYRSL.js → chunk-AL4IUSML.js} +7 -4
- package/dist/{chunk-WS4AYRSL.js.map → chunk-AL4IUSML.js.map} +1 -1
- package/dist/{chunk-ZQBEFP2O.js → chunk-APQEXM4I.js} +8 -4
- package/dist/chunk-APQEXM4I.js.map +1 -0
- package/dist/{chunk-YYYQPKQ7.js → chunk-AURT72IC.js} +2 -2
- package/dist/{chunk-KFAGXPIK.js → chunk-AVDSYLOY.js} +3 -3
- package/dist/{chunk-KFAGXPIK.js.map → chunk-AVDSYLOY.js.map} +1 -1
- package/dist/{chunk-GJPHQLLN.js → chunk-AYKYHZGQ.js} +2 -2
- package/dist/{chunk-GJPHQLLN.js.map → chunk-AYKYHZGQ.js.map} +1 -1
- package/dist/{chunk-QBORJTS4.js → chunk-D3JWVMJE.js} +55 -19
- package/dist/chunk-D3JWVMJE.js.map +1 -0
- package/dist/{chunk-RXX4CN5J.js → chunk-EGJZDKMW.js} +2 -2
- package/dist/{chunk-RXX4CN5J.js.map → chunk-EGJZDKMW.js.map} +1 -1
- package/dist/{chunk-UPOTBKKK.js → chunk-FU3CEHBS.js} +2 -2
- package/dist/{chunk-UPOTBKKK.js.map → chunk-FU3CEHBS.js.map} +1 -1
- package/dist/{chunk-FWR6SEIA.js → chunk-HA6OJRVI.js} +17 -6
- package/dist/chunk-HA6OJRVI.js.map +1 -0
- package/dist/{chunk-XZQH2M5I.js → chunk-HURHKQTJ.js} +18 -8
- package/dist/chunk-HURHKQTJ.js.map +1 -0
- package/dist/{chunk-UF6KCRNT.js → chunk-JNLKM3JT.js} +29 -13
- package/dist/chunk-JNLKM3JT.js.map +1 -0
- package/dist/{chunk-2HWO5TFV.js → chunk-KAQJVGYW.js} +14 -9
- package/dist/{chunk-2HWO5TFV.js.map → chunk-KAQJVGYW.js.map} +1 -1
- package/dist/{chunk-BMJFSUP3.js → chunk-MLKNZL5J.js} +26 -10
- package/dist/chunk-MLKNZL5J.js.map +1 -0
- package/dist/{chunk-PYVUQNFQ.js → chunk-MOO63SHZ.js} +2 -2
- package/dist/{chunk-PYVUQNFQ.js.map → chunk-MOO63SHZ.js.map} +1 -1
- package/dist/{chunk-A7YBFS4H.js → chunk-NKMJMVZP.js} +2 -2
- package/dist/{chunk-5ZQVL3V2.js → chunk-ONED3PUB.js} +8 -7
- package/dist/{chunk-5ZQVL3V2.js.map → chunk-ONED3PUB.js.map} +1 -1
- package/dist/{chunk-MLRTPQQO.js → chunk-OZGKK3N5.js} +11 -6
- package/dist/chunk-OZGKK3N5.js.map +1 -0
- package/dist/{chunk-RZWRAJCD.js → chunk-P6HG5RB2.js} +71 -29
- package/dist/chunk-P6HG5RB2.js.map +1 -0
- package/dist/{chunk-ON3QWAFV.js → chunk-TE3CBEJQ.js} +31 -12
- package/dist/chunk-TE3CBEJQ.js.map +1 -0
- package/dist/{chunk-YR6T73GY.js → chunk-V7EB7Q2M.js} +1 -1
- package/dist/chunk-V7EB7Q2M.js.map +1 -0
- package/dist/{chunk-OE6O3XQB.js → chunk-VYYY5DDZ.js} +3 -3
- package/dist/chunk-VYYY5DDZ.js.map +1 -0
- package/dist/{chunk-DE3INTHZ.js → chunk-YWP2Z3JN.js} +3 -3
- package/dist/{chunk-DE3INTHZ.js.map → chunk-YWP2Z3JN.js.map} +1 -1
- package/dist/{chunk-WS5AUJ35.js → chunk-Z2EWQMTR.js} +7 -4
- package/dist/chunk-Z2EWQMTR.js.map +1 -0
- package/dist/{chunk-INA53XXW.js → chunk-ZL3JFUIE.js} +3 -3
- package/dist/chunk-ZL3JFUIE.js.map +1 -0
- package/dist/components/accordion.js +2 -2
- package/dist/components/alert.js +2 -2
- package/dist/components/app-ui.d.ts +13 -0
- package/dist/components/app-ui.js +4 -4
- package/dist/components/badge.js +3 -3
- package/dist/components/blocks.js +4 -4
- package/dist/components/button.js +3 -3
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +3 -3
- package/dist/components/chip.js +2 -2
- package/dist/components/date-input.js +3 -3
- package/dist/components/dialog.js +2 -2
- package/dist/components/fieldset.js +2 -2
- package/dist/components/grid.js +2 -2
- package/dist/components/help.js +2 -2
- package/dist/components/icon.js +2 -2
- package/dist/components/journey.js +3 -3
- package/dist/components/layout.js +2 -2
- package/dist/components/link.js +3 -3
- package/dist/components/list.js +2 -2
- package/dist/components/media.js +2 -2
- package/dist/components/navigation.js +3 -3
- package/dist/components/page.js +2 -2
- package/dist/components/price.js +2 -2
- package/dist/components/progress.d.ts +12 -0
- package/dist/components/progress.js +2 -2
- package/dist/components/radio-group.js +3 -3
- package/dist/components/rows.js +3 -3
- package/dist/components/select.d.ts +11 -0
- package/dist/components/select.js +3 -3
- package/dist/components/shell.js +3 -3
- package/dist/components/summary-list.js +2 -2
- package/dist/components/switch.d.ts +17 -0
- package/dist/components/switch.js +3 -3
- package/dist/components/table.js +3 -3
- package/dist/components/text-input.js +4 -4
- package/dist/components/textarea.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +35 -35
- package/dist/standalone/atomic-ui.js +90 -71
- package/dist/standalone/atomic-ui.js.map +3 -3
- package/dist/standalone/index.html +189 -150
- package/package.json +2 -2
- package/scripts/copy-to-product.mjs +8 -7
- package/specimen/index.html +189 -150
- package/dist/chunk-3EF4T242.js.map +0 -1
- package/dist/chunk-4ZQTXTPA.js.map +0 -1
- package/dist/chunk-AMDTBUUL.js.map +0 -1
- package/dist/chunk-BMJFSUP3.js.map +0 -1
- package/dist/chunk-EJSX4WCD.js.map +0 -1
- package/dist/chunk-FWR6SEIA.js.map +0 -1
- package/dist/chunk-INA53XXW.js.map +0 -1
- package/dist/chunk-MLRTPQQO.js.map +0 -1
- package/dist/chunk-NU34ZQFR.js.map +0 -1
- package/dist/chunk-OE6O3XQB.js.map +0 -1
- package/dist/chunk-ON3QWAFV.js.map +0 -1
- package/dist/chunk-QBORJTS4.js.map +0 -1
- package/dist/chunk-RZWRAJCD.js.map +0 -1
- package/dist/chunk-TRZO5CHU.js.map +0 -1
- package/dist/chunk-UF6KCRNT.js.map +0 -1
- package/dist/chunk-WP5WJ4V5.js.map +0 -1
- package/dist/chunk-WS5AUJ35.js.map +0 -1
- package/dist/chunk-XU2XODVH.js.map +0 -1
- package/dist/chunk-XZQH2M5I.js.map +0 -1
- package/dist/chunk-YR6T73GY.js.map +0 -1
- package/dist/chunk-ZQBEFP2O.js.map +0 -1
- /package/dist/{chunk-YYYQPKQ7.js.map → chunk-AURT72IC.js.map} +0 -0
- /package/dist/{chunk-A7YBFS4H.js.map → chunk-NKMJMVZP.js.map} +0 -0
|
@@ -1,173 +1,212 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="en-GB">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8"
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1"
|
|
6
|
-
<title>Impakt components in a plain HTML product</title>
|
|
7
|
-
<!--
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Impakt components in a plain HTML product</title>
|
|
7
|
+
<!--
|
|
8
8
|
A plain HTML product needs two files beside this page: theme.css from
|
|
9
9
|
@atomic-ui/theme (pnpm theme:copy) and atomic-ui.js from @atomic-ui/ui
|
|
10
10
|
(pnpm ui:copy). The theme gives the page the Impakt look and gives the
|
|
11
11
|
components their tokens, in light and in dark. The script defines every
|
|
12
12
|
element when it loads.
|
|
13
13
|
-->
|
|
14
|
-
<link rel="stylesheet" href="theme.css"
|
|
15
|
-
<script type="module" src="atomic-ui.js"></script>
|
|
16
|
-
<style>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</style>
|
|
26
|
-
</head>
|
|
27
|
-
<body>
|
|
28
|
-
<a class="ik-skip" href="#main">Skip to the content</a>
|
|
29
|
-
<header class="ik-header">
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
14
|
+
<link rel="stylesheet" href="theme.css" />
|
|
15
|
+
<script type="module" src="atomic-ui.js"></script>
|
|
16
|
+
<style>
|
|
17
|
+
main { max-width: 1040px; margin: 0 auto; padding: var(--ik-space-6) var(--ik-gutter) var(--ik-space-12); }
|
|
18
|
+
section { margin-bottom: var(--ik-space-8); }
|
|
19
|
+
.lede { color: var(--ik-ink-muted); max-width: 60ch; margin: 0 0 var(--ik-space-6); }
|
|
20
|
+
.toolbar { display: flex; flex-wrap: wrap; gap: var(--ik-space-3); align-items: flex-end; margin-bottom: var(--ik-space-4); }
|
|
21
|
+
.toolbar impakt-text-input { flex: 1 1 16rem; margin: 0; }
|
|
22
|
+
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ik-space-4); }
|
|
23
|
+
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
|
|
24
|
+
.row { display: flex; flex-wrap: wrap; gap: var(--ik-space-2); align-items: center; }
|
|
25
|
+
</style>
|
|
26
|
+
</head>
|
|
27
|
+
<body>
|
|
28
|
+
<a class="ik-skip" href="#main">Skip to the content</a>
|
|
29
|
+
<header class="ik-header">
|
|
30
|
+
<a class="ik-brand" href="./"
|
|
31
|
+
><span><b>Impakt</b> <span class="ik-product">Components</span></span></a
|
|
32
|
+
>
|
|
33
|
+
<div class="row">
|
|
34
|
+
<label for="theme" class="ik-sr-only">Theme</label>
|
|
35
|
+
<select id="theme" style="min-height:44px;padding:4px 10px;font-size:16px">
|
|
36
|
+
<option value="">Auto</option>
|
|
37
|
+
<option value="light">Light</option>
|
|
38
|
+
<option value="dark">Dark</option>
|
|
39
|
+
</select>
|
|
40
|
+
<impakt-menu
|
|
41
|
+
id="account"
|
|
42
|
+
label="Account"
|
|
43
|
+
edge="end"
|
|
44
|
+
items='[{"text":"Profile","href":"#profile","icon":"user"},{"text":"Settings","value":"settings"},{"text":"Sign out","value":"sign-out","tone":"danger"}]'
|
|
45
|
+
></impakt-menu>
|
|
46
|
+
</div>
|
|
47
|
+
</header>
|
|
41
48
|
|
|
42
|
-
<main id="main">
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
<main id="main">
|
|
50
|
+
<h1>Components for the products</h1>
|
|
51
|
+
<p class="lede">
|
|
52
|
+
The parts the apps and the AI tools use most, drawn by the Impakt components on a page styled by the product theme. Change the theme at the top to see
|
|
53
|
+
the dark version, and narrow the window to see the phone layout.
|
|
54
|
+
</p>
|
|
45
55
|
|
|
46
|
-
|
|
56
|
+
<impakt-error-summary id="problems"></impakt-error-summary>
|
|
47
57
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
<section aria-labelledby="h-cases">
|
|
59
|
+
<h2 id="h-cases">A table with search, sorting, selection and pages</h2>
|
|
60
|
+
<div class="card">
|
|
61
|
+
<div class="toolbar">
|
|
62
|
+
<impakt-text-input id="search" type="search" label="Search cases" description="By name or reference"></impakt-text-input>
|
|
63
|
+
<impakt-menu
|
|
64
|
+
id="bulk"
|
|
65
|
+
label="With selected"
|
|
66
|
+
items='[{"text":"Export","value":"export","icon":"download"},{"text":"Archive","value":"archive"}]'
|
|
67
|
+
></impakt-menu>
|
|
68
|
+
</div>
|
|
69
|
+
<impakt-table
|
|
70
|
+
id="cases"
|
|
71
|
+
caption="Open cases"
|
|
72
|
+
stack
|
|
73
|
+
selectable
|
|
74
|
+
sort-key="opened"
|
|
75
|
+
sort-direction="descending"
|
|
76
|
+
empty-text="No cases match your search."
|
|
77
|
+
columns='[{"key":"ref","label":"Reference","sortable":true},{"key":"name","label":"Client","sortable":true},{"key":"status","label":"Status"},{"key":"opened","label":"Opened","sortable":true},{"key":"fee","label":"Fee","numeric":true,"sortable":true}]'
|
|
78
|
+
rows='[{"id":"c1","ref":"HB-1042","name":"Amira Hassan","status":"In progress","opened":"2026-11-02","fee":"£1,250"},{"id":"c2","ref":"HB-1043","name":"Tom Price","status":"Waiting","opened":"2026-11-09","fee":"£480"},{"id":"c3","ref":"HB-1044","name":"Sofia Rossi","status":"Done","opened":"2026-10-21","fee":"£12,400"},{"id":"c4","ref":"HB-1045","name":"Ben Okafor","status":"In progress","opened":"2026-11-15","fee":"£990"}]'
|
|
79
|
+
>
|
|
80
|
+
<impakt-badge slot="cell:c1:status" tone="info">In progress</impakt-badge>
|
|
81
|
+
<impakt-badge slot="cell:c2:status" tone="warning">Waiting</impakt-badge>
|
|
82
|
+
<impakt-badge slot="cell:c3:status" tone="success">Done</impakt-badge>
|
|
83
|
+
<impakt-badge slot="cell:c4:status" tone="info">In progress</impakt-badge>
|
|
84
|
+
</impakt-table>
|
|
85
|
+
<impakt-pagination id="pages" page="2" pages="9"></impakt-pagination>
|
|
86
|
+
</div>
|
|
87
|
+
<impakt-empty-state framed heading="No documents yet" lead="Documents you upload for this case appear here." heading-level="3" icon="document"
|
|
88
|
+
><impakt-button slot="actions" variant="secondary" href="#upload">Upload a document</impakt-button></impakt-empty-state
|
|
89
|
+
>
|
|
90
|
+
</section>
|
|
67
91
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
92
|
+
<section aria-labelledby="h-tabs">
|
|
93
|
+
<h2 id="h-tabs">Tabs</h2>
|
|
94
|
+
<impakt-tabs
|
|
95
|
+
id="tabs"
|
|
96
|
+
label="Case"
|
|
97
|
+
two-rows
|
|
98
|
+
selected="files"
|
|
99
|
+
items='[{"id":"summary","label":"Summary","body":"The case at a glance."},{"id":"tasks","label":"Tasks","body":""},{"id":"files","label":"Files","body":""},{"id":"messages","label":"Messages","body":"No messages yet."},{"id":"payments","label":"Payments","body":"Nothing to pay."},{"id":"history","label":"History","body":"Opened on 2 November 2026."}]'
|
|
100
|
+
>
|
|
101
|
+
<div slot="tasks">
|
|
102
|
+
<impakt-task-list
|
|
103
|
+
heading="Your import"
|
|
104
|
+
heading-level="3"
|
|
105
|
+
items='[{"id":"t1","title":"Vehicle details","href":"#vehicle","status":"done"},{"id":"t2","title":"Proof of ownership","href":"#upload","status":"in-progress","hint":"Takes about five minutes"},{"id":"t3","title":"Payment","href":"#pay","status":"not-started"},{"id":"t4","title":"Registration","status":"cannot-start"}]'
|
|
106
|
+
></impakt-task-list>
|
|
107
|
+
</div>
|
|
108
|
+
<div slot="files">
|
|
109
|
+
<impakt-document-link href="#v5c" label="V5C registration certificate" file-type="PDF" byte-size="245760"></impakt-document-link>
|
|
110
|
+
<impakt-file-upload id="upload" label="Add proof of ownership" description="PDF, JPG or PNG, up to 10 MB each" many-files></impakt-file-upload>
|
|
111
|
+
</div>
|
|
112
|
+
</impakt-tabs>
|
|
113
|
+
</section>
|
|
82
114
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
115
|
+
<section aria-labelledby="h-summary" class="grid2">
|
|
116
|
+
<div class="card">
|
|
117
|
+
<h2 id="h-summary">Summary list</h2>
|
|
118
|
+
<impakt-summary-list
|
|
119
|
+
rows='[{"key":"Vehicle","value":"2019 Toyota Land Cruiser","changeHref":"#vehicle"},{"key":"Port","value":"Southampton","changeHref":"#port"},{"key":"Arriving","value":"12 December 2026"}]'
|
|
120
|
+
></impakt-summary-list>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="card">
|
|
123
|
+
<h2>Badges and progress</h2>
|
|
124
|
+
<div class="row">
|
|
125
|
+
<impakt-badge>Draft</impakt-badge><impakt-badge tone="brand">New</impakt-badge><impakt-badge tone="success" icon="check">Paid</impakt-badge
|
|
126
|
+
><impakt-badge tone="warning">Due soon</impakt-badge><impakt-badge tone="danger">Overdue</impakt-badge
|
|
127
|
+
><impakt-badge tone="info">Shipped</impakt-badge>
|
|
128
|
+
</div>
|
|
129
|
+
<impakt-progress steps='[{"id":"a","label":"Details"},{"id":"b","label":"Documents"},{"id":"c","label":"Payment"}]' current="b"></impakt-progress>
|
|
130
|
+
</div>
|
|
131
|
+
</section>
|
|
96
132
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
133
|
+
<section aria-labelledby="h-form">
|
|
134
|
+
<h2 id="h-form">A form</h2>
|
|
135
|
+
<form class="card" id="form" novalidate>
|
|
136
|
+
<impakt-text-input id="name" name="name" label="Full name" required autocomplete="name"></impakt-text-input>
|
|
137
|
+
<impakt-date-input id="arrival" name="arrival" label="Arrival date" description="For example, 12 12 2026"></impakt-date-input>
|
|
138
|
+
<impakt-money-input id="value" name="value" label="Value of the vehicle" lowest="1000"></impakt-money-input>
|
|
139
|
+
<impakt-select name="port" label="Port" options='[{"value":"sou","label":"Southampton"},{"value":"til","label":"Tilbury"}]'></impakt-select>
|
|
140
|
+
<impakt-textarea name="notes" label="Anything else we should know"></impakt-textarea>
|
|
141
|
+
<impakt-checkbox name="agree" label="I confirm these details are correct"></impakt-checkbox>
|
|
142
|
+
<div class="row">
|
|
143
|
+
<impakt-button id="submit" variant="primary" type="submit">Save and continue</impakt-button>
|
|
144
|
+
<impakt-button id="open-dialog" variant="secondary">Cancel the import</impakt-button>
|
|
145
|
+
<impakt-button id="open-drawer" variant="secondary">Filters</impakt-button>
|
|
146
|
+
<impakt-button id="show-toast" variant="secondary">Save a draft</impakt-button>
|
|
147
|
+
</div>
|
|
148
|
+
</form>
|
|
149
|
+
</section>
|
|
114
150
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
</main>
|
|
151
|
+
<section aria-labelledby="h-alerts">
|
|
152
|
+
<h2 id="h-alerts">Alerts</h2>
|
|
153
|
+
<impakt-alert tone="info" heading="Your vehicle has shipped">It left Yokohama on 3 November.</impakt-alert>
|
|
154
|
+
<impakt-alert tone="success" heading="Payment received">Thank you. We have sent a receipt.</impakt-alert>
|
|
155
|
+
<impakt-alert tone="warning" heading="A document is missing">Upload proof of ownership before 1 December.</impakt-alert>
|
|
156
|
+
<impakt-alert tone="danger" heading="Payment failed">Try another card.</impakt-alert>
|
|
157
|
+
</section>
|
|
158
|
+
</main>
|
|
123
159
|
|
|
124
|
-
<impakt-dialog id="dialog" heading="Cancel this import?" phone-full-screen>
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
</impakt-dialog>
|
|
160
|
+
<impakt-dialog id="dialog" heading="Cancel this import?" phone-full-screen>
|
|
161
|
+
<p>We keep your details for 30 days, so you can start again.</p>
|
|
162
|
+
<div class="row">
|
|
163
|
+
<impakt-button id="dialog-keep" variant="primary">Keep the import</impakt-button>
|
|
164
|
+
<impakt-button id="dialog-cancel" variant="secondary">Cancel it</impakt-button>
|
|
165
|
+
</div>
|
|
166
|
+
</impakt-dialog>
|
|
131
167
|
|
|
132
|
-
<impakt-drawer id="drawer" heading="Filters">
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
168
|
+
<impakt-drawer id="drawer" heading="Filters">
|
|
169
|
+
<impakt-checkbox-group
|
|
170
|
+
label="Status"
|
|
171
|
+
options='[{"value":"open","label":"Open"},{"value":"waiting","label":"Waiting"},{"value":"done","label":"Done"}]'
|
|
172
|
+
></impakt-checkbox-group>
|
|
173
|
+
<impakt-button slot="footer" id="drawer-apply" variant="primary">Show cases</impakt-button>
|
|
174
|
+
</impakt-drawer>
|
|
136
175
|
|
|
137
|
-
<impakt-toast id="toast" tone="success" message="Draft saved" action-text="Undo"></impakt-toast>
|
|
176
|
+
<impakt-toast id="toast" tone="success" message="Draft saved" action-text="Undo"></impakt-toast>
|
|
138
177
|
|
|
139
|
-
<script type="module">
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
178
|
+
<script type="module">
|
|
179
|
+
const $ = (id) => document.getElementById(id);
|
|
180
|
+
const sel = $('theme');
|
|
181
|
+
sel.addEventListener('change', () => {
|
|
182
|
+
if (sel.value) document.documentElement.dataset.theme = sel.value;
|
|
183
|
+
else delete document.documentElement.dataset.theme;
|
|
184
|
+
});
|
|
146
185
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
186
|
+
// Search filters the table. With nothing left, the table says so.
|
|
187
|
+
const table = $('cases');
|
|
188
|
+
const all = table.rows;
|
|
189
|
+
$('search').addEventListener('impakt-change', (e) => {
|
|
190
|
+
const q = e.detail.value.trim().toLowerCase();
|
|
191
|
+
table.rows = all.filter((r) => !q || `${r.ref} ${r.name}`.toLowerCase().includes(q));
|
|
192
|
+
});
|
|
154
193
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
194
|
+
$('open-dialog').addEventListener('click', () => { $('dialog').open = true; });
|
|
195
|
+
$('dialog-keep').addEventListener('click', () => { $('dialog').open = false; });
|
|
196
|
+
$('dialog-cancel').addEventListener('click', () => { $('dialog').open = false; });
|
|
197
|
+
$('open-drawer').addEventListener('click', () => { $('drawer').open = true; });
|
|
198
|
+
$('drawer-apply').addEventListener('click', () => { $('drawer').open = false; });
|
|
199
|
+
$('show-toast').addEventListener('click', () => { $('toast').open = true; });
|
|
161
200
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
</script>
|
|
172
|
-
</body>
|
|
201
|
+
// Saving with a field empty lists the mistakes at the top, each linking to its field.
|
|
202
|
+
$('form').addEventListener('submit', (e) => {
|
|
203
|
+
e.preventDefault();
|
|
204
|
+
const items = [];
|
|
205
|
+
const name = $('name');
|
|
206
|
+
name.error = name.value ? '' : 'Enter your full name';
|
|
207
|
+
if (name.error) items.push({ id: 'name', text: name.error, href: '#name' });
|
|
208
|
+
$('problems').items = items;
|
|
209
|
+
});
|
|
210
|
+
</script>
|
|
211
|
+
</body>
|
|
173
212
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomic-ui/ui",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "The Impakt component library: standard custom elements, styled only from design tokens, built to WCAG 2.2 AA.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"lit": "^3.3.3",
|
|
34
|
-
"@atomic-ui/design-tokens": "^0.7.
|
|
34
|
+
"@atomic-ui/design-tokens": "^0.7.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^20.14.0",
|
|
@@ -33,13 +33,14 @@ const { version } = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'))
|
|
|
33
33
|
// The commit is the design system's own, so it is read only in a checkout of it, not in an installed package.
|
|
34
34
|
const inRepository = basename(dirname(root)) === 'packages' && existsSync(join(root, '..', '..', 'pnpm-workspace.yaml'));
|
|
35
35
|
let commit = inRepository ? 'uncommitted' : 'as published';
|
|
36
|
-
if (inRepository)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
if (inRepository)
|
|
37
|
+
try {
|
|
38
|
+
commit = execFileSync('git', ['rev-parse', '--short', 'HEAD'], { cwd: root, encoding: 'utf8' }).trim();
|
|
39
|
+
const dirty = execFileSync('git', ['status', '--porcelain', '--', '.'], { cwd: root, encoding: 'utf8' }).trim();
|
|
40
|
+
if (dirty) commit += ' with uncommitted changes';
|
|
41
|
+
} catch {
|
|
42
|
+
// git is not installed: the version is enough.
|
|
43
|
+
}
|
|
43
44
|
|
|
44
45
|
// pnpm runs a root script from the repository root, so a relative path is read from where it was typed.
|
|
45
46
|
const target = resolve(process.env.INIT_CWD ?? process.cwd(), product, folder);
|