barua-ui 0.6.0 → 0.8.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.
@@ -144,6 +144,13 @@
144
144
  box-shadow: var(--b-glass-edge);
145
145
  pointer-events: none;
146
146
  }
147
+ /* Thick material — the same glass, denser veil. For panels carrying data or
148
+ a form, where whatever the customer set as a wallpaper must not compete
149
+ with the ink. Translucency is decoration; a bounce rate is not. */
150
+ .b-card--glass.b-card--thick {
151
+ background: var(--b-material-thick-bg);
152
+ }
153
+
147
154
  /* Glass clear — transparent, for media-rich backgrounds */
148
155
  .b-card--glass-clear {
149
156
  position: relative;
@@ -848,6 +855,14 @@
848
855
  backdrop-filter: blur(var(--b-blur-lg)) saturate(1.1);
849
856
  border-color: var(--b-material-neutral-edge);
850
857
  }
858
+ /* …but a table of numbers is not decoration. A card that asks for the thick
859
+ material keeps its blur and doubles the veil, so the picture still shows at
860
+ the edges without competing with the ink. The veil follows the wallpaper's
861
+ own scheme, so it lightens on a bright picture and darkens on a dark one. */
862
+ .b-has-wallpaper .b-card--thick {
863
+ background: var(--b-material-thick-bg);
864
+ }
865
+
851
866
  /* A panel inside glass is a fill, never a second material. */
852
867
  .b-has-wallpaper .b-card .b-card {
853
868
  background: var(--b-fill-quaternary);
@@ -13,6 +13,13 @@
13
13
  --b-chapter-gap: clamp(4.5rem, 9vw, 8.5rem);
14
14
  display: flex;
15
15
  flex-direction: column;
16
+ /* The wrapper paints the page. A marketing page is often a different
17
+ scheme from the product around it — light pages for a dark tool — and
18
+ with data-theme on this element the tokens resolve here, so the page
19
+ takes its own background rather than the application's. */
20
+ min-height: 100dvh;
21
+ background: var(--b-bg);
22
+ color: var(--b-text);
16
23
  }
17
24
 
18
25
  /* ---- Slim marketing bar: quieter than an app's chrome -------------------- */
@@ -82,6 +89,114 @@
82
89
  .b-hero__title { font-size: clamp(2.5rem, 7vw, 4.75rem); }
83
90
  .b-hero__media { margin-block-start: clamp(2.5rem, 5vw, 4rem); }
84
91
 
