@kungal/ui-tokens 1.7.0 → 1.8.1

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
@@ -1,5 +1,53 @@
1
1
  # @kungal/ui-tokens
2
2
 
3
+ ## 1.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c2f4bda: feat(tokens): add `--kun-surface-opacity` for themeable surface transparency (glass)
8
+
9
+ The raised surface (`content1` — cards, popovers, dropdowns, inputs, modal,
10
+ drawer) now resolves its alpha through `--kun-surface-opacity`, default `1`
11
+ (fully opaque, no visual change). A site with a background image (e.g. a galgame
12
+ page) can make every surface see-through at once, with no component changes:
13
+
14
+ ```css
15
+ :root {
16
+ --kun-surface-opacity: 0.7;
17
+ --kun-background-blur: 12px;
18
+ }
19
+ ```
20
+
21
+ Components don't ship a `backdrop-blur` on every surface, so set
22
+ `--kun-background-blur` too if you want true frosted glass rather than plain
23
+ translucency. Default sites are unaffected.
24
+
25
+ ## 1.8.0
26
+
27
+ ### Minor Changes
28
+
29
+ - 3e821c4: feat(tokens,vue): surface-elevation system — cards & inputs pop by fill+shadow, not borders
30
+
31
+ Move from a border-defined look to an elevation scale. The page background is now
32
+ a soft neutral (light `#f5f5f7`, dark near-black `#0a0a0a`) instead of pure
33
+ white/black, so raised surfaces read as raised:
34
+
35
+ - **Card** is a raised surface — `bg-content1` (`#fff` / `#18181b`) + `shadow-kun-sm`;
36
+ border is now OFF by default (`bordered` is opt-in). It no longer shares the
37
+ page background.
38
+ - **Inputs are borderless and share the card surface**: Input, Textarea, Select,
39
+ NumberInput, TagInput, PinInput, Autocomplete, DatePicker trigger and the
40
+ Pagination field use `bg-content1` + `shadow-kun-sm` (same fill as a card, lifted
41
+ by a small shadow). The error state is a danger **ring**, not a border.
42
+ - **Floating panels lose their border** and rely on shadow + the `content1`
43
+ surface: Dropdown, Select/Autocomplete lists, ContextMenu, Popover, Tooltip,
44
+ DatePicker calendar, Modal, Drawer.
45
+ - **Placeholder** now uses a theme-adaptive `::placeholder` colour (the browser
46
+ default grey didn't follow light/dark).
47
+
48
+ Visual change only; component APIs are unchanged except `KunCard`'s `bordered`
49
+ default (true→false) and `KunTagInput`'s `variant` default (bordered→flat).
50
+
3
51
  ## 1.7.0
4
52
 
5
53
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungal/ui-tokens",
3
- "version": "1.7.0",
3
+ "version": "1.8.1",
4
4
  "description": "KunUI design tokens — framework-agnostic Tailwind v4 theme (semantic colors, radius, z-index, animations).",
5
5
  "type": "module",
6
6
  "keywords": [
package/src/base.css CHANGED
@@ -42,6 +42,14 @@
42
42
  color: oklch(var(--foreground));
43
43
  min-height: 100vh;
44
44
  }
45
+
46
+ /* Placeholder text — a muted neutral that flips with the theme (the browser
47
+ * default is a fixed grey that doesn't follow light/dark). `opacity: 1` since
48
+ * the colour already carries its own muting and UA sheets dim placeholders. */
49
+ ::placeholder {
50
+ color: oklch(var(--default-400));
51
+ opacity: 1;
52
+ }
45
53
  }
46
54
 
47
55
  @layer utilities {
@@ -11,7 +11,7 @@
11
11
  @theme {
12
12
  --color-background: oklch(var(--background) / var(--kun-global-opacity));
13
13
  --color-foreground: oklch(var(--foreground));
14
- --color-content1: oklch(var(--content1));
14
+ --color-content1: oklch(var(--content1) / var(--kun-surface-opacity));
15
15
  --color-content2: oklch(var(--content2));
16
16
  --color-content3: oklch(var(--content3));
17
17
  --color-content4: oklch(var(--content4));
@@ -117,7 +117,7 @@
117
117
 
118
118
  @layer base {
119
119
  :root {
120
- --background: 1 0 0;
120
+ --background: 0.9707 0.0027 286.35;
121
121
  --foreground: 0.2057 0.0132 233.66;
122
122
  --content1: 1 0 0;
123
123
  --content2: 0.9683 0.0014 286.37;
@@ -231,7 +231,7 @@
231
231
  }
232
232
 
233
233
  .kun-dark-mode {
234
- --background: 0 0 0;
234
+ --background: 0.1448 0 0;
235
235
  --foreground: 0.946 0.0018 247.84;
236
236
  --content1: 0.2102 0.006 285.87;
237
237
  --content2: 0.2747 0.006 286;
package/src/tokens.css CHANGED
@@ -31,6 +31,15 @@
31
31
  * default-100). Lower = more see-through. Apps may override in :root. */
32
32
  --kun-global-opacity: 0.7;
33
33
 
34
+ /* Opacity of the RAISED surface (`content1`) — cards, popovers, dropdowns,
35
+ * inputs, modal, drawer. Default 1 = fully opaque (the clean elevation look).
36
+ * A site with a background image (e.g. a galgame page) can make every surface
37
+ * frosted at once by lowering this and adding a blur, with NO component changes:
38
+ * :root { --kun-surface-opacity: 0.7; --kun-background-blur: 12px; }
39
+ * (Components don't ship a backdrop-blur on every surface, so set the blur too
40
+ * if you want true frosted glass rather than plain see-through.) */
41
+ --kun-surface-opacity: 1;
42
+
34
43
  /* Backdrop blur strength for glass surfaces (Card / Modal / sticky
35
44
  * topbar). 0 = no blur. Referenced as
36
45
  * `backdrop-blur-[var(--kun-background-blur)]` by those components.