@ankhorage/surface 7.0.0 → 9.0.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 +12 -0
- package/README.md +1 -1
- package/dist/{surfaceColor.d.ts → constants/surfaceColor.d.ts} +0 -4
- package/dist/constants/surfaceColor.d.ts.map +1 -0
- package/dist/constants/surfaceColor.js.map +1 -0
- package/dist/features/app-bar/adapters/inbound/AppBar.d.ts.map +1 -1
- package/dist/features/app-bar/adapters/inbound/AppBar.js +1 -1
- package/dist/features/app-bar/adapters/inbound/AppBar.js.map +1 -1
- package/dist/features/badge/adapters/inbound/Badge.d.ts.map +1 -1
- package/dist/features/badge/adapters/inbound/Badge.js +1 -1
- package/dist/features/badge/adapters/inbound/Badge.js.map +1 -1
- package/dist/features/button/adapters/inbound/Button.d.ts.map +1 -1
- package/dist/features/button/adapters/inbound/Button.js +6 -6
- package/dist/features/button/adapters/inbound/Button.js.map +1 -1
- package/dist/features/button/adapters/inbound/IconButton.d.ts.map +1 -1
- package/dist/features/button/adapters/inbound/IconButton.js +4 -4
- package/dist/features/button/adapters/inbound/IconButton.js.map +1 -1
- package/dist/features/card/adapters/inbound/Card.d.ts.map +1 -1
- package/dist/features/card/adapters/inbound/Card.js +4 -4
- package/dist/features/card/adapters/inbound/Card.js.map +1 -1
- package/dist/features/font/adapters/inbound/FontProvider.d.ts +4 -0
- package/dist/features/font/adapters/inbound/FontProvider.d.ts.map +1 -0
- package/dist/features/font/adapters/inbound/FontProvider.js +16 -0
- package/dist/features/font/adapters/inbound/FontProvider.js.map +1 -0
- package/dist/features/font/adapters/inbound/FontRuntimeContext.d.ts +4 -0
- package/dist/features/font/adapters/inbound/FontRuntimeContext.d.ts.map +1 -0
- package/dist/features/font/adapters/inbound/FontRuntimeContext.js +9 -0
- package/dist/features/font/adapters/inbound/FontRuntimeContext.js.map +1 -0
- package/dist/features/font/adapters/inbound/useFontRuntime.d.ts +4 -0
- package/dist/features/font/adapters/inbound/useFontRuntime.d.ts.map +1 -0
- package/dist/features/font/adapters/inbound/useFontRuntime.js +7 -0
- package/dist/features/font/adapters/inbound/useFontRuntime.js.map +1 -0
- package/dist/features/font/public.d.ts +3 -0
- package/dist/features/font/public.d.ts.map +1 -0
- package/dist/features/font/public.js +2 -0
- package/dist/features/font/public.js.map +1 -0
- package/dist/features/form/checkbox/adapters/inbound/Checkbox.d.ts.map +1 -1
- package/dist/features/form/checkbox/adapters/inbound/Checkbox.js +4 -4
- package/dist/features/form/checkbox/adapters/inbound/Checkbox.js.map +1 -1
- package/dist/features/form/radio/adapters/inbound/Radio.d.ts.map +1 -1
- package/dist/features/form/radio/adapters/inbound/Radio.js +4 -4
- package/dist/features/form/radio/adapters/inbound/Radio.js.map +1 -1
- package/dist/features/form/switch/adapters/inbound/Switch.d.ts.map +1 -1
- package/dist/features/form/switch/adapters/inbound/Switch.js +4 -4
- package/dist/features/form/switch/adapters/inbound/Switch.js.map +1 -1
- package/dist/features/form/text-input/adapters/inbound/TextInput.d.ts.map +1 -1
- package/dist/features/form/text-input/adapters/inbound/TextInput.js +1 -1
- package/dist/features/form/text-input/adapters/inbound/TextInput.js.map +1 -1
- package/dist/features/form/text-input/utils/resolveTextInputPresentation.d.ts +1 -1
- package/dist/features/form/text-input/utils/resolveTextInputPresentation.d.ts.map +1 -1
- package/dist/features/form/text-input/utils/resolveTextInputPresentation.js.map +1 -1
- package/dist/features/icon/adapters/inbound/Icon.d.ts.map +1 -1
- package/dist/features/icon/adapters/inbound/Icon.js +2 -2
- package/dist/features/icon/adapters/inbound/Icon.js.map +1 -1
- package/dist/features/image/adapters/inbound/Image.d.ts.map +1 -1
- package/dist/features/image/adapters/inbound/Image.js +1 -1
- package/dist/features/image/adapters/inbound/Image.js.map +1 -1
- package/dist/features/image/utils/resolveImageStyle.d.ts +1 -1
- package/dist/features/image/utils/resolveImageStyle.d.ts.map +1 -1
- package/dist/features/image/utils/resolveImageStyle.js +1 -1
- package/dist/features/image/utils/resolveImageStyle.js.map +1 -1
- package/dist/features/layout/adapters/inbound/Grid.d.ts.map +1 -1
- package/dist/features/layout/adapters/inbound/Grid.js +1 -1
- package/dist/features/layout/adapters/inbound/Grid.js.map +1 -1
- package/dist/features/layout/adapters/inbound/ScrollView.d.ts.map +1 -1
- package/dist/features/layout/adapters/inbound/ScrollView.js +1 -1
- package/dist/features/layout/adapters/inbound/ScrollView.js.map +1 -1
- package/dist/features/layout/adapters/inbound/View.d.ts.map +1 -1
- package/dist/features/layout/adapters/inbound/View.js +1 -1
- package/dist/features/layout/adapters/inbound/View.js.map +1 -1
- package/dist/features/list/adapters/inbound/ListItem.d.ts.map +1 -1
- package/dist/features/list/adapters/inbound/ListItem.js +4 -4
- package/dist/features/list/adapters/inbound/ListItem.js.map +1 -1
- package/dist/features/modal/adapters/inbound/Modal.d.ts.map +1 -1
- package/dist/features/modal/adapters/inbound/Modal.js +1 -1
- package/dist/features/modal/adapters/inbound/Modal.js.map +1 -1
- package/dist/features/popover-menu/adapters/inbound/PopoverMenu.d.ts.map +1 -1
- package/dist/features/popover-menu/adapters/inbound/PopoverMenu.js +1 -1
- package/dist/features/popover-menu/adapters/inbound/PopoverMenu.js.map +1 -1
- package/dist/features/pressable/adapters/inbound/Pressable.d.ts +5 -0
- package/dist/features/pressable/adapters/inbound/Pressable.d.ts.map +1 -0
- package/dist/features/pressable/adapters/inbound/Pressable.js +48 -0
- package/dist/features/pressable/adapters/inbound/Pressable.js.map +1 -0
- package/dist/features/pressable/public.d.ts +3 -0
- package/dist/features/pressable/public.d.ts.map +1 -0
- package/dist/features/pressable/public.js +2 -0
- package/dist/features/pressable/public.js.map +1 -0
- package/dist/features/surface/adapters/inbound/Surface.d.ts.map +1 -1
- package/dist/features/surface/adapters/inbound/Surface.js +1 -1
- package/dist/features/surface/adapters/inbound/Surface.js.map +1 -1
- package/dist/features/tabs/adapters/inbound/Tab.d.ts.map +1 -1
- package/dist/features/tabs/adapters/inbound/Tab.js +1 -1
- package/dist/features/tabs/adapters/inbound/Tab.js.map +1 -1
- package/dist/features/theme/adapters/inbound/ThemeProvider.d.ts +4 -0
- package/dist/features/theme/adapters/inbound/ThemeProvider.d.ts.map +1 -0
- package/dist/features/theme/adapters/inbound/ThemeProvider.js +27 -0
- package/dist/features/theme/adapters/inbound/ThemeProvider.js.map +1 -0
- package/dist/features/theme/adapters/inbound/ThemeRuntimeContext.d.ts +4 -0
- package/dist/features/theme/adapters/inbound/ThemeRuntimeContext.d.ts.map +1 -0
- package/dist/features/theme/adapters/inbound/ThemeRuntimeContext.js +11 -0
- package/dist/features/theme/adapters/inbound/ThemeRuntimeContext.js.map +1 -0
- package/dist/features/theme/adapters/inbound/ThemeScope.d.ts +4 -0
- package/dist/features/theme/adapters/inbound/ThemeScope.d.ts.map +1 -0
- package/dist/features/theme/adapters/inbound/ThemeScope.js +17 -0
- package/dist/features/theme/adapters/inbound/ThemeScope.js.map +1 -0
- package/dist/features/theme/adapters/inbound/useTheme.d.ts +4 -0
- package/dist/features/theme/adapters/inbound/useTheme.d.ts.map +1 -0
- package/dist/features/theme/adapters/inbound/useTheme.js +7 -0
- package/dist/features/theme/adapters/inbound/useTheme.js.map +1 -0
- package/dist/features/theme/application/use-cases/createTheme.d.ts +5 -0
- package/dist/features/theme/application/use-cases/createTheme.d.ts.map +1 -0
- package/dist/features/theme/application/use-cases/createTheme.js +56 -0
- package/dist/features/theme/application/use-cases/createTheme.js.map +1 -0
- package/dist/features/theme/constants.d.ts +10 -0
- package/dist/features/theme/constants.d.ts.map +1 -0
- package/dist/{theme/defaultTokens.js → features/theme/constants.js} +9 -2
- package/dist/features/theme/constants.js.map +1 -0
- package/dist/{theme → features/theme/domain}/createSurfaceColorDiagnosticCollector.d.ts +1 -1
- package/dist/features/theme/domain/createSurfaceColorDiagnosticCollector.d.ts.map +1 -0
- package/dist/features/theme/domain/createSurfaceColorDiagnosticCollector.js.map +1 -0
- package/dist/{theme → features/theme/domain}/createSurfaceSemanticPolicy.d.ts +1 -1
- package/dist/features/theme/domain/createSurfaceSemanticPolicy.d.ts.map +1 -0
- package/dist/{theme → features/theme/domain}/createSurfaceSemanticPolicy.js +1 -1
- package/dist/features/theme/domain/createSurfaceSemanticPolicy.js.map +1 -0
- package/dist/features/theme/domain/generatePalette.d.ts +10 -0
- package/dist/features/theme/domain/generatePalette.d.ts.map +1 -0
- package/dist/{theme/colorEngine.js → features/theme/domain/generatePalette.js} +2 -10
- package/dist/features/theme/domain/generatePalette.js.map +1 -0
- package/dist/{theme → features/theme/domain}/resolveRoleSemantics.d.ts +1 -1
- package/dist/features/theme/domain/resolveRoleSemantics.d.ts.map +1 -0
- package/dist/{theme → features/theme/domain}/resolveRoleSemantics.js +1 -1
- package/dist/features/theme/domain/resolveRoleSemantics.js.map +1 -0
- package/dist/features/theme/domain/resolveSemanticColors.d.ts +4 -0
- package/dist/features/theme/domain/resolveSemanticColors.d.ts.map +1 -0
- package/dist/features/theme/domain/resolveSemanticColors.js +10 -0
- package/dist/features/theme/domain/resolveSemanticColors.js.map +1 -0
- package/dist/{theme → features/theme/domain}/resolveSurfaceSemanticModel.d.ts +1 -1
- package/dist/features/theme/domain/resolveSurfaceSemanticModel.d.ts.map +1 -0
- package/dist/features/theme/domain/resolveSurfaceSemanticModel.js.map +1 -0
- package/dist/features/theme/public.d.ts +3 -0
- package/dist/features/theme/public.d.ts.map +1 -0
- package/dist/features/theme/public.js +2 -0
- package/dist/features/theme/public.js.map +1 -0
- package/dist/features/theme/runtime.d.ts +5 -0
- package/dist/features/theme/runtime.d.ts.map +1 -0
- package/dist/features/theme/runtime.js +4 -0
- package/dist/features/theme/runtime.js.map +1 -0
- package/dist/{theme → features/theme/utils}/resolveGlobalTokens.d.ts +1 -1
- package/dist/features/theme/utils/resolveGlobalTokens.d.ts.map +1 -0
- package/dist/{theme → features/theme/utils}/resolveGlobalTokens.js +1 -1
- package/dist/features/theme/utils/resolveGlobalTokens.js.map +1 -0
- package/dist/{theme → features/theme/utils}/resolveHeadingTokenOverrides.d.ts +1 -1
- package/dist/features/theme/utils/resolveHeadingTokenOverrides.d.ts.map +1 -0
- package/dist/features/theme/utils/resolveHeadingTokenOverrides.js.map +1 -0
- package/dist/features/theme/utils/resolveNumericTokenOverrides.d.ts.map +1 -0
- package/dist/features/theme/utils/resolveNumericTokenOverrides.js.map +1 -0
- package/dist/{theme → features/theme/utils}/resolveToken.d.ts +2 -8
- package/dist/features/theme/utils/resolveToken.d.ts.map +1 -0
- package/dist/features/theme/utils/resolveToken.js +10 -0
- package/dist/features/theme/utils/resolveToken.js.map +1 -0
- package/dist/{theme → features/theme/utils}/resolveWeightTokenOverrides.d.ts +1 -1
- package/dist/features/theme/utils/resolveWeightTokenOverrides.d.ts.map +1 -0
- package/dist/{theme → features/theme/utils}/resolveWeightTokenOverrides.js +3 -5
- package/dist/features/theme/utils/resolveWeightTokenOverrides.js.map +1 -0
- package/dist/features/toast/adapters/inbound/Toast.d.ts.map +1 -1
- package/dist/features/toast/adapters/inbound/Toast.js +1 -1
- package/dist/features/toast/adapters/inbound/Toast.js.map +1 -1
- package/dist/features/tooltip/adapters/inbound/Tooltip.d.ts.map +1 -1
- package/dist/features/tooltip/adapters/inbound/Tooltip.js +1 -1
- package/dist/features/tooltip/adapters/inbound/Tooltip.js.map +1 -1
- package/dist/features/typography/adapters/inbound/Heading.d.ts +2 -2
- package/dist/features/typography/adapters/inbound/Heading.d.ts.map +1 -1
- package/dist/features/typography/adapters/inbound/Heading.js +4 -20
- package/dist/features/typography/adapters/inbound/Heading.js.map +1 -1
- package/dist/features/typography/adapters/inbound/Text.d.ts +1 -1
- package/dist/features/typography/adapters/inbound/Text.d.ts.map +1 -1
- package/dist/features/typography/adapters/inbound/Text.js +3 -20
- package/dist/features/typography/adapters/inbound/Text.js.map +1 -1
- package/dist/features/typography/utils/resolveHeadingTextStyle.d.ts +2 -2
- package/dist/features/typography/utils/resolveHeadingTextStyle.d.ts.map +1 -1
- package/dist/features/typography/utils/resolveHeadingTextStyle.js.map +1 -1
- package/dist/index.d.ts +11 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/dist/internal/resolvers/resolveControlSize.d.ts +1 -1
- package/dist/internal/resolvers/resolveControlSize.js.map +1 -1
- package/dist/internal/resolvers/resolveFieldPresentation.d.ts +1 -1
- package/dist/internal/resolvers/resolveFieldPresentation.d.ts.map +1 -1
- package/dist/internal/resolvers/resolveFieldPresentation.js.map +1 -1
- package/dist/internal/resolvers/resolveIconSize.d.ts +1 -1
- package/dist/internal/resolvers/resolveIconSize.js.map +1 -1
- package/dist/internal/resolvers/resolveInteractiveColors.d.ts +2 -2
- package/dist/internal/resolvers/resolveInteractiveColors.d.ts.map +1 -1
- package/dist/internal/resolvers/resolveInteractiveColors.js.map +1 -1
- package/dist/internal/resolvers/resolveSelectionControlColors.d.ts +2 -2
- package/dist/internal/resolvers/resolveSelectionControlColors.d.ts.map +1 -1
- package/dist/internal/resolvers/resolveSelectionControlColors.js.map +1 -1
- package/dist/internal/resolvers/resolveSurfaceColor.d.ts +2 -2
- package/dist/internal/resolvers/resolveSurfaceColor.d.ts.map +1 -1
- package/dist/internal/resolvers/resolveSurfaceColor.js.map +1 -1
- package/dist/internal/resolvers/resolveTextColor.d.ts +2 -2
- package/dist/internal/resolvers/resolveTextColor.d.ts.map +1 -1
- package/dist/internal/resolvers/resolveTextColor.js.map +1 -1
- package/dist/internal/resolvers/resolveTextStyles.d.ts +1 -1
- package/dist/internal/resolvers/resolveTextStyles.js.map +1 -1
- package/dist/types/accordion.d.ts +1 -1
- package/dist/types/accordion.d.ts.map +1 -1
- package/dist/types/accordion.js.map +1 -1
- package/dist/types/badge.d.ts +1 -1
- package/dist/types/badge.d.ts.map +1 -1
- package/dist/types/badge.js.map +1 -1
- package/dist/types/button.d.ts +4 -4
- package/dist/types/button.d.ts.map +1 -1
- package/dist/types/button.js.map +1 -1
- package/dist/types/checkbox.d.ts +3 -3
- package/dist/types/checkbox.d.ts.map +1 -1
- package/dist/types/checkbox.js.map +1 -1
- package/dist/types/font.d.ts +13 -0
- package/dist/types/font.d.ts.map +1 -0
- package/dist/types/font.js +2 -0
- package/dist/types/font.js.map +1 -0
- package/dist/types/icon.d.ts +1 -1
- package/dist/types/icon.d.ts.map +1 -1
- package/dist/types/icon.js.map +1 -1
- package/dist/types/image.d.ts +1 -1
- package/dist/types/image.d.ts.map +1 -1
- package/dist/types/image.js.map +1 -1
- package/dist/types/interactionPolicy.d.ts.map +1 -0
- package/dist/types/interactionPolicy.js.map +1 -0
- package/dist/types/layout.d.ts +1 -1
- package/dist/types/layout.d.ts.map +1 -1
- package/dist/types/layout.js.map +1 -1
- package/dist/types/list.d.ts +1 -1
- package/dist/types/list.d.ts.map +1 -1
- package/dist/types/list.js.map +1 -1
- package/dist/types/modal.d.ts +1 -1
- package/dist/types/modal.d.ts.map +1 -1
- package/dist/types/modal.js.map +1 -1
- package/dist/types/popover.d.ts +1 -1
- package/dist/types/popover.d.ts.map +1 -1
- package/dist/types/popover.js.map +1 -1
- package/dist/types/popoverMenu.d.ts +1 -1
- package/dist/types/popoverMenu.d.ts.map +1 -1
- package/dist/types/popoverMenu.js.map +1 -1
- package/dist/{primitives/button-base/types.d.ts → types/pressable.d.ts} +5 -5
- package/dist/types/pressable.d.ts.map +1 -0
- package/dist/types/pressable.js +2 -0
- package/dist/types/pressable.js.map +1 -0
- package/dist/types/radio.d.ts +3 -3
- package/dist/types/radio.d.ts.map +1 -1
- package/dist/types/radio.js.map +1 -1
- package/dist/types/surfaceColor.d.ts +6 -0
- package/dist/types/surfaceColor.d.ts.map +1 -0
- package/dist/types/surfaceColor.js +2 -0
- package/dist/types/surfaceColor.js.map +1 -0
- package/dist/types/switch.d.ts +3 -3
- package/dist/types/switch.d.ts.map +1 -1
- package/dist/types/switch.js.map +1 -1
- package/dist/types/tabs.d.ts +1 -1
- package/dist/types/tabs.d.ts.map +1 -1
- package/dist/types/tabs.js.map +1 -1
- package/dist/types/text-input.d.ts +1 -1
- package/dist/types/text-input.d.ts.map +1 -1
- package/dist/types/text-input.js.map +1 -1
- package/dist/{theme/types.d.ts → types/theme.d.ts} +19 -3
- package/dist/types/theme.d.ts.map +1 -0
- package/dist/types/theme.js +2 -0
- package/dist/types/theme.js.map +1 -0
- package/dist/types/toast.d.ts +2 -2
- package/dist/types/toast.d.ts.map +1 -1
- package/dist/types/toast.js.map +1 -1
- package/dist/types/tooltip.d.ts +1 -1
- package/dist/types/tooltip.d.ts.map +1 -1
- package/dist/types/tooltip.js.map +1 -1
- package/dist/types/typography.d.ts +1 -1
- package/dist/types/typography.d.ts.map +1 -1
- package/dist/types/typography.js.map +1 -1
- package/dist/utils/resolveSpacing.d.ts +1 -1
- package/dist/utils/resolveSpacing.d.ts.map +1 -1
- package/dist/utils/resolveSpacing.js +1 -1
- package/dist/utils/resolveSpacing.js.map +1 -1
- package/dist/utils/resolveViewStyles.d.ts +1 -1
- package/dist/utils/resolveViewStyles.d.ts.map +1 -1
- package/dist/utils/resolveViewStyles.js +1 -1
- package/dist/utils/resolveViewStyles.js.map +1 -1
- package/package.json +8 -7
- package/src/constants/surfaceColor.test.ts +18 -0
- package/src/{surfaceColor.ts → constants/surfaceColor.ts} +0 -5
- package/src/features/app-bar/adapters/inbound/AppBar.tsx +1 -1
- package/src/features/badge/adapters/inbound/Badge.tsx +1 -1
- package/src/features/button/adapters/inbound/Button.tsx +8 -8
- package/src/features/button/adapters/inbound/IconButton.tsx +4 -4
- package/src/features/card/adapters/inbound/Card.tsx +4 -4
- package/src/features/font/adapters/inbound/FontProvider.tsx +27 -0
- package/src/features/font/adapters/inbound/FontRuntimeContext.tsx +12 -0
- package/src/features/font/adapters/inbound/useFontRuntime.ts +9 -0
- package/src/features/font/public.ts +2 -0
- package/src/features/form/checkbox/adapters/inbound/Checkbox.tsx +7 -7
- package/src/features/form/radio/adapters/inbound/Radio.tsx +7 -7
- package/src/features/form/switch/adapters/inbound/Switch.tsx +4 -4
- package/src/features/form/text-input/adapters/inbound/TextInput.tsx +1 -1
- package/src/features/form/text-input/utils/resolveTextInputPresentation.ts +1 -1
- package/src/features/icon/adapters/inbound/Icon.tsx +2 -2
- package/src/features/image/adapters/inbound/Image.tsx +1 -1
- package/src/features/image/utils/resolveImageProps.test.ts +1 -1
- package/src/features/image/utils/resolveImageStyle.ts +2 -2
- package/src/features/layout/adapters/inbound/Grid.tsx +1 -1
- package/src/features/layout/adapters/inbound/ScrollView.tsx +1 -1
- package/src/features/layout/adapters/inbound/View.tsx +1 -1
- package/src/features/list/adapters/inbound/ListItem.tsx +5 -5
- package/src/features/modal/adapters/inbound/Modal.tsx +1 -1
- package/src/features/popover-menu/adapters/inbound/PopoverMenu.tsx +1 -1
- package/src/{primitives/button-base/ButtonBase.tsx → features/pressable/adapters/inbound/Pressable.tsx} +45 -31
- package/src/features/pressable/public.ts +2 -0
- package/src/features/surface/adapters/inbound/Surface.tsx +1 -1
- package/src/features/tabs/adapters/inbound/Tab.tsx +1 -1
- package/src/features/theme/adapters/inbound/ThemeProvider.tsx +46 -0
- package/src/features/theme/adapters/inbound/ThemeRuntimeContext.tsx +14 -0
- package/src/features/theme/adapters/inbound/ThemeScope.test.tsx +52 -0
- package/src/features/theme/adapters/inbound/ThemeScope.tsx +29 -0
- package/src/features/theme/adapters/inbound/useTheme.ts +9 -0
- package/src/features/theme/application/use-cases/createTheme.ts +71 -0
- package/src/{theme → features/theme/application/use-cases}/createThemeOverrides.test.ts +8 -9
- package/src/{theme → features/theme/application/use-cases}/createThemeValidation.test.ts +4 -2
- package/src/features/theme/constants.ts +68 -0
- package/src/{theme → features/theme/domain}/createSurfaceColorDiagnosticCollector.ts +4 -1
- package/src/{theme → features/theme/domain}/createSurfaceSemanticPolicy.ts +2 -2
- package/src/features/theme/domain/generatePalette.test.ts +294 -0
- package/src/{theme/colorEngine.ts → features/theme/domain/generatePalette.ts} +3 -30
- package/src/{theme → features/theme/domain}/inverseSemantics.test.ts +1 -1
- package/src/{theme → features/theme/domain}/resolveRoleSemantics.ts +2 -2
- package/src/features/theme/domain/resolveSemanticColors.ts +23 -0
- package/src/{theme → features/theme/domain}/resolveSurfaceSemanticModel.ts +4 -4
- package/src/{theme → features/theme}/public.test.ts +1 -1
- package/src/features/theme/public.ts +18 -0
- package/src/features/theme/runtime.test.ts +13 -0
- package/src/features/theme/runtime.ts +4 -0
- package/src/{theme → features/theme/utils}/resolveGlobalTokens.ts +2 -2
- package/src/{theme → features/theme/utils}/resolveHeadingTokenOverrides.ts +1 -1
- package/src/features/theme/utils/resolveToken.ts +16 -0
- package/src/{theme → features/theme/utils}/resolveWeightTokenOverrides.ts +12 -12
- package/src/features/toast/adapters/inbound/Toast.tsx +3 -3
- package/src/features/tooltip/adapters/inbound/Tooltip.tsx +1 -1
- package/src/features/typography/adapters/inbound/Heading.tsx +3 -30
- package/src/features/typography/adapters/inbound/Text.tsx +3 -23
- package/src/features/typography/utils/resolveHeadingTextStyle.test.ts +1 -1
- package/src/features/typography/utils/resolveHeadingTextStyle.ts +2 -2
- package/src/index.test.ts +13 -9
- package/src/index.ts +32 -17
- package/src/internal/resolvers/resolveControlSize.test.ts +1 -1
- package/src/internal/resolvers/resolveControlSize.ts +1 -1
- package/src/internal/resolvers/resolveFieldPresentation.ts +1 -1
- package/src/internal/resolvers/resolveIconSize.ts +1 -1
- package/src/internal/resolvers/resolveInteractiveColors.test.ts +1 -1
- package/src/internal/resolvers/resolveInteractiveColors.ts +2 -2
- package/src/internal/resolvers/resolveSelectionControlColors.test.ts +1 -1
- package/src/internal/resolvers/resolveSelectionControlColors.ts +2 -2
- package/src/internal/resolvers/resolveSurfaceColor.test.ts +1 -1
- package/src/internal/resolvers/resolveSurfaceColor.ts +2 -2
- package/src/internal/resolvers/resolveTextColor.test.ts +1 -1
- package/src/internal/resolvers/resolveTextColor.ts +2 -2
- package/src/internal/resolvers/resolveTextStyles.test.ts +1 -1
- package/src/internal/resolvers/resolveTextStyles.ts +1 -1
- package/src/structureOwnership.test.ts +16 -0
- package/src/types/accordion.ts +1 -1
- package/src/types/badge.ts +1 -1
- package/src/types/button.ts +4 -4
- package/src/types/checkbox.ts +3 -3
- package/src/types/font.ts +14 -0
- package/src/types/icon.ts +1 -1
- package/src/types/image.ts +1 -1
- package/src/types/interactionPolicy.test.ts +30 -0
- package/src/types/layout.ts +1 -1
- package/src/types/list.ts +1 -1
- package/src/types/modal.ts +1 -1
- package/src/types/popover.ts +1 -1
- package/src/types/popoverMenu.ts +1 -1
- package/src/{primitives/button-base/types.ts → types/pressable.ts} +4 -4
- package/src/types/radio.ts +3 -3
- package/src/types/surfaceColor.test.ts +18 -0
- package/src/types/surfaceColor.ts +11 -0
- package/src/types/switch.ts +3 -3
- package/src/types/tabs.ts +1 -1
- package/src/types/text-input.ts +1 -1
- package/src/{theme/types.ts → types/theme.ts} +22 -13
- package/src/types/toast.ts +2 -2
- package/src/types/tooltip.ts +1 -1
- package/src/types/typography.ts +1 -1
- package/src/utils/resolveSpacing.ts +2 -2
- package/src/utils/resolveViewStyles.test.ts +1 -1
- package/src/utils/resolveViewStyles.ts +2 -2
- package/src/webAcceptance.test.tsx +1 -1
- package/dist/context/FontContext.d.ts +0 -20
- package/dist/context/FontContext.d.ts.map +0 -1
- package/dist/context/FontContext.js +0 -27
- package/dist/context/FontContext.js.map +0 -1
- package/dist/context/TranslationContext.d.ts +0 -22
- package/dist/context/TranslationContext.d.ts.map +0 -1
- package/dist/context/TranslationContext.js +0 -25
- package/dist/context/TranslationContext.js.map +0 -1
- package/dist/interactionPolicy.d.ts.map +0 -1
- package/dist/interactionPolicy.js.map +0 -1
- package/dist/primitives/button-base/ButtonBase.d.ts +0 -5
- package/dist/primitives/button-base/ButtonBase.d.ts.map +0 -1
- package/dist/primitives/button-base/ButtonBase.js +0 -42
- package/dist/primitives/button-base/ButtonBase.js.map +0 -1
- package/dist/primitives/button-base/index.d.ts +0 -3
- package/dist/primitives/button-base/index.d.ts.map +0 -1
- package/dist/primitives/button-base/index.js +0 -2
- package/dist/primitives/button-base/index.js.map +0 -1
- package/dist/primitives/button-base/types.d.ts.map +0 -1
- package/dist/primitives/button-base/types.js +0 -2
- package/dist/primitives/button-base/types.js.map +0 -1
- package/dist/surfaceColor.d.ts.map +0 -1
- package/dist/surfaceColor.js.map +0 -1
- package/dist/theme/ThemeContext.d.ts +0 -27
- package/dist/theme/ThemeContext.d.ts.map +0 -1
- package/dist/theme/ThemeContext.js +0 -59
- package/dist/theme/ThemeContext.js.map +0 -1
- package/dist/theme/colorEngine.d.ts +0 -16
- package/dist/theme/colorEngine.d.ts.map +0 -1
- package/dist/theme/colorEngine.js.map +0 -1
- package/dist/theme/createSurfaceColorDiagnosticCollector.d.ts.map +0 -1
- package/dist/theme/createSurfaceColorDiagnosticCollector.js.map +0 -1
- package/dist/theme/createSurfaceSemanticPolicy.d.ts.map +0 -1
- package/dist/theme/createSurfaceSemanticPolicy.js.map +0 -1
- package/dist/theme/createTheme.d.ts +0 -5
- package/dist/theme/createTheme.d.ts.map +0 -1
- package/dist/theme/createTheme.js +0 -49
- package/dist/theme/createTheme.js.map +0 -1
- package/dist/theme/defaultTokens.d.ts +0 -3
- package/dist/theme/defaultTokens.d.ts.map +0 -1
- package/dist/theme/defaultTokens.js.map +0 -1
- package/dist/theme/index.d.ts +0 -3
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/index.js +0 -3
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/public.d.ts +0 -5
- package/dist/theme/public.d.ts.map +0 -1
- package/dist/theme/public.js +0 -5
- package/dist/theme/public.js.map +0 -1
- package/dist/theme/resolveGlobalTokens.d.ts.map +0 -1
- package/dist/theme/resolveGlobalTokens.js.map +0 -1
- package/dist/theme/resolveHeadingTokenOverrides.d.ts.map +0 -1
- package/dist/theme/resolveHeadingTokenOverrides.js.map +0 -1
- package/dist/theme/resolveNumericTokenOverrides.d.ts.map +0 -1
- package/dist/theme/resolveNumericTokenOverrides.js.map +0 -1
- package/dist/theme/resolveRoleSemantics.d.ts.map +0 -1
- package/dist/theme/resolveRoleSemantics.js.map +0 -1
- package/dist/theme/resolveSurfaceSemanticModel.d.ts.map +0 -1
- package/dist/theme/resolveSurfaceSemanticModel.js.map +0 -1
- package/dist/theme/resolveToken.d.ts.map +0 -1
- package/dist/theme/resolveToken.js +0 -19
- package/dist/theme/resolveToken.js.map +0 -1
- package/dist/theme/resolveWeightTokenOverrides.d.ts.map +0 -1
- package/dist/theme/resolveWeightTokenOverrides.js.map +0 -1
- package/dist/theme/surfaceColorPolicy.d.ts +0 -8
- package/dist/theme/surfaceColorPolicy.d.ts.map +0 -1
- package/dist/theme/surfaceColorPolicy.js +0 -8
- package/dist/theme/surfaceColorPolicy.js.map +0 -1
- package/dist/theme/types.d.ts.map +0 -1
- package/dist/theme/types.js +0 -2
- package/dist/theme/types.js.map +0 -1
- package/dist/utils/deepEqual.d.ts +0 -6
- package/dist/utils/deepEqual.d.ts.map +0 -1
- package/dist/utils/deepEqual.js +0 -36
- package/dist/utils/deepEqual.js.map +0 -1
- package/dist/utils/deepMerge.d.ts +0 -6
- package/dist/utils/deepMerge.d.ts.map +0 -1
- package/dist/utils/deepMerge.js +0 -26
- package/dist/utils/deepMerge.js.map +0 -1
- package/src/context/FontContext.tsx +0 -59
- package/src/context/TranslationContext.tsx +0 -50
- package/src/interactionPolicy.test.ts +0 -86
- package/src/primitives/button-base/index.ts +0 -2
- package/src/surfaceColor.test.ts +0 -44
- package/src/theme/ThemeContext.tsx +0 -94
- package/src/theme/colorEngine.test.ts +0 -302
- package/src/theme/createTheme.ts +0 -60
- package/src/theme/defaultTokens.ts +0 -61
- package/src/theme/index.ts +0 -2
- package/src/theme/public.ts +0 -4
- package/src/theme/resolveToken.ts +0 -32
- package/src/theme/surfaceColorPolicy.ts +0 -7
- package/src/utils/deepEqual.ts +0 -34
- package/src/utils/deepMerge.test.ts +0 -113
- package/src/utils/deepMerge.ts +0 -29
- /package/dist/{surfaceColor.js → constants/surfaceColor.js} +0 -0
- /package/dist/{theme → features/theme/domain}/createSurfaceColorDiagnosticCollector.js +0 -0
- /package/dist/{theme → features/theme/domain}/resolveSurfaceSemanticModel.js +0 -0
- /package/dist/{theme → features/theme/utils}/resolveHeadingTokenOverrides.js +0 -0
- /package/dist/{theme → features/theme/utils}/resolveNumericTokenOverrides.d.ts +0 -0
- /package/dist/{theme → features/theme/utils}/resolveNumericTokenOverrides.js +0 -0
- /package/dist/{interactionPolicy.d.ts → types/interactionPolicy.d.ts} +0 -0
- /package/dist/{interactionPolicy.js → types/interactionPolicy.js} +0 -0
- /package/src/{theme → features/theme/utils}/resolveNumericTokenOverrides.ts +0 -0
- /package/src/{interactionPolicy.ts → types/interactionPolicy.ts} +0 -0
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text as ReactNativeText } from 'react-native';
|
|
3
|
-
import { useTranslationContext } from '../../../../context/TranslationContext';
|
|
4
3
|
import { resolveTextColor, resolveTextStyles } from '../../../../internal/resolvers';
|
|
5
|
-
import { useTheme } from '
|
|
6
|
-
/*** Renders
|
|
4
|
+
import { useTheme } from '../../../theme/runtime';
|
|
5
|
+
/*** Renders body text using Surface semantic typography. */
|
|
7
6
|
export function Text({ children, i18nKey, variant = 'body', emphasis = 'default', color, align, weight, italic = false, numberOfLines, testID, }) {
|
|
8
7
|
const { theme } = useTheme();
|
|
9
|
-
const
|
|
10
|
-
const content = resolveTextContent(children, i18nKey, t);
|
|
8
|
+
const content = children ?? i18nKey ?? null;
|
|
11
9
|
return (<ReactNativeText numberOfLines={numberOfLines} testID={testID} style={[
|
|
12
10
|
resolveTextStyles(theme, { align, italic, variant, weight }),
|
|
13
11
|
{ color: resolveTextColor(theme, emphasis, color) },
|
|
@@ -15,19 +13,4 @@ export function Text({ children, i18nKey, variant = 'body', emphasis = 'default'
|
|
|
15
13
|
{content}
|
|
16
14
|
</ReactNativeText>);
|
|
17
15
|
}
|
|
18
|
-
/*** Resolves authored or translated Text content with a stable fallback. */
|
|
19
|
-
function resolveTextContent(children, i18nKey, translate) {
|
|
20
|
-
if (children !== undefined)
|
|
21
|
-
return children;
|
|
22
|
-
if (!i18nKey)
|
|
23
|
-
return null;
|
|
24
|
-
try {
|
|
25
|
-
const translated = translate(i18nKey);
|
|
26
|
-
return translated && translated !== i18nKey ? translated : i18nKey;
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
console.warn('[Text] Translation error:', error);
|
|
30
|
-
return i18nKey;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
16
|
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../../../src/features/typography/adapters/inbound/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../../../src/features/typography/adapters/inbound/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAErF,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,4DAA4D;AAC5D,MAAM,UAAU,IAAI,CAAC,EACnB,QAAQ,EACR,OAAO,EACP,OAAO,GAAG,MAAM,EAChB,QAAQ,GAAG,SAAS,EACpB,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,GAAG,KAAK,EACd,aAAa,EACb,MAAM,GACI;IACV,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,OAAO,GAAG,QAAQ,IAAI,OAAO,IAAI,IAAI,CAAC;IAE5C,OAAO,CACL,CAAC,eAAe,CACd,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC;YACL,iBAAiB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;YAC5D,EAAE,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE;SACpD,CAAC,CAEF;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { resolveTextColor, resolveTextStyles } from '../../../../internal/resolvers';\nimport type { TextProps } from '../../../../types/typography';\nimport { useTheme } from '../../../theme/runtime';\n\n/*** Renders body text using Surface semantic typography. */\nexport function Text({\n children,\n i18nKey,\n variant = 'body',\n emphasis = 'default',\n color,\n align,\n weight,\n italic = false,\n numberOfLines,\n testID,\n}: TextProps) {\n const { theme } = useTheme();\n const content = children ?? i18nKey ?? null;\n\n return (\n <ReactNativeText\n numberOfLines={numberOfLines}\n testID={testID}\n style={[\n resolveTextStyles(theme, { align, italic, variant, weight }),\n { color: resolveTextColor(theme, emphasis, color) },\n ]}\n >\n {content}\n </ReactNativeText>\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TextStyle } from 'react-native';
|
|
2
|
-
import type { SurfaceColor, SurfaceEmphasis } from '../../../surfaceColor';
|
|
3
|
-
import type { SurfaceTheme } from '../../../theme
|
|
2
|
+
import type { SurfaceColor, SurfaceEmphasis } from '../../../types/surfaceColor';
|
|
3
|
+
import type { SurfaceTheme } from '../../../types/theme';
|
|
4
4
|
import type { HeadingLevel, HeadingProps } from '../../../types/typography';
|
|
5
5
|
/*** Resolves theme-driven typography styles for one heading level. */
|
|
6
6
|
export declare function resolveHeadingTextStyle(theme: SurfaceTheme, level: HeadingLevel, align?: HeadingProps['align'], emphasis?: SurfaceEmphasis, color?: SurfaceColor): TextStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHeadingTextStyle.d.ts","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingTextStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"resolveHeadingTextStyle.d.ts","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingTextStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE5E,sEAAsE;AACtE,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,YAAY,EACnB,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,EAC7B,QAAQ,GAAE,eAA2B,EACrC,KAAK,CAAC,EAAE,YAAY,GACnB,SAAS,CAKX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHeadingTextStyle.js","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingTextStyle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAKlF,sEAAsE;AACtE,MAAM,UAAU,uBAAuB,CACrC,KAAmB,EACnB,KAAmB,EACnB,KAA6B,EAC7B,WAA4B,SAAS,EACrC,KAAoB;IAEpB,OAAO;QACL,GAAG,iBAAiB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC7C,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC;KAChD,CAAC;AACJ,CAAC","sourcesContent":["import type { TextStyle } from 'react-native';\n\nimport { resolveTextColor } from '../../../internal/resolvers/resolveTextColor';\nimport { resolveTextStyles } from '../../../internal/resolvers/resolveTextStyles';\nimport type { SurfaceColor, SurfaceEmphasis } from '../../../surfaceColor';\nimport type { SurfaceTheme } from '../../../theme
|
|
1
|
+
{"version":3,"file":"resolveHeadingTextStyle.js","sourceRoot":"","sources":["../../../../src/features/typography/utils/resolveHeadingTextStyle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAKlF,sEAAsE;AACtE,MAAM,UAAU,uBAAuB,CACrC,KAAmB,EACnB,KAAmB,EACnB,KAA6B,EAC7B,WAA4B,SAAS,EACrC,KAAoB;IAEpB,OAAO;QACL,GAAG,iBAAiB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC7C,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC;KAChD,CAAC;AACJ,CAAC","sourcesContent":["import type { TextStyle } from 'react-native';\n\nimport { resolveTextColor } from '../../../internal/resolvers/resolveTextColor';\nimport { resolveTextStyles } from '../../../internal/resolvers/resolveTextStyles';\nimport type { SurfaceColor, SurfaceEmphasis } from '../../../types/surfaceColor';\nimport type { SurfaceTheme } from '../../../types/theme';\nimport type { HeadingLevel, HeadingProps } from '../../../types/typography';\n\n/*** Resolves theme-driven typography styles for one heading level. */\nexport function resolveHeadingTextStyle(\n theme: SurfaceTheme,\n level: HeadingLevel,\n align?: HeadingProps['align'],\n emphasis: SurfaceEmphasis = 'default',\n color?: SurfaceColor,\n): TextStyle {\n return {\n ...resolveTextStyles(theme, { align, level }),\n color: resolveTextColor(theme, emphasis, color),\n };\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { FontProvider, useFontContext } from './context/FontContext';
|
|
3
|
-
export type { I18nInstance, TranslationRuntime, Translator } from './context/TranslationContext';
|
|
4
|
-
export { TranslationProvider, useTranslationContext } from './context/TranslationContext';
|
|
1
|
+
export { SURFACE_COLORS, SURFACE_EMPHASES, SURFACE_PALETTE_COLORS, SURFACE_STATUS_COLORS, } from './constants/surfaceColor';
|
|
5
2
|
export * from './core/responsive';
|
|
6
3
|
export type { AccordionContentProps, AccordionItemProps, AccordionMode, AccordionMultipleProps, AccordionProps, AccordionSingleProps, AccordionTriggerProps, } from './features/accordion/public';
|
|
7
4
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from './features/accordion/public';
|
|
@@ -13,6 +10,8 @@ export type { ButtonIconSpec, ButtonProps, IconButtonProps } from './features/bu
|
|
|
13
10
|
export { Button, IconButton } from './features/button/public';
|
|
14
11
|
export type { CardProps } from './features/card/public';
|
|
15
12
|
export { Card } from './features/card/public';
|
|
13
|
+
export type { FontProviderProps, FontRuntime } from './features/font/public';
|
|
14
|
+
export { FontProvider } from './features/font/public';
|
|
16
15
|
export type { CheckboxProps } from './features/form/checkbox/public';
|
|
17
16
|
export { Checkbox } from './features/form/checkbox/public';
|
|
18
17
|
export type { FieldProps } from './features/form/field/public';
|
|
@@ -39,22 +38,22 @@ export type { PopoverAnchorRenderProps, PopoverPlacement, PopoverProps, } from '
|
|
|
39
38
|
export { Popover } from './features/popover/public';
|
|
40
39
|
export type { PopoverMenuAction, PopoverMenuActionIntent, PopoverMenuProps, } from './features/popover-menu/public';
|
|
41
40
|
export { PopoverMenu } from './features/popover-menu/public';
|
|
41
|
+
export type { PressableProps } from './features/pressable/public';
|
|
42
|
+
export { Pressable } from './features/pressable/public';
|
|
42
43
|
export type { SurfaceProps, SurfaceVariant } from './features/surface/public';
|
|
43
44
|
export { Surface } from './features/surface/public';
|
|
44
45
|
export type { TabListProps, TabPanelProps, TabProps, TabsProps } from './features/tabs/public';
|
|
45
46
|
export { Tab, TabList, TabPanel, Tabs } from './features/tabs/public';
|
|
47
|
+
export type { ActionSemantics, BorderSemantics, ContentSemantics, FontWeight, NeutralSemantics, RoleSemantics, SelectionSemantics, SurfaceColorDiagnostics, SurfaceColorSelectionDiagnostic, SurfaceContrastDiagnostic, SurfaceSemantics, SurfaceTheme, ThemeMode, ThemeSemantics, ThemeTokens, } from './features/theme/public';
|
|
48
|
+
export { createTheme } from './features/theme/public';
|
|
49
|
+
export type { ThemeProviderProps, ThemeRuntime, ThemeScopeProps } from './features/theme/runtime';
|
|
50
|
+
export { ThemeProvider, ThemeScope, useTheme } from './features/theme/runtime';
|
|
46
51
|
export type { ToastController, ToastOptions, ToastProps, ToastProviderProps, ToastStatus, } from './features/toast/public';
|
|
47
52
|
export { Toast, ToastProvider, useToast } from './features/toast/public';
|
|
48
53
|
export type { TooltipProps } from './features/tooltip/public';
|
|
49
54
|
export { Tooltip } from './features/tooltip/public';
|
|
50
55
|
export type { HeadingLevel, HeadingProps, TextProps } from './features/typography/public';
|
|
51
56
|
export { Heading, Text } from './features/typography/public';
|
|
52
|
-
export type { InteractionPolicy, InteractionPolicyProps } from './interactionPolicy';
|
|
53
|
-
export type {
|
|
54
|
-
export { ButtonBase } from './primitives/button-base';
|
|
55
|
-
export type { SurfaceColor, SurfaceEmphasis, SurfacePaletteColor, SurfaceStatusColor, } from './surfaceColor';
|
|
56
|
-
export { SURFACE_COLORS, SURFACE_EMPHASES, SURFACE_PALETTE_COLORS, SURFACE_STATUS_COLORS, } from './surfaceColor';
|
|
57
|
-
export * from './theme';
|
|
58
|
-
export { isDeepEqual } from './utils/deepEqual';
|
|
59
|
-
export { deepMerge } from './utils/deepMerge';
|
|
57
|
+
export type { InteractionPolicy, InteractionPolicyProps } from './types/interactionPolicy';
|
|
58
|
+
export type { SurfaceColor, SurfaceEmphasis, SurfacePaletteColor, SurfaceStatusColor, } from './types/surfaceColor';
|
|
60
59
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,C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AAU,EACV,kBAAkB,EAClB,WAAW,GACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACzE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAC7D,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,YAAY,EACV,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { TranslationProvider, useTranslationContext } from './context/TranslationContext';
|
|
1
|
+
export { SURFACE_COLORS, SURFACE_EMPHASES, SURFACE_PALETTE_COLORS, SURFACE_STATUS_COLORS, } from './constants/surfaceColor';
|
|
3
2
|
export * from './core/responsive';
|
|
4
3
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from './features/accordion/public';
|
|
5
4
|
export { AppBar } from './features/app-bar/public';
|
|
6
5
|
export { Badge } from './features/badge/public';
|
|
7
6
|
export { Button, IconButton } from './features/button/public';
|
|
8
7
|
export { Card } from './features/card/public';
|
|
8
|
+
export { FontProvider } from './features/font/public';
|
|
9
9
|
export { Checkbox } from './features/form/checkbox/public';
|
|
10
10
|
export { Field } from './features/form/field/public';
|
|
11
11
|
export { Radio } from './features/form/radio/public';
|
|
@@ -19,14 +19,12 @@ export { List, ListItem } from './features/list/public';
|
|
|
19
19
|
export { Modal } from './features/modal/public';
|
|
20
20
|
export { Popover } from './features/popover/public';
|
|
21
21
|
export { PopoverMenu } from './features/popover-menu/public';
|
|
22
|
+
export { Pressable } from './features/pressable/public';
|
|
22
23
|
export { Surface } from './features/surface/public';
|
|
23
24
|
export { Tab, TabList, TabPanel, Tabs } from './features/tabs/public';
|
|
25
|
+
export { createTheme } from './features/theme/public';
|
|
26
|
+
export { ThemeProvider, ThemeScope, useTheme } from './features/theme/runtime';
|
|
24
27
|
export { Toast, ToastProvider, useToast } from './features/toast/public';
|
|
25
28
|
export { Tooltip } from './features/tooltip/public';
|
|
26
29
|
export { Heading, Text } from './features/typography/public';
|
|
27
|
-
export { ButtonBase } from './primitives/button-base';
|
|
28
|
-
export { SURFACE_COLORS, SURFACE_EMPHASES, SURFACE_PALETTE_COLORS, SURFACE_STATUS_COLORS, } from './surfaceColor';
|
|
29
|
-
export * from './theme';
|
|
30
|
-
export { isDeepEqual } from './utils/deepEqual';
|
|
31
|
-
export { deepMerge } from './utils/deepMerge';
|
|
32
30
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAUlC,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAA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E,IAAI,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["export {\n SURFACE_COLORS,\n SURFACE_EMPHASES,\n SURFACE_PALETTE_COLORS,\n SURFACE_STATUS_COLORS,\n} from './constants/surfaceColor';\nexport * from './core/responsive';\nexport type {\n AccordionContentProps,\n AccordionItemProps,\n AccordionMode,\n AccordionMultipleProps,\n AccordionProps,\n AccordionSingleProps,\n AccordionTriggerProps,\n} from './features/accordion/public';\nexport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from './features/accordion/public';\nexport type { AppBarProps } from './features/app-bar/public';\nexport { AppBar } from './features/app-bar/public';\nexport type { BadgeProps } from './features/badge/public';\nexport { Badge } from './features/badge/public';\nexport type { ButtonIconSpec, ButtonProps, IconButtonProps } from './features/button/public';\nexport { Button, IconButton } from './features/button/public';\nexport type { CardProps } from './features/card/public';\nexport { Card } from './features/card/public';\nexport type { FontProviderProps, FontRuntime } from './features/font/public';\nexport { FontProvider } from './features/font/public';\nexport type { CheckboxProps } from './features/form/checkbox/public';\nexport { Checkbox } from './features/form/checkbox/public';\nexport type { FieldProps } from './features/form/field/public';\nexport { Field } from './features/form/field/public';\nexport type { RadioProps } from './features/form/radio/public';\nexport { Radio } from './features/form/radio/public';\nexport type { SwitchProps } from './features/form/switch/public';\nexport { Switch } from './features/form/switch/public';\nexport type { TextInputProps } from './features/form/text-input/public';\nexport { TextInput } from './features/form/text-input/public';\nexport type {\n FontIconSource,\n IconProps,\n IconProvider,\n IconSource,\n IconVariant,\n SvgIconSource,\n} from './features/icon/public';\nexport { Icon, SUPPORTED_ICON_PROVIDERS } from './features/icon/public';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './features/image/public';\nexport { Image } from './features/image/public';\nexport type {\n KeyboardAvoidingViewBehavior,\n KeyboardAvoidingViewProps,\n} from './features/keyboard-avoiding-view/public';\nexport { KeyboardAvoidingView } from './features/keyboard-avoiding-view/public';\nexport type { DividerProps, GridProps, ScrollViewProps, ViewProps } from './features/layout/public';\nexport { Divider, Grid, ScrollView, View } from './features/layout/public';\nexport type { ListItemProps, ListProps } from './features/list/public';\nexport { List, ListItem } from './features/list/public';\nexport type { ModalProps } from './features/modal/public';\nexport { Modal } from './features/modal/public';\nexport type {\n PopoverAnchorRenderProps,\n PopoverPlacement,\n PopoverProps,\n} from './features/popover/public';\nexport { Popover } from './features/popover/public';\nexport type {\n PopoverMenuAction,\n PopoverMenuActionIntent,\n PopoverMenuProps,\n} from './features/popover-menu/public';\nexport { PopoverMenu } from './features/popover-menu/public';\nexport type { PressableProps } from './features/pressable/public';\nexport { Pressable } from './features/pressable/public';\nexport type { SurfaceProps, SurfaceVariant } from './features/surface/public';\nexport { Surface } from './features/surface/public';\nexport type { TabListProps, TabPanelProps, TabProps, TabsProps } from './features/tabs/public';\nexport { Tab, TabList, TabPanel, Tabs } from './features/tabs/public';\nexport type {\n ActionSemantics,\n BorderSemantics,\n ContentSemantics,\n FontWeight,\n NeutralSemantics,\n RoleSemantics,\n SelectionSemantics,\n SurfaceColorDiagnostics,\n SurfaceColorSelectionDiagnostic,\n SurfaceContrastDiagnostic,\n SurfaceSemantics,\n SurfaceTheme,\n ThemeMode,\n ThemeSemantics,\n ThemeTokens,\n} from './features/theme/public';\nexport { createTheme } from './features/theme/public';\nexport type { ThemeProviderProps, ThemeRuntime, ThemeScopeProps } from './features/theme/runtime';\nexport { ThemeProvider, ThemeScope, useTheme } from './features/theme/runtime';\nexport type {\n ToastController,\n ToastOptions,\n ToastProps,\n ToastProviderProps,\n ToastStatus,\n} from './features/toast/public';\nexport { Toast, ToastProvider, useToast } from './features/toast/public';\nexport type { TooltipProps } from './features/tooltip/public';\nexport { Tooltip } from './features/tooltip/public';\nexport type { HeadingLevel, HeadingProps, TextProps } from './features/typography/public';\nexport { Heading, Text } from './features/typography/public';\nexport type { InteractionPolicy, InteractionPolicyProps } from './types/interactionPolicy';\nexport type {\n SurfaceColor,\n SurfaceEmphasis,\n SurfacePaletteColor,\n SurfaceStatusColor,\n} from './types/surfaceColor';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveControlSize.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveControlSize.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,kBAAkB,CAChC,KAAmB,EACnB,OAAoB,GAAG;IAEvB,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,GAAG;YACN,OAAO;gBACL,SAAS,EAAE,EAAE;gBACb,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBAClC,eAAe,EAAE,CAAC;gBAClB,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC3B,WAAW,EAAE,WAAW;gBACxB,QAAQ,EAAE,EAAE;aACb,CAAC;QACJ,KAAK,GAAG;YACN,OAAO;gBACL,SAAS,EAAE,EAAE;gBACb,iBAAiB,EAAE,EAAE;gBACrB,eAAe,EAAE,EAAE;gBACnB,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC3B,WAAW,EAAE,MAAM;gBACnB,QAAQ,EAAE,EAAE;aACb,CAAC;QACJ,KAAK,GAAG,CAAC;QACT;YACE,OAAO;gBACL,SAAS,EAAE,EAAE;gBACb,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBAClC,eAAe,EAAE,CAAC;gBAClB,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC3B,WAAW,EAAE,MAAM;gBACnB,QAAQ,EAAE,EAAE;aACb,CAAC;IACN,CAAC;AACH,CAAC","sourcesContent":["import type { SurfaceTheme } from '../../theme
|
|
1
|
+
{"version":3,"file":"resolveControlSize.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveControlSize.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,kBAAkB,CAChC,KAAmB,EACnB,OAAoB,GAAG;IAEvB,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,GAAG;YACN,OAAO;gBACL,SAAS,EAAE,EAAE;gBACb,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBAClC,eAAe,EAAE,CAAC;gBAClB,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC3B,WAAW,EAAE,WAAW;gBACxB,QAAQ,EAAE,EAAE;aACb,CAAC;QACJ,KAAK,GAAG;YACN,OAAO;gBACL,SAAS,EAAE,EAAE;gBACb,iBAAiB,EAAE,EAAE;gBACrB,eAAe,EAAE,EAAE;gBACnB,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC3B,WAAW,EAAE,MAAM;gBACnB,QAAQ,EAAE,EAAE;aACb,CAAC;QACJ,KAAK,GAAG,CAAC;QACT;YACE,OAAO;gBACL,SAAS,EAAE,EAAE;gBACb,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBAClC,eAAe,EAAE,CAAC;gBAClB,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC3B,WAAW,EAAE,MAAM;gBACnB,QAAQ,EAAE,EAAE;aACb,CAAC;IACN,CAAC;AACH,CAAC","sourcesContent":["import type { SurfaceTheme } from '../../types/theme';\n\nexport type ControlSize = 's' | 'm' | 'l';\n\nexport interface ResolvedControlSize {\n minHeight: number;\n paddingHorizontal: number;\n paddingVertical: number;\n borderRadius: number;\n textVariant: 'bodySmall' | 'body';\n iconSize: number;\n}\n\nexport function resolveControlSize(\n theme: SurfaceTheme,\n size: ControlSize = 'm',\n): ResolvedControlSize {\n switch (size) {\n case 's':\n return {\n minHeight: 32,\n paddingHorizontal: theme.spacing.s,\n paddingVertical: 6,\n borderRadius: theme.radii.m,\n textVariant: 'bodySmall',\n iconSize: 16,\n };\n case 'l':\n return {\n minHeight: 48,\n paddingHorizontal: 20,\n paddingVertical: 10,\n borderRadius: theme.radii.l,\n textVariant: 'body',\n iconSize: 20,\n };\n case 'm':\n default:\n return {\n minHeight: 40,\n paddingHorizontal: theme.spacing.m,\n paddingVertical: 8,\n borderRadius: theme.radii.m,\n textVariant: 'body',\n iconSize: 18,\n };\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SurfaceColor, SurfaceEmphasis } from '../../surfaceColor';
|
|
1
|
+
import type { SurfaceColor, SurfaceEmphasis } from '../../types/surfaceColor';
|
|
2
2
|
import type { FieldState } from './resolveFieldState';
|
|
3
3
|
export interface ResolvedFieldPresentation {
|
|
4
4
|
helperColor?: Extract<SurfaceColor, 'error'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveFieldPresentation.d.ts","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveFieldPresentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"resolveFieldPresentation.d.ts","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveFieldPresentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,WAAW,yBAAyB;IACxC,WAAW,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC7C,cAAc,EAAE,OAAO,CAAC,eAAe,EAAE,SAAS,GAAG,OAAO,CAAC,CAAC;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC5C,aAAa,EAAE,OAAO,CAAC,eAAe,EAAE,SAAS,GAAG,OAAO,CAAC,CAAC;CAC9D;AAED,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,UAAU,GAAG,yBAAyB,CAqB1F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveFieldPresentation.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveFieldPresentation.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,wBAAwB,CAAC,UAAsB;IAC7D,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;QACvB,OAAO;YACL,WAAW,EAAE,OAAO;YACpB,cAAc,EAAE,SAAS;YACzB,UAAU,EAAE,OAAO;YACnB,aAAa,EAAE,SAAS;SACzB,CAAC;IACJ,CAAC;IAED,IAAI,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC/C,OAAO;YACL,cAAc,EAAE,OAAO;YACvB,aAAa,EAAE,OAAO;SACvB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,cAAc,EAAE,SAAS;QACzB,aAAa,EAAE,SAAS;KACzB,CAAC;AACJ,CAAC","sourcesContent":["import type { SurfaceColor, SurfaceEmphasis } from '../../surfaceColor';\nimport type { FieldState } from './resolveFieldState';\n\nexport interface ResolvedFieldPresentation {\n helperColor?: Extract<SurfaceColor, 'error'>;\n helperEmphasis: Extract<SurfaceEmphasis, 'default' | 'muted'>;\n labelColor?: Extract<SurfaceColor, 'error'>;\n labelEmphasis: Extract<SurfaceEmphasis, 'default' | 'muted'>;\n}\n\nexport function resolveFieldPresentation(fieldState: FieldState): ResolvedFieldPresentation {\n if (fieldState.invalid) {\n return {\n helperColor: 'error',\n helperEmphasis: 'default',\n labelColor: 'error',\n labelEmphasis: 'default',\n };\n }\n\n if (fieldState.disabled || fieldState.readOnly) {\n return {\n helperEmphasis: 'muted',\n labelEmphasis: 'muted',\n };\n }\n\n return {\n helperEmphasis: 'default',\n labelEmphasis: 'default',\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"resolveFieldPresentation.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveFieldPresentation.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,wBAAwB,CAAC,UAAsB;IAC7D,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;QACvB,OAAO;YACL,WAAW,EAAE,OAAO;YACpB,cAAc,EAAE,SAAS;YACzB,UAAU,EAAE,OAAO;YACnB,aAAa,EAAE,SAAS;SACzB,CAAC;IACJ,CAAC;IAED,IAAI,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC/C,OAAO;YACL,cAAc,EAAE,OAAO;YACvB,aAAa,EAAE,OAAO;SACvB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,cAAc,EAAE,SAAS;QACzB,aAAa,EAAE,SAAS;KACzB,CAAC;AACJ,CAAC","sourcesContent":["import type { SurfaceColor, SurfaceEmphasis } from '../../types/surfaceColor';\nimport type { FieldState } from './resolveFieldState';\n\nexport interface ResolvedFieldPresentation {\n helperColor?: Extract<SurfaceColor, 'error'>;\n helperEmphasis: Extract<SurfaceEmphasis, 'default' | 'muted'>;\n labelColor?: Extract<SurfaceColor, 'error'>;\n labelEmphasis: Extract<SurfaceEmphasis, 'default' | 'muted'>;\n}\n\nexport function resolveFieldPresentation(fieldState: FieldState): ResolvedFieldPresentation {\n if (fieldState.invalid) {\n return {\n helperColor: 'error',\n helperEmphasis: 'default',\n labelColor: 'error',\n labelEmphasis: 'default',\n };\n }\n\n if (fieldState.disabled || fieldState.readOnly) {\n return {\n helperEmphasis: 'muted',\n labelEmphasis: 'muted',\n };\n }\n\n return {\n helperEmphasis: 'default',\n labelEmphasis: 'default',\n };\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SurfaceTheme } from '../../theme
|
|
1
|
+
import type { SurfaceTheme } from '../../types/theme';
|
|
2
2
|
import { type ControlSize } from './resolveControlSize';
|
|
3
3
|
export declare function resolveIconSize(theme: SurfaceTheme, size?: ControlSize): number;
|
|
4
4
|
//# sourceMappingURL=resolveIconSize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveIconSize.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveIconSize.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE5E,MAAM,UAAU,eAAe,CAAC,KAAmB,EAAE,OAAoB,GAAG;IAC1E,OAAO,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC;AAClD,CAAC","sourcesContent":["import type { SurfaceTheme } from '../../theme
|
|
1
|
+
{"version":3,"file":"resolveIconSize.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveIconSize.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE5E,MAAM,UAAU,eAAe,CAAC,KAAmB,EAAE,OAAoB,GAAG;IAC1E,OAAO,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC;AAClD,CAAC","sourcesContent":["import type { SurfaceTheme } from '../../types/theme';\nimport { type ControlSize, resolveControlSize } from './resolveControlSize';\n\nexport function resolveIconSize(theme: SurfaceTheme, size: ControlSize = 'm'): number {\n return resolveControlSize(theme, size).iconSize;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SurfaceColor } from '../../surfaceColor';
|
|
2
|
-
import type { SurfaceTheme } from '../../theme
|
|
1
|
+
import type { SurfaceColor } from '../../types/surfaceColor';
|
|
2
|
+
import type { SurfaceTheme } from '../../types/theme';
|
|
3
3
|
import type { FieldState } from './resolveFieldState';
|
|
4
4
|
import type { InteractionState } from './resolveInteractiveState';
|
|
5
5
|
export type ButtonVariant = 'solid' | 'outline' | 'ghost' | 'soft';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveInteractiveColors.d.ts","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveInteractiveColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"resolveInteractiveColors.d.ts","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveInteractiveColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEnE,MAAM,WAAW,yBAAyB;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,YAAY,EACnB,EACE,OAAO,EACP,KAAK,EACL,KAAK,GACN,EAAE;IACD,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,gBAAgB,CAAC;CACzB,GACA,yBAAyB,CA8D3B;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,UAAU,GACrB,yBAAyB,GAAG;IAAE,gBAAgB,EAAE,MAAM,CAAA;CAAE,CA6C1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveInteractiveColors.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveInteractiveColors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAW5D,MAAM,UAAU,mBAAmB,CACjC,KAAmB,EACnB,EACE,OAAO,EACP,KAAK,EACL,KAAK,GAKN;IAED,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACnB,OAAO;YACL,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ;YACjD,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM;Y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SAAS,CAAC,OAAO,CAAC,OAAO;YAC7C,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK;SAChD,CAAC;IACJ,CAAC;IAED,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;QACvB,OAAO;YACL,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO;YAChD,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK;YACzC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO;YAC7C,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK;SAChD,CAAC;IACJ,CAAC;IAED,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,OAAO;YACL,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM;YAC/C,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO;YAC3C,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO;YAC7C,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK;SAChD,CAAC;IACJ,CAAC;IAED,OAAO;QACL,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO;QAChD,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO;QAC3C,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO;QAC7C,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK;KAChD,CAAC;AACJ,CAAC","sourcesContent":["import type { SurfaceColor } from '../../surfaceColor';\nimport type { SurfaceTheme } from '../../theme
|
|
1
|
+
{"version":3,"file":"resolveInteractiveColors.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveInteractiveColors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,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C,OAAO;QAC7C,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK;KAChD,CAAC;AACJ,CAAC","sourcesContent":["import type { SurfaceColor } from '../../types/surfaceColor';\nimport type { SurfaceTheme } from '../../types/theme';\nimport type { FieldState } from './resolveFieldState';\nimport type { InteractionState } from './resolveInteractiveState';\nimport { resolveSurfaceColor } from './resolveSurfaceColor';\n\nexport type ButtonVariant = 'solid' | 'outline' | 'ghost' | 'soft';\n\nexport interface ResolvedInteractiveColors {\n backgroundColor: string;\n borderColor: string;\n contentColor: string;\n opacity?: number;\n}\n\nexport function resolveButtonColors(\n theme: SurfaceTheme,\n {\n variant,\n color,\n state,\n }: {\n variant: ButtonVariant;\n color: SurfaceColor;\n state: InteractionState;\n },\n): ResolvedInteractiveColors {\n if (state.disabled) {\n return {\n backgroundColor: theme.semantics.surface.disabled,\n borderColor: theme.semantics.border.subtle,\n contentColor: theme.semantics.content.disabled,\n };\n }\n\n const semanticTone = resolveSurfaceColor(theme, color);\n\n switch (variant) {\n case 'outline':\n return {\n backgroundColor: state.pressed\n ? semanticTone.softActive\n : state.hovered\n ? semanticTone.softHover\n : 'transparent',\n borderColor: semanticTone.outline,\n contentColor: semanticTone.onSurfaceText,\n };\n case 'ghost':\n return {\n backgroundColor: state.pressed\n ? semanticTone.softActive\n : state.hovered\n ? semanticTone.softHover\n : 'transparent',\n borderColor: 'transparent',\n contentColor: semanticTone.onSurfaceText,\n };\n case 'soft':\n return {\n backgroundColor: state.pressed\n ? semanticTone.softActive\n : state.hovered\n ? semanticTone.softHover\n : semanticTone.softBg,\n borderColor: 'transparent',\n contentColor: state.pressed\n ? semanticTone.onSoftActiveText\n : state.hovered\n ? semanticTone.onSoftHoverText\n : semanticTone.onSoftText,\n };\n case 'solid':\n default:\n return {\n backgroundColor: state.pressed\n ? semanticTone.strong\n : state.hovered\n ? semanticTone.hover\n : semanticTone.base,\n borderColor: semanticTone.base,\n contentColor: state.pressed\n ? semanticTone.onStrongText\n : state.hovered\n ? semanticTone.onHoverText\n : semanticTone.onSolidText,\n };\n }\n}\n\nexport function resolveInputColors(\n theme: SurfaceTheme,\n fieldState: FieldState,\n): ResolvedInteractiveColors & { placeholderColor: string } {\n if (fieldState.disabled) {\n return {\n backgroundColor: theme.semantics.surface.disabled,\n borderColor: theme.semantics.border.subtle,\n contentColor: theme.semantics.content.disabled,\n placeholderColor: theme.semantics.content.disabled,\n };\n }\n\n if (fieldState.invalid) {\n return {\n backgroundColor: fieldState.readOnly\n ? theme.semantics.surface.subtle\n : theme.semantics.surface.default,\n borderColor: fieldState.focused ? theme.semantics.error.base : theme.semantics.error.outline,\n contentColor: theme.semantics.content.default,\n placeholderColor: theme.semantics.content.muted,\n };\n }\n\n if (fieldState.focused) {\n return {\n backgroundColor: theme.semantics.surface.default,\n borderColor: theme.semantics.border.focus,\n contentColor: theme.semantics.content.default,\n placeholderColor: theme.semantics.content.muted,\n };\n }\n\n if (fieldState.readOnly) {\n return {\n backgroundColor: theme.semantics.surface.subtle,\n borderColor: theme.semantics.border.default,\n contentColor: theme.semantics.content.default,\n placeholderColor: theme.semantics.content.muted,\n };\n }\n\n return {\n backgroundColor: theme.semantics.surface.default,\n borderColor: theme.semantics.border.default,\n contentColor: theme.semantics.content.default,\n placeholderColor: theme.semantics.content.muted,\n };\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SurfaceColor } from '../../surfaceColor';
|
|
2
|
-
import type { SurfaceTheme } from '../../theme
|
|
1
|
+
import type { SurfaceColor } from '../../types/surfaceColor';
|
|
2
|
+
import type { SurfaceTheme } from '../../types/theme';
|
|
3
3
|
import type { FieldState } from './resolveFieldState';
|
|
4
4
|
export interface ResolvedSelectionControlColors {
|
|
5
5
|
backgroundColor: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveSelectionControlColors.d.ts","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveSelectionControlColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"resolveSelectionControlColors.d.ts","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveSelectionControlColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,MAAM,WAAW,8BAA8B;IAC7C,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,YAAY,EACnB,EACE,KAAiB,EACjB,UAAU,EACV,OAAO,EACP,OAAe,EACf,OAAe,GAChB,EAAE;IACD,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GACA,8BAA8B,CA4DhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveSelectionControlColors.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveSelectionControlColors.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAY5D,MAAM,UAAU,6BAA6B,CAC3C,KAAmB,EACnB,EACE,KAAK,GAAG,SAAS,EACjB,UAAU,EACV,OAAO,EACP,OAAO,GAAG,KAAK,EACf,OAAO,GAAG,KAAK,GAOhB;IAED,MAAM,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E,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KAC1C,CAAC;AACJ,CAAC","sourcesContent":["import type { SurfaceColor } from '../../surfaceColor';\nimport type { SurfaceTheme } from '../../theme
|
|
1
|
+
{"version":3,"file":"resolveSelectionControlColors.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveSelectionControlColors.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAY5D,MAAM,UAAU,6BAA6B,CAC3C,KAAmB,EACnB,EACE,KAAK,GAAG,SAAS,EACjB,UAAU,EACV,OAAO,EACP,OAAO,GAAG,KAAK,EACf,OAAO,GAAG,KAAK,GAOhB;IAED,MAAM,YAAY,GAAG,mBAAmB,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACtF,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC;IACpC,MAAM,qBAAqB,GAAG,UAAU,CAAC,QAAQ,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;IAE1E,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO;YACL,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ;YACjD,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM;YAC1C,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa;YAC1E,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ;YAC5C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ;YAC5C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO;SAC5C,CAAC;IACJ,CAAC;IAED,MAAM,oBAAoB,GAAG,UAAU,CAA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AC/B,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK;YAC/B,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO;QACnC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,oBAAoB;QAC9D,UAAU,EAAE,OAAO;YACjB,CAAC,CAAC,OAAO;gBACP,CAAC,CAAC,YAAY,CAAC,YAAY;gBAC3B,CAAC,CAAC,OAAO;oBACP,CAAC,CAAC,YAAY,CAAC,WAAW;oBAC1B,CAAC,CAAC,YAAY,CAAC,WAAW;YAC9B,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO;QACnC,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KAC1C,CAAC;AACJ,CAAC","sourcesContent":["import type { SurfaceColor } from '../../types/surfaceColor';\nimport type { SurfaceTheme } from '../../types/theme';\nimport type { FieldState } from './resolveFieldState';\nimport { resolveSurfaceColor } from './resolveSurfaceColor';\n\nexport interface ResolvedSelectionControlColors {\n backgroundColor: string;\n borderColor: string;\n indicatorColor: string;\n labelColor: string;\n trackColor: string;\n thumbColor: string;\n opacity?: number;\n}\n\nexport function resolveSelectionControlColors(\n theme: SurfaceTheme,\n {\n color = 'primary',\n fieldState,\n checked,\n hovered = false,\n pressed = false,\n }: {\n color?: SurfaceColor;\n fieldState: FieldState;\n checked: boolean;\n hovered?: boolean;\n pressed?: boolean;\n },\n): ResolvedSelectionControlColors {\n const semanticTone = resolveSurfaceColor(theme, fieldState.invalid ? 'error' : color);\n const isMuted = fieldState.disabled;\n const isInteractiveReadOnly = fieldState.readOnly && !fieldState.disabled;\n\n if (isMuted) {\n return {\n backgroundColor: theme.semantics.surface.disabled,\n borderColor: theme.semantics.border.subtle,\n indicatorColor: checked ? theme.semantics.content.disabled : 'transparent',\n labelColor: theme.semantics.content.disabled,\n trackColor: theme.semantics.surface.disabled,\n thumbColor: theme.semantics.surface.default,\n };\n }\n\n const uncheckedBorderColor = fieldState.invalid\n ? theme.semantics.error.outline\n : fieldState.focused\n ? theme.semantics.border.focus\n : theme.semantics.border.strong;\n const uncheckedBackgroundColor = pressed\n ? theme.semantics.neutral.surfaceActive\n : hovered\n ? theme.semantics.neutral.surfaceHover\n : theme.semantics.surface.default;\n const checkedBackgroundColor = pressed\n ? semanticTone.strong\n : hovered\n ? semanticTone.hover\n : semanticTone.base;\n const checkedTrackColor = pressed\n ? semanticTone.strong\n : hovered\n ? semanticTone.hover\n : semanticTone.base;\n\n return {\n backgroundColor: checked ? checkedBackgroundColor : uncheckedBackgroundColor,\n borderColor: checked ? semanticTone.base : uncheckedBorderColor,\n indicatorColor: checked\n ? pressed\n ? semanticTone.onStrongText\n : hovered\n ? semanticTone.onHoverText\n : semanticTone.onSolidText\n : 'transparent',\n labelColor: isInteractiveReadOnly\n ? theme.semantics.content.muted\n : theme.semantics.content.default,\n trackColor: checked ? checkedTrackColor : uncheckedBorderColor,\n thumbColor: checked\n ? pressed\n ? semanticTone.onStrongText\n : hovered\n ? semanticTone.onHoverText\n : semanticTone.onSolidText\n : theme.semantics.surface.default,\n opacity: isInteractiveReadOnly ? 0.88 : 1,\n };\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SurfaceColor } from '../../surfaceColor';
|
|
2
|
-
import type { RoleSemantics, SurfaceTheme } from '../../theme
|
|
1
|
+
import type { SurfaceColor } from '../../types/surfaceColor';
|
|
2
|
+
import type { RoleSemantics, SurfaceTheme } from '../../types/theme';
|
|
3
3
|
export declare function resolveSurfaceColor(theme: SurfaceTheme, color?: SurfaceColor): RoleSemantics;
|
|
4
4
|
//# sourceMappingURL=resolveSurfaceColor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveSurfaceColor.d.ts","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveSurfaceColor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"resolveSurfaceColor.d.ts","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveSurfaceColor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAErE,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,YAAY,EACnB,KAAK,GAAE,YAAwB,GAC9B,aAAa,CAwBf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveSurfaceColor.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveSurfaceColor.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,mBAAmB,CACjC,KAAmB,EACnB,QAAsB,SAAS;IAE/B,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,WAAW;YACd,OAAO,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;QACnC,KAAK,UAAU;YACb,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;QAChC,KAAK,YAAY;YACf,OAAO,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;QACnC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;QACxC,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC;QAC/B,KAAK,MAAM;YACT,OAAO,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;QAC9B,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;QACvC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;QACjC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;QACjC,KAAK,SAAS,CAAC;QACf;YACE,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IAC1C,CAAC;AACH,CAAC","sourcesContent":["import type { SurfaceColor } from '../../surfaceColor';\nimport type { RoleSemantics, SurfaceTheme } from '../../theme
|
|
1
|
+
{"version":3,"file":"resolveSurfaceColor.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveSurfaceColor.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,mBAAmB,CACjC,KAAmB,EACnB,QAAsB,SAAS;IAE/B,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,WAAW;YACd,OAAO,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;QACnC,KAAK,UAAU;YACb,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;QAChC,KAAK,YAAY;YACf,OAAO,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;QACnC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;QACxC,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC;QAC/B,KAAK,MAAM;YACT,OAAO,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;QAC9B,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;QACvC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;QACjC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;QACjC,KAAK,SAAS,CAAC;QACf;YACE,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IAC1C,CAAC;AACH,CAAC","sourcesContent":["import type { SurfaceColor } from '../../types/surfaceColor';\nimport type { RoleSemantics, SurfaceTheme } from '../../types/theme';\n\nexport function resolveSurfaceColor(\n theme: SurfaceTheme,\n color: SurfaceColor = 'primary',\n): RoleSemantics {\n switch (color) {\n case 'secondary':\n return theme.semantics.secondary;\n case 'tertiary':\n return theme.semantics.accent;\n case 'quaternary':\n return theme.semantics.highlight;\n case 'neutral':\n return theme.semantics.action.neutral;\n case 'error':\n return theme.semantics.error;\n case 'info':\n return theme.semantics.info;\n case 'danger':\n return theme.semantics.action.danger;\n case 'success':\n return theme.semantics.success;\n case 'warning':\n return theme.semantics.warning;\n case 'primary':\n default:\n return theme.semantics.action.primary;\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SurfaceColor, SurfaceEmphasis } from '../../surfaceColor';
|
|
2
|
-
import type { SurfaceTheme } from '../../theme
|
|
1
|
+
import type { SurfaceColor, SurfaceEmphasis } from '../../types/surfaceColor';
|
|
2
|
+
import type { SurfaceTheme } from '../../types/theme';
|
|
3
3
|
export declare function resolveTextColor(theme: SurfaceTheme, emphasis?: SurfaceEmphasis, color?: SurfaceColor): string;
|
|
4
4
|
//# sourceMappingURL=resolveTextColor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveTextColor.d.ts","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveTextColor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"resolveTextColor.d.ts","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveTextColor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,YAAY,EACnB,QAAQ,GAAE,eAA2B,EACrC,KAAK,CAAC,EAAE,YAAY,GACnB,MAAM,CAmBR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveTextColor.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveTextColor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,gBAAgB,CAC9B,KAAmB,EACnB,WAA4B,SAAS,EACrC,KAAoB;IAEpB,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,WAAW,CAAC;QACvD,CAAC;QAED,OAAO,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC;IAChD,CAAC;IAED,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;QACvC,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC;QACxC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;QACzC;YACE,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;IAC3C,CAAC;AACH,CAAC","sourcesContent":["import type { SurfaceColor, SurfaceEmphasis } from '../../surfaceColor';\nimport type { SurfaceTheme } from '../../theme
|
|
1
|
+
{"version":3,"file":"resolveTextColor.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveTextColor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,gBAAgB,CAC9B,KAAmB,EACnB,WAA4B,SAAS,EACrC,KAAoB;IAEpB,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,WAAW,CAAC;QACvD,CAAC;QAED,OAAO,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC;IAChD,CAAC;IAED,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;QACvC,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC;QACxC,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;QACzC;YACE,OAAO,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;IAC3C,CAAC;AACH,CAAC","sourcesContent":["import type { SurfaceColor, SurfaceEmphasis } from '../../types/surfaceColor';\nimport type { SurfaceTheme } from '../../types/theme';\nimport { resolveSurfaceColor } from './resolveSurfaceColor';\n\nexport function resolveTextColor(\n theme: SurfaceTheme,\n emphasis: SurfaceEmphasis = 'default',\n color?: SurfaceColor,\n): string {\n if (color) {\n if (emphasis === 'inverse') {\n return resolveSurfaceColor(theme, color).onSolidText;\n }\n\n return resolveSurfaceColor(theme, color).base;\n }\n\n switch (emphasis) {\n case 'muted':\n return theme.semantics.content.muted;\n case 'subtle':\n return theme.semantics.content.subtle;\n case 'inverse':\n return theme.semantics.content.inverse;\n default:\n return theme.semantics.content.default;\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TextStyle } from 'react-native';
|
|
2
|
-
import type { FontWeight, SurfaceTheme } from '../../theme
|
|
2
|
+
import type { FontWeight, SurfaceTheme } from '../../types/theme';
|
|
3
3
|
export type TextVariant = 'body' | 'bodySmall' | 'caption' | 'label' | 'mono';
|
|
4
4
|
export type TextWeight = keyof SurfaceTheme['typography']['weights'] | FontWeight;
|
|
5
5
|
export interface ResolveTextStyleOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveTextStyles.js","sourceRoot":"","sources":["../../../src/internal/resolvers/resolveTextStyles.ts"],"names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EACnB,UAAmC,EAAE;IAErC,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IAC3E,MAAM,iBAAiB,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1E,MAAM,YAAY,GAAG,iBAAiB;QACpC,CAAC,CAAC;YACE,QAAQ,EAAE,iBAAiB,CAAC,IAAI;YAChC,UAAU,EAAE,iBAAiB,CAAC,UAAU;YACxC,MAAM,EAAE,iBAAiB,CAAC,MAAM;SACjC;QACH,CAAC,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAEpC,MAAM,cAAc,GAAG,aAAa,CAAC,KAAK,EAAE,MAAM,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3E,MAAM,MAAM,GAAG,CAAC,KAAK,IAAI,OAAO,KAAK,MAAM,CAAC;IAC5C,MAAM,UAAU,GAAG,MAAM;QACvB,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,cAAc,CAAC,CAAC;IAEzE,OAAO;QACL,QAAQ,EAAE,YAAY,CAAC,QAAQ;QAC/B,UAAU,EAAE,YAAY,CAAC,UAAU;QACnC,UAAU,EAAE,cAAc;QAC1B,UAAU;QACV,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;QACvC,SAAS,EAAE,KAAK;QAChB,SAAS,EAAE,CAAC;KACb,CAAC;AACJ,CAAC","sourcesContent":["import type { TextStyle } from 'react-native';\n\nimport type { FontWeight, SurfaceTheme } from '../../theme
|
|
1
|
+
{"version":3,"file":"resolveTextStyles.js","source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../types/theme';\n\nexport type TextVariant = 'body' | 'bodySmall' | 'caption' | 'label' | 'mono';\nexport type TextWeight = keyof SurfaceTheme['typography']['weights'] | FontWeight;\n\ninterface VariantStyle {\n fontSize: number;\n lineHeight: number;\n weight: TextWeight;\n}\n\nexport interface ResolveTextStyleOptions {\n variant?: TextVariant;\n align?: TextStyle['textAlign'];\n weight?: TextWeight;\n italic?: boolean;\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\nfunction resolveWeight(theme: SurfaceTheme, value: TextWeight | undefined): FontWeight {\n if (!value) return theme.typography.weights.regular;\n if (value in theme.typography.weights) {\n return theme.typography.weights[value as keyof SurfaceTheme['typography']['weights']];\n }\n return value as FontWeight;\n}\n\nfunction getVariantStyle(theme: SurfaceTheme, variant: TextVariant): VariantStyle {\n switch (variant) {\n case 'bodySmall':\n return {\n fontSize: theme.typography.sizes.s,\n lineHeight: 20,\n weight: 'regular',\n };\n case 'caption':\n return {\n fontSize: theme.typography.sizes.xs,\n lineHeight: 16,\n weight: 'regular',\n };\n case 'label':\n return {\n fontSize: theme.typography.sizes.s,\n lineHeight: 18,\n weight: 'medium',\n };\n case 'mono':\n return {\n fontSize: theme.typography.sizes.s,\n lineHeight: 20,\n weight: 'regular',\n };\n case 'body':\n default:\n return {\n fontSize: theme.typography.sizes.m,\n lineHeight: 24,\n weight: 'regular',\n };\n }\n}\n\nexport function resolveTextStyles(\n theme: SurfaceTheme,\n options: ResolveTextStyleOptions = {},\n): TextStyle {\n const { level, variant = 'body', align, weight, italic = false } = options;\n const headingTypography = level ? theme.typography.headings[level] : null;\n const variantStyle = headingTypography\n ? {\n fontSize: headingTypography.size,\n lineHeight: headingTypography.lineHeight,\n weight: headingTypography.weight,\n }\n : getVariantStyle(theme, variant);\n\n const resolvedWeight = resolveWeight(theme, weight ?? variantStyle.weight);\n const isMono = !level && variant === 'mono';\n const fontFamily = isMono\n ? 'monospace'\n : theme.typography.fonts[italic ? 'italic' : 'normal'][resolvedWeight];\n\n return {\n fontSize: variantStyle.fontSize,\n lineHeight: variantStyle.lineHeight,\n fontWeight: resolvedWeight,\n fontFamily,\n fontStyle: italic ? 'italic' : 'normal',\n textAlign: align,\n elevation: 0,\n };\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { PressableProps, ViewProps } from 'react-native';
|
|
3
|
-
import type { InteractionPolicy, InteractionPolicyProps } from '
|
|
3
|
+
import type { InteractionPolicy, InteractionPolicyProps } from './interactionPolicy';
|
|
4
4
|
export type AccordionMode = 'single' | 'multiple';
|
|
5
5
|
interface AccordionBaseProps extends Omit<ViewProps, 'children'>, InteractionPolicyProps {
|
|
6
6
|
children?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/types/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/types/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAErF,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;AAElD,UAAU,kBAAmB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,sBAAsB;IACtF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,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Q,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/types/accordion.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\nimport type { PressableProps, ViewProps } from 'react-native';\n\nimport type { InteractionPolicy, InteractionPolicyProps } from '
|
|
1
|
+
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/types/accordion.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\nimport type { PressableProps, ViewProps } from 'react-native';\n\nimport type { InteractionPolicy, InteractionPolicyProps } from './interactionPolicy';\n\nexport type AccordionMode = 'single' | 'multiple';\n\ninterface AccordionBaseProps extends Omit<ViewProps, 'children'>, InteractionPolicyProps {\n children?: React.ReactNode;\n disabled?: boolean;\n}\n\nexport interface AccordionSingleProps extends AccordionBaseProps {\n type?: 'single';\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string | undefined) => void;\n collapsible?: boolean;\n}\n\nexport interface AccordionMultipleProps extends AccordionBaseProps {\n type: 'multiple';\n value?: readonly string[];\n defaultValue?: readonly string[];\n onValueChange?: (value: readonly string[]) => void;\n collapsible?: never;\n}\n\nexport type AccordionProps = AccordionSingleProps | AccordionMultipleProps;\n\nexport interface AccordionItemProps extends Omit<ViewProps, 'children'>, InteractionPolicyProps {\n value: string;\n children?: React.ReactNode;\n disabled?: boolean;\n}\n\nexport interface AccordionTriggerProps\n extends\n Omit<\n PressableProps,\n 'accessibilityRole' | 'accessibilityState' | 'children' | 'disabled' | 'onPress'\n >,\n InteractionPolicyProps {\n children?: PressableProps['children'];\n disabled?: boolean;\n}\n\nexport interface AccordionContentProps extends Omit<ViewProps, 'children'> {\n children?: React.ReactNode;\n forceMount?: boolean;\n}\n\nexport interface AccordionContextValue {\n disabled: boolean;\n interactionPolicy: InteractionPolicy;\n mode: AccordionMode;\n openValues: readonly string[];\n toggleValue: (value: string) => void;\n}\n\nexport interface AccordionItemContextValue {\n contentId: string;\n disabled: boolean;\n interactionPolicy: InteractionPolicy;\n open: boolean;\n toggle: () => void;\n triggerId: string;\n value: string;\n}\n"]}
|
package/dist/types/badge.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { ControlSize } from '../internal/resolvers/resolveControlSize';
|
|
3
3
|
import type { ButtonVariant } from '../internal/resolvers/resolveInteractiveColors';
|
|
4
|
-
import type { SurfaceColor } from '
|
|
4
|
+
import type { SurfaceColor } from './surfaceColor';
|
|
5
5
|
export interface BadgeProps {
|
|
6
6
|
content?: React.ReactNode;
|
|
7
7
|
variant?: Extract<ButtonVariant, 'solid' | 'soft' | 'outline'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/types/badge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/types/badge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/D,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/dist/types/badge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/types/badge.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ControlSize } from '../internal/resolvers/resolveControlSize';\nimport type { ButtonVariant } from '../internal/resolvers/resolveInteractiveColors';\nimport type { SurfaceColor } from '
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/types/badge.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ControlSize } from '../internal/resolvers/resolveControlSize';\nimport type { ButtonVariant } from '../internal/resolvers/resolveInteractiveColors';\nimport type { SurfaceColor } from './surfaceColor';\n\nexport interface BadgeProps {\n content?: React.ReactNode;\n variant?: Extract<ButtonVariant, 'solid' | 'soft' | 'outline'>;\n color?: SurfaceColor;\n size?: ControlSize;\n testID?: string;\n}\n"]}
|
package/dist/types/button.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { ControlSize } from '../internal/resolvers/resolveControlSize';
|
|
3
3
|
import type { ButtonVariant } from '../internal/resolvers/resolveInteractiveColors';
|
|
4
|
-
import type { ButtonBaseProps } from '../primitives/button-base';
|
|
5
|
-
import type { SurfaceColor } from '../surfaceColor';
|
|
6
4
|
import type { IconSource } from './icon';
|
|
5
|
+
import type { PressableProps } from './pressable';
|
|
6
|
+
import type { SurfaceColor } from './surfaceColor';
|
|
7
7
|
export type ButtonIconSpec = IconSource;
|
|
8
|
-
export interface ButtonProps extends Omit<
|
|
8
|
+
export interface ButtonProps extends Omit<PressableProps, 'accessibilityLabel' | 'children' | 'style'> {
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
variant?: ButtonVariant;
|
|
11
11
|
color?: SurfaceColor;
|
|
@@ -15,7 +15,7 @@ export interface ButtonProps extends Omit<ButtonBaseProps, 'accessibilityLabel'
|
|
|
15
15
|
trailingIcon?: ButtonIconSpec;
|
|
16
16
|
fullWidth?: boolean;
|
|
17
17
|
}
|
|
18
|
-
export interface IconButtonProps extends Omit<
|
|
18
|
+
export interface IconButtonProps extends Omit<PressableProps, 'children' | 'style' | 'accessibilityLabel'> {
|
|
19
19
|
icon: IconSource;
|
|
20
20
|
accessibilityLabel: string;
|
|
21
21
|
variant?: ButtonVariant;
|