@nqmcreative/ui 0.4.1 → 0.4.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.
Files changed (132) hide show
  1. package/README.md +1 -1
  2. package/dist/core/index.d.ts +1 -1
  3. package/dist/core/index.js +1 -1
  4. package/dist/core/tones.d.ts +10 -0
  5. package/dist/core/tones.js +19 -0
  6. package/dist/core/trigger.d.ts +8 -0
  7. package/dist/core/trigger.js +11 -0
  8. package/dist/styles/matte/Alert.svelte +1 -1
  9. package/dist/styles/matte/Avatar.svelte +16 -3
  10. package/dist/styles/matte/Button.svelte +9 -2
  11. package/dist/styles/matte/Checkbox.svelte +49 -30
  12. package/dist/styles/matte/CheckboxGroup.svelte +15 -4
  13. package/dist/styles/matte/Combobox.svelte +12 -3
  14. package/dist/styles/matte/CommandPalette.svelte +1 -1
  15. package/dist/styles/matte/ConfirmDialog.svelte +10 -2
  16. package/dist/styles/matte/ContextMenu.svelte +1 -1
  17. package/dist/styles/matte/DatePicker.svelte +10 -3
  18. package/dist/styles/matte/Divider.svelte +1 -1
  19. package/dist/styles/matte/Drawer.svelte +10 -2
  20. package/dist/styles/matte/Dropdown.svelte +1 -1
  21. package/dist/styles/matte/Field.svelte +59 -3
  22. package/dist/styles/matte/Footer.svelte +14 -3
  23. package/dist/styles/matte/Input.svelte +9 -2
  24. package/dist/styles/matte/Label.svelte +3 -1
  25. package/dist/styles/matte/Link.svelte +13 -2
  26. package/dist/styles/matte/MenuItem.svelte +11 -4
  27. package/dist/styles/matte/Modal.svelte +11 -3
  28. package/dist/styles/matte/MultiSelect.svelte +1 -1
  29. package/dist/styles/matte/Navbar.svelte +2 -2
  30. package/dist/styles/matte/Popover.svelte +1 -1
  31. package/dist/styles/matte/Radio.svelte +41 -22
  32. package/dist/styles/matte/RadioGroup.svelte +15 -4
  33. package/dist/styles/matte/Select.svelte +4 -2
  34. package/dist/styles/matte/Skeleton.svelte +2 -1
  35. package/dist/styles/matte/Stat.svelte +27 -3
  36. package/dist/styles/matte/Switch.svelte +6 -1
  37. package/dist/styles/matte/Tabs.svelte +1 -1
  38. package/dist/styles/matte/Textarea.svelte +4 -2
  39. package/dist/styles/matte/Toaster.svelte +21 -3
  40. package/dist/styles/matte/Tooltip.svelte +8 -1
  41. package/dist/styles/matte/index.d.ts +1 -1
  42. package/dist/styles/matte/index.js +1 -1
  43. package/dist/styles/matte/theme.css +64 -1
  44. package/dist/styles/paper/AccordionItem.svelte +38 -11
  45. package/dist/styles/paper/AccordionItem.svelte.d.ts +1 -1
  46. package/dist/styles/paper/Alert.svelte +2 -2
  47. package/dist/styles/paper/Avatar.svelte +14 -3
  48. package/dist/styles/paper/Button.svelte +9 -2
  49. package/dist/styles/paper/Card.svelte +1 -1
  50. package/dist/styles/paper/Checkbox.svelte +55 -36
  51. package/dist/styles/paper/CheckboxGroup.svelte +15 -4
  52. package/dist/styles/paper/Combobox.svelte +12 -3
  53. package/dist/styles/paper/CommandPalette.svelte +1 -1
  54. package/dist/styles/paper/ConfirmDialog.svelte +8 -2
  55. package/dist/styles/paper/ContextMenu.svelte +1 -1
  56. package/dist/styles/paper/DatePicker.svelte +10 -3
  57. package/dist/styles/paper/Divider.svelte +1 -1
  58. package/dist/styles/paper/Drawer.svelte +8 -2
  59. package/dist/styles/paper/Dropdown.svelte +1 -1
  60. package/dist/styles/paper/Field.svelte +59 -3
  61. package/dist/styles/paper/Footer.svelte +14 -3
  62. package/dist/styles/paper/Input.svelte +9 -2
  63. package/dist/styles/paper/Label.svelte +3 -1
  64. package/dist/styles/paper/Link.svelte +13 -2
  65. package/dist/styles/paper/MenuItem.svelte +11 -4
  66. package/dist/styles/paper/Modal.svelte +9 -3
  67. package/dist/styles/paper/MultiSelect.svelte +1 -1
  68. package/dist/styles/paper/Navbar.svelte +2 -2
  69. package/dist/styles/paper/Popover.svelte +1 -1
  70. package/dist/styles/paper/Radio.svelte +41 -22
  71. package/dist/styles/paper/RadioGroup.svelte +15 -4
  72. package/dist/styles/paper/SegmentedControl.svelte +2 -2
  73. package/dist/styles/paper/Select.svelte +4 -2
  74. package/dist/styles/paper/Skeleton.svelte +2 -1
  75. package/dist/styles/paper/Stat.svelte +24 -2
  76. package/dist/styles/paper/Switch.svelte +6 -1
  77. package/dist/styles/paper/Tabs.svelte +1 -1
  78. package/dist/styles/paper/Textarea.svelte +4 -2
  79. package/dist/styles/paper/Toaster.svelte +19 -3
  80. package/dist/styles/paper/Tooltip.svelte +8 -1
  81. package/dist/styles/paper/index.d.ts +1 -1
  82. package/dist/styles/paper/index.js +1 -1
  83. package/dist/styles/paper/theme.css +85 -13
  84. package/dist/styles/sprout/Alert.svelte +3 -3
  85. package/dist/styles/sprout/Avatar.svelte +14 -3
  86. package/dist/styles/sprout/Breadcrumb.svelte +1 -1
  87. package/dist/styles/sprout/Button.svelte +8 -4
  88. package/dist/styles/sprout/Calendar.svelte +1 -1
  89. package/dist/styles/sprout/Card.svelte +2 -2
  90. package/dist/styles/sprout/Checkbox.svelte +55 -36
  91. package/dist/styles/sprout/CheckboxGroup.svelte +15 -4
  92. package/dist/styles/sprout/ColorInput.svelte +1 -1
  93. package/dist/styles/sprout/Combobox.svelte +12 -3
  94. package/dist/styles/sprout/ConfirmDialog.svelte +8 -2
  95. package/dist/styles/sprout/DatePicker.svelte +11 -4
  96. package/dist/styles/sprout/Divider.svelte +1 -1
  97. package/dist/styles/sprout/Drawer.svelte +8 -2
  98. package/dist/styles/sprout/Dropzone.svelte +1 -1
  99. package/dist/styles/sprout/Field.svelte +59 -3
  100. package/dist/styles/sprout/FileInput.svelte +3 -3
  101. package/dist/styles/sprout/Footer.svelte +14 -3
  102. package/dist/styles/sprout/Input.svelte +9 -2
  103. package/dist/styles/sprout/Label.svelte +3 -1
  104. package/dist/styles/sprout/Link.svelte +13 -2
  105. package/dist/styles/sprout/LogoCloud.svelte +1 -1
  106. package/dist/styles/sprout/MenuItem.svelte +11 -4
  107. package/dist/styles/sprout/Modal.svelte +8 -2
  108. package/dist/styles/sprout/MultiSelect.svelte +3 -3
  109. package/dist/styles/sprout/Navbar.svelte +2 -2
  110. package/dist/styles/sprout/Radio.svelte +41 -22
  111. package/dist/styles/sprout/RadioGroup.svelte +15 -4
  112. package/dist/styles/sprout/SearchInput.svelte +1 -1
  113. package/dist/styles/sprout/SegmentedControl.svelte +2 -2
  114. package/dist/styles/sprout/Select.svelte +4 -2
  115. package/dist/styles/sprout/Sidebar.svelte +2 -1
  116. package/dist/styles/sprout/Skeleton.svelte +2 -1
  117. package/dist/styles/sprout/Stat.svelte +24 -2
  118. package/dist/styles/sprout/Switch.svelte +6 -1
  119. package/dist/styles/sprout/Table.svelte +1 -1
  120. package/dist/styles/sprout/Tabs.svelte +1 -1
  121. package/dist/styles/sprout/TagsInput.svelte +1 -1
  122. package/dist/styles/sprout/Textarea.svelte +4 -2
  123. package/dist/styles/sprout/TimeInput.svelte +1 -1
  124. package/dist/styles/sprout/Toaster.svelte +22 -6
  125. package/dist/styles/sprout/Tooltip.svelte +8 -1
  126. package/dist/styles/sprout/index.d.ts +2 -2
  127. package/dist/styles/sprout/index.js +2 -2
  128. package/dist/styles/sprout/lift.d.ts +14 -0
  129. package/dist/styles/sprout/lift.js +23 -0
  130. package/dist/styles/sprout/theme.css +68 -24
  131. package/package.json +1 -1
  132. package/registry.json +4 -2
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * sprout — design tokens.
3
3
  *
