@jack.winter/pancake-ui 0.1.1 → 0.2.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/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/DropdownMenu/menuKeyboard.d.ts +1 -1
- package/dist/components/TextField/field.shared.d.ts +16 -0
- package/dist/components/progress/Progress.d.ts +0 -1
- package/dist/foundations/kebab.d.ts +1 -0
- package/dist/foundations/tokens.d.ts +12 -10
- package/dist/index.js +248 -201
- package/dist/styles.css +1 -1
- package/dist/theme.css +13 -11
- package/docs/components.md +1 -1
- package/docs/installation.md +4 -4
- package/docs/styling.md +18 -18
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
- Make the defaults compact. Text sits on a four-point line grid: body 14px on 20px lines, `bodyStrong` 14px (was 15px), `caption` 12px on 16px (was 11px), `title` 24px on 32px (was 25px), and every other role's line height moves to the grid. Button text uses `bodyStrong` instead of `label`, and buttons lose their 112px minimum width. Buttons default to 36px, size to their content, and take `size` 32, 36 or 40; the 48px size is removed. Fields are 40px with an 8px radius, checkboxes 20px, radios 16px, switches 40px by 24px, and tabs and menu items 36px.
|
|
6
|
+
- Tighten surfaces and overlays: 16px surface and popover padding, a 480px dialog with 20px padding and a 32px close button, smaller banners, chips, table cells, pagination and bottom navigation.
|
|
7
|
+
- Breaking: `size={48}` on `Button`, `ButtonLink` and `IconButton` no longer type-checks. Use 40 for the largest size.
|
|
8
|
+
|
|
9
|
+
## 0.1.2
|
|
10
|
+
|
|
11
|
+
- No component API or behaviour changes. Remove a Pagination hover rule that had nothing left to cancel, and drop the `Progress` and `sizing` doc comments from the type declarations; the guides carry those notes.
|
|
12
|
+
- Give repeated rules one owner inside the library: field descriptions and their ARIA wiring, token-name to CSS-variable naming, the font family, menu typeahead timing, and the tooltip hide delay.
|
|
13
|
+
- Give the test servers, story URLs and WebKit tab key one owner in the browser suite, and type through the keyboard in the TextField keyboard contract test.
|
|
14
|
+
- Report only a missing Storybook build as missing in the story checks, share symbol discovery between the story and comparison gates, and make the contract-gate tests fail for the rules they name.
|
|
15
|
+
- Add commands, an owners table, standards and commit rules to the contributor instructions.
|
|
16
|
+
|
|
3
17
|
## 0.1.1
|
|
4
18
|
|
|
5
19
|
- Clarify registry installation and the first trusted-publisher release deadline.
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ npm install @jack.winter/pancake-ui
|
|
|
17
17
|
for an unpublished change, download `pancake-ui-package` from a successful main-branch [Verify run](https://github.com/j4ckwinter/pancake-ui/actions/workflows/verify.yml). extract the ZIP into your app’s `vendor/pancake-ui/` folder, then install the archive:
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
|
-
npm install ./vendor/pancake-ui/jack.winter-pancake-ui-0.
|
|
20
|
+
npm install ./vendor/pancake-ui/jack.winter-pancake-ui-0.2.0.tgz
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
use the filename you downloaded, and commit the archive, manifest, and app lockfile alongside `package.json`. see [installation and releases](docs/installation.md) for local builds, upgrades, and registry release setup.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef } from "react";
|
|
2
2
|
export type ButtonProps = ComponentPropsWithRef<"button"> & {
|
|
3
3
|
variant?: "primary" | "secondary" | "destructive" | "ghost";
|
|
4
|
-
size?:
|
|
4
|
+
size?: 32 | 36 | 40;
|
|
5
5
|
loading?: boolean;
|
|
6
6
|
};
|
|
7
7
|
export declare function Button({ variant, size, loading, disabled, type, className, children, ...props }: ButtonProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { KeyboardEvent } from "react";
|
|
2
2
|
export declare function menuItems(panel: HTMLDivElement): HTMLElement[];
|
|
3
|
-
export declare function menuKeyboard(): (event: KeyboardEvent<HTMLDivElement>, trigger: HTMLButtonElement | null) => void;
|
|
3
|
+
export declare function menuKeyboard(now: () => number): (event: KeyboardEvent<HTMLDivElement>, trigger: HTMLButtonElement | null) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AriaAttributes } from "react";
|
|
2
|
+
type FieldDescriptionInput = {
|
|
3
|
+
generatedId: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
helperText?: string;
|
|
6
|
+
describedBy?: string;
|
|
7
|
+
invalid?: AriaAttributes["aria-invalid"];
|
|
8
|
+
};
|
|
9
|
+
export declare function fieldDescription({ generatedId, error, helperText, describedBy, invalid, }: FieldDescriptionInput): {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly text: string | undefined;
|
|
12
|
+
readonly describedBy: string | undefined;
|
|
13
|
+
readonly invalid: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
14
|
+
readonly live: "assertive" | "polite";
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -4,5 +4,4 @@ export type ProgressProps = Omit<ComponentPropsWithRef<"progress">, "children" |
|
|
|
4
4
|
value?: number;
|
|
5
5
|
max?: number;
|
|
6
6
|
};
|
|
7
|
-
/** Native progress; ref, className and style target the progress element. */
|
|
8
7
|
export declare function Progress({ label, value, max, id, className, ...props }: ProgressProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const kebab: (value: string) => string;
|
|
@@ -35,6 +35,7 @@ export declare const spacing: Readonly<{
|
|
|
35
35
|
}>;
|
|
36
36
|
export type SpacingToken = keyof typeof spacing;
|
|
37
37
|
export declare const radii: Readonly<{
|
|
38
|
+
readonly radius4: 4;
|
|
38
39
|
readonly radius12: 12;
|
|
39
40
|
readonly radius16: 16;
|
|
40
41
|
readonly radius20: 20;
|
|
@@ -44,7 +45,6 @@ export declare const radii: Readonly<{
|
|
|
44
45
|
readonly radiusFull: 999;
|
|
45
46
|
}>;
|
|
46
47
|
export type RadiusToken = keyof typeof radii;
|
|
47
|
-
/** Fixed UI geometry on the shared four-point grid. */
|
|
48
48
|
export declare const sizing: Readonly<{
|
|
49
49
|
readonly size0: 0;
|
|
50
50
|
readonly size4: 4;
|
|
@@ -70,6 +70,7 @@ export declare const sizing: Readonly<{
|
|
|
70
70
|
readonly size104: 104;
|
|
71
71
|
readonly size112: 112;
|
|
72
72
|
readonly size320: 320;
|
|
73
|
+
readonly size480: 480;
|
|
73
74
|
readonly size560: 560;
|
|
74
75
|
}>;
|
|
75
76
|
export type SizingToken = keyof typeof sizing;
|
|
@@ -83,8 +84,9 @@ export declare const opacity: Readonly<{
|
|
|
83
84
|
readonly opacityOverlay: 0.5;
|
|
84
85
|
}>;
|
|
85
86
|
export type OpacityToken = keyof typeof opacity;
|
|
87
|
+
export declare const fontFamily = "Inter, sans-serif";
|
|
86
88
|
export type FoundationTextStyle = Readonly<{
|
|
87
|
-
fontFamily:
|
|
89
|
+
fontFamily: typeof fontFamily;
|
|
88
90
|
fontSize: number;
|
|
89
91
|
fontWeight: "400" | "600" | "700";
|
|
90
92
|
fontStyle: "normal";
|
|
@@ -97,7 +99,7 @@ export declare const typography: Readonly<{
|
|
|
97
99
|
fontSize: number;
|
|
98
100
|
fontWeight: "400";
|
|
99
101
|
fontStyle: "normal";
|
|
100
|
-
lineHeight: "
|
|
102
|
+
lineHeight: "20px";
|
|
101
103
|
letterSpacing: number;
|
|
102
104
|
}>;
|
|
103
105
|
readonly bodyStrong: Readonly<{
|
|
@@ -105,7 +107,7 @@ export declare const typography: Readonly<{
|
|
|
105
107
|
fontSize: number;
|
|
106
108
|
fontWeight: "600";
|
|
107
109
|
fontStyle: "normal";
|
|
108
|
-
lineHeight: "
|
|
110
|
+
lineHeight: "20px";
|
|
109
111
|
letterSpacing: number;
|
|
110
112
|
}>;
|
|
111
113
|
readonly caption: Readonly<{
|
|
@@ -113,7 +115,7 @@ export declare const typography: Readonly<{
|
|
|
113
115
|
fontSize: number;
|
|
114
116
|
fontWeight: "400";
|
|
115
117
|
fontStyle: "normal";
|
|
116
|
-
lineHeight: "
|
|
118
|
+
lineHeight: "16px";
|
|
117
119
|
letterSpacing: number;
|
|
118
120
|
}>;
|
|
119
121
|
readonly display: Readonly<{
|
|
@@ -121,7 +123,7 @@ export declare const typography: Readonly<{
|
|
|
121
123
|
fontSize: number;
|
|
122
124
|
fontWeight: "700";
|
|
123
125
|
fontStyle: "normal";
|
|
124
|
-
lineHeight: "
|
|
126
|
+
lineHeight: "36px";
|
|
125
127
|
letterSpacing: number;
|
|
126
128
|
}>;
|
|
127
129
|
readonly heading: Readonly<{
|
|
@@ -129,7 +131,7 @@ export declare const typography: Readonly<{
|
|
|
129
131
|
fontSize: number;
|
|
130
132
|
fontWeight: "700";
|
|
131
133
|
fontStyle: "normal";
|
|
132
|
-
lineHeight: "
|
|
134
|
+
lineHeight: "24px";
|
|
133
135
|
letterSpacing: number;
|
|
134
136
|
}>;
|
|
135
137
|
readonly label: Readonly<{
|
|
@@ -137,7 +139,7 @@ export declare const typography: Readonly<{
|
|
|
137
139
|
fontSize: number;
|
|
138
140
|
fontWeight: "600";
|
|
139
141
|
fontStyle: "normal";
|
|
140
|
-
lineHeight: "
|
|
142
|
+
lineHeight: "16px";
|
|
141
143
|
letterSpacing: number;
|
|
142
144
|
}>;
|
|
143
145
|
readonly micro: Readonly<{
|
|
@@ -153,7 +155,7 @@ export declare const typography: Readonly<{
|
|
|
153
155
|
fontSize: number;
|
|
154
156
|
fontWeight: "700";
|
|
155
157
|
fontStyle: "normal";
|
|
156
|
-
lineHeight: "
|
|
158
|
+
lineHeight: "28px";
|
|
157
159
|
letterSpacing: number;
|
|
158
160
|
}>;
|
|
159
161
|
readonly title: Readonly<{
|
|
@@ -161,7 +163,7 @@ export declare const typography: Readonly<{
|
|
|
161
163
|
fontSize: number;
|
|
162
164
|
fontWeight: "700";
|
|
163
165
|
fontStyle: "normal";
|
|
164
|
-
lineHeight: "
|
|
166
|
+
lineHeight: "32px";
|
|
165
167
|
letterSpacing: number;
|
|
166
168
|
}>;
|
|
167
169
|
}>;
|