@bergetai/ui 0.19.0 → 0.19.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.
@@ -18,6 +18,76 @@
18
18
  @source "../**/*.mjs";
19
19
  @source "../**/*.cjs";
20
20
 
21
+ /* State/orientation shorthand variants the primitives rely on
22
+ (data-open:, data-horizontal:, …). Upstream defines these in the shadcn
23
+ tailwind.css preset (shadcn-ui/ui packages/shadcn/src/tailwind.css);
24
+ since consumers import ONLY this stylesheet, they must ship here.
25
+ Without them Tailwind falls back to its default semantics, which match
26
+ boolean attributes only ([data-open], [data-horizontal]) — Base UI emits
27
+ data-state/data-orientation valued attributes instead, so e.g. the
28
+ Slider track (data-horizontal:h-1) collapses to zero height.
29
+ Each alias matches the equivalent Radix data-state attribute OR the
30
+ Base UI boolean attribute, so the primitives work with both libraries. */
31
+ @custom-variant data-open {
32
+ &:where([data-state='open']),
33
+ &:where([data-open]:not([data-open='false'])) {
34
+ @slot;
35
+ }
36
+ }
37
+
38
+ @custom-variant data-closed {
39
+ &:where([data-state='closed']),
40
+ &:where([data-closed]:not([data-closed='false'])) {
41
+ @slot;
42
+ }
43
+ }
44
+
45
+ @custom-variant data-checked {
46
+ &:where([data-state='checked']),
47
+ &:where([data-checked]:not([data-checked='false'])) {
48
+ @slot;
49
+ }
50
+ }
51
+
52
+ @custom-variant data-unchecked {
53
+ &:where([data-state='unchecked']),
54
+ &:where([data-unchecked]:not([data-unchecked='false'])) {
55
+ @slot;
56
+ }
57
+ }
58
+
59
+ @custom-variant data-selected {
60
+ &:where([data-selected='true']) {
61
+ @slot;
62
+ }
63
+ }
64
+
65
+ @custom-variant data-disabled {
66
+ &:where([data-disabled='true']),
67
+ &:where([data-disabled]:not([data-disabled='false'])) {
68
+ @slot;
69
+ }
70
+ }
71
+
72
+ @custom-variant data-active {
73
+ &:where([data-state='active']),
74
+ &:where([data-active]:not([data-active='false'])) {
75
+ @slot;
76
+ }
77
+ }
78
+
79
+ @custom-variant data-horizontal {
80
+ &:where([data-orientation='horizontal']) {
81
+ @slot;
82
+ }
83
+ }
84
+
85
+ @custom-variant data-vertical {
86
+ &:where([data-orientation='vertical']) {
87
+ @slot;
88
+ }
89
+ }
90
+
21
91
  :root {
22
92
  /* ────────────────────────────
23
93
  GRANITE — neutral stone
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bergetai/ui",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Berget Design System - Scandinavian-inspired design system with console aesthetic",
5
5
  "type": "module",
6
6
  "license": "MIT",