suabochica-design-system 1.1.0 → 1.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 +33 -0
- package/DESIGN_DECISIONS.md +5 -1
- package/DISTRIBUTION.md +18 -10
- package/MIGRATION.md +7 -3
- package/README.md +10 -3
- package/dist/icons/LICENSE +21 -0
- package/dist/icons/github.svg +4 -0
- package/dist/icons/home.svg +4 -0
- package/dist/icons/instagram.svg +5 -0
- package/dist/icons/linkedin.svg +6 -0
- package/dist/icons/mail-out.svg +5 -0
- package/dist/icons/manifest.json +6 -0
- package/dist/icons/page-star.svg +6 -0
- package/dist/icons/phone-income.svg +4 -0
- package/dist/icons/post.svg +6 -0
- package/dist/icons/x.svg +4 -0
- package/dist/js/index.js +193 -7
- package/dist/js/index.js.map +1 -1
- package/dist/styles/suabochica.css +1 -1
- package/dist/types/components/CodeBlock/CodeBlock.d.ts +1 -1
- package/dist/types/components/Icon/Icon.d.ts +10 -0
- package/dist/types/icons/generated.d.ts +10 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +10 -4
- package/src/components/ArticleBody/README.md +7 -3
- package/src/components/CARDS.md +4 -3
- package/src/components/CodeBlock/README.md +19 -8
- package/src/components/Icon/README.md +96 -0
- package/src/components/ReaderSupport/README.md +5 -3
- package/src/components/TYPOGRAPHY.md +3 -0
- package/src/templates/ArticleTemplate/README.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,38 @@ Unreleased until a version is published.
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## [1.2.0] - 2026-11-06
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Icon atom with nine pinned Iconoir regular SVGs (`mail-out`, `phone-income`,
|
|
14
|
+
`post`, `page-star`, `github`, `linkedin`, `x`, `instagram`, `home`). Static
|
|
15
|
+
React/Astro SVG rendering and a React-free Hugo partial share `currentColor`,
|
|
16
|
+
sizing, and accessibility rules. The package includes the SVGs and Iconoir
|
|
17
|
+
MIT notice for both sites.
|
|
18
|
+
- CodeBlock now highlights generic Lisp (`lisp`) and Emacs Lisp examples
|
|
19
|
+
(`elisp`/`emacs-lisp`) on the server in React/Astro; Hugo uses Chroma's Emacs
|
|
20
|
+
Lisp lexer. Plain-text aliases (`text`, `txt`, `plaintext`) explicitly render
|
|
21
|
+
escaped source without syntax spans. Added Storybook examples and packed
|
|
22
|
+
Astro/Hugo checks for both paths. Highlight.js uses its generic Lisp grammar
|
|
23
|
+
for Emacs Lisp rather than a dedicated Emacs-specific lexer.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- H1 headings now use `--sua-accent` in both Heading and native prose. The light
|
|
28
|
+
accent uses darker coral `#C9331D` so even small H1 text meets 4.5:1 on
|
|
29
|
+
canvas, paper, and reading surfaces; dark retains `#FF7C66`.
|
|
30
|
+
- ArticleTemplate's ArticleBody reading sheet, ArticleSummaryCard, and
|
|
31
|
+
ReaderSupport now use the paper surface, matching ProjectShowcaseCard in light
|
|
32
|
+
and dark themes. The standalone ArticleBody remains transparent for
|
|
33
|
+
caller-owned layouts.
|
|
34
|
+
|
|
35
|
+
### Validation record
|
|
36
|
+
|
|
37
|
+
182 Jest tests and 524 Chromium checks passed in the pinned browser container,
|
|
38
|
+
including 24 screenshot comparisons across light and dark themes, plus packed
|
|
39
|
+
Astro/Hugo installs of the 1.2.0 tarball.
|
|
40
|
+
|
|
9
41
|
## [1.1.0] - 2026-11-05
|
|
10
42
|
|
|
11
43
|
### Changed
|
|
@@ -110,3 +142,4 @@ choosing the first release. See [RELEASE.md](RELEASE.md) for the sequence.
|
|
|
110
142
|
|
|
111
143
|
[1.0.0]: https://github.com/suabochica/suabochica-storybook/releases/tag/v1.0.0
|
|
112
144
|
[1.1.0]: https://github.com/suabochica/suabochica-storybook/releases/tag/v1.1.0
|
|
145
|
+
[1.2.0]: https://github.com/suabochica/suabochica-storybook/releases/tag/v1.2.0
|
package/DESIGN_DECISIONS.md
CHANGED
|
@@ -200,7 +200,7 @@ Canonical values live beside the light palette in `src/tokens/tokens.css`:
|
|
|
200
200
|
text on primary `#3D0A08`.
|
|
201
201
|
- Secondary action fill `#34302E`, hover `#413C3A`, text `#E9E4DD`, border
|
|
202
202
|
`#A58C89`.
|
|
203
|
-
- Topic text and focus `#73D6D7`;
|
|
203
|
+
- Topic text and focus `#73D6D7`; coral accent `#FF7C66`; error `#FF9086`;
|
|
204
204
|
placeholder `#9C948D`; disabled `#1B1A19` with `#7E7772`; code panel `#4A4441`
|
|
205
205
|
with `#E9E4DD`.
|
|
206
206
|
- Success keeps mint `#8AD6D1` with ink text; decorative teal keeps `#359FA0`.
|
|
@@ -212,6 +212,10 @@ Canonical values live beside the light palette in `src/tokens/tokens.css`:
|
|
|
212
212
|
structural borders at least 1.2:1 against their surfaces. The light
|
|
213
213
|
`--sua-accent-teal` 2.799:1 decorative exception is unchanged and asserted in
|
|
214
214
|
dark instead.
|
|
215
|
+
- H1 uses `--sua-accent` on canvas, paper, and reading surfaces. Its light
|
|
216
|
+
assignment is the palette's darker coral `#C9331D` rather than decorative
|
|
217
|
+
`#E45742`, which is too light for small H1 text. Dark retains `#FF7C66`;
|
|
218
|
+
both assignments reach 4.5:1 on all three surfaces.
|
|
215
219
|
- Article topic text moved to a dedicated `--sua-topic` role so dark topics stay
|
|
216
220
|
mineral teal instead of following the charcoal secondary fill. Light
|
|
217
221
|
`--sua-topic` equals the previous darker-teal value, so light rendering is
|
package/DISTRIBUTION.md
CHANGED
|
@@ -15,10 +15,10 @@ pnpm pack --pack-destination /path/to/existing/output-directory
|
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
`prepack` rebuilds the artifact, so packing never silently ships stale output.
|
|
18
|
-
Install the generated `suabochica-design-system-1.
|
|
18
|
+
Install the generated `suabochica-design-system-1.2.0.tgz` in a separate consumer:
|
|
19
19
|
|
|
20
20
|
```sh
|
|
21
|
-
pnpm add /path/to/suabochica-design-system-1.
|
|
21
|
+
pnpm add /path/to/suabochica-design-system-1.2.0.tgz react@19.3.1 react-dom@19.3.1
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
```tsx
|
|
@@ -46,12 +46,15 @@ no consumer Tailwind plugin or library-source scanning requirement.
|
|
|
46
46
|
|
|
47
47
|
## Package contract
|
|
48
48
|
|
|
49
|
-
| Export
|
|
50
|
-
|
|
|
51
|
-
| `suabochica-design-system`
|
|
52
|
-
| `suabochica-design-system/styles.css`
|
|
53
|
-
| `suabochica-design-system/styles/*`
|
|
54
|
-
| `suabochica-design-system/
|
|
49
|
+
| Export | Contents |
|
|
50
|
+
| ---------------------------------------------- | ------------------------------------------------------------------------ |
|
|
51
|
+
| `suabochica-design-system` | Named ESM React components and public TypeScript types |
|
|
52
|
+
| `suabochica-design-system/styles.css` | Compiled tokens, scoped base styles, and all component/template styles |
|
|
53
|
+
| `suabochica-design-system/styles/*` | Relative assets and SIL font notices under the complete styles directory |
|
|
54
|
+
| `suabochica-design-system/icons/*.svg` | Nine pinned Iconoir regular SVGs for static HTML/Hugo use |
|
|
55
|
+
| `suabochica-design-system/icons/LICENSE` | Iconoir MIT copyright and license notice |
|
|
56
|
+
| `suabochica-design-system/icons/manifest.json` | Curated icon names and upstream version |
|
|
57
|
+
| `suabochica-design-system/package.json` | Metadata and location for static asset tooling |
|
|
55
58
|
|
|
56
59
|
- ESM only; use `import`, not CommonJS `require` for the component entry.
|
|
57
60
|
Runtime code targets ES2022. Declarations use explicit `.js` import extensions
|
|
@@ -59,8 +62,9 @@ no consumer Tailwind plugin or library-source scanning requirement.
|
|
|
59
62
|
- React and ReactDOM are external peers (`19.3.1`), tested with 19.3.1. React 19
|
|
60
63
|
ref-as-prop behavior is part of the component contract. React 18 compatibility
|
|
61
64
|
is not advertised. Runtime dependencies are `classnames` and `highlight.js`;
|
|
62
|
-
CodeBlock uses Highlight.js's common language bundle
|
|
63
|
-
Hugo uses its own built-in Chroma highlighter and only
|
|
65
|
+
CodeBlock uses Highlight.js's common language bundle plus its Lisp grammar for
|
|
66
|
+
React/server rendering. Hugo uses its own built-in Chroma highlighter and only
|
|
67
|
+
consumes the shared CSS.
|
|
64
68
|
- All delivered atoms, layout primitives, molecules, organisms, and both templates
|
|
65
69
|
are named exports. Public props and supporting types are exported alongside
|
|
66
70
|
them. Box/Tag and their prop types remain deprecated Surface/Badge aliases.
|
|
@@ -71,6 +75,10 @@ no consumer Tailwind plugin or library-source scanning requirement.
|
|
|
71
75
|
declarations reachable from the public entry. `dist/styles/` contains CSS,
|
|
72
76
|
four relative variable-font assets, and both SIL notices. Preserve the complete
|
|
73
77
|
styles tree when copying it to a static site's public assets.
|
|
78
|
+
- `dist/icons/` contains only nine Iconoir SVGs, their manifest, and the separate
|
|
79
|
+
MIT notice. Astro renders the Icon atom without hydration; Hugo copies these
|
|
80
|
+
assets to its `assets/` tree and inlines them through a validated partial.
|
|
81
|
+
See the [Icon guide](src/components/Icon/README.md) for site integration.
|
|
74
82
|
- The tarball includes API Markdown and the usage/contribution/migration/release
|
|
75
83
|
guides linked from the README, but no Storybook, tests,
|
|
76
84
|
fixture projects, build tooling, or development dependency installation.
|
package/MIGRATION.md
CHANGED
|
@@ -96,13 +96,17 @@ rather than porting routes/content logic into the library.
|
|
|
96
96
|
fixtures are verified; the actual portfolio/blog repositories and their versions
|
|
97
97
|
need separate integration review. Alternate React/framework versions are not
|
|
98
98
|
established by those fixture results.
|
|
99
|
-
- **Packaging:**
|
|
100
|
-
|
|
101
|
-
Tailwind utilities are not generated by the precompiled
|
|
99
|
+
- **Packaging:** `suabochica-design-system@1.2.0` is published, including the
|
|
100
|
+
Icon atom. Packed ESM builds are verified.
|
|
101
|
+
Arbitrary consumer Tailwind utilities are not generated by the precompiled
|
|
102
|
+
stylesheet.
|
|
102
103
|
- **Behavior:** apps own validation/announcements, routing, data fetching, CMS/
|
|
103
104
|
Markdown rendering, sanitization, and image optimization. CodeBlock provides
|
|
104
105
|
optional snippet highlighting; Hugo uses its built-in highlighter with the
|
|
105
106
|
shared CodeBlock styles.
|
|
107
|
+
The Icon atom supplies nine pinned Iconoir regular SVGs; Astro renders it
|
|
108
|
+
statically, while Hugo inlines the same packaged SVGs from a local partial.
|
|
109
|
+
Apps own contact details, profile URLs, and cross-site destinations.
|
|
106
110
|
Newsletter backends, reading progress, overlays/modal/dropdown systems, broad
|
|
107
111
|
icon sets, and ecommerce flows are deferred.
|
|
108
112
|
- **Verification:** browser automation is Chromium at two widths, with axe and
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ pnpm pack --pack-destination /path/to/existing/output-directory
|
|
|
23
23
|
resulting tarball in your React application:
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
pnpm add /path/to/suabochica-design-system-1.
|
|
26
|
+
pnpm add /path/to/suabochica-design-system-1.2.0.tgz react@19.3.1 react-dom@19.3.1
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
Import styles once in the application layout and components from the public entry:
|
|
@@ -159,8 +159,9 @@ pipeline. Put a `sua-theme` class on the component boundary or a page wrapper:
|
|
|
159
159
|
and `.storybook/`, not consumer files. Arbitrary new consumer utilities are not
|
|
160
160
|
guaranteed to be included; reusable component classes/HTML contracts
|
|
161
161
|
are documented alongside components.
|
|
162
|
-
- Functional colors follow `DESIGN_DECISIONS.md`;
|
|
163
|
-
interchangeable with
|
|
162
|
+
- Functional colors follow `DESIGN_DECISIONS.md`; the coral accent supports H1
|
|
163
|
+
text, while decorative accents are not interchangeable with focus or
|
|
164
|
+
input-border roles.
|
|
164
165
|
- Motion uses `--sua-motion-duration`, reduced to zero when reduced motion is
|
|
165
166
|
requested. Components must also suppress positional movement under that
|
|
166
167
|
preference when implementing interaction states.
|
|
@@ -211,6 +212,12 @@ Progress is tracked in `IMPLEMENTATION_PLAN.md`.
|
|
|
211
212
|
|
|
212
213
|
## Component and template catalog
|
|
213
214
|
|
|
215
|
+
**Atoms → Icon** provides nine pinned Iconoir SVGs for email, phone, CV, social
|
|
216
|
+
links, and website/blog navigation. The React atom renders static inline SVG in
|
|
217
|
+
Astro; the same packaged artwork powers a Hugo partial without React. See the
|
|
218
|
+
[Icon guide](src/components/Icon/README.md) for names, accessibility, licensing,
|
|
219
|
+
and consumer integration.
|
|
220
|
+
|
|
214
221
|
**Molecules → CodeBlock** provides labelled, syntax-highlighted `pre`/`code`
|
|
215
222
|
snippets, including light/dark and multi-language examples. React/Astro highlight
|
|
216
223
|
source text during rendering; Hugo uses its built-in Chroma highlighter with the
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Luca Burgio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M16 22.0268V19.1568C16.0375 18.68 15.9731 18.2006 15.811 17.7506C15.6489 17.3006 15.3929 16.8902 15.06 16.5468C18.2 16.1968 21.5 15.0068 21.5 9.54679C21.4997 8.15062 20.9627 6.80799 20 5.79679C20.4558 4.5753 20.4236 3.22514 19.91 2.02679C19.91 2.02679 18.73 1.67679 16 3.50679C13.708 2.88561 11.292 2.88561 8.99999 3.50679C6.26999 1.67679 5.08999 2.02679 5.08999 2.02679C4.57636 3.22514 4.54413 4.5753 4.99999 5.79679C4.03011 6.81549 3.49251 8.17026 3.49999 9.57679C3.49999 14.9968 6.79998 16.1868 9.93998 16.5768C9.61098 16.9168 9.35725 17.3222 9.19529 17.7667C9.03334 18.2112 8.96679 18.6849 8.99999 19.1568V22.0268" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M9 20.0267C6 20.9999 3.5 20.0267 2 17.0267" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M2 8L11.7317 3.13416C11.9006 3.04971 12.0994 3.0497 12.2683 3.13416L22 8" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M20 11V19C20 20.1046 19.1046 21 18 21H6C4.89543 21 4 20.1046 4 19V11" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M3 16V8C3 5.23858 5.23858 3 8 3H16C18.7614 3 21 5.23858 21 8V16C21 18.7614 18.7614 21 16 21H8C5.23858 21 3 18.7614 3 16Z" stroke="currentColor" stroke-width="1.5"/>
|
|
4
|
+
<path d="M17.5 6.51L17.51 6.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M21 8V16C21 18.7614 18.7614 21 16 21H8C5.23858 21 3 18.7614 3 16V8C3 5.23858 5.23858 3 8 3H16C18.7614 3 21 5.23858 21 8Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M7 17V13.5V10" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M11 17V13.75M11 10V13.75M11 13.75C11 10 17 10 17 13.75V17" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="M7 7.01L7.01 6.99889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M5 9L9.5 12L14 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M17 19H3C1.89543 19 1 18.1046 1 17V7C1 5.89543 1.89543 5 3 5H16C17.1046 5 18 5.89543 18 7V9" stroke="currentColor" stroke-linecap="round"/>
|
|
4
|
+
<path d="M17 14H23M23 14L20 11M23 14L20 17" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M20 12V5.74853C20 5.5894 19.9368 5.43679 19.8243 5.32426L16.6757 2.17574C16.5632 2.06321 16.4106 2 16.2515 2H4.6C4.26863 2 4 2.26863 4 2.6V21.4C4 21.7314 4.26863 22 4.6 22H11" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M8 10H16M8 6H12M8 14H11" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M16.3056 17.1133L17.2147 15.1856C17.3314 14.9381 17.6686 14.9381 17.7853 15.1856L18.6944 17.1133L20.7275 17.4243C20.9884 17.4642 21.0923 17.7998 20.9035 17.9923L19.4326 19.4917L19.7797 21.61C19.8243 21.882 19.5515 22.0895 19.3181 21.961L17.5 20.9603L15.6819 21.961C15.4485 22.0895 15.1757 21.882 15.2203 21.61L15.5674 19.4917L14.0965 17.9923C13.9077 17.7998 14.0116 17.4642 14.2725 17.4243L16.3056 17.1133Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="M16 2V5.4C16 5.73137 16.2686 6 16.6 6H20" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M22 5H16M16 5L19 2M16 5L19 8" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M18.1182 14.702L14 15.5C11.2183 14.1038 9.5 12.5 8.5 10L9.26995 5.8699L7.81452 2L4.0636 2C2.93605 2 2.04814 2.93178 2.21654 4.04668C2.63695 6.83 3.87653 11.8765 7.5 15.5C11.3052 19.3052 16.7857 20.9564 19.802 21.6127C20.9668 21.8662 22 20.9575 22 19.7655L22 16.1812L18.1182 14.702Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M2.90602 17.505L5.33709 3.71766C5.5289 2.62987 6.56621 1.90354 7.654 2.09534L19.4717 4.17912C20.5595 4.37093 21.2858 5.40824 21.094 6.49603L18.6629 20.2833C18.4711 21.3711 17.4338 22.0975 16.346 21.9057L4.52834 19.8219C3.44055 19.6301 2.71421 18.5928 2.90602 17.505Z" stroke="currentColor"/>
|
|
3
|
+
<path d="M8.92902 6.38184L16.8075 7.77102" stroke="currentColor" stroke-linecap="round"/>
|
|
4
|
+
<path d="M8.23444 10.3213L16.1129 11.7105" stroke="currentColor" stroke-linecap="round"/>
|
|
5
|
+
<path d="M7.53986 14.2607L12.4639 15.129" stroke="currentColor" stroke-linecap="round"/>
|
|
6
|
+
</svg>
|
package/dist/icons/x.svg
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M16.8198 20.7684L3.75317 3.96836C3.44664 3.57425 3.72749 3 4.22678 3H6.70655C6.8917 3 7.06649 3.08548 7.18016 3.23164L20.2468 20.0316C20.5534 20.4258 20.2725 21 19.7732 21H17.2935C17.1083 21 16.9335 20.9145 16.8198 20.7684Z" stroke="currentColor" stroke-width="1.5"/>
|
|
3
|
+
<path d="M20 3L4 21" stroke="currentColor" stroke-linecap="round"/>
|
|
4
|
+
</svg>
|
package/dist/js/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import cx from "classnames";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { createElement, useEffect, useId, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
4
4
|
import hljs from "highlight.js/lib/common";
|
|
5
|
+
import lisp from "highlight.js/lib/languages/lisp";
|
|
5
6
|
// src/components/Button/Button.tsx
|
|
6
7
|
var variants$1 = {
|
|
7
8
|
primary: "sua-button--primary",
|
|
@@ -177,6 +178,180 @@ function Badge({ tone = "neutral", className, children, ...props }) {
|
|
|
177
178
|
})]
|
|
178
179
|
});
|
|
179
180
|
}
|
|
181
|
+
// src/icons/generated.ts
|
|
182
|
+
var iconPaths = {
|
|
183
|
+
"mail-out": [
|
|
184
|
+
{
|
|
185
|
+
d: "M5 9L9.5 12L14 9",
|
|
186
|
+
stroke: "currentColor",
|
|
187
|
+
strokeLinecap: "round",
|
|
188
|
+
strokeLinejoin: "round"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
d: "M17 19H3C1.89543 19 1 18.1046 1 17V7C1 5.89543 1.89543 5 3 5H16C17.1046 5 18 5.89543 18 7V9",
|
|
192
|
+
stroke: "currentColor",
|
|
193
|
+
strokeLinecap: "round"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
d: "M17 14H23M23 14L20 11M23 14L20 17",
|
|
197
|
+
stroke: "currentColor",
|
|
198
|
+
strokeLinecap: "round",
|
|
199
|
+
strokeLinejoin: "round"
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"phone-income": [{
|
|
203
|
+
d: "M22 5H16M16 5L19 2M16 5L19 8",
|
|
204
|
+
stroke: "currentColor",
|
|
205
|
+
strokeLinecap: "round",
|
|
206
|
+
strokeLinejoin: "round"
|
|
207
|
+
}, {
|
|
208
|
+
d: "M18.1182 14.702L14 15.5C11.2183 14.1038 9.5 12.5 8.5 10L9.26995 5.8699L7.81452 2L4.0636 2C2.93605 2 2.04814 2.93178 2.21654 4.04668C2.63695 6.83 3.87653 11.8765 7.5 15.5C11.3052 19.3052 16.7857 20.9564 19.802 21.6127C20.9668 21.8662 22 20.9575 22 19.7655L22 16.1812L18.1182 14.702Z",
|
|
209
|
+
stroke: "currentColor",
|
|
210
|
+
strokeLinecap: "round",
|
|
211
|
+
strokeLinejoin: "round"
|
|
212
|
+
}],
|
|
213
|
+
post: [
|
|
214
|
+
{
|
|
215
|
+
d: "M2.90602 17.505L5.33709 3.71766C5.5289 2.62987 6.56621 1.90354 7.654 2.09534L19.4717 4.17912C20.5595 4.37093 21.2858 5.40824 21.094 6.49603L18.6629 20.2833C18.4711 21.3711 17.4338 22.0975 16.346 21.9057L4.52834 19.8219C3.44055 19.6301 2.71421 18.5928 2.90602 17.505Z",
|
|
216
|
+
stroke: "currentColor"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
d: "M8.92902 6.38184L16.8075 7.77102",
|
|
220
|
+
stroke: "currentColor",
|
|
221
|
+
strokeLinecap: "round"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
d: "M8.23444 10.3213L16.1129 11.7105",
|
|
225
|
+
stroke: "currentColor",
|
|
226
|
+
strokeLinecap: "round"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
d: "M7.53986 14.2607L12.4639 15.129",
|
|
230
|
+
stroke: "currentColor",
|
|
231
|
+
strokeLinecap: "round"
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"page-star": [
|
|
235
|
+
{
|
|
236
|
+
d: "M20 12V5.74853C20 5.5894 19.9368 5.43679 19.8243 5.32426L16.6757 2.17574C16.5632 2.06321 16.4106 2 16.2515 2H4.6C4.26863 2 4 2.26863 4 2.6V21.4C4 21.7314 4.26863 22 4.6 22H11",
|
|
237
|
+
stroke: "currentColor",
|
|
238
|
+
strokeLinecap: "round",
|
|
239
|
+
strokeLinejoin: "round"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
d: "M8 10H16M8 6H12M8 14H11",
|
|
243
|
+
stroke: "currentColor",
|
|
244
|
+
strokeLinecap: "round",
|
|
245
|
+
strokeLinejoin: "round"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
d: "M16.3056 17.1133L17.2147 15.1856C17.3314 14.9381 17.6686 14.9381 17.7853 15.1856L18.6944 17.1133L20.7275 17.4243C20.9884 17.4642 21.0923 17.7998 20.9035 17.9923L19.4326 19.4917L19.7797 21.61C19.8243 21.882 19.5515 22.0895 19.3181 21.961L17.5 20.9603L15.6819 21.961C15.4485 22.0895 15.1757 21.882 15.2203 21.61L15.5674 19.4917L14.0965 17.9923C13.9077 17.7998 14.0116 17.4642 14.2725 17.4243L16.3056 17.1133Z",
|
|
249
|
+
stroke: "currentColor",
|
|
250
|
+
strokeLinecap: "round",
|
|
251
|
+
strokeLinejoin: "round"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
d: "M16 2V5.4C16 5.73137 16.2686 6 16.6 6H20",
|
|
255
|
+
stroke: "currentColor",
|
|
256
|
+
strokeLinecap: "round",
|
|
257
|
+
strokeLinejoin: "round"
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
github: [{
|
|
261
|
+
d: "M16 22.0268V19.1568C16.0375 18.68 15.9731 18.2006 15.811 17.7506C15.6489 17.3006 15.3929 16.8902 15.06 16.5468C18.2 16.1968 21.5 15.0068 21.5 9.54679C21.4997 8.15062 20.9627 6.80799 20 5.79679C20.4558 4.5753 20.4236 3.22514 19.91 2.02679C19.91 2.02679 18.73 1.67679 16 3.50679C13.708 2.88561 11.292 2.88561 8.99999 3.50679C6.26999 1.67679 5.08999 2.02679 5.08999 2.02679C4.57636 3.22514 4.54413 4.5753 4.99999 5.79679C4.03011 6.81549 3.49251 8.17026 3.49999 9.57679C3.49999 14.9968 6.79998 16.1868 9.93998 16.5768C9.61098 16.9168 9.35725 17.3222 9.19529 17.7667C9.03334 18.2112 8.96679 18.6849 8.99999 19.1568V22.0268",
|
|
262
|
+
stroke: "currentColor",
|
|
263
|
+
strokeLinecap: "round",
|
|
264
|
+
strokeLinejoin: "round"
|
|
265
|
+
}, {
|
|
266
|
+
d: "M9 20.0267C6 20.9999 3.5 20.0267 2 17.0267",
|
|
267
|
+
stroke: "currentColor",
|
|
268
|
+
strokeLinecap: "round",
|
|
269
|
+
strokeLinejoin: "round"
|
|
270
|
+
}],
|
|
271
|
+
linkedin: [
|
|
272
|
+
{
|
|
273
|
+
d: "M21 8V16C21 18.7614 18.7614 21 16 21H8C5.23858 21 3 18.7614 3 16V8C3 5.23858 5.23858 3 8 3H16C18.7614 3 21 5.23858 21 8Z",
|
|
274
|
+
stroke: "currentColor",
|
|
275
|
+
strokeLinecap: "round",
|
|
276
|
+
strokeLinejoin: "round"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
d: "M7 17V13.5V10",
|
|
280
|
+
stroke: "currentColor",
|
|
281
|
+
strokeLinecap: "round",
|
|
282
|
+
strokeLinejoin: "round"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
d: "M11 17V13.75M11 10V13.75M11 13.75C11 10 17 10 17 13.75V17",
|
|
286
|
+
stroke: "currentColor",
|
|
287
|
+
strokeLinecap: "round",
|
|
288
|
+
strokeLinejoin: "round"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
d: "M7 7.01L7.01 6.99889",
|
|
292
|
+
stroke: "currentColor",
|
|
293
|
+
strokeLinecap: "round",
|
|
294
|
+
strokeLinejoin: "round"
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
x: [{
|
|
298
|
+
d: "M16.8198 20.7684L3.75317 3.96836C3.44664 3.57425 3.72749 3 4.22678 3H6.70655C6.8917 3 7.06649 3.08548 7.18016 3.23164L20.2468 20.0316C20.5534 20.4258 20.2725 21 19.7732 21H17.2935C17.1083 21 16.9335 20.9145 16.8198 20.7684Z",
|
|
299
|
+
stroke: "currentColor",
|
|
300
|
+
strokeWidth: 1.5
|
|
301
|
+
}, {
|
|
302
|
+
d: "M20 3L4 21",
|
|
303
|
+
stroke: "currentColor",
|
|
304
|
+
strokeLinecap: "round"
|
|
305
|
+
}],
|
|
306
|
+
instagram: [
|
|
307
|
+
{
|
|
308
|
+
d: "M12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z",
|
|
309
|
+
stroke: "currentColor",
|
|
310
|
+
strokeLinecap: "round",
|
|
311
|
+
strokeLinejoin: "round"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
d: "M3 16V8C3 5.23858 5.23858 3 8 3H16C18.7614 3 21 5.23858 21 8V16C21 18.7614 18.7614 21 16 21H8C5.23858 21 3 18.7614 3 16Z",
|
|
315
|
+
stroke: "currentColor",
|
|
316
|
+
strokeWidth: 1.5
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
d: "M17.5 6.51L17.51 6.49889",
|
|
320
|
+
stroke: "currentColor",
|
|
321
|
+
strokeLinecap: "round",
|
|
322
|
+
strokeLinejoin: "round"
|
|
323
|
+
}
|
|
324
|
+
],
|
|
325
|
+
home: [{
|
|
326
|
+
d: "M2 8L11.7317 3.13416C11.9006 3.04971 12.0994 3.0497 12.2683 3.13416L22 8",
|
|
327
|
+
stroke: "currentColor",
|
|
328
|
+
strokeLinecap: "round",
|
|
329
|
+
strokeLinejoin: "round"
|
|
330
|
+
}, {
|
|
331
|
+
d: "M20 11V19C20 20.1046 19.1046 21 18 21H6C4.89543 21 4 20.1046 4 19V11",
|
|
332
|
+
stroke: "currentColor",
|
|
333
|
+
strokeLinecap: "round",
|
|
334
|
+
strokeLinejoin: "round"
|
|
335
|
+
}]
|
|
336
|
+
};
|
|
337
|
+
// src/components/Icon/Icon.tsx
|
|
338
|
+
function Icon({ name, size = "md", label, className, ...props }) {
|
|
339
|
+
const accessibleLabel = label?.trim();
|
|
340
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
341
|
+
...props,
|
|
342
|
+
className: cx("sua-icon", `sua-icon--${size}`, className),
|
|
343
|
+
width: "24",
|
|
344
|
+
height: "24",
|
|
345
|
+
viewBox: "0 0 24 24",
|
|
346
|
+
strokeWidth: "1.5",
|
|
347
|
+
fill: "none",
|
|
348
|
+
focusable: "false",
|
|
349
|
+
role: accessibleLabel ? "img" : void 0,
|
|
350
|
+
"aria-label": accessibleLabel || void 0,
|
|
351
|
+
"aria-hidden": accessibleLabel ? void 0 : true,
|
|
352
|
+
children: iconPaths[name].map((path, index) => /* @__PURE__ */ jsx("path", { ...path }, index))
|
|
353
|
+
});
|
|
354
|
+
}
|
|
180
355
|
// src/components/Label/Label.tsx
|
|
181
356
|
function Label({ htmlFor, required = false, className, children, ...props }) {
|
|
182
357
|
return /* @__PURE__ */ jsxs("label", {
|
|
@@ -321,14 +496,25 @@ function Figure({ image, caption, className, ...props }) {
|
|
|
321
496
|
});
|
|
322
497
|
}
|
|
323
498
|
// src/components/CodeBlock/CodeBlock.tsx
|
|
499
|
+
hljs.registerLanguage("lisp", lisp);
|
|
500
|
+
var plainTextLanguages = /* @__PURE__ */ new Set([
|
|
501
|
+
"text",
|
|
502
|
+
"txt",
|
|
503
|
+
"plaintext"
|
|
504
|
+
]);
|
|
324
505
|
function CodeBlock({ code, children, language, caption, className, ...props }) {
|
|
325
506
|
const labelId = useId();
|
|
326
507
|
const source = code ?? children;
|
|
327
508
|
const normalizedLanguage = language.trim().toLowerCase() || "text";
|
|
328
|
-
const
|
|
329
|
-
|
|
509
|
+
const grammar = normalizedLanguage === "elisp" || normalizedLanguage === "emacs-lisp" ? "lisp" : normalizedLanguage;
|
|
510
|
+
const highlighted = useMemo(() => !plainTextLanguages.has(normalizedLanguage) && hljs.getLanguage(grammar) ? hljs.highlight(source, {
|
|
511
|
+
language: grammar,
|
|
330
512
|
ignoreIllegals: true
|
|
331
|
-
}).value : null, [
|
|
513
|
+
}).value : null, [
|
|
514
|
+
source,
|
|
515
|
+
normalizedLanguage,
|
|
516
|
+
grammar
|
|
517
|
+
]);
|
|
332
518
|
return /* @__PURE__ */ jsxs("figure", {
|
|
333
519
|
...props,
|
|
334
520
|
className: cx("sua-code-block", "sua-not-prose", className),
|
|
@@ -575,7 +761,7 @@ function ArticleSummaryCard({ title, headingLevel, link, excerpt, metadata = [],
|
|
|
575
761
|
...props,
|
|
576
762
|
as: "article",
|
|
577
763
|
id,
|
|
578
|
-
tone: "
|
|
764
|
+
tone: "paper",
|
|
579
765
|
className: cx("sua-article-card", className),
|
|
580
766
|
"aria-label": ariaLabel,
|
|
581
767
|
"aria-labelledby": ariaLabelledBy ?? (ariaLabel ? void 0 : titleId),
|
|
@@ -663,7 +849,7 @@ function ReaderSupport({ amounts = suggestedAmounts, defaultAmount, breBKey = "3
|
|
|
663
849
|
"aria-labelledby": titleId,
|
|
664
850
|
className: cx("sua-reader-support", "sua-not-prose", className),
|
|
665
851
|
children: /* @__PURE__ */ jsx(Surface, {
|
|
666
|
-
tone: "
|
|
852
|
+
tone: "paper",
|
|
667
853
|
padding: "lg",
|
|
668
854
|
radius: "card",
|
|
669
855
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -954,7 +1140,7 @@ function ArticleTemplate({ header, article, content, leadFigure, signOff, footer
|
|
|
954
1140
|
as: "article",
|
|
955
1141
|
id: articleId,
|
|
956
1142
|
"aria-labelledby": titleId,
|
|
957
|
-
tone: "
|
|
1143
|
+
tone: "paper",
|
|
958
1144
|
elevation: "none",
|
|
959
1145
|
children: /* @__PURE__ */ jsxs(Stack, {
|
|
960
1146
|
gap: "xl",
|
|
@@ -1017,6 +1203,6 @@ function ArticleTemplate({ header, article, content, leadFigure, signOff, footer
|
|
|
1017
1203
|
]
|
|
1018
1204
|
});
|
|
1019
1205
|
}
|
|
1020
|
-
export { ArticleBody, ArticleScrollRegion, ArticleSummaryCard, ArticleTemplate, Badge, Badge as Tag, Surface as Box, Surface, Button, CodeBlock, Container, Figure, FormField, Grid, GridItem, Heading, Label, MetadataRow, NavLinkGroup, PortfolioIndexTemplate, ProjectShowcaseCard, ReaderSupport, SiteHeader, Stack, Text, TextInput, TextLink };
|
|
1206
|
+
export { ArticleBody, ArticleScrollRegion, ArticleSummaryCard, ArticleTemplate, Badge, Badge as Tag, Surface as Box, Surface, Button, CodeBlock, Container, Figure, FormField, Grid, GridItem, Heading, Icon, Label, MetadataRow, NavLinkGroup, PortfolioIndexTemplate, ProjectShowcaseCard, ReaderSupport, SiteHeader, Stack, Text, TextInput, TextLink };
|
|
1021
1207
|
|
|
1022
1208
|
//# sourceMappingURL=index.js.map
|