mac-human-design 0.1.29 → 0.1.30-preview.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.
package/changelog.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
This file tracks changes between published npm versions of `mac-human-design`.
|
|
4
4
|
|
|
5
|
+
## 0.1.30-preview.0
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added a centered `SymbolIconButton` state layer for hover, focus, active, and
|
|
10
|
+
loading feedback that sits under the glyph and spinner without changing
|
|
11
|
+
button geometry.
|
|
12
|
+
- Added an emphasis motion token for slightly richer shared control feedback.
|
|
13
|
+
- Added verifier coverage for the icon button state layer, glyph stacking, and
|
|
14
|
+
emphasis motion token.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Improved icon-only button interaction feedback so highlighted toolbar buttons
|
|
19
|
+
feel more deliberate while keeping SF Symbols optically centered.
|
|
20
|
+
- Bumped the package to `0.1.30-preview.0` and publish it under the `preview`
|
|
21
|
+
dist-tag while this UI/UX iteration is still being verified.
|
|
22
|
+
|
|
5
23
|
## 0.1.29
|
|
6
24
|
|
|
7
25
|
### Added
|
|
@@ -101,9 +101,10 @@ be reimplemented in consuming apps:
|
|
|
101
101
|
Icon-only buttons use fixed-size grid containers with zero padding, zero
|
|
102
102
|
line-height, centered grid content, middle inline alignment, and center transform
|
|
103
103
|
origins. `SymbolIconButton` keeps the SF Symbol and loading spinner in the same
|
|
104
|
-
grid cell,
|
|
105
|
-
the
|
|
106
|
-
|
|
104
|
+
grid cell, renders hover/focus/loading feedback as a centered state layer under
|
|
105
|
+
the glyph, centers generated symbol masks, trims transparent symbol padding in
|
|
106
|
+
the native symbol service, applies per-symbol optical offsets for asymmetric SF
|
|
107
|
+
Symbols, and avoids vertical Motion offsets for icon-only controls.
|
|
107
108
|
|
|
108
109
|
The gallery at `examples/macos-base-ui-gallery` renders these wrappers across
|
|
109
110
|
normal, selected, disabled, mixed, popup, dialog, and narrow-width states.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mac-human-design",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30-preview.0",
|
|
4
4
|
"description": "Reusable macOS-oriented UI primitives and SF Symbols bridge for Tauri apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"check": "npm run typecheck && npm run verify:base-ui && npm run verify:design && npm run verify:gallery",
|
|
40
40
|
"dev:gallery": "vite --host 127.0.0.1 examples/macos-base-ui-gallery",
|
|
41
41
|
"publish": "npm publish --access public --ignore-scripts",
|
|
42
|
+
"publish:preview": "npm publish --access public --ignore-scripts --tag preview",
|
|
42
43
|
"typecheck": "tsc --noEmit",
|
|
43
44
|
"verify:base-ui": "node scripts/verify-base-ui-coverage.mjs",
|
|
44
45
|
"verify:design": "node scripts/verify-macos-design.mjs",
|
|
@@ -86,6 +86,7 @@ const requiredStyleFeatures = [
|
|
|
86
86
|
["reduced motion support", /@media\s*\(prefers-reduced-motion:\s*reduce\)/],
|
|
87
87
|
["keyboard focus-visible support", /:focus-visible/],
|
|
88
88
|
["macOS blue accent token", /--hd-mac-blue:\s*#0a84ff/i],
|
|
89
|
+
["emphasis motion token", /--hd-mac-motion-emphasis:\s*220ms\s+cubic-bezier\(0\.16,\s*1,\s*0\.3,\s*1\)/],
|
|
89
90
|
];
|
|
90
91
|
|
|
91
92
|
const missingFeatures = requiredStyleFeatures
|
|
@@ -146,6 +147,25 @@ requireCssDeclarations(".hd-mac-symbol-icon-button", [
|
|
|
146
147
|
["fixed 30px height", /height\s*:\s*30px\s*;/],
|
|
147
148
|
["fixed 30px min-width", /min-width\s*:\s*30px\s*;/],
|
|
148
149
|
["fixed 30px min-height", /min-height\s*:\s*30px\s*;/],
|
|
150
|
+
["stable state layer positioning", /position\s*:\s*relative\s*;/],
|
|
151
|
+
["state layer isolation", /isolation\s*:\s*isolate\s*;/],
|
|
152
|
+
["state layer clipping", /overflow\s*:\s*hidden\s*;/],
|
|
153
|
+
]);
|
|
154
|
+
|
|
155
|
+
requireCssDeclarations(".hd-mac-symbol-icon-button::before", [
|
|
156
|
+
["state layer content", /content\s*:\s*""\s*;/],
|
|
157
|
+
["state layer behind glyph", /z-index\s*:\s*0\s*;/],
|
|
158
|
+
["state layer full width", /width\s*:\s*100%\s*;/],
|
|
159
|
+
["state layer full height", /height\s*:\s*100%\s*;/],
|
|
160
|
+
["state layer hidden by default", /opacity\s*:\s*0\s*;/],
|
|
161
|
+
["state layer scale starts centered", /transform\s*:\s*scale\(0\.82\)\s*;/],
|
|
162
|
+
["state layer opacity transition", /opacity\s+var\(--hd-mac-motion-standard\)/],
|
|
163
|
+
["state layer emphasis transition", /transform\s+var\(--hd-mac-motion-emphasis\)/],
|
|
164
|
+
]);
|
|
165
|
+
|
|
166
|
+
requireCssDeclarations(".hd-mac-symbol-icon-button:hover::before", [
|
|
167
|
+
["hover state layer visible", /opacity\s*:\s*1\s*;/],
|
|
168
|
+
["hover state layer full scale", /transform\s*:\s*scale\(1\)\s*;/],
|
|
149
169
|
]);
|
|
150
170
|
|
|
151
171
|
requireCssDeclarations(".hd-mac-symbol-icon-button::after", [
|
|
@@ -154,6 +174,7 @@ requireCssDeclarations(".hd-mac-symbol-icon-button::after", [
|
|
|
154
174
|
|
|
155
175
|
requireCssDeclarations(".hd-mac-symbol-icon", [
|
|
156
176
|
["single grid cell placement", /grid-area\s*:\s*1\s*\/\s*1\s*;/],
|
|
177
|
+
["glyph above state layer", /z-index\s*:\s*1\s*;/],
|
|
157
178
|
["flex centering display", /display\s*:\s*inline-flex\s*;/],
|
|
158
179
|
["vertical glyph centering", /align-items\s*:\s*center\s*;/],
|
|
159
180
|
["horizontal glyph centering", /justify-content\s*:\s*center\s*;/],
|
|
@@ -163,6 +184,7 @@ requireCssDeclarations(".hd-mac-symbol-icon", [
|
|
|
163
184
|
"symbol optical centering translate",
|
|
164
185
|
/translate\s*:\s*var\(--hd-mac-symbol-offset-x,\s*0px\)\s*var\(--hd-mac-symbol-offset-y,\s*0px\)\s*;/,
|
|
165
186
|
],
|
|
187
|
+
["symbol opacity transition", /opacity\s+var\(--hd-mac-motion-standard\)/],
|
|
166
188
|
]);
|
|
167
189
|
|
|
168
190
|
const sharedIconButtonRule = stylesSource.match(
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
--hd-mac-motion-standard: 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
29
29
|
--hd-mac-motion-surface: 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
30
30
|
--hd-mac-motion-row: 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
31
|
+
--hd-mac-motion-emphasis: 220ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
@media (prefers-color-scheme: dark) {
|
|
@@ -76,6 +77,7 @@
|
|
|
76
77
|
.hd-mac-avatar,
|
|
77
78
|
.hd-mac-scroll-thumb,
|
|
78
79
|
.hd-mac-status-message,
|
|
80
|
+
.hd-mac-symbol-icon-button::before,
|
|
79
81
|
.hd-mac-symbol-icon-button[data-loading]::after,
|
|
80
82
|
.hd-mac-window-toolbar,
|
|
81
83
|
.hd-mac-data-table,
|
|
@@ -282,13 +284,41 @@
|
|
|
282
284
|
height: 30px;
|
|
283
285
|
min-height: 30px;
|
|
284
286
|
border-radius: 7px;
|
|
287
|
+
position: relative;
|
|
288
|
+
isolation: isolate;
|
|
289
|
+
overflow: hidden;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.hd-mac-symbol-icon-button::before,
|
|
293
|
+
.hd-mac-symbol-icon-button::after {
|
|
294
|
+
grid-area: 1 / 1;
|
|
295
|
+
pointer-events: none;
|
|
285
296
|
}
|
|
286
297
|
|
|
287
298
|
.hd-mac-symbol-icon-button::after {
|
|
288
299
|
grid-area: 1 / 1;
|
|
289
300
|
}
|
|
290
301
|
|
|
302
|
+
.hd-mac-symbol-icon-button::before {
|
|
303
|
+
content: "";
|
|
304
|
+
z-index: 0;
|
|
305
|
+
width: 100%;
|
|
306
|
+
height: 100%;
|
|
307
|
+
border-radius: inherit;
|
|
308
|
+
background:
|
|
309
|
+
radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.28), transparent 54%),
|
|
310
|
+
var(--hd-mac-fill-hover);
|
|
311
|
+
opacity: 0;
|
|
312
|
+
transform: scale(0.82);
|
|
313
|
+
transition:
|
|
314
|
+
opacity var(--hd-mac-motion-standard),
|
|
315
|
+
transform var(--hd-mac-motion-emphasis),
|
|
316
|
+
background-color var(--hd-mac-motion-standard);
|
|
317
|
+
}
|
|
318
|
+
|
|
291
319
|
.hd-mac-symbol-icon {
|
|
320
|
+
position: relative;
|
|
321
|
+
z-index: 1;
|
|
292
322
|
grid-area: 1 / 1;
|
|
293
323
|
display: inline-flex;
|
|
294
324
|
align-items: center;
|
|
@@ -298,6 +328,9 @@
|
|
|
298
328
|
margin: auto;
|
|
299
329
|
transform-origin: center;
|
|
300
330
|
translate: var(--hd-mac-symbol-offset-x, 0px) var(--hd-mac-symbol-offset-y, 0px);
|
|
331
|
+
transition:
|
|
332
|
+
opacity var(--hd-mac-motion-standard),
|
|
333
|
+
color var(--hd-mac-motion-standard);
|
|
301
334
|
}
|
|
302
335
|
|
|
303
336
|
.hd-mac-symbol-icon-mask {
|
|
@@ -325,6 +358,29 @@
|
|
|
325
358
|
font: 700 12px/18px var(--hd-mac-font);
|
|
326
359
|
}
|
|
327
360
|
|
|
361
|
+
.hd-mac-symbol-icon-button:hover::before {
|
|
362
|
+
opacity: 1;
|
|
363
|
+
transform: scale(1);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.hd-mac-symbol-icon-button:focus-visible::before {
|
|
367
|
+
opacity: 1;
|
|
368
|
+
transform: scale(1);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.hd-mac-symbol-icon-button:active::before,
|
|
372
|
+
.hd-mac-symbol-icon-button[data-loading]::before {
|
|
373
|
+
opacity: 1;
|
|
374
|
+
transform: scale(0.92);
|
|
375
|
+
background:
|
|
376
|
+
radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.18), transparent 54%),
|
|
377
|
+
var(--hd-mac-fill-pressed);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.hd-mac-symbol-icon-button[disabled]::before {
|
|
381
|
+
opacity: 0;
|
|
382
|
+
}
|
|
383
|
+
|
|
328
384
|
.hd-mac-button[disabled],
|
|
329
385
|
.hd-mac-select-trigger[disabled],
|
|
330
386
|
.hd-mac-toggle[disabled],
|
|
@@ -980,6 +1036,7 @@
|
|
|
980
1036
|
|
|
981
1037
|
.hd-mac-symbol-icon-button[data-loading]::after {
|
|
982
1038
|
content: "";
|
|
1039
|
+
z-index: 2;
|
|
983
1040
|
width: 15px;
|
|
984
1041
|
height: 15px;
|
|
985
1042
|
border: 1.5px solid color-mix(in srgb, currentColor 28%, transparent);
|