@atomic-ui/ui 0.3.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/README.md +31 -33
  2. package/custom-elements.json +5986 -15880
  3. package/dist/base/FieldElement.d.ts +4 -4
  4. package/dist/base/{ImpktElement.d.ts → ImpaktElement.d.ts} +2 -2
  5. package/dist/base/styles.d.ts +7 -0
  6. package/dist/base/tokens.d.ts +1 -1
  7. package/dist/base/tone.d.ts +20 -0
  8. package/dist/{chunk-3RE4H2XO.js → chunk-3EF4T242.js} +7 -7
  9. package/dist/chunk-3EF4T242.js.map +1 -0
  10. package/dist/chunk-4ZQTXTPA.js +76 -0
  11. package/dist/chunk-4ZQTXTPA.js.map +1 -0
  12. package/dist/{chunk-NKMVICB5.js → chunk-5Y3HYRCU.js} +7 -7
  13. package/dist/chunk-5Y3HYRCU.js.map +1 -0
  14. package/dist/{chunk-ZOTAAYO5.js → chunk-5ZQVL3V2.js} +19 -12
  15. package/dist/chunk-5ZQVL3V2.js.map +1 -0
  16. package/dist/{chunk-4OYHT4BN.js → chunk-A7YBFS4H.js} +15 -15
  17. package/dist/chunk-A7YBFS4H.js.map +1 -0
  18. package/dist/{chunk-DAH7RLW3.js → chunk-DE3INTHZ.js} +6 -6
  19. package/dist/chunk-DE3INTHZ.js.map +1 -0
  20. package/dist/{chunk-HXINWP3V.js → chunk-EJD6LT7E.js} +20 -83
  21. package/dist/chunk-EJD6LT7E.js.map +1 -0
  22. package/dist/{chunk-P6GDMZK4.js → chunk-EJSX4WCD.js} +9 -9
  23. package/dist/chunk-EJSX4WCD.js.map +1 -0
  24. package/dist/{chunk-46BYUQ5A.js → chunk-FWR6SEIA.js} +33 -33
  25. package/dist/chunk-FWR6SEIA.js.map +1 -0
  26. package/dist/{chunk-CUUBAETM.js → chunk-GJPHQLLN.js} +8 -8
  27. package/dist/chunk-GJPHQLLN.js.map +1 -0
  28. package/dist/{chunk-R7FKGFW6.js → chunk-HNBG2POR.js} +7 -7
  29. package/dist/chunk-HNBG2POR.js.map +1 -0
  30. package/dist/{chunk-DKZ425AM.js → chunk-HNZQ7LM4.js} +11 -11
  31. package/dist/chunk-HNZQ7LM4.js.map +1 -0
  32. package/dist/{chunk-55DK75QF.js → chunk-I54DOEZB.js} +6 -6
  33. package/dist/chunk-I54DOEZB.js.map +1 -0
  34. package/dist/{chunk-WGPB3QQU.js → chunk-KFAGXPIK.js} +10 -10
  35. package/dist/chunk-KFAGXPIK.js.map +1 -0
  36. package/dist/{chunk-J2FACXYI.js → chunk-PANH23MF.js} +12 -12
  37. package/dist/chunk-PANH23MF.js.map +1 -0
  38. package/dist/{chunk-KKJEEKL2.js → chunk-PYVUQNFQ.js} +8 -8
  39. package/dist/chunk-PYVUQNFQ.js.map +1 -0
  40. package/dist/{chunk-RWWRTURA.js → chunk-Q54FX3SY.js} +8 -8
  41. package/dist/chunk-Q54FX3SY.js.map +1 -0
  42. package/dist/{chunk-AUVIOU5G.js → chunk-QBORJTS4.js} +36 -36
  43. package/dist/chunk-QBORJTS4.js.map +1 -0
  44. package/dist/{chunk-5QSTXIPG.js → chunk-RXX4CN5J.js} +7 -7
  45. package/dist/chunk-RXX4CN5J.js.map +1 -0
  46. package/dist/{chunk-XPCU4KUY.js → chunk-SV77SN6P.js} +7 -7
  47. package/dist/chunk-SV77SN6P.js.map +1 -0
  48. package/dist/{chunk-FVCM4WHD.js → chunk-TAZZLOUY.js} +10 -10
  49. package/dist/chunk-TAZZLOUY.js.map +1 -0
  50. package/dist/{chunk-KMCGX76Y.js → chunk-TRZO5CHU.js} +7 -7
  51. package/dist/chunk-TRZO5CHU.js.map +1 -0
  52. package/dist/{chunk-F4YQWKK2.js → chunk-UPOTBKKK.js} +7 -7
  53. package/dist/chunk-UPOTBKKK.js.map +1 -0
  54. package/dist/{chunk-APJ5JGRW.js → chunk-WP5WJ4V5.js} +6 -6
  55. package/dist/chunk-WP5WJ4V5.js.map +1 -0
  56. package/dist/{chunk-TCXKZDMR.js → chunk-WS5AUJ35.js} +7 -7
  57. package/dist/chunk-WS5AUJ35.js.map +1 -0
  58. package/dist/{chunk-7P4Z4CLK.js → chunk-WWYYNR3Z.js} +50 -49
  59. package/dist/chunk-WWYYNR3Z.js.map +1 -0
  60. package/dist/{chunk-RYBY35QE.js → chunk-XU2XODVH.js} +6 -6
  61. package/dist/chunk-XU2XODVH.js.map +1 -0
  62. package/dist/{chunk-3KO55PZK.js → chunk-YR6T73GY.js} +18 -11
  63. package/dist/chunk-YR6T73GY.js.map +1 -0
  64. package/dist/{chunk-IOBSIAHB.js → chunk-YYYQPKQ7.js} +24 -24
  65. package/dist/chunk-YYYQPKQ7.js.map +1 -0
  66. package/dist/{chunk-PO6FCAIS.js → chunk-Z45LY6BT.js} +9 -9
  67. package/dist/chunk-Z45LY6BT.js.map +1 -0
  68. package/dist/{chunk-DJEZW7AC.js → chunk-ZQBEFP2O.js} +7 -7
  69. package/dist/chunk-ZQBEFP2O.js.map +1 -0
  70. package/dist/chunk-ZS7RPXCT.js +47 -0
  71. package/dist/chunk-ZS7RPXCT.js.map +1 -0
  72. package/dist/components/accordion.d.ts +3 -3
  73. package/dist/components/accordion.js +4 -4
  74. package/dist/components/alert.d.ts +3 -3
  75. package/dist/components/alert.js +4 -4
  76. package/dist/components/app-ui.d.ts +25 -25
  77. package/dist/components/app-ui.js +21 -21
  78. package/dist/components/badge.d.ts +37 -0
  79. package/dist/components/badge.js +9 -0
  80. package/dist/components/blocks.d.ts +10 -73
  81. package/dist/components/blocks.js +10 -13
  82. package/dist/components/button.d.ts +3 -3
  83. package/dist/components/button.js +5 -5
  84. package/dist/components/checkbox-group.d.ts +2 -2
  85. package/dist/components/checkbox-group.js +5 -5
  86. package/dist/components/checkbox.d.ts +2 -2
  87. package/dist/components/checkbox.js +5 -5
  88. package/dist/components/chip.d.ts +58 -0
  89. package/dist/components/chip.js +8 -0
  90. package/dist/components/date-input.d.ts +2 -2
  91. package/dist/components/date-input.js +5 -5
  92. package/dist/components/dialog.d.ts +4 -4
  93. package/dist/components/dialog.js +4 -4
  94. package/dist/components/fieldset.d.ts +3 -3
  95. package/dist/components/fieldset.js +4 -4
  96. package/dist/components/grid.d.ts +3 -3
  97. package/dist/components/grid.js +4 -4
  98. package/dist/components/help.d.ts +3 -3
  99. package/dist/components/help.js +4 -4
  100. package/dist/components/icon.d.ts +3 -3
  101. package/dist/components/icon.js +4 -4
  102. package/dist/components/journey.d.ts +18 -18
  103. package/dist/components/journey.js +15 -15
  104. package/dist/components/layout.d.ts +9 -9
  105. package/dist/components/layout.js +10 -10
  106. package/dist/components/link.d.ts +3 -3
  107. package/dist/components/link.js +5 -5
  108. package/dist/components/list.d.ts +3 -3
  109. package/dist/components/list.js +4 -4
  110. package/dist/components/media.d.ts +8 -8
  111. package/dist/components/media.js +8 -8
  112. package/dist/components/navigation.d.ts +5 -5
  113. package/dist/components/navigation.js +7 -7
  114. package/dist/components/page.d.ts +5 -5
  115. package/dist/components/page.js +6 -6
  116. package/dist/components/price.d.ts +3 -3
  117. package/dist/components/price.js +4 -4
  118. package/dist/components/progress.d.ts +3 -3
  119. package/dist/components/progress.js +4 -4
  120. package/dist/components/radio-group.d.ts +2 -2
  121. package/dist/components/radio-group.js +5 -5
  122. package/dist/components/select.d.ts +2 -2
  123. package/dist/components/select.js +5 -5
  124. package/dist/components/summary-list.d.ts +3 -3
  125. package/dist/components/summary-list.js +4 -4
  126. package/dist/components/table.d.ts +6 -6
  127. package/dist/components/table.js +5 -5
  128. package/dist/components/text-input.d.ts +2 -2
  129. package/dist/components/text-input.js +5 -5
  130. package/dist/components/textarea.d.ts +2 -2
  131. package/dist/components/textarea.js +5 -5
  132. package/dist/index.d.ts +47 -40
  133. package/dist/index.js +206 -270
  134. package/dist/standalone/atomic-ui.js +796 -2002
  135. package/dist/standalone/atomic-ui.js.map +4 -4
  136. package/dist/standalone/index.html +51 -52
  137. package/package.json +4 -4
  138. package/specimen/index.html +51 -52
  139. package/dist/chunk-37PA72FC.js +0 -725
  140. package/dist/chunk-37PA72FC.js.map +0 -1
  141. package/dist/chunk-3KO55PZK.js.map +0 -1
  142. package/dist/chunk-3RE4H2XO.js.map +0 -1
  143. package/dist/chunk-46BYUQ5A.js.map +0 -1
  144. package/dist/chunk-4OYHT4BN.js.map +0 -1
  145. package/dist/chunk-55DK75QF.js.map +0 -1
  146. package/dist/chunk-5QSTXIPG.js.map +0 -1
  147. package/dist/chunk-7P4Z4CLK.js.map +0 -1
  148. package/dist/chunk-APJ5JGRW.js.map +0 -1
  149. package/dist/chunk-AUVIOU5G.js.map +0 -1
  150. package/dist/chunk-CUUBAETM.js.map +0 -1
  151. package/dist/chunk-DAH7RLW3.js.map +0 -1
  152. package/dist/chunk-DJEZW7AC.js.map +0 -1
  153. package/dist/chunk-DKZ425AM.js.map +0 -1
  154. package/dist/chunk-F4YQWKK2.js.map +0 -1
  155. package/dist/chunk-FVCM4WHD.js.map +0 -1
  156. package/dist/chunk-GBRML4RF.js +0 -264
  157. package/dist/chunk-GBRML4RF.js.map +0 -1
  158. package/dist/chunk-HXINWP3V.js.map +0 -1
  159. package/dist/chunk-IOBSIAHB.js.map +0 -1
  160. package/dist/chunk-IZOTGWWI.js +0 -361
  161. package/dist/chunk-IZOTGWWI.js.map +0 -1
  162. package/dist/chunk-J2FACXYI.js.map +0 -1
  163. package/dist/chunk-KKJEEKL2.js.map +0 -1
  164. package/dist/chunk-KMCGX76Y.js.map +0 -1
  165. package/dist/chunk-NKMVICB5.js.map +0 -1
  166. package/dist/chunk-OFLMG6RN.js +0 -428
  167. package/dist/chunk-OFLMG6RN.js.map +0 -1
  168. package/dist/chunk-P6GDMZK4.js.map +0 -1
  169. package/dist/chunk-PO6FCAIS.js.map +0 -1
  170. package/dist/chunk-PWLZFGS3.js +0 -494
  171. package/dist/chunk-PWLZFGS3.js.map +0 -1
  172. package/dist/chunk-QJIB36DM.js +0 -249
  173. package/dist/chunk-QJIB36DM.js.map +0 -1
  174. package/dist/chunk-R7FKGFW6.js.map +0 -1
  175. package/dist/chunk-RWWRTURA.js.map +0 -1
  176. package/dist/chunk-RYBY35QE.js.map +0 -1
  177. package/dist/chunk-S7F5VKWU.js +0 -453
  178. package/dist/chunk-S7F5VKWU.js.map +0 -1
  179. package/dist/chunk-T5W3FDSF.js +0 -396
  180. package/dist/chunk-T5W3FDSF.js.map +0 -1
  181. package/dist/chunk-TCXKZDMR.js.map +0 -1
  182. package/dist/chunk-WGPB3QQU.js.map +0 -1
  183. package/dist/chunk-XPCU4KUY.js.map +0 -1
  184. package/dist/chunk-YRYZUYY7.js +0 -236
  185. package/dist/chunk-YRYZUYY7.js.map +0 -1
  186. package/dist/chunk-ZOTAAYO5.js.map +0 -1
  187. package/dist/components/changelog.d.ts +0 -386
  188. package/dist/components/changelog.js +0 -25
  189. package/dist/components/estimator.d.ts +0 -246
  190. package/dist/components/estimator.js +0 -16
  191. package/dist/components/marketing.d.ts +0 -370
  192. package/dist/components/marketing.js +0 -21
  193. package/dist/components/marketing.js.map +0 -1
  194. package/dist/components/organisms.d.ts +0 -559
  195. package/dist/components/organisms.js +0 -25
  196. package/dist/components/organisms.js.map +0 -1
  197. package/dist/components/property.d.ts +0 -389
  198. package/dist/components/property.js +0 -20
  199. package/dist/components/property.js.map +0 -1
  200. package/dist/components/scene.d.ts +0 -138
  201. package/dist/components/scene.js +0 -8
  202. package/dist/components/scene.js.map +0 -1
  203. package/dist/components/scrubber.d.ts +0 -86
  204. package/dist/components/scrubber.js +0 -8
  205. package/dist/components/scrubber.js.map +0 -1
  206. package/dist/components/selling.d.ts +0 -409
  207. package/dist/components/selling.js +0 -25
  208. package/dist/components/selling.js.map +0 -1
  209. package/dist/components/site.d.ts +0 -283
  210. package/dist/components/site.js +0 -20
  211. package/dist/components/site.js.map +0 -1
  212. /package/dist/components/{changelog.js.map → badge.js.map} +0 -0
  213. /package/dist/components/{estimator.js.map → chip.js.map} +0 -0