4
- * The warm one: leaf green on cream, fully rounded corners, and a display face
4
+ * The warm one: leaf green on white, fully rounded corners, and a display face
5
5
  * with round terminals. Built for school, community and family sites, where the
6
6
  * reader is a parent on a phone rather than an operator at a desk. Import this
7
7
  * after `@import "tailwindcss";` in your app's CSS entry point.
@@ -17,16 +17,21 @@
17
17
  */
18
18
  @theme {
19
19
  /*
20
- * Surfaces are cream rather than white, and the greys are green-cast. A
21
- * neutral grey next to this much foliage reads as a printing error, so every
22
- * step of the scale carries a little of the brand hue.
20
+ * Surfaces are white, and the greys under them are near-neutral with only a
21
+ * hair of warmth. The green belongs to the brand, not to the paper: a page
22
+ * whose every secondary surface and every hover is tinted reads as tiring
23
+ * long before it reads as warm, so the neutrals stay out of the way.
24
+ *
25
+ * `--color-bg` is the face of a card; `--color-bg-alt` is the ground it sits
26
+ * on. Put `bg-bg-alt` on the body and cards float as white, which is the
27
+ * layering this style was drawn from.
23
28
  */
24
29
  /* --- surfaces --- */
25
- --color-bg: #fffefb;
26
- --color-bg-alt: #f0fdf4;
27
- --color-bg-inset: #e3f6e9;
28
- --color-hairline: #ecefe7;
29
- --color-hairline-strong: #d3e0d1;
30
+ --color-bg: #ffffff;
31
+ --color-bg-alt: #f7f7f4;
32
+ --color-bg-inset: #edede8;
33
+ --color-hairline: #e6e6e0;
34
+ --color-hairline-strong: #cfcfc7;
30
35
 
31
36
  /* --- text --- */
32
37
  --color-text: #1a3a1f;
@@ -124,6 +129,24 @@
124
129
  */
125
130
  --ease-brand: cubic-bezier(0.34, 1.4, 0.64, 1);
126
131
  --ease-brand-out: cubic-bezier(0.22, 1, 0.36, 1);
132
+ /* Overlay entrances — sprout pops in with a little overshoot, on the same
133
+ * `enter`/`reveal` token names matte and paper use. Declared here so the
134
+ * three styles stay in token-name parity; sprout's overlay components adopt
135
+ * them in a later pass. */
136
+ --animate-enter: nqm-pop 240ms var(--ease-brand);
137
+ --animate-reveal: nqm-pop 220ms var(--ease-brand);
138
+ }
139
+
140
+ @keyframes nqm-fade {
141
+ from {
142
+ opacity: 0;
143
+ }
144
+ }
145
+ @keyframes nqm-pop {
146
+ from {
147
+ opacity: 0;
148
+ transform: scale(0.96);
149
+ }
127
150
  }
