@pearpages/pulp-tokens 0.0.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.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +60 -0
  3. package/dist/tokens.css +914 -0
  4. package/dist/tokens.json +10638 -0
  5. package/package.json +33 -0
  6. package/tokens/component/accordion.json +83 -0
  7. package/tokens/component/alert.json +93 -0
  8. package/tokens/component/badge.json +153 -0
  9. package/tokens/component/button.json +118 -0
  10. package/tokens/component/calendar.json +48 -0
  11. package/tokens/component/card.json +28 -0
  12. package/tokens/component/checkbox.json +77 -0
  13. package/tokens/component/combobox.json +113 -0
  14. package/tokens/component/date-picker.json +145 -0
  15. package/tokens/component/dialog.json +36 -0
  16. package/tokens/component/field.json +23 -0
  17. package/tokens/component/heading.json +44 -0
  18. package/tokens/component/icon-button.json +17 -0
  19. package/tokens/component/icon.json +18 -0
  20. package/tokens/component/inline.json +32 -0
  21. package/tokens/component/listbox.json +37 -0
  22. package/tokens/component/menu.json +101 -0
  23. package/tokens/component/pagination.json +22 -0
  24. package/tokens/component/picker.json +113 -0
  25. package/tokens/component/popover.json +59 -0
  26. package/tokens/component/progress.json +60 -0
  27. package/tokens/component/radio.json +73 -0
  28. package/tokens/component/select.json +106 -0
  29. package/tokens/component/skeleton.json +41 -0
  30. package/tokens/component/slider.json +39 -0
  31. package/tokens/component/spinner.json +33 -0
  32. package/tokens/component/stack.json +32 -0
  33. package/tokens/component/switch.json +77 -0
  34. package/tokens/component/table.json +57 -0
  35. package/tokens/component/tabs.json +31 -0
  36. package/tokens/component/text-field.json +90 -0
  37. package/tokens/component/text.json +31 -0
  38. package/tokens/component/textarea.json +90 -0
  39. package/tokens/component/toast.json +35 -0
  40. package/tokens/component/tooltip.json +49 -0
  41. package/tokens/component/visually-hidden.json +9 -0
  42. package/tokens/primitives/bitepals.json +285 -0
  43. package/tokens/primitives/pulp.json +216 -0
  44. package/tokens/semantic/bitepals.json +727 -0
  45. package/tokens/semantic/pulp.json +728 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pere Pages
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.
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # @pearpages/pulp-tokens
2
+
3
+ The design tokens of [pulp](https://pulp.pearpages.com): W3C Design Tokens (DTCG) JSON in,
4
+ CSS custom properties and a resolved JSON manifest out. Two brands, light and dark via
5
+ `light-dark()`.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install @pearpages/pulp-tokens
11
+ ```
12
+
13
+ Most apps get the tokens through [`@pearpages/pulp-css`](https://www.npmjs.com/package/@pearpages/pulp-css),
14
+ which imports them in the right cascade layer. Import them directly only if you don't use it:
15
+
16
+ ```css
17
+ @import "@pearpages/pulp-tokens/tokens.css";
18
+ ```
19
+
20
+ ## Use
21
+
22
+ Read the semantic names, never the primitives underneath them:
23
+
24
+ ```css
25
+ .panel {
26
+ background: var(--color-surface-raised);
27
+ color: var(--color-text-default);
28
+ padding: var(--space-4);
29
+ border-radius: var(--radius-surface);
30
+ }
31
+ ```
32
+
33
+ Theme with two attributes on `<html>` or on any element (they nest):
34
+
35
+ - `data-brand="pulp" | "bitepals"` sets the palette, radius, type families and density.
36
+ `pulp` is the default on `:root`.
37
+ - `data-scheme="light" | "dark"`, or leave it off to follow the OS. Colours are
38
+ `light-dark()` pairs.
39
+
40
+ ```html
41
+ <html data-brand="bitepals" data-scheme="dark">
42
+ ```
43
+
44
+ ## Tiers
45
+
46
+ Primitives (raw palette and scales) → semantic tokens (what a value means: surface, text,
47
+ action) → component tokens (one component's knobs, always pointing at semantic ones). A brand
48
+ only remaps primitives onto semantic names, so switching brand never touches a component.
49
+
50
+ ## Files
51
+
52
+ | Export | |
53
+ | --- | --- |
54
+ | `@pearpages/pulp-tokens/tokens.css` | every brand's custom properties, in `@layer tokens` |
55
+ | `@pearpages/pulp-tokens/tokens.json` | resolved tokens per brand, `{ pulp: [...], bitepals: [...] }`; each entry has `name`, `path`, `type`, `tier`, `css`, `value`. For tooling |
56
+ | `tokens/` | the DTCG source files |
57
+
58
+ ## License
59
+
60
+ MIT