react-native-terra-ui 0.5.1 → 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 +25 -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 +6 -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 +1 -1
- 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 +84 -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 +12 -10
- 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 +123 -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 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Children","createContext","forwardRef","useContext","StyleSheet","useUnistyles","getDefaultRadius","Icon","Spinner","Text","jsx","_jsx","jsxs","_jsxs","ButtonContext","color","size","useButtonContext","getColors","variant","theme","c","get","key","bg","border","borderWidth","fg","LABEL_TYPOGRAPHY","sm","weight","md","lg","ButtonLabel","children","typography","style","ICON_SIZE","ButtonIcon","name","sizeProp","colorProp","strokeWidth","renderChildren","map","child","trim","length","ButtonRoot","Button","radius","isDisabled","isLoading","isIconOnly","fullWidth","compact","onPress","rest","ref","_styles","styles","useVariants","iconOnly","blocked","externalStyle","pressableRest","Provider","value","Pressable","
|
|
1
|
+
{"version":3,"names":["Children","createContext","forwardRef","useContext","StyleSheet","useUnistyles","getDefaultRadius","readableOn","resolveThemeColor","Icon","Spinner","Text","jsx","_jsx","jsxs","_jsxs","ButtonContext","color","size","useButtonContext","getColors","variant","theme","c","get","key","bg","border","borderWidth","fg","LABEL_TYPOGRAPHY","sm","weight","md","lg","ButtonLabel","children","typography","style","ICON_SIZE","ButtonIcon","name","sizeProp","colorProp","strokeWidth","renderChildren","map","child","trim","length","ButtonRoot","Button","radius","isDisabled","isLoading","isIconOnly","fullWidth","compact","background","onPress","rest","ref","_styles","styles","useVariants","iconOnly","variantBg","variantFg","resolvedBackground","undefined","blocked","externalStyle","pressableRest","Provider","value","Pressable","disabled","accessibilityRole","accessibilityState","busy","state","base","backgroundColor","borderColor","pressed","opacity","Label","create","flexDirection","alignItems","justifyContent","alignSelf","variants","height","paddingHorizontal","gap","none","borderRadius","xl","full","true","false","aspectRatio","uni__dependencies","paddingVertical"],"sourceRoot":"../../../../src","sources":["components/button/Button.tsx"],"mappings":";;;AAAA,SAASA,QAAQ,EAAqBC,aAAa,EAAEC,UAAU,EAAkBC,UAAU,QAAQ,OAAO;AAI1G,SAASC,UAAU,EAAEC,YAAY,QAAQ,wBAAwB;AAEjE,SAASC,gBAAgB;AAEzB,SAASC,UAAU;AACnB,SAASC,iBAAiB;AAC1B,SAASC,IAAI;AACb,SAASC,OAAO;AAChB,SAASC,IAAI;;AA+Bb;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAOA,MAAMC,aAAa,gBAAGf,aAAa,CAAqB;EACtDgB,KAAK,EAAE,EAAE;EACTC,IAAI,EAAE;AACR,CAAC,CAAC;AAEF,OAAO,MAAMC,gBAAgB,GAAGA,CAAA,KAA0BhB,UAAU,CAACa,aAAa,CAAC;;AAEnF;;AASA,SAASI,SAASA,CAACC,OAAsB,EAAEC,KAAiB,EAAgB;EAC1E,MAAMC,CAAC,GAAGD,KAAK,CAACL,KAAsD;EACtE,MAAMO,GAAG,GAAIC,GAAW,IAAaF,CAAC,CAACE,GAAG,CAAC,IAAI,EAAE;EACjD,QAAQJ,OAAO;IACb,KAAK,SAAS;MACZ,OAAO;QACLK,EAAE,EAAEF,GAAG,CAAC,mBAAmB,CAAC;QAC5BG,MAAM,EAAEH,GAAG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WAAW,EAAE;QAAE,CAAC;QAC9CD,KAAK,EAAE,CAAC;MACV;IACF,CAAC;IAAAE,iBAAA;EACH,CAAC;EACD9C,OAAO,EAAE;IACPqC,iBAAiB,EAAE,CAAC;IACpBU,eAAe,EAAE,CAAC;IAClBX,MAAM,EAAExB;EACV;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { View } from "react-native-unistyles/components/native/View";
|
|
4
4
|
import { Text as RNText } from "react-native-unistyles/components/native/Text";
|
|
5
|
-
import { Children, createContext, forwardRef, useContext } from
|
|
6
|
-
import { StyleSheet, useUnistyles, withUnistyles } from
|
|
5
|
+
import { Children, createContext, forwardRef, useContext } from "react";
|
|
6
|
+
import { StyleSheet, useUnistyles, withUnistyles } from "react-native-unistyles";
|
|
7
7
|
import { resolveThemeColor } from "../../utils/resolve-theme-color.js";
|
|
8
8
|
import { FONT_WEIGHT_VALUE, SYSTEM_FONT } from "../../utils/typography.js";
|
|
9
9
|
import { Icon } from "../icon/index.js";
|
|
@@ -12,8 +12,8 @@ import { getCustomColorColors } from "./utils.js";
|
|
|
12
12
|
// ─── Context (lets Chip.Icon read the resolved foreground + size) ─────────────
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
const ChipContext = /*#__PURE__*/createContext({
|
|
15
|
-
color:
|
|
16
|
-
size:
|
|
15
|
+
color: "text.default",
|
|
16
|
+
size: "md"
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
// ─── Colors ─────────────────────────────────────────────────────────────────
|
|
@@ -32,40 +32,40 @@ const ChipContext = /*#__PURE__*/createContext({
|
|
|
32
32
|
// can't be a compound variant condition — see `getCustomColorColors` in
|
|
33
33
|
// `utils.ts` for how it's derived instead.
|
|
34
34
|
|
|
35
|
-
const SCHEME_NAMES = new Set([
|
|
35
|
+
const SCHEME_NAMES = new Set(["primary", "secondary", "success", "warning", "danger"]);
|
|
36
36
|
// `ghost` is `outline` with its border taken away, so it has no colors of its
|
|
37
37
|
// own — it borrows outline's foreground. Only the *paint* differs, and that
|
|
38
38
|
// comes from the `ghost` style variant, never from here.
|
|
39
39
|
function paintedVariant(variant) {
|
|
40
|
-
return variant ===
|
|
40
|
+
return variant === "ghost" ? "outline" : variant;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/** Foreground token per (scheme, variant) — mirrors the spec's token table. */
|
|
44
44
|
const FG_TOKEN = {
|
|
45
45
|
primary: {
|
|
46
|
-
solid:
|
|
47
|
-
soft:
|
|
48
|
-
outline:
|
|
46
|
+
solid: "action.fg.primary",
|
|
47
|
+
soft: "action.fg.primary.subtle",
|
|
48
|
+
outline: "text.accent"
|
|
49
49
|
},
|
|
50
50
|
secondary: {
|
|
51
|
-
solid:
|
|
52
|
-
soft:
|
|
53
|
-
outline:
|
|
51
|
+
solid: "action.fg.secondary",
|
|
52
|
+
soft: "action.fg.secondary.subtle",
|
|
53
|
+
outline: "text.default"
|
|
54
54
|
},
|
|
55
55
|
success: {
|
|
56
|
-
solid:
|
|
57
|
-
soft:
|
|
58
|
-
outline:
|
|
56
|
+
solid: "status.success.fg",
|
|
57
|
+
soft: "status.success.fg.subtle",
|
|
58
|
+
outline: "status.success.fg.subtle"
|
|
59
59
|
},
|
|
60
60
|
warning: {
|
|
61
|
-
solid:
|
|
62
|
-
soft:
|
|
63
|
-
outline:
|
|
61
|
+
solid: "status.warning.fg",
|
|
62
|
+
soft: "status.warning.fg.subtle",
|
|
63
|
+
outline: "status.warning.fg.subtle"
|
|
64
64
|
},
|
|
65
65
|
danger: {
|
|
66
|
-
solid:
|
|
67
|
-
soft:
|
|
68
|
-
outline:
|
|
66
|
+
solid: "status.danger.fg",
|
|
67
|
+
soft: "status.danger.fg.subtle",
|
|
68
|
+
outline: "status.danger.fg.subtle"
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
|
|
@@ -78,9 +78,9 @@ function resolveForeground(color, variant, customColors) {
|
|
|
78
78
|
// ─── Label sub-component ───────────────────────────────────────────────────────
|
|
79
79
|
|
|
80
80
|
const LABEL_VARIANT = {
|
|
81
|
-
sm:
|
|
82
|
-
md:
|
|
83
|
-
lg:
|
|
81
|
+
sm: "label-sm",
|
|
82
|
+
md: "label-md",
|
|
83
|
+
lg: "label-lg"
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
// Renders through React Native's `Text` rather than the `Text` primitive: a
|
|
@@ -147,12 +147,12 @@ const ChipIcon = ({
|
|
|
147
147
|
};
|
|
148
148
|
function renderChildren(children) {
|
|
149
149
|
return Children.map(children, child => {
|
|
150
|
-
if (typeof child ===
|
|
150
|
+
if (typeof child === "string") {
|
|
151
151
|
return child.trim().length > 0 ? /*#__PURE__*/_jsx(ChipLabel, {
|
|
152
152
|
children: child
|
|
153
153
|
}) : null;
|
|
154
154
|
}
|
|
155
|
-
if (typeof child ===
|
|
155
|
+
if (typeof child === "number") {
|
|
156
156
|
return /*#__PURE__*/_jsx(ChipLabel, {
|
|
157
157
|
children: child
|
|
158
158
|
});
|
|
@@ -164,9 +164,9 @@ function renderChildren(children) {
|
|
|
164
164
|
// ─── Component ────────────────────────────────────────────────────────────────
|
|
165
165
|
|
|
166
166
|
const ChipRoot = /*#__PURE__*/forwardRef(function Chip({
|
|
167
|
-
size =
|
|
168
|
-
variant =
|
|
169
|
-
color =
|
|
167
|
+
size = "md",
|
|
168
|
+
variant = "soft",
|
|
169
|
+
color = "secondary",
|
|
170
170
|
children,
|
|
171
171
|
style,
|
|
172
172
|
...rest
|
|
@@ -184,7 +184,7 @@ const ChipRoot = /*#__PURE__*/forwardRef(function Chip({
|
|
|
184
184
|
// Ghost takes outline's foreground but none of its paint — its transparent
|
|
185
185
|
// background and absent border come from the `ghost` style variant, so
|
|
186
186
|
// applying the derived paint here would hand it outline's border back.
|
|
187
|
-
const customPaint = customColors && variant !==
|
|
187
|
+
const customPaint = customColors && variant !== "ghost" ? {
|
|
188
188
|
backgroundColor: customColors.bg,
|
|
189
189
|
borderColor: customColors.border,
|
|
190
190
|
borderWidth: customColors.borderWidth
|
|
@@ -249,28 +249,28 @@ const styles = StyleSheet.create(theme => {
|
|
|
249
249
|
variants: {
|
|
250
250
|
size: {
|
|
251
251
|
sm: {
|
|
252
|
-
fontSize: theme.typography.variants[
|
|
253
|
-
lineHeight: theme.typography.variants[
|
|
254
|
-
letterSpacing: theme.typography.variants[
|
|
252
|
+
fontSize: theme.typography.variants["label-sm"].fontSize,
|
|
253
|
+
lineHeight: theme.typography.variants["label-sm"].lineHeight,
|
|
254
|
+
letterSpacing: theme.typography.variants["label-sm"].letterSpacing
|
|
255
255
|
},
|
|
256
256
|
md: {
|
|
257
|
-
fontSize: theme.typography.variants[
|
|
258
|
-
lineHeight: theme.typography.variants[
|
|
259
|
-
letterSpacing: theme.typography.variants[
|
|
257
|
+
fontSize: theme.typography.variants["label-md"].fontSize,
|
|
258
|
+
lineHeight: theme.typography.variants["label-md"].lineHeight,
|
|
259
|
+
letterSpacing: theme.typography.variants["label-md"].letterSpacing
|
|
260
260
|
},
|
|
261
261
|
lg: {
|
|
262
|
-
fontSize: theme.typography.variants[
|
|
263
|
-
lineHeight: theme.typography.variants[
|
|
264
|
-
letterSpacing: theme.typography.variants[
|
|
262
|
+
fontSize: theme.typography.variants["label-lg"].fontSize,
|
|
263
|
+
lineHeight: theme.typography.variants["label-lg"].lineHeight,
|
|
264
|
+
letterSpacing: theme.typography.variants["label-lg"].letterSpacing
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
},
|
|
268
268
|
uni__dependencies: [0, 4]
|
|
269
269
|
},
|
|
270
270
|
base: {
|
|
271
|
-
flexDirection:
|
|
272
|
-
alignItems:
|
|
273
|
-
alignSelf:
|
|
271
|
+
flexDirection: "row",
|
|
272
|
+
alignItems: "center",
|
|
273
|
+
alignSelf: "flex-start",
|
|
274
274
|
borderRadius: theme.radius.full,
|
|
275
275
|
variants: {
|
|
276
276
|
size: {
|
|
@@ -305,120 +305,120 @@ const styles = StyleSheet.create(theme => {
|
|
|
305
305
|
soft: {},
|
|
306
306
|
outline: {},
|
|
307
307
|
ghost: {
|
|
308
|
-
backgroundColor:
|
|
309
|
-
borderColor:
|
|
308
|
+
backgroundColor: "transparent",
|
|
309
|
+
borderColor: "transparent",
|
|
310
310
|
borderWidth: 0
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
},
|
|
314
314
|
compoundVariants: [{
|
|
315
|
-
color:
|
|
316
|
-
variant:
|
|
315
|
+
color: "primary",
|
|
316
|
+
variant: "solid",
|
|
317
317
|
styles: {
|
|
318
|
-
backgroundColor: c[
|
|
318
|
+
backgroundColor: c["action.bg.primary"],
|
|
319
319
|
borderWidth: 0
|
|
320
320
|
}
|
|
321
321
|
}, {
|
|
322
|
-
color:
|
|
323
|
-
variant:
|
|
322
|
+
color: "primary",
|
|
323
|
+
variant: "soft",
|
|
324
324
|
styles: {
|
|
325
|
-
backgroundColor: c[
|
|
325
|
+
backgroundColor: c["action.bg.primary.subtle"],
|
|
326
326
|
borderWidth: 0
|
|
327
327
|
}
|
|
328
328
|
}, {
|
|
329
|
-
color:
|
|
330
|
-
variant:
|
|
329
|
+
color: "primary",
|
|
330
|
+
variant: "outline",
|
|
331
331
|
styles: {
|
|
332
|
-
backgroundColor:
|
|
333
|
-
borderColor: c[
|
|
332
|
+
backgroundColor: "transparent",
|
|
333
|
+
borderColor: c["action.bg.primary.subtle"],
|
|
334
334
|
borderWidth: 1
|
|
335
335
|
}
|
|
336
336
|
}, {
|
|
337
|
-
color:
|
|
338
|
-
variant:
|
|
337
|
+
color: "secondary",
|
|
338
|
+
variant: "solid",
|
|
339
339
|
styles: {
|
|
340
|
-
backgroundColor: c[
|
|
340
|
+
backgroundColor: c["action.bg.secondary"],
|
|
341
341
|
borderWidth: 0
|
|
342
342
|
}
|
|
343
343
|
}, {
|
|
344
|
-
color:
|
|
345
|
-
variant:
|
|
344
|
+
color: "secondary",
|
|
345
|
+
variant: "soft",
|
|
346
346
|
styles: {
|
|
347
|
-
backgroundColor: c[
|
|
347
|
+
backgroundColor: c["action.bg.secondary.subtle"],
|
|
348
348
|
borderWidth: 0
|
|
349
349
|
}
|
|
350
350
|
}, {
|
|
351
|
-
color:
|
|
352
|
-
variant:
|
|
351
|
+
color: "secondary",
|
|
352
|
+
variant: "outline",
|
|
353
353
|
styles: {
|
|
354
|
-
backgroundColor:
|
|
355
|
-
borderColor: c[
|
|
354
|
+
backgroundColor: "transparent",
|
|
355
|
+
borderColor: c["action.bg.secondary.subtle"],
|
|
356
356
|
borderWidth: 1
|
|
357
357
|
}
|
|
358
358
|
}, {
|
|
359
|
-
color:
|
|
360
|
-
variant:
|
|
359
|
+
color: "success",
|
|
360
|
+
variant: "solid",
|
|
361
361
|
styles: {
|
|
362
|
-
backgroundColor: c[
|
|
362
|
+
backgroundColor: c["status.success.bg"],
|
|
363
363
|
borderWidth: 0
|
|
364
364
|
}
|
|
365
365
|
}, {
|
|
366
|
-
color:
|
|
367
|
-
variant:
|
|
366
|
+
color: "success",
|
|
367
|
+
variant: "soft",
|
|
368
368
|
styles: {
|
|
369
|
-
backgroundColor: c[
|
|
369
|
+
backgroundColor: c["status.success.bg.subtle"],
|
|
370
370
|
borderWidth: 0
|
|
371
371
|
}
|
|
372
372
|
}, {
|
|
373
|
-
color:
|
|
374
|
-
variant:
|
|
373
|
+
color: "success",
|
|
374
|
+
variant: "outline",
|
|
375
375
|
styles: {
|
|
376
|
-
backgroundColor:
|
|
377
|
-
borderColor: c[
|
|
376
|
+
backgroundColor: "transparent",
|
|
377
|
+
borderColor: c["status.success.bg.subtle"],
|
|
378
378
|
borderWidth: 1
|
|
379
379
|
}
|
|
380
380
|
}, {
|
|
381
|
-
color:
|
|
382
|
-
variant:
|
|
381
|
+
color: "warning",
|
|
382
|
+
variant: "solid",
|
|
383
383
|
styles: {
|
|
384
|
-
backgroundColor: c[
|
|
384
|
+
backgroundColor: c["status.warning.bg"],
|
|
385
385
|
borderWidth: 0
|
|
386
386
|
}
|
|
387
387
|
}, {
|
|
388
|
-
color:
|
|
389
|
-
variant:
|
|
388
|
+
color: "warning",
|
|
389
|
+
variant: "soft",
|
|
390
390
|
styles: {
|
|
391
|
-
backgroundColor: c[
|
|
391
|
+
backgroundColor: c["status.warning.bg.subtle"],
|
|
392
392
|
borderWidth: 0
|
|
393
393
|
}
|
|
394
394
|
}, {
|
|
395
|
-
color:
|
|
396
|
-
variant:
|
|
395
|
+
color: "warning",
|
|
396
|
+
variant: "outline",
|
|
397
397
|
styles: {
|
|
398
|
-
backgroundColor:
|
|
399
|
-
borderColor: c[
|
|
398
|
+
backgroundColor: "transparent",
|
|
399
|
+
borderColor: c["status.warning.bg.subtle"],
|
|
400
400
|
borderWidth: 1
|
|
401
401
|
}
|
|
402
402
|
}, {
|
|
403
|
-
color:
|
|
404
|
-
variant:
|
|
403
|
+
color: "danger",
|
|
404
|
+
variant: "solid",
|
|
405
405
|
styles: {
|
|
406
|
-
backgroundColor: c[
|
|
406
|
+
backgroundColor: c["status.danger.bg"],
|
|
407
407
|
borderWidth: 0
|
|
408
408
|
}
|
|
409
409
|
}, {
|
|
410
|
-
color:
|
|
411
|
-
variant:
|
|
410
|
+
color: "danger",
|
|
411
|
+
variant: "soft",
|
|
412
412
|
styles: {
|
|
413
|
-
backgroundColor: c[
|
|
413
|
+
backgroundColor: c["status.danger.bg.subtle"],
|
|
414
414
|
borderWidth: 0
|
|
415
415
|
}
|
|
416
416
|
}, {
|
|
417
|
-
color:
|
|
418
|
-
variant:
|
|
417
|
+
color: "danger",
|
|
418
|
+
variant: "outline",
|
|
419
419
|
styles: {
|
|
420
|
-
backgroundColor:
|
|
421
|
-
borderColor: c[
|
|
420
|
+
backgroundColor: "transparent",
|
|
421
|
+
borderColor: c["status.danger.bg.subtle"],
|
|
422
422
|
borderWidth: 1
|
|
423
423
|
}
|
|
424
424
|
}],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Children","createContext","forwardRef","useContext","StyleSheet","useUnistyles","withUnistyles","resolveThemeColor","FONT_WEIGHT_VALUE","SYSTEM_FONT","Icon","getCustomColorColors","jsx","_jsx","ChipContext","color","size","SCHEME_NAMES","Set","paintedVariant","variant","FG_TOKEN","primary","solid","soft","outline","secondary","success","warning","danger","resolveForeground","customColors","fg","LABEL_VARIANT","sm","md","lg","ChipLabel","children","theme","_styles","styles","useVariants","RNText","style","label","maxFontSizeMultiplier","typography","variants","ICON_SIZE","ChipIcon","name","sizeProp","strokeWidth","rest","contextColor","marginVertical","renderChildren","map","child","trim","length","ChipRoot","Chip","ref","_styles2","isCustomColor","has","customPaint","backgroundColor","bg","borderColor","border","borderWidth","Provider","value","View","base","create","c","labelFont","fonts","semibold","isSystemLabelFont","paddingHorizontal","fontFamily","undefined","fontWeight","fontSize","lineHeight","letterSpacing","uni__dependencies","flexDirection","alignItems","alignSelf","borderRadius","radius","full","minHeight","paddingVertical","gap","ghost","compoundVariants"],"sourceRoot":"../../../../src","sources":["components/chip/Chip.tsx"],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"names":["Children","createContext","forwardRef","useContext","StyleSheet","useUnistyles","withUnistyles","resolveThemeColor","FONT_WEIGHT_VALUE","SYSTEM_FONT","Icon","getCustomColorColors","jsx","_jsx","ChipContext","color","size","SCHEME_NAMES","Set","paintedVariant","variant","FG_TOKEN","primary","solid","soft","outline","secondary","success","warning","danger","resolveForeground","customColors","fg","LABEL_VARIANT","sm","md","lg","ChipLabel","children","theme","_styles","styles","useVariants","RNText","style","label","maxFontSizeMultiplier","typography","variants","ICON_SIZE","ChipIcon","name","sizeProp","strokeWidth","rest","contextColor","marginVertical","renderChildren","map","child","trim","length","ChipRoot","Chip","ref","_styles2","isCustomColor","has","customPaint","backgroundColor","bg","borderColor","border","borderWidth","Provider","value","View","base","create","c","labelFont","fonts","semibold","isSystemLabelFont","paddingHorizontal","fontFamily","undefined","fontWeight","fontSize","lineHeight","letterSpacing","uni__dependencies","flexDirection","alignItems","alignSelf","borderRadius","radius","full","minHeight","paddingVertical","gap","ghost","compoundVariants"],"sourceRoot":"../../../../src","sources":["components/chip/Chip.tsx"],"mappings":";;;;AAAA,SAASA,QAAQ,EAAqBC,aAAa,EAAEC,UAAU,EAAkBC,UAAU,QAAQ,OAAO;AAG1G,SAASC,UAAU,EAAEC,YAAY,EAAEC,aAAa,QAAQ,wBAAwB;AAGhF,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB,EAAEC,WAAW;AACvC,SAASC,IAAI;AAEb,SAAgCC,oBAAoB;;AASpD;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAaA,MAAMC,WAAW,gBAAGb,aAAa,CAAmB;EAClDc,KAAK,EAAE,cAAc;EACrBC,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,YAAY,GAAG,IAAIC,GAAG,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAKtF;AACA;AACA;AACA,SAASC,cAAcA,CAACC,OAAoB,EAAsB;EAChE,OAAOA,OAAO,KAAK,OAAO,GAAG,SAAS,GAAGA,OAAO;AAClD;;AAEA;AACA,MAAMC,QAAoE,GAAG;EAC3EC,OAAO,EAAE;IACPC,KAAK,EAAE,mBAAmB;IAC1BC,IAAI,EAAE,0BAA0B;IAChCC,OAAO,EAAE;EACX,CAAC;EACDC,SAAS,EAAE;IACTH,KAAK,EAAE,qBAAqB;IAC5BC,IAAI,EAAE,4BAA4B;IAClCC,OAAO,EAAE;EACX,CAAC;EACDE,OAAO,EAAE;IACPJ,KAAK,EAAE,mBAAmB;IAC1BC,IAAI,EAAE,0BAA0B;IAChCC,OAAO,EAAE;EACX,CAAC;EACDG,OAAO,EAAE;IACPL,KAAK,EAAE,mBAAmB;IAC1BC,IAAI,EAAE,0BAA0B;IAChCC,OAAO,EAAE;EACX,CAAC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BAAA;IACH;EACF,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
|
|
@@ -11,15 +11,15 @@ const CUSTOM_COLOR_SOFT_ALPHA = 0.16;
|
|
|
11
11
|
export function getCustomColorColors(literal, variant) {
|
|
12
12
|
// Outline borrows the `soft` background as its border, so the two variants
|
|
13
13
|
// read as the same weight of colour — one filled, one drawn.
|
|
14
|
-
if (variant ===
|
|
14
|
+
if (variant === "outline") {
|
|
15
15
|
return {
|
|
16
|
-
bg:
|
|
16
|
+
bg: "transparent",
|
|
17
17
|
border: withAlpha(literal, CUSTOM_COLOR_SOFT_ALPHA),
|
|
18
18
|
borderWidth: 1,
|
|
19
19
|
fg: literal
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
if (variant ===
|
|
22
|
+
if (variant === "soft") {
|
|
23
23
|
const bg = withAlpha(literal, CUSTOM_COLOR_SOFT_ALPHA);
|
|
24
24
|
return {
|
|
25
25
|
bg,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { View } from "react-native-unistyles/components/native/View";
|
|
4
|
-
import { forwardRef } from
|
|
5
|
-
import { StyleSheet } from
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
6
6
|
import { Icon } from "../icon/index.js";
|
|
7
7
|
import { Text } from "../text/index.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -14,16 +14,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
|
|
15
15
|
const TYPOGRAPHY = {
|
|
16
16
|
sm: {
|
|
17
|
-
title:
|
|
18
|
-
description:
|
|
17
|
+
title: "title-sm",
|
|
18
|
+
description: "body-sm"
|
|
19
19
|
},
|
|
20
20
|
md: {
|
|
21
|
-
title:
|
|
22
|
-
description:
|
|
21
|
+
title: "title-md",
|
|
22
|
+
description: "body-md"
|
|
23
23
|
},
|
|
24
24
|
lg: {
|
|
25
|
-
title:
|
|
26
|
-
description:
|
|
25
|
+
title: "title-lg",
|
|
26
|
+
description: "body-lg"
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
const ICON_SIZE = {
|
|
@@ -35,7 +35,7 @@ const ICON_SIZE = {
|
|
|
35
35
|
/** Wraps a bare string/number in the slot's themed `Text`; elements pass through. */
|
|
36
36
|
function renderSlot(node, wrap) {
|
|
37
37
|
if (node === null || node === undefined || node === false) return null;
|
|
38
|
-
return typeof node ===
|
|
38
|
+
return typeof node === "string" || typeof node === "number" ? wrap(node) : node;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
@@ -54,12 +54,12 @@ function renderSlot(node, wrap) {
|
|
|
54
54
|
*/
|
|
55
55
|
export const EmptyState = /*#__PURE__*/forwardRef(function EmptyState({
|
|
56
56
|
icon,
|
|
57
|
-
iconColor =
|
|
57
|
+
iconColor = "text.default",
|
|
58
58
|
media,
|
|
59
59
|
title,
|
|
60
60
|
description,
|
|
61
61
|
action,
|
|
62
|
-
size =
|
|
62
|
+
size = "md",
|
|
63
63
|
fill = false,
|
|
64
64
|
style,
|
|
65
65
|
...rest
|
|
@@ -112,8 +112,8 @@ export const EmptyState = /*#__PURE__*/forwardRef(function EmptyState({
|
|
|
112
112
|
// width/height, which keeps it a perfect circle on the spacing scale.
|
|
113
113
|
const styles = StyleSheet.create(theme => ({
|
|
114
114
|
root: {
|
|
115
|
-
alignItems:
|
|
116
|
-
justifyContent:
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
justifyContent: "center",
|
|
117
117
|
variants: {
|
|
118
118
|
// `alignSelf` matters as much as `flex` here: a column parent hands its
|
|
119
119
|
// children the cross-axis size of their content unless they stretch, so
|
|
@@ -122,82 +122,82 @@ const styles = StyleSheet.create(theme => ({
|
|
|
122
122
|
fill: {
|
|
123
123
|
true: {
|
|
124
124
|
flex: 1,
|
|
125
|
-
alignSelf:
|
|
125
|
+
alignSelf: "stretch"
|
|
126
126
|
},
|
|
127
127
|
false: {}
|
|
128
128
|
},
|
|
129
129
|
size: {
|
|
130
130
|
sm: {
|
|
131
|
-
gap: theme.spacing[
|
|
132
|
-
paddingVertical: theme.spacing[
|
|
133
|
-
paddingHorizontal: theme.spacing[
|
|
131
|
+
gap: theme.spacing["2"],
|
|
132
|
+
paddingVertical: theme.spacing["4"],
|
|
133
|
+
paddingHorizontal: theme.spacing["4"]
|
|
134
134
|
},
|
|
135
135
|
md: {
|
|
136
|
-
gap: theme.spacing[
|
|
137
|
-
paddingVertical: theme.spacing[
|
|
138
|
-
paddingHorizontal: theme.spacing[
|
|
136
|
+
gap: theme.spacing["3"],
|
|
137
|
+
paddingVertical: theme.spacing["6"],
|
|
138
|
+
paddingHorizontal: theme.spacing["6"]
|
|
139
139
|
},
|
|
140
140
|
lg: {
|
|
141
|
-
gap: theme.spacing[
|
|
142
|
-
paddingVertical: theme.spacing[
|
|
143
|
-
paddingHorizontal: theme.spacing[
|
|
141
|
+
gap: theme.spacing["4"],
|
|
142
|
+
paddingVertical: theme.spacing["8"],
|
|
143
|
+
paddingHorizontal: theme.spacing["6"]
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
147
|
uni__dependencies: [0, 4]
|
|
148
148
|
},
|
|
149
149
|
iconBadge: {
|
|
150
|
-
alignItems:
|
|
151
|
-
justifyContent:
|
|
152
|
-
backgroundColor: theme.color[
|
|
150
|
+
alignItems: "center",
|
|
151
|
+
justifyContent: "center",
|
|
152
|
+
backgroundColor: theme.color["action.bg.primary.subtle"],
|
|
153
153
|
borderRadius: theme.radius.full,
|
|
154
154
|
variants: {
|
|
155
155
|
size: {
|
|
156
156
|
sm: {
|
|
157
|
-
padding: theme.spacing[
|
|
157
|
+
padding: theme.spacing["3"]
|
|
158
158
|
},
|
|
159
159
|
md: {
|
|
160
|
-
padding: theme.spacing[
|
|
160
|
+
padding: theme.spacing["4"]
|
|
161
161
|
},
|
|
162
162
|
lg: {
|
|
163
|
-
padding: theme.spacing[
|
|
163
|
+
padding: theme.spacing["5"]
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
uni__dependencies: [0, 4]
|
|
168
168
|
},
|
|
169
169
|
text: {
|
|
170
|
-
alignItems:
|
|
170
|
+
alignItems: "center",
|
|
171
171
|
variants: {
|
|
172
172
|
size: {
|
|
173
173
|
sm: {
|
|
174
|
-
gap: theme.spacing[
|
|
174
|
+
gap: theme.spacing["1"]
|
|
175
175
|
},
|
|
176
176
|
md: {
|
|
177
|
-
gap: theme.spacing[
|
|
177
|
+
gap: theme.spacing["1"]
|
|
178
178
|
},
|
|
179
179
|
lg: {
|
|
180
|
-
gap: theme.spacing[
|
|
180
|
+
gap: theme.spacing["2"]
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
},
|
|
184
184
|
uni__dependencies: [0, 4]
|
|
185
185
|
},
|
|
186
186
|
actions: {
|
|
187
|
-
alignItems:
|
|
187
|
+
alignItems: "center",
|
|
188
188
|
variants: {
|
|
189
189
|
size: {
|
|
190
190
|
sm: {
|
|
191
|
-
gap: theme.spacing[
|
|
192
|
-
marginTop: theme.spacing[
|
|
191
|
+
gap: theme.spacing["2"],
|
|
192
|
+
marginTop: theme.spacing["1"]
|
|
193
193
|
},
|
|
194
194
|
md: {
|
|
195
|
-
gap: theme.spacing[
|
|
196
|
-
marginTop: theme.spacing[
|
|
195
|
+
gap: theme.spacing["3"],
|
|
196
|
+
marginTop: theme.spacing["2"]
|
|
197
197
|
},
|
|
198
198
|
lg: {
|
|
199
|
-
gap: theme.spacing[
|
|
200
|
-
marginTop: theme.spacing[
|
|
199
|
+
gap: theme.spacing["3"],
|
|
200
|
+
marginTop: theme.spacing["2"]
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
},
|