mac-human-design 0.1.16 → 0.1.17
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 +13 -0
- package/package.json +1 -1
- package/src/components/MacBaseUI.tsx +23 -0
- package/src/styles/macosBaseUi.css +113 -2
package/changelog.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
This file tracks changes between published npm versions of `mac-human-design`.
|
|
4
4
|
|
|
5
|
+
## 0.1.17
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Added center-origin Motion feedback for checkbox, radio, switch, slider thumb,
|
|
10
|
+
and tab indicator primitives so selection controls feel responsive without
|
|
11
|
+
shifting layout.
|
|
12
|
+
- Added CSS transition polish for menu rows, tabs, toggles, switches, sliders,
|
|
13
|
+
progress indicators, and selected states.
|
|
14
|
+
- Preserved icon-only button centering by keeping all new feedback scale-based
|
|
15
|
+
and non-positional.
|
|
16
|
+
- Bumped the package to `0.1.17`.
|
|
17
|
+
|
|
5
18
|
## 0.1.16
|
|
6
19
|
|
|
7
20
|
### Changed
|
package/package.json
CHANGED
|
@@ -165,6 +165,21 @@ function getMotionDefaults(macClassName: string, props: Record<string, unknown>)
|
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
+
if (includesAny(macClassName, ["hd-mac-checkbox", "hd-mac-radio"])) {
|
|
169
|
+
return {
|
|
170
|
+
whileHover: { scale: 1.03 },
|
|
171
|
+
whileTap: { scale: 0.92 },
|
|
172
|
+
transition: macFastTransition,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (macClassName.includes("hd-mac-switch")) {
|
|
177
|
+
return {
|
|
178
|
+
whileTap: { scale: 0.985 },
|
|
179
|
+
transition: macFastTransition,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
168
183
|
if (includesAny(macClassName, ["hd-mac-checkbox-indicator", "hd-mac-radio-indicator"])) {
|
|
169
184
|
return fadeScaleDefaults({ opacity: 0, scale: 0.72 }, { opacity: 1, scale: 1 });
|
|
170
185
|
}
|
|
@@ -172,6 +187,7 @@ function getMotionDefaults(macClassName: string, props: Record<string, unknown>)
|
|
|
172
187
|
if (macClassName.includes("hd-mac-switch-thumb") || macClassName.includes("hd-mac-slider-thumb")) {
|
|
173
188
|
return {
|
|
174
189
|
layout: true,
|
|
190
|
+
whileHover: { scale: 1.04 },
|
|
175
191
|
whileTap: { scale: 0.92 },
|
|
176
192
|
transition: macDefaultTransition,
|
|
177
193
|
};
|
|
@@ -234,6 +250,13 @@ function getMotionDefaults(macClassName: string, props: Record<string, unknown>)
|
|
|
234
250
|
return fadeScaleDefaults({ opacity: 0, scale: 0.76 }, { opacity: 1, scale: 1 }, macFastTransition);
|
|
235
251
|
}
|
|
236
252
|
|
|
253
|
+
if (macClassName.includes("hd-mac-tab-indicator")) {
|
|
254
|
+
return {
|
|
255
|
+
layout: true,
|
|
256
|
+
transition: macDefaultTransition,
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
|
|
237
260
|
if (includesAny(macClassName, ["hd-mac-avatar", "hd-mac-avatar-image", "hd-mac-avatar-fallback"])) {
|
|
238
261
|
return fadeScaleDefaults({ opacity: 0, scale: 0.92 });
|
|
239
262
|
}
|
|
@@ -66,6 +66,10 @@
|
|
|
66
66
|
.hd-mac-switch,
|
|
67
67
|
.hd-mac-switch-thumb,
|
|
68
68
|
.hd-mac-slider-thumb,
|
|
69
|
+
.hd-mac-checkbox,
|
|
70
|
+
.hd-mac-radio,
|
|
71
|
+
.hd-mac-tab,
|
|
72
|
+
.hd-mac-menu-item,
|
|
69
73
|
.hd-mac-window-toolbar,
|
|
70
74
|
.hd-mac-data-table,
|
|
71
75
|
.hd-mac-data-table-row {
|
|
@@ -585,6 +589,10 @@
|
|
|
585
589
|
font: 400 13px/18px var(--hd-mac-font);
|
|
586
590
|
text-decoration: none;
|
|
587
591
|
user-select: none;
|
|
592
|
+
transition:
|
|
593
|
+
background-color var(--hd-mac-motion-fast),
|
|
594
|
+
color var(--hd-mac-motion-fast),
|
|
595
|
+
filter var(--hd-mac-motion-fast);
|
|
588
596
|
}
|
|
589
597
|
|
|
590
598
|
.hd-mac-menu-item[data-highlighted],
|
|
@@ -595,6 +603,11 @@
|
|
|
595
603
|
color: #fff;
|
|
596
604
|
}
|
|
597
605
|
|
|
606
|
+
.hd-mac-menu-item:active,
|
|
607
|
+
.hd-mac-navigation-link:active {
|
|
608
|
+
filter: brightness(0.96);
|
|
609
|
+
}
|
|
610
|
+
|
|
598
611
|
.hd-mac-menu-item-indicator {
|
|
599
612
|
width: 14px;
|
|
600
613
|
display: inline-flex;
|
|
@@ -720,6 +733,23 @@
|
|
|
720
733
|
background: var(--hd-mac-raised);
|
|
721
734
|
box-shadow: var(--hd-mac-control-shadow);
|
|
722
735
|
color: #fff;
|
|
736
|
+
transform-origin: center;
|
|
737
|
+
transition:
|
|
738
|
+
background-color var(--hd-mac-motion-standard),
|
|
739
|
+
border-color var(--hd-mac-motion-standard),
|
|
740
|
+
box-shadow var(--hd-mac-motion-standard),
|
|
741
|
+
filter var(--hd-mac-motion-fast),
|
|
742
|
+
transform var(--hd-mac-motion-fast);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
.hd-mac-checkbox:hover,
|
|
746
|
+
.hd-mac-radio:hover {
|
|
747
|
+
filter: brightness(1.04);
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.hd-mac-checkbox:active,
|
|
751
|
+
.hd-mac-radio:active {
|
|
752
|
+
filter: brightness(0.98);
|
|
723
753
|
}
|
|
724
754
|
|
|
725
755
|
.hd-mac-checkbox {
|
|
@@ -735,11 +765,15 @@
|
|
|
735
765
|
.hd-mac-radio[data-checked] {
|
|
736
766
|
border-color: transparent;
|
|
737
767
|
background: var(--hd-mac-blue);
|
|
768
|
+
box-shadow:
|
|
769
|
+
0 1px 0 rgba(255, 255, 255, 0.22) inset,
|
|
770
|
+
0 1px 2px rgba(10, 132, 255, 0.32);
|
|
738
771
|
}
|
|
739
772
|
|
|
740
773
|
.hd-mac-checkbox-indicator,
|
|
741
774
|
.hd-mac-radio-indicator {
|
|
742
775
|
color: currentColor;
|
|
776
|
+
transform-origin: center;
|
|
743
777
|
}
|
|
744
778
|
|
|
745
779
|
.hd-mac-checkbox-indicator::before {
|
|
@@ -772,11 +806,28 @@
|
|
|
772
806
|
border-radius: 999px;
|
|
773
807
|
padding: 2px;
|
|
774
808
|
background: var(--hd-mac-fill-pressed);
|
|
775
|
-
|
|
809
|
+
box-shadow:
|
|
810
|
+
0 1px 1px rgba(0, 0, 0, 0.08) inset,
|
|
811
|
+
0 1px 0 rgba(255, 255, 255, 0.32);
|
|
812
|
+
transform-origin: center;
|
|
813
|
+
transition:
|
|
814
|
+
background-color var(--hd-mac-motion-standard),
|
|
815
|
+
border-color var(--hd-mac-motion-standard),
|
|
816
|
+
box-shadow var(--hd-mac-motion-standard),
|
|
817
|
+
filter var(--hd-mac-motion-fast),
|
|
818
|
+
transform var(--hd-mac-motion-fast);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.hd-mac-switch:hover {
|
|
822
|
+
filter: brightness(1.035);
|
|
776
823
|
}
|
|
777
824
|
|
|
778
825
|
.hd-mac-switch[data-checked] {
|
|
779
826
|
background: var(--hd-mac-green);
|
|
827
|
+
border-color: color-mix(in srgb, var(--hd-mac-green) 74%, transparent);
|
|
828
|
+
box-shadow:
|
|
829
|
+
0 1px 0 rgba(255, 255, 255, 0.26) inset,
|
|
830
|
+
0 1px 2px rgba(48, 209, 88, 0.28);
|
|
780
831
|
}
|
|
781
832
|
|
|
782
833
|
.hd-mac-switch-thumb {
|
|
@@ -785,13 +836,24 @@
|
|
|
785
836
|
border-radius: 999px;
|
|
786
837
|
background: #fff;
|
|
787
838
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.32);
|
|
788
|
-
|
|
839
|
+
transform-origin: center;
|
|
840
|
+
transition:
|
|
841
|
+
transform var(--hd-mac-motion-surface),
|
|
842
|
+
box-shadow var(--hd-mac-motion-standard);
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
.hd-mac-switch:active .hd-mac-switch-thumb {
|
|
846
|
+
transform: scale(0.94);
|
|
789
847
|
}
|
|
790
848
|
|
|
791
849
|
.hd-mac-switch[data-checked] .hd-mac-switch-thumb {
|
|
792
850
|
transform: translateX(16px);
|
|
793
851
|
}
|
|
794
852
|
|
|
853
|
+
.hd-mac-switch[data-checked]:active .hd-mac-switch-thumb {
|
|
854
|
+
transform: translateX(16px) scale(0.94);
|
|
855
|
+
}
|
|
856
|
+
|
|
795
857
|
.hd-mac-toggle-group {
|
|
796
858
|
display: inline-flex;
|
|
797
859
|
align-items: center;
|
|
@@ -839,6 +901,13 @@
|
|
|
839
901
|
background: transparent;
|
|
840
902
|
box-shadow: none;
|
|
841
903
|
padding: 2px 10px;
|
|
904
|
+
transition:
|
|
905
|
+
background-color var(--hd-mac-motion-standard),
|
|
906
|
+
border-color var(--hd-mac-motion-standard),
|
|
907
|
+
box-shadow var(--hd-mac-motion-standard),
|
|
908
|
+
color var(--hd-mac-motion-standard),
|
|
909
|
+
filter var(--hd-mac-motion-fast),
|
|
910
|
+
transform var(--hd-mac-motion-fast);
|
|
842
911
|
}
|
|
843
912
|
|
|
844
913
|
.hd-mac-symbol-icon-button[data-loading] {
|
|
@@ -896,6 +965,22 @@
|
|
|
896
965
|
background: transparent;
|
|
897
966
|
color: var(--hd-mac-secondary-text);
|
|
898
967
|
font: 590 12px/16px var(--hd-mac-font);
|
|
968
|
+
transform-origin: center;
|
|
969
|
+
transition:
|
|
970
|
+
background-color var(--hd-mac-motion-standard),
|
|
971
|
+
box-shadow var(--hd-mac-motion-standard),
|
|
972
|
+
color var(--hd-mac-motion-standard),
|
|
973
|
+
filter var(--hd-mac-motion-fast),
|
|
974
|
+
transform var(--hd-mac-motion-fast);
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
.hd-mac-tab:hover {
|
|
978
|
+
background: var(--hd-mac-fill-hover);
|
|
979
|
+
color: var(--hd-mac-text);
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
.hd-mac-tab:active {
|
|
983
|
+
filter: brightness(0.98);
|
|
899
984
|
}
|
|
900
985
|
|
|
901
986
|
.hd-mac-tab[data-selected] {
|
|
@@ -913,6 +998,10 @@
|
|
|
913
998
|
height: 2px;
|
|
914
999
|
border-radius: 999px;
|
|
915
1000
|
background: var(--hd-mac-blue);
|
|
1001
|
+
transform-origin: center;
|
|
1002
|
+
transition:
|
|
1003
|
+
transform var(--hd-mac-motion-standard),
|
|
1004
|
+
opacity var(--hd-mac-motion-standard);
|
|
916
1005
|
}
|
|
917
1006
|
|
|
918
1007
|
.hd-mac-slider {
|
|
@@ -939,12 +1028,17 @@
|
|
|
939
1028
|
.hd-mac-slider-track {
|
|
940
1029
|
height: 4px;
|
|
941
1030
|
width: 100%;
|
|
1031
|
+
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
|
|
942
1032
|
}
|
|
943
1033
|
|
|
944
1034
|
.hd-mac-slider-indicator,
|
|
945
1035
|
.hd-mac-progress-indicator,
|
|
946
1036
|
.hd-mac-meter-indicator {
|
|
947
1037
|
background: var(--hd-mac-blue);
|
|
1038
|
+
transition:
|
|
1039
|
+
width var(--hd-mac-motion-surface),
|
|
1040
|
+
transform var(--hd-mac-motion-surface),
|
|
1041
|
+
background-color var(--hd-mac-motion-standard);
|
|
948
1042
|
}
|
|
949
1043
|
|
|
950
1044
|
.hd-mac-slider-indicator {
|
|
@@ -958,6 +1052,23 @@
|
|
|
958
1052
|
border-radius: 999px;
|
|
959
1053
|
background: #fff;
|
|
960
1054
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.34);
|
|
1055
|
+
transform-origin: center;
|
|
1056
|
+
transition:
|
|
1057
|
+
border-color var(--hd-mac-motion-standard),
|
|
1058
|
+
box-shadow var(--hd-mac-motion-standard),
|
|
1059
|
+
transform var(--hd-mac-motion-fast);
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
.hd-mac-slider-thumb:hover {
|
|
1063
|
+
box-shadow:
|
|
1064
|
+
0 1px 4px rgba(0, 0, 0, 0.34),
|
|
1065
|
+
0 0 0 3px color-mix(in srgb, var(--hd-mac-blue) 16%, transparent);
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
.hd-mac-slider-thumb:active {
|
|
1069
|
+
box-shadow:
|
|
1070
|
+
0 1px 2px rgba(0, 0, 0, 0.28),
|
|
1071
|
+
0 0 0 4px color-mix(in srgb, var(--hd-mac-blue) 22%, transparent);
|
|
961
1072
|
}
|
|
962
1073
|
|
|
963
1074
|
.hd-mac-progress,
|