@tanishqkancharla/maui 0.0.26 → 0.0.28

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/README.md CHANGED
@@ -55,7 +55,7 @@ Vite serves the gallery at [http://localhost:5173/](http://localhost:5173/).
55
55
  | `npm run build` | Static gallery → `website/` |
56
56
  | `npm run build:lib` | Compile package ESM + types → `dist/` (generated, not committed) |
57
57
  | `npm run typecheck` | One-shot TypeScript check |
58
- | `npm run verify-package` | Pack and inspect the real tarball |
58
+ | `npm run verify-package` | Pack-and-inspect publish smoke test of the real tarball (not a public-API check) |
59
59
  | `npm run serve` | Preview the gallery build |
60
60
 
61
61
  ## Package
@@ -141,9 +141,11 @@ const coloredButtonClass = memoize((variant, color) => {
141
141
  "&:disabled": disabledRaised,
142
142
  });
143
143
  }
144
+ // Quiet: color tints the label only. Rest is transparent; hover/press
145
+ // keep the existing wash (same idea as uncolored quiet).
144
146
  return style(buttonBaseClass, focusRing("&:focus-visible"), {
145
147
  color: fill,
146
- backgroundColor: surfaceWash(fill, surfaceMixPercent.hover, "transparent"),
148
+ backgroundColor: "transparent",
147
149
  boxShadow: "none",
148
150
  "&:hover:not(:disabled)": {
149
151
  color: darkerFill(fill),
@@ -172,9 +174,11 @@ const coloredButtonClass = memoize((variant, color) => {
172
174
  "&:disabled": disabledRaised,
173
175
  });
174
176
  }
177
+ // Quiet: color tints the label only. Rest is transparent; hover/press
178
+ // keep the existing wash (same idea as uncolored quiet).
175
179
  return style(buttonBaseClass, focusRing("&:focus-visible"), {
176
180
  color: scale[11],
177
- backgroundColor: surfaceWash(scale[9], surfaceMixPercent.hover, "transparent"),
181
+ backgroundColor: "transparent",
178
182
  boxShadow: "none",
179
183
  "&:hover:not(:disabled)": {
180
184
  color: scale[12],
@@ -1,4 +1,4 @@
1
- /** Foreground wash percents used by element hover/active and tinted quiet buttons. */
1
+ /** Foreground wash percents used by element hover/active and quiet-button hover. */
2
2
  export declare const surfaceMixPercent: {
3
3
  readonly hover: 3.5;
4
4
  readonly active: 7;
@@ -13,7 +13,7 @@ const elementSurface = defineVars({
13
13
  [DARK_THEME]: colors.gray[2],
14
14
  },
15
15
  });
16
- /** Foreground wash percents used by element hover/active and tinted quiet buttons. */
16
+ /** Foreground wash percents used by element hover/active and quiet-button hover. */
17
17
  export const surfaceMixPercent = {
18
18
  hover: 3.5,
19
19
  active: 7,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanishqkancharla/maui",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "Maui design system",
5
5
  "type": "module",
6
6
  "main": "./dist/maui.js",
@@ -9,6 +9,7 @@ Styled React Aria `Button` (default `type="button"`). Consumes `ButtonContext`,
9
9
  ```tsx
10
10
  <Button>Save</Button>
11
11
  <Button variant="quiet">Cancel</Button>
12
+ <Button variant="quiet" variantColor="accent">Quiet accent</Button>
12
13
  <Button variant="primary" variantColor="blue">Create</Button>
13
14
  <Button variant="primary" variantColor="#6366f1">Indigo</Button>
14
15
  <Button isDisabled>Wait</Button>
@@ -22,12 +23,12 @@ Styled React Aria `Button` (default `type="button"`). Consumes `ButtonContext`,
22
23
  | Prop | Notes |
23
24
  | --- | --- |
24
25
  | `variant` | `"default"` (raised element) \| `"quiet"` (no shadow, transparent) \| `"primary"` (solid fill) |
25
- | `variantColor` | Palette name or opaque `#hex` / `rgb(...)`. Primary default is `"accent"`. Quiet ignores color unless set |
26
+ | `variantColor` | Palette name or opaque `#hex` / `rgb(...)`. Primary default is `"accent"`. Quiet ignores color unless set; when set, tints the label with no fill |
26
27
  | `isDisabled` | React Aria name. Maps to native `disabled`. **No `disabled` React prop** |
27
28
  | `onClick` | Still supported. React Aria also exposes `onPress` |
28
29
  | `children` | Text is wrapped for cap-height trim; SVG icons sit beside text. Icon-only needs `aria-label` |
29
30
 
30
- Primary: fill step 9, hover 10, light text (`onAccent`, or step 12 on amber/lime/mint/sky/yellow). Custom CSS fill drops alpha; hover is `l - 0.04`; text is white or near-black from lightness. Edge is `tintedSubtle`. Quiet + color: 3.5% wash (hover 7%).
31
+ Primary: fill step 9, hover 10, light text (`onAccent`, or step 12 on amber/lime/mint/sky/yellow). Custom CSS fill drops alpha; hover is `l - 0.04`; text is white or near-black from lightness. Edge is `tintedSubtle`. Quiet + color: no fill; color tints the label/icon (hover 7% wash, same idea as uncolored quiet).
31
32
 
32
33
  While a menu or overlay is open, the trigger keeps the active fill via RAC `data-pressed` / `aria-expanded` (same tokens as `:active`: `elementActive`, or primary step 10).
33
34
 
@@ -237,7 +237,7 @@ export const catalog: CatalogComponent[] = [
237
237
  { name: "variant", values: ["default", "quiet", "primary"] },
238
238
  {
239
239
  name: "variantColor",
240
- info: "Palette name (colors[name], primary step 9) or an opaque hex / rgb() fill. Quiet uses a 3.5% wash.",
240
+ info: "Palette name (colors[name], primary step 9) or an opaque hex / rgb() fill. Quiet stays transparent; color tints the label.",
241
241
  values: [...colorNames],
242
242
  cssColor: true,
243
243
  },
@@ -181,13 +181,11 @@ const coloredButtonClass = memoize(
181
181
  })
182
182
  }
183
183
 
184
+ // Quiet: color tints the label only. Rest is transparent; hover/press
185
+ // keep the existing wash (same idea as uncolored quiet).
184
186
  return style(buttonBaseClass, focusRing("&:focus-visible"), {
185
187
  color: fill,
186
- backgroundColor: surfaceWash(
187
- fill,
188
- surfaceMixPercent.hover,
189
- "transparent",
190
- ),
188
+ backgroundColor: "transparent",
191
189
  boxShadow: "none",
192
190
  "&:hover:not(:disabled)": {
193
191
  color: darkerFill(fill),
@@ -226,13 +224,11 @@ const coloredButtonClass = memoize(
226
224
  })
227
225
  }
228
226
 
227
+ // Quiet: color tints the label only. Rest is transparent; hover/press
228
+ // keep the existing wash (same idea as uncolored quiet).
229
229
  return style(buttonBaseClass, focusRing("&:focus-visible"), {
230
230
  color: scale[11],
231
- backgroundColor: surfaceWash(
232
- scale[9],
233
- surfaceMixPercent.hover,
234
- "transparent",
235
- ),
231
+ backgroundColor: "transparent",
236
232
  boxShadow: "none",
237
233
  "&:hover:not(:disabled)": {
238
234
  color: scale[12],
@@ -59,8 +59,7 @@ export function ButtonsPage() {
59
59
  <code>variantColor</code> (a palette name, default{" "}
60
60
  <code>"accent"</code>). Pass a hex or <code>rgb()</code> string
61
61
  to use that color as the fill (alpha is dropped). The edge is{" "}
62
- <code>shadow.subtle</code> tinted with that fill. Quiet uses the
63
- same color at the 3.5% surface-wash mix.
62
+ <code>shadow.subtle</code> tinted with that fill.
64
63
  </P>
65
64
  <Flex row alignItems="center" gap={4} style={{ flexWrap: "wrap" }}>
66
65
  <Button variant="primary">Save</Button>
@@ -77,12 +76,6 @@ export function ButtonsPage() {
77
76
  <Button variant="primary" variantColor="orange">
78
77
  Orange
79
78
  </Button>
80
- <Button variant="quiet" variantColor="accent">
81
- Quiet accent
82
- </Button>
83
- <Button variant="quiet" variantColor="blue">
84
- Quiet blue
85
- </Button>
86
79
  </Flex>
87
80
  <Flex
88
81
  row
@@ -99,9 +92,6 @@ export function ButtonsPage() {
99
92
  <Button variant="primary" variantColor="rgb(219, 68, 55)">
100
93
  rgb(219, 68, 55)
101
94
  </Button>
102
- <Button variant="quiet" variantColor="#6366f1">
103
- Quiet #6366f1
104
- </Button>
105
95
  </Flex>
106
96
  <Flex
107
97
  row
@@ -117,7 +107,12 @@ export function ButtonsPage() {
117
107
  </Flex>
118
108
 
119
109
  <H3>Quiet</H3>
120
- <Flex row alignItems="center" gap={4}>
110
+ <P>
111
+ <code>variant="quiet"</code> has no fill, with or without{" "}
112
+ <code>variantColor</code>. Color tints the label and icon; hover
113
+ and press use a wash, same as uncolored quiet.
114
+ </P>
115
+ <Flex row alignItems="center" gap={4} style={{ flexWrap: "wrap" }}>
121
116
  <Button variant="quiet">Button</Button>
122
117
  <Button variant="quiet">
123
118
  <Icons.Plus />
@@ -126,6 +121,15 @@ export function ButtonsPage() {
126
121
  <Button variant="quiet" aria-label="More actions">
127
122
  <Icons.DotsHorizontal />
128
123
  </Button>
124
+ <Button variant="quiet" variantColor="accent">
125
+ Quiet accent
126
+ </Button>
127
+ <Button variant="quiet" variantColor="blue">
128
+ Quiet blue
129
+ </Button>
130
+ <Button variant="quiet" variantColor="#6366f1">
131
+ Quiet #6366f1
132
+ </Button>
129
133
  </Flex>
130
134
 
131
135
  <H3>Icons with text</H3>
@@ -16,7 +16,7 @@ const elementSurface = defineVars({
16
16
  },
17
17
  })
18
18
 
19
- /** Foreground wash percents used by element hover/active and tinted quiet buttons. */
19
+ /** Foreground wash percents used by element hover/active and quiet-button hover. */
20
20
  export const surfaceMixPercent = {
21
21
  hover: 3.5,
22
22
  active: 7,