@snacky/ui 0.3.6 → 0.3.8
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/README.md +8 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
React implementation of the Snacky App design system - generated from the
|
|
4
4
|
source of truth at `../../index.html` (via `tokens.json` / `components.json`),
|
|
5
|
-
pixel-accurate to Figma
|
|
5
|
+
pixel-accurate to Figma.
|
|
6
6
|
|
|
7
7
|
This exists so AI coding tools (and humans) building new Snacky features can
|
|
8
8
|
**import** these components directly instead of regenerating similar-looking
|
|
@@ -62,22 +62,7 @@ Illustration, ProductImage, ProductCard.
|
|
|
62
62
|
Every component is diffed against `index.html`'s own Live Preview
|
|
63
63
|
implementation - the code that actually renders the documentation site - not
|
|
64
64
|
just the spec values in `components.json`. Where the two disagree, the
|
|
65
|
-
verified implementation wins.
|
|
66
|
-
were additionally checked against their Figma component sets directly.
|
|
67
|
-
|
|
68
|
-
Two things worth knowing before you rely on them:
|
|
69
|
-
|
|
70
|
-
- **`NavBar` items use `flex: 1`** to fill the container, where the site's own
|
|
71
|
-
demo hardcodes `72x72` per item. That demo only ever renders at a fixed
|
|
72
|
-
360px frame; a real nav bar has to fill the actual device width, so this is
|
|
73
|
-
a deliberate deviation rather than a mismatch.
|
|
74
|
-
- **`BottomSheet` and `Section` spacing is variant-dependent by design.** Both
|
|
75
|
-
shells have since been checked against Figma, and the finding was that no
|
|
76
|
-
single shell default reproduces every variant: BottomSheet's block gap is
|
|
77
|
-
32px on Welcome, 24px on Calendar and 16px elsewhere, and Section's "Variant"
|
|
78
|
-
layout has no horizontal shell padding at all, with its header owning the
|
|
79
|
-
24px instead. The shells ship sensible defaults and expect `children` to
|
|
80
|
-
override the spacing where a specific composition needs to.
|
|
65
|
+
verified implementation wins.
|
|
81
66
|
|
|
82
67
|
See [CHANGELOG.md](https://github.com/rezatresnas/snacky-design-system/blob/main/packages/react-ui/CHANGELOG.md)
|
|
83
68
|
for how the package got here, including the mistakes.
|
|
@@ -138,12 +123,16 @@ what is already in the bundle.
|
|
|
138
123
|
library of your own. Either way, check the licence yourself before shipping
|
|
139
124
|
- it is the one part of this that a component library cannot decide for you.
|
|
140
125
|
|
|
126
|
+
- **`NavBar` items use `flex: 1`** to fill the container, where the site's demo
|
|
127
|
+
hardcodes `72x72` per item - that demo only ever renders at a fixed 360px
|
|
128
|
+
frame, so this is a deliberate deviation rather than a mismatch.
|
|
141
129
|
- **Modal/Section**: the design system documents ~9 Modal "variants" and ~13
|
|
142
130
|
Section "variants", but each is really the *same* shell component
|
|
143
131
|
(`BottomSheet` / `Section`) with different `children` - so that's what's
|
|
144
132
|
exported, matching every `code.tsx` sample exactly, rather than 22 near-
|
|
145
|
-
duplicate components.
|
|
146
|
-
variant
|
|
133
|
+
duplicate components. Their spacing is variant-dependent by design - Figma
|
|
134
|
+
uses different gaps per variant, so the shells ship sensible defaults and
|
|
135
|
+
expect `children` to override where a composition needs it.
|
|
147
136
|
|
|
148
137
|
## Keeping this in sync
|
|
149
138
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snacky/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Snacky App design system - React component library. Generated from the source-of-truth design system at ../../index.html (tokens.json / components.json), pixel-accurate to Figma.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "rezatresnas",
|