@atomic-ui/ui 0.1.4 → 0.1.7
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 +30 -6
- package/dist/base/FieldElement.d.ts +7 -0
- package/dist/base/tokens.d.ts +23 -1
- package/dist/chunk-2YQA3VBY.js +85 -0
- package/dist/chunk-2YQA3VBY.js.map +1 -0
- package/dist/{chunk-LFOWTFMR.js → chunk-4HU4Y23Q.js} +3 -3
- package/dist/chunk-5EA4IDUD.js +177 -0
- package/dist/chunk-5EA4IDUD.js.map +1 -0
- package/dist/{chunk-3OSL2HMN.js → chunk-6ICOJPMD.js} +7 -5
- package/dist/chunk-6ICOJPMD.js.map +1 -0
- package/dist/{chunk-ZXCSQ6MK.js → chunk-7BIQ3K6H.js} +10 -2
- package/dist/chunk-7BIQ3K6H.js.map +1 -0
- package/dist/chunk-7Y6UCSUS.js +361 -0
- package/dist/chunk-7Y6UCSUS.js.map +1 -0
- package/dist/chunk-BTGCUONV.js +56 -0
- package/dist/chunk-BTGCUONV.js.map +1 -0
- package/dist/{chunk-QYHWR6C5.js → chunk-C36CZRHK.js} +20 -7
- package/dist/chunk-C36CZRHK.js.map +1 -0
- package/dist/{chunk-MAMBT7BZ.js → chunk-CMAU4DSB.js} +21 -7
- package/dist/chunk-CMAU4DSB.js.map +1 -0
- package/dist/{chunk-HWNY6U5F.js → chunk-G6OVKNL7.js} +2 -2
- package/dist/{chunk-6UDDZQDK.js → chunk-GO2IBRFP.js} +3 -3
- package/dist/chunk-GO2IBRFP.js.map +1 -0
- package/dist/{chunk-PDXOPY22.js → chunk-GSCVG2ER.js} +3 -3
- package/dist/{chunk-IBTOZOGI.js → chunk-HWWA27DN.js} +2 -2
- package/dist/chunk-MLVUMCQ2.js +167 -0
- package/dist/chunk-MLVUMCQ2.js.map +1 -0
- package/dist/{chunk-A4CJ2F3J.js → chunk-MOEMFL4K.js} +21 -7
- package/dist/chunk-MOEMFL4K.js.map +1 -0
- package/dist/{chunk-OBCSDZHP.js → chunk-NQKYHILD.js} +3 -3
- package/dist/{chunk-5NUF7ZQA.js → chunk-NTNXHLTM.js} +24 -3
- package/dist/chunk-NTNXHLTM.js.map +1 -0
- package/dist/{chunk-4Y3HJBJY.js → chunk-OB7LC6NJ.js} +3 -2
- package/dist/chunk-OB7LC6NJ.js.map +1 -0
- package/dist/chunk-QCNT7D5V.js +549 -0
- package/dist/chunk-QCNT7D5V.js.map +1 -0
- package/dist/{chunk-CGMDIZPO.js → chunk-QDNI54ON.js} +3 -3
- package/dist/chunk-T6L3USBZ.js +245 -0
- package/dist/chunk-T6L3USBZ.js.map +1 -0
- package/dist/{chunk-TZD7IVVQ.js → chunk-TPF4MOMF.js} +8 -3
- package/dist/chunk-TPF4MOMF.js.map +1 -0
- package/dist/{chunk-S3EQO33M.js → chunk-VTFCTWSX.js} +6 -4
- package/dist/chunk-VTFCTWSX.js.map +1 -0
- package/dist/{chunk-2RBYVWZT.js → chunk-VWNBB7FW.js} +5 -3
- package/dist/chunk-VWNBB7FW.js.map +1 -0
- package/dist/{chunk-DIZCGSJA.js → chunk-WECSVHIM.js} +15 -3
- package/dist/chunk-WECSVHIM.js.map +1 -0
- package/dist/chunk-X7IPZPTG.js +710 -0
- package/dist/chunk-X7IPZPTG.js.map +1 -0
- package/dist/{chunk-TIKX5POO.js → chunk-XJP45LFA.js} +55 -28
- package/dist/chunk-XJP45LFA.js.map +1 -0
- package/dist/{chunk-6MLXFFH4.js → chunk-XVKEM5JY.js} +3 -3
- package/dist/chunk-XVKEM5JY.js.map +1 -0
- package/dist/chunk-ZBLTU67D.js +424 -0
- package/dist/chunk-ZBLTU67D.js.map +1 -0
- package/dist/{chunk-4KFHQBH2.js → chunk-ZGAOMRYD.js} +17 -4
- package/dist/chunk-ZGAOMRYD.js.map +1 -0
- package/dist/chunk-ZQJD4YEJ.js +195 -0
- package/dist/chunk-ZQJD4YEJ.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 +421 -0
- package/dist/components/app-ui.js +26 -0
- package/dist/components/app-ui.js.map +1 -0
- package/dist/components/blocks.d.ts +174 -0
- package/dist/components/blocks.js +17 -0
- package/dist/components/blocks.js.map +1 -0
- package/dist/components/button.d.ts +33 -0
- package/dist/components/button.js +3 -2
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +3 -3
- package/dist/components/date-input.js +3 -3
- package/dist/components/dialog.js +2 -2
- package/dist/components/fieldset.d.ts +49 -0
- package/dist/components/fieldset.js +8 -0
- package/dist/components/fieldset.js.map +1 -0
- package/dist/components/grid.d.ts +3 -3
- package/dist/components/grid.js +2 -2
- package/dist/components/help.js +2 -2
- package/dist/components/icon.d.ts +89 -0
- package/dist/components/icon.js +14 -0
- package/dist/components/icon.js.map +1 -0
- package/dist/components/layout.d.ts +75 -7
- package/dist/components/layout.js +2 -2
- package/dist/components/link.d.ts +11 -0
- package/dist/components/link.js +3 -2
- package/dist/components/marketing.d.ts +370 -0
- package/dist/components/marketing.js +21 -0
- package/dist/components/marketing.js.map +1 -0
- package/dist/components/media.d.ts +12 -0
- package/dist/components/media.js +2 -2
- package/dist/components/navigation.d.ts +98 -0
- package/dist/components/navigation.js +11 -0
- package/dist/components/navigation.js.map +1 -0
- package/dist/components/organisms.d.ts +547 -0
- package/dist/components/organisms.js +25 -0
- package/dist/components/organisms.js.map +1 -0
- package/dist/components/page.d.ts +130 -0
- package/dist/components/page.js +10 -0
- package/dist/components/page.js.map +1 -0
- package/dist/components/price.d.ts +5 -0
- package/dist/components/price.js +2 -2
- package/dist/components/progress.js +2 -2
- package/dist/components/property.d.ts +389 -0
- package/dist/components/property.js +19 -0
- package/dist/components/property.js.map +1 -0
- package/dist/components/radio-group.js +3 -3
- package/dist/components/select.d.ts +6 -0
- package/dist/components/select.js +3 -3
- package/dist/components/summary-list.js +2 -2
- package/dist/components/table.js +2 -2
- package/dist/components/text-input.d.ts +6 -0
- package/dist/components/text-input.js +3 -3
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.js +3 -3
- package/dist/index.d.ts +9 -0
- package/dist/index.js +140 -36
- package/package.json +2 -2
- package/dist/chunk-2RBYVWZT.js.map +0 -1
- package/dist/chunk-3OSL2HMN.js.map +0 -1
- package/dist/chunk-4KFHQBH2.js.map +0 -1
- package/dist/chunk-4Y3HJBJY.js.map +0 -1
- package/dist/chunk-5NUF7ZQA.js.map +0 -1
- package/dist/chunk-6MLXFFH4.js.map +0 -1
- package/dist/chunk-6UDDZQDK.js.map +0 -1
- package/dist/chunk-A4CJ2F3J.js.map +0 -1
- package/dist/chunk-DIZCGSJA.js.map +0 -1
- package/dist/chunk-GGODB3GY.js +0 -172
- package/dist/chunk-GGODB3GY.js.map +0 -1
- package/dist/chunk-MAMBT7BZ.js.map +0 -1
- package/dist/chunk-QYHWR6C5.js.map +0 -1
- package/dist/chunk-S3EQO33M.js.map +0 -1
- package/dist/chunk-TIKX5POO.js.map +0 -1
- package/dist/chunk-TZD7IVVQ.js.map +0 -1
- package/dist/chunk-ZXCSQ6MK.js.map +0 -1
- /package/dist/{chunk-LFOWTFMR.js.map → chunk-4HU4Y23Q.js.map} +0 -0
- /package/dist/{chunk-HWNY6U5F.js.map → chunk-G6OVKNL7.js.map} +0 -0
- /package/dist/{chunk-PDXOPY22.js.map → chunk-GSCVG2ER.js.map} +0 -0
- /package/dist/{chunk-IBTOZOGI.js.map → chunk-HWWA27DN.js.map} +0 -0
- /package/dist/{chunk-OBCSDZHP.js.map → chunk-NQKYHILD.js.map} +0 -0
- /package/dist/{chunk-CGMDIZPO.js.map → chunk-QDNI54ON.js.map} +0 -0
|
@@ -7,6 +7,10 @@ import { FieldElement } from '../base/FieldElement';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class ImpktTextarea extends FieldElement {
|
|
9
9
|
static properties: {
|
|
10
|
+
width: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
reflect: boolean;
|
|
13
|
+
};
|
|
10
14
|
rows: {
|
|
11
15
|
type: NumberConstructor;
|
|
12
16
|
};
|
|
@@ -47,6 +51,8 @@ export declare class ImpktTextarea extends FieldElement {
|
|
|
47
51
|
};
|
|
48
52
|
rows: number;
|
|
49
53
|
maxlength: number | undefined;
|
|
54
|
+
/** How wide the box is, to suit the answer. Full width on a phone whatever this says. */
|
|
55
|
+
width: 'full' | 'lg' | 'md' | 'sm' | 'xs';
|
|
50
56
|
constructor();
|
|
51
57
|
static styles: import("lit").CSSResult[];
|
|
52
58
|
protected renderControl(): TemplateResult;
|
package/dist/index.d.ts
CHANGED
|
@@ -29,3 +29,12 @@ export { FieldElement } from './base/FieldElement';
|
|
|
29
29
|
export { token, space, fontSize, lineHeight, fontWeight, t } from './base/tokens';
|
|
30
30
|
export { ImpktGrid } from './components/grid';
|
|
31
31
|
export { ImpktHelp, type HelpKind } from './components/help';
|
|
32
|
+
export { ImpktPage, ImpktSection } from './components/page';
|
|
33
|
+
export { ImpktIcon, ICONS, ICON_NAMES, iconSvg, type IconName } from './components/icon';
|
|
34
|
+
export { ImpktNav, ImpktBreadcrumbs, type NavLink } from './components/navigation';
|
|
35
|
+
export { ImpktSearchBar, type SearchField, ImpktAnnouncement, ImpktHero, ImpktFeatureList, ImpktQuote, ImpktStat, ImpktBadge, type FeatureItem } from './components/marketing';
|
|
36
|
+
export { ImpktDivider, ImpktSpacer, ImpktVisuallyHidden, ImpktTabs, ImpktCardGrid, type TabItem, type CardItem } from './components/blocks';
|
|
37
|
+
export { ImpktFieldset } from './components/fieldset';
|
|
38
|
+
export { ImpktDrawer, ImpktToast, ImpktMenu, ImpktPagination, ImpktAvatar, ImpktAvatarGroup, ImpktEmptyState, ImpktSlotPicker, type MenuItem, type AvatarItem, type SlotDay } from './components/app-ui';
|
|
39
|
+
export { ImpktSitePlan, ImpktMortgageCalculator, ImpktBeforeAfter, ImpktStickyBar, ImpktLocationCard, monthlyPayment, type SitePlot, type NearbyItem } from './components/property';
|
|
40
|
+
export { ImpktCarousel, ImpktGallery, ImpktLogoCloud, ImpktSteps, ImpktMediaSplit, ImpktCtaBanner, ImpktReviews, ImpktNewsletter, type GalleryItem, type LogoItem, type StepItem, type ReviewItem } from './components/organisms';
|
package/dist/index.js
CHANGED
|
@@ -1,71 +1,132 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ImpktRadioGroup
|
|
3
|
+
} from "./chunk-NQKYHILD.js";
|
|
1
4
|
import {
|
|
2
5
|
ImpktSelect
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CMAU4DSB.js";
|
|
4
7
|
import {
|
|
5
8
|
ImpktSummaryList
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GO2IBRFP.js";
|
|
7
10
|
import {
|
|
8
11
|
ImpktTable
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VWNBB7FW.js";
|
|
10
13
|
import {
|
|
11
14
|
ImpktTextInput
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MOEMFL4K.js";
|
|
13
16
|
import {
|
|
14
17
|
ImpktTextarea
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-C36CZRHK.js";
|
|
19
|
+
import {
|
|
20
|
+
ImpktAnnouncement,
|
|
21
|
+
ImpktBadge,
|
|
22
|
+
ImpktFeatureList,
|
|
23
|
+
ImpktHero,
|
|
24
|
+
ImpktQuote,
|
|
25
|
+
ImpktSearchBar,
|
|
26
|
+
ImpktStat
|
|
27
|
+
} from "./chunk-7Y6UCSUS.js";
|
|
28
|
+
import {
|
|
29
|
+
ImpktDocumentLink,
|
|
30
|
+
ImpktImage,
|
|
31
|
+
ImpktLogo
|
|
32
|
+
} from "./chunk-WECSVHIM.js";
|
|
33
|
+
import {
|
|
34
|
+
ImpktBreadcrumbs,
|
|
35
|
+
ImpktNav
|
|
36
|
+
} from "./chunk-MLVUMCQ2.js";
|
|
37
|
+
import {
|
|
38
|
+
ImpktCarousel,
|
|
39
|
+
ImpktCtaBanner,
|
|
40
|
+
ImpktGallery,
|
|
41
|
+
ImpktLogoCloud,
|
|
42
|
+
ImpktMediaSplit,
|
|
43
|
+
ImpktNewsletter,
|
|
44
|
+
ImpktReviews,
|
|
45
|
+
ImpktSteps
|
|
46
|
+
} from "./chunk-X7IPZPTG.js";
|
|
47
|
+
import {
|
|
48
|
+
ImpktPage,
|
|
49
|
+
ImpktSection
|
|
50
|
+
} from "./chunk-5EA4IDUD.js";
|
|
51
|
+
import {
|
|
52
|
+
ImpktPrice
|
|
53
|
+
} from "./chunk-TPF4MOMF.js";
|
|
54
|
+
import {
|
|
55
|
+
ImpktProgress
|
|
56
|
+
} from "./chunk-G6OVKNL7.js";
|
|
57
|
+
import {
|
|
58
|
+
ImpktBeforeAfter,
|
|
59
|
+
ImpktLocationCard,
|
|
60
|
+
ImpktMortgageCalculator,
|
|
61
|
+
ImpktSitePlan,
|
|
62
|
+
ImpktStickyBar,
|
|
63
|
+
monthlyPayment
|
|
64
|
+
} from "./chunk-ZBLTU67D.js";
|
|
65
|
+
import {
|
|
66
|
+
ImpktDateInput
|
|
67
|
+
} from "./chunk-QDNI54ON.js";
|
|
68
|
+
import {
|
|
69
|
+
ImpktDialog
|
|
70
|
+
} from "./chunk-VTFCTWSX.js";
|
|
71
|
+
import {
|
|
72
|
+
ImpktFieldset
|
|
73
|
+
} from "./chunk-BTGCUONV.js";
|
|
16
74
|
import {
|
|
17
75
|
ImpktGrid
|
|
18
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-OB7LC6NJ.js";
|
|
19
77
|
import {
|
|
20
78
|
ImpktHelp
|
|
21
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-HWWA27DN.js";
|
|
22
80
|
import {
|
|
23
81
|
ImpktCard,
|
|
24
82
|
ImpktHeading,
|
|
25
83
|
ImpktStack,
|
|
26
84
|
ImpktText
|
|
27
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-T6L3USBZ.js";
|
|
28
86
|
import {
|
|
29
87
|
ImpktLink
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
ImpktDocumentLink,
|
|
33
|
-
ImpktImage,
|
|
34
|
-
ImpktLogo
|
|
35
|
-
} from "./chunk-DIZCGSJA.js";
|
|
36
|
-
import {
|
|
37
|
-
ImpktPrice
|
|
38
|
-
} from "./chunk-TZD7IVVQ.js";
|
|
39
|
-
import {
|
|
40
|
-
ImpktProgress
|
|
41
|
-
} from "./chunk-HWNY6U5F.js";
|
|
42
|
-
import {
|
|
43
|
-
ImpktRadioGroup
|
|
44
|
-
} from "./chunk-OBCSDZHP.js";
|
|
88
|
+
} from "./chunk-ZGAOMRYD.js";
|
|
45
89
|
import {
|
|
46
90
|
ImpktAccordion
|
|
47
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-XVKEM5JY.js";
|
|
48
92
|
import {
|
|
49
93
|
ImpktAlert
|
|
50
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-6ICOJPMD.js";
|
|
95
|
+
import {
|
|
96
|
+
ImpktAvatar,
|
|
97
|
+
ImpktAvatarGroup,
|
|
98
|
+
ImpktDrawer,
|
|
99
|
+
ImpktEmptyState,
|
|
100
|
+
ImpktMenu,
|
|
101
|
+
ImpktPagination,
|
|
102
|
+
ImpktSlotPicker,
|
|
103
|
+
ImpktToast
|
|
104
|
+
} from "./chunk-QCNT7D5V.js";
|
|
105
|
+
import {
|
|
106
|
+
ImpktCardGrid,
|
|
107
|
+
ImpktDivider,
|
|
108
|
+
ImpktSpacer,
|
|
109
|
+
ImpktTabs,
|
|
110
|
+
ImpktVisuallyHidden
|
|
111
|
+
} from "./chunk-ZQJD4YEJ.js";
|
|
51
112
|
import {
|
|
52
113
|
ImpktButton
|
|
53
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-XJP45LFA.js";
|
|
115
|
+
import {
|
|
116
|
+
ICONS,
|
|
117
|
+
ICON_NAMES,
|
|
118
|
+
ImpktIcon,
|
|
119
|
+
iconSvg
|
|
120
|
+
} from "./chunk-2YQA3VBY.js";
|
|
54
121
|
import {
|
|
55
122
|
ImpktCheckboxGroup
|
|
56
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-GSCVG2ER.js";
|
|
57
124
|
import {
|
|
58
125
|
ImpktCheckbox
|
|
59
|
-
} from "./chunk-
|
|
60
|
-
import {
|
|
61
|
-
ImpktDateInput
|
|
62
|
-
} from "./chunk-CGMDIZPO.js";
|
|
126
|
+
} from "./chunk-4HU4Y23Q.js";
|
|
63
127
|
import {
|
|
64
128
|
FieldElement
|
|
65
|
-
} from "./chunk-
|
|
66
|
-
import {
|
|
67
|
-
ImpktDialog
|
|
68
|
-
} from "./chunk-S3EQO33M.js";
|
|
129
|
+
} from "./chunk-7BIQ3K6H.js";
|
|
69
130
|
import {
|
|
70
131
|
ImpktElement,
|
|
71
132
|
fontSize,
|
|
@@ -74,38 +135,81 @@ import {
|
|
|
74
135
|
space,
|
|
75
136
|
t,
|
|
76
137
|
token
|
|
77
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-NTNXHLTM.js";
|
|
78
139
|
export {
|
|
79
140
|
FieldElement,
|
|
141
|
+
ICONS,
|
|
142
|
+
ICON_NAMES,
|
|
80
143
|
ImpktAccordion,
|
|
81
144
|
ImpktAlert,
|
|
145
|
+
ImpktAnnouncement,
|
|
146
|
+
ImpktAvatar,
|
|
147
|
+
ImpktAvatarGroup,
|
|
148
|
+
ImpktBadge,
|
|
149
|
+
ImpktBeforeAfter,
|
|
150
|
+
ImpktBreadcrumbs,
|
|
82
151
|
ImpktButton,
|
|
83
152
|
ImpktCard,
|
|
153
|
+
ImpktCardGrid,
|
|
154
|
+
ImpktCarousel,
|
|
84
155
|
ImpktCheckbox,
|
|
85
156
|
ImpktCheckboxGroup,
|
|
157
|
+
ImpktCtaBanner,
|
|
86
158
|
ImpktDateInput,
|
|
87
159
|
ImpktDialog,
|
|
160
|
+
ImpktDivider,
|
|
88
161
|
ImpktDocumentLink,
|
|
162
|
+
ImpktDrawer,
|
|
89
163
|
ImpktElement,
|
|
164
|
+
ImpktEmptyState,
|
|
165
|
+
ImpktFeatureList,
|
|
166
|
+
ImpktFieldset,
|
|
167
|
+
ImpktGallery,
|
|
90
168
|
ImpktGrid,
|
|
91
169
|
ImpktHeading,
|
|
92
170
|
ImpktHelp,
|
|
171
|
+
ImpktHero,
|
|
172
|
+
ImpktIcon,
|
|
93
173
|
ImpktImage,
|
|
94
174
|
ImpktLink,
|
|
175
|
+
ImpktLocationCard,
|
|
95
176
|
ImpktLogo,
|
|
177
|
+
ImpktLogoCloud,
|
|
178
|
+
ImpktMediaSplit,
|
|
179
|
+
ImpktMenu,
|
|
180
|
+
ImpktMortgageCalculator,
|
|
181
|
+
ImpktNav,
|
|
182
|
+
ImpktNewsletter,
|
|
183
|
+
ImpktPage,
|
|
184
|
+
ImpktPagination,
|
|
96
185
|
ImpktPrice,
|
|
97
186
|
ImpktProgress,
|
|
187
|
+
ImpktQuote,
|
|
98
188
|
ImpktRadioGroup,
|
|
189
|
+
ImpktReviews,
|
|
190
|
+
ImpktSearchBar,
|
|
191
|
+
ImpktSection,
|
|
99
192
|
ImpktSelect,
|
|
193
|
+
ImpktSitePlan,
|
|
194
|
+
ImpktSlotPicker,
|
|
195
|
+
ImpktSpacer,
|
|
100
196
|
ImpktStack,
|
|
197
|
+
ImpktStat,
|
|
198
|
+
ImpktSteps,
|
|
199
|
+
ImpktStickyBar,
|
|
101
200
|
ImpktSummaryList,
|
|
102
201
|
ImpktTable,
|
|
202
|
+
ImpktTabs,
|
|
103
203
|
ImpktText,
|
|
104
204
|
ImpktTextInput,
|
|
105
205
|
ImpktTextarea,
|
|
206
|
+
ImpktToast,
|
|
207
|
+
ImpktVisuallyHidden,
|
|
106
208
|
fontSize,
|
|
107
209
|
fontWeight,
|
|
210
|
+
iconSvg,
|
|
108
211
|
lineHeight,
|
|
212
|
+
monthlyPayment,
|
|
109
213
|
space,
|
|
110
214
|
t,
|
|
111
215
|
token
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomic-ui/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "The Impkt component library: standard custom elements, styled only from design tokens, built to WCAG 2.2 AA.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"lit": "^3.3.3",
|
|
20
|
-
"@atomic-ui/design-tokens": "0.1.
|
|
20
|
+
"@atomic-ui/design-tokens": "0.1.7"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^20.14.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/table.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing } from '../base/styles';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\nexport interface TableColumn {\n key: string;\n label: string;\n numeric?: boolean;\n}\n\n/**\n * A data table — a plan comparison, a payment schedule.\n *\n * **The caption is required.** It is the table's name, and a page with three\n * unnamed tables is a page a screen-reader user has to read in full to tell\n * apart. Visually it can be the heading they would have written anyway.\n *\n * **It scrolls, and the scroller is focusable.** A wide table cannot reflow to\n * 320px without becoming unreadable, so it scrolls horizontally — and a region\n * that scrolls must be reachable by keyboard, or a keyboard user simply cannot\n * see the right-hand columns. `tabindex=\"0\"` with a role and a name is the\n * established fix, and the name is why the role is there: a bare focusable div\n * announces nothing.\n\n *\n * @category content\n * @icon table\n */\nexport class ImpktTable extends ImpktElement {\n static properties = {\n caption: { type: String },\n columns: { type: Array },\n rows: { type: Array },\n };\n\n declare caption: string;\n declare columns: TableColumn[];\n declare rows: Array<Record<string, string>>;\n\n constructor() {\n super();\n this.caption = '';\n this.columns = [];\n this.rows = [];\n }\n\n static styles = [\n ...ImpktElement.styles,\n focusRing,\n css`\n :host {\n display: block;\n }\n .scroller {\n overflow-x: auto;\n }\n table {\n inline-size: 100%;\n border-collapse: collapse;\n font-size: ${fontSize('md')};\n }\n caption {\n text-align: start;\n font-weight: ${fontWeight('semibold')};\n padding-block-end: ${space(2)};\n }\n th,\n td {\n text-align: start;\n padding: ${space(3)};\n border-block-end: ${t.borderThin} solid ${t.border};\n }\n th {\n font-weight: ${fontWeight('semibold')};\n background: ${t.surfaceInset};\n }\n .numeric {\n text-align: end;\n font-variant-numeric: tabular-nums;\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`\n <div class=\"scroller\" part=\"scroller\" tabindex=\"0\" role=\"region\" aria-label=${this.caption || nothing}>\n <table part=\"table\">\n ${this.caption ? html`<caption part=\"caption\">${this.caption}</caption>` : nothing}\n <thead>\n <tr>\n ${this.columns.map(\n (c) => html`<th scope=\"col\" class=${c.numeric ? 'numeric' : ''}>${c.label}</th>`,\n )}\n </tr>\n </thead>\n <tbody>\n ${this.rows.map(\n (row, i) => html`\n <tr>\n ${this.columns.map((c, j) =>\n // The first cell of each row is a row header, so a screen\n // reader announces \"Delivery charge, £250\" rather than\n // reading a bare number with no idea what it belongs to.\n j === 0\n ? html`<th scope=\"row\" id=${`${this.uid}-r${i}`}>${row[c.key] ?? ''}</th>`\n : html`<td class=${c.numeric ? 'numeric' : ''}>${row[c.key] ?? ''}</td>`,\n )}\n </tr>\n `,\n )}\n </tbody>\n </table>\n </div>\n `;\n }\n}\n\ncustomElements.define('impkt-table', ImpktTable);\n\ndeclare global {\n interface HTMLElementTagNameMap { 'impkt-table': ImpktTable }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AA6BjD,IAAM,aAAN,cAAyB,aAAa;AAAA,EAC3C;AAAA,SAAO,aAAa;AAAA,MAClB,SAAS,EAAE,MAAM,OAAO;AAAA,MACxB,SAAS,EAAE,MAAM,MAAM;AAA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AA;AAAA;AAAA,IAGP,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKX;AACF;AAEA,eAAe,OAAO,eAAe,UAAU;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/alert.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger';\n\n/**\n * A notice.\n *\n * **The role depends on the tone, and that is a real distinction.** `alert`\n * interrupts whatever a screen reader is saying; `status` waits for a pause.\n * A failed payment earns the interruption. \"Your basket has been saved\" does\n * not, and using `alert` for it is how users learn to tune the live region\n * out — at which point the one that mattered is also lost.\n *\n * **The tone is never carried by colour alone.** Each tone ships a word, in\n * the accessible name, because 1.4.1 Use of Colour says a red border is not a\n * message and because a red border is invisible in forced-colours mode.\n\n *\n * @category feedback\n * @icon alert\n * @slot - The body of the notice.\n */\nexport class ImpktAlert extends ImpktElement {\n static properties = {\n tone: { type: String, reflect: true },\n heading: { type: String },\n toneLabel: { type: String, attribute: 'tone-label' },\n };\n\n declare tone: AlertTone;\n declare heading: string;\n /** Overrides the default word for the tone, for translation. */\n declare toneLabel: string;\n\n constructor() {\n super();\n this.tone = 'info';\n this.heading = '';\n this.toneLabel = '';\n }\n\n private static readonly TONE_WORDS: Record<AlertTone, string> = {\n info: 'Information',\n success: 'Success',\n warning: 'Warning',\n danger: 'Error',\n };\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n margin-block-end: ${space(4)};\n }\n .alert {\n padding: ${space(4)};\n border-radius: ${t.radius};\n border-inline-start: 4px solid;\n font-size: ${fontSize('md')};\n }\n .heading {\n font-weight: ${fontWeight('semibold')};\n margin-block-end: ${space(1)};\n }\n :host([tone='info']) .alert {\n background: ${t.infoSubtle};\n border-color: ${t.info};\n color: ${t.text};\n }\n :host([tone='success']) .alert {\n background: ${t.successSubtle};\n border-color: ${t.success};\n color: ${t.text};\n }\n :host([tone='warning']) .alert {\n background: ${t.warningSubtle};\n border-color: ${t.warning};\n color: ${t.text};\n }\n :host([tone='danger']) .alert {\n background: ${t.dangerSubtle};\n border-color: ${t.danger};\n color: ${t.text};\n }\n /* Colour is the only signal left in forced-colours mode, and it is gone.\n The border keeps the boundary; the tone word in the label carries the\n meaning. */\n @media (forced-colors: active) {\n .alert {\n border: 1px solid CanvasText;\n border-inline-start-width: 4px;\n }\n }\n `,\n ];\n\n render(): TemplateResult {\n const word = this.toneLabel || ImpktAlert.TONE_WORDS[this.tone];\n return html`\n <div\n class=\"alert\"\n part=\"alert\"\n role=${this.tone === 'danger' ? 'alert' : 'status'}\n aria-label=${this.heading ? nothing : word}\n >\n ${this.heading\n ? html`<div class=\"heading\" part=\"heading\">\n <span class=\"tone-word\">${word}:</span> ${this.heading}\n </div>`\n : nothing}\n <slot></slot>\n </div>\n `;\n }\n}\n\ncustomElements.define('impkt-alert', ImpktAlert);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-alert': ImpktAlert;\n }\n}\n"],"mappings":";;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAwBjD,IAAM,aAAN,MAAM,oBAAmB,aAAa;AAAA,EAC3C;AAAA,SAAO,aAAa;AAAA,MAClB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACpC,SAAS,EAAE,MAAM,OAAO;AAAA,MACxB,WAAW,EAAE,MAAM,QAAQ,WAAW,aAAa;AAAA,IACrD;AAAA;AAAA,EAOA,cAAc;AACZ,UAAM;AACN,SAAK,OAAO;AACZ,SAAK,UAAU;AACf,SAAK,YAAY;AAAA,EACnB;AAAA,EAEA;AAAA,SAAwB,aAAwC;AAAA,MAC9D,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,MACT,QAAQ;AAAA,IACV;AAAA;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA;AAAA;AAAA,4BAGwB,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA,mBAGjB,MAAM,CAAC,CAAC;AAAA,yBACF,EAAE,MAAM;AAAA;AAAA,qBAEZ,SAAS,IAAI,CAAC;AAAA;AAAA;AAAA,uBAGZ,WAAW,UAAU,CAAC;AAAA,4BACjB,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA,sBAGd,EAAE,UAAU;AAAA,wBACV,EAAE,IAAI;AAAA,iBACb,EAAE,IAAI;AAAA;AAAA;AAAA,sBAGD,EAAE,aAAa;AAAA,wBACb,EAAE,OAAO;AAAA,iBAChB,EAAE,IAAI;AAAA;AAAA;AAAA,sBAGD,EAAE,aAAa;AAAA,wBACb,EAAE,OAAO;AAAA,iBAChB,EAAE,IAAI;AAAA;AAAA;AAAA,sBAGD,EAAE,YAAY;AAAA,wBACZ,EAAE,MAAM;AAAA,iBACf,EAAE,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAYrB;AAAA;AAAA,EAEA,SAAyB;AACvB,UAAM,OAAO,KAAK,aAAa,YAAW,WAAW,KAAK,IAAI;AAC9D,WAAO;AAAA;AAAA;AAAA;AAAA,eAII,KAAK,SAAS,WAAW,UAAU,QAAQ;AAAA,qBACrC,KAAK,UAAU,UAAU,IAAI;AAAA;AAAA,UAExC,KAAK,UACH;AAAA,wCAC4B,IAAI,YAAY,KAAK,OAAO;AAAA,sBAExD,OAAO;AAAA;AAAA;AAAA;AAAA,EAIjB;AACF;AAEA,eAAe,OAAO,eAAe,UAAU;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/link.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, visuallyHidden } from '../base/styles';\nimport { t } from '../base/tokens';\n\n/**\n * A link.\n *\n * **A new tab is always announced.** When `external` is set, the accessible\n * name gains \"opens in a new tab\" — not as a tooltip, which no screen reader\n * reads, and not as an icon alone, which carries no text. An unannounced new\n * tab breaks the back button for someone who cannot see that the window\n * changed, and that is what 3.2.5 is about.\n *\n * **It is underlined.** 1.4.1 Use of Colour: a link distinguished from body\n * text only by being a different colour is not distinguished at all for a\n * reader who cannot tell the two colours apart.\n\n *\n * @category action\n * @icon link\n * @slot - The link text.\n */\nexport class ImpktLink extends ImpktElement {\n static properties = {\n href: { type: String },\n external: { type: Boolean, reflect: true },\n externalText: { type: String, attribute: 'external-text' },\n };\n\n declare href: string;\n declare external: boolean;\n declare externalText: string;\n\n constructor() {\n super();\n this.href = '';\n this.external = false;\n this.externalText = 'opens in a new tab';\n }\n\n static styles = [\n ...ImpktElement.styles,\n focusRing,\n css`\n :host {\n display: inline;\n }\n a {\n color: ${t.link};\n text-decoration: underline;\n text-underline-offset: 0.2em;\n border-radius: ${t.radiusSm};\n }\n a:hover {\n color: ${t.linkHover};\n }\n .sr-only {\n ${visuallyHidden}\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`\n <a\n part=\"link\"\n href=${this.href || nothing}\n target=${this.external ? '_blank' : nothing}\n rel=${this.external ? 'noopener noreferrer' : nothing}\n >\n <slot></slot>${this.external ? html`<span class=\"sr-only\"> (${this.externalText})</span>` : nothing}\n </a>\n `;\n }\n}\n\ncustomElements.define('impkt-link', ImpktLink);\n\ndeclare global {\n interface HTMLElementTagNameMap { 'impkt-link': ImpktLink }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAuBjD,IAAM,YAAN,cAAwB,aAAa;AAAA,EAC1C;AAAA,SAAO,aAAa;AAAA,MAClB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,UAAU,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MACzC,cAAc,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,IAC3D;AAAA;AAAA,EAMA,cAAc;AACZ,UAAM;AACN,SAAK,OAAO;AACZ,SAAK,WAAW;AAChB,SAAK,eAAe;AAAA,EACtB;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA,MACA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAKa,EAAE,IAAI;AAAA;AAAA;AAAA,yBAGE,EAAE,QAAQ;AAAA;AAAA;AAAA,iBAGlB,EAAE,SAAS;AAAA;AAAA;AAAA,UAGlB,cAAc;AAAA;AAAA;AAAA,IAGtB;AAAA;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA;AAAA;AAAA,eAGI,KAAK,QAAQ,OAAO;AAAA,iBAClB,KAAK,WAAW,WAAW,OAAO;AAAA,cACrC,KAAK,WAAW,wBAAwB,OAAO;AAAA;AAAA,uBAEtC,KAAK,WAAW,+BAA+B,KAAK,YAAY,aAAa,OAAO;AAAA;AAAA;AAAA,EAGzG;AACF;AAEA,eAAe,OAAO,cAAc,SAAS;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/grid.ts"],"sourcesContent":["import { css, html } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { spaceAround, token } from '../base/tokens';\n\n/** Column widths as fractions, for each choice of `widths`. */\nconst WIDTHS: Record<string, string> = {\n '2:1': '2fr 1fr', '1:2': '1fr 2fr', '3:1': '3fr 1fr', '1:3': '1fr 3fr',\n '1:2:1': '1fr 2fr 1fr', '2:1:1': '2fr 1fr 1fr', '1:1:2': '1fr 1fr 2fr',\n};\n\n/**\n * A responsive row with named column slots. Child order stays inside each\n * column; changing a page's visual grid never reorders its reading sequence.\n *\n * Gutters come from the brand's layout, so every grid for a partner keeps the\n * same rhythm. Where the columns stack is a choice, because a three-column\n * row of cards may work on a tablet where two columns of long text do not.\n *\n * @category layout\n * @icon columns\n * @slot column-1 - First column.\n * @slot column-2 - Second column.\n * @slot column-3 - Third column.\n * @slot column-4 - Fourth column.\n */\nexport class ImpktGrid extends ImpktElement {\n static properties = {\n columns: { type: String, reflect: true },\n widths: { type: String, reflect: true },\n gap: { type: String, reflect: true },\n stackOn: { type: String, reflect: true, attribute: 'stack-on' },\n align: { type: String, reflect: true },\n spaceAbove: { type: String, reflect: true, attribute: 'space-above' },\n spaceBelow: { type: String, reflect: true, attribute: 'space-below' },\n };\n declare columns: 'one' | 'two' | 'three' | 'four' | 'sidebar-left' | 'sidebar-right';\n /** How wide each column is against the others. Applies when it has as many parts as there are columns. */\n declare widths: 'equal' | '2:1' | '1:2' | '3:1' | '1:3' | '1:2:1' | '2:1:1' | '1:1:2';\n /** The space between columns, from the brand's gutters. */\n declare gap: 'none' | 'sm' | 'md' | 'lg';\n /** The screens on which the columns stack, one above another, in column order. */\n declare stackOn: 'phone' | 'tablet' | 'never';\n /** How columns of different heights line up. */\n declare align: 'stretch' | 'start' | 'center' | 'end';\n /** Space before the grid, from the spacing scale. */\n declare spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl';\n /** Space after the grid, from the spacing scale. */\n declare spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl';\n constructor() {\n super();\n this.columns = 'two';\n this.widths = 'equal';\n this.gap = 'md';\n this.stackOn = 'phone';\n this.align = 'stretch';\n this.spaceAbove = 'none';\n this.spaceBelow = 'none';\n }\n static styles = [...ImpktElement.styles, spaceAround, css`\n :host { display: block; min-inline-size: 0; container-type: inline-size; }\n .columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${token('layout.gutter.md', '16px')}; align-items: stretch; }\n :host([gap='none']) .columns { gap: 0; }\n :host([gap='sm']) .columns { gap: ${token('layout.gutter.sm', '8px')}; }\n :host([gap='lg']) .columns { gap: ${token('layout.gutter.lg', '32px')}; }\n :host([align='start']) .columns { align-items: start; }\n :host([align='center']) .columns { align-items: center; }\n :host([align='end']) .columns { align-items: end; }\n :host([columns='one']) .columns { grid-template-columns: minmax(0, 1fr); }\n :host([columns='three']) .columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n :host([columns='four']) .columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n :host([columns='sidebar-left']) .columns { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }\n :host([columns='sidebar-right']) .columns { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }\n .column { min-inline-size: 0; overflow-wrap: anywhere; }\n ::slotted(*) { max-inline-size: 100%; }\n @container (max-width: 40rem) { :host(:not([stack-on='never'])) .columns { grid-template-columns: minmax(0, 1fr) !important; } }\n @container (max-width: 64rem) { :host([stack-on='tablet']) .columns { grid-template-columns: minmax(0, 1fr) !important; } }\n `];\n render() {\n const count = this.columns === 'one' ? 1 : this.columns === 'three' ? 3 : this.columns === 'four' ? 4 : 2;\n const fractions = WIDTHS[this.widths]?.split(' ');\n // A width split for a different number of columns would leave a column out, so it is ignored.\n const template = fractions && fractions.length === count ? fractions.map((f) => `minmax(0, ${f})`).join(' ') : '';\n return html`<div class=\"columns\" part=\"row\" style=${template ? `grid-template-columns: ${template}` : ''}>${Array.from({ length: count }, (_, i) => html`<div class=\"column\" part=\"column\"><slot name=${`column-${i + 1}`}></slot></div>`)}</div>`;\n }\n}\ncustomElements.define('impkt-grid', ImpktGrid);\ndeclare global { interface HTMLElementTagNameMap { 'impkt-grid': ImpktGrid } }\n"],"mappings":";;;;;;;AAAA,SAAS,KAAK,YAAY;AAK1B,IAAM,SAAiC;AAAA,EACrC,OAAO;AAAA,EAAW,OAAO;AAAA,EAAW,OAAO;AAAA,EAAW,OAAO;AAAA,EAC7D,SAAS;AAAA,EAAe,SAAS;AAAA,EAAe,SAAS;AAC3D;AAiBO,IAAM,YAAN,cAAwB,aAAa;AAAA,EAC1C;AAAA,SAAO,aAAa;AAAA,MAClB,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACvC,QAAQ,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,MACtC,KAAK,EAAE,MAAM,QAAQ,SAAS,KAAK;AAA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sources":["../src/base/tokens.ts","../src/base/styles.ts","../src/base/ImpktElement.ts"],"sourcesContent":["/**\n * Token helpers.\n *\n * Components never name a colour, a size or a radius. They name a token, and a\n * brand decides what it holds — which is what makes a rebrand a content\n * publish rather than a rebuild\n * ([ADR 0005](../../../../docs/decisions/0005-design-tokens.md)).\n *\n * Every reference carries a fallback so that a component dropped onto a page\n * with no token stylesheet still renders something legible. An unstyled\n * component is indistinguishable from a broken one, and the fallback is what\n * keeps a missing stylesheet a visible annoyance rather than a blank screen.\n *\n * These return `CSSResult` rather than strings. Lit's `css` tag refuses plain\n * interpolated strings, which is a deliberate guard against injecting\n * attacker-controlled text into a stylesheet; `unsafeCSS` is the documented\n * way past it and is safe here because every value is a literal in this file,\n * never anything authored or fetched.\n */\nimport { css, unsafeCSS, type CSSResult } from 'lit';\n\n/** `color.brand.default` → `var(--impkt-color-brand-default, <fallback>)`. */\nexport const token = (path: string, fallback: string): CSSResult =>\n unsafeCSS(`var(--impkt-${path.replace(/\\./g, '-')}, ${fallback})`);\n\nexport const t = {\n brand: token('color.brand.default', '#1f4ed8'),\n brandHover: token('color.brand.hover', '#1b45be'),\n brandActive: token('color.brand.active', '#183ba4'),\n brandSubtle: token('color.brand.subtle', '#e4eafa'),\n onBrand: token('color.text.on-brand', '#ffffff'),\n\n surfaceCard: token('color.surface.card', '#ffffff'),\n surfaceInset: token('color.surface.inset', '#f4f4f4'),\n surfaceSubtle: token('color.surface.subtle', '#e4eafa'),\n\n text: token('color.text.default', '#1a1a1a'),\n textMuted: token('color.text.muted', '#717171'),\n textPlaceholder: token('color.text.placeholder', '#767676'),\n textHeading: token('color.text.heading', '#1f4ed8'),\n link: token('color.text.link', '#1f4ed8'),\n linkHover: token('color.text.link-hover', '#193ead'),\n\n border: token('color.border.default', '#929292'),\n borderStrong: token('color.border.strong', '#818181'),\n\n danger: token('color.status.danger.default', '#c8102e'),\n dangerText: token('color.status.danger.text', '#c8102e'),\n dangerSubtle: token('color.status.danger.subtle', '#f8e2e6'),\n warning: token('color.status.warning.default', '#b45309'),\n warningText: token('color.status.warning.text', '#b45309'),\n warningSubtle: token('color.status.warning.subtle', '#f6eae1'),\n success: token('color.status.success.default', '#047857'),\n successText: token('color.status.success.text', '#047857'),\n successSubtle: token('color.status.success.subtle', '#e0f0ea'),\n info: token('color.status.info.default', '#1f4ed8'),\n infoText: token('color.status.info.text', '#1f4ed8'),\n infoSubtle: token('color.status.info.subtle', '#e4eafa'),\n\n fontBody: token('font.family.body', 'system-ui, sans-serif'),\n fontHeading: token('font.family.heading', 'system-ui, sans-serif'),\n\n focusShadow: token('focus.ring.shadow', '0 0 0 2px #ffffff, 0 0 0 4px #1a1a1a'),\n focusOffset: token('focus.ring.offset', '2px'),\n\n targetMin: token('target.min', '24px'),\n\n radiusSm: token('radius.sm', '2px'),\n radius: token('radius.md', '4px'),\n radiusLg: token('radius.lg', '8px'),\n\n borderThin: token('border.width.thin', '1px'),\n borderThick: token('border.width.thick', '2px'),\n} as const;\n\n/** `space.3` → the custom property. Spacing is always a token, never a number. */\nexport const space = (step: number): CSSResult => token(`space.${step}`, `${step * 4}px`);\n/** `font.size.lg` → the custom property. */\nexport const fontSize = (name: string): CSSResult => token(`font.size.${name}`, '1rem');\nexport const lineHeight = (name: string): CSSResult => token(`font.line-height.${name}`, '1.5');\nexport const fontWeight = (name: string): CSSResult => token(`font.weight.${name}`, '400');\n\n/**\n * Space above and below a section, from the spacing scale: `none`, `sm`,\n * `md`, `lg` or `xl`, set by `space-above` and `space-below`. A section names\n * a step rather than a size, so a page keeps the brand's rhythm.\n */\nexport const spaceAround: CSSResult = css`\n :host([space-above='sm']) { margin-block-start: ${space(2)}; }\n :host([space-above='md']) { margin-block-start: ${space(4)}; }\n :host([space-above='lg']) { margin-block-start: ${space(6)}; }\n :host([space-above='xl']) { margin-block-start: ${space(8)}; }\n :host([space-below='sm']) { margin-block-end: ${space(2)}; }\n :host([space-below='md']) { margin-block-end: ${space(4)}; }\n :host([space-below='lg']) { margin-block-end: ${space(6)}; }\n :host([space-below='xl']) { margin-block-end: ${space(8)}; }\n`;\n","/**\n * Shared style fragments.\n *\n * Three of these carry an accessibility guarantee and are therefore not\n * negotiable per component: the focus ring, the minimum target size and the\n * reduced-motion rule. A component that wants its own focus treatment is a\n * component that will get it subtly wrong on one brand, so there is one.\n */\nimport { css } from 'lit';\nimport { t } from './tokens';\n\n/**\n * The focus ring.\n *\n * `:focus-visible` rather than `:focus`, so a mouse click on a button does not\n * draw a ring the user did not ask for while keyboard focus still does.\n *\n * The ring is two-tone — a light inner band inside a dark outer one — drawn\n * with `box-shadow` and a transparent `outline` behind it. The outline is not\n * decoration: it is what survives Windows High Contrast Mode, where box-shadow\n * is dropped entirely and a shadow-only ring disappears for exactly the users\n * who most need it.\n *\n * The colours come from locked tokens a brand cannot reach\n * ([ADR 0010](../../../../docs/decisions/0010-what-a-brand-may-set.md)).\n */\nexport const focusRing = css`\n :host(:focus-visible),\n :host(:not([disabled])) :focus-visible {\n outline: 2px solid transparent;\n outline-offset: ${t.focusOffset};\n box-shadow: ${t.focusShadow};\n }\n`;\n\n/**\n * WCAG 2.2, 2.5.8 Target Size (Minimum): 24 by 24 CSS pixels.\n *\n * Applied as a minimum rather than a fixed size so a control grows with its\n * content and never shrinks below the floor. It reads the locked token, which\n * is deliberately outside the spacing scale — otherwise a brand tightening its\n * spacing unit would shrink every tap target with it.\n */\nexport const targetSize = css`\n min-block-size: ${t.targetMin};\n min-inline-size: ${t.targetMin};\n`;\n\n/**\n * Visible to a screen reader, invisible on screen.\n *\n * `clip-path` with a 1px box rather than `display: none` or `visibility:\n * hidden`, both of which remove the text from the accessibility tree — which\n * is the one thing this must not do.\n */\nexport const visuallyHidden = css`\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n`;\n\n/**\n * 2.3.3 Animation from Interactions, and plain decency.\n *\n * `0.01ms` rather than `0` because a zero-duration transition does not fire a\n * `transitionend` event in every engine, and components that wait for one hang.\n */\nexport const reducedMotion = css`\n @media (prefers-reduced-motion: reduce) {\n :host,\n :host *,\n :host *::before,\n :host *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }\n`;\n\n/** The base every component starts from. */\nexport const base = css`\n :host {\n box-sizing: border-box;\n font-family: ${t.fontBody};\n color: ${t.text};\n }\n :host([hidden]) {\n display: none !important;\n }\n *,\n *::before,\n *::after {\n box-sizing: inherit;\n }\n`;\n","import { LitElement, css } from 'lit';\nimport { base, reducedMotion } from './styles';\n\nlet counter = 0;\n\n/**\n * The base every Impkt component extends.\n *\n * It carries the two style fragments that are not a per-component choice — the\n * reset and the reduced-motion rule — and a stable id generator for the ARIA\n * wiring. It deliberately carries nothing else: a base class that grows\n * behaviour becomes the place every component's exceptions are negotiated.\n */\nexport class ImpktElement extends LitElement {\n static styles = [base, reducedMotion, css``];\n\n /**\n * A unique id for this instance, for `aria-describedby` and friends.\n *\n * Generated once in the constructor rather than in `render`, because an id\n * that changes between renders breaks the relationship it exists to express\n * — and it breaks it silently, since the markup still looks correct.\n */\n protected readonly uid = `impkt-${(counter += 1)}`;\n\n protected id_(part: string): string {\n return `${this.uid}-${part}`;\n }\n}\n"],"mappings":";AAmBA,SAAS,KAAK,iBAAiC;AAGxC,IAAM,QAAQ,CAAC,MAAc,aAClC,UAAU,eAAe,KAAK,QAAQ,OAAO,GAAG,CAAC,KAAK,QAAQ,GAAG;AAE5D,IAAM,IAAI;AAAA,EACf,OAAO,MAAM,uBAAuB,SAAS;AAAA,EAC7C,YAAY,MAAM,qBAAqB,SAAS;AAAA,EAChD,aAAa,MAAM,sBAAsB,SAAS;AAAA,EAClD,aAAa,MAAM,sBAAsB,SAAS;AAAA,EAClD,SAAS,MAAM,uBAAuB,SAAS;AAAA,EAE/C,aAAa,MAAM,sBAAsB,SAAS;AAAA,EAClD,cAAc,M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B,MAAM,SAAU,WAAW,CAAE;AAAA;AAAA,EAThD;AAAA,SAAO,SAAS,CAAC,MAAM,eAAeC,MAAK;AAAA;AAAA,EAWjC,IAAI,MAAsB;AAClC,WAAO,GAAG,KAAK,GAAG,IAAI,IAAI;AAAA,EAC5B;AACF;","names":["css","css","css","css"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/accordion.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing, targetSize } from '../base/styles';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\nexport interface AccordionItem {\n id: string;\n heading: string;\n body: string;\n}\n\n/**\n * Disclosure sections — frequently asked questions, \"what does this mean?\".\n *\n * **Each header is a button inside a heading.** The heading is what lets a\n * screen-reader user jump between sections without tabbing through every\n * paragraph; the button is what makes the section openable. One without the\n * other is a common half-implementation: all-headings cannot be operated,\n * all-buttons cannot be navigated.\n *\n * `headingLevel` is a property because the right level depends on what is\n * above the accordion on the page, and guessing produces exactly the skipped\n * levels that 1.3.1 is about.\n *\n * **Panels are hidden, not unmounted.** `hidden` keeps the content in the\n * accessibility tree's structure and lets in-page search find it when opened,\n * and it means `aria-controls` always points at an element that exists.\n *\n * **A panel can hold more than words.** `body` is plain text, which is what a\n * composition can author safely. Content rendered elsewhere, such as an FAQ\n * answer with links and a list, is slotted instead: a child with\n * `slot=\"panel-<item id>\"` replaces that item's body. The slot sits inside the\n * panel, so the region, its label and its `hidden` state are unchanged, and a\n * panel with nothing slotted still shows its body.\n *\n * @category content\n * @icon accordion\n */\nexport class ImpktAccordion extends ImpktElement {\n static properties = {\n items: { type: Array },\n headingLevel: { type: Number, attribute: 'heading-level' },\n open: { type: Array },\n multiple: { type: Boolean },\n };\n\n declare items: AccordionItem[];\n declare headingLevel: number;\n /** Ids currently expanded. */\n declare open: string[];\n /** When false, opening one closes the others. */\n declare multiple: boolean;\n\n constructor() {\n super();\n this.items = [];\n this.headingLevel = 3;\n this.open = [];\n this.multiple = true;\n }\n\n static styles = [\n ...ImpktElement.styles,\n focusRing,\n css`\n :host {\n display: block;\n }\n .item {\n border-block-end: ${t.borderThin} solid ${t.border};\n }\n button {\n ${targetSize}\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ${space(3)};\n inline-size: 100%;\n padding: ${space(3)} 0;\n background: none;\n border: 0;\n font: inherit;\n font-size: ${fontSize('md')};\n font-weight: ${fontWeight('semibold')};\n color: ${t.text};\n text-align: start;\n cursor: pointer;\n }\n button:hover {\n color: ${t.link};\n }\n .marker {\n flex: none;\n transition: transform 120ms ease-in-out;\n }\n button[aria-expanded='true'] .marker {\n transform: rotate(90deg);\n }\n .panel {\n padding-block-end: ${space(4)};\n font-size: ${fontSize('md')};\n }\n `,\n ];\n\n private toggle(id: string): void {\n const isOpen = this.open.includes(id);\n if (isOpen) this.open = this.open.filter((o) => o !== id);\n else this.open = this.multiple ? [...this.open, id] : [id];\n }\n\n render(): TemplateResult {\n return html`\n ${this.items.map((item) => {\n const expanded = this.open.includes(item.id);\n const panelId = this.id_(`panel-${item.id}`);\n const buttonId = this.id_(`button-${item.id}`);\n return html`\n <div class=\"item\" part=\"item\">\n <div role=\"heading\" aria-level=${this.headingLevel}>\n <button\n id=${buttonId}\n part=\"header\"\n type=\"button\"\n aria-expanded=${expanded ? 'true' : 'false'}\n aria-controls=${panelId}\n @click=${() => this.toggle(item.id)}\n >\n <span>${item.heading}</span>\n <span class=\"marker\" aria-hidden=\"true\">›</span>\n </button>\n </div>\n <div\n id=${panelId}\n class=\"panel\"\n part=\"panel\"\n role=\"region\"\n aria-labelledby=${buttonId}\n ?hidden=${!expanded}\n >\n <slot name=${`panel-${item.id}`}>${item.body}</slot>\n </div>\n </div>\n `;\n })}\n ${this.items.length === 0 ? nothing : nothing}\n `;\n }\n}\n\ncustomElements.define('impkt-accordion', ImpktAccordion);\n\ndeclare global {\n interface HTMLElementTagNameMap { 'impkt-accordion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E;AAAA,EAC3D;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA,QACH,KAAK,MAAM,IAAI,CAAC,SAAS;AACzB,YAAM,WAAW,KAAK,KAAK,SAAS,KAAK,EAAE;AAC3C,YAAM,UAAU,KAAK,IAAI,SAAS,KAAK,EAAE,EAAE;AAC3C,YAAM,WAAW,KAAK,IAAI,UAAU,KAAK,EAAE,EAAE;AAC7C,aAAO;AAAA;AAAA,6CAE8B,KAAK,YAAY;AAAA;AAAA,qBAEzC,QAAQ;AAAA;AAAA;AAAA,gCAGG,WAAW,SAAS,OAAO;AAAA,gCAC3B,OAAO;AAAA,yBACd,MAAM,KAAK,OAAO,KAAK,EAAE,CAAC;AAAA;AAAA,wBAE3B,KAAK,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,mBAKjB,OAAO;AAAA;AAAA;AAAA;AAAA,gCAIM,QAAQ;AAAA,wBAChB,CAAC,QAAQ;AAAA;AAAA,2BAEN,SAAS,KAAK,EAAE,EAAE,IAAI,KAAK,IAAI;AAAA;AAAA;AAAA;AAAA,IAIpD,CAAC,CAAC;AAAA,QACA,KAAK,MAAM,WAAW,IAAI,UAAU,OAAO;AAAA;AAAA,EAEjD;AACF;AAEA,eAAe,OAAO,mBAAmB,cAAc;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/summary-list.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { ImpktElement } from '../base/ImpktElement';\nimport { focusRing } from '../base/styles';\nimport { fontSize, fontWeight, space, t } from '../base/tokens';\n\nexport interface SummaryRow {\n key: string;\n value: string;\n /** Where \"Change\" goes. Omitted rows show no action. */\n changeHref?: string;\n}\n\n/**\n * Key and value pairs — an order summary, a confirmation, a check-your-answers\n * screen.\n *\n * **It is a description list.** `<dl>` with `<dt>` and `<dd>` says these are\n * pairs; a stack of divs says nothing, and a table claims a grid that a\n * two-column list does not have.\n *\n * **Every \"Change\" names what it changes.** The visible text stays short, and\n * the accessible name is completed with visually hidden words, so a reader\n * tabbing through hears \"Change date of birth\" rather than six links all called\n * \"Change\". This is 2.4.4 Link Purpose, and it is the single most common\n * failure on a check-your-answers page.\n\n *\n * @category content\n * @icon list\n */\nexport class ImpktSummaryList extends ImpktElement {\n static properties = {\n rows: { type: Array },\n changeText: { type: String, attribute: 'change-text' },\n };\n\n declare rows: SummaryRow[];\n declare changeText: string;\n\n constructor() {\n super();\n this.rows = [];\n this.changeText = 'Change';\n }\n\n static styles = [\n ...ImpktElement.styles,\n focusRing,\n css`\n :host {\n display: block;\n }\n dl {\n margin: 0;\n display: grid;\n grid-template-columns: minmax(8rem, 1fr) 2fr;\n }\n /* A <dl> group may hold only dt and dd — not a third sibling — so the\n action lives inside the value it changes, which is also where it\n belongs semantically. The row uses display:contents so both cells stay\n in the parent grid. */\n .row {\n display: contents;\n }\n dt,\n dd {\n padding: ${space(3)} 0;\n border-block-end: ${t.borderThin} solid ${t.border};\n }\n dt {\n font-weight: ${fontWeight('semibold')};\n font-size: ${fontSize('sm')};\n }\n dd {\n margin: 0;\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: ${space(3)};\n }\n dd a {\n flex: none;\n color: ${t.link};\n text-decoration: underline;\n text-underline-offset: 0.2em;\n display: inline-block;\n min-block-size: ${t.targetMin};\n }\n .sr-only {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n }\n /* One column on a narrow screen. 1.4.10 Reflow: two columns at 320px\n forces horizontal scrolling, and a summary is read, not scanned\n across. */\n @media (max-width: 30rem) {\n dl {\n grid-template-columns: 1fr;\n }\n dt {\n border-block-end: 0;\n padding-block-end: 0;\n }\n dd {\n padding-block-start: 0;\n }\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`\n <dl part=\"list\">\n ${this.rows.map(\n (row) => html`\n <div class=\"row\" part=\"row\">\n <dt part=\"key\">${row.key}</dt>\n <dd part=\"value\">\n <span>${row.value}</span>\n ${row.changeHref\n ? html`<a href=${row.changeHref} part=\"action\"\n >${this.changeText}<span class=\"sr-only\"> ${row.key}</span></a\n >`\n : nothing}\n </dd>\n </div>\n `,\n )}\n </dl>\n `;\n }\n}\n\ncustomElements.define('impkt-summary-list', ImpktSummaryList);\n\ndeclare global {\n interface HTMLElementTagNameMap { 'impkt-summary-list': ImpktSummaryList }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AA8BjD,IAAM,mBAAN,cAA+B,aAAa;AAAA,EACjD;AAAA,SAAO,aAAa;AAAA,MAClB,MAAM,EAAE,MAAM,MAAM;AAAA,MACpB,YAAY,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,IACvD;AAAA;AAAA,EAKA,cAAc;AACZ,UAAM;AACN,SAAK,OAAO,CAAC;AACb,SAAK,aAAa;AAAA,EACpB;AAAA,EAEA;AAAA,SAAO,SAAS;AAAA,MACd,GAAG,aAAa;AAAA,MAChB;AAAA,MACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAkBe,MAAM,CAAC,CAAC;AAAA,4BACC,EAAE,UAAU,UAAU,EAAE,MAAM;AAAA;AAAA;AAAA,uBAGnC,WAAW,UAAU,CAAC;AAAA,qBACxB,SAAS,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOpB,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA,iBAIN,EAAE,IAAI;AAAA;AAAA;AAAA;AAAA,0BAIG,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IA2BnC;AAAA;AAAA,EAEA,SAAyB;AACvB,WAAO;AAAA;AAAA,UAED,KAAK,KAAK;AAAA,MACV,CAAC,QAAQ;AAAA;AAAA,+BAEY,IAAI,GAAG;AAAA;AAAA,wBAEd,IAAI,KAAK;AAAA,kBACf,IAAI,aACF,eAAe,IAAI,UAAU;AAAA,yBACxB,KAAK,UAAU,0BAA0B,IAAI,GAAG;AAAA,yBAErD,OAAO;AAAA;AAAA;AAAA;AAAA,IAInB,CAAC;AAAA;AAAA;AAAA,EAGP;AACF;AAEA,eAAe,OAAO,sBAAsB,gBAAgB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/text-input.ts"],"sourcesContent":["import { html, css, nothing, type TemplateResult } from 'lit';\nimport { FieldElement } from '../base/FieldElement';\nimport { fontSize, space, t } from '../base/tokens';\n\n/**\n * A single-line text field.\n *\n * `inputmode` and `autocomplete` are first-class properties rather than\n * afterthoughts. 1.3.5 Identify Input Purpose is a Level AA criterion that\n * autofill satisfies directly, and it is the single cheapest accessibility win\n * in a checkout journey — a form that fills itself is a form that someone with a\n * motor impairment can actually finish.\n\n *\n * @category form\n * @icon field\n */\nexport class ImpktTextInput extends FieldElement {\n static properties = {\n ...FieldElement.properties,\n type: { type: String },\n placeholder: { type: String },\n autocomplete: { type: String },\n inputmode: { type: String },\n maxlength: { type: Number },\n };\n\n declare type: 'text' | 'email' | 'tel' | 'number' | 'password' | 'date';\n declare placeholder: string;\n /** A token from the HTML autofill list — `given-name`, `postal-code`, `tel`. */\n declare autocomplete: string;\n declare inputmode: string;\n declare maxlength: number | undefined;\n\n constructor() {\n super();\n this.type = 'text';\n this.placeholder = '';\n this.autocomplete = '';\n this.inputmode = '';\n this.maxlength = undefined;\n }\n\n static styles = [\n ...FieldElement.styles,\n css`\n input {\n inline-size: 100%;\n min-block-size: 44px;\n padding: ${space(3)};\n font-family: inherit;\n font-size: ${fontSize('md')};\n color: ${t.text};\n background: ${t.surfaceCard};\n border: ${t.borderThin} solid ${t.border};\n border-radius: ${t.radius};\n }\n input::placeholder {\n color: ${t.textPlaceholder};\n }\n input:disabled {\n background: ${t.surfaceInset};\n cursor: not-allowed;\n }\n /* The border thickens as well as reddening. Colour alone would carry the\n error, which 1.4.1 forbids — and the message below says it in words. */\n :host([invalid]) input {\n border-color: ${t.danger};\n border-width: ${t.borderThick};\n }\n `,\n ];\n\n protected renderControl(): TemplateResult {\n return html`\n <input\n id=${this.controlId}\n part=\"input\"\n type=${this.type}\n name=${this.name || nothing}\n .value=${this.value}\n placeholder=${this.placeholder || nothing}\n autocomplete=${this.autocomplete || nothing}\n inputmode=${this.inputmode || nothing}\n maxlength=${this.maxlength ?? nothing}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n aria-describedby=${this.describedBy}\n aria-invalid=${this.error ? 'true' : nothing}\n @input=${(e: Event) => this.setFormValue((e.target as HTMLInputElement).value)}\n />\n `;\n }\n\n updated(changed: Map<string, unknown>): void {\n if (changed.has('error')) this.toggleAttribute('invalid', Boolean(this.error));\n }\n}\n\ncustomElements.define('impkt-text-input', ImpktTextInput);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-text-input': ImpktTextInput;\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAiBjD,IAAM,iBAAN,cAA6B,aAAa;AAAA,EAC/C;AAAA,SAAO,aAAa;AAAA,MAClB,GAAG,aAAa;AAAA,MAChB,MAAM,EAAE,MAAM,OAAO;AAAA,MACrB,aAAa,EAAE,MAAM,OAAO;AAAA,MAC5B,cAAc,EAAE,MAAM,OAAO;AAAA,MAC7B,WAAW,EAAE,MAAM,OAAO;AAAA,MAC1B,WAAW,EAAE,MAAM,OAAO;AAAA,IAC5B;AAAA;AAAA,EASA,cAAc;AACZ,UAAM;AACN,SAAK,OAAO;AACZ,SAAK,cAAc;AACnB,SAAK,eAAe;AACpB,SAAK,YAAY;AACjB,SAAK,YAAY;AAAA,EACnB;AAAA,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import { ImpktElement } from '../base/ImpktElement';\nimport { t } from '../base/tokens';\n\n/**\n * An image.\n *\n * `alt` is required and may be the empty string, which is a decision rather\n * than laxity: an empty alt is the correct and only way to mark an image as\n * decorative, and a missing alt is a different thing entirely — it leaves a\n * screen reader to read the file name. Making the property required forces the\n * author to say which they meant.\n *\n * `width` and `height` are the intrinsic pixel size. Without them the browser\n * cannot reserve space and the page jumps as each image loads, which is a\n * usability problem for everyone and a serious one for anyone using a screen\n * magnifier, who loses their place entirely.\n\n *\n * @category media\n * @icon image\n * @role image\n */\nexport class ImpktImage extends ImpktElement {\n static properties = {\n src: { type: String },\n alt: { type: String },\n decorative: { type: Boolean, reflect: true },\n width: { type: Number },\n height: { type: Number },\n focalX: { type: Number, attribute: 'focal-x' },\n focalY: { type: Number, attribute: 'focal-y' },\n loading: { type: String },\n };\n\n declare src: string;\n declare alt: string;\n /**\n * This image says nothing a reader needs.\n *\n * An empty `alt` is the correct way to mark a decorative image AND what a\n * missing one looks like, so the two are indistinguishable to anything\n * downstream — which is why the commonest accessibility failure on the web\n * survives every automated check. Only the author knows which they meant,\n * so this is where they say it, and the publish gate holds them to it.\n */\n declare decorative: boolean;\n declare width: number | undefined;\n declare height: number | undefined;\n /** The fraction of the image that must survive a crop. */\n declare focalX: number;\n declare focalY: number;\n declare loading: 'lazy' | 'eager';\n\n constructor() {\n super();\n this.src = '';\n this.alt = '';\n this.decorative = false;\n this.width = undefined;\n this.height = undefined;\n this.focalX = 0.5;\n this.focalY = 0.5;\n this.loading = 'lazy';\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n }\n img {\n display: block;\n max-inline-size: 100%;\n block-size: auto;\n object-fit: cover;\n }\n `,\n ];\n\n render(): TemplateResult {\n return html`\n <img\n part=\"image\"\n src=${this.src}\n alt=${this.decorative ? '' : this.alt}\n role=${this.decorative ? 'presentation' : nothing}\n width=${this.width ?? nothing}\n height=${this.height ?? nothing}\n loading=${this.loading}\n style=\"object-position: ${this.focalX * 100}% ${this.focalY * 100}%\"\n />\n `;\n }\n}\n\n/**\n * The partner's logo.\n *\n * Separate from `impkt-image` for one reason: it is the most prominent image on\n * every page and its alt text is the brand name, so it should not be possible\n * to ship it with an empty alt by copying a decorative image. `src` and `alt`\n * come from the brand's assets.\n *\n * `on-dark` picks the dark-surface variant where the brand supplies one. A\n * logo that disappears into a dark footer is not a styling problem, it is a\n * missing piece of information.\n\n *\n * @category media\n * @icon logo\n */\nexport class ImpktLogo extends ImpktElement {\n static properties = {\n src: { type: String },\n srcDark: { type: String, attribute: 'src-dark' },\n alt: { type: String },\n onDark: { type: Boolean, attribute: 'on-dark', reflect: true },\n height: { type: Number },\n };\n\n declare src: string;\n declare srcDark: string;\n declare alt: string;\n declare onDark: boolean;\n declare height: number;\n\n constructor() {\n super();\n this.src = '';\n this.srcDark = '';\n this.alt = '';\n this.onDark = false;\n this.height = 32;\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: inline-block;\n }\n img {\n display: block;\n inline-size: auto;\n }\n `,\n ];\n\n render(): TemplateResult {\n const src = this.onDark && this.srcDark ? this.srcDark : this.src;\n return html`<img part=\"logo\" src=${src} alt=${this.alt} style=\"height: ${this.height}px\" />`;\n }\n}\n\n/**\n * A downloadable document — terms of service, a product sheet, a price list.\n *\n * The file type and size are part of the accessible name, not decoration\n * beside it. A list of links all named \"Download\" fails 2.4.4 Link Purpose,\n * and a reader tabbing between them cannot tell which document they are on.\n\n *\n * @category media\n * @icon document\n */\nexport class ImpktDocumentLink extends ImpktElement {\n static properties = {\n href: { type: String },\n label: { type: String },\n fileType: { type: String, attribute: 'file-type' },\n byteSize: { type: Number, attribute: 'byte-size' },\n };\n\n declare href: string;\n declare label: string;\n declare fileType: string;\n declare byteSize: number | undefined;\n\n constructor() {\n super();\n this.href = '';\n this.label = '';\n this.fileType = '';\n this.byteSize = undefined;\n }\n\n static styles = [\n ...ImpktElement.styles,\n css`\n :host {\n display: block;\n }\n a {\n color: ${t.link};\n text-decoration: underline;\n text-underline-offset: 0.2em;\n display: inline-flex;\n gap: 0.5ch;\n align-items: baseline;\n min-block-size: ${t.targetMin};\n }\n .meta {\n color: ${t.textMuted};\n }\n `,\n ];\n\n /** \"240 KB\". Rounded, because the exact byte count helps nobody. */\n private get size(): string {\n if (!this.byteSize) return '';\n const kb = this.byteSize / 1024;\n return kb >= 1024 ? `${(kb / 1024).toFixed(1)} MB` : `${Math.round(kb)} KB`;\n }\n\n render(): TemplateResult {\n const meta = [this.fileType, this.size].filter(Boolean).join(', ');\n return html`\n <a part=\"link\" href=${this.href || nothing} download>\n <span>${this.label}</span>${meta ? html`<span class=\"meta\">(${meta})</span>` : nothing}\n </a>\n `;\n }\n}\n\ncustomElements.define('impkt-image', ImpktImage);\ncustomElements.define('impkt-logo', ImpktLogo);\ncustomElements.define('impkt-document-link', ImpktDocumentLink);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'impkt-image': ImpktImage;\n 'impkt-logo': ImpktLogo;\n 'impkt-document-link': ImpktDocumentLink;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAS,MAAM,KAAK,eAAoC;AAuBjD,IAAM,aAAN,cAAyB,aAAa;AAAA,EAC3C;AAAA,SAAO,aAAa;AAAA,MAClB,KAAK,EAAE,MAAM,OAAO;AAAA,MACpB,KAAK,EAAE,MAAM,OAAO;AAAA,MACpB,YAAY,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,MAC3C,OAAO,EAAE,MAAM,OAAO;AAAA,MACtB,QAAQ,EAAE,MAAM,OAAO;AAAA,MACvB,QAAQ,EAAE,MAAM,QAAQ,WAAW,UAAU;AAAA,MAC7C,QAAQ,EAAE,MAAM,QAAQ,WAAW,UAAU;AAAA,MAC7C,SAAS,EAAE,MAAM,OAAO;AAAA,IAC1B;AAAA;AAAA,EAqBA,cAAc;AACZ,UAAM;AACN,SAAK,MAAM;AACX,SAAK,MAAM;AACX,SAAK,aAAa;AAClB,SAAK,QAAQ;AACb,SAAK,SA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@@
|
|
|
1
|
-
import {
|
|
2
|
-
ImpktElement,
|
|
3
|
-
fontSize,
|
|
4
|
-
fontWeight,
|
|
5
|
-
lineHeight,
|
|
6
|
-
space,
|
|
7
|
-
spaceAround,
|
|
8
|
-
t
|
|
9
|
-
} from "./chunk-5NUF7ZQA.js";
|
|
10
|
-
|
|
11
|
-
// packages/ui/src/components/layout.ts
|
|
12
|
-
import { html, css } from "lit";
|
|
13
|
-
var ImpktStack = class extends ImpktElement {
|
|
14
|
-
static {
|
|
15
|
-
this.properties = {
|
|
16
|
-
gap: { type: String, reflect: true },
|
|
17
|
-
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
18
|
-
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
constructor() {
|
|
22
|
-
super();
|
|
23
|
-
this.gap = "md";
|
|
24
|
-
this.spaceAbove = "none";
|
|
25
|
-
this.spaceBelow = "none";
|
|
26
|
-
}
|
|
27
|
-
static {
|
|
28
|
-
this.styles = [
|
|
29
|
-
...ImpktElement.styles,
|
|
30
|
-
spaceAround,
|
|
31
|
-
css`
|
|
32
|
-
:host {
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
}
|
|
36
|
-
:host([gap='xs']) { gap: ${space(1)}; }
|
|
37
|
-
:host([gap='sm']) { gap: ${space(2)}; }
|
|
38
|
-
:host([gap='md']) { gap: ${space(4)}; }
|
|
39
|
-
:host([gap='lg']) { gap: ${space(6)}; }
|
|
40
|
-
:host([gap='xl']) { gap: ${space(8)}; }
|
|
41
|
-
`
|
|
42
|
-
];
|
|
43
|
-
}
|
|
44
|
-
render() {
|
|
45
|
-
return html`<slot></slot>`;
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
var ImpktCard = class extends ImpktElement {
|
|
49
|
-
static {
|
|
50
|
-
this.properties = {
|
|
51
|
-
spaceAbove: { type: String, reflect: true, attribute: "space-above" },
|
|
52
|
-
spaceBelow: { type: String, reflect: true, attribute: "space-below" }
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
constructor() {
|
|
56
|
-
super();
|
|
57
|
-
this.spaceAbove = "none";
|
|
58
|
-
this.spaceBelow = "none";
|
|
59
|
-
}
|
|
60
|
-
static {
|
|
61
|
-
this.styles = [
|
|
62
|
-
...ImpktElement.styles,
|
|
63
|
-
spaceAround,
|
|
64
|
-
css`
|
|
65
|
-
:host {
|
|
66
|
-
display: block;
|
|
67
|
-
background: ${t.surfaceCard};
|
|
68
|
-
border: ${t.borderThin} solid ${t.border};
|
|
69
|
-
border-radius: ${t.radiusLg};
|
|
70
|
-
padding: ${space(6)};
|
|
71
|
-
}
|
|
72
|
-
`
|
|
73
|
-
];
|
|
74
|
-
}
|
|
75
|
-
render() {
|
|
76
|
-
return html`<slot></slot>`;
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
var ImpktHeading = class extends ImpktElement {
|
|
80
|
-
static {
|
|
81
|
-
this.properties = {
|
|
82
|
-
level: { type: Number, reflect: true },
|
|
83
|
-
size: { type: String, reflect: true }
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
constructor() {
|
|
87
|
-
super();
|
|
88
|
-
this.level = 2;
|
|
89
|
-
this.size = "xl";
|
|
90
|
-
}
|
|
91
|
-
static {
|
|
92
|
-
this.styles = [
|
|
93
|
-
...ImpktElement.styles,
|
|
94
|
-
css`
|
|
95
|
-
:host {
|
|
96
|
-
display: block;
|
|
97
|
-
color: ${t.textHeading};
|
|
98
|
-
font-family: ${t.fontHeading};
|
|
99
|
-
font-weight: ${fontWeight("bold")};
|
|
100
|
-
line-height: ${lineHeight("tight")};
|
|
101
|
-
}
|
|
102
|
-
:host([size='3xl']) { font-size: ${fontSize("3xl")}; }
|
|
103
|
-
:host([size='2xl']) { font-size: ${fontSize("2xl")}; }
|
|
104
|
-
:host([size='xl']) { font-size: ${fontSize("xl")}; }
|
|
105
|
-
:host([size='lg']) { font-size: ${fontSize("lg")}; }
|
|
106
|
-
:host([size='md']) { font-size: ${fontSize("md")}; }
|
|
107
|
-
.h {
|
|
108
|
-
margin: 0;
|
|
109
|
-
font: inherit;
|
|
110
|
-
color: inherit;
|
|
111
|
-
}
|
|
112
|
-
`
|
|
113
|
-
];
|
|
114
|
-
}
|
|
115
|
-
render() {
|
|
116
|
-
return html`<div class="h" role="heading" aria-level=${this.level} part="heading">
|
|
117
|
-
<slot></slot>
|
|
118
|
-
</div>`;
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
var ImpktText = class extends ImpktElement {
|
|
122
|
-
static {
|
|
123
|
-
this.properties = {
|
|
124
|
-
size: { type: String, reflect: true },
|
|
125
|
-
tone: { type: String, reflect: true }
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
constructor() {
|
|
129
|
-
super();
|
|
130
|
-
this.size = "md";
|
|
131
|
-
this.tone = "default";
|
|
132
|
-
}
|
|
133
|
-
static {
|
|
134
|
-
this.styles = [
|
|
135
|
-
...ImpktElement.styles,
|
|
136
|
-
css`
|
|
137
|
-
:host {
|
|
138
|
-
display: block;
|
|
139
|
-
/* 1.4.8 asks for 1.5 within a paragraph, and it is the default here
|
|
140
|
-
rather than an option, because body text is what it is about. */
|
|
141
|
-
line-height: ${lineHeight("normal")};
|
|
142
|
-
/* 1.4.12 Text Spacing: a user stylesheet must be able to widen this
|
|
143
|
-
without clipping, which a max-width in ch units survives and a
|
|
144
|
-
fixed pixel height does not. */
|
|
145
|
-
max-inline-size: 70ch;
|
|
146
|
-
}
|
|
147
|
-
:host([size='sm']) { font-size: ${fontSize("sm")}; }
|
|
148
|
-
:host([size='md']) { font-size: ${fontSize("md")}; }
|
|
149
|
-
:host([size='lg']) { font-size: ${fontSize("lg")}; }
|
|
150
|
-
:host([tone='muted']) { color: ${t.textMuted}; }
|
|
151
|
-
p {
|
|
152
|
-
margin: 0;
|
|
153
|
-
}
|
|
154
|
-
`
|
|
155
|
-
];
|
|
156
|
-
}
|
|
157
|
-
render() {
|
|
158
|
-
return html`<p part="text"><slot></slot></p>`;
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
customElements.define("impkt-stack", ImpktStack);
|
|
162
|
-
customElements.define("impkt-card", ImpktCard);
|
|
163
|
-
customElements.define("impkt-heading", ImpktHeading);
|
|
164
|
-
customElements.define("impkt-text", ImpktText);
|
|
165
|
-
|
|
166
|
-
export {
|
|
167
|
-
ImpktStack,
|
|
168
|
-
ImpktCard,
|
|
169
|
-
ImpktHeading,
|
|
170
|
-
ImpktText
|
|
171
|
-
};
|
|
172
|
-
//# sourceMappingURL=chunk-GGODB3GY.js.map
|