@@ -1,386 +0,0 @@
1
- /**
2
- * Blocks that tell how software was made, in the language software is made
3
- * in: a release with what it added and removed, services as branches that
4
- * merge into one product, checks that passed, and a project drawn as a commit
5
- * graph. They came from building the Impkt site's Commit design in Strata, and
6
- * they are written for any studio, agency or product team that wants to show
7
- * its work this way.
8
- *
9
- * Every colour is a brand token. A lane's colour is a tone (brand, accent or
10
- * a status colour), never a hex value, so a partner's brand restyles them.
11
- */
12
- import { type TemplateResult } from 'lit';
13
- import { ImpktElement } from '../base/ImpktElement';
14
- import './property';
15
- /** A colour for a line or a lane, named by what it is in the brand. */
16
- type NamedTone = 'brand' | 'accent' | 'info' | 'success' | 'warning' | 'danger';
17
- /** A named tone, or 1 to 5 for the brand's chart colours in order. */
18
- export type Tone = NamedTone | 1 | 2 | 3 | 4 | 5;
19
- export declare const TONE: Record<NamedTone, string>;
20
- /** When an item names no tone, lanes take these in turn. */
21
- export declare const CYCLE: NamedTone[];
22
- /**
23
- * A named tone, or for an item that names none, the brand's chart colour for its
24
- * place (color.chart.1 to 5), falling back to the status colours in turn.
25
- */
26
- export declare const toneOf: (tone: Tone | undefined, i: number) => string;
27
- /** One line of what a release changed. */
28
- export interface DiffLine {
29
- id?: string;
30
- /** Added, taken away, or kept as it was. */
31
- change: 'added' | 'removed' | 'same';
32
- text: string;
33
- }
34
- /**
35
- * A piece of work told as a release: what it looked like when it started and
36
- * what shipped, a version line, and a short diff of what it added and took
37
- * away.
38
- *
39
- * With both pictures it is a before-and-after comparison a visitor drags; with
40
- * one it is a picture. The diff is a list, each line saying "Added" or
41
- * "Removed" for a screen reader, since the + and − are only drawn.
42
- *
43
- * @category content
44
- * @icon git-commit
45
- */
46
- export declare class ImpktReleaseCard extends ImpktElement {
47
- static properties: {
48
- label: {
49
- type: StringConstructor;
50
- };
51
- heading: {
52
- type: StringConstructor;
53
- };
54
- text: {
55
- type: StringConstructor;
56
- };
57
- beforeSrc: {
58
- type: StringConstructor;
59
- attribute: string;
60
- };
61
- beforeAlt: {
62
- type: StringConstructor;
63
- attribute: string;
64
- };
65
- afterSrc: {
66
- type: StringConstructor;
67
- attribute: string;
68
- };
69
- afterAlt: {
70
- type: StringConstructor;
71
- attribute: string;
72
- };
73
- items: {
74
- type: ArrayConstructor;
75
- };
76
- href: {
77
- type: StringConstructor;
78
- };
79
- headingLevel: {
80
- type: NumberConstructor;
81
- attribute: string;
82
- };
83
- spaceAbove: {
84
- type: StringConstructor;
85
- reflect: boolean;
86
- attribute: string;
87
- };
88
- spaceBelow: {
89
- type: StringConstructor;
90
- reflect: boolean;
91
- attribute: string;
92
- };
93
- };
94
- /** A line above the heading, such as "v1.0 · Legal tech · Property". */
95
- label: string;
96
- heading: string;
97
- text: string;
98
- /** What it started as: a sketch or a wireframe. */
99
- beforeSrc: string;
100
- beforeAlt: string;
101
- /** What shipped. */
102
- afterSrc: string;
103
- afterAlt: string;
104
- /** What the release added, took away or kept. */
105
- items: DiffLine[];
106
- /** Where the heading links to, such as the case study. */
107
- href: string;
108
- headingLevel: 2 | 3 | 4;
109
- spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
110
- spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
111
- constructor();
112
- static styles: import("lit").CSSResult[];
113
- private raf;
114
- /** Sweep the seam, as Commit's release wipe does: off the screenshot on hover, back on leaving. */
115
- private wipe;
116
- disconnectedCallback(): void;
117
- render(): TemplateResult;
118
- }
119
- /**
120
- * One release in a list: a release card's props. `title` is read when there is
121
- * no `heading`, because that is what a collection's entry carries (ADR 0028).
122
- */
123
- export interface ReleaseItem {
124
- label?: string;
125
- heading?: string;
126
- title?: string;
127
- text?: string;
128
- beforeSrc?: string;
129
- beforeAlt?: string;
130
- afterSrc?: string;
131
- afterAlt?: string;
132
- items?: DiffLine[];
133
- href?: string;
134
- }
135
- /**
136
- * Releases side by side, two to a row: a changelog of case studies.
137
- *
138
- * Bind `items` to a collection's entries and the list follows them: a new case
139
- * study appears here when it is published. The release for the page being
140
- * read is left out, so a case study's "more work" does not offer itself.
141
- *
142
- * @category content
143
- * @icon git-commit
144
- */
145
- export declare class ImpktReleaseList extends ImpktElement {
146
- static properties: {
147
- items: {
148
- type: ArrayConstructor;
149
- };
150
- columns: {
151
- type: StringConstructor;
152
- reflect: boolean;
153
- };
154
- headingLevel: {
155
- type: NumberConstructor;
156
- attribute: string;
157
- };
158
- spaceAbove: {
159
- type: StringConstructor;
160
- reflect: boolean;
161
- attribute: string;
162
- };
163
- spaceBelow: {
164
- type: StringConstructor;
165
- reflect: boolean;
166
- attribute: string;
167
- };
168
- };
169
- items: ReleaseItem[];
170
- /** Releases in a row on a wide screen. One on a phone. */
171
- columns: 'one' | 'two' | 'three';
172
- headingLevel: 2 | 3 | 4;
173
- spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
174
- spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
175
- constructor();
176
- static styles: import("lit").CSSResult[];
177
- render(): TemplateResult;
178
- }
179
- /** One branch: a service, a team, a line of work. */
180
- export interface Branch {
181
- id?: string;
182
- /** A short code-like name, such as "feature/mobile-apps". */
183
- path?: string;
184
- heading: string;
185
- text?: string;
186
- /** A few words below the text, such as the tools it uses. */
187
- tags?: string[];
188
- tone?: Tone;
189
- /** Where the heading links to, such as the service's own page. */
190
- href?: string;
191
- }
192
- /**
193
- * Several lines of work that come together into one: each item branches off a
194
- * main line on the left and merges back into it, and the line ends in what
195
- * they make together.
196
- *
197
- * The lines are drawn; the items are a list with headings, so a screen reader
198
- * reads the work, not the drawing.
199
- *
200
- * @category content
201
- * @icon git-merge
202
- */
203
- export declare class ImpktBranchList extends ImpktElement {
204
- static properties: {
205
- items: {
206
- type: ArrayConstructor;
207
- };
208
- trunk: {
209
- type: StringConstructor;
210
- };
211
- headingLevel: {
212
- type: NumberConstructor;
213
- attribute: string;
214
- };
215
- spaceAbove: {
216
- type: StringConstructor;
217
- reflect: boolean;
218
- attribute: string;
219
- };
220
- spaceBelow: {
221
- type: StringConstructor;
222
- reflect: boolean;
223
- attribute: string;
224
- };
225
- };
226
- items: Branch[];
227
- /** What the main line ends in, such as "main ← one team owns the result". */
228
- trunk: string;
229
- headingLevel: 2 | 3 | 4;
230
- spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
231
- spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
232
- constructor();
233
- static styles: import("lit").CSSResult[];
234
- private unwatch;
235
- connectedCallback(): void;
236
- disconnectedCallback(): void;
237
- render(): TemplateResult;
238
- }
239
- /** One check that passed: a figure and what it measures. */
240
- export interface CheckItem {
241
- id?: string;
242
- figure: string;
243
- label: string;
244
- /** A word at the end of the row, such as "passed". */
245
- status?: string;
246
- }
247
- /**
248
- * Proof as a list of passing checks: a large figure, what it measures, and its
249
- * status, each row ticked. It reads its colours from the band it sits on, so
250
- * it works on a dark section as well as a light one.
251
- *
252
- * @category content
253
- * @icon list-check
254
- */
255
- export declare class ImpktCheckList extends ImpktElement {
256
- static properties: {
257
- items: {
258
- type: ArrayConstructor;
259
- };
260
- summary: {
261
- type: StringConstructor;
262
- };
263
- spaceAbove: {
264
- type: StringConstructor;
265
- reflect: boolean;
266
- attribute: string;
267
- };
268
- spaceBelow: {
269
- type: StringConstructor;
270
- reflect: boolean;
271
- attribute: string;
272
- };
273
- };
274
- items: CheckItem[];
275
- /** A line above the list, such as "All 4 checks passed". */
276
- summary: string;
277
- spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
278
- spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
279
- constructor();
280
- static styles: import("lit").CSSResult[];
281
- private unwatch;
282
- /** How far each figure has counted up, from 0 to 1, while the checks run. */
283
- private counted;
284
- connectedCallback(): void;
285
- disconnectedCallback(): void;
286
- /** Checks run: each figure counts up over 1200 ms, 150 ms after the one above. */
287
- private run;
288
- render(): TemplateResult;
289
- }
290
- /** One stretch of work, drawn as a branch off the main line. */
291
- export interface TimelineLane {
292
- id?: string;
293
- label: string;
294
- /** Where it starts and ends, in the timeline's units (weeks, say). */
295
- from: number;
296
- to: number;
297
- tone?: Tone;
298
- }
299
- /** A moment on a lane, such as a demo. */
300
- export interface TimelineMark {
301
- id?: string;
302
- label: string;
303
- at: number;
304
- }
305
- /**
306
- * A project drawn as a commit graph: a main line along a scale of weeks, each
307
- * phase branching off it and merging back, moments marked on the way, and a
308
- * release tag where it ships.
309
- *
310
- * It is a picture, so it carries a text alternative that says the same in
311
- * words: each phase and when it runs. The steps that explain the phases go
312
- * beside it as their own block.
313
- *
314
- * @category content
315
- * @icon git-branch
316
- */
317
- export declare class ImpktBranchTimeline extends ImpktElement {
318
- static properties: {
319
- lanes: {
320
- type: ArrayConstructor;
321
- };
322
- marks: {
323
- type: ArrayConstructor;
324
- };
325
- span: {
326
- type: NumberConstructor;
327
- };
328
- unit: {
329
- type: StringConstructor;
330
- };
331
- every: {
332
- type: NumberConstructor;
333
- };
334
- release: {
335
- type: StringConstructor;
336
- };
337
- releaseAt: {
338
- type: NumberConstructor;
339
- attribute: string;
340
- };
341
- label: {
342
- type: StringConstructor;
343
- };
344
- spaceAbove: {
345
- type: StringConstructor;
346
- reflect: boolean;
347
- attribute: string;
348
- };
349
- spaceBelow: {
350
- type: StringConstructor;
351
- reflect: boolean;
352
- attribute: string;
353
- };
354
- };
355
- lanes: TimelineLane[];
356
- marks: TimelineMark[];
357
- /** How long the whole timeline is, in its units. */
358
- span: number;
359
- /** The unit's short name on the scale, such as "wk". */
360
- unit: string;
361
- /** How often the scale is labelled. */
362
- every: number;
363
- /** The tag where it ships, such as "v1.0 · launch". */
364
- release: string;
365
- releaseAt: number;
366
- /** What the picture shows, for a screen reader. */
367
- label: string;
368
- spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
369
- spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
370
- constructor();
371
- static styles: import("lit").CSSResult[];
372
- private unwatch;
373
- connectedCallback(): void;
374
- disconnectedCallback(): void;
375
- render(): TemplateResult;
376
- }
377
- declare global {
378
- interface HTMLElementTagNameMap {
379
- 'impkt-release-card': ImpktReleaseCard;
380
- 'impkt-release-list': ImpktReleaseList;
381
- 'impkt-branch-list': ImpktBranchList;
382
- 'impkt-check-list': ImpktCheckList;
383
- 'impkt-branch-timeline': ImpktBranchTimeline;
384
- }
385
- }
386
- export {};
@@ -1,25 +0,0 @@
1
- import {
2
- CYCLE,
3
- ImpktBranchList,
4
- ImpktBranchTimeline,
5
- ImpktCheckList,
6
- ImpktReleaseCard,
7
- ImpktReleaseList,
8
- TONE,
9
- toneOf
10
- } from "../chunk-PWLZFGS3.js";
11
- import "../chunk-OFLMG6RN.js";
12
- import "../chunk-3IGNZTJU.js";
13
- import "../chunk-NKMVICB5.js";
14
- import "../chunk-3KO55PZK.js";
15
- export {
16
- CYCLE,
17
- ImpktBranchList,
18
- ImpktBranchTimeline,
19
- ImpktCheckList,
20
- ImpktReleaseCard,
21
- ImpktReleaseList,
22
- TONE,
23
- toneOf
24
- };
25
- //# sourceMappingURL=changelog.js.map
@@ -1,246 +0,0 @@
1
- /**
2
- * A cost estimator: a few questions, one at a time, with a budget beside them
3
- * that moves as the answers change, and then a result with a timeline, a team
4
- * and a way of working.
5
- *
6
- * Every number is content. Each choice says what it adds to the cost and the
7
- * weeks, or what it multiplies them by, and the bands say how big a team a
8
- * cost needs. The arithmetic lives here, in code, because a binding never
9
- * computes (ADR 0003): a studio changes its rates in the CMS, not the rules.
10
- */
11
- import { type TemplateResult } from 'lit';
12
- import { ImpktElement } from '../base/ImpktElement';
13
- /** One answer to a question, and what it does to the estimate. */
14
- export interface EstimatorChoice {
15
- id: string;
16
- label: string;
17
- /** A line under the label, such as "iPhone and Android". */
18
- hint?: string;
19
- /** Added to the cost, counted in units (see `unit`). */
20
- cost?: number;
21
- /** Added to the weeks. */
22
- weeks?: number;
23
- /** Multiplies the cost, such as 1.35 for a more polished first version. */
24
- costFactor?: number;
25
- /** Multiplies the weeks. */
26
- weeksFactor?: number;
27
- /** Engineers added to the team, such as one more to go faster. */
28
- engineers?: number;
29
- /** Shown beside the budget when it is picked. */
30
- tip?: string;
31
- /** How the summary names it, such as "a SaaS platform" or "payments". The label when left out. */
32
- phrase?: string;
33
- }
34
- /** One question. */
35
- export interface EstimatorQuestion {
36
- id: string;
37
- heading: string;
38
- hint?: string;
39
- /** `one` picks one card, `many` picks any number, and `scale` is a slider across the choices in order. */
40
- kind: 'one' | 'many' | 'scale';
41
- choices: EstimatorChoice[];
42
- /** The choices picked at the start. A `one` or `scale` question takes the first id; with none, its first choice. */
43
- start?: string[];
44
- /** A short name for the question in the summary that is sent on, such as "Polish". Left out of it when there is none. */
45
- short?: string;
46
- /** For a `many` question, whether the summary lists what was picked, as in "with payments and AI features". Yes when left out. */
47
- inSummary?: boolean;
48
- }
49
- /** A band of cost: the first band whose `below` the cost is under applies, or the last one. */
50
- export interface EstimatorBand {
51
- below?: number;
52
- /** For a team band, how many engineers. */
53
- engineers?: number;
54
- /** For a way-of-working band, what it is called. */
55
- text?: string;
56
- }
57
- /** One part of the timeline. The part with no share takes the weeks the others leave. */
58
- export interface EstimatorPhase {
59
- label: string;
60
- /** Its share of the weeks, such as 0.1. At least one week either way. */
61
- share?: number;
62
- }
63
- /** What an estimate came to, as the `impkt-estimate` event carries it. */
64
- export interface EstimateResult {
65
- low: number;
66
- high: number;
67
- weeks: number;
68
- engineers: number;
69
- way: string;
70
- summary: string;
71
- /** The ids picked for each question. */
72
- answers: Record<string, string[]>;
73
- }
74
- /** The arithmetic, apart from the element so it can be checked on its own. */
75
- export declare function estimate(questions: EstimatorQuestion[], answers: Record<string, string[]>, rules: {
76
- low: number;
77
- high: number;
78
- minWeeks: number;
79
- teams: EstimatorBand[];
80
- ways: EstimatorBand[];
81
- }): {
82
- cost: number;
83
- low: number;
84
- high: number;
85
- weeks: number;
86
- engineers: number;
87
- way: string;
88
- };
89
- /** The weeks each part of the timeline takes, adding up to the whole. */
90
- export declare function phaseWeeks(phases: EstimatorPhase[], weeks: number): number[];
91
- /**
92
- * Asks a few questions one at a time and keeps a budget beside them that moves
93
- * with every answer, then shows the estimate: the range, the weeks, how long
94
- * each part takes, the team and the way of working. The visitor can send the
95
- * estimate on to a contact page, where a message box can start with it.
96
- *
97
- * @category form
98
- * @icon calculator
99
- * @fires {CustomEvent<EstimateResult>} impkt-estimate - When the estimate is sent on. The result is in detail.
100
- */
101
- export declare class ImpktEstimator extends ImpktElement {
102
- static properties: {
103
- questions: {
104
- type: ArrayConstructor;
105
- };
106
- teams: {
107
- type: ArrayConstructor;
108
- };
109
- ways: {
110
- type: ArrayConstructor;
111
- };
112
- phases: {
113
- type: ArrayConstructor;
114
- };
115
- low: {
116
- type: NumberConstructor;
117
- };
118
- high: {
119
- type: NumberConstructor;
120
- };
121
- minWeeks: {
122
- type: NumberConstructor;
123
- attribute: string;
124
- };
125
- currency: {
126
- type: StringConstructor;
127
- };
128
- unit: {
129
- type: NumberConstructor;
130
- };
131
- intro: {
132
- type: StringConstructor;
133
- };
134
- budgetLabel: {
135
- type: StringConstructor;
136
- attribute: string;
137
- };
138
- resultHeading: {
139
- type: StringConstructor;
140
- attribute: string;
141
- };
142
- teamText: {
143
- type: StringConstructor;
144
- attribute: string;
145
- };
146
- teamTextOne: {
147
- type: StringConstructor;
148
- attribute: string;
149
- };
150
- note: {
151
- type: StringConstructor;
152
- };
153
- contactHref: {
154
- type: StringConstructor;
155
- attribute: string;
156
- };
157
- sendLabel: {
158
- type: StringConstructor;
159
- attribute: string;
160
- };
161
- headingLevel: {
162
- type: NumberConstructor;
163
- attribute: string;
164
- };
165
- spaceAbove: {
166
- type: StringConstructor;
167
- reflect: boolean;
168
- attribute: string;
169
- };
170
- spaceBelow: {
171
- type: StringConstructor;
172
- reflect: boolean;
173
- attribute: string;
174
- };
175
- };
176
- /** The questions, in the order they are asked. */
177
- questions: EstimatorQuestion[];
178
- /** How many engineers each band of cost needs. */
179
- teams: EstimatorBand[];
180
- /** The way of working for each band of cost. */
181
- ways: EstimatorBand[];
182
- /** The parts of the timeline, in order. */
183
- phases: EstimatorPhase[];
184
- /** The low end of the range, as a share of the cost. */
185
- low: number;
186
- /** The high end of the range, as a share of the cost. */
187
- high: number;
188
- /** The fewest weeks an estimate says. */
189
- minWeeks: number;
190
- /** The currency the cost is in, such as GBP. */
191
- currency: string;
192
- /** What one unit of cost is worth, such as 1000 when the costs are in thousands. */
193
- unit: number;
194
- /** Beside the budget before anything is picked, such as "Start by telling us what you are building." */
195
- intro: string;
196
- budgetLabel: string;
197
- resultHeading: string;
198
- /** The team, with {n} for the number of engineers. */
199
- teamText: string;
200
- /** The team when it has one engineer. */
201
- teamTextOne: string;
202
- /** A line under the result, such as how accurate it is. */
203
- note: string;
204
- /** Where the estimate is sent on to. With none, there is no button to send it. */
205
- contactHref: string;
206
- sendLabel: string;
207
- /** The level of each question's heading. */
208
- headingLevel: number;
209
- spaceAbove: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
210
- spaceBelow: 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
211
- private at;
212
- private answers;
213
- private tip;
214
- private copied;
215
- private started;
216
- constructor();
217
- static styles: import("lit").CSSResult[];
218
- /** The answers each question starts with. */
219
- private reset;
220
- protected willUpdate(changed: Map<string, unknown>): void;
221
- private get rules();
222
- private money;
223
- private listOf;
224
- private weeksWord;
225
- /** The largest the budget can be, so the glow is full size at it. */
226
- private get most();
227
- private summaryOf;
228
- private rangeOf;
229
- private teamOf;
230
- private pick;
231
- private go;
232
- private result;
233
- /** The estimate as words to send or copy. */
234
- private textOf;
235
- private send;
236
- private copy;
237
- private heading;
238
- private renderQuestion;
239
- private renderResult;
240
- render(): TemplateResult;
241
- }
242
- declare global {
243
- interface HTMLElementTagNameMap {
244
- 'impkt-estimator': ImpktEstimator;
245
- }
246
- }
@@ -1,16 +0,0 @@
1
- import {
2
- ImpktEstimator,
3
- estimate,
4
- phaseWeeks
5
- } from "../chunk-T5W3FDSF.js";
6
- import "../chunk-PWLZFGS3.js";
7
- import "../chunk-OFLMG6RN.js";
8
- import "../chunk-3IGNZTJU.js";
9
- import "../chunk-NKMVICB5.js";
10
- import "../chunk-3KO55PZK.js";
11
- export {
12
- ImpktEstimator,
13
- estimate,
14
- phaseWeeks
15
- };
16
- //# sourceMappingURL=estimator.js.map