128
151
 
129
152
  /*
@@ -136,25 +159,25 @@
136
159
  * Every utility built on these tokens follows automatically, so components
137
160
  * need no `dark:` classes of their own.
138
161
  *
139
- * The dark palette is a night garden rather than a neutral slate: the surfaces
140
- * keep the green cast, and every hue lifts a step or two so it still reads
141
- * against them.
162
+ * The dark palette is lamplight rather than a neutral slate: the surfaces carry
163
+ * the same honey cast as the light ones, and every hue lifts a step or two so
164
+ * it still reads against them.
142
165
  */
143
166
  @custom-variant dark (&:where(.dark, .dark *));
144
167
 
145
168
  .dark {
146
169
  color-scheme: dark;
147
170
 
148
- --color-bg: #0e1a11;
149
- --color-bg-alt: #14251a;
150
- --color-bg-inset: #1b3020;
151
- --color-hairline: #1e3524;
152
- --color-hairline-strong: #2f4a36;
171
+ --color-bg: #17140e;
172
+ --color-bg-alt: #211c13;
173
+ --color-bg-inset: #2d261a;
174
+ --color-hairline: #2a2317;
175
+ --color-hairline-strong: #453a27;
153
176
 
154
177
  --color-text: #f0f7f0;
155
178
  --color-text-secondary: #cadfcd;
156
179
  --color-text-muted: #94ad99;
157
- --color-text-inverse: #0e1a11;
180
+ --color-text-inverse: #17140e;
158
181
 
159
182
  --color-brand: #4ade80;
160
183
  --color-brand-hover: #86efac;
@@ -201,16 +224,16 @@
201
224
  :root:not(.light) {
202
225
  color-scheme: dark;
203
226
 
204
- --color-bg: #0e1a11;
205
- --color-bg-alt: #14251a;
206
- --color-bg-inset: #1b3020;
207
- --color-hairline: #1e3524;
208
- --color-hairline-strong: #2f4a36;
227
+ --color-bg: #17140e;
228
+ --color-bg-alt: #211c13;
229
+ --color-bg-inset: #2d261a;
230
+ --color-hairline: #2a2317;
231
+ --color-hairline-strong: #453a27;
209
232
 
210
233
  --color-text: #f0f7f0;
211
234
  --color-text-secondary: #cadfcd;
212
235
  --color-text-muted: #94ad99;
213
- --color-text-inverse: #0e1a11;
236
+ --color-text-inverse: #17140e;
214
237
 
215
238
  --color-brand: #4ade80;
216
239
  --color-brand-hover: #86efac;
@@ -253,3 +276,24 @@
253
276
  --color-neutral-border: #2f4a36;
254
277
  }
255
278
  }
