@jasonsdevspace/design-kit 0.1.0-next.1 → 0.1.0-next.3

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 CHANGED
@@ -7,6 +7,91 @@ keeping a copy. Each version from `0.1.0-next.1` on is staged on npm from a tag
7
7
  workflow, with provenance, goes live when it is promoted, and has a release on GitHub with the
8
8
  entry below as its notes.
9
9
 
10
+ ## 0.1.0-next.3
11
+
12
+ The page chrome holds still and shows where a reader is, the controls a page moves focus to take a
13
+ `ref`, and an empty live callout draws nothing. The strip keeps room for a demo's switches before
14
+ they arrive, the footer marks the current page as the strip does, the link to the current page
15
+ stands out by more than its color, and the skip link stays hidden wherever it sits.
16
+
17
+ - **Page chrome.** `PortfolioStrip` takes `toolsWaiting`, which keeps room for one row of the kit's
18
+ controls while a demo's switches are on their way, so nothing below the strip moves when they
19
+ arrive. The section that holds the room is left unnamed, so it is no landmark until the switches
20
+ fill it. A page without React writes `.dk-strip-room` in the unnamed section, and names the
21
+ section when it fills it.
22
+ - **Page chrome.** `DemoFooter` takes `current`, as `PortfolioStrip` does, and set to `about` marks
23
+ the link to how it works as the current page, for the footer on a demo's explainer. In the strip
24
+ or the footer, the link marked as the current page stands in the page's text at the heading's
25
+ weight, so a sighted reader sees that "How it works" leads where they already are. It keeps its
26
+ underline, and the weight holds in forced colors, where the color does not.
27
+ - **Page chrome.** The skip link waits in its own place as the visually hidden class does, one pixel
28
+ clipped to nothing, rather than 10rem above it, so one inside a positioned box lower on the page
29
+ no longer shows over what is above the box or takes its clicks. It shows where it did when a
30
+ keyboard focuses it.
31
+ - **Buttons.** `Button`'s props take a `ref`, which holds the `<button>` drawn, so a page that
32
+ moves focus to a button, such as the one that opened a panel when the panel closes, uses the
33
+ kit's component. React 19 already passed the ref through, and only the type refused it.
34
+ - **Fields.** `InputField` and `SelectField` take a `ref` in the same way, which holds the
35
+ `<input>` or the `<select>` drawn, so a page that moves focus to a field, such as a form that
36
+ fails, uses the kit's component rather than finding the control by its id.
37
+ - **Callouts.** A live callout whose message holds nothing at all, with no actions, draws nothing,
38
+ no ground, padding or edge, and stays in the page so a screen reader reads what fills it. A page
39
+ no longer needs a holder of its own to hide one it mounts before it has words. The rule uses
40
+ `:has()`, which Firefox has from 121, so in Firefox 120 such a callout still draws its ground.
41
+
42
+ ## 0.1.0-next.2
43
+
44
+ The page chrome every demo draws, and buttons, text fields, selects and callouts, styled by
45
+ `components.css` and drawn by the components in `./react`, with the state of each control carried
46
+ by a native or ARIA attribute. The explainer page, with its steps, panels, tables and code blocks,
47
+ is styled too, as markup a page writes by hand.
48
+
49
+ - **React.** `./react` is new, and takes React `^19.3.0` as an optional peer, which a page that
50
+ writes the markup itself never needs.
51
+ - **Page chrome.** `SkipLink`, `PortfolioStrip` and `DemoFooter` draw the skip link, the strip
52
+ above the page that says whose demo it is, and the footer below it, and `PORTFOLIO_URL`,
53
+ `PORTFOLIO_WORK_URL` and `GITHUB_PROFILE_URL` are the links they share. The components draw
54
+ markup alone, so a page loads `components.css` itself.
55
+ - **Buttons.** `Button` draws `.dk-button`, a plain `type="button"` unless a page gives another
56
+ type, with `.dk-button-accent` for the one action a view leads with. A toggle carries
57
+ `aria-pressed`, and a button whose panel is open `aria-expanded`, drawn alike. `off` marks a
58
+ button `aria-disabled` rather than `disabled`, so it keeps its place in the tab order, and a press
59
+ of it runs no click handler of the page's and submits no form. A button and a field's control
60
+ stand 2.25rem tall, and 2.75rem at 48rem wide or less.
61
+ - **Fields.** `InputField` and `SelectField` draw `.dk-field`, its label, a hint and an error when
62
+ given, and the control, `.dk-input` or a native `.dk-select`. The error sits above the control,
63
+ starts with a hidden "Error: " and marks the control `aria-invalid`. A control's text is never
64
+ under 16px.
65
+ - **Callouts.** `Callout` draws `.dk-callout` in the info tone on the highlight, or
66
+ `.dk-callout-success` or `.dk-callout-danger`, which start with a hidden word that says the tone.
67
+ It takes a role only when the page passes `live`.
68
+ - **Explainer pages.** `.dk-explainer-header` and `.dk-explainer` lay out the page that says how a
69
+ demo works, its text starting where the strip's links start and held to the measure, in plain
70
+ sections that open on a rule, a number and a heading a jump leaves in sight. `.dk-steps` draws
71
+ steps one after another. `./react` draws none of it.
72
+ - **Panels, tables and code.** `.dk-panel` sets a part of a page apart on the card ground, with no
73
+ tone and no role. A table in `.dk-table-scroll` and a block of `.dk-code` scroll inside
74
+ themselves, each a region named by the title above it that the keyboard reaches at every width,
75
+ so the page never scrolls sideways.
76
+ - **Code in running text.** `base.css` sets `code` at `--dk-text-code`, a step under the text
77
+ around it, and breaks a long name where it must. In a block it takes the block's size.
78
+ - **Base.** The border box now reaches a page's `::before` and `::after`, which it missed before,
79
+ since a pseudo-element listed inside a `:where()` matches nothing. The cut to motion reaches
80
+ those too, and a dialog's `::backdrop` and each part of a view transition. A `::before` or
81
+ `::after` that sets a width or height beside padding or a border now draws that size including
82
+ them, so one sized for the content box draws smaller.
83
+ - **Weight.** Every rule for these pieces, the resting look and the explainer's layout included,
84
+ sits in one `:where()`, so a state wins over the resting look by its order in the sheet, and a
85
+ page's own rule outside a layer wins over both.
86
+ - **Tokens.** `--dk-measure` changes from 42rem to 34rem, for every page that reads it. At 42rem a
87
+ line of body text ran past 80 characters, the most WCAG 1.4.8 suggests, and at 34rem the browser
88
+ tests hold a line of the lead and of body text to 80 or fewer. `--dk-text-code` is new, at 0.9em,
89
+ so code sizes to the text around it. The dark value of `--dk-control` is `#7d7d7d`, from
90
+ `#7a7a7a`. A button or field inside an info callout drew its edge at 2.99 to 1 on the highlight in
91
+ the dark theme, under the 3 to 1 a control's edge needs. The accent on the success and danger
92
+ grounds, and a control's edge on the highlight and on each callout's ground, are now measured as
93
+ well.
94
+
10
95
  ## 0.1.0-next.1
11
96
 
12
97
  Nothing in the code, the styles or the types changed. This is the first version the release workflow