@titan-design/react-ui 0.4.0 → 0.5.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/MesoStatusCard-CQk71hSi.d.mts +77 -0
- package/dist/MesoStatusCard-CQk71hSi.d.ts +77 -0
- package/dist/bodymap.d.mts +246 -3
- package/dist/bodymap.d.ts +246 -3
- package/dist/bodymap.mjs +1911 -6
- package/dist/bodymap.mjs.map +1 -1
- package/dist/index.d.mts +31 -738
- package/dist/index.d.ts +31 -738
- package/dist/index.js +894 -1692
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10287 -8203
- package/dist/index.mjs.map +1 -1
- package/dist/pages-D7Jlssvp.d.ts +791 -0
- package/dist/pages-MO0JCySL.d.mts +791 -0
- package/dist/pages.d.mts +4 -0
- package/dist/pages.d.ts +4 -0
- package/dist/pages.js +6646 -0
- package/dist/pages.js.map +1 -0
- package/dist/pages.mjs +6626 -0
- package/dist/pages.mjs.map +1 -0
- package/dist/theme/index.d.mts +12 -12
- package/dist/theme/index.d.ts +12 -12
- package/dist/theme/index.js +30 -30
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +1880 -2
- package/dist/theme/index.mjs.map +1 -1
- package/dist/theme/tokens-css.mjs +573 -1
- package/dist/theme/tokens-css.mjs.map +1 -1
- package/package.json +9 -7
- package/src/components/custom/Workout/BaseBadge.stories.tsx +3 -3
- package/src/components/custom/Workout/BaseBadge.test.tsx +1 -1
- package/src/components/custom/Workout/BaseBadge.tsx +1 -1
- package/src/components/custom/Workout/ExerciseCard.tsx +5 -1
- package/src/components/custom/Workout/ExerciseDetailPage.tsx +17 -4
- package/src/components/custom/Workout/IntensityBar.test.tsx +112 -60
- package/src/components/custom/Workout/IntensityBar.tsx +109 -58
- package/src/components/custom/Workout/PlaceholderStrip.tsx +5 -9
- package/src/components/custom/Workout/PrBadge.tsx +3 -3
- package/src/components/custom/Workout/PrHistoryModal.tsx +2 -2
- package/src/components/custom/Workout/README.md +50 -0
- package/src/components/custom/Workout/RestTimer.test.tsx +41 -10
- package/src/components/custom/Workout/RestTimer.tsx +48 -43
- package/src/components/custom/Workout/SetRow.tsx +10 -1
- package/src/components/custom/Workout/TempoDisplay.stories.tsx +69 -2
- package/src/components/custom/Workout/TempoDisplay.test.tsx +35 -0
- package/src/components/custom/Workout/TempoDisplay.tsx +104 -1
- package/src/components/custom/Workout/VelocityStrip.test.tsx +89 -2
- package/src/components/custom/Workout/VelocityStrip.tsx +203 -38
- package/src/components/custom/Workout/WeekRow.test.tsx +2 -2
- package/src/components/custom/Workout/WeightBadge.test.tsx +2 -2
- package/src/components/custom/Workout/WeightBadge.tsx +2 -2
- package/src/components/custom/Workout/icons.tsx +68 -0
- package/src/components/custom/Workout/index.ts +38 -47
- package/src/index.ts +3 -2
- package/src/pages.ts +61 -0
- package/src/test/stories-smoke.test.tsx +50 -0
- package/src/theme/barrel.ts +53 -0
- package/src/theme/index.ts +8 -43
- package/src/theme/native-theming-guard.test.ts +117 -0
- package/dist/bodymap-BhG55xHM.d.mts +0 -318
- package/dist/bodymap-BhG55xHM.d.ts +0 -318
- package/dist/chunk-2SISKTWM.mjs +0 -1027
- package/dist/chunk-2SISKTWM.mjs.map +0 -1
- package/dist/chunk-7XPB4NAO.mjs +0 -1013
- package/dist/chunk-7XPB4NAO.mjs.map +0 -1
- package/dist/chunk-SNVKL5WZ.mjs +0 -883
- package/dist/chunk-SNVKL5WZ.mjs.map +0 -1
package/dist/theme/index.d.mts
CHANGED
|
@@ -1615,18 +1615,6 @@ declare function validateCssPropertyManifest(candidate: unknown): ManifestValida
|
|
|
1615
1615
|
/** Type guard variant of validateCssPropertyManifest for use in narrowing contexts. */
|
|
1616
1616
|
declare function isCssPropertyManifest(candidate: unknown): candidate is CssPropertyManifest;
|
|
1617
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
1618
|
type ColorToken = keyof ReturnType<typeof getSemanticColors>;
|
|
1631
1619
|
/**
|
|
1632
1620
|
* Resolve a semantic color token for an inline style where a nativewind
|
|
@@ -1641,6 +1629,18 @@ type ColorToken = keyof ReturnType<typeof getSemanticColors>;
|
|
|
1641
1629
|
*/
|
|
1642
1630
|
declare function resolveColor(token: ColorToken, mode?: ThemeMode): string;
|
|
1643
1631
|
|
|
1632
|
+
type ThemeProviderMode = 'dark' | 'light';
|
|
1633
|
+
interface ThemeProviderProps extends ViewProps {
|
|
1634
|
+
/** Theme mode to register. Mobile is dark-only today; defaults to `dark`. */
|
|
1635
|
+
mode?: ThemeProviderMode;
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* Wrap the app root so descendant titan components' `--color-*` className tokens
|
|
1639
|
+
* resolve on native. Fills its parent (`flex: 1`) by default; pass `style` to
|
|
1640
|
+
* override. On web it is harmless (the dashboard already loads `global.css`).
|
|
1641
|
+
*/
|
|
1642
|
+
declare function ThemeProvider({ mode, style, children, ...props }: ThemeProviderProps): React.JSX.Element;
|
|
1643
|
+
|
|
1644
1644
|
interface ThemePresetColors {
|
|
1645
1645
|
'brand-primary'?: string;
|
|
1646
1646
|
'brand-primary-light'?: string;
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1615,18 +1615,6 @@ declare function validateCssPropertyManifest(candidate: unknown): ManifestValida
|
|
|
1615
1615
|
/** Type guard variant of validateCssPropertyManifest for use in narrowing contexts. */
|
|
1616
1616
|
declare function isCssPropertyManifest(candidate: unknown): candidate is CssPropertyManifest;
|
|
1617
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
1618
|
type ColorToken = keyof ReturnType<typeof getSemanticColors>;
|
|
1631
1619
|
/**
|
|
1632
1620
|
* Resolve a semantic color token for an inline style where a nativewind
|
|
@@ -1641,6 +1629,18 @@ type ColorToken = keyof ReturnType<typeof getSemanticColors>;
|
|
|
1641
1629
|
*/
|
|
1642
1630
|
declare function resolveColor(token: ColorToken, mode?: ThemeMode): string;
|
|
1643
1631
|
|
|
1632
|
+
type ThemeProviderMode = 'dark' | 'light';
|
|
1633
|
+
interface ThemeProviderProps extends ViewProps {
|
|
1634
|
+
/** Theme mode to register. Mobile is dark-only today; defaults to `dark`. */
|
|
1635
|
+
mode?: ThemeProviderMode;
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* Wrap the app root so descendant titan components' `--color-*` className tokens
|
|
1639
|
+
* resolve on native. Fills its parent (`flex: 1`) by default; pass `style` to
|
|
1640
|
+
* override. On web it is harmless (the dashboard already loads `global.css`).
|
|
1641
|
+
*/
|
|
1642
|
+
declare function ThemeProvider({ mode, style, children, ...props }: ThemeProviderProps): React.JSX.Element;
|
|
1643
|
+
|
|
1644
1644
|
interface ThemePresetColors {
|
|
1645
1645
|
'brand-primary'?: string;
|
|
1646
1646
|
'brand-primary-light'?: string;
|
package/dist/theme/index.js
CHANGED
|
@@ -1682,36 +1682,6 @@ function validateCssPropertyManifest(candidate) {
|
|
|
1682
1682
|
function isCssPropertyManifest(candidate) {
|
|
1683
1683
|
return validateCssPropertyManifest(candidate).valid;
|
|
1684
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
1685
|
function resolveColor(token, mode = "dark") {
|
|
1716
1686
|
return reactNative.Platform.OS === "web" ? `var(--color-${token})` : getSemanticColors(mode)[token];
|
|
1717
1687
|
}
|
|
@@ -1878,6 +1848,36 @@ var audiobookPreset = {
|
|
|
1878
1848
|
},
|
|
1879
1849
|
rootClasses: ["atmosphere-warm", "grain"]
|
|
1880
1850
|
};
|
|
1851
|
+
function wrapJsx(fn) {
|
|
1852
|
+
return function(type, props, ...rest) {
|
|
1853
|
+
if (props && typeof props.className === "string" && props.className) {
|
|
1854
|
+
const cn = props.className;
|
|
1855
|
+
const cssStyle = { $$css: true, [cn]: cn };
|
|
1856
|
+
const existing = props.style;
|
|
1857
|
+
props = {
|
|
1858
|
+
...props,
|
|
1859
|
+
style: existing ? [cssStyle, existing] : cssStyle
|
|
1860
|
+
};
|
|
1861
|
+
delete props.className;
|
|
1862
|
+
}
|
|
1863
|
+
return fn(type, props, ...rest);
|
|
1864
|
+
};
|
|
1865
|
+
}
|
|
1866
|
+
var jsx = wrapJsx(jsxRuntime.jsx);
|
|
1867
|
+
|
|
1868
|
+
// src/theme/ThemeProvider.tsx
|
|
1869
|
+
var MODE_VARS = {
|
|
1870
|
+
dark: nativewind.vars(darkThemeCSSVars),
|
|
1871
|
+
light: nativewind.vars(lightThemeCSSVars)
|
|
1872
|
+
};
|
|
1873
|
+
function ThemeProvider({
|
|
1874
|
+
mode = "dark",
|
|
1875
|
+
style,
|
|
1876
|
+
children,
|
|
1877
|
+
...props
|
|
1878
|
+
}) {
|
|
1879
|
+
return /* @__PURE__ */ jsx(reactNative.View, { style: [MODE_VARS[mode], { flex: 1 }, style], ...props, children });
|
|
1880
|
+
}
|
|
1881
1881
|
|
|
1882
1882
|
exports.ThemeProvider = ThemeProvider;
|
|
1883
1883
|
exports.applyThemePreset = applyThemePreset;
|