279
+
280
+ /*
281
+ * The surfaces the browser draws for us.
282
+ *
283
+ * A caret and a highlight in the user-agent's blue belong to no design system,
284
+ * and they are the two the reader touches most: one sits in every field they
285
+ * type into, the other appears the moment they drag across a paragraph. The
286
+ * selection is mixed from the brand rather than pinned to a token so it stays
287
+ * a wash — the text underneath keeps its own colour and its own contrast.
288
+ */
289
+ @layer base {
290
+ ::selection {
291
+ background-color: color-mix(in oklab, var(--color-brand) 24%, transparent);
292
+ }
293
+
294
+ input,
295
+ textarea,
296
+ [contenteditable] {
297
+ caret-color: var(--color-brand);
298
+ }
299
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nqmcreative/ui",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Svelte 5 + Tailwind CSS v4 component library — three styles (matte, paper, sprout), 70 components each, one shared behaviour core. No runtime dependencies.",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
package/registry.json CHANGED
@@ -21,7 +21,7 @@
21
21
  {
22
22
  "name": "sprout",
23
23
  "title": "Sprout",
24
- "description": "Warm and fully rounded — leaf green on cream, pill buttons, and a round display face. For school, community and family sites.",
24
+ "description": "Warm and fully rounded — leaf green on white, pill buttons, and a round display face. For school, community and family sites.",
25
25
  "fonts": true,
26
26
  "extra": []
27
27
  }
@@ -1122,7 +1122,9 @@
1122
1122
  "sprout": "@nqmcreative/ui/sprout/tooltip"
1123
1123
  },
1124
1124
  "uses": [],
1125
- "modules": []
1125
+ "modules": [
1126
+ "trigger"
1127
+ ]
1126
1128
  }
1127
1129
  ]
1128
1130
  }