mac-human-design 0.1.12 → 0.1.13

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,16 @@
2
2
 
3
3
  This file tracks changes between published npm versions of `mac-human-design`.
4
4
 
5
+ ## 0.1.13
6
+
7
+ ### Changed
8
+
9
+ - Refined shared control Motion defaults so buttons and icon buttons scale from
10
+ center without vertical hover or press translation.
11
+ - Added explicit center transform origins to macOS icon buttons and symbol
12
+ glyphs to keep animated icon-only controls visually anchored.
13
+ - Bumped the package to `0.1.13`.
14
+
5
15
  ## 0.1.12
6
16
 
7
17
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mac-human-design",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
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",
@@ -111,14 +111,22 @@ function isDisabled(props: Record<string, unknown>) {
111
111
  return Boolean(props.disabled || props["data-disabled"] || props["aria-disabled"]);
112
112
  }
113
113
 
114
- function interactiveControlDefaults(props: Record<string, unknown>): MotionDefaults {
114
+ function interactiveControlDefaults(macClassName: string, props: Record<string, unknown>): MotionDefaults {
115
115
  if (isDisabled(props)) {
116
116
  return {};
117
117
  }
118
118
 
119
+ if (includesAny(macClassName, ["hd-mac-icon-button", "hd-mac-help-button"])) {
120
+ return {
121
+ whileHover: { scale: 1.04 },
122
+ whileTap: { scale: 0.94 },
123
+ transition: macFastTransition,
124
+ };
125
+ }
126
+
119
127
  return {
120
- whileHover: { y: -0.5, scale: 1.012 },
121
- whileTap: { y: 1, scale: 0.985 },
128
+ whileHover: { scale: 1.006 },
129
+ whileTap: { scale: 0.982 },
122
130
  transition: macFastTransition,
123
131
  };
124
132
  }
@@ -147,7 +155,7 @@ function getMotionDefaults(macClassName: string, props: Record<string, unknown>)
147
155
  "hd-mac-disclosure-trigger",
148
156
  ])
149
157
  ) {
150
- return interactiveControlDefaults(props);
158
+ return interactiveControlDefaults(macClassName, props);
151
159
  }
152
160
 
153
161
  if (macClassName.includes("hd-mac-input")) {
@@ -235,6 +235,7 @@
235
235
  place-content: center;
236
236
  padding: 0;
237
237
  line-height: 0;
238
+ transform-origin: center;
238
239
  vertical-align: middle;
239
240
  }
240
241
 
@@ -261,6 +262,7 @@
261
262
  text-align: center;
262
263
  flex-shrink: 0;
263
264
  margin: auto;
265
+ transform-origin: center;
264
266
  }
265
267
 
266
268
  .hd-mac-help-button {