@platform-blocks/ui 0.1.1
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/LICENSE +21 -0
- package/README.md +44 -0
- package/lib/cjs/index.js +35531 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/components/Accessibility/AccessibilityDemo.d.ts +5 -0
- package/lib/components/Accessibility/AccessibilityHelpers.d.ts +49 -0
- package/lib/components/Accessibility/AccessibilityTesting.d.ts +24 -0
- package/lib/components/Accessibility/AccessibleComponents.d.ts +20 -0
- package/lib/components/Accessibility/index.d.ts +2 -0
- package/lib/components/Accordion/Accordion.d.ts +9 -0
- package/lib/components/Accordion/AccordionItem.d.ts +23 -0
- package/lib/components/Accordion/defaults.d.ts +13 -0
- package/lib/components/Accordion/hooks/useAccordionItemAnimation.d.ts +17 -0
- package/lib/components/Accordion/hooks/useMeasuredHeight.d.ts +8 -0
- package/lib/components/Accordion/index.d.ts +5 -0
- package/lib/components/Accordion/styles.d.ts +17 -0
- package/lib/components/Accordion/tokens.d.ts +12 -0
- package/lib/components/Accordion/types.d.ts +180 -0
- package/lib/components/Alert/Alert.d.ts +2 -0
- package/lib/components/Alert/index.d.ts +2 -0
- package/lib/components/Alert/types.d.ts +25 -0
- package/lib/components/AppShell/AppShell.d.ts +48 -0
- package/lib/components/AppShell/BottomAppBar.d.ts +3 -0
- package/lib/components/AppShell/MobileMenu.d.ts +10 -0
- package/lib/components/AppShell/StatusBarManager.d.ts +7 -0
- package/lib/components/AppShell/app-layout/AppLayoutProvider.d.ts +8 -0
- package/lib/components/AppShell/app-layout/AppLayoutRenderer.d.ts +5 -0
- package/lib/components/AppShell/app-layout/context.d.ts +4 -0
- package/lib/components/AppShell/app-layout/defineAppLayout.d.ts +2 -0
- package/lib/components/AppShell/app-layout/index.d.ts +5 -0
- package/lib/components/AppShell/app-layout/types.d.ts +120 -0
- package/lib/components/AppShell/context.d.ts +44 -0
- package/lib/components/AppShell/defaults.d.ts +6 -0
- package/lib/components/AppShell/hooks/useBreakpoint.d.ts +9 -0
- package/lib/components/AppShell/hooks/useResponsiveValue.d.ts +2 -0
- package/lib/components/AppShell/index.d.ts +12 -0
- package/lib/components/AppShell/meta.schema.d.ts +14 -0
- package/lib/components/AppShell/types.d.ts +228 -0
- package/lib/components/AppStoreBadge/AppStoreBadge.d.ts +5 -0
- package/lib/components/AppStoreBadge/ConvenienceComponents.d.ts +88 -0
- package/lib/components/AppStoreBadge/examples/usage-examples.d.ts +4 -0
- package/lib/components/AppStoreBadge/index.d.ts +3 -0
- package/lib/components/AppStoreBadge/types.d.ts +36 -0
- package/lib/components/AppStoreButton/AppStoreButton.d.ts +5 -0
- package/lib/components/AppStoreButton/ConvenienceComponents.d.ts +8 -0
- package/lib/components/AppStoreButton/index.d.ts +3 -0
- package/lib/components/AppStoreButton/types.d.ts +36 -0
- package/lib/components/AudioPlayer/AudioPlayer.d.ts +3 -0
- package/lib/components/AudioPlayer/AudioPlayerDemo.d.ts +2 -0
- package/lib/components/AudioPlayer/index.d.ts +2 -0
- package/lib/components/AudioPlayer/types.d.ts +232 -0
- package/lib/components/AutoComplete/AutoComplete.d.ts +6 -0
- package/lib/components/AutoComplete/index.d.ts +2 -0
- package/lib/components/AutoComplete/types.d.ts +120 -0
- package/lib/components/Avatar/Avatar.d.ts +3 -0
- package/lib/components/Avatar/AvatarGroup.d.ts +3 -0
- package/lib/components/Avatar/index.d.ts +3 -0
- package/lib/components/Avatar/types.d.ts +30 -0
- package/lib/components/Badge/Badge.d.ts +4 -0
- package/lib/components/Badge/index.d.ts +3 -0
- package/lib/components/Badge/types.d.ts +26 -0
- package/lib/components/Block/Block.d.ts +36 -0
- package/lib/components/Block/index.d.ts +2 -0
- package/lib/components/Block/types.d.ts +102 -0
- package/lib/components/Block/utils.d.ts +28 -0
- package/lib/components/Blockquote/Blockquote.d.ts +3 -0
- package/lib/components/Blockquote/BlockquoteAttribution.d.ts +3 -0
- package/lib/components/Blockquote/BlockquoteAuthor.d.ts +3 -0
- package/lib/components/Blockquote/BlockquoteMeta.d.ts +3 -0
- package/lib/components/Blockquote/BlockquoteSource.d.ts +3 -0
- package/lib/components/Blockquote/index.d.ts +6 -0
- package/lib/components/Blockquote/styles.d.ts +80 -0
- package/lib/components/Blockquote/types.d.ts +74 -0
- package/lib/components/BrandButton/BrandButton.d.ts +3 -0
- package/lib/components/BrandButton/index.d.ts +2 -0
- package/lib/components/BrandButton/types.d.ts +23 -0
- package/lib/components/BrandIcon/BrandIcon.d.ts +27 -0
- package/lib/components/BrandIcon/brands.d.ts +520 -0
- package/lib/components/BrandIcon/index.d.ts +2 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -0
- package/lib/components/Breadcrumbs/index.d.ts +2 -0
- package/lib/components/Breadcrumbs/types.d.ts +35 -0
- package/lib/components/Button/Button.d.ts +3 -0
- package/lib/components/Button/SoundButton.d.ts +22 -0
- package/lib/components/Button/defaults.d.ts +7 -0
- package/lib/components/Button/index.d.ts +2 -0
- package/lib/components/Button/styles/resolver.d.ts +7 -0
- package/lib/components/Button/tokens.d.ts +16 -0
- package/lib/components/Button/types.d.ts +67 -0
- package/lib/components/Calendar/Calendar.d.ts +3 -0
- package/lib/components/Calendar/Day.d.ts +3 -0
- package/lib/components/Calendar/Month.d.ts +3 -0
- package/lib/components/Calendar/MonthPicker.d.ts +2 -0
- package/lib/components/Calendar/YearPicker.d.ts +2 -0
- package/lib/components/Calendar/index.d.ts +8 -0
- package/lib/components/Calendar/types.d.ts +92 -0
- package/lib/components/Calendar/utils.d.ts +31 -0
- package/lib/components/Can/Can.d.ts +30 -0
- package/lib/components/Can/PermissionDemo.d.ts +2 -0
- package/lib/components/Can/ability.d.ts +89 -0
- package/lib/components/Can/builder.d.ts +113 -0
- package/lib/components/Can/context.d.ts +25 -0
- package/lib/components/Can/index.d.ts +6 -0
- package/lib/components/Can/types.d.ts +228 -0
- package/lib/components/Card/Card.d.ts +3 -0
- package/lib/components/Card/index.d.ts +2 -0
- package/lib/components/Card/types.d.ts +15 -0
- package/lib/components/Carousel/Carousel.d.ts +4 -0
- package/lib/components/Carousel/index.d.ts +2 -0
- package/lib/components/Carousel/styles.d.ts +21 -0
- package/lib/components/Carousel/types.d.ts +51 -0
- package/lib/components/Checkbox/Checkbox.d.ts +4 -0
- package/lib/components/Checkbox/index.d.ts +2 -0
- package/lib/components/Checkbox/styles.d.ts +71 -0
- package/lib/components/Checkbox/types.d.ts +52 -0
- package/lib/components/Chip/Chip.d.ts +4 -0
- package/lib/components/Chip/index.d.ts +3 -0
- package/lib/components/Chip/types.d.ts +22 -0
- package/lib/components/CodeBlock/CodeBlock.d.ts +16 -0
- package/lib/components/CodeBlock/index.d.ts +3 -0
- package/lib/components/CodeBlock/type.d.ts +40 -0
- package/lib/components/CodeBlock/types.d.ts +44 -0
- package/lib/components/CodeBlock/utils.d.ts +38 -0
- package/lib/components/ColorPicker/ColorPicker.d.ts +8 -0
- package/lib/components/ColorPicker/index.d.ts +2 -0
- package/lib/components/ColorPicker/styles.d.ts +35 -0
- package/lib/components/ColorPicker/types.d.ts +69 -0
- package/lib/components/ColorPicker/utils.d.ts +8 -0
- package/lib/components/ColorSwatch/ColorSwatch.d.ts +6 -0
- package/lib/components/ColorSwatch/index.d.ts +2 -0
- package/lib/components/ColorSwatch/types.d.ts +29 -0
- package/lib/components/Container/Container.d.ts +3 -0
- package/lib/components/Container/index.d.ts +2 -0
- package/lib/components/Container/types.d.ts +31 -0
- package/lib/components/ContextMenu/ContextMenu.d.ts +5 -0
- package/lib/components/ContextMenu/index.d.ts +2 -0
- package/lib/components/ContextMenu/types.d.ts +36 -0
- package/lib/components/CopyButton/CopyButton.d.ts +10 -0
- package/lib/components/CopyButton/index.d.ts +2 -0
- package/lib/components/CopyButton/types.d.ts +37 -0
- package/lib/components/DataTable/AdvancedFilterControl.d.ts +10 -0
- package/lib/components/DataTable/ColumnSettings.d.ts +16 -0
- package/lib/components/DataTable/DataTable.d.ts +5 -0
- package/lib/components/DataTable/hooks/useColumnSettings.d.ts +12 -0
- package/lib/components/DataTable/hooks/useDataTableState.d.ts +41 -0
- package/lib/components/DataTable/hooks/useRowSelection.d.ts +40 -0
- package/lib/components/DataTable/index.d.ts +1 -0
- package/lib/components/DataTable/types.d.ts +223 -0
- package/lib/components/DatePicker/DatePicker.d.ts +4 -0
- package/lib/components/DatePicker/index.d.ts +8 -0
- package/lib/components/DatePicker/types.d.ts +47 -0
- package/lib/components/DatePicker/utils.d.ts +30 -0
- package/lib/components/DatePickerInput/DatePickerInput.d.ts +4 -0
- package/lib/components/DatePickerInput/index.d.ts +2 -0
- package/lib/components/DatePickerInput/types.d.ts +41 -0
- package/lib/components/Dialog/Dialog.d.ts +3 -0
- package/lib/components/Dialog/DialogContext.d.ts +11 -0
- package/lib/components/Dialog/DialogRenderer.d.ts +2 -0
- package/lib/components/Dialog/hooks/useSimpleDialog.d.ts +25 -0
- package/lib/components/Dialog/index.d.ts +6 -0
- package/lib/components/Dialog/types.d.ts +35 -0
- package/lib/components/Disclaimer/Disclaimer.d.ts +11 -0
- package/lib/components/Disclaimer/disclaimerUtils.d.ts +21 -0
- package/lib/components/Disclaimer/index.d.ts +6 -0
- package/lib/components/Disclaimer/withDisclaimer.d.ts +13 -0
- package/lib/components/Divider/Divider.d.ts +2 -0
- package/lib/components/Divider/index.d.ts +2 -0
- package/lib/components/Divider/types.d.ts +22 -0
- package/lib/components/EmojiPicker/EmojiPicker.d.ts +6 -0
- package/lib/components/EmojiPicker/index.d.ts +2 -0
- package/lib/components/EmojiPicker/types.d.ts +29 -0
- package/lib/components/FileInput/FileInput.d.ts +3 -0
- package/lib/components/FileInput/index.d.ts +2 -0
- package/lib/components/FileInput/types.d.ts +82 -0
- package/lib/components/Flex/Flex.d.ts +38 -0
- package/lib/components/Flex/helpers.d.ts +13 -0
- package/lib/components/Flex/index.d.ts +2 -0
- package/lib/components/FloatingActions/FloatingActions.d.ts +29 -0
- package/lib/components/FloatingActions/index.d.ts +2 -0
- package/lib/components/Form/FormBase.d.ts +3 -0
- package/lib/components/Form/FormContext.d.ts +16 -0
- package/lib/components/Form/FormError.d.ts +3 -0
- package/lib/components/Form/FormField.d.ts +3 -0
- package/lib/components/Form/FormInput.d.ts +3 -0
- package/lib/components/Form/FormLabel.d.ts +3 -0
- package/lib/components/Form/FormSubmit.d.ts +3 -0
- package/lib/components/Form/OptimizedForm.d.ts +22 -0
- package/lib/components/Form/index.d.ts +9 -0
- package/lib/components/Form/types.d.ts +104 -0
- package/lib/components/FormLayout/FormField.d.ts +3 -0
- package/lib/components/FormLayout/FormGroup.d.ts +3 -0
- package/lib/components/FormLayout/FormLayout.d.ts +3 -0
- package/lib/components/FormLayout/FormSection.d.ts +3 -0
- package/lib/components/FormLayout/index.d.ts +5 -0
- package/lib/components/FormLayout/types.d.ts +31 -0
- package/lib/components/Forms/ContactForm.d.ts +3 -0
- package/lib/components/Forms/ForgotPasswordForm.d.ts +3 -0
- package/lib/components/Forms/LoginForm.d.ts +3 -0
- package/lib/components/Forms/SignupForm.d.ts +3 -0
- package/lib/components/Forms/index.d.ts +5 -0
- package/lib/components/Forms/types.d.ts +89 -0
- package/lib/components/Gallery/Gallery.d.ts +3 -0
- package/lib/components/Gallery/GalleryControls.d.ts +3 -0
- package/lib/components/Gallery/GalleryMetadata.d.ts +3 -0
- package/lib/components/Gallery/GalleryNew.d.ts +3 -0
- package/lib/components/Gallery/GalleryThumbnails.d.ts +3 -0
- package/lib/components/Gallery/index.d.ts +5 -0
- package/lib/components/Gallery/types.d.ts +68 -0
- package/lib/components/Gauge/Gauge.d.ts +41 -0
- package/lib/components/Gauge/index.d.ts +9 -0
- package/lib/components/Gauge/styles.d.ts +57 -0
- package/lib/components/Gauge/types.d.ts +210 -0
- package/lib/components/Gauge/utils.d.ts +72 -0
- package/lib/components/GradientText/GradientText.d.ts +46 -0
- package/lib/components/GradientText/index.d.ts +2 -0
- package/lib/components/GradientText/types.d.ts +39 -0
- package/lib/components/Grid/Grid.d.ts +11 -0
- package/lib/components/Grid/index.d.ts +2 -0
- package/lib/components/Grid/types.d.ts +32 -0
- package/lib/components/HoverCard/HoverCard.d.ts +2 -0
- package/lib/components/HoverCard/index.d.ts +2 -0
- package/lib/components/HoverCard/types.d.ts +53 -0
- package/lib/components/Icon/Icon.d.ts +6 -0
- package/lib/components/Icon/icons/actions.d.ts +2 -0
- package/lib/components/Icon/icons/data.d.ts +2 -0
- package/lib/components/Icon/icons/multimedia.d.ts +2 -0
- package/lib/components/Icon/icons/navigation.d.ts +2 -0
- package/lib/components/Icon/icons/platforms.d.ts +2 -0
- package/lib/components/Icon/icons/status.d.ts +2 -0
- package/lib/components/Icon/icons/ui.d.ts +2 -0
- package/lib/components/Icon/index.d.ts +2 -0
- package/lib/components/Icon/registry.d.ts +6 -0
- package/lib/components/Icon/types.d.ts +40 -0
- package/lib/components/IconButton/IconButton.d.ts +3 -0
- package/lib/components/IconButton/index.d.ts +2 -0
- package/lib/components/IconButton/types.d.ts +45 -0
- package/lib/components/Image/Image.d.ts +3 -0
- package/lib/components/Image/index.d.ts +2 -0
- package/lib/components/Image/types.d.ts +57 -0
- package/lib/components/Indicator/Indicator.d.ts +7 -0
- package/lib/components/Indicator/index.d.ts +2 -0
- package/lib/components/Indicator/types.d.ts +13 -0
- package/lib/components/Input/Input.d.ts +6 -0
- package/lib/components/Input/InputBase.d.ts +17 -0
- package/lib/components/Input/OptimizedInput.d.ts +19 -0
- package/lib/components/Input/PasswordInput.d.ts +3 -0
- package/lib/components/Input/index.d.ts +5 -0
- package/lib/components/Input/styles.d.ts +85 -0
- package/lib/components/Input/types.d.ts +120 -0
- package/lib/components/Input/validation/index.d.ts +14 -0
- package/lib/components/Input/validation/optimized.d.ts +33 -0
- package/lib/components/KeyCap/KeyCap.d.ts +6 -0
- package/lib/components/KeyCap/index.d.ts +3 -0
- package/lib/components/KeyCap/styles.d.ts +11 -0
- package/lib/components/KeyCap/types.d.ts +54 -0
- package/lib/components/Layout/Layout.d.ts +18 -0
- package/lib/components/Layout/index.d.ts +1 -0
- package/lib/components/Link/Link.d.ts +31 -0
- package/lib/components/Link/index.d.ts +2 -0
- package/lib/components/ListGroup/ListGroup.d.ts +19 -0
- package/lib/components/ListGroup/index.d.ts +2 -0
- package/lib/components/ListGroup/types.d.ts +26 -0
- package/lib/components/Loader/Loader.d.ts +8 -0
- package/lib/components/Loader/index.d.ts +2 -0
- package/lib/components/Loader/types.d.ts +18 -0
- package/lib/components/LoadingOverlay/LoadingOverlay.d.ts +3 -0
- package/lib/components/LoadingOverlay/index.d.ts +2 -0
- package/lib/components/LoadingOverlay/types.d.ts +16 -0
- package/lib/components/Lottie/Lottie.d.ts +30 -0
- package/lib/components/Lottie/index.d.ts +2 -0
- package/lib/components/Markdown/Markdown.d.ts +66 -0
- package/lib/components/Markdown/index.d.ts +1 -0
- package/lib/components/Masonry/Masonry.d.ts +7 -0
- package/lib/components/Masonry/index.d.ts +2 -0
- package/lib/components/Masonry/types.d.ts +39 -0
- package/lib/components/Menu/Menu.d.ts +29 -0
- package/lib/components/Menu/index.d.ts +2 -0
- package/lib/components/Menu/styles.d.ts +13 -0
- package/lib/components/Menu/types.d.ts +71 -0
- package/lib/components/MenuItemButton/MenuItemButton.d.ts +39 -0
- package/lib/components/MenuItemButton/index.d.ts +2 -0
- package/lib/components/MiniCalendar/MiniCalendar.d.ts +3 -0
- package/lib/components/MiniCalendar/index.d.ts +1 -0
- package/lib/components/MonthPicker/MonthPicker.d.ts +3 -0
- package/lib/components/MonthPicker/index.d.ts +2 -0
- package/lib/components/MonthPicker/types.d.ts +26 -0
- package/lib/components/MonthPickerInput/MonthPickerInput.d.ts +4 -0
- package/lib/components/MonthPickerInput/index.d.ts +2 -0
- package/lib/components/MonthPickerInput/types.d.ts +30 -0
- package/lib/components/Navigation/DrawerNavigator.d.ts +7 -0
- package/lib/components/Navigation/NavigationContainer.d.ts +11 -0
- package/lib/components/Navigation/NavigationContext.d.ts +11 -0
- package/lib/components/Navigation/Screen.d.ts +6 -0
- package/lib/components/Navigation/StackNavigator.d.ts +7 -0
- package/lib/components/Navigation/index.d.ts +6 -0
- package/lib/components/Navigation/types.d.ts +70 -0
- package/lib/components/NavigationProgress/NavigationProgress.d.ts +4 -0
- package/lib/components/NavigationProgress/defaults.d.ts +8 -0
- package/lib/components/NavigationProgress/hooks/useNavigationProgressState.d.ts +1 -0
- package/lib/components/NavigationProgress/index.d.ts +2 -0
- package/lib/components/NavigationProgress/styles/resolver.d.ts +1 -0
- package/lib/components/NavigationProgress/tokens.d.ts +4 -0
- package/lib/components/NavigationProgress/types.d.ts +30 -0
- package/lib/components/NumberInput/NumberInput.d.ts +5 -0
- package/lib/components/NumberInput/index.d.ts +2 -0
- package/lib/components/NumberInput/types.d.ts +76 -0
- package/lib/components/Overlay/Overlay.d.ts +4 -0
- package/lib/components/Overlay/index.d.ts +2 -0
- package/lib/components/Overlay/types.d.ts +27 -0
- package/lib/components/Pagination/Pagination.d.ts +6 -0
- package/lib/components/Pagination/index.d.ts +2 -0
- package/lib/components/Pagination/types.d.ts +58 -0
- package/lib/components/PhoneInput/PhoneInput.d.ts +3 -0
- package/lib/components/PhoneInput/index.d.ts +2 -0
- package/lib/components/PhoneInput/types.d.ts +27 -0
- package/lib/components/PinInput/PinInput.d.ts +6 -0
- package/lib/components/PinInput/index.d.ts +2 -0
- package/lib/components/PinInput/types.d.ts +41 -0
- package/lib/components/PressAnimation/PressAnimation.d.ts +29 -0
- package/lib/components/PressAnimation/index.d.ts +2 -0
- package/lib/components/Progress/Progress.d.ts +11 -0
- package/lib/components/Progress/index.d.ts +2 -0
- package/lib/components/Progress/types.d.ts +48 -0
- package/lib/components/QRCode/QRCode.d.ts +11 -0
- package/lib/components/QRCode/QRCodeSVG.d.ts +6 -0
- package/lib/components/QRCode/core/buildMatrix.d.ts +11 -0
- package/lib/components/QRCode/core/encoder.d.ts +12 -0
- package/lib/components/QRCode/core/mask.d.ts +2 -0
- package/lib/components/QRCode/core/mode.d.ts +6 -0
- package/lib/components/QRCode/core/reedSolomon.d.ts +1 -0
- package/lib/components/QRCode/core/tables.d.ts +24 -0
- package/lib/components/QRCode/index.d.ts +3 -0
- package/lib/components/QRCode/optimizations.d.ts +20 -0
- package/lib/components/QRCode/types.d.ts +76 -0
- package/lib/components/Radio/Radio.d.ts +10 -0
- package/lib/components/Radio/index.d.ts +2 -0
- package/lib/components/Radio/styles.d.ts +81 -0
- package/lib/components/Radio/types.d.ts +79 -0
- package/lib/components/Rating/Rating.d.ts +2 -0
- package/lib/components/Rating/index.d.ts +2 -0
- package/lib/components/Rating/types.d.ts +35 -0
- package/lib/components/Reveal/Reveal.d.ts +4 -0
- package/lib/components/Reveal/index.d.ts +2 -0
- package/lib/components/Reveal/types.d.ts +53 -0
- package/lib/components/RichTextEditor/RichTextEditor.d.ts +3 -0
- package/lib/components/RichTextEditor/index.d.ts +2 -0
- package/lib/components/RichTextEditor/styles.d.ts +61 -0
- package/lib/components/RichTextEditor/types.d.ts +150 -0
- package/lib/components/Search/Search.d.ts +6 -0
- package/lib/components/Search/index.d.ts +2 -0
- package/lib/components/Search/test-component.d.ts +3 -0
- package/lib/components/Search/types.d.ts +27 -0
- package/lib/components/SegmentedControl/SegmentedControl.d.ts +6 -0
- package/lib/components/SegmentedControl/index.d.ts +2 -0
- package/lib/components/SegmentedControl/types.d.ts +62 -0
- package/lib/components/Select/Select.d.ts +6 -0
- package/lib/components/Select/Select.types.d.ts +31 -0
- package/lib/components/Select/index.d.ts +2 -0
- package/lib/components/Select/types.d.ts +25 -0
- package/lib/components/ShimmerText/ShimmerText.d.ts +33 -0
- package/lib/components/ShimmerText/index.d.ts +2 -0
- package/lib/components/ShimmerText/types.d.ts +33 -0
- package/lib/components/Skeleton/Skeleton.d.ts +2 -0
- package/lib/components/Skeleton/index.d.ts +2 -0
- package/lib/components/Skeleton/types.d.ts +30 -0
- package/lib/components/Slider/Slider.d.ts +10 -0
- package/lib/components/Slider/SliderCore.d.ts +57 -0
- package/lib/components/Slider/index.d.ts +2 -0
- package/lib/components/Slider/types.d.ts +133 -0
- package/lib/components/Space/Space.d.ts +4 -0
- package/lib/components/Space/index.d.ts +2 -0
- package/lib/components/Space/types.d.ts +17 -0
- package/lib/components/Spoiler/Spoiler.d.ts +5 -0
- package/lib/components/Spoiler/index.d.ts +2 -0
- package/lib/components/Spoiler/types.d.ts +40 -0
- package/lib/components/Spotlight/DirectSpotlightState.d.ts +41 -0
- package/lib/components/Spotlight/Spotlight.d.ts +19 -0
- package/lib/components/Spotlight/SpotlightController.d.ts +13 -0
- package/lib/components/Spotlight/SpotlightStore.d.ts +32 -0
- package/lib/components/Spotlight/SpotlightTypes.d.ts +29 -0
- package/lib/components/Spotlight/index.d.ts +6 -0
- package/lib/components/Spotlight/types.d.ts +66 -0
- package/lib/components/Stepper/Stepper.d.ts +12 -0
- package/lib/components/Stepper/index.d.ts +2 -0
- package/lib/components/Stepper/types.d.ts +68 -0
- package/lib/components/Switch/Switch.d.ts +6 -0
- package/lib/components/Switch/index.d.ts +2 -0
- package/lib/components/Switch/styles.d.ts +85 -0
- package/lib/components/Switch/types.d.ts +54 -0
- package/lib/components/Table/Table.d.ts +115 -0
- package/lib/components/Table/index.d.ts +1 -0
- package/lib/components/TableOfContents/TableOfContents.d.ts +3 -0
- package/lib/components/TableOfContents/index.d.ts +2 -0
- package/lib/components/TableOfContents/types.d.ts +77 -0
- package/lib/components/Tabs/Tabs.d.ts +3 -0
- package/lib/components/Tabs/index.d.ts +2 -0
- package/lib/components/Tabs/types.d.ts +182 -0
- package/lib/components/Text/Text.d.ts +51 -0
- package/lib/components/Text/aliases.d.ts +22 -0
- package/lib/components/Text/index.d.ts +2 -0
- package/lib/components/TextArea/TextArea.d.ts +6 -0
- package/lib/components/TextArea/index.d.ts +2 -0
- package/lib/components/TextArea/meta/index.d.ts +97 -0
- package/lib/components/TextArea/styles.d.ts +95 -0
- package/lib/components/TextArea/types.d.ts +33 -0
- package/lib/components/TimePicker/TimePicker.d.ts +3 -0
- package/lib/components/TimePicker/index.d.ts +2 -0
- package/lib/components/TimePicker/types.d.ts +32 -0
- package/lib/components/TimePickerInput/index.d.ts +2 -0
- package/lib/components/Timeline/Timeline.d.ts +13 -0
- package/lib/components/Timeline/index.d.ts +2 -0
- package/lib/components/Timeline/types.d.ts +53 -0
- package/lib/components/Title/Title.d.ts +10 -0
- package/lib/components/Title/index.d.ts +2 -0
- package/lib/components/Title/types.d.ts +55 -0
- package/lib/components/Toast/Toast.d.ts +8 -0
- package/lib/components/Toast/ToastProvider.d.ts +88 -0
- package/lib/components/Toast/index.d.ts +3 -0
- package/lib/components/Toast/types.d.ts +78 -0
- package/lib/components/Toggle/Toggle.d.ts +10 -0
- package/lib/components/Toggle/ToggleBar.d.ts +42 -0
- package/lib/components/Toggle/index.d.ts +4 -0
- package/lib/components/Toggle/types.d.ts +68 -0
- package/lib/components/Tooltip/Tooltip.d.ts +2 -0
- package/lib/components/Tooltip/index.d.ts +2 -0
- package/lib/components/Tooltip/types.d.ts +44 -0
- package/lib/components/Tree/Tree.d.ts +5 -0
- package/lib/components/Tree/index.d.ts +2 -0
- package/lib/components/Tree/types.d.ts +65 -0
- package/lib/components/Video/NativeVideoPlayer.d.ts +33 -0
- package/lib/components/Video/Video.d.ts +3 -0
- package/lib/components/Video/VideoControls.d.ts +17 -0
- package/lib/components/Video/VideoTimeline.d.ts +12 -0
- package/lib/components/Video/YouTubePlayer.d.ts +44 -0
- package/lib/components/Video/index.d.ts +2 -0
- package/lib/components/Video/types.d.ts +145 -0
- package/lib/components/Waveform/Waveform.d.ts +3 -0
- package/lib/components/Waveform/WaveformSkeleton.d.ts +9 -0
- package/lib/components/Waveform/index.d.ts +4 -0
- package/lib/components/Waveform/styles.d.ts +53 -0
- package/lib/components/Waveform/types.d.ts +124 -0
- package/lib/components/Waveform/utils.d.ts +95 -0
- package/lib/components/YearPicker/YearPicker.d.ts +3 -0
- package/lib/components/YearPicker/index.d.ts +2 -0
- package/lib/components/YearPicker/types.d.ts +24 -0
- package/lib/components/YearPickerInput/YearPickerInput.d.ts +4 -0
- package/lib/components/YearPickerInput/index.d.ts +2 -0
- package/lib/components/YearPickerInput/types.d.ts +26 -0
- package/lib/components/_internal/FieldHeader.d.ts +21 -0
- package/lib/components/index.d.ts +164 -0
- package/lib/components/optimized.d.ts +74 -0
- package/lib/components/types.d.ts +57 -0
- package/lib/contexts/TitleRegistryContext.d.ts +20 -0
- package/lib/contexts/index.d.ts +1 -0
- package/lib/core/accessibility/advancedHooks.d.ts +82 -0
- package/lib/core/accessibility/constants.d.ts +85 -0
- package/lib/core/accessibility/context.d.ts +5 -0
- package/lib/core/accessibility/hooks.d.ts +33 -0
- package/lib/core/accessibility/index.d.ts +6 -0
- package/lib/core/accessibility/types.d.ts +35 -0
- package/lib/core/accessibility/utils.d.ts +56 -0
- package/lib/core/animations/index.d.ts +2 -0
- package/lib/core/animations/transitions.d.ts +31 -0
- package/lib/core/components/ClearButton.d.ts +15 -0
- package/lib/core/components/InputContainer.d.ts +19 -0
- package/lib/core/design-tokens.d.ts +292 -0
- package/lib/core/factory/factory.d.ts +33 -0
- package/lib/core/factory/index.d.ts +4 -0
- package/lib/core/factory/polymorphicFactory.d.ts +38 -0
- package/lib/core/haptics/HapticsProvider.d.ts +14 -0
- package/lib/core/hooks/useDropdownPositioning.d.ts +61 -0
- package/lib/core/hooks/usePopoverPositioning.d.ts +33 -0
- package/lib/core/i18n/I18nContext.d.ts +8 -0
- package/lib/core/i18n/index.d.ts +2 -0
- package/lib/core/i18n/types.d.ts +22 -0
- package/lib/core/index.d.ts +15 -0
- package/lib/core/interactive-states.d.ts +41 -0
- package/lib/core/motion/ReducedMotionProvider.d.ts +10 -0
- package/lib/core/motion/motionTokens.d.ts +12 -0
- package/lib/core/providers/DirectionProvider.d.ts +88 -0
- package/lib/core/providers/OverlayProvider.d.ts +40 -0
- package/lib/core/providers/OverlayRenderer.d.ts +7 -0
- package/lib/core/providers/index.d.ts +5 -0
- package/lib/core/responsive/index.d.ts +22 -0
- package/lib/core/sound/context.d.ts +21 -0
- package/lib/core/sound/hooks.d.ts +214 -0
- package/lib/core/sound/index.d.ts +5 -0
- package/lib/core/sound/mockContext.d.ts +21 -0
- package/lib/core/sound/sounds.d.ts +17 -0
- package/lib/core/sound/types.d.ts +79 -0
- package/lib/core/style-factory.d.ts +23 -0
- package/lib/core/theme/CSSVariables.d.ts +9 -0
- package/lib/core/theme/PlatformBlocksProvider.d.ts +52 -0
- package/lib/core/theme/ThemeModeProvider.d.ts +42 -0
- package/lib/core/theme/ThemeProvider.d.ts +19 -0
- package/lib/core/theme/breakpoints.d.ts +34 -0
- package/lib/core/theme/darkTheme.d.ts +2 -0
- package/lib/core/theme/defaultTheme.d.ts +2 -0
- package/lib/core/theme/index.d.ts +12 -0
- package/lib/core/theme/radius.d.ts +132 -0
- package/lib/core/theme/shadow.d.ts +119 -0
- package/lib/core/theme/sizes.d.ts +185 -0
- package/lib/core/theme/types.d.ts +190 -0
- package/lib/core/theme/unified-sizing.d.ts +65 -0
- package/lib/core/theme/useColorScheme.d.ts +6 -0
- package/lib/core/theme/utils.d.ts +9 -0
- package/lib/core/unified-styles.d.ts +12 -0
- package/lib/core/utils/UniversalCSS.d.ts +14 -0
- package/lib/core/utils/debounce.d.ts +16 -0
- package/lib/core/utils/hash.d.ts +4 -0
- package/lib/core/utils/index.d.ts +38 -0
- package/lib/core/utils/layout.d.ts +44 -0
- package/lib/core/utils/performance.d.ts +30 -0
- package/lib/core/utils/positioning-enhanced.d.ts +88 -0
- package/lib/core/utils/rtl.d.ts +174 -0
- package/lib/core/utils/shadow.d.ts +13 -0
- package/lib/core/utils/spacing.d.ts +56 -0
- package/lib/core/utils/universal.d.ts +47 -0
- package/lib/core/utils/universalSimple.d.ts +37 -0
- package/lib/core/utils/withUniversalProps.d.ts +26 -0
- package/lib/esm/index.js +35209 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/hooks/index.d.ts +6 -0
- package/lib/hooks/useClipboard.d.ts +20 -0
- package/lib/hooks/useHaptics.d.ts +22 -0
- package/lib/hooks/useHotkeys.d.ts +42 -0
- package/lib/hooks/useMaskedInput.d.ts +35 -0
- package/lib/hooks/useScrollSpy.d.ts +38 -0
- package/lib/hooks/useTitleRegistration.d.ts +14 -0
- package/lib/index.d.ts +220 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/mask.d.ts +138 -0
- package/package.json +148 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SpotlightActionData {
|
|
3
|
+
/** Unique action identifier */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Action label */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Action description */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Action keywords for better search matching */
|
|
10
|
+
keywords?: string[];
|
|
11
|
+
/** Icon to display */
|
|
12
|
+
icon?: string | ReactNode;
|
|
13
|
+
/** Action press handler */
|
|
14
|
+
onPress?: () => void;
|
|
15
|
+
/** Whether action is disabled */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Custom component to render instead of default action */
|
|
18
|
+
component?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export interface SpotlightActionGroupData {
|
|
21
|
+
/** Group label */
|
|
22
|
+
group: string;
|
|
23
|
+
/** Actions in this group */
|
|
24
|
+
actions: SpotlightActionData[];
|
|
25
|
+
}
|
|
26
|
+
export type SpotlightItem = SpotlightActionData | SpotlightActionGroupData;
|
|
27
|
+
export declare function isActionGroup(item: SpotlightItem): item is SpotlightActionGroupData;
|
|
28
|
+
export declare function isAction(item: SpotlightItem): item is SpotlightActionData;
|
|
29
|
+
export declare function filterActions(items: SpotlightItem[], query: string, limit?: number): SpotlightItem[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Spotlight } from './Spotlight';
|
|
2
|
+
export { SpotlightProvider, useSpotlightStore, spotlight, createSpotlightStore, useSpotlightStoreInstance, onSpotlightRequested } from './SpotlightStore';
|
|
3
|
+
export { useDirectSpotlightState, directSpotlight } from './DirectSpotlightState';
|
|
4
|
+
export type { SpotlightProps, SpotlightRootProps, SpotlightSearchProps, SpotlightActionsListProps, SpotlightActionProps, SpotlightActionsGroupProps, SpotlightEmptyProps, } from './types';
|
|
5
|
+
export type { SpotlightActionData, SpotlightActionGroupData, SpotlightItem, } from './SpotlightTypes';
|
|
6
|
+
export type { SpotlightState, SpotlightStore, } from './SpotlightStore';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ViewStyle } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SpotlightItem } from './SpotlightTypes';
|
|
4
|
+
export interface SpotlightProps {
|
|
5
|
+
actions: SpotlightItem[];
|
|
6
|
+
nothingFound?: string;
|
|
7
|
+
highlightQuery?: boolean;
|
|
8
|
+
limit?: number;
|
|
9
|
+
scrollable?: boolean;
|
|
10
|
+
maxHeight?: number;
|
|
11
|
+
shortcut?: string | string[] | null;
|
|
12
|
+
searchProps?: any;
|
|
13
|
+
store?: any;
|
|
14
|
+
variant?: 'modal' | 'bottomsheet' | 'fullscreen';
|
|
15
|
+
width?: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface SpotlightRootProps {
|
|
19
|
+
query: string;
|
|
20
|
+
onQueryChange: (query: string) => void;
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
opened?: boolean;
|
|
23
|
+
onClose?: () => void;
|
|
24
|
+
shortcut?: string | string[] | null;
|
|
25
|
+
style?: ViewStyle;
|
|
26
|
+
}
|
|
27
|
+
export interface SpotlightSearchProps {
|
|
28
|
+
value?: string;
|
|
29
|
+
onChangeText?: (text: string) => void;
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
leftSection?: React.ReactNode;
|
|
32
|
+
onNavigateUp?: () => void;
|
|
33
|
+
onNavigateDown?: () => void;
|
|
34
|
+
onSelectAction?: () => void;
|
|
35
|
+
onClose?: () => void;
|
|
36
|
+
}
|
|
37
|
+
export interface SpotlightActionsListProps {
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
scrollable?: boolean;
|
|
40
|
+
maxHeight?: number;
|
|
41
|
+
style?: ViewStyle;
|
|
42
|
+
scrollRef?: any;
|
|
43
|
+
onScrollChange?: (y: number) => void;
|
|
44
|
+
}
|
|
45
|
+
export interface SpotlightActionProps {
|
|
46
|
+
label?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
leftSection?: React.ReactNode;
|
|
49
|
+
rightSection?: React.ReactNode;
|
|
50
|
+
onPress?: () => void;
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
selected?: boolean;
|
|
53
|
+
children?: React.ReactNode;
|
|
54
|
+
style?: ViewStyle;
|
|
55
|
+
innerRef?: any;
|
|
56
|
+
onLayout?: (e: any) => void;
|
|
57
|
+
}
|
|
58
|
+
export interface SpotlightActionsGroupProps {
|
|
59
|
+
label: string;
|
|
60
|
+
children: React.ReactNode;
|
|
61
|
+
style?: ViewStyle;
|
|
62
|
+
}
|
|
63
|
+
export interface SpotlightEmptyProps {
|
|
64
|
+
children: React.ReactNode;
|
|
65
|
+
style?: ViewStyle;
|
|
66
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { StepperProps, StepperStepProps, StepperCompletedProps } from './types';
|
|
4
|
+
declare const StepperStep: React.ForwardRefExoticComponent<Omit<StepperStepProps, "ref"> & React.RefAttributes<View>>;
|
|
5
|
+
declare const StepperCompleted: React.FC<StepperCompletedProps>;
|
|
6
|
+
declare const Stepper: React.ForwardRefExoticComponent<Omit<StepperProps, "ref"> & React.RefAttributes<View>>;
|
|
7
|
+
declare const StepperWithSubComponents: typeof Stepper & {
|
|
8
|
+
Step: typeof StepperStep;
|
|
9
|
+
Completed: typeof StepperCompleted;
|
|
10
|
+
};
|
|
11
|
+
export { StepperWithSubComponents as Stepper };
|
|
12
|
+
export type { StepperProps, StepperStepProps, StepperCompletedProps };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface StepperStepProps {
|
|
3
|
+
/** Step content */
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
/** Step label */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Step description */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Custom icon to display instead of the step number */
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
/** Icon to display when step is completed (overrides global completedIcon) */
|
|
12
|
+
completedIcon?: ReactNode;
|
|
13
|
+
/** Whether this step can be selected by clicking */
|
|
14
|
+
allowStepSelect?: boolean;
|
|
15
|
+
/** Step color */
|
|
16
|
+
color?: string;
|
|
17
|
+
/** Whether the step is loading */
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
/** Accessibility label for screen readers */
|
|
20
|
+
'aria-label'?: string;
|
|
21
|
+
/** Title attribute for tooltips */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** Step reference */
|
|
24
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
25
|
+
/** Internal step index (added automatically) */
|
|
26
|
+
stepIndex?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface StepperProps {
|
|
29
|
+
/** Active step index */
|
|
30
|
+
active: number;
|
|
31
|
+
/** Called when step is clicked */
|
|
32
|
+
onStepClick?: (stepIndex: number) => void;
|
|
33
|
+
/** Step orientation */
|
|
34
|
+
orientation?: 'horizontal' | 'vertical';
|
|
35
|
+
/** Icon position relative to step body */
|
|
36
|
+
iconPosition?: 'left' | 'right';
|
|
37
|
+
/** Icon size */
|
|
38
|
+
iconSize?: number;
|
|
39
|
+
/** Component size */
|
|
40
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
41
|
+
/** Component color */
|
|
42
|
+
color?: string;
|
|
43
|
+
/** Icon to display when step is completed */
|
|
44
|
+
completedIcon?: ReactNode;
|
|
45
|
+
/** Whether next steps (steps with higher index) can be selected */
|
|
46
|
+
allowNextStepsSelect?: boolean;
|
|
47
|
+
/** Step content */
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
/** Accessibility label */
|
|
50
|
+
'aria-label'?: string;
|
|
51
|
+
/** Component reference */
|
|
52
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
53
|
+
}
|
|
54
|
+
export interface StepperCompletedProps {
|
|
55
|
+
/** Content to display when all steps are completed */
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
}
|
|
58
|
+
export interface StepperContextValue {
|
|
59
|
+
active: number;
|
|
60
|
+
onStepClick?: (stepIndex: number) => void;
|
|
61
|
+
orientation: 'horizontal' | 'vertical';
|
|
62
|
+
iconPosition: 'left' | 'right';
|
|
63
|
+
iconSize: number;
|
|
64
|
+
size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
65
|
+
color: string;
|
|
66
|
+
completedIcon?: ReactNode;
|
|
67
|
+
allowNextStepsSelect: boolean;
|
|
68
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { SwitchStyleProps } from './types';
|
|
2
|
+
import { PlatformBlocksTheme } from '../../core/theme/types';
|
|
3
|
+
export declare const useSwitchStyles: (props: SwitchStyleProps & {
|
|
4
|
+
theme: PlatformBlocksTheme;
|
|
5
|
+
}) => {
|
|
6
|
+
container: {
|
|
7
|
+
alignItems: "center";
|
|
8
|
+
flexDirection: "row";
|
|
9
|
+
minHeight: number;
|
|
10
|
+
};
|
|
11
|
+
containerReverse: {
|
|
12
|
+
flexDirection: "row-reverse";
|
|
13
|
+
justifyContent: "flex-end";
|
|
14
|
+
};
|
|
15
|
+
description: {
|
|
16
|
+
color: string;
|
|
17
|
+
marginTop: 4;
|
|
18
|
+
};
|
|
19
|
+
error: {
|
|
20
|
+
color: string;
|
|
21
|
+
marginTop: number;
|
|
22
|
+
};
|
|
23
|
+
label: {
|
|
24
|
+
userSelect?: any;
|
|
25
|
+
color: string;
|
|
26
|
+
lineHeight: number;
|
|
27
|
+
};
|
|
28
|
+
labelContainer: {
|
|
29
|
+
flex: number;
|
|
30
|
+
justifyContent: "center";
|
|
31
|
+
};
|
|
32
|
+
labelDisabled: {
|
|
33
|
+
color: string;
|
|
34
|
+
};
|
|
35
|
+
labelError: {
|
|
36
|
+
color: string;
|
|
37
|
+
};
|
|
38
|
+
required: {
|
|
39
|
+
color: string;
|
|
40
|
+
};
|
|
41
|
+
stateLabel: {
|
|
42
|
+
color: string;
|
|
43
|
+
fontSize: 12;
|
|
44
|
+
};
|
|
45
|
+
stateLabelActive: {
|
|
46
|
+
color: string;
|
|
47
|
+
fontWeight: "400" | "600";
|
|
48
|
+
};
|
|
49
|
+
stateLabels: {
|
|
50
|
+
alignItems: "center";
|
|
51
|
+
flexDirection: "row";
|
|
52
|
+
marginTop: 4;
|
|
53
|
+
};
|
|
54
|
+
switchContainer: {
|
|
55
|
+
alignItems: "center";
|
|
56
|
+
justifyContent: "center";
|
|
57
|
+
minHeight: number;
|
|
58
|
+
minWidth: number;
|
|
59
|
+
};
|
|
60
|
+
switchPressable: {
|
|
61
|
+
height: "100%";
|
|
62
|
+
position: "relative";
|
|
63
|
+
width: "100%";
|
|
64
|
+
};
|
|
65
|
+
switchThumb: {
|
|
66
|
+
width: number;
|
|
67
|
+
height: number;
|
|
68
|
+
borderRadius: number;
|
|
69
|
+
backgroundColor: string;
|
|
70
|
+
position: "absolute";
|
|
71
|
+
top: number;
|
|
72
|
+
left: number;
|
|
73
|
+
elevation: 2;
|
|
74
|
+
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06)";
|
|
75
|
+
};
|
|
76
|
+
switchTrack: {
|
|
77
|
+
borderColor: string;
|
|
78
|
+
borderRadius: number;
|
|
79
|
+
borderWidth: 2;
|
|
80
|
+
height: number;
|
|
81
|
+
opacity: number;
|
|
82
|
+
position: "relative";
|
|
83
|
+
width: number;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SizeValue, ColorValue, SpacingProps } from '../../core/theme/types';
|
|
3
|
+
export interface BaseComponentProps extends SpacingProps {
|
|
4
|
+
/** Component test ID for testing */
|
|
5
|
+
testID?: string;
|
|
6
|
+
/** Additional CSS styles */
|
|
7
|
+
style?: any;
|
|
8
|
+
}
|
|
9
|
+
export interface SwitchProps extends BaseComponentProps {
|
|
10
|
+
/** Whether switch is on */
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
/** Initial checked state for uncontrolled usage */
|
|
13
|
+
defaultChecked?: boolean;
|
|
14
|
+
/** Change handler */
|
|
15
|
+
onChange?: (checked: boolean) => void;
|
|
16
|
+
/** Switch size */
|
|
17
|
+
size?: SizeValue;
|
|
18
|
+
/** Switch color theme when on */
|
|
19
|
+
color?: ColorValue;
|
|
20
|
+
/** Switch label */
|
|
21
|
+
label?: React.ReactNode;
|
|
22
|
+
/** Whether switch is disabled */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Whether switch is required */
|
|
25
|
+
required?: boolean;
|
|
26
|
+
/** Error message */
|
|
27
|
+
error?: string;
|
|
28
|
+
/** Helper text */
|
|
29
|
+
description?: string;
|
|
30
|
+
/** Label position relative to switch */
|
|
31
|
+
labelPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
32
|
+
/** Switch content/children (alternative to label) */
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
/** Icon to show when on */
|
|
35
|
+
onIcon?: React.ReactNode;
|
|
36
|
+
/** Icon to show when off */
|
|
37
|
+
offIcon?: React.ReactNode;
|
|
38
|
+
/** Labels for on/off states */
|
|
39
|
+
onLabel?: string;
|
|
40
|
+
offLabel?: string;
|
|
41
|
+
/** Controlled component to show/hide */
|
|
42
|
+
controls?: string;
|
|
43
|
+
/** Custom accessibility label (overrides label-based default) */
|
|
44
|
+
accessibilityLabel?: string;
|
|
45
|
+
/** Accessibility hint to describe what happens */
|
|
46
|
+
accessibilityHint?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface SwitchStyleProps {
|
|
49
|
+
checked: boolean;
|
|
50
|
+
disabled: boolean;
|
|
51
|
+
error: boolean;
|
|
52
|
+
size: SizeValue;
|
|
53
|
+
color: ColorValue;
|
|
54
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SpacingProps } from '../../core/utils';
|
|
3
|
+
export interface TableData {
|
|
4
|
+
head?: React.ReactNode[];
|
|
5
|
+
body?: React.ReactNode[][];
|
|
6
|
+
foot?: React.ReactNode[];
|
|
7
|
+
caption?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface TableProps extends SpacingProps {
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/** Table data for automatic generation of rows */
|
|
12
|
+
data?: TableData;
|
|
13
|
+
/** Horizontal spacing between cells */
|
|
14
|
+
horizontalSpacing?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
15
|
+
/** Vertical spacing between cells */
|
|
16
|
+
verticalSpacing?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
17
|
+
/** Add striped styling to rows */
|
|
18
|
+
striped?: boolean;
|
|
19
|
+
/** Highlight rows on hover/press */
|
|
20
|
+
highlightOnHover?: boolean;
|
|
21
|
+
/** Add borders around table */
|
|
22
|
+
withTableBorder?: boolean;
|
|
23
|
+
/** Add borders between columns */
|
|
24
|
+
withColumnBorders?: boolean;
|
|
25
|
+
/** Add borders between rows */
|
|
26
|
+
withRowBorders?: boolean;
|
|
27
|
+
/** Caption position */
|
|
28
|
+
captionSide?: 'top' | 'bottom';
|
|
29
|
+
/** Table layout mode */
|
|
30
|
+
layout?: 'auto' | 'fixed';
|
|
31
|
+
/** Variant of table layout */
|
|
32
|
+
variant?: 'default' | 'vertical';
|
|
33
|
+
/** Enable tabular numbers for better number alignment */
|
|
34
|
+
tabularNums?: boolean;
|
|
35
|
+
/** Make table take full width of container */
|
|
36
|
+
fullWidth?: boolean;
|
|
37
|
+
/** Column width configuration for auto-sizing */
|
|
38
|
+
columns?: Array<{
|
|
39
|
+
/** Column key for identification */
|
|
40
|
+
key?: string;
|
|
41
|
+
/** Column width strategy */
|
|
42
|
+
width?: number | string | 'auto' | 'min-content' | 'max-content';
|
|
43
|
+
/** Minimum column width */
|
|
44
|
+
minWidth?: number;
|
|
45
|
+
/** Maximum column width */
|
|
46
|
+
maxWidth?: number;
|
|
47
|
+
/** Flex grow factor */
|
|
48
|
+
flex?: number;
|
|
49
|
+
}>;
|
|
50
|
+
/** Additional styles */
|
|
51
|
+
style?: any;
|
|
52
|
+
}
|
|
53
|
+
export interface TableScrollContainerProps extends SpacingProps {
|
|
54
|
+
children?: React.ReactNode;
|
|
55
|
+
/** Minimum width before scrolling kicks in */
|
|
56
|
+
minWidth?: number;
|
|
57
|
+
/** Maximum height before vertical scrolling */
|
|
58
|
+
maxHeight?: number;
|
|
59
|
+
/** Scroll type for web */
|
|
60
|
+
type?: 'native' | 'custom';
|
|
61
|
+
style?: any;
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
}
|
|
64
|
+
export interface TableSectionProps extends SpacingProps {
|
|
65
|
+
children?: React.ReactNode;
|
|
66
|
+
style?: any;
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
}
|
|
69
|
+
export interface TableRowProps extends SpacingProps {
|
|
70
|
+
children?: React.ReactNode;
|
|
71
|
+
/** Background color override */
|
|
72
|
+
bg?: string;
|
|
73
|
+
/** Row selection state */
|
|
74
|
+
selected?: boolean;
|
|
75
|
+
/** Press handler */
|
|
76
|
+
onPress?: () => void;
|
|
77
|
+
style?: any;
|
|
78
|
+
[key: string]: any;
|
|
79
|
+
}
|
|
80
|
+
export interface TableCellProps extends SpacingProps {
|
|
81
|
+
children?: React.ReactNode;
|
|
82
|
+
/** Cell width (useful for fixed layout) */
|
|
83
|
+
w?: number | string;
|
|
84
|
+
/** Text alignment */
|
|
85
|
+
align?: 'left' | 'center' | 'right';
|
|
86
|
+
/** Minimum width for auto-sizing */
|
|
87
|
+
minWidth?: number;
|
|
88
|
+
/** Maximum width for auto-sizing */
|
|
89
|
+
maxWidth?: number;
|
|
90
|
+
/** Flex grow factor for flexible sizing */
|
|
91
|
+
flex?: number;
|
|
92
|
+
/** Width strategy for responsive behavior */
|
|
93
|
+
widthStrategy?: 'auto' | 'min-content' | 'max-content' | 'fixed';
|
|
94
|
+
style?: any;
|
|
95
|
+
[key: string]: any;
|
|
96
|
+
}
|
|
97
|
+
export declare const TableTh: React.FC<TableCellProps>;
|
|
98
|
+
export declare const TableTd: React.FC<TableCellProps>;
|
|
99
|
+
export declare const TableTr: React.FC<TableRowProps>;
|
|
100
|
+
export declare const TableThead: React.FC<TableSectionProps>;
|
|
101
|
+
export declare const TableTbody: React.FC<TableSectionProps>;
|
|
102
|
+
export declare const TableTfoot: React.FC<TableSectionProps>;
|
|
103
|
+
export declare const TableCaption: React.FC<TableSectionProps>;
|
|
104
|
+
export declare const TableScrollContainer: React.FC<TableScrollContainerProps>;
|
|
105
|
+
export declare const Table: React.FC<TableProps> & {
|
|
106
|
+
Th: typeof TableTh;
|
|
107
|
+
Td: typeof TableTd;
|
|
108
|
+
Tr: typeof TableTr;
|
|
109
|
+
Thead: typeof TableThead;
|
|
110
|
+
Tbody: typeof TableTbody;
|
|
111
|
+
Tfoot: typeof TableTfoot;
|
|
112
|
+
Caption: typeof TableCaption;
|
|
113
|
+
ScrollContainer: typeof TableScrollContainer;
|
|
114
|
+
};
|
|
115
|
+
export default Table;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Table, TableTh, TableTd, TableTr, TableThead, TableTbody, TableTfoot, TableCaption, TableScrollContainer, type TableProps, type TableData, type TableScrollContainerProps, type TableSectionProps, type TableRowProps, type TableCellProps } from './Table';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { SpacingProps } from '../../core/utils/spacing';
|
|
2
|
+
import { BorderRadiusProps } from '../../core/theme/radius';
|
|
3
|
+
import { SizeValue } from '../../core/theme/sizes';
|
|
4
|
+
import { ScrollSpyOptions, UseScrollSpyItem as TocItem } from '../../hooks/useScrollSpy';
|
|
5
|
+
export interface TableOfContentsProps extends SpacingProps, BorderRadiusProps {
|
|
6
|
+
/**
|
|
7
|
+
* Visual style variant for the table of contents
|
|
8
|
+
* @default 'none'
|
|
9
|
+
*/
|
|
10
|
+
variant?: 'filled' | 'outline' | 'ghost' | 'none';
|
|
11
|
+
/**
|
|
12
|
+
* Background color for filled variant. Falls back to theme primary color if not specified
|
|
13
|
+
*/
|
|
14
|
+
color?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Text size for table of contents items
|
|
17
|
+
* @default 'sm'
|
|
18
|
+
*/
|
|
19
|
+
size?: SizeValue;
|
|
20
|
+
/**
|
|
21
|
+
* Border radius value for the container
|
|
22
|
+
*/
|
|
23
|
+
radius?: any;
|
|
24
|
+
/**
|
|
25
|
+
* Configuration options for scroll spy behavior
|
|
26
|
+
*/
|
|
27
|
+
scrollSpyOptions?: ScrollSpyOptions;
|
|
28
|
+
/**
|
|
29
|
+
* Function to customize props for each table of contents item control
|
|
30
|
+
* @param payload - Object containing item data, active state, and index
|
|
31
|
+
* @returns Props to spread onto the control element
|
|
32
|
+
*/
|
|
33
|
+
getControlProps?: (payload: {
|
|
34
|
+
data: TocItem;
|
|
35
|
+
active: boolean;
|
|
36
|
+
index: number;
|
|
37
|
+
}) => any;
|
|
38
|
+
/**
|
|
39
|
+
* Initial data for table of contents items (useful for SSR or pre-rendering)
|
|
40
|
+
*/
|
|
41
|
+
initialData?: TocItem[];
|
|
42
|
+
/**
|
|
43
|
+
* Minimum depth level at which to start applying depth offset indentation
|
|
44
|
+
* @default 1
|
|
45
|
+
*/
|
|
46
|
+
minDepthToOffset?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Pixel offset to apply for each depth level (indentation amount)
|
|
49
|
+
* @default 20
|
|
50
|
+
*/
|
|
51
|
+
depthOffset?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Ref to expose the reinitialize function for manually triggering TOC refresh
|
|
54
|
+
*/
|
|
55
|
+
reinitializeRef?: React.RefObject<() => void>;
|
|
56
|
+
/**
|
|
57
|
+
* Automatically adjust text color for contrast when using filled variant
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
autoContrast?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Additional styles to apply to the container
|
|
63
|
+
*/
|
|
64
|
+
style?: any;
|
|
65
|
+
/**
|
|
66
|
+
* Callback fired when the active item changes
|
|
67
|
+
* @param id - ID of the newly active item, or null if none
|
|
68
|
+
* @param item - The complete TocItem object if available
|
|
69
|
+
*/
|
|
70
|
+
onActiveChange?: (id: string | null, item?: TocItem) => void;
|
|
71
|
+
/**
|
|
72
|
+
* CSS selector string or HTMLElement to use as the scroll container
|
|
73
|
+
* @default 'main, [role="main"], .main-content, #main-content, article, .content, #content'
|
|
74
|
+
*/
|
|
75
|
+
container?: string | HTMLElement;
|
|
76
|
+
}
|
|
77
|
+
export type { TocItem };
|