92
+ /* The tile field a hero stands on.
93
+
94
+ A flat page makes a centred headline look like it is floating in milk.
95
+ This is the quietest possible ground: three checkerboards at different
96
+ scales, each barely there, masked so the pattern dissolves before it
97
+ reaches the text. It is drawn entirely from gradients — no image, no
98
+ element per square — so it costs nothing and re-tints with the theme.
99
+ --b-tile is the cell; --b-tile-ink is how loud the squares are. */
100
+ /* The tile field is absolute, so whatever holds it has to be positioned and
101
+ has to clip. Saying it here means no page has to remember. */
102
+ .b-has-tiles { position: relative; overflow: hidden; }
103
+ .b-tile-field {
104
+ position: absolute;
105
+ inset: 0;
106
+ z-index: 0;
107
+ pointer-events: none;
108
+ --b-tile: 5.5rem;
109
+ /* The field paints its own ground, a shade off the page, and the squares
110
+ sit *lighter* on it — which is the only way the pattern is visible on a
111
+ white page and still barely there on a dark one. Two knobs, both
112
+ translucent, so whatever surface it lands on shows through. */
113
+ --b-tile-ground: light-dark(rgba(20, 24, 38, 0.045), rgba(255, 255, 255, 0.014));
114
+ --b-tile-ink: light-dark(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.03));
115
+ background-color: var(--b-tile-ground);
116
+ background-image:
117
+ repeating-conic-gradient(var(--b-tile-ink) 0% 25%, transparent 0% 50%),
118
+ repeating-conic-gradient(var(--b-tile-ink) 0% 25%, transparent 0% 50%),
119
+ repeating-conic-gradient(var(--b-tile-ink) 0% 25%, transparent 0% 50%);
120
+ background-size:
121
+ var(--b-tile) var(--b-tile),
122
+ calc(var(--b-tile) * 1.62) calc(var(--b-tile) * 1.62),
123
+ calc(var(--b-tile) * 2.71) calc(var(--b-tile) * 2.71);
124
+ background-position: 0 0, calc(var(--b-tile) * 0.5) calc(var(--b-tile) * 0.8), calc(var(--b-tile) * -0.7) calc(var(--b-tile) * 0.3);
125
+ /* Nothing in the middle, where the words are. */
126
+ -webkit-mask-image: radial-gradient(120% 85% at 50% 0%, #000 0%, transparent 72%);
127
+ mask-image: radial-gradient(120% 85% at 50% 0%, #000 0%, transparent 72%);
128
+ }
129
+ /* Anything that has to sit on top of it says so once. */
130
+ .b-tile-field ~ * { position: relative; z-index: 1; }
131
+
132
+ /* ---- Announcement: one line of news above a headline --------------------- */
133
+ /* The pill every product page opens with — a release, a launch, a price
134
+ change. It is a link, so it is an <a>; the arrow is a text mark, not an
135
+ icon, and it steps forward on hover the way a link should suggest travel. */
136
+ .b-announce {
137
+ display: inline-flex;
138
+ align-items: center;
139
+ gap: var(--b-space-2);
140
+ padding: var(--b-space-1) var(--b-space-3);
141
+ font-size: var(--b-text-footnote);
142
+ font-weight: var(--b-weight-medium);
143
+ color: var(--b-color-accent-text);
144
+ background: var(--b-color-accent-soft);
145
+ border: 1px solid color-mix(in srgb, var(--b-color-accent) 22%, transparent);
146
+ border-radius: var(--b-radius-full);
147
+ text-decoration: none;
148
+ }
149
+ .b-announce:hover { text-decoration: none; background: color-mix(in srgb, var(--b-color-accent) 18%, transparent); }
150
+ .b-announce .b-icon { width: 1rem; height: 1rem; }
151
+ .b-announce__go { transition: translate var(--b-duration-fast) var(--b-ease-out); }
152
+ .b-announce:hover .b-announce__go { translate: 2px 0; }
153
+
154
+ /* ---- Rating: borrowed credibility, stated plainly ------------------------ */
155
+ /* Five marks and who is vouching. The stars are the library's own star at
156
+ caption size; a star that was not earned carries .is-empty rather than
157
+ being left out, so the row is always five wide and reads as a score. */
158
+ .b-rating {
159
+ display: inline-flex;
160
+ align-items: center;
161
+ gap: var(--b-space-2);
162
+ font-size: var(--b-text-footnote);
163
+ color: var(--b-text-secondary);
164
+ }
165
+ .b-rating__stars { display: inline-flex; gap: 0.125rem; color: var(--b-color-yellow); }
166
+ .b-rating__stars .b-icon { width: 0.95rem; height: 0.95rem; fill: currentColor; }
167
+ .b-rating__stars .is-empty { color: var(--b-fill); }
168
+
169
+ /* ---- Logo wall: the companies already here ------------------------------- */
170
+ /* A quiet row, evenly spaced, every mark the same height whatever its
171
+ proportions — which is the only way a wall of logos looks deliberate
172
+ rather than pasted. Inline SVG on currentColor is the intended form: it
173
+ inherits the wall's ink and therefore survives the dark theme. Raster
174
+ logos get greyed instead, because a PNG cannot follow the text colour. */
175
+ .b-logo-wall {
176
+ display: flex;
177
+ flex-wrap: wrap;
178
+ align-items: center;
179
+ justify-content: center;
180
+ gap: clamp(var(--b-space-6), 5vw, var(--b-space-12));
181
+ padding-block: var(--b-space-8);
182
+ color: var(--b-text-secondary);
183
+ }
184
+ .b-logo-wall__logo {
185
+ display: inline-flex;
186
+ align-items: center;
187
+ gap: var(--b-space-2);
188
+ height: var(--b-logo-h, 1.5rem);
189
+ font-size: var(--b-text-title3);
190
+ font-weight: var(--b-weight-semibold);
191
+ letter-spacing: var(--b-tracking-tight);
192
+ white-space: nowrap;
193
+ opacity: 0.7;
194
+ transition: opacity var(--b-duration-fast);
195
+ }
196
+ .b-logo-wall__logo:hover { opacity: 1; }
197
+ .b-logo-wall__logo :is(svg, img) { height: 100%; width: auto; }
198
+ .b-logo-wall__logo img { filter: grayscale(1); }
199
+
85
200
  /* ---- Figures: a picture is furniture, so it has a shape ------------------ */
86
201
  .b-figure { margin: 0; }
87
202
  .b-figure__frame {
package/css/tokens.css CHANGED
@@ -6,7 +6,13 @@
6
6
  ========================================================================== */
7
7
 
8
8
  @layer tokens {
9
- :root {
9
+ /* The tokens are declared for the document and for any element that names a
10
+ theme. light-dark() resolves against the color-scheme of the element the
11
+ declaration sits on, so re-declaring them here is what lets a subtree be
12
+ light inside a dark page — a marketing page in a dark product, a preview
13
+ pane, a customer's site. Without it, data-theme on anything but the root
14
+ only changed color-scheme and the tokens stayed as the root resolved them. */
15
+ :root, [data-theme] {
10
16
  color-scheme: light dark;
11
17
 
12
18
  /* ------------------------------------------------------------------ *
package/dist/index.cjs CHANGED
@@ -27,6 +27,8 @@ __export(index_exports, {
27
27
  ActionSheet: () => ActionSheet,
28
28
  Alert: () => Alert,
29
29
  AlertDialog: () => AlertDialog,
30
+ Announce: () => Announce,
31
+ AnnounceGo: () => AnnounceGo,
30
32
  AppGrid: () => AppGrid,
31
33
  AppTile: () => AppTile,
32
34
  AreaChart: () => AreaChart,
@@ -187,6 +189,8 @@ __export(index_exports, {
187
189
  ListHeader: () => ListHeader,
188
190
  ListItem: () => ListItem,
189
191
  Log: () => Log,
192
+ LogoWall: () => LogoWall,
193
+ LogoWallLogo: () => LogoWallLogo,
190
194
  MarketingNav: () => MarketingNav,
191
195
  MarketingNavBrand: () => MarketingNavBrand,
192
196
  MarketingNavLinks: () => MarketingNavLinks,
@@ -225,6 +229,8 @@ __export(index_exports, {
225
229
  Rail: () => Rail,
226
230
  RailItem: () => RailItem,
227
231
  Range: () => Range,
232
+ Rating: () => Rating,
233
+ RatingStars: () => RatingStars,
228
234
  Resizable: () => Resizable,
229
235
  ResizeHandle: () => ResizeHandle,
230
236
  Result: () => Result,
@@ -288,6 +294,7 @@ __export(index_exports, {
288
294
  Textarea: () => Textarea,
289
295
  ThemeScript: () => ThemeScript,
290
296
  Thumb: () => Thumb,
297
+ TileField: () => TileField,
291
298
  Timeline: () => Timeline,
292
299
  Tip: () => Tip,
293
300
  ToastProvider: () => ToastProvider,
@@ -2287,6 +2294,13 @@ var PromoBand = (0, import_react16.forwardRef)(function PromoBand2({ title, body
2287
2294
  children
2288
2295
  ] });
2289
2296
  });
2297
+ var TileField = block("div", "b-tile-field", "TileField");
2298
+ var Announce = block("a", "b-announce", "Announce");
2299
+ var AnnounceGo = block("span", "b-announce__go", "AnnounceGo");
2300
+ var Rating = block("p", "b-rating", "Rating");
2301
+ var RatingStars = block("span", "b-rating__stars", "RatingStars");
2302
+ var LogoWall = block("div", "b-logo-wall", "LogoWall");
2303
+ var LogoWallLogo = block("span", "b-logo-wall__logo", "LogoWallLogo");
2290
2304
 
2291
2305
  // src/system.tsx
2292
2306
  var import_react17 = require("react");
@@ -2918,6 +2932,8 @@ function usePersistedState(key, initial) {
2918
2932
  ActionSheet,
2919
2933
  Alert,
2920
2934
  AlertDialog,
2935
+ Announce,
2936
+ AnnounceGo,
2921
2937
  AppGrid,
2922
2938
  AppTile,
2923
2939
  AreaChart,
@@ -3078,6 +3094,8 @@ function usePersistedState(key, initial) {
3078
3094
  ListHeader,
3079
3095
  ListItem,
3080
3096
  Log,
3097
+ LogoWall,
3098
+ LogoWallLogo,
3081
3099
  MarketingNav,
3082
3100
  MarketingNavBrand,
3083
3101
  MarketingNavLinks,
@@ -3116,6 +3134,8 @@ function usePersistedState(key, initial) {
3116
3134
  Rail,
3117
3135
  RailItem,
3118
3136
  Range,
3137
+ Rating,
3138
+ RatingStars,
3119
3139
  Resizable,
3120
3140
  ResizeHandle,
3121
3141
  Result,
@@ -3179,6 +3199,7 @@ function usePersistedState(key, initial) {
3179
3199
  Textarea,
3180
3200
  ThemeScript,
3181
3201
  Thumb,
3202
+ TileField,
3182
3203
  Timeline,
3183
3204
  Tip,
3184
3205
  ToastProvider,