@titan-design/react-ui 0.2.7 → 0.4.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/dist/bodymap-BhG55xHM.d.mts +318 -0
- package/dist/bodymap-BhG55xHM.d.ts +318 -0
- package/dist/bodymap.d.mts +3 -0
- package/dist/bodymap.d.ts +3 -0
- package/dist/bodymap.js +3014 -0
- package/dist/bodymap.js.map +1 -0
- package/dist/bodymap.mjs +1088 -0
- package/dist/bodymap.mjs.map +1 -0
- package/dist/chunk-2SISKTWM.mjs +1027 -0
- package/dist/chunk-2SISKTWM.mjs.map +1 -0
- package/dist/{chunk-5SSKGS6E.mjs → chunk-7XPB4NAO.mjs} +124 -4
- package/dist/chunk-7XPB4NAO.mjs.map +1 -0
- package/dist/{chunk-3VLOBS6O.mjs → chunk-SNVKL5WZ.mjs} +42 -5
- package/dist/chunk-SNVKL5WZ.mjs.map +1 -0
- package/dist/index.d.mts +416 -250
- package/dist/index.d.ts +416 -250
- package/dist/index.js +1567 -1123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1491 -2201
- package/dist/index.mjs.map +1 -1
- package/dist/theme/index.d.mts +288 -2
- package/dist/theme/index.d.ts +288 -2
- package/dist/theme/index.js +159 -2
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +2 -2
- package/dist/theme/tokens-css.d.mts +5 -3
- package/dist/theme/tokens-css.d.ts +5 -3
- package/dist/theme/tokens-css.js +318 -9
- package/dist/theme/tokens-css.js.map +1 -1
- package/dist/theme/tokens-css.mjs +1 -1
- package/dist/theme/tokens-css.mjs.map +1 -1
- package/package.json +10 -1
- package/src/bodymap.ts +37 -0
- package/src/components/custom/Table/Table.test.tsx +27 -0
- package/src/components/custom/Table/Table.tsx +33 -17
- package/src/components/custom/Workout/ActiveWorkoutPage.stories.tsx +118 -0
- package/src/components/custom/Workout/ActiveWorkoutPage.test.tsx +171 -0
- package/src/components/custom/Workout/ActiveWorkoutPage.tsx +442 -0
- package/src/components/custom/Workout/BodyMap.tsx +7 -9
- package/src/components/custom/Workout/BodyMapDetailPanel.tsx +25 -29
- package/src/components/custom/Workout/CapacityBandChart.tsx +2 -3
- package/src/components/custom/Workout/ExerciseCard.test.tsx +24 -0
- package/src/components/custom/Workout/ExerciseCard.tsx +24 -26
- package/src/components/custom/Workout/ExerciseDetailPage.stories.tsx +225 -0
- package/src/components/custom/Workout/ExerciseDetailPage.test.tsx +128 -0
- package/src/components/custom/Workout/ExerciseDetailPage.tsx +624 -0
- package/src/components/custom/Workout/InputBar.tsx +10 -12
- package/src/components/custom/Workout/MesoCard.tsx +2 -4
- package/src/components/custom/Workout/MesoProgressBar.test.tsx +12 -0
- package/src/components/custom/Workout/MesoProgressBar.tsx +5 -1
- package/src/components/custom/Workout/MesoStatusCard.tsx +17 -15
- package/src/components/custom/Workout/MuscleGroupChip.tsx +2 -4
- package/src/components/custom/Workout/PlaceholderStrip.tsx +2 -4
- package/src/components/custom/Workout/PrHistoryModal.tsx +12 -14
- package/src/components/custom/Workout/ProgramPlanningPage.stories.tsx +257 -0
- package/src/components/custom/Workout/ProgramPlanningPage.test.tsx +142 -0
- package/src/components/custom/Workout/ProgramPlanningPage.tsx +418 -0
- package/src/components/custom/Workout/ReadinessCheck.tsx +13 -12
- package/src/components/custom/Workout/RestTimer.test.tsx +10 -0
- package/src/components/custom/Workout/RestTimer.tsx +12 -9
- package/src/components/custom/Workout/SetRow.tsx +16 -19
- package/src/components/custom/Workout/StatusDot.tsx +1 -0
- package/src/components/custom/Workout/StrengthTrendChart.tsx +15 -17
- package/src/components/custom/Workout/TempoBar.stories.tsx +95 -0
- package/src/components/custom/Workout/TempoBar.test.tsx +103 -0
- package/src/components/custom/Workout/TempoBar.tsx +215 -0
- package/src/components/custom/Workout/TempoDisplay.tsx +3 -1
- package/src/components/custom/Workout/TrainingStatusPage.stories.tsx +212 -0
- package/src/components/custom/Workout/TrainingStatusPage.test.tsx +131 -0
- package/src/components/custom/Workout/TrainingStatusPage.tsx +312 -0
- package/src/components/custom/Workout/VelocityStrip.test.tsx +10 -0
- package/src/components/custom/Workout/VelocityStrip.tsx +19 -16
- package/src/components/custom/Workout/WeekRow.tsx +2 -1
- package/src/components/custom/Workout/WorkoutCard.tsx +3 -6
- package/src/components/custom/Workout/index.ts +80 -32
- package/src/test/nativewind-stub.ts +13 -0
- package/src/theme/ThemeProvider.test.tsx +24 -0
- package/src/theme/ThemeProvider.tsx +50 -0
- package/src/theme/config.completeness.test.ts +77 -0
- package/src/theme/config.ts +151 -0
- package/src/theme/index.ts +2 -0
- package/src/theme/manifest/design-freeze.test.ts +155 -0
- package/src/theme/manifest/extract-css-properties.fixture.html +29 -0
- package/src/theme/manifest/extract-css-properties.test.ts +112 -0
- package/src/theme/resolve-color.ts +19 -0
- package/src/theme/tokens-css.ts +5 -3
- package/src/theme/workout-tokens.ts +12 -14
- package/src/utils/index.ts +10 -0
- package/src/utils/workout-format.test.ts +81 -0
- package/src/utils/workout-format.ts +83 -0
- package/dist/chunk-3VLOBS6O.mjs.map +0 -1
- package/dist/chunk-5SSKGS6E.mjs.map +0 -1
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewStyle } from 'react-native';
|
|
1
|
+
import { ViewStyle, ViewProps } from 'react-native';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Elevation System
|
|
@@ -866,6 +866,23 @@ declare function getSemanticColors(mode: ThemeMode): {
|
|
|
866
866
|
*/
|
|
867
867
|
|
|
868
868
|
declare const lightThemeCSSVars: {
|
|
869
|
+
readonly '--color-brand-primary-rgb': "255, 121, 0";
|
|
870
|
+
readonly '--color-brand-secondary-rgb': "64, 109, 135";
|
|
871
|
+
readonly '--color-status-success-rgb': "20, 184, 166";
|
|
872
|
+
readonly '--color-status-error-rgb': "209, 67, 67";
|
|
873
|
+
readonly '--color-status-warning-rgb': "255, 176, 32";
|
|
874
|
+
readonly '--color-status-info-rgb': "33, 150, 243";
|
|
875
|
+
readonly '--color-background-base-rgb': "16, 16, 16";
|
|
876
|
+
readonly '--font-family-sans': "'Inter'";
|
|
877
|
+
readonly '--font-family-body': "'Nunito Sans'";
|
|
878
|
+
readonly '--font-family-heading': "'Space Grotesk'";
|
|
879
|
+
readonly '--font-family-mono': "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace";
|
|
880
|
+
readonly '--ease-out': "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
881
|
+
readonly '--ease-in-out': "cubic-bezier(0.65, 0, 0.35, 1)";
|
|
882
|
+
readonly '--ease-spring': "cubic-bezier(0.34, 1.56, 0.64, 1)";
|
|
883
|
+
readonly '--duration-fast': "150ms";
|
|
884
|
+
readonly '--duration-normal': "250ms";
|
|
885
|
+
readonly '--duration-slow': "400ms";
|
|
869
886
|
readonly '--color-brand-primary': "#FF7900";
|
|
870
887
|
readonly '--color-brand-primary-light': "#FF9630";
|
|
871
888
|
readonly '--color-brand-primary-dark': "#D0620C";
|
|
@@ -906,8 +923,73 @@ declare const lightThemeCSSVars: {
|
|
|
906
923
|
readonly '--color-interactive-selected': "rgba(55, 65, 81, 0.08)";
|
|
907
924
|
readonly '--color-interactive-disabled': "rgba(55, 65, 81, 0.12)";
|
|
908
925
|
readonly '--color-divider': "#E8E9EB";
|
|
926
|
+
readonly '--color-brand-primary-hover': "#F56C00";
|
|
927
|
+
readonly '--color-brand-primary-active': "#E06D10";
|
|
928
|
+
readonly '--color-brand-secondary-hover': "#39617A";
|
|
929
|
+
readonly '--color-brand-secondary-active': "#32556D";
|
|
930
|
+
readonly '--color-status-success-light': "#43C6B7";
|
|
931
|
+
readonly '--color-status-success-dark': "#0E8074";
|
|
932
|
+
readonly '--color-status-error-light': "#DA6868";
|
|
933
|
+
readonly '--color-status-error-dark': "#922E2E";
|
|
934
|
+
readonly '--color-status-warning-light': "#FFBF4C";
|
|
935
|
+
readonly '--color-status-warning-dark': "#B27B16";
|
|
936
|
+
readonly '--color-status-info-light': "#64B6F7";
|
|
937
|
+
readonly '--color-status-info-dark': "#0B79D0";
|
|
938
|
+
readonly '--color-on-status-success': "#FFFFFF";
|
|
939
|
+
readonly '--color-on-status-error': "#FFFFFF";
|
|
940
|
+
readonly '--color-on-status-warning': "#FFFFFF";
|
|
941
|
+
readonly '--color-on-status-info': "#FFFFFF";
|
|
942
|
+
readonly '--color-result-improve': "#4caf50";
|
|
943
|
+
readonly '--color-result-improve-light': "rgba(76, 175, 80, 0.12)";
|
|
944
|
+
readonly '--color-result-improve-dark': "#248a24";
|
|
945
|
+
readonly '--color-result-degrade': "#ef5350";
|
|
946
|
+
readonly '--color-result-degrade-light': "rgba(239, 83, 80, 0.12)";
|
|
947
|
+
readonly '--color-result-degrade-dark': "#b30000";
|
|
948
|
+
readonly '--color-result-inconclusive': "#9E9A97";
|
|
949
|
+
readonly '--color-result-inconclusive-light': "rgba(158, 154, 151, 0.12)";
|
|
950
|
+
readonly '--color-result-neutral': "#6B7280";
|
|
951
|
+
readonly '--color-on-result-improve': "#FFFFFF";
|
|
952
|
+
readonly '--color-on-result-degrade': "#FFFFFF";
|
|
953
|
+
readonly '--color-on-result-inconclusive': "#FFFFFF";
|
|
954
|
+
readonly '--color-data-1': "#1965B0";
|
|
955
|
+
readonly '--color-data-2': "#4EB265";
|
|
956
|
+
readonly '--color-data-3': "#F7F056";
|
|
957
|
+
readonly '--color-data-4': "#DC050C";
|
|
958
|
+
readonly '--color-data-5': "#882E72";
|
|
959
|
+
readonly '--color-data-6': "#F4A736";
|
|
960
|
+
readonly '--color-data-7': "#7BAFDE";
|
|
961
|
+
readonly '--color-data-8': "#90C987";
|
|
962
|
+
readonly '--color-data-9': "#CAACCB";
|
|
963
|
+
readonly '--color-data-10': "#EE8026";
|
|
964
|
+
readonly '--color-text-link-hover': "#3832A0";
|
|
965
|
+
readonly '--color-surface-overlay': "#FFFFFF";
|
|
966
|
+
readonly '--color-surface-input': "#FAFAFA";
|
|
967
|
+
readonly '--color-border-input': "#D1D5DB";
|
|
968
|
+
readonly '--color-border-input-hover': "#9CA3AF";
|
|
969
|
+
readonly '--color-border-input-focus': "#5048E5";
|
|
970
|
+
readonly '--color-border-input-error': "#D14343";
|
|
971
|
+
readonly '--color-interactive-disabled-text': "rgba(55, 65, 81, 0.26)";
|
|
972
|
+
readonly '--color-avatar-background': "#6B7280";
|
|
973
|
+
readonly '--color-avatar-text': "#FFFFFF";
|
|
909
974
|
};
|
|
910
975
|
declare const darkThemeCSSVars: {
|
|
976
|
+
readonly '--color-brand-primary-rgb': "255, 121, 0";
|
|
977
|
+
readonly '--color-brand-secondary-rgb': "64, 109, 135";
|
|
978
|
+
readonly '--color-status-success-rgb': "20, 184, 166";
|
|
979
|
+
readonly '--color-status-error-rgb': "209, 67, 67";
|
|
980
|
+
readonly '--color-status-warning-rgb': "255, 176, 32";
|
|
981
|
+
readonly '--color-status-info-rgb': "33, 150, 243";
|
|
982
|
+
readonly '--color-background-base-rgb': "16, 16, 16";
|
|
983
|
+
readonly '--font-family-sans': "'Inter'";
|
|
984
|
+
readonly '--font-family-body': "'Nunito Sans'";
|
|
985
|
+
readonly '--font-family-heading': "'Space Grotesk'";
|
|
986
|
+
readonly '--font-family-mono': "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace";
|
|
987
|
+
readonly '--ease-out': "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
988
|
+
readonly '--ease-in-out': "cubic-bezier(0.65, 0, 0.35, 1)";
|
|
989
|
+
readonly '--ease-spring': "cubic-bezier(0.34, 1.56, 0.64, 1)";
|
|
990
|
+
readonly '--duration-fast': "150ms";
|
|
991
|
+
readonly '--duration-normal': "250ms";
|
|
992
|
+
readonly '--duration-slow': "400ms";
|
|
911
993
|
readonly '--color-brand-primary': "#FF7900";
|
|
912
994
|
readonly '--color-brand-primary-light': "#FF9630";
|
|
913
995
|
readonly '--color-brand-primary-dark': "#D0620C";
|
|
@@ -948,8 +1030,73 @@ declare const darkThemeCSSVars: {
|
|
|
948
1030
|
readonly '--color-interactive-selected': "rgba(255, 255, 255, 0.08)";
|
|
949
1031
|
readonly '--color-interactive-disabled': "rgba(255, 255, 255, 0.12)";
|
|
950
1032
|
readonly '--color-divider': "#1F1F1F";
|
|
1033
|
+
readonly '--color-brand-primary-hover': "#FF8500";
|
|
1034
|
+
readonly '--color-brand-primary-active': "#FF9630";
|
|
1035
|
+
readonly '--color-brand-secondary-hover': "#557488";
|
|
1036
|
+
readonly '--color-brand-secondary-active': "#678498";
|
|
1037
|
+
readonly '--color-status-success-light': "#43C6B7";
|
|
1038
|
+
readonly '--color-status-success-dark': "#0E8074";
|
|
1039
|
+
readonly '--color-status-error-light': "#DA6868";
|
|
1040
|
+
readonly '--color-status-error-dark': "#922E2E";
|
|
1041
|
+
readonly '--color-status-warning-light': "#FFBF4C";
|
|
1042
|
+
readonly '--color-status-warning-dark': "#B27B16";
|
|
1043
|
+
readonly '--color-status-info-light': "#64B6F7";
|
|
1044
|
+
readonly '--color-status-info-dark': "#0B79D0";
|
|
1045
|
+
readonly '--color-on-status-success': "#FFFFFF";
|
|
1046
|
+
readonly '--color-on-status-error': "#FFFFFF";
|
|
1047
|
+
readonly '--color-on-status-warning': "#FFFFFF";
|
|
1048
|
+
readonly '--color-on-status-info': "#FFFFFF";
|
|
1049
|
+
readonly '--color-result-improve': "#4caf50";
|
|
1050
|
+
readonly '--color-result-improve-light': "rgba(76, 175, 80, 0.16)";
|
|
1051
|
+
readonly '--color-result-improve-dark': "#248a24";
|
|
1052
|
+
readonly '--color-result-degrade': "#ef5350";
|
|
1053
|
+
readonly '--color-result-degrade-light': "rgba(239, 83, 80, 0.16)";
|
|
1054
|
+
readonly '--color-result-degrade-dark': "#b30000";
|
|
1055
|
+
readonly '--color-result-inconclusive': "#9E9A97";
|
|
1056
|
+
readonly '--color-result-inconclusive-light': "rgba(158, 154, 151, 0.16)";
|
|
1057
|
+
readonly '--color-result-neutral': "#9CA3AF";
|
|
1058
|
+
readonly '--color-on-result-improve': "#FFFFFF";
|
|
1059
|
+
readonly '--color-on-result-degrade': "#FFFFFF";
|
|
1060
|
+
readonly '--color-on-result-inconclusive': "#FFFFFF";
|
|
1061
|
+
readonly '--color-data-1': "#1965B0";
|
|
1062
|
+
readonly '--color-data-2': "#4EB265";
|
|
1063
|
+
readonly '--color-data-3': "#F7F056";
|
|
1064
|
+
readonly '--color-data-4': "#DC050C";
|
|
1065
|
+
readonly '--color-data-5': "#882E72";
|
|
1066
|
+
readonly '--color-data-6': "#F4A736";
|
|
1067
|
+
readonly '--color-data-7': "#7BAFDE";
|
|
1068
|
+
readonly '--color-data-8': "#90C987";
|
|
1069
|
+
readonly '--color-data-9': "#CAACCB";
|
|
1070
|
+
readonly '--color-data-10': "#EE8026";
|
|
1071
|
+
readonly '--color-text-link-hover': "#60A5FA";
|
|
1072
|
+
readonly '--color-surface-overlay': "#191919";
|
|
1073
|
+
readonly '--color-surface-input': "#191919";
|
|
1074
|
+
readonly '--color-border-input': "#4B5563";
|
|
1075
|
+
readonly '--color-border-input-hover': "#6B7280";
|
|
1076
|
+
readonly '--color-border-input-focus': "#828DF8";
|
|
1077
|
+
readonly '--color-border-input-error': "#EF4444";
|
|
1078
|
+
readonly '--color-interactive-disabled-text': "rgba(255, 255, 255, 0.26)";
|
|
1079
|
+
readonly '--color-avatar-background': "#4B5563";
|
|
1080
|
+
readonly '--color-avatar-text': "#FFFFFF";
|
|
951
1081
|
};
|
|
952
1082
|
declare function getThemeCSSVars(mode: ThemeMode): {
|
|
1083
|
+
readonly '--color-brand-primary-rgb': "255, 121, 0";
|
|
1084
|
+
readonly '--color-brand-secondary-rgb': "64, 109, 135";
|
|
1085
|
+
readonly '--color-status-success-rgb': "20, 184, 166";
|
|
1086
|
+
readonly '--color-status-error-rgb': "209, 67, 67";
|
|
1087
|
+
readonly '--color-status-warning-rgb': "255, 176, 32";
|
|
1088
|
+
readonly '--color-status-info-rgb': "33, 150, 243";
|
|
1089
|
+
readonly '--color-background-base-rgb': "16, 16, 16";
|
|
1090
|
+
readonly '--font-family-sans': "'Inter'";
|
|
1091
|
+
readonly '--font-family-body': "'Nunito Sans'";
|
|
1092
|
+
readonly '--font-family-heading': "'Space Grotesk'";
|
|
1093
|
+
readonly '--font-family-mono': "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace";
|
|
1094
|
+
readonly '--ease-out': "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
1095
|
+
readonly '--ease-in-out': "cubic-bezier(0.65, 0, 0.35, 1)";
|
|
1096
|
+
readonly '--ease-spring': "cubic-bezier(0.34, 1.56, 0.64, 1)";
|
|
1097
|
+
readonly '--duration-fast': "150ms";
|
|
1098
|
+
readonly '--duration-normal': "250ms";
|
|
1099
|
+
readonly '--duration-slow': "400ms";
|
|
953
1100
|
readonly '--color-brand-primary': "#FF7900";
|
|
954
1101
|
readonly '--color-brand-primary-light': "#FF9630";
|
|
955
1102
|
readonly '--color-brand-primary-dark': "#D0620C";
|
|
@@ -990,7 +1137,72 @@ declare function getThemeCSSVars(mode: ThemeMode): {
|
|
|
990
1137
|
readonly '--color-interactive-selected': "rgba(55, 65, 81, 0.08)";
|
|
991
1138
|
readonly '--color-interactive-disabled': "rgba(55, 65, 81, 0.12)";
|
|
992
1139
|
readonly '--color-divider': "#E8E9EB";
|
|
1140
|
+
readonly '--color-brand-primary-hover': "#F56C00";
|
|
1141
|
+
readonly '--color-brand-primary-active': "#E06D10";
|
|
1142
|
+
readonly '--color-brand-secondary-hover': "#39617A";
|
|
1143
|
+
readonly '--color-brand-secondary-active': "#32556D";
|
|
1144
|
+
readonly '--color-status-success-light': "#43C6B7";
|
|
1145
|
+
readonly '--color-status-success-dark': "#0E8074";
|
|
1146
|
+
readonly '--color-status-error-light': "#DA6868";
|
|
1147
|
+
readonly '--color-status-error-dark': "#922E2E";
|
|
1148
|
+
readonly '--color-status-warning-light': "#FFBF4C";
|
|
1149
|
+
readonly '--color-status-warning-dark': "#B27B16";
|
|
1150
|
+
readonly '--color-status-info-light': "#64B6F7";
|
|
1151
|
+
readonly '--color-status-info-dark': "#0B79D0";
|
|
1152
|
+
readonly '--color-on-status-success': "#FFFFFF";
|
|
1153
|
+
readonly '--color-on-status-error': "#FFFFFF";
|
|
1154
|
+
readonly '--color-on-status-warning': "#FFFFFF";
|
|
1155
|
+
readonly '--color-on-status-info': "#FFFFFF";
|
|
1156
|
+
readonly '--color-result-improve': "#4caf50";
|
|
1157
|
+
readonly '--color-result-improve-light': "rgba(76, 175, 80, 0.12)";
|
|
1158
|
+
readonly '--color-result-improve-dark': "#248a24";
|
|
1159
|
+
readonly '--color-result-degrade': "#ef5350";
|
|
1160
|
+
readonly '--color-result-degrade-light': "rgba(239, 83, 80, 0.12)";
|
|
1161
|
+
readonly '--color-result-degrade-dark': "#b30000";
|
|
1162
|
+
readonly '--color-result-inconclusive': "#9E9A97";
|
|
1163
|
+
readonly '--color-result-inconclusive-light': "rgba(158, 154, 151, 0.12)";
|
|
1164
|
+
readonly '--color-result-neutral': "#6B7280";
|
|
1165
|
+
readonly '--color-on-result-improve': "#FFFFFF";
|
|
1166
|
+
readonly '--color-on-result-degrade': "#FFFFFF";
|
|
1167
|
+
readonly '--color-on-result-inconclusive': "#FFFFFF";
|
|
1168
|
+
readonly '--color-data-1': "#1965B0";
|
|
1169
|
+
readonly '--color-data-2': "#4EB265";
|
|
1170
|
+
readonly '--color-data-3': "#F7F056";
|
|
1171
|
+
readonly '--color-data-4': "#DC050C";
|
|
1172
|
+
readonly '--color-data-5': "#882E72";
|
|
1173
|
+
readonly '--color-data-6': "#F4A736";
|
|
1174
|
+
readonly '--color-data-7': "#7BAFDE";
|
|
1175
|
+
readonly '--color-data-8': "#90C987";
|
|
1176
|
+
readonly '--color-data-9': "#CAACCB";
|
|
1177
|
+
readonly '--color-data-10': "#EE8026";
|
|
1178
|
+
readonly '--color-text-link-hover': "#3832A0";
|
|
1179
|
+
readonly '--color-surface-overlay': "#FFFFFF";
|
|
1180
|
+
readonly '--color-surface-input': "#FAFAFA";
|
|
1181
|
+
readonly '--color-border-input': "#D1D5DB";
|
|
1182
|
+
readonly '--color-border-input-hover': "#9CA3AF";
|
|
1183
|
+
readonly '--color-border-input-focus': "#5048E5";
|
|
1184
|
+
readonly '--color-border-input-error': "#D14343";
|
|
1185
|
+
readonly '--color-interactive-disabled-text': "rgba(55, 65, 81, 0.26)";
|
|
1186
|
+
readonly '--color-avatar-background': "#6B7280";
|
|
1187
|
+
readonly '--color-avatar-text': "#FFFFFF";
|
|
993
1188
|
} | {
|
|
1189
|
+
readonly '--color-brand-primary-rgb': "255, 121, 0";
|
|
1190
|
+
readonly '--color-brand-secondary-rgb': "64, 109, 135";
|
|
1191
|
+
readonly '--color-status-success-rgb': "20, 184, 166";
|
|
1192
|
+
readonly '--color-status-error-rgb': "209, 67, 67";
|
|
1193
|
+
readonly '--color-status-warning-rgb': "255, 176, 32";
|
|
1194
|
+
readonly '--color-status-info-rgb': "33, 150, 243";
|
|
1195
|
+
readonly '--color-background-base-rgb': "16, 16, 16";
|
|
1196
|
+
readonly '--font-family-sans': "'Inter'";
|
|
1197
|
+
readonly '--font-family-body': "'Nunito Sans'";
|
|
1198
|
+
readonly '--font-family-heading': "'Space Grotesk'";
|
|
1199
|
+
readonly '--font-family-mono': "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace";
|
|
1200
|
+
readonly '--ease-out': "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
1201
|
+
readonly '--ease-in-out': "cubic-bezier(0.65, 0, 0.35, 1)";
|
|
1202
|
+
readonly '--ease-spring': "cubic-bezier(0.34, 1.56, 0.64, 1)";
|
|
1203
|
+
readonly '--duration-fast': "150ms";
|
|
1204
|
+
readonly '--duration-normal': "250ms";
|
|
1205
|
+
readonly '--duration-slow': "400ms";
|
|
994
1206
|
readonly '--color-brand-primary': "#FF7900";
|
|
995
1207
|
readonly '--color-brand-primary-light': "#FF9630";
|
|
996
1208
|
readonly '--color-brand-primary-dark': "#D0620C";
|
|
@@ -1031,6 +1243,54 @@ declare function getThemeCSSVars(mode: ThemeMode): {
|
|
|
1031
1243
|
readonly '--color-interactive-selected': "rgba(255, 255, 255, 0.08)";
|
|
1032
1244
|
readonly '--color-interactive-disabled': "rgba(255, 255, 255, 0.12)";
|
|
1033
1245
|
readonly '--color-divider': "#1F1F1F";
|
|
1246
|
+
readonly '--color-brand-primary-hover': "#FF8500";
|
|
1247
|
+
readonly '--color-brand-primary-active': "#FF9630";
|
|
1248
|
+
readonly '--color-brand-secondary-hover': "#557488";
|
|
1249
|
+
readonly '--color-brand-secondary-active': "#678498";
|
|
1250
|
+
readonly '--color-status-success-light': "#43C6B7";
|
|
1251
|
+
readonly '--color-status-success-dark': "#0E8074";
|
|
1252
|
+
readonly '--color-status-error-light': "#DA6868";
|
|
1253
|
+
readonly '--color-status-error-dark': "#922E2E";
|
|
1254
|
+
readonly '--color-status-warning-light': "#FFBF4C";
|
|
1255
|
+
readonly '--color-status-warning-dark': "#B27B16";
|
|
1256
|
+
readonly '--color-status-info-light': "#64B6F7";
|
|
1257
|
+
readonly '--color-status-info-dark': "#0B79D0";
|
|
1258
|
+
readonly '--color-on-status-success': "#FFFFFF";
|
|
1259
|
+
readonly '--color-on-status-error': "#FFFFFF";
|
|
1260
|
+
readonly '--color-on-status-warning': "#FFFFFF";
|
|
1261
|
+
readonly '--color-on-status-info': "#FFFFFF";
|
|
1262
|
+
readonly '--color-result-improve': "#4caf50";
|
|
1263
|
+
readonly '--color-result-improve-light': "rgba(76, 175, 80, 0.16)";
|
|
1264
|
+
readonly '--color-result-improve-dark': "#248a24";
|
|
1265
|
+
readonly '--color-result-degrade': "#ef5350";
|
|
1266
|
+
readonly '--color-result-degrade-light': "rgba(239, 83, 80, 0.16)";
|
|
1267
|
+
readonly '--color-result-degrade-dark': "#b30000";
|
|
1268
|
+
readonly '--color-result-inconclusive': "#9E9A97";
|
|
1269
|
+
readonly '--color-result-inconclusive-light': "rgba(158, 154, 151, 0.16)";
|
|
1270
|
+
readonly '--color-result-neutral': "#9CA3AF";
|
|
1271
|
+
readonly '--color-on-result-improve': "#FFFFFF";
|
|
1272
|
+
readonly '--color-on-result-degrade': "#FFFFFF";
|
|
1273
|
+
readonly '--color-on-result-inconclusive': "#FFFFFF";
|
|
1274
|
+
readonly '--color-data-1': "#1965B0";
|
|
1275
|
+
readonly '--color-data-2': "#4EB265";
|
|
1276
|
+
readonly '--color-data-3': "#F7F056";
|
|
1277
|
+
readonly '--color-data-4': "#DC050C";
|
|
1278
|
+
readonly '--color-data-5': "#882E72";
|
|
1279
|
+
readonly '--color-data-6': "#F4A736";
|
|
1280
|
+
readonly '--color-data-7': "#7BAFDE";
|
|
1281
|
+
readonly '--color-data-8': "#90C987";
|
|
1282
|
+
readonly '--color-data-9': "#CAACCB";
|
|
1283
|
+
readonly '--color-data-10': "#EE8026";
|
|
1284
|
+
readonly '--color-text-link-hover': "#60A5FA";
|
|
1285
|
+
readonly '--color-surface-overlay': "#191919";
|
|
1286
|
+
readonly '--color-surface-input': "#191919";
|
|
1287
|
+
readonly '--color-border-input': "#4B5563";
|
|
1288
|
+
readonly '--color-border-input-hover': "#6B7280";
|
|
1289
|
+
readonly '--color-border-input-focus': "#828DF8";
|
|
1290
|
+
readonly '--color-border-input-error': "#EF4444";
|
|
1291
|
+
readonly '--color-interactive-disabled-text': "rgba(255, 255, 255, 0.26)";
|
|
1292
|
+
readonly '--color-avatar-background': "#4B5563";
|
|
1293
|
+
readonly '--color-avatar-text': "#FFFFFF";
|
|
1034
1294
|
};
|
|
1035
1295
|
declare const gluestackConfig: {
|
|
1036
1296
|
readonly tokens: {
|
|
@@ -1355,6 +1615,32 @@ declare function validateCssPropertyManifest(candidate: unknown): ManifestValida
|
|
|
1355
1615
|
/** Type guard variant of validateCssPropertyManifest for use in narrowing contexts. */
|
|
1356
1616
|
declare function isCssPropertyManifest(candidate: unknown): candidate is CssPropertyManifest;
|
|
1357
1617
|
|
|
1618
|
+
type ThemeProviderMode = 'dark' | 'light';
|
|
1619
|
+
interface ThemeProviderProps extends ViewProps {
|
|
1620
|
+
/** Theme mode to register. Mobile is dark-only today; defaults to `dark`. */
|
|
1621
|
+
mode?: ThemeProviderMode;
|
|
1622
|
+
}
|
|
1623
|
+
/**
|
|
1624
|
+
* Wrap the app root so descendant titan components' `--color-*` className tokens
|
|
1625
|
+
* resolve on native. Fills its parent (`flex: 1`) by default; pass `style` to
|
|
1626
|
+
* override. On web it is harmless (the dashboard already loads `global.css`).
|
|
1627
|
+
*/
|
|
1628
|
+
declare function ThemeProvider({ mode, style, children, ...props }: ThemeProviderProps): React.JSX.Element;
|
|
1629
|
+
|
|
1630
|
+
type ColorToken = keyof ReturnType<typeof getSemanticColors>;
|
|
1631
|
+
/**
|
|
1632
|
+
* Resolve a semantic color token for an inline style where a nativewind
|
|
1633
|
+
* className can't apply — gradients (`backgroundImage`), per-edge borders
|
|
1634
|
+
* (`borderTopColor`, …), SVG attributes, and conditional hex/token mixes.
|
|
1635
|
+
*
|
|
1636
|
+
* The companion to className color tokens: on **web** it returns the CSS
|
|
1637
|
+
* variable (`var(--color-…)`), so the dashboard's light/dark switching keeps
|
|
1638
|
+
* working exactly as `global.css` intends; on **native** it returns the
|
|
1639
|
+
* resolved hex from `getSemanticColors` (mobile is dark-only). This is why
|
|
1640
|
+
* these spots stay theme-correct on web while also rendering on-device.
|
|
1641
|
+
*/
|
|
1642
|
+
declare function resolveColor(token: ColorToken, mode?: ThemeMode): string;
|
|
1643
|
+
|
|
1358
1644
|
interface ThemePresetColors {
|
|
1359
1645
|
'brand-primary'?: string;
|
|
1360
1646
|
'brand-primary-light'?: string;
|
|
@@ -1440,4 +1726,4 @@ declare const defaultPreset: ThemePreset;
|
|
|
1440
1726
|
*/
|
|
1441
1727
|
declare const audiobookPreset: ThemePreset;
|
|
1442
1728
|
|
|
1443
|
-
export { type ComponentType, type CssPropertyEntry, type CssPropertyManifest, type ElevationConfig, type ElevationLevel, type GlowIntensity, type ManifestValidationResult, type ShadowIntensity, type ShadowSurface, type ThemeConfig, type ThemeMode, type ThemePreset, type ThemePresetColors, type ThemePresetFonts, type ThemePresetRadii, type ThemePresetShadows, type VariantAxes, type VariantOverride, applyThemePreset, audiobookPreset, buttonSizes, componentElevationRanges, createFlatShadow, createPressedHoverShadow, createPressedShadow, createRaisedHoverShadow, createRaisedShadow, darkThemeCSSVars, darken, defaultPreset, discreteRainbow, elevationSystem, getBaseSurfaceColor, getDiscreteRainbowColor, getElevationConfig, getElevationShadow, getElevationSurface, getGlowShadow, getHoverColors, getSemanticColors, getThemeCSSVars, getValidatedElevation, gluestackConfig, hexToRgb, hsvToRgb, isCssPropertyManifest, isDark, lightThemeCSSVars, lighten, neumorphicShadows, primitiveBorderRadius, primitiveBreakpoints, primitiveColors, primitiveShadows, primitiveSpacing, primitiveTypography, primitiveZIndex, rgbToHex, rgbToHsv, semanticColorsDark, semanticColorsLight, semanticTypography, shadowColors, validateCssPropertyManifest };
|
|
1729
|
+
export { type ComponentType, type CssPropertyEntry, type CssPropertyManifest, type ElevationConfig, type ElevationLevel, type GlowIntensity, type ManifestValidationResult, type ShadowIntensity, type ShadowSurface, type ThemeConfig, type ThemeMode, type ThemePreset, type ThemePresetColors, type ThemePresetFonts, type ThemePresetRadii, type ThemePresetShadows, ThemeProvider, type ThemeProviderMode, type ThemeProviderProps, type VariantAxes, type VariantOverride, applyThemePreset, audiobookPreset, buttonSizes, componentElevationRanges, createFlatShadow, createPressedHoverShadow, createPressedShadow, createRaisedHoverShadow, createRaisedShadow, darkThemeCSSVars, darken, defaultPreset, discreteRainbow, elevationSystem, getBaseSurfaceColor, getDiscreteRainbowColor, getElevationConfig, getElevationShadow, getElevationSurface, getGlowShadow, getHoverColors, getSemanticColors, getThemeCSSVars, getValidatedElevation, gluestackConfig, hexToRgb, hsvToRgb, isCssPropertyManifest, isDark, lightThemeCSSVars, lighten, neumorphicShadows, primitiveBorderRadius, primitiveBreakpoints, primitiveColors, primitiveShadows, primitiveSpacing, primitiveTypography, primitiveZIndex, resolveColor, rgbToHex, rgbToHsv, semanticColorsDark, semanticColorsLight, semanticTypography, shadowColors, validateCssPropertyManifest };
|
package/dist/theme/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var reactNative = require('react-native');
|
|
4
|
+
var nativewind = require('nativewind');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
6
|
|
|
5
7
|
// src/theme/tokens/primitives.ts
|
|
6
8
|
var primitiveColors = {
|
|
@@ -729,6 +731,28 @@ function getSemanticColors(mode) {
|
|
|
729
731
|
}
|
|
730
732
|
|
|
731
733
|
// src/theme/config.ts
|
|
734
|
+
var themeIndependentCSSVars = {
|
|
735
|
+
// RGB decomposed values for glow shadows
|
|
736
|
+
"--color-brand-primary-rgb": "255, 121, 0",
|
|
737
|
+
"--color-brand-secondary-rgb": "64, 109, 135",
|
|
738
|
+
"--color-status-success-rgb": "20, 184, 166",
|
|
739
|
+
"--color-status-error-rgb": "209, 67, 67",
|
|
740
|
+
"--color-status-warning-rgb": "255, 176, 32",
|
|
741
|
+
"--color-status-info-rgb": "33, 150, 243",
|
|
742
|
+
"--color-background-base-rgb": "16, 16, 16",
|
|
743
|
+
// Font families
|
|
744
|
+
"--font-family-sans": "'Inter'",
|
|
745
|
+
"--font-family-body": "'Nunito Sans'",
|
|
746
|
+
"--font-family-heading": "'Space Grotesk'",
|
|
747
|
+
"--font-family-mono": "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace",
|
|
748
|
+
// Animation tokens
|
|
749
|
+
"--ease-out": "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
750
|
+
"--ease-in-out": "cubic-bezier(0.65, 0, 0.35, 1)",
|
|
751
|
+
"--ease-spring": "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
752
|
+
"--duration-fast": "150ms",
|
|
753
|
+
"--duration-normal": "250ms",
|
|
754
|
+
"--duration-slow": "400ms"
|
|
755
|
+
};
|
|
732
756
|
var lightThemeCSSVars = {
|
|
733
757
|
"--color-brand-primary": semanticColorsLight["brand-primary"],
|
|
734
758
|
"--color-brand-primary-light": semanticColorsLight["brand-primary-light"],
|
|
@@ -769,7 +793,56 @@ var lightThemeCSSVars = {
|
|
|
769
793
|
"--color-interactive-active": semanticColorsLight["interactive-active"],
|
|
770
794
|
"--color-interactive-selected": semanticColorsLight["interactive-selected"],
|
|
771
795
|
"--color-interactive-disabled": semanticColorsLight["interactive-disabled"],
|
|
772
|
-
"--color-divider": semanticColorsLight["divider"]
|
|
796
|
+
"--color-divider": semanticColorsLight["divider"],
|
|
797
|
+
"--color-brand-primary-hover": semanticColorsLight["brand-primary-hover"],
|
|
798
|
+
"--color-brand-primary-active": semanticColorsLight["brand-primary-active"],
|
|
799
|
+
"--color-brand-secondary-hover": semanticColorsLight["brand-secondary-hover"],
|
|
800
|
+
"--color-brand-secondary-active": semanticColorsLight["brand-secondary-active"],
|
|
801
|
+
"--color-status-success-light": semanticColorsLight["status-success-light"],
|
|
802
|
+
"--color-status-success-dark": semanticColorsLight["status-success-dark"],
|
|
803
|
+
"--color-status-error-light": semanticColorsLight["status-error-light"],
|
|
804
|
+
"--color-status-error-dark": semanticColorsLight["status-error-dark"],
|
|
805
|
+
"--color-status-warning-light": semanticColorsLight["status-warning-light"],
|
|
806
|
+
"--color-status-warning-dark": semanticColorsLight["status-warning-dark"],
|
|
807
|
+
"--color-status-info-light": semanticColorsLight["status-info-light"],
|
|
808
|
+
"--color-status-info-dark": semanticColorsLight["status-info-dark"],
|
|
809
|
+
"--color-on-status-success": semanticColorsLight["on-status-success"],
|
|
810
|
+
"--color-on-status-error": semanticColorsLight["on-status-error"],
|
|
811
|
+
"--color-on-status-warning": semanticColorsLight["on-status-warning"],
|
|
812
|
+
"--color-on-status-info": semanticColorsLight["on-status-info"],
|
|
813
|
+
"--color-result-improve": semanticColorsLight["result-improve"],
|
|
814
|
+
"--color-result-improve-light": semanticColorsLight["result-improve-light"],
|
|
815
|
+
"--color-result-improve-dark": semanticColorsLight["result-improve-dark"],
|
|
816
|
+
"--color-result-degrade": semanticColorsLight["result-degrade"],
|
|
817
|
+
"--color-result-degrade-light": semanticColorsLight["result-degrade-light"],
|
|
818
|
+
"--color-result-degrade-dark": semanticColorsLight["result-degrade-dark"],
|
|
819
|
+
"--color-result-inconclusive": semanticColorsLight["result-inconclusive"],
|
|
820
|
+
"--color-result-inconclusive-light": semanticColorsLight["result-inconclusive-light"],
|
|
821
|
+
"--color-result-neutral": semanticColorsLight["result-neutral"],
|
|
822
|
+
"--color-on-result-improve": semanticColorsLight["on-result-improve"],
|
|
823
|
+
"--color-on-result-degrade": semanticColorsLight["on-result-degrade"],
|
|
824
|
+
"--color-on-result-inconclusive": semanticColorsLight["on-result-inconclusive"],
|
|
825
|
+
"--color-data-1": semanticColorsLight["data-1"],
|
|
826
|
+
"--color-data-2": semanticColorsLight["data-2"],
|
|
827
|
+
"--color-data-3": semanticColorsLight["data-3"],
|
|
828
|
+
"--color-data-4": semanticColorsLight["data-4"],
|
|
829
|
+
"--color-data-5": semanticColorsLight["data-5"],
|
|
830
|
+
"--color-data-6": semanticColorsLight["data-6"],
|
|
831
|
+
"--color-data-7": semanticColorsLight["data-7"],
|
|
832
|
+
"--color-data-8": semanticColorsLight["data-8"],
|
|
833
|
+
"--color-data-9": semanticColorsLight["data-9"],
|
|
834
|
+
"--color-data-10": semanticColorsLight["data-10"],
|
|
835
|
+
"--color-text-link-hover": semanticColorsLight["text-link-hover"],
|
|
836
|
+
"--color-surface-overlay": semanticColorsLight["surface-overlay"],
|
|
837
|
+
"--color-surface-input": semanticColorsLight["surface-input"],
|
|
838
|
+
"--color-border-input": semanticColorsLight["border-input"],
|
|
839
|
+
"--color-border-input-hover": semanticColorsLight["border-input-hover"],
|
|
840
|
+
"--color-border-input-focus": semanticColorsLight["border-input-focus"],
|
|
841
|
+
"--color-border-input-error": semanticColorsLight["border-input-error"],
|
|
842
|
+
"--color-interactive-disabled-text": semanticColorsLight["interactive-disabled-text"],
|
|
843
|
+
"--color-avatar-background": semanticColorsLight["avatar-background"],
|
|
844
|
+
"--color-avatar-text": semanticColorsLight["avatar-text"],
|
|
845
|
+
...themeIndependentCSSVars
|
|
773
846
|
};
|
|
774
847
|
var darkThemeCSSVars = {
|
|
775
848
|
"--color-brand-primary": semanticColorsDark["brand-primary"],
|
|
@@ -811,7 +884,56 @@ var darkThemeCSSVars = {
|
|
|
811
884
|
"--color-interactive-active": semanticColorsDark["interactive-active"],
|
|
812
885
|
"--color-interactive-selected": semanticColorsDark["interactive-selected"],
|
|
813
886
|
"--color-interactive-disabled": semanticColorsDark["interactive-disabled"],
|
|
814
|
-
"--color-divider": semanticColorsDark["divider"]
|
|
887
|
+
"--color-divider": semanticColorsDark["divider"],
|
|
888
|
+
"--color-brand-primary-hover": semanticColorsDark["brand-primary-hover"],
|
|
889
|
+
"--color-brand-primary-active": semanticColorsDark["brand-primary-active"],
|
|
890
|
+
"--color-brand-secondary-hover": semanticColorsDark["brand-secondary-hover"],
|
|
891
|
+
"--color-brand-secondary-active": semanticColorsDark["brand-secondary-active"],
|
|
892
|
+
"--color-status-success-light": semanticColorsDark["status-success-light"],
|
|
893
|
+
"--color-status-success-dark": semanticColorsDark["status-success-dark"],
|
|
894
|
+
"--color-status-error-light": semanticColorsDark["status-error-light"],
|
|
895
|
+
"--color-status-error-dark": semanticColorsDark["status-error-dark"],
|
|
896
|
+
"--color-status-warning-light": semanticColorsDark["status-warning-light"],
|
|
897
|
+
"--color-status-warning-dark": semanticColorsDark["status-warning-dark"],
|
|
898
|
+
"--color-status-info-light": semanticColorsDark["status-info-light"],
|
|
899
|
+
"--color-status-info-dark": semanticColorsDark["status-info-dark"],
|
|
900
|
+
"--color-on-status-success": semanticColorsDark["on-status-success"],
|
|
901
|
+
"--color-on-status-error": semanticColorsDark["on-status-error"],
|
|
902
|
+
"--color-on-status-warning": semanticColorsDark["on-status-warning"],
|
|
903
|
+
"--color-on-status-info": semanticColorsDark["on-status-info"],
|
|
904
|
+
"--color-result-improve": semanticColorsDark["result-improve"],
|
|
905
|
+
"--color-result-improve-light": semanticColorsDark["result-improve-light"],
|
|
906
|
+
"--color-result-improve-dark": semanticColorsDark["result-improve-dark"],
|
|
907
|
+
"--color-result-degrade": semanticColorsDark["result-degrade"],
|
|
908
|
+
"--color-result-degrade-light": semanticColorsDark["result-degrade-light"],
|
|
909
|
+
"--color-result-degrade-dark": semanticColorsDark["result-degrade-dark"],
|
|
910
|
+
"--color-result-inconclusive": semanticColorsDark["result-inconclusive"],
|
|
911
|
+
"--color-result-inconclusive-light": semanticColorsDark["result-inconclusive-light"],
|
|
912
|
+
"--color-result-neutral": semanticColorsDark["result-neutral"],
|
|
913
|
+
"--color-on-result-improve": semanticColorsDark["on-result-improve"],
|
|
914
|
+
"--color-on-result-degrade": semanticColorsDark["on-result-degrade"],
|
|
915
|
+
"--color-on-result-inconclusive": semanticColorsDark["on-result-inconclusive"],
|
|
916
|
+
"--color-data-1": semanticColorsDark["data-1"],
|
|
917
|
+
"--color-data-2": semanticColorsDark["data-2"],
|
|
918
|
+
"--color-data-3": semanticColorsDark["data-3"],
|
|
919
|
+
"--color-data-4": semanticColorsDark["data-4"],
|
|
920
|
+
"--color-data-5": semanticColorsDark["data-5"],
|
|
921
|
+
"--color-data-6": semanticColorsDark["data-6"],
|
|
922
|
+
"--color-data-7": semanticColorsDark["data-7"],
|
|
923
|
+
"--color-data-8": semanticColorsDark["data-8"],
|
|
924
|
+
"--color-data-9": semanticColorsDark["data-9"],
|
|
925
|
+
"--color-data-10": semanticColorsDark["data-10"],
|
|
926
|
+
"--color-text-link-hover": semanticColorsDark["text-link-hover"],
|
|
927
|
+
"--color-surface-overlay": semanticColorsDark["surface-overlay"],
|
|
928
|
+
"--color-surface-input": semanticColorsDark["surface-input"],
|
|
929
|
+
"--color-border-input": semanticColorsDark["border-input"],
|
|
930
|
+
"--color-border-input-hover": semanticColorsDark["border-input-hover"],
|
|
931
|
+
"--color-border-input-focus": semanticColorsDark["border-input-focus"],
|
|
932
|
+
"--color-border-input-error": semanticColorsDark["border-input-error"],
|
|
933
|
+
"--color-interactive-disabled-text": semanticColorsDark["interactive-disabled-text"],
|
|
934
|
+
"--color-avatar-background": semanticColorsDark["avatar-background"],
|
|
935
|
+
"--color-avatar-text": semanticColorsDark["avatar-text"],
|
|
936
|
+
...themeIndependentCSSVars
|
|
815
937
|
};
|
|
816
938
|
function getThemeCSSVars(mode) {
|
|
817
939
|
return mode === "dark" ? darkThemeCSSVars : lightThemeCSSVars;
|
|
@@ -1560,6 +1682,39 @@ function validateCssPropertyManifest(candidate) {
|
|
|
1560
1682
|
function isCssPropertyManifest(candidate) {
|
|
1561
1683
|
return validateCssPropertyManifest(candidate).valid;
|
|
1562
1684
|
}
|
|
1685
|
+
function wrapJsx(fn) {
|
|
1686
|
+
return function(type, props, ...rest) {
|
|
1687
|
+
if (props && typeof props.className === "string" && props.className) {
|
|
1688
|
+
const cn = props.className;
|
|
1689
|
+
const cssStyle = { $$css: true, [cn]: cn };
|
|
1690
|
+
const existing = props.style;
|
|
1691
|
+
props = {
|
|
1692
|
+
...props,
|
|
1693
|
+
style: existing ? [cssStyle, existing] : cssStyle
|
|
1694
|
+
};
|
|
1695
|
+
delete props.className;
|
|
1696
|
+
}
|
|
1697
|
+
return fn(type, props, ...rest);
|
|
1698
|
+
};
|
|
1699
|
+
}
|
|
1700
|
+
var jsx = wrapJsx(jsxRuntime.jsx);
|
|
1701
|
+
|
|
1702
|
+
// src/theme/ThemeProvider.tsx
|
|
1703
|
+
var MODE_VARS = {
|
|
1704
|
+
dark: nativewind.vars(darkThemeCSSVars),
|
|
1705
|
+
light: nativewind.vars(lightThemeCSSVars)
|
|
1706
|
+
};
|
|
1707
|
+
function ThemeProvider({
|
|
1708
|
+
mode = "dark",
|
|
1709
|
+
style,
|
|
1710
|
+
children,
|
|
1711
|
+
...props
|
|
1712
|
+
}) {
|
|
1713
|
+
return /* @__PURE__ */ jsx(reactNative.View, { style: [MODE_VARS[mode], { flex: 1 }, style], ...props, children });
|
|
1714
|
+
}
|
|
1715
|
+
function resolveColor(token, mode = "dark") {
|
|
1716
|
+
return reactNative.Platform.OS === "web" ? `var(--color-${token})` : getSemanticColors(mode)[token];
|
|
1717
|
+
}
|
|
1563
1718
|
|
|
1564
1719
|
// src/theme/presets/apply.ts
|
|
1565
1720
|
function colorKeyToVar(key) {
|
|
@@ -1724,6 +1879,7 @@ var audiobookPreset = {
|
|
|
1724
1879
|
rootClasses: ["atmosphere-warm", "grain"]
|
|
1725
1880
|
};
|
|
1726
1881
|
|
|
1882
|
+
exports.ThemeProvider = ThemeProvider;
|
|
1727
1883
|
exports.applyThemePreset = applyThemePreset;
|
|
1728
1884
|
exports.audiobookPreset = audiobookPreset;
|
|
1729
1885
|
exports.buttonSizes = buttonSizes;
|
|
@@ -1763,6 +1919,7 @@ exports.primitiveShadows = primitiveShadows;
|
|
|
1763
1919
|
exports.primitiveSpacing = primitiveSpacing;
|
|
1764
1920
|
exports.primitiveTypography = primitiveTypography;
|
|
1765
1921
|
exports.primitiveZIndex = primitiveZIndex;
|
|
1922
|
+
exports.resolveColor = resolveColor;
|
|
1766
1923
|
exports.rgbToHex = rgbToHex;
|
|
1767
1924
|
exports.rgbToHsv = rgbToHsv;
|
|
1768
1925
|
exports.semanticColorsDark = semanticColorsDark;
|