mac-human-design 0.1.11 → 0.1.12
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 +15 -0
- package/package.json +1 -1
- package/src/components/SymbolIconButton.tsx +27 -27
- package/src/styles/macosBaseUi.css +5 -0
package/changelog.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
This file tracks changes between published npm versions of `mac-human-design`.
|
|
4
4
|
|
|
5
|
+
## 0.1.12
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Rendered `SymbolIconButton` glyphs as direct children of the shared
|
|
10
|
+
`MacIconButton` render element, avoiding tooltip slot child placement
|
|
11
|
+
ambiguity.
|
|
12
|
+
- Tightened icon-button centering with explicit grid content centering,
|
|
13
|
+
zero line-height, vertical alignment, and grid-area placement for symbol
|
|
14
|
+
glyphs.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Bumped the package to `0.1.12`.
|
|
19
|
+
|
|
5
20
|
## 0.1.11
|
|
6
21
|
|
|
7
22
|
### Fixed
|
package/package.json
CHANGED
|
@@ -47,34 +47,34 @@ export function SymbolIconButton({
|
|
|
47
47
|
minHeight: ICON_BUTTON_SIZE,
|
|
48
48
|
borderRadius: ICON_BUTTON_RADIUS,
|
|
49
49
|
}}
|
|
50
|
-
|
|
50
|
+
>
|
|
51
|
+
<span
|
|
52
|
+
aria-hidden
|
|
53
|
+
className="hd-mac-symbol-icon"
|
|
54
|
+
style={{
|
|
55
|
+
width: glyphPx,
|
|
56
|
+
height: glyphPx,
|
|
57
|
+
color: "currentColor",
|
|
58
|
+
backgroundColor: symbolDataUrl ? "currentColor" : "transparent",
|
|
59
|
+
fontFamily: "-apple-system, BlinkMacSystemFont, sans-serif",
|
|
60
|
+
fontSize: symbolDataUrl ? "0" : glyphPx,
|
|
61
|
+
fontWeight: 500,
|
|
62
|
+
lineHeight: "1",
|
|
63
|
+
WebkitMaskImage: symbolDataUrl ? `url("${symbolDataUrl}")` : undefined,
|
|
64
|
+
WebkitMaskPosition: symbolDataUrl ? "center" : undefined,
|
|
65
|
+
WebkitMaskRepeat: symbolDataUrl ? "no-repeat" : undefined,
|
|
66
|
+
WebkitMaskSize: symbolDataUrl ? "contain" : undefined,
|
|
67
|
+
maskImage: symbolDataUrl ? `url("${symbolDataUrl}")` : undefined,
|
|
68
|
+
maskPosition: symbolDataUrl ? "center" : undefined,
|
|
69
|
+
maskRepeat: symbolDataUrl ? "no-repeat" : undefined,
|
|
70
|
+
maskSize: symbolDataUrl ? "contain" : undefined,
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
{symbolDataUrl ? null : fallback}
|
|
74
|
+
</span>
|
|
75
|
+
</MacIconButton>
|
|
51
76
|
}
|
|
52
|
-
|
|
53
|
-
<span
|
|
54
|
-
aria-hidden
|
|
55
|
-
className="hd-mac-symbol-icon"
|
|
56
|
-
style={{
|
|
57
|
-
width: glyphPx,
|
|
58
|
-
height: glyphPx,
|
|
59
|
-
color: "currentColor",
|
|
60
|
-
backgroundColor: symbolDataUrl ? "currentColor" : "transparent",
|
|
61
|
-
fontFamily: "-apple-system, BlinkMacSystemFont, sans-serif",
|
|
62
|
-
fontSize: symbolDataUrl ? "0" : glyphPx,
|
|
63
|
-
fontWeight: 500,
|
|
64
|
-
lineHeight: "1",
|
|
65
|
-
WebkitMaskImage: symbolDataUrl ? `url("${symbolDataUrl}")` : undefined,
|
|
66
|
-
WebkitMaskPosition: symbolDataUrl ? "center" : undefined,
|
|
67
|
-
WebkitMaskRepeat: symbolDataUrl ? "no-repeat" : undefined,
|
|
68
|
-
WebkitMaskSize: symbolDataUrl ? "contain" : undefined,
|
|
69
|
-
maskImage: symbolDataUrl ? `url("${symbolDataUrl}")` : undefined,
|
|
70
|
-
maskPosition: symbolDataUrl ? "center" : undefined,
|
|
71
|
-
maskRepeat: symbolDataUrl ? "no-repeat" : undefined,
|
|
72
|
-
maskSize: symbolDataUrl ? "contain" : undefined,
|
|
73
|
-
}}
|
|
74
|
-
>
|
|
75
|
-
{symbolDataUrl ? null : fallback}
|
|
76
|
-
</span>
|
|
77
|
-
</MacTooltip.Trigger>
|
|
77
|
+
/>
|
|
78
78
|
<MacTooltip.Portal>
|
|
79
79
|
<MacTooltip.Positioner sideOffset={5}>
|
|
80
80
|
<MacTooltip.Popup>{label}</MacTooltip.Popup>
|
|
@@ -232,7 +232,10 @@
|
|
|
232
232
|
.hd-mac-symbol-icon-button {
|
|
233
233
|
display: inline-grid;
|
|
234
234
|
place-items: center;
|
|
235
|
+
place-content: center;
|
|
235
236
|
padding: 0;
|
|
237
|
+
line-height: 0;
|
|
238
|
+
vertical-align: middle;
|
|
236
239
|
}
|
|
237
240
|
|
|
238
241
|
.hd-mac-icon-button {
|
|
@@ -251,11 +254,13 @@
|
|
|
251
254
|
}
|
|
252
255
|
|
|
253
256
|
.hd-mac-symbol-icon {
|
|
257
|
+
grid-area: 1 / 1;
|
|
254
258
|
display: inline-flex;
|
|
255
259
|
align-items: center;
|
|
256
260
|
justify-content: center;
|
|
257
261
|
text-align: center;
|
|
258
262
|
flex-shrink: 0;
|
|
263
|
+
margin: auto;
|
|
259
264
|
}
|
|
260
265
|
|
|
261
266
|
.hd-mac-help-button {
|