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,17 @@
|
|
|
1
|
+
import type { Ref } from 'react';
|
|
2
|
+
/** Composes multiple refs so each receives the node. */
|
|
3
|
+
export declare function composeRefs<T>(...refs: (Ref<T> | undefined)[]): Ref<T>;
|
|
4
|
+
type AnyProps = Record<string, unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* Merges slot props with the child's own props (child wins), following the
|
|
7
|
+
* Radix Slot rules:
|
|
8
|
+
* - `on*` handlers are composed (child runs first, then slot),
|
|
9
|
+
* - `style` is merged as `[slotStyle, childStyle]`,
|
|
10
|
+
* - all other child props override slot props.
|
|
11
|
+
*
|
|
12
|
+
* `ref`/`style` are intentionally not handled here — the caller composes refs
|
|
13
|
+
* and passes a pre-merged `style` via `slotProps`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function mergeProps(slotProps: AnyProps, childProps: AnyProps): AnyProps;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/slot/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,GAAG,EAAE,MAAM,OAAO,CAAC;AAUnD,wDAAwD;AACxD,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAMtE;AAED,KAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAIxC;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,QAAQ,EACnB,UAAU,EAAE,QAAQ,GACnB,QAAQ,CAwBV"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ColorToken } from '#theme/types';
|
|
2
|
+
export type SpinnerSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface SpinnerProps {
|
|
4
|
+
/** Spinner diameter preset. Defaults to `'md'`. */
|
|
5
|
+
size?: SpinnerSize;
|
|
6
|
+
/** Theme color token or raw CSS color. Defaults to the accent color. */
|
|
7
|
+
color?: ColorToken;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Animated loading spinner. Used by `Button` when `isLoading` is set.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <Spinner size="md" color="content.accent" />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function Spinner({ size, color }: SpinnerProps): import("react").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../../../src/components/spinner/Spinner.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7C,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,wEAAwE;IACxE,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAkED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,EAAE,IAAW,EAAE,KAAqB,EAAE,EAAE,YAAY,+BAsD3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/spinner/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAW,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAW,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ElevationKey } from '#theme/types';
|
|
2
|
+
import { type BoxProps } from '../box/index.js';
|
|
3
|
+
/** Background level of a {@link Surface}. */
|
|
4
|
+
export type SurfaceVariant = 'base' | 'raised' | 'sunken' | 'transparent';
|
|
5
|
+
export interface SurfaceProps extends Omit<BoxProps, 'bg'> {
|
|
6
|
+
/** Background surface level. Defaults to `'base'`. */
|
|
7
|
+
variant?: SurfaceVariant;
|
|
8
|
+
/**
|
|
9
|
+
* Drop-shadow depth (platform-aware shadow + Android elevation).
|
|
10
|
+
* Defaults to `'sm'` for `variant="raised"`, otherwise the configured
|
|
11
|
+
* surface elevation (`'none'` if unset). Note: a shadow needs a
|
|
12
|
+
* non-transparent background to render, so `variant="transparent"` shows no
|
|
13
|
+
* shadow.
|
|
14
|
+
*/
|
|
15
|
+
elevation?: ElevationKey;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Themed container built on {@link Box}. Picks its background from a semantic
|
|
19
|
+
* surface `variant`, its corner radius from the configured `surface`
|
|
20
|
+
* default (overridable via `radius`), and an optional drop shadow via
|
|
21
|
+
* `elevation`. All other Box style-props are accepted.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Surface variant="raised" elevation="md" p="4" radius="lg">
|
|
26
|
+
* <Text variant="title-sm">Card title</Text>
|
|
27
|
+
* </Surface>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const Surface: import("react").ForwardRefExoticComponent<SurfaceProps & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
|
|
31
|
+
//# sourceMappingURL=Surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../../../../../src/components/surface/Surface.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAc,YAAY,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAA8B,KAAK,QAAQ,EAAE,MAAM,iBAAQ,CAAC;AAEnE,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE1E,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxD,sDAAsD;IACtD,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B;AA6BD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,0LAiCnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/surface/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAW,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAW,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type TextProps as RNTextProps } from 'react-native';
|
|
2
|
+
import type { ColorToken, FontWeightToken, TextVariant } from '#theme/types';
|
|
3
|
+
export type TextAlign = 'left' | 'center' | 'right' | 'justify';
|
|
4
|
+
export interface TextProps extends RNTextProps {
|
|
5
|
+
/** Typographic role. Defaults to `body-md`. */
|
|
6
|
+
variant?: TextVariant;
|
|
7
|
+
/** Semantic color token (e.g. `content.secondary`, `status.danger.solid`). */
|
|
8
|
+
color?: ColorToken;
|
|
9
|
+
/** Override the variant's default weight. */
|
|
10
|
+
weight?: FontWeightToken;
|
|
11
|
+
align?: TextAlign;
|
|
12
|
+
italic?: boolean;
|
|
13
|
+
underline?: boolean;
|
|
14
|
+
strikeThrough?: boolean;
|
|
15
|
+
/** Truncate to a single line with a trailing ellipsis. */
|
|
16
|
+
isTruncated?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Themed text primitive. Reads its scale from `theme.typography` and resolves
|
|
20
|
+
* fonts by weight, honoring Dynamic Type with a per-variant scaling cap.
|
|
21
|
+
*/
|
|
22
|
+
export declare const Text: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
|
|
23
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../../src/components/text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,SAAS,IAAI,WAAW,EAE9B,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EAGf,WAAW,EACZ,MAAM,cAAc,CAAC;AAKtB,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAiBhE,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C,+CAA+C;IAC/C,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,uLA2DhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/text/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,WAAQ,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAQ,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { PressableProps } from 'react-native';
|
|
3
|
+
import type { TerraIconName } from '#theme/types';
|
|
4
|
+
import { type ButtonProps } from '../button/index.js';
|
|
5
|
+
import { type IconProps } from '../icon/index.js';
|
|
6
|
+
import { type SurfaceProps } from '../surface/index.js';
|
|
7
|
+
import { type TextProps } from '../text/index.js';
|
|
8
|
+
import type { ToastId as StackToastId, ToastShowOptions } from './types.js';
|
|
9
|
+
export type ToastVariant = 'default' | 'accent' | 'info' | 'success' | 'warning' | 'danger';
|
|
10
|
+
type ToastInstanceId = string | number;
|
|
11
|
+
export interface ToastControls {
|
|
12
|
+
hide?: (id: ToastInstanceId) => void;
|
|
13
|
+
id?: ToastInstanceId;
|
|
14
|
+
}
|
|
15
|
+
export interface ToastProps extends Omit<SurfaceProps, 'id' | 'variant'> {
|
|
16
|
+
/** Visual tone for the toast. Defaults to `default`. */
|
|
17
|
+
variant?: ToastVariant;
|
|
18
|
+
/** Optional identifier passed back to `hide` when `Toast.Close` is pressed. */
|
|
19
|
+
id?: ToastInstanceId;
|
|
20
|
+
/** Imperative hide callback used by toast queues/providers. */
|
|
21
|
+
hide?: (id: ToastInstanceId) => void;
|
|
22
|
+
/** Local close callback used by `Toast.Close`. */
|
|
23
|
+
onClose?: () => void;
|
|
24
|
+
}
|
|
25
|
+
declare const ToastRoot: import("react").ForwardRefExoticComponent<ToastProps & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
|
|
26
|
+
export interface ToastTitleProps extends TextProps {
|
|
27
|
+
}
|
|
28
|
+
declare const ToastTitle: import("react").ForwardRefExoticComponent<ToastTitleProps & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
|
|
29
|
+
export interface ToastDescriptionProps extends TextProps {
|
|
30
|
+
}
|
|
31
|
+
declare const ToastDescription: import("react").ForwardRefExoticComponent<ToastDescriptionProps & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
|
|
32
|
+
export interface ToastActionProps extends Omit<PressableProps, 'children' | 'disabled' | 'style'> {
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
/** Override the action button colour. Defaults to the parent Toast variant. */
|
|
35
|
+
variant?: ToastVariant;
|
|
36
|
+
fullWidth?: boolean;
|
|
37
|
+
isDisabled?: boolean;
|
|
38
|
+
size?: 'sm' | 'md' | 'lg';
|
|
39
|
+
style?: PressableProps['style'];
|
|
40
|
+
}
|
|
41
|
+
declare const ToastAction: import("react").ForwardRefExoticComponent<ToastActionProps & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
|
|
42
|
+
export interface ToastCloseProps extends Omit<ButtonProps, 'children'> {
|
|
43
|
+
children?: ReactNode;
|
|
44
|
+
iconProps?: Omit<IconProps, 'name'>;
|
|
45
|
+
}
|
|
46
|
+
declare const ToastClose: import("react").ForwardRefExoticComponent<ToastCloseProps & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
|
|
47
|
+
export interface ToastIconProps extends Omit<IconProps, 'name'> {
|
|
48
|
+
name?: TerraIconName;
|
|
49
|
+
}
|
|
50
|
+
declare const ToastIcon: import("react").ForwardRefExoticComponent<ToastIconProps & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
|
|
51
|
+
export interface DefaultToastProps extends Omit<ToastProps, 'children'> {
|
|
52
|
+
label?: ReactNode;
|
|
53
|
+
description?: ReactNode;
|
|
54
|
+
actionLabel?: ReactNode;
|
|
55
|
+
onActionPress?: (controls: ToastControls) => void;
|
|
56
|
+
icon?: ReactNode | false;
|
|
57
|
+
showCloseButton?: boolean;
|
|
58
|
+
}
|
|
59
|
+
export declare function DefaultToast({ label, description, actionLabel, onActionPress, icon, showCloseButton, id, hide, variant, ...rest }: DefaultToastProps): import("react").JSX.Element;
|
|
60
|
+
type ToastComponent = typeof ToastRoot & {
|
|
61
|
+
Title: typeof ToastTitle;
|
|
62
|
+
Description: typeof ToastDescription;
|
|
63
|
+
Action: typeof ToastAction;
|
|
64
|
+
Close: typeof ToastClose;
|
|
65
|
+
Icon: typeof ToastIcon;
|
|
66
|
+
show: (options: ToastShowOptions) => StackToastId;
|
|
67
|
+
hide: (id?: StackToastId | StackToastId[] | 'all') => void;
|
|
68
|
+
};
|
|
69
|
+
export declare const Toast: ToastComponent;
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../../src/components/toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAyB,cAAc,EAAQ,MAAM,cAAc,CAAC;AAKhF,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,cAAc,CAAC;AAG9D,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,oBAAW,CAAC;AACrD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,kBAAS,CAAC;AAC/C,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,qBAAY,CAAC;AACxD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,kBAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,IAAI,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAS,CAAC;AAGzE,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,QAAQ,GACR,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;AAEb,KAAK,eAAe,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,eAAe,KAAK,IAAI,CAAC;IACrC,EAAE,CAAC,EAAE,eAAe,CAAC;CACtB;AAsED,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,SAAS,CAAC;IACtE,wDAAwD;IACxD,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,+EAA+E;IAC/E,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,eAAe,KAAK,IAAI,CAAC;IACrC,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,SAAS,wLAsDd,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,SAAS;CAAG;AAErD,QAAA,MAAM,UAAU,6LA4Bf,CAAC;AAEF,MAAM,WAAW,qBAAsB,SAAQ,SAAS;CAAG;AAE3D,QAAA,MAAM,gBAAgB,mMAoBpB,CAAC;AAEH,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;IAC/D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;CACjC;AAaD,QAAA,MAAM,WAAW,8LA+Cf,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC;IACpE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;CACrC;AAED,QAAA,MAAM,UAAU,6LAgDf,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;IAC7D,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AASD,QAAA,MAAM,SAAS,4LAiBd,CAAC;AAEF,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;IACrE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IAClD,IAAI,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,WAAW,EACX,WAAW,EACX,aAAa,EACb,IAAI,EACJ,eAAe,EACf,EAAE,EACF,IAAI,EACJ,OAAmB,EACnB,GAAG,IAAI,EACR,EAAE,iBAAiB,+BAuBnB;AAED,KAAK,cAAc,GAAG,OAAO,SAAS,GAAG;IACvC,KAAK,EAAE,OAAO,UAAU,CAAC;IACzB,WAAW,EAAE,OAAO,gBAAgB,CAAC;IACrC,MAAM,EAAE,OAAO,WAAW,CAAC;IAC3B,KAAK,EAAE,OAAO,UAAU,CAAC;IACzB,IAAI,EAAE,OAAO,SAAS,CAAC;IACvB,IAAI,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,YAAY,CAAC;IAClD,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,GAAG,KAAK,KAAK,IAAI,CAAC;CAC5D,CAAC;AAEF,eAAO,MAAM,KAAK,EAAgB,cAAc,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ToastManager, ToastProviderProps } from './types.js';
|
|
2
|
+
export declare function ToastProvider({ children, defaultPlacement, defaultDuration, maxVisibleToasts, offset, }: ToastProviderProps): import("react").JSX.Element;
|
|
3
|
+
export declare function useToast(): ToastManager;
|
|
4
|
+
//# sourceMappingURL=ToastProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/toast/ToastProvider.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAKV,YAAY,EAEZ,kBAAkB,EAInB,MAAM,YAAS,CAAC;AA2EjB,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,gBAAwB,EACxB,eAAkC,EAClC,gBAA6C,EAC7C,MAAM,GACP,EAAE,kBAAkB,+BAoLpB;AAyGD,wBAAgB,QAAQ,IAAI,YAAY,CAMvC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { DefaultToastProps, ToastActionProps, ToastCloseProps, ToastControls, ToastDescriptionProps, ToastIconProps, ToastProps, ToastTitleProps, ToastVariant, } from './Toast.js';
|
|
2
|
+
export { DefaultToast, Toast } from './Toast.js';
|
|
3
|
+
export { ToastProvider, useToast } from './ToastProvider.js';
|
|
4
|
+
export type { ToastActionHelpers, ToastComponentProps, ToastDuration, ToastId, ToastItem, ToastManager, ToastPlacement, ToastProviderProps, ToastShowConfig, ToastShowOptions, ToastShowOptionsWithComponent, } from './types.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/toast/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,UAAU,EACV,eAAe,EACf,YAAY,GACb,MAAM,YAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,YAAS,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAiB,CAAC;AAC1D,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,OAAO,EACP,SAAS,EACT,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,YAAS,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
3
|
+
import type { ToastId, ToastPlacement } from '../types.js';
|
|
4
|
+
export interface ToastAnimatedItemProps {
|
|
5
|
+
children: ReactElement;
|
|
6
|
+
heights: SharedValue<Record<ToastId, number>>;
|
|
7
|
+
id: ToastId;
|
|
8
|
+
index: number;
|
|
9
|
+
maxVisibleToasts: number;
|
|
10
|
+
placement: ToastPlacement;
|
|
11
|
+
total: SharedValue<number>;
|
|
12
|
+
}
|
|
13
|
+
export declare const enteringTop: import("react-native-reanimated").ReanimatedKeyframe;
|
|
14
|
+
export declare const exitingTop: import("react-native-reanimated").ReanimatedKeyframe;
|
|
15
|
+
export declare const enteringBottom: import("react-native-reanimated").ReanimatedKeyframe;
|
|
16
|
+
export declare const exitingBottom: import("react-native-reanimated").ReanimatedKeyframe;
|
|
17
|
+
export declare function ToastAnimatedItem({ children, heights, id, index, maxVisibleToasts, placement, total, }: ToastAnimatedItemProps): import("react").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=ToastAnimatedItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastAnimatedItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/parts/ToastAnimatedItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAiB,EAKf,KAAK,WAAW,EAIjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAU,CAAC;AAExD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9C,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,cAAc,CAAC;IAC1B,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,eAAO,MAAM,WAAW,sDAUR,CAAC;AAEjB,eAAO,MAAM,UAAU,sDAUP,CAAC;AAEjB,eAAO,MAAM,cAAc,sDAUX,CAAC;AAEjB,eAAO,MAAM,aAAa,sDAUV,CAAC;AASjB,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAO,EACP,EAAE,EACF,KAAK,EACL,gBAAgB,EAChB,SAAS,EACT,KAAK,GACN,EAAE,sBAAsB,+BA0ExB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { ToastProps, ToastVariant } from './Toast.js';
|
|
3
|
+
export type ToastId = string;
|
|
4
|
+
export type ToastDuration = number | 'persistent';
|
|
5
|
+
export type ToastPlacement = 'top' | 'bottom';
|
|
6
|
+
export interface ToastActionHelpers {
|
|
7
|
+
show: ToastManager['show'];
|
|
8
|
+
hide: ToastManager['hide'];
|
|
9
|
+
}
|
|
10
|
+
export interface ToastShowConfig extends Pick<ToastProps, 'variant'> {
|
|
11
|
+
id?: ToastId;
|
|
12
|
+
label?: ReactNode;
|
|
13
|
+
description?: ReactNode;
|
|
14
|
+
icon?: ReactNode | false;
|
|
15
|
+
actionLabel?: ReactNode;
|
|
16
|
+
onActionPress?: (helpers: ToastActionHelpers) => void;
|
|
17
|
+
duration?: ToastDuration;
|
|
18
|
+
placement?: ToastPlacement;
|
|
19
|
+
showCloseButton?: boolean;
|
|
20
|
+
onShow?: () => void;
|
|
21
|
+
onHide?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export interface ToastComponentProps {
|
|
24
|
+
id: ToastId;
|
|
25
|
+
index: number;
|
|
26
|
+
hide: ToastManager['hide'];
|
|
27
|
+
show: ToastManager['show'];
|
|
28
|
+
}
|
|
29
|
+
export interface ToastShowOptionsWithComponent {
|
|
30
|
+
id?: ToastId;
|
|
31
|
+
component: (props: ToastComponentProps) => ReactElement;
|
|
32
|
+
duration?: ToastDuration;
|
|
33
|
+
placement?: ToastPlacement;
|
|
34
|
+
onShow?: () => void;
|
|
35
|
+
onHide?: () => void;
|
|
36
|
+
}
|
|
37
|
+
export type ToastShowOptions = ToastShowConfig | ToastShowOptionsWithComponent | string;
|
|
38
|
+
export interface ToastItem {
|
|
39
|
+
id: ToastId;
|
|
40
|
+
component: (props: ToastComponentProps) => ReactElement;
|
|
41
|
+
duration: ToastDuration;
|
|
42
|
+
placement: ToastPlacement;
|
|
43
|
+
onHide?: () => void;
|
|
44
|
+
}
|
|
45
|
+
export interface ToastManager {
|
|
46
|
+
show: (options: ToastShowOptions) => ToastId;
|
|
47
|
+
hide: (id?: ToastId | ToastId[] | 'all') => void;
|
|
48
|
+
}
|
|
49
|
+
export interface ToastProviderProps {
|
|
50
|
+
children?: ReactNode;
|
|
51
|
+
defaultPlacement?: ToastPlacement;
|
|
52
|
+
defaultDuration?: number;
|
|
53
|
+
maxVisibleToasts?: number;
|
|
54
|
+
offset?: {
|
|
55
|
+
top?: number;
|
|
56
|
+
bottom?: number;
|
|
57
|
+
left?: number;
|
|
58
|
+
right?: number;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export type { ToastVariant };
|
|
62
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/toast/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAS,CAAC;AAExD,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAC7B,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,YAAY,CAAC;AAClD,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE9C,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3B,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC;IAClE,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;IACzB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3B,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,6BAA6B;IAC5C,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,YAAY,CAAC;IACxD,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,6BAA6B,GAC7B,MAAM,CAAC;AAEX,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,OAAO,CAAC;IACZ,SAAS,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,YAAY,CAAC;IACxD,QAAQ,EAAE,aAAa,CAAC;IACxB,SAAS,EAAE,cAAc,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC;IAC7C,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,KAAK,KAAK,IAAI,CAAC;CAClD;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE;QACP,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,YAAY,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ToastId, ToastManager, ToastShowOptions } from '../types.js';
|
|
2
|
+
export declare function setToastManager(manager: ToastManager | null): void;
|
|
3
|
+
export declare function showToast(options: ToastShowOptions): ToastId;
|
|
4
|
+
export declare function hideToast(id?: ToastId | ToastId[] | 'all'): void;
|
|
5
|
+
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/utils/controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAU,CAAC;AAIxE,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,GAAG,IAAI,CAElE;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAU5D;AAED,wBAAgB,SAAS,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,KAAK,GAAG,IAAI,CAEhE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { Scheme, TerraTheme } from '../theme/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Root provider for Terra UI. Wrap your app once near the root.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <TerraUIProvider>
|
|
8
|
+
* <RootNavigator />
|
|
9
|
+
* </TerraUIProvider>
|
|
10
|
+
*/
|
|
11
|
+
export declare const TerraUIProvider: ({ children }: PropsWithChildren) => import("react").JSX.Element;
|
|
12
|
+
export interface UseThemeResult {
|
|
13
|
+
/** The active resolved theme. */
|
|
14
|
+
theme: TerraTheme;
|
|
15
|
+
/** Active color scheme. */
|
|
16
|
+
scheme: Scheme;
|
|
17
|
+
/** Switch scheme (disables system-adaptive theming). */
|
|
18
|
+
setScheme: (scheme: Scheme) => void;
|
|
19
|
+
/** Active accent name, if any. */
|
|
20
|
+
accent: string | undefined;
|
|
21
|
+
/** Switch to a registered accent. */
|
|
22
|
+
setAccent: (name: string) => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Access the active theme and switch scheme / accent / radius.
|
|
26
|
+
* Must be used under {@link TerraUIProvider}.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useTheme(): UseThemeResult;
|
|
29
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/context/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAgB,CAAC;AAezD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,cAAc,iBAAiB,gCAkB9D,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,KAAK,EAAE,UAAU,CAAC;IAClB,2BAA2B;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,kCAAkC;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,qCAAqC;IACrC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,cAAc,CAezC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/context/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAiB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,oBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,cAAc,oBAAW,CAAC;AAE1B,cAAc,uBAAc,CAAC;AAC7B,cAAc,kBAAS,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { DefaultRadiusToken, ElevationKey, NormalizedAccent, RadiusComponent, Scheme, TerraConfig, TerraIconComponent, TerraImageComponent, TerraSemanticIconName, TerraTheme } from './types.js';
|
|
2
|
+
type ResolvedRadius = Record<RadiusComponent, DefaultRadiusToken>;
|
|
3
|
+
declare module 'react-native-unistyles' {
|
|
4
|
+
interface UnistylesThemes {
|
|
5
|
+
light: TerraTheme;
|
|
6
|
+
dark: TerraTheme;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
interface Registry {
|
|
10
|
+
baseLight: TerraTheme;
|
|
11
|
+
baseDark: TerraTheme;
|
|
12
|
+
accents: Record<string, NormalizedAccent>;
|
|
13
|
+
currentAccent?: string;
|
|
14
|
+
defaultRadius: ResolvedRadius;
|
|
15
|
+
surfaceElevation: ElevationKey;
|
|
16
|
+
icons: Record<string, TerraIconComponent>;
|
|
17
|
+
imageComponent: TerraImageComponent;
|
|
18
|
+
configured: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const getRegistry: () => Registry;
|
|
22
|
+
export declare const getIsConfigured: () => boolean;
|
|
23
|
+
export declare const getAccentNames: () => string[];
|
|
24
|
+
export declare const getImageComponent: () => TerraImageComponent;
|
|
25
|
+
export declare const getIcon: (name: string) => TerraIconComponent | undefined;
|
|
26
|
+
export declare const getRequiredIcon: (name: TerraSemanticIconName) => TerraIconComponent;
|
|
27
|
+
/**
|
|
28
|
+
* The configured default corner radius for a component (Button, Surface).
|
|
29
|
+
* Set via {@link configureTerraUI}; defaults to `'md'`.
|
|
30
|
+
*/
|
|
31
|
+
export declare const getDefaultRadius: (component: RadiusComponent) => DefaultRadiusToken;
|
|
32
|
+
/**
|
|
33
|
+
* The configured default drop-shadow depth for Surface (`'none'` = no shadow).
|
|
34
|
+
* Set via {@link configureTerraUI}; defaults to `'none'`.
|
|
35
|
+
*/
|
|
36
|
+
export declare const getSurfaceElevation: () => ElevationKey;
|
|
37
|
+
/** Resolves a scheme's theme = base ⊕ the named accent's partial override. */
|
|
38
|
+
export declare function resolveTheme(scheme: Scheme, accentName?: string): TerraTheme;
|
|
39
|
+
/**
|
|
40
|
+
* Configure Terra UI's themes. Call ONCE, as early as possible — before any
|
|
41
|
+
* component renders (e.g. top of the app entry, imported from
|
|
42
|
+
* `react-native-terra-ui/theme`). With no arguments it registers the default
|
|
43
|
+
* theme; `<TerraUIProvider>` calls it for you if you haven't.
|
|
44
|
+
*/
|
|
45
|
+
export declare function configureTerraUI(config?: TerraConfig): void;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=configure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/theme/configure.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAEV,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,MAAM,EACN,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EAEnB,qBAAqB,EACrB,UAAU,EAEX,MAAM,YAAS,CAAC;AAmCjB,KAAK,cAAc,GAAG,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC;AAWlE,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAiB,eAAe;QAC9B,KAAK,EAAE,UAAU,CAAC;QAClB,IAAI,EAAE,UAAU,CAAC;KAClB;CACF;AAED,UAAU,QAAQ;IAChB,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,cAAc,CAAC;IAC9B,gBAAgB,EAAE,YAAY,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC1C,cAAc,EAAE,mBAAmB,CAAC;IACpC,UAAU,EAAE,OAAO,CAAC;CACrB;AAcD,gBAAgB;AAChB,eAAO,MAAM,WAAW,QAAO,QAAoB,CAAC;AAEpD,eAAO,MAAM,eAAe,QAAO,OAA8B,CAAC;AAElE,eAAO,MAAM,cAAc,QAAO,MAAM,EAAmC,CAAC;AAE5E,eAAO,MAAM,iBAAiB,QAAO,mBACZ,CAAC;AAE1B,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,KAAG,kBAAkB,GAAG,SACS,CAAC;AAEtE,eAAO,MAAM,eAAe,GAC1B,MAAM,qBAAqB,KAC1B,kBAAgE,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,WAAW,eAAe,KACzB,kBAAuD,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAAO,YACZ,CAAC;AAE5B,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,UAAU,CAI5E;AAsBD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,GAAE,WAAgB,GAAG,IAAI,CAiD/D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { normalizeAccent } from '#utils/accent-utils';
|
|
2
|
+
export { readableOn, shade, withAlpha } from '#utils/color-utils';
|
|
3
|
+
export type { DeepPartial } from '#utils/deep-merge';
|
|
4
|
+
export { deepMerge } from '#utils/deep-merge';
|
|
5
|
+
export { resolveThemeColor } from '#utils/resolve-theme-color';
|
|
6
|
+
export { FONT_WEIGHT_VALUE, SYSTEM_FONT } from '#utils/typography';
|
|
7
|
+
export { configureTerraUI, getAccentNames, getDefaultRadius, getIcon, getImageComponent, getIsConfigured, getRequiredIcon, getSurfaceElevation, resolveTheme, } from './configure.js';
|
|
8
|
+
export { applyAccent, applyScheme, getCurrentAccent } from './runtime.js';
|
|
9
|
+
export { defaultDarkTheme, defaultLightTheme } from './theme.js';
|
|
10
|
+
export type { Accent, AccentOverride, AccentShorthand, ActionColorToken, BackgroundColorToken, BorderColorToken, ButtonDefaults, ColorToken, ComponentDefaults, ContentColorToken, DefaultRadiusToken, ElevationKey, ElevationScale, ElevationStyle, FontWeightToken, LayoutTokens, OpacityTokens, RadiusComponent, RadiusKey, Scheme, SpacingKey, StatusColorToken, SurfaceColorToken, SurfaceDefaults, TerraConfig, TerraIconComponent, TerraIconName, TerraIconProps, TerraImageComponent, TerraImageContentFit, TerraImageProps, TerraSemanticIconName, TerraTheme, TerraThemeOverride, TextColorToken, TextVariant, ThemeColor, ThemeRadiusOverride, TypeStyle, Typography, } from './types.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,YAAY,GACb,MAAM,gBAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAW,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAS,CAAC;AAE9D,YAAY,EACV,MAAM,EACN,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,EACZ,aAAa,EACb,eAAe,EACf,SAAS,EACT,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,UAAU,EACV,mBAAmB,EACnB,SAAS,EACT,UAAU,GACX,MAAM,YAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Scheme } from './types.js';
|
|
2
|
+
/** Apply a named accent at runtime by updating both registered themes. */
|
|
3
|
+
export declare function applyAccent(name: string): void;
|
|
4
|
+
export declare const getCurrentAccent: () => string | undefined;
|
|
5
|
+
/** Switch the active color scheme, disabling adaptive (system) theming. */
|
|
6
|
+
export declare function applyScheme(scheme: Scheme): void;
|
|
7
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/theme/runtime.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAS,CAAC;AAEtC,0EAA0E;AAC1E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAW9C;AAED,eAAO,MAAM,gBAAgB,QAAO,MAAM,GAAG,SAChB,CAAC;AAE9B,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAGhD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RadiusKey, TerraTheme } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Default base corner radius (dp) — the `lg` (×1) step — taken from the
|
|
4
|
+
* `radius.base` primitive. The rest of the scale is derived from it via
|
|
5
|
+
* {@link RADIUS_MULTIPLIERS}; override at runtime with
|
|
6
|
+
* `configureTerraUI({ shared: { radius: { base } } })`, or change the
|
|
7
|
+
* `radius.base` token.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_RADIUS_BASE: number;
|
|
10
|
+
/**
|
|
11
|
+
* Per-token multipliers applied to the base radius (DaisyUI-style). `none` (0)
|
|
12
|
+
* and `full` (9999) are fixed and not scaled.
|
|
13
|
+
*/
|
|
14
|
+
export declare const RADIUS_MULTIPLIERS: Record<Exclude<RadiusKey, 'none' | 'full'>, number>;
|
|
15
|
+
/**
|
|
16
|
+
* Builds the full radius scale from a single base value. Derived steps keep
|
|
17
|
+
* their exact (possibly fractional) dp; `none`/`full` are constant.
|
|
18
|
+
*/
|
|
19
|
+
export declare function buildRadiusScale(base?: number): Record<RadiusKey, number>;
|
|
20
|
+
export declare const defaultLightTheme: TerraTheme;
|
|
21
|
+
export declare const defaultDarkTheme: TerraTheme;
|
|
22
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/theme.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAIV,SAAS,EAET,UAAU,EAGX,MAAM,YAAS,CAAC;AA6DjB;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,QAAmB,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CACrC,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,EACnC,MAAM,CASP,CAAC;AAEF;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,GAAE,MAA4B,GACjC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAQ3B;AAkBD,eAAO,MAAM,iBAAiB,EAAE,UAQ/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UAQ9B,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dark-scheme color tokens — flat, dotted-key data (no imports, no types).
|
|
3
|
+
*
|
|
4
|
+
* Convention: [category].[context].[property?].[variant].[state]
|
|
5
|
+
*
|
|
6
|
+
* GENERATED-STYLE SOURCE: intended to be replaced by the Figma / design-sync export.
|
|
7
|
+
*/
|
|
8
|
+
export declare const dark: {
|
|
9
|
+
'color.background': string;
|
|
10
|
+
'color.surface.default': string;
|
|
11
|
+
'color.surface.raised': string;
|
|
12
|
+
'color.surface.sunken': string;
|
|
13
|
+
'color.surface.overlay': string;
|
|
14
|
+
'color.surface.accent': string;
|
|
15
|
+
'color.surface.accent.subtle': string;
|
|
16
|
+
'color.text.default': string;
|
|
17
|
+
'color.text.muted': string;
|
|
18
|
+
'color.text.subtle': string;
|
|
19
|
+
'color.text.disabled': string;
|
|
20
|
+
'color.text.inverse': string;
|
|
21
|
+
'color.text.link': string;
|
|
22
|
+
'color.text.accent': string;
|
|
23
|
+
'color.text.on-accent': string;
|
|
24
|
+
'color.text.on-accent-subtle': string;
|
|
25
|
+
'color.border.subtle': string;
|
|
26
|
+
'color.border.default': string;
|
|
27
|
+
'color.border.strong': string;
|
|
28
|
+
'color.border.focus': string;
|
|
29
|
+
'color.border.accent': string;
|
|
30
|
+
'color.action.bg.primary': string;
|
|
31
|
+
'color.action.bg.primary.hover': string;
|
|
32
|
+
'color.action.bg.primary.active': string;
|
|
33
|
+
'color.action.bg.primary.disabled': string;
|
|
34
|
+
'color.action.fg.primary': string;
|
|
35
|
+
'color.action.bg.subtle': string;
|
|
36
|
+
'color.action.bg.subtle.hover': string;
|
|
37
|
+
'color.action.bg.subtle.active': string;
|
|
38
|
+
'color.action.bg.subtle.disabled': string;
|
|
39
|
+
'color.action.fg.subtle': string;
|
|
40
|
+
'color.action.bg.neutral': string;
|
|
41
|
+
'color.action.bg.neutral.hover': string;
|
|
42
|
+
'color.action.bg.neutral.active': string;
|
|
43
|
+
'color.action.bg.neutral.disabled': string;
|
|
44
|
+
'color.action.fg.neutral': string;
|
|
45
|
+
'color.status.bg.success': string;
|
|
46
|
+
'color.status.bg.success.subtle': string;
|
|
47
|
+
'color.status.border.success': string;
|
|
48
|
+
'color.status.border.success.subtle': string;
|
|
49
|
+
'color.status.fg.success': string;
|
|
50
|
+
'color.status.fg.success.subtle': string;
|
|
51
|
+
'color.status.bg.warning': string;
|
|
52
|
+
'color.status.bg.warning.subtle': string;
|
|
53
|
+
'color.status.border.warning': string;
|
|
54
|
+
'color.status.border.warning.subtle': string;
|
|
55
|
+
'color.status.fg.warning': string;
|
|
56
|
+
'color.status.fg.warning.subtle': string;
|
|
57
|
+
'color.status.bg.danger': string;
|
|
58
|
+
'color.status.bg.danger.subtle': string;
|
|
59
|
+
'color.status.border.danger': string;
|
|
60
|
+
'color.status.border.danger.subtle': string;
|
|
61
|
+
'color.status.fg.danger': string;
|
|
62
|
+
'color.status.fg.danger.subtle': string;
|
|
63
|
+
'color.status.bg.info': string;
|
|
64
|
+
'color.status.bg.info.subtle': string;
|
|
65
|
+
'color.status.border.info': string;
|
|
66
|
+
'color.status.border.info.subtle': string;
|
|
67
|
+
'color.status.fg.info': string;
|
|
68
|
+
'color.status.fg.info.subtle': string;
|
|
69
|
+
'elevation.none.shadowColor': string;
|
|
70
|
+
'elevation.none.shadowOpacity': number;
|
|
71
|
+
'elevation.none.shadowRadius': number;
|
|
72
|
+
'elevation.none.shadowOffset.width': number;
|
|
73
|
+
'elevation.none.shadowOffset.height': number;
|
|
74
|
+
'elevation.none.elevation': number;
|
|
75
|
+
'elevation.sm.shadowColor': string;
|
|
76
|
+
'elevation.sm.shadowOpacity': number;
|
|
77
|
+
'elevation.sm.shadowRadius': number;
|
|
78
|
+
'elevation.sm.shadowOffset.width': number;
|
|
79
|
+
'elevation.sm.shadowOffset.height': number;
|
|
80
|
+
'elevation.sm.elevation': number;
|
|
81
|
+
'elevation.md.shadowColor': string;
|
|
82
|
+
'elevation.md.shadowOpacity': number;
|
|
83
|
+
'elevation.md.shadowRadius': number;
|
|
84
|
+
'elevation.md.shadowOffset.width': number;
|
|
85
|
+
'elevation.md.shadowOffset.height': number;
|
|
86
|
+
'elevation.md.elevation': number;
|
|
87
|
+
'elevation.lg.shadowColor': string;
|
|
88
|
+
'elevation.lg.shadowOpacity': number;
|
|
89
|
+
'elevation.lg.shadowRadius': number;
|
|
90
|
+
'elevation.lg.shadowOffset.width': number;
|
|
91
|
+
'elevation.lg.shadowOffset.height': number;
|
|
92
|
+
'elevation.lg.elevation': number;
|
|
93
|
+
'elevation.xl.shadowColor': string;
|
|
94
|
+
'elevation.xl.shadowOpacity': number;
|
|
95
|
+
'elevation.xl.shadowRadius': number;
|
|
96
|
+
'elevation.xl.shadowOffset.width': number;
|
|
97
|
+
'elevation.xl.shadowOffset.height': number;
|
|
98
|
+
'elevation.xl.elevation': number;
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=dark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dark.d.ts","sourceRoot":"","sources":["../../../../../src/theme/tokens/dark.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6GhB,CAAC"}
|