react-native-terra-ui 0.5.0 → 0.6.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/CHANGELOG.md +31 -0
- package/lib/module/components/avatar/Avatar.js +60 -60
- package/lib/module/components/avatar/Avatar.js.map +1 -1
- package/lib/module/components/box/Box.js +2 -2
- package/lib/module/components/box/Box.js.map +1 -1
- package/lib/module/components/box/utils.js +19 -19
- package/lib/module/components/box/utils.js.map +1 -1
- package/lib/module/components/button/Button.js +54 -48
- package/lib/module/components/button/Button.js.map +1 -1
- package/lib/module/components/chip/Chip.js +94 -94
- package/lib/module/components/chip/Chip.js.map +1 -1
- package/lib/module/components/chip/utils.js +3 -3
- package/lib/module/components/empty-state/EmptyState.js +40 -40
- package/lib/module/components/empty-state/EmptyState.js.map +1 -1
- package/lib/module/components/header/header-buttons.js +5 -5
- package/lib/module/components/header/header-buttons.js.map +1 -1
- package/lib/module/components/header/parts/HeaderGradientOverlay.js +2 -2
- package/lib/module/components/header/parts/HeaderGradientOverlay.js.map +1 -1
- package/lib/module/components/header/variants/LargeTitleHeader/index.js +58 -58
- package/lib/module/components/header/variants/LargeTitleHeader/index.js.map +1 -1
- package/lib/module/components/header/variants/TitleHeader/index.js +27 -27
- package/lib/module/components/header/variants/TitleHeader/index.js.map +1 -1
- package/lib/module/components/icon/Icon.js +6 -6
- package/lib/module/components/icon/Icon.js.map +1 -1
- package/lib/module/components/image/Image.js +11 -6
- package/lib/module/components/image/Image.js.map +1 -1
- package/lib/module/components/page-indicator/PageIndicator.js +1 -1
- package/lib/module/components/page-indicator/PageIndicatorRoot.js.map +1 -1
- package/lib/module/components/page-indicator/hooks/use-page-indicator-colors.js +8 -8
- package/lib/module/components/page-indicator/hooks/use-page-indicator-colors.js.map +1 -1
- package/lib/module/components/page-indicator/hooks/use-page-indicator-core.js.map +1 -1
- package/lib/module/components/page-indicator/hooks/use-page-indicator-progress.js +6 -6
- package/lib/module/components/page-indicator/hooks/use-page-indicator-progress.js.map +1 -1
- package/lib/module/components/page-indicator/utils.js +8 -8
- package/lib/module/components/page-indicator/utils.js.map +1 -1
- package/lib/module/components/page-indicator/variants/DotIndicator/InactiveDot.js +2 -2
- package/lib/module/components/page-indicator/variants/DotIndicator/InactiveDot.js.map +1 -1
- package/lib/module/components/page-indicator/variants/DotIndicator/LoadingOrbit.js +9 -9
- package/lib/module/components/page-indicator/variants/DotIndicator/LoadingOrbit.js.map +1 -1
- package/lib/module/components/page-indicator/variants/DotIndicator/TravelingPill.js +2 -2
- package/lib/module/components/page-indicator/variants/DotIndicator/TravelingPill.js.map +1 -1
- package/lib/module/components/page-indicator/variants/DotIndicator/index.js +3 -3
- package/lib/module/components/page-indicator/variants/DotIndicator/index.js.map +1 -1
- package/lib/module/components/page-indicator/variants/DotIndicator/utils.js +1 -1
- package/lib/module/components/page-indicator/variants/DotIndicator/utils.js.map +1 -1
- package/lib/module/components/page-indicator/variants/PillIndicator/PillIndicatorDot.js +1 -1
- package/lib/module/components/page-indicator/variants/PillIndicator/PillIndicatorDot.js.map +1 -1
- package/lib/module/components/page-indicator/variants/PillIndicator/index.js +5 -5
- package/lib/module/components/page-indicator/variants/PillIndicator/index.js.map +1 -1
- package/lib/module/components/page-indicator/variants/PillIndicator/utils.js +3 -3
- package/lib/module/components/portal/Portal.js +1 -1
- package/lib/module/components/portal/PortalContext.js +1 -1
- package/lib/module/components/portal/PortalHost.js +1 -1
- package/lib/module/components/portal/PortalProvider.js +1 -1
- package/lib/module/components/portal/PortalProvider.js.map +1 -1
- package/lib/module/components/screen/Screen.js +8 -8
- package/lib/module/components/screen/Screen.js.map +1 -1
- package/lib/module/components/screen/ScreenContext.js +6 -6
- package/lib/module/components/screen/ScreenContext.js.map +1 -1
- package/lib/module/components/screen/ScreenFlatList.js +3 -3
- package/lib/module/components/screen/ScreenFlatList.js.map +1 -1
- package/lib/module/components/screen/ScreenList.js +5 -5
- package/lib/module/components/screen/ScreenList.js.map +1 -1
- package/lib/module/components/screen/ScreenScrollView.js +6 -6
- package/lib/module/components/screen/ScreenScrollView.js.map +1 -1
- package/lib/module/components/screen/parts/BottomSafeArea.js +1 -1
- package/lib/module/components/screen/parts/BottomSafeArea.js.map +1 -1
- package/lib/module/components/screen/parts/ScreenPlaceholder.js +3 -3
- package/lib/module/components/screen/parts/ScreenPlaceholder.js.map +1 -1
- package/lib/module/components/screen/utils.js +3 -3
- package/lib/module/components/screen/utils.js.map +1 -1
- package/lib/module/components/slot/Slot.js +2 -2
- package/lib/module/components/slot/Slot.js.map +1 -1
- package/lib/module/components/slot/utils.js +3 -3
- package/lib/module/components/slot/utils.js.map +1 -1
- package/lib/module/components/spinner/Spinner.js +10 -10
- package/lib/module/components/spinner/Spinner.js.map +1 -1
- package/lib/module/components/surface/Surface.js +14 -14
- package/lib/module/components/surface/Surface.js.map +1 -1
- package/lib/module/components/text/Text.js +13 -13
- package/lib/module/components/text/Text.js.map +1 -1
- package/lib/module/components/toast/Toast.js +46 -46
- package/lib/module/components/toast/Toast.js.map +1 -1
- package/lib/module/components/toast/ToastProvider.js +32 -32
- package/lib/module/components/toast/ToastProvider.js.map +1 -1
- package/lib/module/components/toast/parts/ToastAnimatedItem.js +10 -10
- package/lib/module/components/toast/parts/ToastAnimatedItem.js.map +1 -1
- package/lib/module/components/toast/utils/controller.js +2 -2
- package/lib/module/components/toast/utils/controller.js.map +1 -1
- package/lib/module/components/toolbar/Toolbar.js +25 -25
- package/lib/module/components/toolbar/Toolbar.js.map +1 -1
- package/lib/module/context/ThemeProvider.js +5 -5
- package/lib/module/context/ThemeProvider.js.map +1 -1
- package/lib/module/theme/breakpoints.js.map +1 -1
- package/lib/module/theme/defaults/icons.js +11 -11
- package/lib/module/theme/defaults/icons.js.map +1 -1
- package/lib/module/theme/defaults/image.js +7 -7
- package/lib/module/theme/defaults/image.js.map +1 -1
- package/lib/module/theme/registry.js +11 -11
- package/lib/module/theme/registry.js.map +1 -1
- package/lib/module/theme/runtime.js +3 -3
- package/lib/module/theme/runtime.js.map +1 -1
- package/lib/module/theme/theme.js +9 -9
- package/lib/module/theme/theme.js.map +1 -1
- package/lib/module/theme/tokens/dark.js +67 -67
- package/lib/module/theme/tokens/light.js +67 -67
- package/lib/module/theme/tokens/primitives.js +417 -417
- package/lib/module/utils/accent-utils.js +16 -16
- package/lib/module/utils/accent-utils.js.map +1 -1
- package/lib/module/utils/color-utils.js +3 -3
- package/lib/module/utils/deep-merge.js +1 -1
- package/lib/module/utils/resolve-theme-color.js +2 -2
- package/lib/module/utils/resolve-theme-color.js.map +1 -1
- package/lib/module/utils/typography.js +5 -5
- package/lib/module/utils/typography.js.map +1 -1
- package/lib/module/utils/unflatten.js +2 -2
- package/lib/typescript/src/components/avatar/Avatar.d.ts +1 -1
- package/lib/typescript/src/components/avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/src/components/avatar/index.d.ts +2 -2
- package/lib/typescript/src/components/avatar/types.d.ts +7 -7
- package/lib/typescript/src/components/avatar/types.d.ts.map +1 -1
- package/lib/typescript/src/components/box/Box.d.ts +2 -2
- package/lib/typescript/src/components/box/Box.d.ts.map +1 -1
- package/lib/typescript/src/components/box/index.d.ts +3 -3
- package/lib/typescript/src/components/box/utils.d.ts +7 -7
- package/lib/typescript/src/components/box/utils.d.ts.map +1 -1
- package/lib/typescript/src/components/button/Button.d.ts +15 -8
- package/lib/typescript/src/components/button/Button.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts +2 -2
- package/lib/typescript/src/components/chip/Chip.d.ts +5 -5
- package/lib/typescript/src/components/chip/Chip.d.ts.map +1 -1
- package/lib/typescript/src/components/chip/index.d.ts +3 -3
- package/lib/typescript/src/components/chip/types.d.ts +3 -3
- package/lib/typescript/src/components/chip/utils.d.ts +1 -1
- package/lib/typescript/src/components/empty-state/EmptyState.d.ts +5 -5
- package/lib/typescript/src/components/empty-state/EmptyState.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/index.d.ts +3 -3
- package/lib/typescript/src/components/empty-state/types.d.ts +1 -1
- package/lib/typescript/src/components/header/Header.d.ts +2 -2
- package/lib/typescript/src/components/header/header-buttons.d.ts +3 -3
- package/lib/typescript/src/components/header/header-buttons.d.ts.map +1 -1
- package/lib/typescript/src/components/header/index.d.ts +6 -6
- package/lib/typescript/src/components/header/parts/HeaderGradientOverlay.d.ts.map +1 -1
- package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts +1 -1
- package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts.map +1 -1
- package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts +4 -4
- package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts.map +1 -1
- package/lib/typescript/src/components/icon/Icon.d.ts +3 -3
- package/lib/typescript/src/components/icon/Icon.d.ts.map +1 -1
- package/lib/typescript/src/components/icon/index.d.ts +2 -2
- package/lib/typescript/src/components/image/Image.d.ts +2 -2
- package/lib/typescript/src/components/image/Image.d.ts.map +1 -1
- package/lib/typescript/src/components/image/index.d.ts +2 -2
- package/lib/typescript/src/components/image/types.d.ts +1 -1
- package/lib/typescript/src/components/index.d.ts +17 -17
- package/lib/typescript/src/components/page-indicator/PageIndicator.d.ts +10 -10
- package/lib/typescript/src/components/page-indicator/PageIndicatorRoot.d.ts +2 -2
- package/lib/typescript/src/components/page-indicator/PageIndicatorRoot.d.ts.map +1 -1
- package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-colors.d.ts +1 -1
- package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-colors.d.ts.map +1 -1
- package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-core.d.ts +3 -3
- package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-core.d.ts.map +1 -1
- package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-progress.d.ts +2 -2
- package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-progress.d.ts.map +1 -1
- package/lib/typescript/src/components/page-indicator/index.d.ts +3 -3
- package/lib/typescript/src/components/page-indicator/utils.d.ts +2 -2
- package/lib/typescript/src/components/page-indicator/utils.d.ts.map +1 -1
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/InactiveDot.d.ts +1 -1
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/InactiveDot.d.ts.map +1 -1
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/LoadingOrbit.d.ts +2 -2
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/LoadingOrbit.d.ts.map +1 -1
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/TravelingPill.d.ts +2 -2
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/TravelingPill.d.ts.map +1 -1
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/index.d.ts +3 -3
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/index.d.ts.map +1 -1
- package/lib/typescript/src/components/page-indicator/variants/DotIndicator/utils.d.ts.map +1 -1
- package/lib/typescript/src/components/page-indicator/variants/PillIndicator/PillIndicatorDot.d.ts +2 -2
- package/lib/typescript/src/components/page-indicator/variants/PillIndicator/PillIndicatorDot.d.ts.map +1 -1
- package/lib/typescript/src/components/page-indicator/variants/PillIndicator/index.d.ts +3 -3
- package/lib/typescript/src/components/page-indicator/variants/PillIndicator/index.d.ts.map +1 -1
- package/lib/typescript/src/components/page-indicator/variants/PillIndicator/utils.d.ts +1 -1
- package/lib/typescript/src/components/portal/Portal.d.ts +3 -3
- package/lib/typescript/src/components/portal/PortalContext.d.ts +1 -1
- package/lib/typescript/src/components/portal/PortalHost.d.ts +2 -2
- package/lib/typescript/src/components/portal/PortalProvider.d.ts +1 -1
- package/lib/typescript/src/components/portal/PortalProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/portal/index.d.ts +7 -7
- package/lib/typescript/src/components/screen/Screen.d.ts +10 -10
- package/lib/typescript/src/components/screen/Screen.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenContext.d.ts +3 -3
- package/lib/typescript/src/components/screen/ScreenContext.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenFlatList.d.ts +3 -3
- package/lib/typescript/src/components/screen/ScreenFlatList.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenList.d.ts +5 -5
- package/lib/typescript/src/components/screen/ScreenList.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenScrollView.d.ts +5 -5
- package/lib/typescript/src/components/screen/ScreenScrollView.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/index.d.ts +11 -11
- package/lib/typescript/src/components/screen/parts/BottomSafeArea.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/parts/ScreenPlaceholder.d.ts +3 -3
- package/lib/typescript/src/components/screen/parts/ScreenPlaceholder.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/types.d.ts +2 -2
- package/lib/typescript/src/components/screen/utils.d.ts +2 -2
- package/lib/typescript/src/components/screen/utils.d.ts.map +1 -1
- package/lib/typescript/src/components/slot/Slot.d.ts +2 -2
- package/lib/typescript/src/components/slot/Slot.d.ts.map +1 -1
- package/lib/typescript/src/components/slot/index.d.ts +3 -3
- package/lib/typescript/src/components/slot/utils.d.ts +1 -1
- package/lib/typescript/src/components/slot/utils.d.ts.map +1 -1
- package/lib/typescript/src/components/spinner/Spinner.d.ts +2 -2
- package/lib/typescript/src/components/spinner/Spinner.d.ts.map +1 -1
- package/lib/typescript/src/components/spinner/index.d.ts +2 -2
- package/lib/typescript/src/components/surface/Surface.d.ts +4 -4
- package/lib/typescript/src/components/surface/Surface.d.ts.map +1 -1
- package/lib/typescript/src/components/surface/index.d.ts +2 -2
- package/lib/typescript/src/components/text/Text.d.ts +4 -4
- package/lib/typescript/src/components/text/Text.d.ts.map +1 -1
- package/lib/typescript/src/components/text/index.d.ts +2 -2
- package/lib/typescript/src/components/toast/Toast.d.ts +18 -18
- package/lib/typescript/src/components/toast/Toast.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/ToastProvider.d.ts +1 -1
- package/lib/typescript/src/components/toast/ToastProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/index.d.ts +4 -4
- package/lib/typescript/src/components/toast/parts/ToastAnimatedItem.d.ts +3 -3
- package/lib/typescript/src/components/toast/parts/ToastAnimatedItem.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/types.d.ts +10 -10
- package/lib/typescript/src/components/toast/types.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/utils/controller.d.ts +2 -2
- package/lib/typescript/src/components/toast/utils/controller.d.ts.map +1 -1
- package/lib/typescript/src/components/toolbar/Toolbar.d.ts +5 -5
- package/lib/typescript/src/components/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/typescript/src/components/toolbar/index.d.ts +2 -2
- package/lib/typescript/src/context/ThemeProvider.d.ts +3 -3
- package/lib/typescript/src/context/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/context/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts +3 -3
- package/lib/typescript/src/theme/breakpoints.d.ts +2 -2
- package/lib/typescript/src/theme/breakpoints.d.ts.map +1 -1
- package/lib/typescript/src/theme/defaults/icons.d.ts +1 -1
- package/lib/typescript/src/theme/defaults/icons.d.ts.map +1 -1
- package/lib/typescript/src/theme/defaults/image.d.ts +1 -1
- package/lib/typescript/src/theme/defaults/image.d.ts.map +1 -1
- package/lib/typescript/src/theme/index.d.ts +14 -14
- package/lib/typescript/src/theme/registry.d.ts +2 -2
- package/lib/typescript/src/theme/registry.d.ts.map +1 -1
- package/lib/typescript/src/theme/runtime.d.ts +1 -1
- package/lib/typescript/src/theme/runtime.d.ts.map +1 -1
- package/lib/typescript/src/theme/screen-margin.d.ts +2 -2
- package/lib/typescript/src/theme/theme.d.ts +2 -2
- package/lib/typescript/src/theme/theme.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens/dark.d.ts +67 -67
- package/lib/typescript/src/theme/tokens/light.d.ts +67 -67
- package/lib/typescript/src/theme/tokens/primitives.d.ts +417 -417
- package/lib/typescript/src/theme/types.d.ts +99 -84
- package/lib/typescript/src/theme/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/accent-utils.d.ts +1 -1
- package/lib/typescript/src/utils/accent-utils.d.ts.map +1 -1
- package/lib/typescript/src/utils/resolve-theme-color.d.ts +1 -1
- package/lib/typescript/src/utils/resolve-theme-color.d.ts.map +1 -1
- package/lib/typescript/src/utils/typography.d.ts +2 -2
- package/lib/typescript/src/utils/typography.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/avatar/Avatar.tsx +66 -71
- package/src/components/avatar/index.ts +2 -2
- package/src/components/avatar/types.ts +7 -12
- package/src/components/box/Box.tsx +7 -18
- package/src/components/box/index.ts +3 -3
- package/src/components/box/utils.ts +59 -81
- package/src/components/button/Button.tsx +119 -144
- package/src/components/button/index.ts +2 -2
- package/src/components/chip/Chip.tsx +107 -143
- package/src/components/chip/index.ts +3 -3
- package/src/components/chip/types.ts +7 -7
- package/src/components/chip/utils.ts +5 -5
- package/src/components/empty-state/EmptyState.tsx +44 -60
- package/src/components/empty-state/index.ts +3 -3
- package/src/components/empty-state/types.ts +1 -1
- package/src/components/header/Header.ts +2 -2
- package/src/components/header/header-buttons.tsx +10 -18
- package/src/components/header/index.ts +6 -6
- package/src/components/header/parts/HeaderGradientOverlay.tsx +3 -7
- package/src/components/header/variants/LargeTitleHeader/index.tsx +75 -139
- package/src/components/header/variants/TitleHeader/index.tsx +40 -62
- package/src/components/icon/Icon.tsx +31 -39
- package/src/components/icon/index.ts +2 -2
- package/src/components/image/Image.tsx +22 -11
- package/src/components/image/index.ts +2 -2
- package/src/components/image/types.ts +1 -1
- package/src/components/index.ts +17 -17
- package/src/components/page-indicator/PageIndicator.tsx +14 -14
- package/src/components/page-indicator/PageIndicatorRoot.tsx +4 -12
- package/src/components/page-indicator/hooks/use-page-indicator-colors.ts +17 -35
- package/src/components/page-indicator/hooks/use-page-indicator-core.ts +6 -8
- package/src/components/page-indicator/hooks/use-page-indicator-progress.ts +10 -30
- package/src/components/page-indicator/index.ts +3 -3
- package/src/components/page-indicator/utils.ts +20 -48
- package/src/components/page-indicator/variants/DotIndicator/InactiveDot.tsx +5 -16
- package/src/components/page-indicator/variants/DotIndicator/LoadingOrbit.tsx +21 -63
- package/src/components/page-indicator/variants/DotIndicator/TravelingPill.tsx +6 -16
- package/src/components/page-indicator/variants/DotIndicator/index.tsx +20 -38
- package/src/components/page-indicator/variants/DotIndicator/utils.ts +2 -6
- package/src/components/page-indicator/variants/PillIndicator/PillIndicatorDot.tsx +12 -50
- package/src/components/page-indicator/variants/PillIndicator/index.tsx +19 -41
- package/src/components/page-indicator/variants/PillIndicator/utils.ts +4 -4
- package/src/components/portal/Portal.tsx +4 -4
- package/src/components/portal/PortalContext.tsx +1 -1
- package/src/components/portal/PortalHost.tsx +4 -4
- package/src/components/portal/PortalProvider.tsx +24 -35
- package/src/components/portal/index.ts +7 -7
- package/src/components/screen/Screen.tsx +45 -52
- package/src/components/screen/ScreenContext.tsx +8 -17
- package/src/components/screen/ScreenFlatList.tsx +17 -36
- package/src/components/screen/ScreenList.tsx +31 -63
- package/src/components/screen/ScreenScrollView.tsx +17 -30
- package/src/components/screen/index.ts +11 -11
- package/src/components/screen/parts/BottomSafeArea.tsx +5 -6
- package/src/components/screen/parts/ScreenPlaceholder.tsx +9 -14
- package/src/components/screen/types.ts +2 -2
- package/src/components/screen/utils.ts +6 -19
- package/src/components/slot/Slot.tsx +5 -20
- package/src/components/slot/index.ts +3 -3
- package/src/components/slot/utils.ts +5 -8
- package/src/components/spinner/Spinner.tsx +19 -52
- package/src/components/spinner/index.ts +2 -2
- package/src/components/surface/Surface.tsx +34 -43
- package/src/components/surface/index.ts +2 -2
- package/src/components/text/Text.tsx +75 -85
- package/src/components/text/index.ts +2 -2
- package/src/components/toast/Toast.tsx +195 -251
- package/src/components/toast/ToastProvider.tsx +61 -136
- package/src/components/toast/index.ts +4 -4
- package/src/components/toast/parts/ToastAnimatedItem.tsx +14 -22
- package/src/components/toast/types.ts +11 -14
- package/src/components/toast/utils/controller.ts +4 -6
- package/src/components/toolbar/Toolbar.tsx +42 -61
- package/src/components/toolbar/index.ts +2 -2
- package/src/context/ThemeProvider.tsx +13 -28
- package/src/context/index.ts +2 -2
- package/src/index.tsx +3 -3
- package/src/theme/breakpoints.ts +3 -5
- package/src/theme/defaults/icons.tsx +15 -30
- package/src/theme/defaults/image.tsx +9 -14
- package/src/theme/index.ts +14 -14
- package/src/theme/registry.ts +30 -49
- package/src/theme/runtime.ts +6 -7
- package/src/theme/screen-margin.ts +3 -3
- package/src/theme/theme.ts +39 -60
- package/src/theme/tokens/dark.ts +67 -67
- package/src/theme/tokens/light.ts +67 -67
- package/src/theme/tokens/primitives.ts +417 -417
- package/src/theme/types.ts +138 -135
- package/src/utils/accent-utils.ts +21 -30
- package/src/utils/color-utils.ts +3 -3
- package/src/utils/deep-merge.ts +1 -1
- package/src/utils/resolve-theme-color.ts +8 -11
- package/src/utils/typography.ts +7 -10
- package/src/utils/unflatten.ts +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import Svg, { Circle, Path } from
|
|
3
|
+
import Svg, { Circle, Path } from "react-native-svg";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
const DEFAULT_SIZE = 20;
|
|
6
|
-
const DEFAULT_COLOR =
|
|
6
|
+
const DEFAULT_COLOR = "#000000";
|
|
7
7
|
const DEFAULT_STROKE_WIDTH = 2;
|
|
8
8
|
const resolveIconProps = ({
|
|
9
9
|
size = DEFAULT_SIZE,
|
|
@@ -17,8 +17,8 @@ const resolveIconProps = ({
|
|
|
17
17
|
const strokeProps = (color, strokeWidth) => ({
|
|
18
18
|
stroke: color,
|
|
19
19
|
strokeWidth,
|
|
20
|
-
strokeLinecap:
|
|
21
|
-
strokeLinejoin:
|
|
20
|
+
strokeLinecap: "round",
|
|
21
|
+
strokeLinejoin: "round"
|
|
22
22
|
});
|
|
23
23
|
const SvgIcon = ({
|
|
24
24
|
size,
|
|
@@ -176,13 +176,13 @@ export const PersonIcon = props => {
|
|
|
176
176
|
});
|
|
177
177
|
};
|
|
178
178
|
export const defaultIcons = {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
179
|
+
"navigation.back": BackIcon,
|
|
180
|
+
"navigation.forward": ForwardIcon,
|
|
181
|
+
"navigation.close": CloseIcon,
|
|
182
|
+
"status.info": InfoIcon,
|
|
183
|
+
"status.success": SuccessIcon,
|
|
184
|
+
"status.warning": WarningIcon,
|
|
185
|
+
"status.danger": DangerIcon,
|
|
186
186
|
person: PersonIcon
|
|
187
187
|
};
|
|
188
188
|
//# sourceMappingURL=icons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Svg","Circle","Path","jsx","_jsx","jsxs","_jsxs","DEFAULT_SIZE","DEFAULT_COLOR","DEFAULT_STROKE_WIDTH","resolveIconProps","size","color","strokeWidth","strokeProps","stroke","strokeLinecap","strokeLinejoin","SvgIcon","children","width","height","viewBox","fill","PathIcon","d","props","NAV_CENTER","NAV_CHEVRON_OPEN","NAV_CHEVRON_ARM","BackIcon","ForwardIcon","CloseIcon","InfoIcon","cx","cy","r","SuccessIcon","WarningIcon","DangerIcon","PersonIcon","iconSize","defaultIcons","person"],"sourceRoot":"../../../../src","sources":["theme/defaults/icons.tsx"],"mappings":";;AAAA,OAAOA,GAAG,IAAIC,MAAM,EAAEC,IAAI,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;
|
|
1
|
+
{"version":3,"names":["Svg","Circle","Path","jsx","_jsx","jsxs","_jsxs","DEFAULT_SIZE","DEFAULT_COLOR","DEFAULT_STROKE_WIDTH","resolveIconProps","size","color","strokeWidth","strokeProps","stroke","strokeLinecap","strokeLinejoin","SvgIcon","children","width","height","viewBox","fill","PathIcon","d","props","NAV_CENTER","NAV_CHEVRON_OPEN","NAV_CHEVRON_ARM","BackIcon","ForwardIcon","CloseIcon","InfoIcon","cx","cy","r","SuccessIcon","WarningIcon","DangerIcon","PersonIcon","iconSize","defaultIcons","person"],"sourceRoot":"../../../../src","sources":["theme/defaults/icons.tsx"],"mappings":";;AAAA,OAAOA,GAAG,IAAIC,MAAM,EAAEC,IAAI,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAIrD,MAAMC,YAAY,GAAG,EAAE;AACvB,MAAMC,aAAa,GAAG,SAAS;AAC/B,MAAMC,oBAAoB,GAAG,CAAC;AAE9B,MAAMC,gBAAgB,GAAGA,CAAC;EACxBC,IAAI,GAAGJ,YAAY;EACnBK,KAAK,GAAGJ,aAAa;EACrBK,WAAW,GAAGJ;AACA,CAAC,MAAM;EAAEG,KAAK;EAAED,IAAI;EAAEE;AAAY,CAAC,CAAC;AAEpD,MAAMC,WAAW,GAAGA,CAACF,KAAa,EAAEC,WAAmB,MAAM;EAC3DE,MAAM,EAAEH,KAAK;EACbC,WAAW;EACXG,aAAa,EAAE,OAAgB;EAC/BC,cAAc,EAAE;AAClB,CAAC,CAAC;AAEF,MAAMC,OAAO,GAAGA,CAAC;EAAEP,IAAI;EAAEQ;AAAsD,CAAC,kBAC9Ef,IAAA,CAACJ,GAAG;EAACoB,KAAK,EAAET,IAAK;EAACU,MAAM,EAAEV,IAAK;EAACW,OAAO,EAAC,WAAW;EAACC,IAAI,EAAC,MAAM;EAAAJ,QAAA,EAC5DA;AAAQ,CACN,CACN;AAED,MAAMK,QAAQ,GAAGA,CAAC;EAAEC,CAAC;EAAE,GAAGC;AAAsC,CAAC,KAAK;EACpE,MAAM;IAAEd,KAAK;IAAED,IAAI;IAAEE;EAAY,CAAC,GAAGH,gBAAgB,CAACgB,KAAK,CAAC;EAE5D,oBACEtB,IAAA,CAACc,OAAO;IAACP,IAAI,EAAEA,IAAK;IAAAQ,QAAA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;IAAM,CAAG,CAAC,eAC3CX,IAAA,CAACF,IAAI;MAACuB,CAAC,EAAC,+BAA+B;MAAA,GAAKV;IAAM,CAAG,CAAC;EAAA,CACnD,CAAC;AAEV,CAAC;AAED,OAAO,MAAM2B,YAA+D,GAAG;EAC7E,iBAAiB,EAAEZ,QAAQ;EAC3B,oBAAoB,EAAEC,WAAW;EACjC,kBAAkB,EAAEC,SAAS;EAC7B,aAAa,EAAEC,QAAQ;EACvB,gBAAgB,EAAEI,WAAW;EAC7B,gBAAgB,EAAEC,WAAW;EAC7B,eAAe,EAAEC,UAAU;EAC3BI,MAAM,EAAEH;AACV,CAAC","ignoreList":[]}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { Image } from "react-native-unistyles/components/native/Image";
|
|
4
|
-
import { createElement } from
|
|
5
|
-
import { Platform } from
|
|
4
|
+
import { createElement } from "react";
|
|
5
|
+
import { Platform } from "react-native";
|
|
6
6
|
const CONTENT_FIT_MAP = {
|
|
7
|
-
cover:
|
|
8
|
-
contain:
|
|
9
|
-
fill:
|
|
7
|
+
cover: "cover",
|
|
8
|
+
contain: "contain",
|
|
9
|
+
fill: "stretch"
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
/** Default image implementation, backed by React Native's `Image`. */
|
|
13
13
|
export const defaultImage = ({
|
|
14
|
-
contentFit =
|
|
14
|
+
contentFit = "cover",
|
|
15
15
|
source,
|
|
16
16
|
style,
|
|
17
17
|
accessibilityLabel,
|
|
@@ -25,7 +25,7 @@ export const defaultImage = ({
|
|
|
25
25
|
// `defaultSource` (iOS only) and `loadingIndicatorSource` (Android only).
|
|
26
26
|
// Only one may be set — Android's Image throws outright when it is handed
|
|
27
27
|
// both — so the placeholder goes to whichever this platform reads.
|
|
28
|
-
...(Platform.OS ===
|
|
28
|
+
...(Platform.OS === "android" ? {
|
|
29
29
|
loadingIndicatorSource: placeholder
|
|
30
30
|
} : {
|
|
31
31
|
defaultSource: placeholder
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createElement","Platform","CONTENT_FIT_MAP","cover","contain","fill","defaultImage","contentFit","source","style","accessibilityLabel","placeholder","onError","Image","OS","loadingIndicatorSource","defaultSource","resizeMode","undefined"],"sourceRoot":"../../../../src","sources":["theme/defaults/image.tsx"],"mappings":";;;AAAA,SAASA,aAAa,QAAQ,OAAO;AACrC,SAAgBC,QAAQ,QAAQ,cAAc;AAI9C,MAAMC,eAAe,GAAG;EACtBC,KAAK,EAAE,OAAO;EACdC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE;AACR,
|
|
1
|
+
{"version":3,"names":["createElement","Platform","CONTENT_FIT_MAP","cover","contain","fill","defaultImage","contentFit","source","style","accessibilityLabel","placeholder","onError","Image","OS","loadingIndicatorSource","defaultSource","resizeMode","undefined"],"sourceRoot":"../../../../src","sources":["theme/defaults/image.tsx"],"mappings":";;;AAAA,SAASA,aAAa,QAAQ,OAAO;AACrC,SAAgBC,QAAQ,QAAQ,cAAc;AAI9C,MAAMC,eAAe,GAAG;EACtBC,KAAK,EAAE,OAAO;EACdC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE;AACR,CAAkF;;AAElF;AACA,OAAO,MAAMC,YAAiC,GAAGA,CAAC;EAChDC,UAAU,GAAG,OAAO;EACpBC,MAAM;EACNC,KAAK;EACLC,kBAAkB;EAClBC,WAAW;EACXC;AACF,CAAC,kBACCZ,aAAa,CAACa,KAAK,EAAE;EACnBL,MAAM;EACNC,KAAK;EACLC,kBAAkB;EAClB;EACA;EACA;EACA;EACA,IAAIT,QAAQ,CAACa,EAAE,KAAK,SAAS,GAAG;IAAEC,sBAAsB,EAAEJ;EAAY,CAAC,GAAG;IAAEK,aAAa,EAAEL;EAAY,CAAC,CAAC;EACzGM,UAAU,EAAEf,eAAe,CAACK,UAAU,CAAC;EACvCK,OAAO,EAAEA,OAAO,GAAG,MAAMA,OAAO,CAAC,CAAC,GAAGM;AACvC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { StyleSheet, UnistylesRuntime } from
|
|
3
|
+
import { StyleSheet, UnistylesRuntime } from "react-native-unistyles";
|
|
4
4
|
import { normalizeAccent } from "../utils/accent-utils.js";
|
|
5
5
|
import { deepMerge } from "../utils/deep-merge.js";
|
|
6
6
|
import { breakpoints } from "./breakpoints.js";
|
|
@@ -10,9 +10,9 @@ import { buildRadiusScale, buildSpacingScale, defaultDarkTheme, defaultLightThem
|
|
|
10
10
|
// ─── Radius / elevation defaults ─────────────────────────────────────────────
|
|
11
11
|
|
|
12
12
|
/** Fallback when a component's radius is not configured. */
|
|
13
|
-
const DEFAULT_RADIUS =
|
|
13
|
+
const DEFAULT_RADIUS = "md";
|
|
14
14
|
/** Fallback when the surface elevation is not configured. */
|
|
15
|
-
const DEFAULT_ELEVATION =
|
|
15
|
+
const DEFAULT_ELEVATION = "none";
|
|
16
16
|
/** Resolves each component's default radius from the `components` config. */
|
|
17
17
|
const resolveDefaultRadius = components => ({
|
|
18
18
|
button: components?.button?.radius ?? DEFAULT_RADIUS,
|
|
@@ -55,7 +55,7 @@ export const getSurfaceElevation = () => registry.surfaceElevation;
|
|
|
55
55
|
|
|
56
56
|
/** Resolves a scheme's theme = base ⊕ the named accent's partial override. */
|
|
57
57
|
export function resolveTheme(scheme, accentName) {
|
|
58
|
-
const base = scheme ===
|
|
58
|
+
const base = scheme === "light" ? registry.baseLight : registry.baseDark;
|
|
59
59
|
const accent = accentName ? registry.accents[accentName] : undefined;
|
|
60
60
|
return deepMerge(base, accent ? accent[scheme] : undefined);
|
|
61
61
|
}
|
|
@@ -120,7 +120,7 @@ let unistylesConfigured = false;
|
|
|
120
120
|
export function configureTerraUI(config = {}) {
|
|
121
121
|
if (registry.configured && !configuredByFallback) {
|
|
122
122
|
if (__DEV__ && Object.keys(config).length > 0) {
|
|
123
|
-
console.warn(
|
|
123
|
+
console.warn("[react-native-terra-ui] configureTerraUI() was called more than once; the later call was ignored.");
|
|
124
124
|
}
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
@@ -164,8 +164,8 @@ function applyConfig(config) {
|
|
|
164
164
|
} = config;
|
|
165
165
|
registry.currentAccent = defaultAccent && registry.accents[defaultAccent] ? defaultAccent : undefined;
|
|
166
166
|
const themes = {
|
|
167
|
-
light: resolveTheme(
|
|
168
|
-
dark: resolveTheme(
|
|
167
|
+
light: resolveTheme("light", registry.currentAccent),
|
|
168
|
+
dark: resolveTheme("dark", registry.currentAccent)
|
|
169
169
|
};
|
|
170
170
|
const adaptive = config.adaptiveThemes ?? true;
|
|
171
171
|
const settings = config.initialScheme ? {
|
|
@@ -173,16 +173,16 @@ function applyConfig(config) {
|
|
|
173
173
|
} : adaptive ? {
|
|
174
174
|
adaptiveThemes: true
|
|
175
175
|
} : {
|
|
176
|
-
initialTheme:
|
|
176
|
+
initialTheme: "light"
|
|
177
177
|
};
|
|
178
178
|
if (unistylesConfigured) {
|
|
179
179
|
// `StyleSheet.configure` is a one-time startup call — calling it again
|
|
180
180
|
// leaves the themes it already registered in place, which would strand an
|
|
181
181
|
// app's config behind the fallback's defaults. Hand the rebuilt themes to
|
|
182
182
|
// the runtime instead, the same way `applyAccent` swaps a palette.
|
|
183
|
-
UnistylesRuntime.updateTheme(
|
|
184
|
-
UnistylesRuntime.updateTheme(
|
|
185
|
-
if (
|
|
183
|
+
UnistylesRuntime.updateTheme("light", () => themes.light);
|
|
184
|
+
UnistylesRuntime.updateTheme("dark", () => themes.dark);
|
|
185
|
+
if ("adaptiveThemes" in settings) {
|
|
186
186
|
UnistylesRuntime.setAdaptiveThemes(true);
|
|
187
187
|
} else {
|
|
188
188
|
UnistylesRuntime.setAdaptiveThemes(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","UnistylesRuntime","normalizeAccent","deepMerge","breakpoints","defaultIcons","defaultImage","buildRadiusScale","buildSpacingScale","defaultDarkTheme","defaultLightTheme","DEFAULT_RADIUS","DEFAULT_ELEVATION","resolveDefaultRadius","components","button","radius","surface","registry","baseLight","baseDark","accents","currentAccent","undefined","defaultRadius","surfaceElevation","icons","imageComponent","configured","getRegistry","getIsConfigured","getAccentNames","Object","keys","getImageComponent","getIcon","name","getRequiredIcon","getDefaultRadius","component","getSurfaceElevation","resolveTheme","scheme","accentName","base","accent","mergeThemeOverride","theme","override","spacing","rest","next","radiusTokens","spacingTokens","configuredByFallback","unistylesConfigured","configureTerraUI","config","__DEV__","length","console","warn","applyConfig","bootstrapTerraUI","shared","schemes","light","dark","elevation","image","entries","defaultAccent","themes","adaptive","adaptiveThemes","settings","initialScheme","initialTheme","updateTheme","setAdaptiveThemes","setTheme","configure"],"sourceRoot":"../../../src","sources":["theme/registry.ts"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,gBAAgB,QAAQ,wBAAwB;AAErE,SAASC,eAAe;AACxB,SAASC,SAAS;
|
|
1
|
+
{"version":3,"names":["StyleSheet","UnistylesRuntime","normalizeAccent","deepMerge","breakpoints","defaultIcons","defaultImage","buildRadiusScale","buildSpacingScale","defaultDarkTheme","defaultLightTheme","DEFAULT_RADIUS","DEFAULT_ELEVATION","resolveDefaultRadius","components","button","radius","surface","registry","baseLight","baseDark","accents","currentAccent","undefined","defaultRadius","surfaceElevation","icons","imageComponent","configured","getRegistry","getIsConfigured","getAccentNames","Object","keys","getImageComponent","getIcon","name","getRequiredIcon","getDefaultRadius","component","getSurfaceElevation","resolveTheme","scheme","accentName","base","accent","mergeThemeOverride","theme","override","spacing","rest","next","radiusTokens","spacingTokens","configuredByFallback","unistylesConfigured","configureTerraUI","config","__DEV__","length","console","warn","applyConfig","bootstrapTerraUI","shared","schemes","light","dark","elevation","image","entries","defaultAccent","themes","adaptive","adaptiveThemes","settings","initialScheme","initialTheme","updateTheme","setAdaptiveThemes","setTheme","configure"],"sourceRoot":"../../../src","sources":["theme/registry.ts"],"mappings":";;AAAA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M,CAACiB,cAAc,IAAI,IAAI;EAC9C,MAAMC,QAAQ,GAAGlB,MAAM,CAACmB,aAAa,GACjC;IAAEC,YAAY,EAAEpB,MAAM,CAACmB;EAAc,CAAC,GACtCH,QAAQ,GACN;IAAEC,cAAc,EAAE;EAAc,CAAC,GACjC;IAAEG,YAAY,EAAE;EAAiB,CAAC;EAExC,IAAItB,mBAAmB,EAAE;IACvB;IACA;IACA;IACA;IACAtD,gBAAgB,CAAC6E,WAAW,CAAC,OAAO,EAAE,MAAMN,MAAM,CAACN,KAAK,CAAC;IACzDjE,gBAAgB,CAAC6E,WAAW,CAAC,MAAM,EAAE,MAAMN,MAAM,CAACL,IAAI,CAAC;IAEvD,IAAI,gBAAgB,IAAIQ,QAAQ,EAAE;MAChC1E,gBAAgB,CAAC8E,iBAAiB,CAAC,IAAI,CAAC;IAC1C,CAAC,MAAM;MACL9E,gBAAgB,CAAC8E,iBAAiB,CAAC,KAAK,CAAC;MACzC9E,gBAAgB,CAAC+E,QAAQ,CAACL,QAAQ,CAACE,YAAY,CAAC;IAClD;IAEA;EACF;EAEA7E,UAAU,CAACiF,SAAS,CAAC;IAAET,MAAM;IAAEG,QAAQ;IAAEvE;EAAY,CAAC,CAAC;EACvDmD,mBAAmB,GAAG,IAAI;AAC5B","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { UnistylesRuntime } from
|
|
3
|
+
import { UnistylesRuntime } from "react-native-unistyles";
|
|
4
4
|
import { getRegistry, resolveTheme } from "./registry.js";
|
|
5
5
|
/** Apply a named accent at runtime by updating both registered themes. */
|
|
6
6
|
export function applyAccent(name) {
|
|
@@ -12,8 +12,8 @@ export function applyAccent(name) {
|
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
registry.currentAccent = name;
|
|
15
|
-
UnistylesRuntime.updateTheme(
|
|
16
|
-
UnistylesRuntime.updateTheme(
|
|
15
|
+
UnistylesRuntime.updateTheme("light", () => resolveTheme("light", name));
|
|
16
|
+
UnistylesRuntime.updateTheme("dark", () => resolveTheme("dark", name));
|
|
17
17
|
}
|
|
18
18
|
export const getCurrentAccent = () => getRegistry().currentAccent;
|
|
19
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UnistylesRuntime","getRegistry","resolveTheme","applyAccent","name","registry","accents","__DEV__","console","warn","currentAccent","updateTheme","getCurrentAccent","applyScheme","scheme","setAdaptiveThemes","setTheme"],"sourceRoot":"../../../src","sources":["theme/runtime.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,wBAAwB;AAEzD,SAASC,WAAW,EAAEC,YAAY;AAGlC;AACA,OAAO,SAASC,WAAWA,CAACC,IAAY,EAAQ;EAC9C,MAAMC,QAAQ,GAAGJ,WAAW,CAAC,CAAC;EAC9B,IAAI,CAACI,QAAQ,CAACC,OAAO,CAACF,IAAI,CAAC,EAAE;IAC3B,IAAIG,OAAO,EAAE;MACXC,OAAO,CAACC,IAAI,CAAC,2CAA2CL,IAAI,IAAI,CAAC;IACnE;IACA;EACF;EACAC,QAAQ,CAACK,aAAa,GAAGN,IAAI;EAC7BJ,gBAAgB,CAACW,WAAW,CAAC,OAAO,EAAE,MAAMT,YAAY,CAAC,OAAO,EAAEE,IAAI,CAAC,CAAC;EACxEJ,gBAAgB,CAACW,WAAW,CAAC,MAAM,EAAE,MAAMT,YAAY,CAAC,MAAM,EAAEE,IAAI,CAAC,CAAC;AACxE;AAEA,OAAO,MAAMQ,gBAAgB,GAAGA,CAAA,
|
|
1
|
+
{"version":3,"names":["UnistylesRuntime","getRegistry","resolveTheme","applyAccent","name","registry","accents","__DEV__","console","warn","currentAccent","updateTheme","getCurrentAccent","applyScheme","scheme","setAdaptiveThemes","setTheme"],"sourceRoot":"../../../src","sources":["theme/runtime.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,wBAAwB;AAEzD,SAASC,WAAW,EAAEC,YAAY;AAGlC;AACA,OAAO,SAASC,WAAWA,CAACC,IAAY,EAAQ;EAC9C,MAAMC,QAAQ,GAAGJ,WAAW,CAAC,CAAC;EAC9B,IAAI,CAACI,QAAQ,CAACC,OAAO,CAACF,IAAI,CAAC,EAAE;IAC3B,IAAIG,OAAO,EAAE;MACXC,OAAO,CAACC,IAAI,CAAC,2CAA2CL,IAAI,IAAI,CAAC;IACnE;IACA;EACF;EACAC,QAAQ,CAACK,aAAa,GAAGN,IAAI;EAC7BJ,gBAAgB,CAACW,WAAW,CAAC,OAAO,EAAE,MAAMT,YAAY,CAAC,OAAO,EAAEE,IAAI,CAAC,CAAC;EACxEJ,gBAAgB,CAACW,WAAW,CAAC,MAAM,EAAE,MAAMT,YAAY,CAAC,MAAM,EAAEE,IAAI,CAAC,CAAC;AACxE;AAEA,OAAO,MAAMQ,gBAAgB,GAAGA,CAAA,KAA0BX,WAAW,CAAC,CAAC,CAACS,aAAa;;AAErF;AACA,OAAO,SAASG,WAAWA,CAACC,MAAc,EAAQ;EAChDd,gBAAgB,CAACe,iBAAiB,CAAC,KAAK,CAAC;EACzCf,gBAAgB,CAACgB,QAAQ,CAACF,MAAM,CAAC;AACnC","ignoreList":[]}
|
|
@@ -15,7 +15,7 @@ const HEX6_PATTERN = /^#[0-9a-f]{6}$/i;
|
|
|
15
15
|
*/
|
|
16
16
|
function percentToHexAlpha(percent) {
|
|
17
17
|
const byte = Math.round(percent / 100 * 255);
|
|
18
|
-
return byte.toString(16).padStart(2,
|
|
18
|
+
return byte.toString(16).padStart(2, "0");
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -29,7 +29,7 @@ function percentToHexAlpha(percent) {
|
|
|
29
29
|
function resolveRefs(flat, source) {
|
|
30
30
|
const out = {};
|
|
31
31
|
for (const [k, v] of Object.entries(flat)) {
|
|
32
|
-
if (typeof v !==
|
|
32
|
+
if (typeof v !== "string") {
|
|
33
33
|
out[k] = v;
|
|
34
34
|
continue;
|
|
35
35
|
}
|
|
@@ -41,10 +41,10 @@ function resolveRefs(flat, source) {
|
|
|
41
41
|
const percentStr = alphaMatch[2];
|
|
42
42
|
const base = source[refKey];
|
|
43
43
|
const percent = Number(percentStr);
|
|
44
|
-
out[k] = typeof base ===
|
|
44
|
+
out[k] = typeof base === "string" && HEX6_PATTERN.test(base) ? `${base}${percentToHexAlpha(percent)}` : v;
|
|
45
45
|
continue;
|
|
46
46
|
}
|
|
47
|
-
out[k] = v.startsWith(
|
|
47
|
+
out[k] = v.startsWith("{") && v.endsWith("}") ? source[v.slice(1, -1)] ?? v : v;
|
|
48
48
|
}
|
|
49
49
|
return out;
|
|
50
50
|
}
|
|
@@ -61,9 +61,9 @@ function resolveRefs(flat, source) {
|
|
|
61
61
|
function flattenByCategory(tokens) {
|
|
62
62
|
const out = {};
|
|
63
63
|
for (const [key, value] of Object.entries(tokens)) {
|
|
64
|
-
const sep = key.indexOf(
|
|
64
|
+
const sep = key.indexOf(".");
|
|
65
65
|
const cat = sep === -1 ? key : key.slice(0, sep);
|
|
66
|
-
const rest = sep === -1 ?
|
|
66
|
+
const rest = sep === -1 ? "" : key.slice(sep + 1);
|
|
67
67
|
if (out[cat] === undefined) {
|
|
68
68
|
out[cat] = {};
|
|
69
69
|
}
|
|
@@ -98,7 +98,7 @@ export const DEFAULT_RADIUS_BASE = prim.radius.base;
|
|
|
98
98
|
* to the base unit (e.g. `'5'` → `5 × base`), so no separate multiplier table
|
|
99
99
|
* is needed the way {@link RADIUS_MULTIPLIERS} is for radius.
|
|
100
100
|
*/
|
|
101
|
-
export const SPACING_KEYS = [
|
|
101
|
+
export const SPACING_KEYS = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "12", "14", "16", "20", "24", "32"];
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* Default spacing base unit (dp) — taken from the `spacing.base` primitive.
|
|
@@ -133,8 +133,8 @@ export const RADIUS_MULTIPLIERS = {
|
|
|
133
133
|
md: 0.75,
|
|
134
134
|
lg: 1,
|
|
135
135
|
xl: 1.5,
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
"2xl": 2,
|
|
137
|
+
"3xl": 3
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["unflatten","dark","light","primitives","ALPHA_REF_PATTERN","HEX6_PATTERN","percentToHexAlpha","percent","byte","Math","round","toString","padStart","resolveRefs","flat","source","out","k","v","Object","entries","alphaMatch","match","refKey","percentStr","base","Number","test","startsWith","endsWith","slice","flattenByCategory","tokens","key","value","sep","indexOf","cat","rest","undefined","prim","DEFAULT_RADIUS_BASE","radius","SPACING_KEYS","DEFAULT_SPACING_BASE","spacing","buildSpacingScale","scale","defaultSpacing","RADIUS_MULTIPLIERS","xs","sm","md","lg","xl","buildRadiusScale","none","full","keys","defaultRadius","lightByCategory","darkByCategory","withShadowColor","elevation","shadowColor","lightTokens","color","shadow","darkTokens","defaultLightTheme","typography","opacity","layout","defaultDarkTheme"],"sourceRoot":"../../../src","sources":["theme/theme.ts"],"mappings":";;AAAA,SAASA,SAAS;
|
|
1
|
+
{"version":3,"names":["unflatten","dark","light","primitives","ALPHA_REF_PATTERN","HEX6_PATTERN","percentToHexAlpha","percent","byte","Math","round","toString","padStart","resolveRefs","flat","source","out","k","v","Object","entries","alphaMatch","match","refKey","percentStr","base","Number","test","startsWith","endsWith","slice","flattenByCategory","tokens","key","value","sep","indexOf","cat","rest","undefined","prim","DEFAULT_RADIUS_BASE","radius","SPACING_KEYS","DEFAULT_SPACING_BASE","spacing","buildSpacingScale","scale","defaultSpacing","RADIUS_MULTIPLIERS","xs","sm","md","lg","xl","buildRadiusScale","none","full","keys","defaultRadius","lightByCategory","darkByCategory","withShadowColor","elevation","shadowColor","lightTokens","color","shadow","darkTokens","defaultLightTheme","typography","opacity","layout","defaultDarkTheme"],"sourceRoot":"../../../src","sources":["theme/theme.ts"],"mappings":";;AAAA,SAASA,SAAS;AAClB,SAASC,IAAI;AAC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U,CAACF,KAAK;EACvBH,SAAS,EAAEK,UAAU,CAACL,SAAS;EAC/BlB,OAAO,EAAEG,cAAc;EACvBN,MAAM,EAAEiB,aAAa;EACrBW,UAAU,EAAE9B,IAAI,CAAC8B,UAAU;EAC3BC,OAAO,EAAE/B,IAAI,CAAC+B,OAAO;EACrBC,MAAM,EAAEhC,IAAI,CAACgC;AACf,CAAC","ignoreList":[]}
|
|
@@ -9,92 +9,92 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export const dark = {
|
|
11
11
|
// ── color: page background ────────────────────────────────────────────────
|
|
12
|
-
|
|
12
|
+
"color.background": "#050505",
|
|
13
13
|
// ── color: shadow (used as elevation.*.shadowColor) ───────────────────────
|
|
14
|
-
|
|
14
|
+
"color.shadow": "#FFFFFF",
|
|
15
15
|
// ── color: surfaces (bg implied — no property segment) ──────────────────
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
"color.surface.default": "#17191A",
|
|
17
|
+
"color.surface.raised": "{palette.neutral.800}",
|
|
18
|
+
"color.surface.sunken": "#050506",
|
|
19
|
+
"color.surface.overlay": "rgba(0, 0, 0, 0.72)",
|
|
20
|
+
"color.surface.accent": "{palette.emerald.500}",
|
|
21
|
+
"color.surface.accent.subtle": "{palette.emerald.950}",
|
|
22
22
|
// ── color: text / icons (fg implied — no property segment) ──────────────
|
|
23
|
-
|
|
23
|
+
"color.text.default": "{palette.neutral.50}",
|
|
24
24
|
// Off-ramp hexes (like light's) rather than neutral.400/500/600: the ramp
|
|
25
25
|
// steps are tuned for dark text on white, and reused as light text they land
|
|
26
26
|
// too dim. Set so `subtle` clears AA 4.5:1 on `surface.raised` — the lightest
|
|
27
27
|
// surface, so the worst case — which keeps the muted/subtle/disabled spacing
|
|
28
28
|
// proportional to light's.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
"color.text.muted": "#b8b8be",
|
|
30
|
+
"color.text.subtle": "#8d8d96",
|
|
31
|
+
"color.text.disabled": "#606069",
|
|
32
|
+
"color.text.inverse": "{palette.neutral.950}",
|
|
33
|
+
"color.text.link": "{palette.blue.300}",
|
|
34
|
+
"color.text.accent": "{palette.emerald.400}",
|
|
35
|
+
"color.text.on-accent": "{palette.neutral.950}",
|
|
36
|
+
"color.text.on-accent-subtle": "{palette.emerald.300}",
|
|
37
37
|
// ── color: borders (border-color implied — no property segment) ──────────
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
"color.border.subtle": "{palette.neutral.800}",
|
|
39
|
+
"color.border.default": "{palette.neutral.700}",
|
|
40
|
+
"color.border.strong": "{palette.neutral.600}",
|
|
41
|
+
"color.border.focus": "{palette.blue.400}",
|
|
42
|
+
"color.border.accent": "{palette.emerald.500}",
|
|
43
43
|
// ── color: interactive actions (bg + fg → property required) ────────────
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
"color.action.bg.primary": "{palette.emerald.500}",
|
|
45
|
+
"color.action.bg.primary.hover": "{palette.emerald.400}",
|
|
46
|
+
"color.action.bg.primary.active": "{palette.emerald.300}",
|
|
47
|
+
"color.action.bg.primary.disabled": "{palette.slate.700}",
|
|
48
|
+
"color.action.fg.primary": "{palette.slate.950}",
|
|
49
|
+
"color.action.bg.primary.subtle": "{palette.emerald.950}",
|
|
50
|
+
"color.action.bg.primary.subtle.hover": "{palette.emerald.900}",
|
|
51
|
+
"color.action.bg.primary.subtle.active": "{palette.emerald.800}",
|
|
52
|
+
"color.action.bg.primary.subtle.disabled": "{palette.neutral.900}",
|
|
53
|
+
"color.action.fg.primary.subtle": "{palette.emerald.300}",
|
|
54
54
|
// `secondary`'s resting fill/text — used by Avatar/Chip's `secondary` color
|
|
55
55
|
// and Button/Toast's neutral-emphasis look; sized for real separation
|
|
56
56
|
// against `color.background` (neutral.950).
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
"color.action.bg.secondary": "{palette.neutral.600}",
|
|
58
|
+
"color.action.fg.secondary": "{palette.neutral.50}",
|
|
59
59
|
// Translucent, like light's — and like the status schemes' `/30` fills above.
|
|
60
60
|
// As opaque neutral.800 this was exactly `surface.raised`, so a soft
|
|
61
61
|
// secondary Chip/Button vanished on a raised card (1.00:1), and its opaque
|
|
62
62
|
// neutral.700 hover was indistinguishable from the resting fill there. An
|
|
63
63
|
// overlay lightens whatever it sits on, so the fill separates on all three
|
|
64
64
|
// surfaces (1.49-1.59:1, matching the success/warning chips).
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
"color.action.bg.secondary.subtle": "{palette.neutral.400}/25",
|
|
66
|
+
"color.action.bg.secondary.subtle.hover": "{palette.neutral.400}/35",
|
|
67
|
+
"color.action.bg.secondary.subtle.active": "{palette.neutral.400}/45",
|
|
68
|
+
"color.action.bg.secondary.subtle.disabled": "{palette.neutral.900}",
|
|
69
|
+
"color.action.fg.secondary.subtle": "{palette.neutral.200}",
|
|
70
70
|
// ── color: status (bg + fg + border → property required) ────────────────
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
71
|
+
"color.status.success": "{palette.green.600}",
|
|
72
|
+
"color.status.success.bg": "{palette.green.600}",
|
|
73
|
+
"color.status.success.bg.subtle": "{palette.green.600}/30",
|
|
74
|
+
"color.status.success.border": "{palette.green.700}",
|
|
75
|
+
"color.status.success.border.subtle": "{palette.green.800}",
|
|
76
|
+
"color.status.success.fg": "{palette.white}",
|
|
77
|
+
"color.status.success.fg.subtle": "{palette.green.200}",
|
|
78
|
+
"color.status.warning": "{palette.yellow.600}",
|
|
79
|
+
"color.status.warning.bg": "{palette.yellow.600}",
|
|
80
|
+
"color.status.warning.bg.subtle": "{palette.yellow.600}/30",
|
|
81
|
+
"color.status.warning.border": "{palette.yellow.700}",
|
|
82
|
+
"color.status.warning.border.subtle": "{palette.yellow.800}",
|
|
83
|
+
"color.status.warning.fg": "{palette.white}",
|
|
84
|
+
"color.status.warning.fg.subtle": "{palette.yellow.200}",
|
|
85
|
+
"color.status.danger": "{palette.red.700}",
|
|
86
|
+
"color.status.danger.bg": "{palette.red.700}",
|
|
87
|
+
"color.status.danger.bg.subtle": "{palette.red.700}/30",
|
|
88
|
+
"color.status.danger.border": "{palette.red.800}",
|
|
89
|
+
"color.status.danger.border.subtle": "{palette.red.900}",
|
|
90
|
+
"color.status.danger.fg": "{palette.white}",
|
|
91
|
+
"color.status.danger.fg.subtle": "{palette.red.200}",
|
|
92
|
+
"color.status.info": "{palette.sky.500}",
|
|
93
|
+
"color.status.info.bg": "{palette.sky.500}",
|
|
94
|
+
"color.status.info.bg.subtle": "{palette.sky.950}",
|
|
95
|
+
"color.status.info.border": "{palette.sky.800}",
|
|
96
|
+
"color.status.info.border.subtle": "{palette.sky.900}",
|
|
97
|
+
"color.status.info.fg": "{palette.slate.950}",
|
|
98
|
+
"color.status.info.fg.subtle": "{palette.sky.200}"
|
|
99
99
|
};
|
|
100
100
|
//# sourceMappingURL=dark.js.map
|