@wtfalch/design 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +147 -0
- package/dist/components/Brand.d.ts +10 -0
- package/dist/components/Brand.js +212 -0
- package/dist/components/Button.d.ts +63 -0
- package/dist/components/Button.js +74 -0
- package/dist/components/Callout.d.ts +37 -0
- package/dist/components/Callout.js +71 -0
- package/dist/components/Card.d.ts +42 -0
- package/dist/components/Card.js +30 -0
- package/dist/components/Checkbox.d.ts +32 -0
- package/dist/components/Checkbox.js +31 -0
- package/dist/components/DangerZone.d.ts +59 -0
- package/dist/components/DangerZone.js +50 -0
- package/dist/components/Dialog.d.ts +28 -0
- package/dist/components/Dialog.js +29 -0
- package/dist/components/Empty.d.ts +45 -0
- package/dist/components/Empty.js +35 -0
- package/dist/components/Field.d.ts +58 -0
- package/dist/components/Field.js +46 -0
- package/dist/components/Icon.d.ts +64 -0
- package/dist/components/Icon.js +235 -0
- package/dist/components/Illustration.d.ts +36 -0
- package/dist/components/Illustration.js +48 -0
- package/dist/components/Input.d.ts +14 -0
- package/dist/components/Input.js +65 -0
- package/dist/components/Markdown.d.ts +21 -0
- package/dist/components/Markdown.js +29 -0
- package/dist/components/Modal.d.ts +59 -0
- package/dist/components/Modal.js +72 -0
- package/dist/components/Pill.d.ts +40 -0
- package/dist/components/Pill.js +41 -0
- package/dist/components/Progress.d.ts +35 -0
- package/dist/components/Progress.js +27 -0
- package/dist/components/Rows.d.ts +101 -0
- package/dist/components/Rows.js +55 -0
- package/dist/components/Select.d.ts +28 -0
- package/dist/components/Select.js +56 -0
- package/dist/components/SizeGrid.d.ts +34 -0
- package/dist/components/SizeGrid.js +41 -0
- package/dist/components/Skeleton.d.ts +45 -0
- package/dist/components/Skeleton.js +47 -0
- package/dist/components/Slider.d.ts +70 -0
- package/dist/components/Slider.js +100 -0
- package/dist/components/Table.d.ts +43 -0
- package/dist/components/Table.js +13 -0
- package/dist/components/Tabs.d.ts +72 -0
- package/dist/components/Tabs.js +82 -0
- package/dist/components/Textarea.d.ts +9 -0
- package/dist/components/Textarea.js +22 -0
- package/dist/components/Toast.d.ts +43 -0
- package/dist/components/Toast.js +78 -0
- package/dist/components/Toggle.d.ts +56 -0
- package/dist/components/Toggle.js +189 -0
- package/dist/components/Tooltip.d.ts +22 -0
- package/dist/components/Tooltip.js +62 -0
- package/dist/components/Tour.d.ts +33 -0
- package/dist/components/Tour.js +108 -0
- package/dist/components/iconNames.d.ts +18 -0
- package/dist/components/iconNames.js +60 -0
- package/dist/components/tourMarker.d.ts +29 -0
- package/dist/components/tourMarker.js +58 -0
- package/dist/contrast.d.ts +18 -0
- package/dist/contrast.js +27 -0
- package/dist/hooks/useTrapFocus.d.ts +24 -0
- package/dist/hooks/useTrapFocus.js +67 -0
- package/dist/illustrations.d.ts +11 -0
- package/dist/illustrations.js +55 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.js +65 -0
- package/dist/styles/index.css +3124 -0
- package/dist/themes.d.ts +210 -0
- package/dist/themes.js +300 -0
- package/dist/tokens.css +251 -0
- package/package.json +74 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The package's front door.
|
|
3
|
+
*
|
|
4
|
+
* Alphabetical, because the order is not a hierarchy and pretending otherwise
|
|
5
|
+
* invites an argument about where a new one goes.
|
|
6
|
+
*
|
|
7
|
+
* The theme API is re-exported here rather than kept behind
|
|
8
|
+
* `@wtfalch/design/themes` alone, because the first thing a consumer does is
|
|
9
|
+
* apply a theme and making that a second import path is a papercut on the one
|
|
10
|
+
* call everybody makes. The subpath stays for the case that wants the
|
|
11
|
+
* vocabulary and none of the components — theming an iframe, or a canvas that
|
|
12
|
+
* cannot read a CSS variable.
|
|
13
|
+
*
|
|
14
|
+
* Every component keeps the docblock it was written with. Those docblocks are
|
|
15
|
+
* the documentation: they say what a control is *for* and which mistake it
|
|
16
|
+
* exists to prevent, and several of them are the only written record of a bug
|
|
17
|
+
* that shipped. They are worth more than the code around them.
|
|
18
|
+
*/
|
|
19
|
+
export { default as Brand } from './components/Brand';
|
|
20
|
+
export { default as Button } from './components/Button';
|
|
21
|
+
export type { Props as ButtonProps } from './components/Button';
|
|
22
|
+
export { default as Callout } from './components/Callout';
|
|
23
|
+
export { default as Card } from './components/Card';
|
|
24
|
+
export { default as Checkbox } from './components/Checkbox';
|
|
25
|
+
export { DangerAction, default as DangerZone } from './components/DangerZone';
|
|
26
|
+
export { default as Dialog } from './components/Dialog';
|
|
27
|
+
export { default as Empty } from './components/Empty';
|
|
28
|
+
export { default as Field } from './components/Field';
|
|
29
|
+
export type { FieldWiring } from './components/Field';
|
|
30
|
+
export { default as Icon } from './components/Icon';
|
|
31
|
+
export { ICON_NAMES } from './components/iconNames';
|
|
32
|
+
export type { IconName } from './components/iconNames';
|
|
33
|
+
export { default as Illustration } from './components/Illustration';
|
|
34
|
+
export { default as Input } from './components/Input';
|
|
35
|
+
export type { Props as InputProps } from './components/Input';
|
|
36
|
+
export { default as Markdown } from './components/Markdown';
|
|
37
|
+
export { default as Modal } from './components/Modal';
|
|
38
|
+
export { default as Pill } from './components/Pill';
|
|
39
|
+
export { default as Progress } from './components/Progress';
|
|
40
|
+
export { Row, Rows } from './components/Rows';
|
|
41
|
+
export { default as Select } from './components/Select';
|
|
42
|
+
export { default as SizeGrid } from './components/SizeGrid';
|
|
43
|
+
export { default as Skeleton } from './components/Skeleton';
|
|
44
|
+
export { default as Slider } from './components/Slider';
|
|
45
|
+
export { default as Table } from './components/Table';
|
|
46
|
+
export type { Column } from './components/Table';
|
|
47
|
+
export { default as Tabs } from './components/Tabs';
|
|
48
|
+
export type { Tab, TabGroup } from './components/Tabs';
|
|
49
|
+
export { default as Textarea } from './components/Textarea';
|
|
50
|
+
export type { Props as TextareaProps } from './components/Textarea';
|
|
51
|
+
export { Toast, ToastHost, useToast } from './components/Toast';
|
|
52
|
+
export { default as Toggle } from './components/Toggle';
|
|
53
|
+
export { default as Tooltip } from './components/Tooltip';
|
|
54
|
+
export { default as Tour } from './components/Tour';
|
|
55
|
+
export type { TourStop } from './components/Tour';
|
|
56
|
+
/** The tour's memory. `forgetTour` is what onboarding calls so a config reset
|
|
57
|
+
* replays the tour rather than leaving it suppressed by a browser that has
|
|
58
|
+
* seen it. */
|
|
59
|
+
export { forgetTour, markTourSeen, tourSeen } from './components/tourMarker';
|
|
60
|
+
/** The art. Its own module because it is ~200 KB of inlined SVG — referenced
|
|
61
|
+
* only by `Illustration`, so a bundler that drops the component drops the art
|
|
62
|
+
* with it. */
|
|
63
|
+
export { ILLUSTRATIONS } from './illustrations';
|
|
64
|
+
export type { IllustrationName } from './illustrations';
|
|
65
|
+
/** The focus trap, for a window that genuinely is not `Modal`'s shape. Use
|
|
66
|
+
* `Modal` first: every one of the app's eight hand-built modals shipped
|
|
67
|
+
* without a trap, which is what this exists to stop happening again. */
|
|
68
|
+
export { useTrapFocus } from './hooks/useTrapFocus';
|
|
69
|
+
export { DEFAULT_THEME, DERIVED_TOKENS, FIXED_TOKENS, THEMES, TOKEN_KEYS, applyTheme, defineTheme, isTheme, resolvedTokens, } from './themes';
|
|
70
|
+
export type { Theme, ThemeTokens } from './themes';
|
|
71
|
+
/** The measurement behind the contrast rule, for a theme that is yours. */
|
|
72
|
+
export { luminance, ratio } from './contrast';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The package's front door.
|
|
3
|
+
*
|
|
4
|
+
* Alphabetical, because the order is not a hierarchy and pretending otherwise
|
|
5
|
+
* invites an argument about where a new one goes.
|
|
6
|
+
*
|
|
7
|
+
* The theme API is re-exported here rather than kept behind
|
|
8
|
+
* `@wtfalch/design/themes` alone, because the first thing a consumer does is
|
|
9
|
+
* apply a theme and making that a second import path is a papercut on the one
|
|
10
|
+
* call everybody makes. The subpath stays for the case that wants the
|
|
11
|
+
* vocabulary and none of the components — theming an iframe, or a canvas that
|
|
12
|
+
* cannot read a CSS variable.
|
|
13
|
+
*
|
|
14
|
+
* Every component keeps the docblock it was written with. Those docblocks are
|
|
15
|
+
* the documentation: they say what a control is *for* and which mistake it
|
|
16
|
+
* exists to prevent, and several of them are the only written record of a bug
|
|
17
|
+
* that shipped. They are worth more than the code around them.
|
|
18
|
+
*/
|
|
19
|
+
export { default as Brand } from './components/Brand';
|
|
20
|
+
export { default as Button } from './components/Button';
|
|
21
|
+
export { default as Callout } from './components/Callout';
|
|
22
|
+
export { default as Card } from './components/Card';
|
|
23
|
+
export { default as Checkbox } from './components/Checkbox';
|
|
24
|
+
/* `DangerAction` is a component -- a row inside the zone -- and was exported as
|
|
25
|
+
a type until the first consumer wrote `<DangerAction>` and TypeScript refused
|
|
26
|
+
it (TS1362). Nothing in this repo renders one, which is how it went unseen. */
|
|
27
|
+
export { DangerAction, default as DangerZone } from './components/DangerZone';
|
|
28
|
+
export { default as Dialog } from './components/Dialog';
|
|
29
|
+
export { default as Empty } from './components/Empty';
|
|
30
|
+
export { default as Field } from './components/Field';
|
|
31
|
+
export { default as Icon } from './components/Icon';
|
|
32
|
+
export { ICON_NAMES } from './components/iconNames';
|
|
33
|
+
export { default as Illustration } from './components/Illustration';
|
|
34
|
+
export { default as Input } from './components/Input';
|
|
35
|
+
export { default as Markdown } from './components/Markdown';
|
|
36
|
+
export { default as Modal } from './components/Modal';
|
|
37
|
+
export { default as Pill } from './components/Pill';
|
|
38
|
+
export { default as Progress } from './components/Progress';
|
|
39
|
+
export { Row, Rows } from './components/Rows';
|
|
40
|
+
export { default as Select } from './components/Select';
|
|
41
|
+
export { default as SizeGrid } from './components/SizeGrid';
|
|
42
|
+
export { default as Skeleton } from './components/Skeleton';
|
|
43
|
+
export { default as Slider } from './components/Slider';
|
|
44
|
+
export { default as Table } from './components/Table';
|
|
45
|
+
export { default as Tabs } from './components/Tabs';
|
|
46
|
+
export { default as Textarea } from './components/Textarea';
|
|
47
|
+
export { ToastHost, useToast } from './components/Toast';
|
|
48
|
+
export { default as Toggle } from './components/Toggle';
|
|
49
|
+
export { default as Tooltip } from './components/Tooltip';
|
|
50
|
+
export { default as Tour } from './components/Tour';
|
|
51
|
+
/** The tour's memory. `forgetTour` is what onboarding calls so a config reset
|
|
52
|
+
* replays the tour rather than leaving it suppressed by a browser that has
|
|
53
|
+
* seen it. */
|
|
54
|
+
export { forgetTour, markTourSeen, tourSeen } from './components/tourMarker';
|
|
55
|
+
/** The art. Its own module because it is ~200 KB of inlined SVG — referenced
|
|
56
|
+
* only by `Illustration`, so a bundler that drops the component drops the art
|
|
57
|
+
* with it. */
|
|
58
|
+
export { ILLUSTRATIONS } from './illustrations';
|
|
59
|
+
/** The focus trap, for a window that genuinely is not `Modal`'s shape. Use
|
|
60
|
+
* `Modal` first: every one of the app's eight hand-built modals shipped
|
|
61
|
+
* without a trap, which is what this exists to stop happening again. */
|
|
62
|
+
export { useTrapFocus } from './hooks/useTrapFocus';
|
|
63
|
+
export { DEFAULT_THEME, DERIVED_TOKENS, FIXED_TOKENS, THEMES, TOKEN_KEYS, applyTheme, defineTheme, isTheme, resolvedTokens, } from './themes';
|
|
64
|
+
/** The measurement behind the contrast rule, for a theme that is yours. */
|
|
65
|
+
export { luminance, ratio } from './contrast';
|