react-native-terra-ui 0.1.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/README.md +70 -0
- package/lib/module/components/avatar/Avatar.js +121 -0
- package/lib/module/components/avatar/Avatar.js.map +1 -0
- package/lib/module/components/avatar/index.js +4 -0
- package/lib/module/components/avatar/index.js.map +1 -0
- package/lib/module/components/avatar/types.js +4 -0
- package/lib/module/components/avatar/types.js.map +1 -0
- package/lib/module/components/box/Box.js +49 -0
- package/lib/module/components/box/Box.js.map +1 -0
- package/lib/module/components/box/index.js +4 -0
- package/lib/module/components/box/index.js.map +1 -0
- package/lib/module/components/box/utils.js +95 -0
- package/lib/module/components/box/utils.js.map +1 -0
- package/lib/module/components/button/Button.js +281 -0
- package/lib/module/components/button/Button.js.map +1 -0
- package/lib/module/components/button/index.js +4 -0
- package/lib/module/components/button/index.js.map +1 -0
- package/lib/module/components/header/Header.js +25 -0
- package/lib/module/components/header/Header.js.map +1 -0
- package/lib/module/components/header/header-buttons.js +65 -0
- package/lib/module/components/header/header-buttons.js.map +1 -0
- package/lib/module/components/header/index.js +7 -0
- package/lib/module/components/header/index.js.map +1 -0
- package/lib/module/components/header/variants/LargeTitleHeader/index.js +335 -0
- package/lib/module/components/header/variants/LargeTitleHeader/index.js.map +1 -0
- package/lib/module/components/header/variants/TitleHeader/index.js +184 -0
- package/lib/module/components/header/variants/TitleHeader/index.js.map +1 -0
- package/lib/module/components/icon/Icon.js +53 -0
- package/lib/module/components/icon/Icon.js.map +1 -0
- package/lib/module/components/icon/index.js +4 -0
- package/lib/module/components/icon/index.js.map +1 -0
- package/lib/module/components/icon/utils.js +188 -0
- package/lib/module/components/icon/utils.js.map +1 -0
- package/lib/module/components/index.js +16 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/components/page-indicator/PageIndicator.js +49 -0
- package/lib/module/components/page-indicator/PageIndicator.js.map +1 -0
- package/lib/module/components/page-indicator/PageIndicatorRoot.js +24 -0
- package/lib/module/components/page-indicator/PageIndicatorRoot.js.map +1 -0
- package/lib/module/components/page-indicator/hooks/use-page-indicator-colors.js +24 -0
- package/lib/module/components/page-indicator/hooks/use-page-indicator-colors.js.map +1 -0
- package/lib/module/components/page-indicator/hooks/use-page-indicator-core.js +20 -0
- package/lib/module/components/page-indicator/hooks/use-page-indicator-core.js.map +1 -0
- package/lib/module/components/page-indicator/hooks/use-page-indicator-progress.js +68 -0
- package/lib/module/components/page-indicator/hooks/use-page-indicator-progress.js.map +1 -0
- package/lib/module/components/page-indicator/index.js +5 -0
- package/lib/module/components/page-indicator/index.js.map +1 -0
- package/lib/module/components/page-indicator/utils.js +127 -0
- package/lib/module/components/page-indicator/utils.js.map +1 -0
- package/lib/module/components/page-indicator/variants/DotIndicator/InactiveDot.js +50 -0
- package/lib/module/components/page-indicator/variants/DotIndicator/InactiveDot.js.map +1 -0
- package/lib/module/components/page-indicator/variants/DotIndicator/LoadingOrbit.js +165 -0
- package/lib/module/components/page-indicator/variants/DotIndicator/LoadingOrbit.js.map +1 -0
- package/lib/module/components/page-indicator/variants/DotIndicator/TravelingPill.js +60 -0
- package/lib/module/components/page-indicator/variants/DotIndicator/TravelingPill.js.map +1 -0
- package/lib/module/components/page-indicator/variants/DotIndicator/index.js +87 -0
- package/lib/module/components/page-indicator/variants/DotIndicator/index.js.map +1 -0
- package/lib/module/components/page-indicator/variants/DotIndicator/utils.js +28 -0
- package/lib/module/components/page-indicator/variants/DotIndicator/utils.js.map +1 -0
- package/lib/module/components/page-indicator/variants/PillIndicator/PillIndicatorDot.js +53 -0
- package/lib/module/components/page-indicator/variants/PillIndicator/PillIndicatorDot.js.map +1 -0
- package/lib/module/components/page-indicator/variants/PillIndicator/index.js +76 -0
- package/lib/module/components/page-indicator/variants/PillIndicator/index.js.map +1 -0
- package/lib/module/components/page-indicator/variants/PillIndicator/utils.js +47 -0
- package/lib/module/components/page-indicator/variants/PillIndicator/utils.js.map +1 -0
- package/lib/module/components/portal/PortalContext.js +20 -0
- package/lib/module/components/portal/PortalContext.js.map +1 -0
- package/lib/module/components/portal/PortalHost.js +23 -0
- package/lib/module/components/portal/PortalHost.js.map +1 -0
- package/lib/module/components/portal/PortalProvider.js +40 -0
- package/lib/module/components/portal/PortalProvider.js.map +1 -0
- package/lib/module/components/portal/index.js +6 -0
- package/lib/module/components/portal/index.js.map +1 -0
- package/lib/module/components/screen/Screen.js +100 -0
- package/lib/module/components/screen/Screen.js.map +1 -0
- package/lib/module/components/screen/ScreenContext.js +66 -0
- package/lib/module/components/screen/ScreenContext.js.map +1 -0
- package/lib/module/components/screen/ScreenFlatList.js +75 -0
- package/lib/module/components/screen/ScreenFlatList.js.map +1 -0
- package/lib/module/components/screen/ScreenScrollView.js +82 -0
- package/lib/module/components/screen/ScreenScrollView.js.map +1 -0
- package/lib/module/components/screen/index.js +7 -0
- package/lib/module/components/screen/index.js.map +1 -0
- package/lib/module/components/screen/utils.js +13 -0
- package/lib/module/components/screen/utils.js.map +1 -0
- package/lib/module/components/slot/Slot.js +38 -0
- package/lib/module/components/slot/Slot.js.map +1 -0
- package/lib/module/components/slot/index.js +10 -0
- package/lib/module/components/slot/index.js.map +1 -0
- package/lib/module/components/slot/utils.js +55 -0
- package/lib/module/components/slot/utils.js.map +1 -0
- package/lib/module/components/spinner/Spinner.js +132 -0
- package/lib/module/components/spinner/Spinner.js.map +1 -0
- package/lib/module/components/spinner/index.js +4 -0
- package/lib/module/components/spinner/index.js.map +1 -0
- package/lib/module/components/surface/Surface.js +74 -0
- package/lib/module/components/surface/Surface.js.map +1 -0
- package/lib/module/components/surface/index.js +4 -0
- package/lib/module/components/surface/index.js.map +1 -0
- package/lib/module/components/text/Text.js +67 -0
- package/lib/module/components/text/Text.js.map +1 -0
- package/lib/module/components/text/index.js +4 -0
- package/lib/module/components/text/index.js.map +1 -0
- package/lib/module/components/toast/Toast.js +350 -0
- package/lib/module/components/toast/Toast.js.map +1 -0
- package/lib/module/components/toast/ToastProvider.js +272 -0
- package/lib/module/components/toast/ToastProvider.js.map +1 -0
- package/lib/module/components/toast/index.js +5 -0
- package/lib/module/components/toast/index.js.map +1 -0
- package/lib/module/components/toast/parts/ToastAnimatedItem.js +168 -0
- package/lib/module/components/toast/parts/ToastAnimatedItem.js.map +1 -0
- package/lib/module/components/toast/types.js +4 -0
- package/lib/module/components/toast/types.js.map +1 -0
- package/lib/module/components/toast/utils/controller.js +19 -0
- package/lib/module/components/toast/utils/controller.js.map +1 -0
- package/lib/module/context/ThemeProvider.js +66 -0
- package/lib/module/context/ThemeProvider.js.map +1 -0
- package/lib/module/context/index.js +4 -0
- package/lib/module/context/index.js.map +1 -0
- package/lib/module/index.js +8 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/theme/configure.js +152 -0
- package/lib/module/theme/configure.js.map +1 -0
- package/lib/module/theme/index.js +22 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/runtime.js +25 -0
- package/lib/module/theme/runtime.js.map +1 -0
- package/lib/module/theme/theme.js +121 -0
- package/lib/module/theme/theme.js.map +1 -0
- package/lib/module/theme/tokens/dark.js +109 -0
- package/lib/module/theme/tokens/dark.js.map +1 -0
- package/lib/module/theme/tokens/light.js +115 -0
- package/lib/module/theme/tokens/light.js.map +1 -0
- package/lib/module/theme/tokens/primitives.js +228 -0
- package/lib/module/theme/tokens/primitives.js.map +1 -0
- package/lib/module/theme/types.js +4 -0
- package/lib/module/theme/types.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils/accent-utils.js +52 -0
- package/lib/module/utils/accent-utils.js.map +1 -0
- package/lib/module/utils/color-utils.js +53 -0
- package/lib/module/utils/color-utils.js.map +1 -0
- package/lib/module/utils/deep-merge.js +28 -0
- package/lib/module/utils/deep-merge.js.map +1 -0
- package/lib/module/utils/resolve-theme-color.js +20 -0
- package/lib/module/utils/resolve-theme-color.js.map +1 -0
- package/lib/module/utils/typography.js +13 -0
- package/lib/module/utils/typography.js.map +1 -0
- package/lib/module/utils/unflatten.js +35 -0
- package/lib/module/utils/unflatten.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/components/avatar/Avatar.d.ts +3 -0
- package/lib/typescript/src/components/avatar/Avatar.d.ts.map +1 -0
- package/lib/typescript/src/components/avatar/index.d.ts +3 -0
- package/lib/typescript/src/components/avatar/index.d.ts.map +1 -0
- package/lib/typescript/src/components/avatar/types.d.ts +30 -0
- package/lib/typescript/src/components/avatar/types.d.ts.map +1 -0
- package/lib/typescript/src/components/box/Box.d.ts +12 -0
- package/lib/typescript/src/components/box/Box.d.ts.map +1 -0
- package/lib/typescript/src/components/box/index.d.ts +4 -0
- package/lib/typescript/src/components/box/index.d.ts.map +1 -0
- package/lib/typescript/src/components/box/utils.d.ts +39 -0
- package/lib/typescript/src/components/box/utils.d.ts.map +1 -0
- package/lib/typescript/src/components/button/Button.d.ts +46 -0
- package/lib/typescript/src/components/button/Button.d.ts.map +1 -0
- package/lib/typescript/src/components/button/index.d.ts +3 -0
- package/lib/typescript/src/components/button/index.d.ts.map +1 -0
- package/lib/typescript/src/components/header/Header.d.ts +22 -0
- package/lib/typescript/src/components/header/Header.d.ts.map +1 -0
- package/lib/typescript/src/components/header/header-buttons.d.ts +16 -0
- package/lib/typescript/src/components/header/header-buttons.d.ts.map +1 -0
- package/lib/typescript/src/components/header/index.d.ts +7 -0
- package/lib/typescript/src/components/header/index.d.ts.map +1 -0
- package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts +25 -0
- package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts.map +1 -0
- package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts +28 -0
- package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/Icon.d.ts +22 -0
- package/lib/typescript/src/components/icon/Icon.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/index.d.ts +3 -0
- package/lib/typescript/src/components/icon/index.d.ts.map +1 -0
- package/lib/typescript/src/components/icon/utils.d.ts +4 -0
- package/lib/typescript/src/components/icon/utils.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +14 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/PageIndicator.d.ts +48 -0
- package/lib/typescript/src/components/page-indicator/PageIndicator.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/PageIndicatorRoot.d.ts +13 -0
- package/lib/typescript/src/components/page-indicator/PageIndicatorRoot.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-colors.d.ts +14 -0
- package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-colors.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-core.d.ts +11 -0
- package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-core.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-progress.d.ts +19 -0
- package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-progress.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/index.d.ts +4 -0
- package/lib/typescript/src/components/page-indicator/index.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/utils.d.ts +36 -0
- package/lib/typescript/src/components/page-indicator/utils.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/InactiveDot.d.ts +14 -0
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/InactiveDot.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/LoadingOrbit.d.ts +11 -0
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/LoadingOrbit.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/TravelingPill.d.ts +15 -0
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/TravelingPill.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/index.d.ts +32 -0
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/index.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/utils.d.ts +14 -0
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/utils.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/variants/PillIndicator/PillIndicatorDot.d.ts +16 -0
- package/lib/typescript/src/components/page-indicator/variants/PillIndicator/PillIndicatorDot.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/variants/PillIndicator/index.d.ts +28 -0
- package/lib/typescript/src/components/page-indicator/variants/PillIndicator/index.d.ts.map +1 -0
- package/lib/typescript/src/components/page-indicator/variants/PillIndicator/utils.d.ts +21 -0
- package/lib/typescript/src/components/page-indicator/variants/PillIndicator/utils.d.ts.map +1 -0
- package/lib/typescript/src/components/portal/PortalContext.d.ts +19 -0
- package/lib/typescript/src/components/portal/PortalContext.d.ts.map +1 -0
- package/lib/typescript/src/components/portal/PortalHost.d.ts +7 -0
- package/lib/typescript/src/components/portal/PortalHost.d.ts.map +1 -0
- package/lib/typescript/src/components/portal/PortalProvider.d.ts +11 -0
- package/lib/typescript/src/components/portal/PortalProvider.d.ts.map +1 -0
- package/lib/typescript/src/components/portal/index.d.ts +6 -0
- package/lib/typescript/src/components/portal/index.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/Screen.d.ts +53 -0
- package/lib/typescript/src/components/screen/Screen.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/ScreenContext.d.ts +64 -0
- package/lib/typescript/src/components/screen/ScreenContext.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/ScreenFlatList.d.ts +26 -0
- package/lib/typescript/src/components/screen/ScreenFlatList.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/ScreenScrollView.d.ts +36 -0
- package/lib/typescript/src/components/screen/ScreenScrollView.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/index.d.ts +9 -0
- package/lib/typescript/src/components/screen/index.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/utils.d.ts +10 -0
- package/lib/typescript/src/components/screen/utils.d.ts.map +1 -0
- package/lib/typescript/src/components/slot/Slot.d.ts +17 -0
- package/lib/typescript/src/components/slot/Slot.d.ts.map +1 -0
- package/lib/typescript/src/components/slot/index.d.ts +8 -0
- package/lib/typescript/src/components/slot/index.d.ts.map +1 -0
- package/lib/typescript/src/components/slot/utils.d.ts +17 -0
- package/lib/typescript/src/components/slot/utils.d.ts.map +1 -0
- package/lib/typescript/src/components/spinner/Spinner.d.ts +18 -0
- package/lib/typescript/src/components/spinner/Spinner.d.ts.map +1 -0
- package/lib/typescript/src/components/spinner/index.d.ts +3 -0
- package/lib/typescript/src/components/spinner/index.d.ts.map +1 -0
- package/lib/typescript/src/components/surface/Surface.d.ts +31 -0
- package/lib/typescript/src/components/surface/Surface.d.ts.map +1 -0
- package/lib/typescript/src/components/surface/index.d.ts +3 -0
- package/lib/typescript/src/components/surface/index.d.ts.map +1 -0
- package/lib/typescript/src/components/text/Text.d.ts +23 -0
- package/lib/typescript/src/components/text/Text.d.ts.map +1 -0
- package/lib/typescript/src/components/text/index.d.ts +3 -0
- package/lib/typescript/src/components/text/index.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/Toast.d.ts +71 -0
- package/lib/typescript/src/components/toast/Toast.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/ToastProvider.d.ts +4 -0
- package/lib/typescript/src/components/toast/ToastProvider.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/index.d.ts +5 -0
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/parts/ToastAnimatedItem.d.ts +18 -0
- package/lib/typescript/src/components/toast/parts/ToastAnimatedItem.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/types.d.ts +62 -0
- package/lib/typescript/src/components/toast/types.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/utils/controller.d.ts +5 -0
- package/lib/typescript/src/components/toast/utils/controller.d.ts.map +1 -0
- package/lib/typescript/src/context/ThemeProvider.d.ts +29 -0
- package/lib/typescript/src/context/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/src/context/index.d.ts +3 -0
- package/lib/typescript/src/context/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/theme/configure.d.ts +47 -0
- package/lib/typescript/src/theme/configure.d.ts.map +1 -0
- package/lib/typescript/src/theme/index.d.ts +11 -0
- package/lib/typescript/src/theme/index.d.ts.map +1 -0
- package/lib/typescript/src/theme/runtime.d.ts +7 -0
- package/lib/typescript/src/theme/runtime.d.ts.map +1 -0
- package/lib/typescript/src/theme/theme.d.ts +22 -0
- package/lib/typescript/src/theme/theme.d.ts.map +1 -0
- package/lib/typescript/src/theme/tokens/dark.d.ts +100 -0
- package/lib/typescript/src/theme/tokens/dark.d.ts.map +1 -0
- package/lib/typescript/src/theme/tokens/light.d.ts +106 -0
- package/lib/typescript/src/theme/tokens/light.d.ts.map +1 -0
- package/lib/typescript/src/theme/tokens/primitives.d.ts +212 -0
- package/lib/typescript/src/theme/tokens/primitives.d.ts.map +1 -0
- package/lib/typescript/src/theme/types.d.ts +273 -0
- package/lib/typescript/src/theme/types.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +4 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/utils/accent-utils.d.ts +4 -0
- package/lib/typescript/src/utils/accent-utils.d.ts.map +1 -0
- package/lib/typescript/src/utils/color-utils.d.ts +11 -0
- package/lib/typescript/src/utils/color-utils.d.ts.map +1 -0
- package/lib/typescript/src/utils/deep-merge.d.ts +11 -0
- package/lib/typescript/src/utils/deep-merge.d.ts.map +1 -0
- package/lib/typescript/src/utils/resolve-theme-color.d.ts +12 -0
- package/lib/typescript/src/utils/resolve-theme-color.d.ts.map +1 -0
- package/lib/typescript/src/utils/typography.d.ts +6 -0
- package/lib/typescript/src/utils/typography.d.ts.map +1 -0
- package/lib/typescript/src/utils/unflatten.d.ts +12 -0
- package/lib/typescript/src/utils/unflatten.d.ts.map +1 -0
- package/package.json +137 -0
- package/src/components/avatar/Avatar.tsx +146 -0
- package/src/components/avatar/index.ts +8 -0
- package/src/components/avatar/types.ts +35 -0
- package/src/components/box/Box.tsx +59 -0
- package/src/components/box/index.ts +8 -0
- package/src/components/box/utils.ts +181 -0
- package/src/components/button/Button.tsx +313 -0
- package/src/components/button/index.ts +8 -0
- package/src/components/header/Header.ts +22 -0
- package/src/components/header/header-buttons.tsx +103 -0
- package/src/components/header/index.ts +11 -0
- package/src/components/header/variants/LargeTitleHeader/index.tsx +390 -0
- package/src/components/header/variants/TitleHeader/index.tsx +194 -0
- package/src/components/icon/Icon.tsx +74 -0
- package/src/components/icon/index.ts +2 -0
- package/src/components/icon/utils.tsx +147 -0
- package/src/components/index.ts +13 -0
- package/src/components/page-indicator/PageIndicator.tsx +100 -0
- package/src/components/page-indicator/PageIndicatorRoot.tsx +41 -0
- package/src/components/page-indicator/hooks/use-page-indicator-colors.ts +65 -0
- package/src/components/page-indicator/hooks/use-page-indicator-core.ts +34 -0
- package/src/components/page-indicator/hooks/use-page-indicator-progress.ts +122 -0
- package/src/components/page-indicator/index.ts +13 -0
- package/src/components/page-indicator/utils.ts +208 -0
- package/src/components/page-indicator/variants/DotIndicator/InactiveDot.tsx +70 -0
- package/src/components/page-indicator/variants/DotIndicator/LoadingOrbit.tsx +201 -0
- package/src/components/page-indicator/variants/DotIndicator/TravelingPill.tsx +80 -0
- package/src/components/page-indicator/variants/DotIndicator/index.tsx +145 -0
- package/src/components/page-indicator/variants/DotIndicator/utils.ts +28 -0
- package/src/components/page-indicator/variants/PillIndicator/PillIndicatorDot.tsx +107 -0
- package/src/components/page-indicator/variants/PillIndicator/index.tsx +149 -0
- package/src/components/page-indicator/variants/PillIndicator/utils.ts +63 -0
- package/src/components/portal/PortalContext.tsx +27 -0
- package/src/components/portal/PortalHost.tsx +20 -0
- package/src/components/portal/PortalProvider.tsx +44 -0
- package/src/components/portal/index.ts +5 -0
- package/src/components/screen/Screen.tsx +163 -0
- package/src/components/screen/ScreenContext.tsx +144 -0
- package/src/components/screen/ScreenFlatList.tsx +121 -0
- package/src/components/screen/ScreenScrollView.tsx +130 -0
- package/src/components/screen/index.ts +8 -0
- package/src/components/screen/utils.ts +17 -0
- package/src/components/slot/Slot.tsx +56 -0
- package/src/components/slot/index.ts +8 -0
- package/src/components/slot/utils.ts +61 -0
- package/src/components/spinner/Spinner.tsx +153 -0
- package/src/components/spinner/index.ts +2 -0
- package/src/components/surface/Surface.tsx +100 -0
- package/src/components/surface/index.ts +2 -0
- package/src/components/text/Text.tsx +115 -0
- package/src/components/text/index.ts +2 -0
- package/src/components/toast/Toast.tsx +477 -0
- package/src/components/toast/ToastProvider.tsx +403 -0
- package/src/components/toast/index.ts +26 -0
- package/src/components/toast/parts/ToastAnimatedItem.tsx +184 -0
- package/src/components/toast/types.ts +75 -0
- package/src/components/toast/utils/controller.ts +23 -0
- package/src/context/ThemeProvider.tsx +97 -0
- package/src/context/index.ts +2 -0
- package/src/index.tsx +6 -0
- package/src/theme/configure.ts +215 -0
- package/src/theme/index.ts +72 -0
- package/src/theme/runtime.ts +27 -0
- package/src/theme/theme.ts +152 -0
- package/src/theme/tokens/dark.ts +117 -0
- package/src/theme/tokens/light.ts +123 -0
- package/src/theme/tokens/primitives.ts +232 -0
- package/src/theme/types.ts +384 -0
- package/src/types.ts +1 -0
- package/src/utils/accent-utils.ts +58 -0
- package/src/utils/color-utils.ts +51 -0
- package/src/utils/deep-merge.ts +36 -0
- package/src/utils/resolve-theme-color.ts +27 -0
- package/src/utils/typography.ts +15 -0
- package/src/utils/unflatten.ts +36 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Light-scheme color tokens — flat, dotted-key data (no imports, no types).
|
|
3
|
+
*
|
|
4
|
+
* Convention: [category].[context].[property?].[variant].[state]
|
|
5
|
+
* - property is omitted when the context implies it (surface → bg, text → fg, border → border-color)
|
|
6
|
+
* - property is required when a context carries multiple attributes (action, status)
|
|
7
|
+
*
|
|
8
|
+
* Values use {palette.key} reference notation, resolved against primitives at
|
|
9
|
+
* build time via resolveRefs() in theme.ts. Raw hex is used only where no
|
|
10
|
+
* palette step matches exactly.
|
|
11
|
+
*
|
|
12
|
+
* GENERATED-STYLE SOURCE: intended to be replaced by the Figma / design-sync export.
|
|
13
|
+
*/
|
|
14
|
+
export declare const light: {
|
|
15
|
+
'color.background': string;
|
|
16
|
+
'color.surface.default': string;
|
|
17
|
+
'color.surface.raised': string;
|
|
18
|
+
'color.surface.sunken': string;
|
|
19
|
+
'color.surface.overlay': string;
|
|
20
|
+
'color.surface.accent': string;
|
|
21
|
+
'color.surface.accent.subtle': string;
|
|
22
|
+
'color.text.default': string;
|
|
23
|
+
'color.text.muted': string;
|
|
24
|
+
'color.text.subtle': string;
|
|
25
|
+
'color.text.disabled': string;
|
|
26
|
+
'color.text.inverse': string;
|
|
27
|
+
'color.text.link': string;
|
|
28
|
+
'color.text.accent': string;
|
|
29
|
+
'color.text.on-accent': string;
|
|
30
|
+
'color.text.on-accent-subtle': string;
|
|
31
|
+
'color.border.subtle': string;
|
|
32
|
+
'color.border.default': string;
|
|
33
|
+
'color.border.strong': string;
|
|
34
|
+
'color.border.focus': string;
|
|
35
|
+
'color.border.accent': string;
|
|
36
|
+
'color.action.bg.primary': string;
|
|
37
|
+
'color.action.bg.primary.hover': string;
|
|
38
|
+
'color.action.bg.primary.active': string;
|
|
39
|
+
'color.action.bg.primary.disabled': string;
|
|
40
|
+
'color.action.fg.primary': string;
|
|
41
|
+
'color.action.bg.subtle': string;
|
|
42
|
+
'color.action.bg.subtle.hover': string;
|
|
43
|
+
'color.action.bg.subtle.active': string;
|
|
44
|
+
'color.action.bg.subtle.disabled': string;
|
|
45
|
+
'color.action.fg.subtle': string;
|
|
46
|
+
'color.action.bg.neutral': string;
|
|
47
|
+
'color.action.bg.neutral.hover': string;
|
|
48
|
+
'color.action.bg.neutral.active': string;
|
|
49
|
+
'color.action.bg.neutral.disabled': string;
|
|
50
|
+
'color.action.fg.neutral': string;
|
|
51
|
+
'color.status.bg.success': string;
|
|
52
|
+
'color.status.bg.success.subtle': string;
|
|
53
|
+
'color.status.border.success': string;
|
|
54
|
+
'color.status.border.success.subtle': string;
|
|
55
|
+
'color.status.fg.success': string;
|
|
56
|
+
'color.status.fg.success.subtle': string;
|
|
57
|
+
'color.status.bg.warning': string;
|
|
58
|
+
'color.status.bg.warning.subtle': string;
|
|
59
|
+
'color.status.border.warning': string;
|
|
60
|
+
'color.status.border.warning.subtle': string;
|
|
61
|
+
'color.status.fg.warning': string;
|
|
62
|
+
'color.status.fg.warning.subtle': string;
|
|
63
|
+
'color.status.bg.danger': string;
|
|
64
|
+
'color.status.bg.danger.subtle': string;
|
|
65
|
+
'color.status.border.danger': string;
|
|
66
|
+
'color.status.border.danger.subtle': string;
|
|
67
|
+
'color.status.fg.danger': string;
|
|
68
|
+
'color.status.fg.danger.subtle': string;
|
|
69
|
+
'color.status.bg.info': string;
|
|
70
|
+
'color.status.bg.info.subtle': string;
|
|
71
|
+
'color.status.border.info': string;
|
|
72
|
+
'color.status.border.info.subtle': string;
|
|
73
|
+
'color.status.fg.info': string;
|
|
74
|
+
'color.status.fg.info.subtle': string;
|
|
75
|
+
'elevation.none.shadowColor': string;
|
|
76
|
+
'elevation.none.shadowOpacity': number;
|
|
77
|
+
'elevation.none.shadowRadius': number;
|
|
78
|
+
'elevation.none.shadowOffset.width': number;
|
|
79
|
+
'elevation.none.shadowOffset.height': number;
|
|
80
|
+
'elevation.none.elevation': number;
|
|
81
|
+
'elevation.sm.shadowColor': string;
|
|
82
|
+
'elevation.sm.shadowOpacity': number;
|
|
83
|
+
'elevation.sm.shadowRadius': number;
|
|
84
|
+
'elevation.sm.shadowOffset.width': number;
|
|
85
|
+
'elevation.sm.shadowOffset.height': number;
|
|
86
|
+
'elevation.sm.elevation': number;
|
|
87
|
+
'elevation.md.shadowColor': string;
|
|
88
|
+
'elevation.md.shadowOpacity': number;
|
|
89
|
+
'elevation.md.shadowRadius': number;
|
|
90
|
+
'elevation.md.shadowOffset.width': number;
|
|
91
|
+
'elevation.md.shadowOffset.height': number;
|
|
92
|
+
'elevation.md.elevation': number;
|
|
93
|
+
'elevation.lg.shadowColor': string;
|
|
94
|
+
'elevation.lg.shadowOpacity': number;
|
|
95
|
+
'elevation.lg.shadowRadius': number;
|
|
96
|
+
'elevation.lg.shadowOffset.width': number;
|
|
97
|
+
'elevation.lg.shadowOffset.height': number;
|
|
98
|
+
'elevation.lg.elevation': number;
|
|
99
|
+
'elevation.xl.shadowColor': string;
|
|
100
|
+
'elevation.xl.shadowOpacity': number;
|
|
101
|
+
'elevation.xl.shadowRadius': number;
|
|
102
|
+
'elevation.xl.shadowOffset.width': number;
|
|
103
|
+
'elevation.xl.shadowOffset.height': number;
|
|
104
|
+
'elevation.xl.elevation': number;
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=light.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../../../../src/theme/tokens/light.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6GjB,CAAC"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scheme-agnostic primitive tokens — flat, dotted-key data.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED-STYLE SOURCE: this file is plain data (no imports, no types).
|
|
5
|
+
* It is intended to be replaced by the Figma design-system export. Keys use a
|
|
6
|
+
* fully-flat `a.b.c` path; the runtime theme is rebuilt from these via
|
|
7
|
+
* `unflatten()` in `theme.ts`. Scalar leaves only.
|
|
8
|
+
*
|
|
9
|
+
* `palette.*` is kept for Figma parity / authoring reference; the runtime theme
|
|
10
|
+
* consumes already-resolved semantic colors (see `light.ts` / `dark.ts`) and
|
|
11
|
+
* does not read the palette directly.
|
|
12
|
+
*/
|
|
13
|
+
export declare const primitives: {
|
|
14
|
+
'palette.slate.50': string;
|
|
15
|
+
'palette.slate.100': string;
|
|
16
|
+
'palette.slate.200': string;
|
|
17
|
+
'palette.slate.300': string;
|
|
18
|
+
'palette.slate.400': string;
|
|
19
|
+
'palette.slate.500': string;
|
|
20
|
+
'palette.slate.600': string;
|
|
21
|
+
'palette.slate.700': string;
|
|
22
|
+
'palette.slate.800': string;
|
|
23
|
+
'palette.slate.900': string;
|
|
24
|
+
'palette.slate.950': string;
|
|
25
|
+
'palette.emerald.50': string;
|
|
26
|
+
'palette.emerald.100': string;
|
|
27
|
+
'palette.emerald.200': string;
|
|
28
|
+
'palette.emerald.300': string;
|
|
29
|
+
'palette.emerald.400': string;
|
|
30
|
+
'palette.emerald.500': string;
|
|
31
|
+
'palette.emerald.600': string;
|
|
32
|
+
'palette.emerald.700': string;
|
|
33
|
+
'palette.emerald.800': string;
|
|
34
|
+
'palette.emerald.900': string;
|
|
35
|
+
'palette.emerald.950': string;
|
|
36
|
+
'palette.red.50': string;
|
|
37
|
+
'palette.red.100': string;
|
|
38
|
+
'palette.red.200': string;
|
|
39
|
+
'palette.red.300': string;
|
|
40
|
+
'palette.red.400': string;
|
|
41
|
+
'palette.red.500': string;
|
|
42
|
+
'palette.red.600': string;
|
|
43
|
+
'palette.red.700': string;
|
|
44
|
+
'palette.red.800': string;
|
|
45
|
+
'palette.red.900': string;
|
|
46
|
+
'palette.red.950': string;
|
|
47
|
+
'palette.amber.50': string;
|
|
48
|
+
'palette.amber.100': string;
|
|
49
|
+
'palette.amber.200': string;
|
|
50
|
+
'palette.amber.300': string;
|
|
51
|
+
'palette.amber.400': string;
|
|
52
|
+
'palette.amber.500': string;
|
|
53
|
+
'palette.amber.600': string;
|
|
54
|
+
'palette.amber.700': string;
|
|
55
|
+
'palette.amber.800': string;
|
|
56
|
+
'palette.amber.900': string;
|
|
57
|
+
'palette.amber.950': string;
|
|
58
|
+
'palette.green.50': string;
|
|
59
|
+
'palette.green.100': string;
|
|
60
|
+
'palette.green.200': string;
|
|
61
|
+
'palette.green.300': string;
|
|
62
|
+
'palette.green.400': string;
|
|
63
|
+
'palette.green.500': string;
|
|
64
|
+
'palette.green.600': string;
|
|
65
|
+
'palette.green.700': string;
|
|
66
|
+
'palette.green.800': string;
|
|
67
|
+
'palette.green.900': string;
|
|
68
|
+
'palette.green.950': string;
|
|
69
|
+
'palette.blue.50': string;
|
|
70
|
+
'palette.blue.100': string;
|
|
71
|
+
'palette.blue.200': string;
|
|
72
|
+
'palette.blue.300': string;
|
|
73
|
+
'palette.blue.400': string;
|
|
74
|
+
'palette.blue.500': string;
|
|
75
|
+
'palette.blue.600': string;
|
|
76
|
+
'palette.blue.700': string;
|
|
77
|
+
'palette.blue.800': string;
|
|
78
|
+
'palette.blue.900': string;
|
|
79
|
+
'palette.blue.950': string;
|
|
80
|
+
'palette.sky.50': string;
|
|
81
|
+
'palette.sky.100': string;
|
|
82
|
+
'palette.sky.200': string;
|
|
83
|
+
'palette.sky.300': string;
|
|
84
|
+
'palette.sky.400': string;
|
|
85
|
+
'palette.sky.500': string;
|
|
86
|
+
'palette.sky.600': string;
|
|
87
|
+
'palette.sky.700': string;
|
|
88
|
+
'palette.sky.800': string;
|
|
89
|
+
'palette.sky.900': string;
|
|
90
|
+
'palette.sky.950': string;
|
|
91
|
+
'palette.black': string;
|
|
92
|
+
'palette.white': string;
|
|
93
|
+
'palette.neutral.50': string;
|
|
94
|
+
'palette.neutral.100': string;
|
|
95
|
+
'palette.neutral.200': string;
|
|
96
|
+
'palette.neutral.300': string;
|
|
97
|
+
'palette.neutral.400': string;
|
|
98
|
+
'palette.neutral.500': string;
|
|
99
|
+
'palette.neutral.600': string;
|
|
100
|
+
'palette.neutral.700': string;
|
|
101
|
+
'palette.neutral.800': string;
|
|
102
|
+
'palette.neutral.900': string;
|
|
103
|
+
'palette.neutral.950': string;
|
|
104
|
+
'spacing.0': number;
|
|
105
|
+
'spacing.1': number;
|
|
106
|
+
'spacing.2': number;
|
|
107
|
+
'spacing.3': number;
|
|
108
|
+
'spacing.4': number;
|
|
109
|
+
'spacing.5': number;
|
|
110
|
+
'spacing.6': number;
|
|
111
|
+
'spacing.7': number;
|
|
112
|
+
'spacing.8': number;
|
|
113
|
+
'spacing.9': number;
|
|
114
|
+
'spacing.10': number;
|
|
115
|
+
'spacing.12': number;
|
|
116
|
+
'spacing.14': number;
|
|
117
|
+
'spacing.16': number;
|
|
118
|
+
'spacing.20': number;
|
|
119
|
+
'spacing.24': number;
|
|
120
|
+
'spacing.32': number;
|
|
121
|
+
'radius.base': number;
|
|
122
|
+
'typography.fonts.regular': string;
|
|
123
|
+
'typography.fonts.medium': string;
|
|
124
|
+
'typography.fonts.semibold': string;
|
|
125
|
+
'typography.fonts.bold': string;
|
|
126
|
+
'typography.variants.display-lg.fontSize': number;
|
|
127
|
+
'typography.variants.display-lg.lineHeight': number;
|
|
128
|
+
'typography.variants.display-lg.fontWeight': string;
|
|
129
|
+
'typography.variants.display-lg.letterSpacing': number;
|
|
130
|
+
'typography.variants.display-lg.maxFontSizeMultiplier': number;
|
|
131
|
+
'typography.variants.display-md.fontSize': number;
|
|
132
|
+
'typography.variants.display-md.lineHeight': number;
|
|
133
|
+
'typography.variants.display-md.fontWeight': string;
|
|
134
|
+
'typography.variants.display-md.letterSpacing': number;
|
|
135
|
+
'typography.variants.display-md.maxFontSizeMultiplier': number;
|
|
136
|
+
'typography.variants.display-sm.fontSize': number;
|
|
137
|
+
'typography.variants.display-sm.lineHeight': number;
|
|
138
|
+
'typography.variants.display-sm.fontWeight': string;
|
|
139
|
+
'typography.variants.display-sm.letterSpacing': number;
|
|
140
|
+
'typography.variants.display-sm.maxFontSizeMultiplier': number;
|
|
141
|
+
'typography.variants.headline-lg.fontSize': number;
|
|
142
|
+
'typography.variants.headline-lg.lineHeight': number;
|
|
143
|
+
'typography.variants.headline-lg.fontWeight': string;
|
|
144
|
+
'typography.variants.headline-lg.letterSpacing': number;
|
|
145
|
+
'typography.variants.headline-lg.maxFontSizeMultiplier': number;
|
|
146
|
+
'typography.variants.headline-md.fontSize': number;
|
|
147
|
+
'typography.variants.headline-md.lineHeight': number;
|
|
148
|
+
'typography.variants.headline-md.fontWeight': string;
|
|
149
|
+
'typography.variants.headline-md.letterSpacing': number;
|
|
150
|
+
'typography.variants.headline-md.maxFontSizeMultiplier': number;
|
|
151
|
+
'typography.variants.headline-sm.fontSize': number;
|
|
152
|
+
'typography.variants.headline-sm.lineHeight': number;
|
|
153
|
+
'typography.variants.headline-sm.fontWeight': string;
|
|
154
|
+
'typography.variants.headline-sm.letterSpacing': number;
|
|
155
|
+
'typography.variants.headline-sm.maxFontSizeMultiplier': number;
|
|
156
|
+
'typography.variants.title-lg.fontSize': number;
|
|
157
|
+
'typography.variants.title-lg.lineHeight': number;
|
|
158
|
+
'typography.variants.title-lg.fontWeight': string;
|
|
159
|
+
'typography.variants.title-lg.letterSpacing': number;
|
|
160
|
+
'typography.variants.title-lg.maxFontSizeMultiplier': number;
|
|
161
|
+
'typography.variants.title-md.fontSize': number;
|
|
162
|
+
'typography.variants.title-md.lineHeight': number;
|
|
163
|
+
'typography.variants.title-md.fontWeight': string;
|
|
164
|
+
'typography.variants.title-md.letterSpacing': number;
|
|
165
|
+
'typography.variants.title-md.maxFontSizeMultiplier': number;
|
|
166
|
+
'typography.variants.title-sm.fontSize': number;
|
|
167
|
+
'typography.variants.title-sm.lineHeight': number;
|
|
168
|
+
'typography.variants.title-sm.fontWeight': string;
|
|
169
|
+
'typography.variants.title-sm.letterSpacing': number;
|
|
170
|
+
'typography.variants.title-sm.maxFontSizeMultiplier': number;
|
|
171
|
+
'typography.variants.body-lg.fontSize': number;
|
|
172
|
+
'typography.variants.body-lg.lineHeight': number;
|
|
173
|
+
'typography.variants.body-lg.fontWeight': string;
|
|
174
|
+
'typography.variants.body-lg.letterSpacing': number;
|
|
175
|
+
'typography.variants.body-lg.maxFontSizeMultiplier': number;
|
|
176
|
+
'typography.variants.body-md.fontSize': number;
|
|
177
|
+
'typography.variants.body-md.lineHeight': number;
|
|
178
|
+
'typography.variants.body-md.fontWeight': string;
|
|
179
|
+
'typography.variants.body-md.letterSpacing': number;
|
|
180
|
+
'typography.variants.body-md.maxFontSizeMultiplier': number;
|
|
181
|
+
'typography.variants.body-sm.fontSize': number;
|
|
182
|
+
'typography.variants.body-sm.lineHeight': number;
|
|
183
|
+
'typography.variants.body-sm.fontWeight': string;
|
|
184
|
+
'typography.variants.body-sm.letterSpacing': number;
|
|
185
|
+
'typography.variants.body-sm.maxFontSizeMultiplier': number;
|
|
186
|
+
'typography.variants.label-lg.fontSize': number;
|
|
187
|
+
'typography.variants.label-lg.lineHeight': number;
|
|
188
|
+
'typography.variants.label-lg.fontWeight': string;
|
|
189
|
+
'typography.variants.label-lg.letterSpacing': number;
|
|
190
|
+
'typography.variants.label-lg.maxFontSizeMultiplier': number;
|
|
191
|
+
'typography.variants.label-md.fontSize': number;
|
|
192
|
+
'typography.variants.label-md.lineHeight': number;
|
|
193
|
+
'typography.variants.label-md.fontWeight': string;
|
|
194
|
+
'typography.variants.label-md.letterSpacing': number;
|
|
195
|
+
'typography.variants.label-md.maxFontSizeMultiplier': number;
|
|
196
|
+
'typography.variants.label-sm.fontSize': number;
|
|
197
|
+
'typography.variants.label-sm.lineHeight': number;
|
|
198
|
+
'typography.variants.label-sm.fontWeight': string;
|
|
199
|
+
'typography.variants.label-sm.letterSpacing': number;
|
|
200
|
+
'typography.variants.label-sm.maxFontSizeMultiplier': number;
|
|
201
|
+
'typography.variants.caption.fontSize': number;
|
|
202
|
+
'typography.variants.caption.lineHeight': number;
|
|
203
|
+
'typography.variants.caption.fontWeight': string;
|
|
204
|
+
'typography.variants.caption.letterSpacing': number;
|
|
205
|
+
'typography.variants.caption.maxFontSizeMultiplier': number;
|
|
206
|
+
'opacity.disabled': number;
|
|
207
|
+
'opacity.pressed': number;
|
|
208
|
+
'layout.screen.margin.x': number;
|
|
209
|
+
'layout.screen.margin.y': number;
|
|
210
|
+
'layout.header.height': number;
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=primitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../../src/theme/tokens/primitives.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2NtB,CAAC"}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme typing — the single source of truth for every consumer-facing and
|
|
3
|
+
* structural theme type. The token DATA (tokens/*.ts) is intentionally
|
|
4
|
+
* untyped (Figma-generated); these types describe the runtime theme that the
|
|
5
|
+
* data is unflattened into, plus the public configuration surface.
|
|
6
|
+
*/
|
|
7
|
+
import type { ComponentType } from 'react';
|
|
8
|
+
import type { ImageStyle, StyleProp } from 'react-native';
|
|
9
|
+
import type { DeepPartial } from '#utils/deep-merge';
|
|
10
|
+
/** Spacing scale keys (dp, 4dp base unit). Read as `gap={3}` → string '3'. */
|
|
11
|
+
export type SpacingKey = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '12' | '14' | '16' | '20' | '24' | '32';
|
|
12
|
+
/** Border-radius scale keys. */
|
|
13
|
+
export type RadiusKey = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
|
|
14
|
+
/**
|
|
15
|
+
* The radius tokens offered as a component default. Excludes the extreme/rare
|
|
16
|
+
* steps (`xs`, `2xl`, `3xl`).
|
|
17
|
+
*/
|
|
18
|
+
export type DefaultRadiusToken = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
19
|
+
/** Components whose default appearance can be configured. */
|
|
20
|
+
export type RadiusComponent = 'button' | 'surface';
|
|
21
|
+
/** Elevation preset — platform-aware shadow + Android elevation. */
|
|
22
|
+
export interface ElevationStyle {
|
|
23
|
+
shadowColor: string;
|
|
24
|
+
shadowOpacity: number;
|
|
25
|
+
shadowRadius: number;
|
|
26
|
+
shadowOffset: {
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
};
|
|
30
|
+
/** Android elevation. */
|
|
31
|
+
elevation: number;
|
|
32
|
+
}
|
|
33
|
+
export type ElevationKey = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
34
|
+
export type ElevationScale = Record<ElevationKey, ElevationStyle>;
|
|
35
|
+
export type RoleTextVariant = 'display-lg' | 'display-md' | 'display-sm' | 'headline-lg' | 'headline-md' | 'headline-sm' | 'title-lg' | 'title-md' | 'title-sm' | 'body-lg' | 'body-md' | 'body-sm' | 'label-lg' | 'label-md' | 'label-sm' | 'caption';
|
|
36
|
+
export type HeadingTextVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
37
|
+
export type TextVariant = RoleTextVariant | HeadingTextVariant;
|
|
38
|
+
export type FontWeightToken = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
39
|
+
export interface TypeStyle {
|
|
40
|
+
fontSize: number;
|
|
41
|
+
lineHeight: number;
|
|
42
|
+
fontWeight: FontWeightToken;
|
|
43
|
+
/** Tracking, dp. */
|
|
44
|
+
letterSpacing: number;
|
|
45
|
+
/** Cap OS Dynamic Type scaling to protect layout. */
|
|
46
|
+
maxFontSizeMultiplier: number;
|
|
47
|
+
}
|
|
48
|
+
export interface Typography {
|
|
49
|
+
/**
|
|
50
|
+
* Weight token → font-family name. Defaults to the system font.
|
|
51
|
+
* For custom fonts, point each weight at its own family
|
|
52
|
+
* (e.g. { regular: 'Inter-Regular', semibold: 'Inter-SemiBold' }).
|
|
53
|
+
*/
|
|
54
|
+
fonts: Record<FontWeightToken, string>;
|
|
55
|
+
variants: Record<RoleTextVariant, TypeStyle>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Flat color token map — keys are dotted paths matching the token schema
|
|
59
|
+
* (category prefix `color.` stripped). Accessed as `theme.color['text.default']`.
|
|
60
|
+
*/
|
|
61
|
+
export interface ThemeColor {
|
|
62
|
+
background: string;
|
|
63
|
+
'surface.default': string;
|
|
64
|
+
'surface.raised': string;
|
|
65
|
+
'surface.sunken': string;
|
|
66
|
+
'surface.overlay': string;
|
|
67
|
+
'surface.accent': string;
|
|
68
|
+
'surface.accent.subtle': string;
|
|
69
|
+
'text.default': string;
|
|
70
|
+
'text.muted': string;
|
|
71
|
+
'text.subtle': string;
|
|
72
|
+
'text.disabled': string;
|
|
73
|
+
'text.inverse': string;
|
|
74
|
+
'text.link': string;
|
|
75
|
+
'text.accent': string;
|
|
76
|
+
'text.on-accent': string;
|
|
77
|
+
'text.on-accent-subtle': string;
|
|
78
|
+
'border.subtle': string;
|
|
79
|
+
'border.default': string;
|
|
80
|
+
'border.strong': string;
|
|
81
|
+
'border.focus': string;
|
|
82
|
+
'border.accent': string;
|
|
83
|
+
'action.bg.primary': string;
|
|
84
|
+
'action.bg.primary.hover': string;
|
|
85
|
+
'action.bg.primary.active': string;
|
|
86
|
+
'action.bg.primary.disabled': string;
|
|
87
|
+
'action.fg.primary': string;
|
|
88
|
+
'action.bg.subtle': string;
|
|
89
|
+
'action.bg.subtle.hover': string;
|
|
90
|
+
'action.bg.subtle.active': string;
|
|
91
|
+
'action.bg.subtle.disabled': string;
|
|
92
|
+
'action.fg.subtle': string;
|
|
93
|
+
'action.bg.neutral': string;
|
|
94
|
+
'action.bg.neutral.hover': string;
|
|
95
|
+
'action.bg.neutral.active': string;
|
|
96
|
+
'action.bg.neutral.disabled': string;
|
|
97
|
+
'action.fg.neutral': string;
|
|
98
|
+
'status.bg.success': string;
|
|
99
|
+
'status.bg.success.subtle': string;
|
|
100
|
+
'status.border.success': string;
|
|
101
|
+
'status.border.success.subtle': string;
|
|
102
|
+
'status.fg.success': string;
|
|
103
|
+
'status.fg.success.subtle': string;
|
|
104
|
+
'status.bg.warning': string;
|
|
105
|
+
'status.bg.warning.subtle': string;
|
|
106
|
+
'status.border.warning': string;
|
|
107
|
+
'status.border.warning.subtle': string;
|
|
108
|
+
'status.fg.warning': string;
|
|
109
|
+
'status.fg.warning.subtle': string;
|
|
110
|
+
'status.bg.danger': string;
|
|
111
|
+
'status.bg.danger.subtle': string;
|
|
112
|
+
'status.border.danger': string;
|
|
113
|
+
'status.border.danger.subtle': string;
|
|
114
|
+
'status.fg.danger': string;
|
|
115
|
+
'status.fg.danger.subtle': string;
|
|
116
|
+
'status.bg.info': string;
|
|
117
|
+
'status.bg.info.subtle': string;
|
|
118
|
+
'status.border.info': string;
|
|
119
|
+
'status.border.info.subtle': string;
|
|
120
|
+
'status.fg.info': string;
|
|
121
|
+
'status.fg.info.subtle': string;
|
|
122
|
+
}
|
|
123
|
+
/** State-layer opacities for disabled / pressed feedback. */
|
|
124
|
+
export interface OpacityTokens {
|
|
125
|
+
disabled: number;
|
|
126
|
+
pressed: number;
|
|
127
|
+
}
|
|
128
|
+
/** Screen-level layout tokens. */
|
|
129
|
+
export interface LayoutTokens {
|
|
130
|
+
screen: {
|
|
131
|
+
/** Margin between content and the screen edge (applied as container padding). */
|
|
132
|
+
margin: {
|
|
133
|
+
x: number;
|
|
134
|
+
y: number;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
header: {
|
|
138
|
+
/** Height of the header bar (compact nav bar / collapsed large-title bar), dp. */
|
|
139
|
+
height: number;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/** The full resolved theme. `light` and `dark` are both `TerraTheme`. */
|
|
143
|
+
export interface TerraTheme {
|
|
144
|
+
color: ThemeColor;
|
|
145
|
+
spacing: Record<SpacingKey, number>;
|
|
146
|
+
radius: Record<RadiusKey, number>;
|
|
147
|
+
typography: Typography;
|
|
148
|
+
elevation: ElevationScale;
|
|
149
|
+
opacity: OpacityTokens;
|
|
150
|
+
layout: LayoutTokens;
|
|
151
|
+
}
|
|
152
|
+
export type BackgroundColorToken = 'background';
|
|
153
|
+
export type SurfaceColorToken = Extract<keyof ThemeColor, `surface.${string}`>;
|
|
154
|
+
export type TextColorToken = Extract<keyof ThemeColor, `text.${string}`>;
|
|
155
|
+
export type BorderColorToken = Extract<keyof ThemeColor, `border.${string}`>;
|
|
156
|
+
export type ActionColorToken = Extract<keyof ThemeColor, `action.${string}`>;
|
|
157
|
+
export type StatusColorToken = Extract<keyof ThemeColor, `status.${string}`>;
|
|
158
|
+
/** @deprecated Use {@link TextColorToken} — renamed to reflect the `text.*` token namespace. */
|
|
159
|
+
export type ContentColorToken = TextColorToken;
|
|
160
|
+
/**
|
|
161
|
+
* Any color value a component accepts:
|
|
162
|
+
* semantic token (`text.default`, `surface.raised`, `action.bg.primary`),
|
|
163
|
+
* or a raw CSS color literal (`#fff`, `rgb(...)`, `transparent`).
|
|
164
|
+
*/
|
|
165
|
+
export type ColorToken = BackgroundColorToken | SurfaceColorToken | TextColorToken | BorderColorToken | ActionColorToken | StatusColorToken | (string & {});
|
|
166
|
+
export type Scheme = 'light' | 'dark';
|
|
167
|
+
/** A hue shorthand per scheme — expands to primary + accent token patches. */
|
|
168
|
+
export interface AccentShorthand {
|
|
169
|
+
light: string;
|
|
170
|
+
dark: string;
|
|
171
|
+
}
|
|
172
|
+
/** A full partial-theme override per scheme. */
|
|
173
|
+
export interface AccentOverride {
|
|
174
|
+
light?: DeepPartial<TerraTheme>;
|
|
175
|
+
dark?: DeepPartial<TerraTheme>;
|
|
176
|
+
}
|
|
177
|
+
/** A named, runtime-switchable theme override. */
|
|
178
|
+
export type Accent = AccentShorthand | AccentOverride;
|
|
179
|
+
/** An accent input normalized to per-scheme partial-theme overrides. */
|
|
180
|
+
export interface NormalizedAccent {
|
|
181
|
+
light: DeepPartial<TerraTheme>;
|
|
182
|
+
dark: DeepPartial<TerraTheme>;
|
|
183
|
+
}
|
|
184
|
+
export interface TerraIconProps {
|
|
185
|
+
size?: number;
|
|
186
|
+
color?: string;
|
|
187
|
+
strokeWidth?: number;
|
|
188
|
+
}
|
|
189
|
+
export type TerraIconComponent = ComponentType<TerraIconProps>;
|
|
190
|
+
export type TerraImageContentFit = 'cover' | 'contain' | 'fill';
|
|
191
|
+
export interface TerraImageProps {
|
|
192
|
+
source: {
|
|
193
|
+
uri: string;
|
|
194
|
+
} | number;
|
|
195
|
+
style?: StyleProp<ImageStyle>;
|
|
196
|
+
accessibilityLabel?: string;
|
|
197
|
+
contentFit?: TerraImageContentFit;
|
|
198
|
+
onError?: () => void;
|
|
199
|
+
}
|
|
200
|
+
export type TerraImageComponent = ComponentType<TerraImageProps>;
|
|
201
|
+
declare global {
|
|
202
|
+
namespace TerraUI {
|
|
203
|
+
interface IconRegistry {
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
export interface TerraIconRegistry extends TerraUI.IconRegistry {
|
|
208
|
+
}
|
|
209
|
+
export type TerraSemanticIconName = 'navigation.back' | 'navigation.forward' | 'navigation.close' | 'status.info' | 'status.success' | 'status.warning' | 'status.danger' | 'person';
|
|
210
|
+
export type TerraConfiguredIconName = keyof TerraIconRegistry & string;
|
|
211
|
+
export type TerraIconName = TerraSemanticIconName | TerraConfiguredIconName;
|
|
212
|
+
export type ThemeRadiusOverride = DeepPartial<TerraTheme['radius']> & {
|
|
213
|
+
/**
|
|
214
|
+
* Base corner radius in dp — the `lg` (×1) step. The rest of the scale is
|
|
215
|
+
* derived by fixed multipliers (`xs` ×0.25, `sm` ×0.5, `md` ×0.75,
|
|
216
|
+
* `xl` ×1.5, `2xl` ×2, `3xl` ×3); `none` (0) and `full` (9999) are
|
|
217
|
+
* constant. Per-token radius overrides still win over the derived value.
|
|
218
|
+
*/
|
|
219
|
+
base?: number;
|
|
220
|
+
};
|
|
221
|
+
/** Theme override accepted at configure time. */
|
|
222
|
+
export type TerraThemeOverride = DeepPartial<Omit<TerraTheme, 'radius'>> & {
|
|
223
|
+
radius?: ThemeRadiusOverride;
|
|
224
|
+
};
|
|
225
|
+
/** Default props for the Button component. A per-instance prop still wins. */
|
|
226
|
+
export interface ButtonDefaults {
|
|
227
|
+
/** Default corner radius. Defaults to `'md'`. */
|
|
228
|
+
radius?: DefaultRadiusToken;
|
|
229
|
+
}
|
|
230
|
+
/** Default props for the Surface component. A per-instance prop still wins. */
|
|
231
|
+
export interface SurfaceDefaults {
|
|
232
|
+
/** Default corner radius. Defaults to `'md'`. */
|
|
233
|
+
radius?: DefaultRadiusToken;
|
|
234
|
+
/** Default drop-shadow depth (`'none'` = no shadow). Defaults to `'none'`. */
|
|
235
|
+
elevation?: ElevationKey;
|
|
236
|
+
}
|
|
237
|
+
/** Per-component default props applied at configure time. */
|
|
238
|
+
export interface ComponentDefaults {
|
|
239
|
+
button?: ButtonDefaults;
|
|
240
|
+
surface?: SurfaceDefaults;
|
|
241
|
+
}
|
|
242
|
+
export interface TerraConfig {
|
|
243
|
+
/** Scheme-agnostic token overrides, applied to both light and dark themes. */
|
|
244
|
+
shared?: TerraThemeOverride;
|
|
245
|
+
/** Per-scheme token overrides, applied after `shared`. */
|
|
246
|
+
schemes?: {
|
|
247
|
+
light?: TerraThemeOverride;
|
|
248
|
+
dark?: TerraThemeOverride;
|
|
249
|
+
};
|
|
250
|
+
/** Runtime-switchable named overrides (hue shorthand or full partial). */
|
|
251
|
+
accents?: Record<string, Accent>;
|
|
252
|
+
/**
|
|
253
|
+
* App-provided icon overrides. Semantic icons (`navigation.*`, `status.*`)
|
|
254
|
+
* fall back to the built-in defaults when omitted; app icons (`add`, etc.)
|
|
255
|
+
* must be registered here.
|
|
256
|
+
*/
|
|
257
|
+
icons?: Partial<Record<TerraIconName, TerraIconComponent>>;
|
|
258
|
+
/**
|
|
259
|
+
* Custom image renderer (e.g. `expo-image`, `react-native-fast-image`).
|
|
260
|
+
* Defaults to React Native's built-in `Image` with `contentFit` mapped to
|
|
261
|
+
* `resizeMode`. Wrap third-party components to match `TerraImageProps`.
|
|
262
|
+
*/
|
|
263
|
+
image?: TerraImageComponent;
|
|
264
|
+
/** Name of the accent (from `accents`) to apply by default. */
|
|
265
|
+
defaultAccent?: string;
|
|
266
|
+
/** Per-component default props (e.g. `{ button: { radius: 'full' } }`). */
|
|
267
|
+
components?: ComponentDefaults;
|
|
268
|
+
/** Follow the system color scheme. Default `true`. */
|
|
269
|
+
adaptiveThemes?: boolean;
|
|
270
|
+
/** Force a starting scheme (disables adaptive theming). */
|
|
271
|
+
initialScheme?: Scheme;
|
|
272
|
+
}
|
|
273
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/theme/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,8EAA8E;AAC9E,MAAM,MAAM,UAAU,GAClB,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC;AAET,gCAAgC;AAChC,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,IAAI,GACJ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AAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC3D;;;;OAIG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,sDAAsD;IACtD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IAAE,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accent-utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/accent-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAEN,gBAAgB,EAEjB,MAAM,cAAc,CAAC;AA2CtB,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAQhE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Small color helpers for deriving accent shades from a single hue. */
|
|
2
|
+
/**
|
|
3
|
+
* Shifts a hex color toward black (negative `amount`) or white (positive),
|
|
4
|
+
* by a fraction in [-1, 1]. Returns the input unchanged if not a 6-digit hex.
|
|
5
|
+
*/
|
|
6
|
+
export declare function shade(hex: string, amount: number): string;
|
|
7
|
+
/** Returns an `rgba(...)` string for a hex color at the given alpha. */
|
|
8
|
+
export declare function withAlpha(hex: string, alpha: number): string;
|
|
9
|
+
/** Picks black or white for legible text/icons on top of `hex`. */
|
|
10
|
+
export declare function readableOn(hex: string): string;
|
|
11
|
+
//# sourceMappingURL=color-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/color-utils.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAoBxE;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAUzD;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAI5D;AAED,mEAAmE;AACnE,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM9C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Recursively makes every property (and nested property) optional. */
|
|
2
|
+
export type DeepPartial<T> = T extends (infer U)[] ? DeepPartial<U>[] : T extends object ? {
|
|
3
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
4
|
+
} : T;
|
|
5
|
+
/**
|
|
6
|
+
* Deep-merges `override` onto `base`, returning a new object.
|
|
7
|
+
* Plain objects merge recursively; all other values (and arrays) replace.
|
|
8
|
+
* Neither input is mutated.
|
|
9
|
+
*/
|
|
10
|
+
export declare function deepMerge<T>(base: T, override?: DeepPartial<T>): T;
|
|
11
|
+
//# sourceMappingURL=deep-merge.d.ts.map
|