@bodhan-ai/react 0.0.0-stage → 0.2.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/LICENSE +5 -0
- package/README.md +73 -2
- package/dist/components/Accordion/Accordion.d.ts +56 -0
- package/dist/components/Accordion/Accordion.js +91 -0
- package/dist/components/Accordion/Accordion.js.map +1 -0
- package/dist/components/Account/Account.d.ts +20 -0
- package/dist/components/Account/Account.js +39 -0
- package/dist/components/Account/Account.js.map +1 -0
- package/dist/components/ActionSheet/ActionSheet.d.ts +36 -0
- package/dist/components/ActionSheet/ActionSheet.js +93 -0
- package/dist/components/ActionSheet/ActionSheet.js.map +1 -0
- package/dist/components/ActivityPill/ActivityPill.d.ts +27 -0
- package/dist/components/ActivityPill/ActivityPill.js +75 -0
- package/dist/components/ActivityPill/ActivityPill.js.map +1 -0
- package/dist/components/AgentStatus/AgentStatus.d.ts +23 -0
- package/dist/components/AgentStatus/AgentStatus.js +83 -0
- package/dist/components/AgentStatus/AgentStatus.js.map +1 -0
- package/dist/components/AgentTask/AgentTask.d.ts +41 -0
- package/dist/components/AgentTask/AgentTask.js +159 -0
- package/dist/components/AgentTask/AgentTask.js.map +1 -0
- package/dist/components/Alert/Alert.d.ts +34 -0
- package/dist/components/Alert/Alert.js +83 -0
- package/dist/components/Alert/Alert.js.map +1 -0
- package/dist/components/AnswerOption/AnswerOption.d.ts +26 -0
- package/dist/components/AnswerOption/AnswerOption.js +57 -0
- package/dist/components/AnswerOption/AnswerOption.js.map +1 -0
- package/dist/components/AudioPlayer/AudioPlayer.d.ts +39 -0
- package/dist/components/AudioPlayer/AudioPlayer.js +172 -0
- package/dist/components/AudioPlayer/AudioPlayer.js.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +34 -0
- package/dist/components/Avatar/Avatar.js +133 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +24 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +40 -0
- package/dist/components/AvatarGroup/AvatarGroup.js.map +1 -0
- package/dist/components/Badge/Badge.d.ts +22 -0
- package/dist/components/Badge/Badge.js +23 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Banner/Banner.d.ts +36 -0
- package/dist/components/Banner/Banner.js +81 -0
- package/dist/components/Banner/Banner.js.map +1 -0
- package/dist/components/BarChart/BarChart.d.ts +42 -0
- package/dist/components/BarChart/BarChart.js +221 -0
- package/dist/components/BarChart/BarChart.js.map +1 -0
- package/dist/components/BodhanLogo/BodhanLogo.d.ts +17 -0
- package/dist/components/BodhanLogo/BodhanLogo.js +32 -0
- package/dist/components/BodhanLogo/BodhanLogo.js.map +1 -0
- package/dist/components/BodhanLogo/logos.d.ts +5 -0
- package/dist/components/BodhanLogo/logos.js +31 -0
- package/dist/components/BodhanLogo/logos.js.map +1 -0
- package/dist/components/BottomAppBar/BottomAppBar.d.ts +33 -0
- package/dist/components/BottomAppBar/BottomAppBar.js +86 -0
- package/dist/components/BottomAppBar/BottomAppBar.js.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.d.ts +66 -0
- package/dist/components/BottomSheet/BottomSheet.js +165 -0
- package/dist/components/BottomSheet/BottomSheet.js.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +47 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +102 -0
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/components/Button/Button.d.ts +30 -0
- package/dist/components/Button/Button.js +40 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +34 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +47 -0
- package/dist/components/ButtonGroup/ButtonGroup.js.map +1 -0
- package/dist/components/Calendar/Calendar.d.ts +111 -0
- package/dist/components/Calendar/Calendar.js +338 -0
- package/dist/components/Calendar/Calendar.js.map +1 -0
- package/dist/components/CameraCapture/CameraCapture.d.ts +22 -0
- package/dist/components/CameraCapture/CameraCapture.js +155 -0
- package/dist/components/CameraCapture/CameraCapture.js.map +1 -0
- package/dist/components/Card/Card.d.ts +50 -0
- package/dist/components/Card/Card.js +120 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Carousel/Carousel.d.ts +51 -0
- package/dist/components/Carousel/Carousel.js +152 -0
- package/dist/components/Carousel/Carousel.js.map +1 -0
- package/dist/components/Celebration/Celebration.d.ts +23 -0
- package/dist/components/Celebration/Celebration.js +93 -0
- package/dist/components/Celebration/Celebration.js.map +1 -0
- package/dist/components/ChartStatus/ChartStatus.d.ts +54 -0
- package/dist/components/ChartStatus/ChartStatus.js +144 -0
- package/dist/components/ChartStatus/ChartStatus.js.map +1 -0
- package/dist/components/ChatArtifact/ChatArtifact.d.ts +23 -0
- package/dist/components/ChatArtifact/ChatArtifact.js +91 -0
- package/dist/components/ChatArtifact/ChatArtifact.js.map +1 -0
- package/dist/components/ChatBubble/ChatBubble.d.ts +26 -0
- package/dist/components/ChatBubble/ChatBubble.js +57 -0
- package/dist/components/ChatBubble/ChatBubble.js.map +1 -0
- package/dist/components/ChatContent/ChatContent.d.ts +23 -0
- package/dist/components/ChatContent/ChatContent.js +333 -0
- package/dist/components/ChatContent/ChatContent.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +29 -0
- package/dist/components/Checkbox/Checkbox.js +58 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Chip/Chip.d.ts +28 -0
- package/dist/components/Chip/Chip.js +48 -0
- package/dist/components/Chip/Chip.js.map +1 -0
- package/dist/components/CircularLoader/CircularLoader.d.ts +12 -0
- package/dist/components/CircularLoader/CircularLoader.js +36 -0
- package/dist/components/CircularLoader/CircularLoader.js.map +1 -0
- package/dist/components/ColorSwatch/ColorSwatch.d.ts +14 -0
- package/dist/components/ColorSwatch/ColorSwatch.js +30 -0
- package/dist/components/ColorSwatch/ColorSwatch.js.map +1 -0
- package/dist/components/Combobox/Combobox.d.ts +40 -0
- package/dist/components/Combobox/Combobox.js +167 -0
- package/dist/components/Combobox/Combobox.js.map +1 -0
- package/dist/components/CommandPalette/CommandPalette.d.ts +48 -0
- package/dist/components/CommandPalette/CommandPalette.js +235 -0
- package/dist/components/CommandPalette/CommandPalette.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +31 -0
- package/dist/components/ContextMenu/ContextMenu.js +138 -0
- package/dist/components/ContextMenu/ContextMenu.js.map +1 -0
- package/dist/components/DateField/DateField.d.ts +28 -0
- package/dist/components/DateField/DateField.js +134 -0
- package/dist/components/DateField/DateField.js.map +1 -0
- package/dist/components/DigitField/DigitField.d.ts +16 -0
- package/dist/components/DigitField/DigitField.js +27 -0
- package/dist/components/DigitField/DigitField.js.map +1 -0
- package/dist/components/Divider/Divider.d.ts +19 -0
- package/dist/components/Divider/Divider.js +22 -0
- package/dist/components/Divider/Divider.js.map +1 -0
- package/dist/components/DottedLoader/DottedLoader.d.ts +15 -0
- package/dist/components/DottedLoader/DottedLoader.js +36 -0
- package/dist/components/DottedLoader/DottedLoader.js.map +1 -0
- package/dist/components/DoughnutChart/DoughnutChart.d.ts +16 -0
- package/dist/components/DoughnutChart/DoughnutChart.js +31 -0
- package/dist/components/DoughnutChart/DoughnutChart.js.map +1 -0
- package/dist/components/Drawer/Drawer.d.ts +39 -0
- package/dist/components/Drawer/Drawer.js +109 -0
- package/dist/components/Drawer/Drawer.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +79 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +262 -0
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
- package/dist/components/DropdownMenuCheckbox/DropdownMenuCheckbox.d.ts +46 -0
- package/dist/components/DropdownMenuCheckbox/DropdownMenuCheckbox.js +75 -0
- package/dist/components/DropdownMenuCheckbox/DropdownMenuCheckbox.js.map +1 -0
- package/dist/components/EmptyState/EmptyState.d.ts +34 -0
- package/dist/components/EmptyState/EmptyState.js +53 -0
- package/dist/components/EmptyState/EmptyState.js.map +1 -0
- package/dist/components/FAB/FAB.d.ts +19 -0
- package/dist/components/FAB/FAB.js +27 -0
- package/dist/components/FAB/FAB.js.map +1 -0
- package/dist/components/FABMenu/FABMenu.d.ts +25 -0
- package/dist/components/FABMenu/FABMenu.js +95 -0
- package/dist/components/FABMenu/FABMenu.js.map +1 -0
- package/dist/components/FeedbackReasons/FeedbackReasons.d.ts +19 -0
- package/dist/components/FeedbackReasons/FeedbackReasons.js +62 -0
- package/dist/components/FeedbackReasons/FeedbackReasons.js.map +1 -0
- package/dist/components/FileUpload/FileUpload.d.ts +88 -0
- package/dist/components/FileUpload/FileUpload.js +199 -0
- package/dist/components/FileUpload/FileUpload.js.map +1 -0
- package/dist/components/FlashcardStack/FlashcardStack.d.ts +37 -0
- package/dist/components/FlashcardStack/FlashcardStack.js +237 -0
- package/dist/components/FlashcardStack/FlashcardStack.js.map +1 -0
- package/dist/components/HandoffCard/HandoffCard.d.ts +25 -0
- package/dist/components/HandoffCard/HandoffCard.js +80 -0
- package/dist/components/HandoffCard/HandoffCard.js.map +1 -0
- package/dist/components/HomeIndicator/HomeIndicator.d.ts +12 -0
- package/dist/components/HomeIndicator/HomeIndicator.js +20 -0
- package/dist/components/HomeIndicator/HomeIndicator.js.map +1 -0
- package/dist/components/Icon/Icon.d.ts +15 -0
- package/dist/components/Icon/Icon.js +24 -0
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/IconButton/IconButton.d.ts +29 -0
- package/dist/components/IconButton/IconButton.js +33 -0
- package/dist/components/IconButton/IconButton.js.map +1 -0
- package/dist/components/Illustration/Illustration.d.ts +22 -0
- package/dist/components/Illustration/Illustration.js +37 -0
- package/dist/components/Illustration/Illustration.js.map +1 -0
- package/dist/components/Illustration/illustrations.d.ts +5 -0
- package/dist/components/Illustration/illustrations.js +266 -0
- package/dist/components/Illustration/illustrations.js.map +1 -0
- package/dist/components/ImageViewer/ImageViewer.d.ts +31 -0
- package/dist/components/ImageViewer/ImageViewer.js +132 -0
- package/dist/components/ImageViewer/ImageViewer.js.map +1 -0
- package/dist/components/InkPad/InkPad.d.ts +27 -0
- package/dist/components/InkPad/InkPad.js +205 -0
- package/dist/components/InkPad/InkPad.js.map +1 -0
- package/dist/components/Input/Input.d.ts +42 -0
- package/dist/components/Input/Input.js +104 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/LearningCard/LearningCard.d.ts +32 -0
- package/dist/components/LearningCard/LearningCard.js +116 -0
- package/dist/components/LearningCard/LearningCard.js.map +1 -0
- package/dist/components/Legend/Legend.d.ts +30 -0
- package/dist/components/Legend/Legend.js +48 -0
- package/dist/components/Legend/Legend.js.map +1 -0
- package/dist/components/LineChart/LineChart.d.ts +33 -0
- package/dist/components/LineChart/LineChart.js +139 -0
- package/dist/components/LineChart/LineChart.js.map +1 -0
- package/dist/components/Link/Link.d.ts +16 -0
- package/dist/components/Link/Link.js +30 -0
- package/dist/components/Link/Link.js.map +1 -0
- package/dist/components/ListGroup/ListGroup.d.ts +18 -0
- package/dist/components/ListGroup/ListGroup.js +42 -0
- package/dist/components/ListGroup/ListGroup.js.map +1 -0
- package/dist/components/ListItem/ListItem.d.ts +40 -0
- package/dist/components/ListItem/ListItem.js +132 -0
- package/dist/components/ListItem/ListItem.js.map +1 -0
- package/dist/components/MascotBodhanBird/MascotBodhanBird.d.ts +14 -0
- package/dist/components/MascotBodhanBird/MascotBodhanBird.js +124 -0
- package/dist/components/MascotBodhanBird/MascotBodhanBird.js.map +1 -0
- package/dist/components/Message/Message.d.ts +15 -0
- package/dist/components/Message/Message.js +52 -0
- package/dist/components/Message/Message.js.map +1 -0
- package/dist/components/Modal/Modal.d.ts +54 -0
- package/dist/components/Modal/Modal.js +152 -0
- package/dist/components/Modal/Modal.js.map +1 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +62 -0
- package/dist/components/MultiSelect/MultiSelect.js +282 -0
- package/dist/components/MultiSelect/MultiSelect.js.map +1 -0
- package/dist/components/NavigationDrawer/NavigationDrawer.d.ts +35 -0
- package/dist/components/NavigationDrawer/NavigationDrawer.js +107 -0
- package/dist/components/NavigationDrawer/NavigationDrawer.js.map +1 -0
- package/dist/components/NavigationItem/NavigationItem.d.ts +16 -0
- package/dist/components/NavigationItem/NavigationItem.js +34 -0
- package/dist/components/NavigationItem/NavigationItem.js.map +1 -0
- package/dist/components/NavigationRail/NavigationRail.d.ts +39 -0
- package/dist/components/NavigationRail/NavigationRail.js +100 -0
- package/dist/components/NavigationRail/NavigationRail.js.map +1 -0
- package/dist/components/NumberStepper/NumberStepper.d.ts +23 -0
- package/dist/components/NumberStepper/NumberStepper.js +84 -0
- package/dist/components/NumberStepper/NumberStepper.js.map +1 -0
- package/dist/components/OTPInput/OTPInput.d.ts +42 -0
- package/dist/components/OTPInput/OTPInput.js +122 -0
- package/dist/components/OTPInput/OTPInput.js.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +50 -0
- package/dist/components/Pagination/Pagination.js +122 -0
- package/dist/components/Pagination/Pagination.js.map +1 -0
- package/dist/components/PermissionSheet/PermissionSheet.d.ts +31 -0
- package/dist/components/PermissionSheet/PermissionSheet.js +113 -0
- package/dist/components/PermissionSheet/PermissionSheet.js.map +1 -0
- package/dist/components/PieChart/PieChart.d.ts +9 -0
- package/dist/components/PieChart/PieChart.js +19 -0
- package/dist/components/PieChart/PieChart.js.map +1 -0
- package/dist/components/PieChart/PieCore.d.ts +35 -0
- package/dist/components/PieChart/PieCore.js +128 -0
- package/dist/components/PieChart/PieCore.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts +94 -0
- package/dist/components/Popover/Popover.js +324 -0
- package/dist/components/Popover/Popover.js.map +1 -0
- package/dist/components/Progress/Progress.d.ts +27 -0
- package/dist/components/Progress/Progress.js +77 -0
- package/dist/components/Progress/Progress.js.map +1 -0
- package/dist/components/PromptStarter/PromptStarter.d.ts +16 -0
- package/dist/components/PromptStarter/PromptStarter.js +33 -0
- package/dist/components/PromptStarter/PromptStarter.js.map +1 -0
- package/dist/components/Promptbox/Promptbox.d.ts +109 -0
- package/dist/components/Promptbox/Promptbox.js +469 -0
- package/dist/components/Promptbox/Promptbox.js.map +1 -0
- package/dist/components/Question/Question.d.ts +55 -0
- package/dist/components/Question/Question.js +161 -0
- package/dist/components/Question/Question.js.map +1 -0
- package/dist/components/RadioButton/RadioButton.d.ts +28 -0
- package/dist/components/RadioButton/RadioButton.js +43 -0
- package/dist/components/RadioButton/RadioButton.js.map +1 -0
- package/dist/components/Rating/Rating.d.ts +25 -0
- package/dist/components/Rating/Rating.js +79 -0
- package/dist/components/Rating/Rating.js.map +1 -0
- package/dist/components/ReadAloud/ReadAloud.d.ts +24 -0
- package/dist/components/ReadAloud/ReadAloud.js +76 -0
- package/dist/components/ReadAloud/ReadAloud.js.map +1 -0
- package/dist/components/RecommendationCard/RecommendationCard.d.ts +28 -0
- package/dist/components/RecommendationCard/RecommendationCard.js +78 -0
- package/dist/components/RecommendationCard/RecommendationCard.js.map +1 -0
- package/dist/components/ResizablePanel/ResizablePanel.d.ts +32 -0
- package/dist/components/ResizablePanel/ResizablePanel.js +102 -0
- package/dist/components/ResizablePanel/ResizablePanel.js.map +1 -0
- package/dist/components/ResizeHandle/ResizeHandle.d.ts +32 -0
- package/dist/components/ResizeHandle/ResizeHandle.js +61 -0
- package/dist/components/ResizeHandle/ResizeHandle.js.map +1 -0
- package/dist/components/ResultsSummary/ResultsSummary.d.ts +37 -0
- package/dist/components/ResultsSummary/ResultsSummary.js +121 -0
- package/dist/components/ResultsSummary/ResultsSummary.js.map +1 -0
- package/dist/components/ScoreCounter/ScoreCounter.d.ts +18 -0
- package/dist/components/ScoreCounter/ScoreCounter.js +78 -0
- package/dist/components/ScoreCounter/ScoreCounter.js.map +1 -0
- package/dist/components/ScreenTemplate/ScreenTemplate.d.ts +30 -0
- package/dist/components/ScreenTemplate/ScreenTemplate.js +88 -0
- package/dist/components/ScreenTemplate/ScreenTemplate.js.map +1 -0
- package/dist/components/ScrollEdgeEffect/ScrollEdgeEffect.d.ts +15 -0
- package/dist/components/ScrollEdgeEffect/ScrollEdgeEffect.js +20 -0
- package/dist/components/ScrollEdgeEffect/ScrollEdgeEffect.js.map +1 -0
- package/dist/components/Search/Search.d.ts +33 -0
- package/dist/components/Search/Search.js +74 -0
- package/dist/components/Search/Search.js.map +1 -0
- package/dist/components/SearchView/SearchView.d.ts +36 -0
- package/dist/components/SearchView/SearchView.js +124 -0
- package/dist/components/SearchView/SearchView.js.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +63 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +164 -0
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -0
- package/dist/components/Select/Select.d.ts +49 -0
- package/dist/components/Select/Select.js +143 -0
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts +78 -0
- package/dist/components/Sidebar/Sidebar.js +167 -0
- package/dist/components/Sidebar/Sidebar.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +25 -0
- package/dist/components/Skeleton/Skeleton.js +26 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Slider/Slider.d.ts +39 -0
- package/dist/components/Slider/Slider.js +83 -0
- package/dist/components/Slider/Slider.js.map +1 -0
- package/dist/components/Snackbar/Snackbar.d.ts +38 -0
- package/dist/components/Snackbar/Snackbar.js +103 -0
- package/dist/components/Snackbar/Snackbar.js.map +1 -0
- package/dist/components/SourcePanel/SourcePanel.d.ts +20 -0
- package/dist/components/SourcePanel/SourcePanel.js +82 -0
- package/dist/components/SourcePanel/SourcePanel.js.map +1 -0
- package/dist/components/StatTile/StatTile.d.ts +22 -0
- package/dist/components/StatTile/StatTile.js +71 -0
- package/dist/components/StatTile/StatTile.js.map +1 -0
- package/dist/components/StatusBar/StatusBar.d.ts +18 -0
- package/dist/components/StatusBar/StatusBar.js +131 -0
- package/dist/components/StatusBar/StatusBar.js.map +1 -0
- package/dist/components/Stepper/Stepper.d.ts +50 -0
- package/dist/components/Stepper/Stepper.js +99 -0
- package/dist/components/Stepper/Stepper.js.map +1 -0
- package/dist/components/SuggestionCard/SuggestionCard.d.ts +22 -0
- package/dist/components/SuggestionCard/SuggestionCard.js +74 -0
- package/dist/components/SuggestionCard/SuggestionCard.js.map +1 -0
- package/dist/components/Switch/Switch.d.ts +35 -0
- package/dist/components/Switch/Switch.js +54 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/SystemNavigationBar/SystemNavigationBar.d.ts +16 -0
- package/dist/components/SystemNavigationBar/SystemNavigationBar.js +54 -0
- package/dist/components/SystemNavigationBar/SystemNavigationBar.js.map +1 -0
- package/dist/components/TabBar/TabBar.d.ts +101 -0
- package/dist/components/TabBar/TabBar.js +287 -0
- package/dist/components/TabBar/TabBar.js.map +1 -0
- package/dist/components/Table/Table.d.ts +135 -0
- package/dist/components/Table/Table.js +323 -0
- package/dist/components/Table/Table.js.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +61 -0
- package/dist/components/Tabs/Tabs.js +179 -0
- package/dist/components/Tabs/Tabs.js.map +1 -0
- package/dist/components/Tag/Tag.d.ts +37 -0
- package/dist/components/Tag/Tag.js +56 -0
- package/dist/components/Tag/Tag.js.map +1 -0
- package/dist/components/Textarea/Textarea.d.ts +37 -0
- package/dist/components/Textarea/Textarea.js +77 -0
- package/dist/components/Textarea/Textarea.js.map +1 -0
- package/dist/components/Tile/Tile.d.ts +31 -0
- package/dist/components/Tile/Tile.js +70 -0
- package/dist/components/Tile/Tile.js.map +1 -0
- package/dist/components/TimePicker/TimePicker.d.ts +43 -0
- package/dist/components/TimePicker/TimePicker.js +186 -0
- package/dist/components/TimePicker/TimePicker.js.map +1 -0
- package/dist/components/Toast/Toast.d.ts +42 -0
- package/dist/components/Toast/Toast.js +115 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/Toolbar/Toolbar.d.ts +22 -0
- package/dist/components/Toolbar/Toolbar.js +52 -0
- package/dist/components/Toolbar/Toolbar.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +28 -0
- package/dist/components/Tooltip/Tooltip.js +101 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/TopAppBar/TopAppBar.d.ts +36 -0
- package/dist/components/TopAppBar/TopAppBar.js +70 -0
- package/dist/components/TopAppBar/TopAppBar.js.map +1 -0
- package/dist/components/Topbar/Topbar.d.ts +28 -0
- package/dist/components/Topbar/Topbar.js +63 -0
- package/dist/components/Topbar/Topbar.js.map +1 -0
- package/dist/components/Topbar/TopbarLogo.d.ts +2 -0
- package/dist/components/Topbar/TopbarLogo.js +98 -0
- package/dist/components/Topbar/TopbarLogo.js.map +1 -0
- package/dist/components/TreeItem/TreeItem.d.ts +38 -0
- package/dist/components/TreeItem/TreeItem.js +126 -0
- package/dist/components/TreeItem/TreeItem.js.map +1 -0
- package/dist/components/VersionSwitcher/VersionSwitcher.d.ts +13 -0
- package/dist/components/VersionSwitcher/VersionSwitcher.js +43 -0
- package/dist/components/VersionSwitcher/VersionSwitcher.js.map +1 -0
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +28 -0
- package/dist/components/VideoPlayer/VideoPlayer.js +160 -0
- package/dist/components/VideoPlayer/VideoPlayer.js.map +1 -0
- package/dist/components/VoiceMode/VoiceMode.d.ts +27 -0
- package/dist/components/VoiceMode/VoiceMode.js +123 -0
- package/dist/components/VoiceMode/VoiceMode.js.map +1 -0
- package/dist/components/WebScreenTemplate/WebScreenTemplate.d.ts +36 -0
- package/dist/components/WebScreenTemplate/WebScreenTemplate.js +66 -0
- package/dist/components/WebScreenTemplate/WebScreenTemplate.js.map +1 -0
- package/dist/components/WhyThisSheet/WhyThisSheet.d.ts +23 -0
- package/dist/components/WhyThisSheet/WhyThisSheet.js +73 -0
- package/dist/components/WhyThisSheet/WhyThisSheet.js.map +1 -0
- package/dist/index.d.ts +124 -0
- package/dist/index.js +125 -0
- package/dist/styles.css +5637 -0
- package/dist/tokens.css +2338 -0
- package/package.json +50 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type HomeIndicatorAppearance = 'default' | 'on-color';
|
|
3
|
+
export interface HomeIndicatorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
4
|
+
/** Figma `Appearance`: Default follows the theme · On Color = white over brand, image or video. */
|
|
5
|
+
appearance?: HomeIndicatorAppearance;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Bodhan Home Indicator — a visual mock of the iOS home indicator for prototypes (presentational, hidden from
|
|
9
|
+
* assistive tech). iOS only: the `06 Platform` mode is pinned to iOS, like the Figma component. Height SafeArea/Bottom
|
|
10
|
+
* (34 pt), handle 134×5, 8 pt from the bottom. In product code the system draws it; keep controls out of the bottom safe area.
|
|
11
|
+
*/
|
|
12
|
+
export declare function HomeIndicator({ appearance, className, ...rest }: HomeIndicatorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
// src/components/HomeIndicator/HomeIndicator.tsx
|
|
3
|
+
/**
|
|
4
|
+
* Bodhan Home Indicator — a visual mock of the iOS home indicator for prototypes (presentational, hidden from
|
|
5
|
+
* assistive tech). iOS only: the `06 Platform` mode is pinned to iOS, like the Figma component. Height SafeArea/Bottom
|
|
6
|
+
* (34 pt), handle 134×5, 8 pt from the bottom. In product code the system draws it; keep controls out of the bottom safe area.
|
|
7
|
+
*/
|
|
8
|
+
function HomeIndicator({ appearance = "default", className, ...rest }) {
|
|
9
|
+
return /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className: ["bodhan-home-indicator", className].filter(Boolean).join(" "),
|
|
11
|
+
"data-platform": "ios",
|
|
12
|
+
"data-appearance": appearance,
|
|
13
|
+
"aria-hidden": "true",
|
|
14
|
+
...rest,
|
|
15
|
+
children: /* @__PURE__ */ jsx("span", { className: "bodhan-home-indicator__handle" })
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export { HomeIndicator };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=HomeIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HomeIndicator.js","names":[],"sources":["../../../src/components/HomeIndicator/HomeIndicator.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nexport type HomeIndicatorAppearance = 'default' | 'on-color';\n\nexport interface HomeIndicatorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n /** Figma `Appearance`: Default follows the theme · On Color = white over brand, image or video. */\n appearance?: HomeIndicatorAppearance;\n}\n\n/**\n * Bodhan Home Indicator — a visual mock of the iOS home indicator for prototypes (presentational, hidden from\n * assistive tech). iOS only: the `06 Platform` mode is pinned to iOS, like the Figma component. Height SafeArea/Bottom\n * (34 pt), handle 134×5, 8 pt from the bottom. In product code the system draws it; keep controls out of the bottom safe area.\n */\nexport function HomeIndicator({ appearance = 'default', className, ...rest }: HomeIndicatorProps) {\n return (\n <div\n className={['bodhan-home-indicator', className].filter(Boolean).join(' ')}\n data-platform=\"ios\" data-appearance={appearance} aria-hidden=\"true\" {...rest}\n >\n <span className=\"bodhan-home-indicator__handle\" />\n </div>\n );\n}\n"],"mappings":";;;;;;;AAcA,SAAgB,cAAc,EAAE,aAAa,WAAW,WAAW,GAAG,QAA4B;CAChG,OACE,oBAAC,OAAD;EACE,WAAW,CAAC,yBAAyB,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EACxE,iBAAc;EAAM,mBAAiB;EAAY,eAAY;EAAO,GAAI;EAExE,UAAA,oBAAC,QAAD,EAAM,WAAU,gCAAiC,CAAA;CAC9C,CAAA;AAET"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
export interface IconProps {
|
|
3
|
+
/** Material Symbols name, same as the Figma `Icon / <name>` component (e.g. "search", "arrow_forward"). */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Size in px. Defaults to the parent's `--bodhan-icon-size`, else 20. */
|
|
6
|
+
size?: number;
|
|
7
|
+
/** Filled variant (selected tab icons, etc.). */
|
|
8
|
+
filled?: boolean;
|
|
9
|
+
/** Accessible label. Omit for decorative icons (they are hidden from screen readers). */
|
|
10
|
+
label?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
/** Bodhan icon (Material Symbols Rounded). Load the font once: https://fonts.google.com/icons */
|
|
15
|
+
export declare function Icon({ name, size, filled, label, className, style }: IconProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
// src/components/Icon/Icon.tsx
|
|
3
|
+
/** Bodhan icon (Material Symbols Rounded). Load the font once: https://fonts.google.com/icons */
|
|
4
|
+
function Icon({ name, size, filled, label, className, style }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("span", {
|
|
6
|
+
className: [
|
|
7
|
+
"bodhan-icon",
|
|
8
|
+
"material-symbols-rounded",
|
|
9
|
+
className
|
|
10
|
+
].filter(Boolean).join(" "),
|
|
11
|
+
style: {
|
|
12
|
+
...size ? { ["--bodhan-icon-size"]: `${size}px` } : null,
|
|
13
|
+
...filled ? { fontVariationSettings: "'FILL' 1" } : null,
|
|
14
|
+
...style
|
|
15
|
+
},
|
|
16
|
+
"aria-hidden": label ? void 0 : true,
|
|
17
|
+
"aria-label": label,
|
|
18
|
+
role: label ? "img" : void 0,
|
|
19
|
+
children: name
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export { Icon };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=Icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.js","names":[],"sources":["../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import type { CSSProperties } from 'react';\n\nexport interface IconProps {\n /** Material Symbols name, same as the Figma `Icon / <name>` component (e.g. \"search\", \"arrow_forward\"). */\n name: string;\n /** Size in px. Defaults to the parent's `--bodhan-icon-size`, else 20. */\n size?: number;\n /** Filled variant (selected tab icons, etc.). */\n filled?: boolean;\n /** Accessible label. Omit for decorative icons (they are hidden from screen readers). */\n label?: string;\n className?: string;\n style?: CSSProperties;\n}\n\n/** Bodhan icon (Material Symbols Rounded). Load the font once: https://fonts.google.com/icons */\nexport function Icon({ name, size, filled, label, className, style }: IconProps) {\n return (\n <span\n className={['bodhan-icon', 'material-symbols-rounded', className].filter(Boolean).join(' ')}\n style={{ ...(size ? { ['--bodhan-icon-size' as string]: `${size}px` } : null), ...(filled ? { fontVariationSettings: \"'FILL' 1\" } : null), ...style }}\n aria-hidden={label ? undefined : true}\n aria-label={label}\n role={label ? 'img' : undefined}\n >\n {name}\n </span>\n );\n}\n"],"mappings":";;;AAgBA,SAAgB,KAAK,EAAE,MAAM,MAAM,QAAQ,OAAO,WAAW,SAAoB;CAC/E,OACE,oBAAC,QAAD;EACE,WAAW;GAAC;GAAe;GAA4B;EAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAC1F,OAAO;GAAE,GAAI,OAAO,GAAG,uBAAiC,GAAG,KAAK,IAAI,IAAI;GAAO,GAAI,SAAS,EAAE,uBAAuB,WAAW,IAAI;GAAO,GAAG;EAAM;EACpJ,eAAa,QAAQ,KAAA,IAAY;EACjC,cAAY;EACZ,MAAM,QAAQ,QAAQ,KAAA;EAErB,UAAA;CACG,CAAA;AAEV"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type IconButtonStyle = 'filled' | 'outlined' | 'ghost';
|
|
3
|
+
export type IconButtonSize = 'small' | 'medium' | 'large';
|
|
4
|
+
export type IconButtonShape = 'circle' | 'rounded-square';
|
|
5
|
+
export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'children'> {
|
|
6
|
+
/** Figma `Icon` (instance swap): Material Symbols name or a node. */
|
|
7
|
+
icon?: string | ReactNode;
|
|
8
|
+
/** Accessible name (icon-only buttons must have one). Rendered as `aria-label`. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Figma `Style` (named `variant` because `style` is the React inline-style prop). */
|
|
11
|
+
variant?: IconButtonStyle;
|
|
12
|
+
/** Figma `Size`. */
|
|
13
|
+
size?: IconButtonSize;
|
|
14
|
+
/** Figma `Shape`. On iOS / Android `Rounded Square` resolves to a circle too (`06 Platform` Button/Radius = 999). */
|
|
15
|
+
shape?: IconButtonShape;
|
|
16
|
+
/** Shows the spinner, blocks clicks, sets aria-busy (Figma `Loading Spinner` layer). */
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
/** HTML button type. */
|
|
19
|
+
htmlType?: 'button' | 'submit' | 'reset';
|
|
20
|
+
/** Force a visual state for documentation (`State=Hover|Focus|Pressed`). Leave unset in product code. */
|
|
21
|
+
forceState?: 'hover' | 'focus' | 'pressed';
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Bodhan Icon Button. Platform (Web / iOS / Android) comes from `data-platform` on an ancestor:
|
|
25
|
+
* size (Button/Native/Height/*), icon size and Rounded Square radius follow the `06 Platform` mode.
|
|
26
|
+
* The hit area is at least `Touch Target/Min Size` (24 Web · 44 iOS · 48 Android) even when the visual is smaller.
|
|
27
|
+
* Android: IconButton / FilledIconButton / OutlinedIconButton · iOS: Button { Image(systemName:) }
|
|
28
|
+
*/
|
|
29
|
+
export declare function IconButton({ icon, label, variant, size, shape, loading, htmlType, forceState, disabled, className, ...rest }: IconButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Icon } from "../Icon/Icon.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/IconButton/IconButton.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Bodhan Icon Button. Platform (Web / iOS / Android) comes from `data-platform` on an ancestor:
|
|
6
|
+
* size (Button/Native/Height/*), icon size and Rounded Square radius follow the `06 Platform` mode.
|
|
7
|
+
* The hit area is at least `Touch Target/Min Size` (24 Web · 44 iOS · 48 Android) even when the visual is smaller.
|
|
8
|
+
* Android: IconButton / FilledIconButton / OutlinedIconButton · iOS: Button { Image(systemName:) }
|
|
9
|
+
*/
|
|
10
|
+
function IconButton({ icon = "close", label, variant = "filled", size = "small", shape = "circle", loading, htmlType = "button", forceState, disabled, className, ...rest }) {
|
|
11
|
+
return /* @__PURE__ */ jsx("button", {
|
|
12
|
+
type: htmlType,
|
|
13
|
+
className: ["bodhan-icon-button", className].filter(Boolean).join(" "),
|
|
14
|
+
"data-variant": variant,
|
|
15
|
+
"data-size": size,
|
|
16
|
+
"data-shape": shape,
|
|
17
|
+
"data-state": forceState,
|
|
18
|
+
"data-loading": loading || void 0,
|
|
19
|
+
disabled,
|
|
20
|
+
"aria-label": label,
|
|
21
|
+
"aria-busy": loading || void 0,
|
|
22
|
+
"aria-disabled": loading || void 0,
|
|
23
|
+
...rest,
|
|
24
|
+
onClick: loading ? void 0 : rest.onClick,
|
|
25
|
+
children: loading ? /* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "bodhan-icon-button__spinner",
|
|
27
|
+
"aria-hidden": "true"
|
|
28
|
+
}) : typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon }) : icon
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export { IconButton };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=IconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.js","names":[],"sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes, ReactNode } from 'react';\nimport { Icon } from '../Icon/Icon';\n\nexport type IconButtonStyle = 'filled' | 'outlined' | 'ghost';\nexport type IconButtonSize = 'small' | 'medium' | 'large';\nexport type IconButtonShape = 'circle' | 'rounded-square';\n\nexport interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'children'> {\n /** Figma `Icon` (instance swap): Material Symbols name or a node. */\n icon?: string | ReactNode;\n /** Accessible name (icon-only buttons must have one). Rendered as `aria-label`. */\n label: string;\n /** Figma `Style` (named `variant` because `style` is the React inline-style prop). */\n variant?: IconButtonStyle;\n /** Figma `Size`. */\n size?: IconButtonSize;\n /** Figma `Shape`. On iOS / Android `Rounded Square` resolves to a circle too (`06 Platform` Button/Radius = 999). */\n shape?: IconButtonShape;\n /** Shows the spinner, blocks clicks, sets aria-busy (Figma `Loading Spinner` layer). */\n loading?: boolean;\n /** HTML button type. */\n htmlType?: 'button' | 'submit' | 'reset';\n /** Force a visual state for documentation (`State=Hover|Focus|Pressed`). Leave unset in product code. */\n forceState?: 'hover' | 'focus' | 'pressed';\n}\n\n/**\n * Bodhan Icon Button. Platform (Web / iOS / Android) comes from `data-platform` on an ancestor:\n * size (Button/Native/Height/*), icon size and Rounded Square radius follow the `06 Platform` mode.\n * The hit area is at least `Touch Target/Min Size` (24 Web · 44 iOS · 48 Android) even when the visual is smaller.\n * Android: IconButton / FilledIconButton / OutlinedIconButton · iOS: Button { Image(systemName:) }\n */\nexport function IconButton({\n icon = 'close', label, variant = 'filled', size = 'small', shape = 'circle', loading, htmlType = 'button',\n forceState, disabled, className, ...rest\n}: IconButtonProps) {\n return (\n <button\n type={htmlType}\n className={['bodhan-icon-button', className].filter(Boolean).join(' ')}\n data-variant={variant}\n data-size={size}\n data-shape={shape}\n data-state={forceState}\n data-loading={loading || undefined}\n disabled={disabled}\n aria-label={label}\n aria-busy={loading || undefined}\n aria-disabled={loading || undefined}\n {...rest}\n onClick={loading ? undefined : rest.onClick}\n >\n {loading ? <span className=\"bodhan-icon-button__spinner\" aria-hidden=\"true\" /> : typeof icon === 'string' ? <Icon name={icon} /> : icon}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;AAgCA,SAAgB,WAAW,EACzB,OAAO,SAAS,OAAO,UAAU,UAAU,OAAO,SAAS,QAAQ,UAAU,SAAS,WAAW,UACjG,YAAY,UAAU,WAAW,GAAG,QAClB;CAClB,OACE,oBAAC,UAAD;EACE,MAAM;EACN,WAAW,CAAC,sBAAsB,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EACrE,gBAAc;EACd,aAAW;EACX,cAAY;EACZ,cAAY;EACZ,gBAAc,WAAW,KAAA;EACf;EACV,cAAY;EACZ,aAAW,WAAW,KAAA;EACtB,iBAAe,WAAW,KAAA;EAC1B,GAAI;EACJ,SAAS,UAAU,KAAA,IAAY,KAAK;EAEnC,UAAA,UAAU,oBAAC,QAAD;GAAM,WAAU;GAA8B,eAAY;EAAQ,CAAA,IAAI,OAAO,SAAS,WAAW,oBAAC,MAAD,EAAM,MAAM,KAAO,CAAA,IAAI;CAC7H,CAAA;AAEZ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type SVGAttributes } from 'react';
|
|
2
|
+
export type IllustrationType = 'empty-search' | 'empty-course' | 'empty-lesson' | 'empty-assignment' | 'empty-quiz' | 'empty-calendar' | 'ai-assistant' | 'ai-thinking' | 'ai-response' | 'ai-learning' | 'reading' | 'learning' | 'practice' | 'success' | 'achievement' | 'completion' | 'error' | 'warning' | 'failed' | 'offline' | 'no-internet' | 'sync' | 'upload' | 'download' | 'analytics' | 'dashboard' | 'student' | 'teacher' | 'empty-bookmark' | 'empty-chat' | 'empty-notification' | 'empty-playlist' | 'empty-templates' | 'empty-trash' | 'empty-wallet' | 'no-access' | 'no-audio' | 'no-bank-connected' | 'no-call-record' | 'no-credit-cards' | 'no-dashboard' | 'no-data' | 'no-event' | 'no-image' | 'no-location-found' | 'no-messages' | 'no-network' | 'no-product' | 'no-result' | 'no-saving' | 'no-task' | 'not-logged-in';
|
|
3
|
+
/** Every Figma `Type` as its kebab-case prop value (for pickers and docs). */
|
|
4
|
+
export declare const ILLUSTRATION_TYPES: IllustrationType[];
|
|
5
|
+
export interface IllustrationProps extends Omit<SVGAttributes<SVGSVGElement>, 'type'> {
|
|
6
|
+
/** Figma `Type` (kebab-case): spot circles (120) or scene illustrations (171 × 223). */
|
|
7
|
+
type?: IllustrationType;
|
|
8
|
+
/**
|
|
9
|
+
* Accessible name. Omit for decorative use (the default — the surrounding title and body carry the message);
|
|
10
|
+
* then the artwork is hidden from assistive tech.
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
/** Rendered width in px (height keeps the aspect ratio). Defaults to the Figma size. */
|
|
14
|
+
size?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Bodhan Illustration — spot illustrations for empty, onboarding and status screens, inlined as SVG.
|
|
18
|
+
* Every fill is a CSS custom property from 03 Alias (Background/Subtle, Primary/Subtle…, Illustration/Panel|Base|Deep|Fill|Stroke|Accent),
|
|
19
|
+
* so the artwork follows Light/Dark and the active brand. Same artwork on Web, iOS and Android.
|
|
20
|
+
* Android: Image(painterResource(R.drawable.illustration_…)) with tinted vectors · iOS: Image("illustration-…").
|
|
21
|
+
*/
|
|
22
|
+
export declare function Illustration({ type, label, size, className, style, ...rest }: IllustrationProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ILLUSTRATIONS } from "./illustrations.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from "react";
|
|
4
|
+
// src/components/Illustration/Illustration.tsx
|
|
5
|
+
/** Every Figma `Type` as its kebab-case prop value (for pickers and docs). */
|
|
6
|
+
var ILLUSTRATION_TYPES = Object.keys(ILLUSTRATIONS).map((t) => t.toLowerCase().replace(/\s+/g, "-"));
|
|
7
|
+
var byKey = Object.fromEntries(Object.entries(ILLUSTRATIONS).map(([t, v]) => [t.toLowerCase().replace(/\s+/g, "-"), v]));
|
|
8
|
+
/**
|
|
9
|
+
* Bodhan Illustration — spot illustrations for empty, onboarding and status screens, inlined as SVG.
|
|
10
|
+
* Every fill is a CSS custom property from 03 Alias (Background/Subtle, Primary/Subtle…, Illustration/Panel|Base|Deep|Fill|Stroke|Accent),
|
|
11
|
+
* so the artwork follows Light/Dark and the active brand. Same artwork on Web, iOS and Android.
|
|
12
|
+
* Android: Image(painterResource(R.drawable.illustration_…)) with tinted vectors · iOS: Image("illustration-…").
|
|
13
|
+
*/
|
|
14
|
+
function Illustration({ type = "empty-search", label, size, className, style, ...rest }) {
|
|
15
|
+
const uid = useId().replace(/[^a-zA-Z0-9_-]/g, "");
|
|
16
|
+
const art = byKey[type] ?? byKey["empty-search"];
|
|
17
|
+
const body = art.body.replace(/clip0_[0-9_]+/g, `bodhan-illus-${uid}`);
|
|
18
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
19
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
20
|
+
viewBox: `0 0 ${art.w} ${art.h}`,
|
|
21
|
+
width: size ?? art.w,
|
|
22
|
+
height: size ? size * art.h / art.w : art.h,
|
|
23
|
+
fill: "none",
|
|
24
|
+
className: ["bodhan-illustration", className].filter(Boolean).join(" "),
|
|
25
|
+
"data-type": type,
|
|
26
|
+
role: label ? "img" : void 0,
|
|
27
|
+
"aria-label": label,
|
|
28
|
+
"aria-hidden": label ? void 0 : true,
|
|
29
|
+
focusable: "false",
|
|
30
|
+
style,
|
|
31
|
+
...rest,
|
|
32
|
+
dangerouslySetInnerHTML: { __html: body }
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export { ILLUSTRATION_TYPES, Illustration };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=Illustration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Illustration.js","names":[],"sources":["../../../src/components/Illustration/Illustration.tsx"],"sourcesContent":["import { useId, type SVGAttributes } from 'react';\nimport { ILLUSTRATIONS } from './illustrations';\n\nexport type IllustrationType =\n | 'empty-search' | 'empty-course' | 'empty-lesson' | 'empty-assignment' | 'empty-quiz' | 'empty-calendar'\n | 'ai-assistant' | 'ai-thinking' | 'ai-response' | 'ai-learning' | 'reading' | 'learning' | 'practice'\n | 'success' | 'achievement' | 'completion' | 'error' | 'warning' | 'failed' | 'offline' | 'no-internet' | 'sync'\n | 'upload' | 'download' | 'analytics' | 'dashboard' | 'student' | 'teacher' | 'empty-bookmark' | 'empty-chat'\n | 'empty-notification' | 'empty-playlist' | 'empty-templates' | 'empty-trash' | 'empty-wallet' | 'no-access'\n | 'no-audio' | 'no-bank-connected' | 'no-call-record' | 'no-credit-cards' | 'no-dashboard' | 'no-data' | 'no-event'\n | 'no-image' | 'no-location-found' | 'no-messages' | 'no-network' | 'no-product' | 'no-result' | 'no-saving'\n | 'no-task' | 'not-logged-in';\n\n/** Every Figma `Type` as its kebab-case prop value (for pickers and docs). */\nexport const ILLUSTRATION_TYPES = Object.keys(ILLUSTRATIONS).map((t) => t.toLowerCase().replace(/\\s+/g, '-')) as IllustrationType[];\nconst byKey: Record<string, (typeof ILLUSTRATIONS)[string]> = Object.fromEntries(\n Object.entries(ILLUSTRATIONS).map(([t, v]) => [t.toLowerCase().replace(/\\s+/g, '-'), v]),\n);\n\nexport interface IllustrationProps extends Omit<SVGAttributes<SVGSVGElement>, 'type'> {\n /** Figma `Type` (kebab-case): spot circles (120) or scene illustrations (171 × 223). */\n type?: IllustrationType;\n /**\n * Accessible name. Omit for decorative use (the default — the surrounding title and body carry the message);\n * then the artwork is hidden from assistive tech.\n */\n label?: string;\n /** Rendered width in px (height keeps the aspect ratio). Defaults to the Figma size. */\n size?: number;\n}\n\n/**\n * Bodhan Illustration — spot illustrations for empty, onboarding and status screens, inlined as SVG.\n * Every fill is a CSS custom property from 03 Alias (Background/Subtle, Primary/Subtle…, Illustration/Panel|Base|Deep|Fill|Stroke|Accent),\n * so the artwork follows Light/Dark and the active brand. Same artwork on Web, iOS and Android.\n * Android: Image(painterResource(R.drawable.illustration_…)) with tinted vectors · iOS: Image(\"illustration-…\").\n */\nexport function Illustration({ type = 'empty-search', label, size, className, style, ...rest }: IllustrationProps) {\n const uid = useId().replace(/[^a-zA-Z0-9_-]/g, '');\n const art = byKey[type] ?? byKey['empty-search'];\n const body = art.body.replace(/clip0_[0-9_]+/g, `bodhan-illus-${uid}`);\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox={`0 0 ${art.w} ${art.h}`}\n width={size ?? art.w}\n height={size ? (size * art.h) / art.w : art.h}\n fill=\"none\"\n className={['bodhan-illustration', className].filter(Boolean).join(' ')}\n data-type={type}\n role={label ? 'img' : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n focusable=\"false\"\n style={style}\n {...rest}\n dangerouslySetInnerHTML={{ __html: body }}\n />\n );\n}\n"],"mappings":";;;;;AAcA,IAAa,qBAAqB,OAAO,KAAK,aAAa,CAAC,CAAC,KAAK,MAAM,EAAE,YAAY,CAAC,CAAC,QAAQ,QAAQ,GAAG,CAAC;AAC5G,IAAM,QAAwD,OAAO,YACnE,OAAO,QAAQ,aAAa,CAAC,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,QAAQ,QAAQ,GAAG,GAAG,CAAC,CAAC,CACzF;;;;;;;AAoBA,SAAgB,aAAa,EAAE,OAAO,gBAAgB,OAAO,MAAM,WAAW,OAAO,GAAG,QAA2B;CACjH,MAAM,MAAM,MAAM,CAAC,CAAC,QAAQ,mBAAmB,EAAE;CACjD,MAAM,MAAM,MAAM,SAAS,MAAM;CACjC,MAAM,OAAO,IAAI,KAAK,QAAQ,kBAAkB,gBAAgB,KAAK;CACrE,OACE,oBAAC,OAAD;EACE,OAAM;EACN,SAAS,OAAO,IAAI,EAAE,GAAG,IAAI;EAC7B,OAAO,QAAQ,IAAI;EACnB,QAAQ,OAAQ,OAAO,IAAI,IAAK,IAAI,IAAI,IAAI;EAC5C,MAAK;EACL,WAAW,CAAC,uBAAuB,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EACtE,aAAW;EACX,MAAM,QAAQ,QAAQ,KAAA;EACtB,cAAY;EACZ,eAAa,QAAQ,KAAA,IAAY;EACjC,WAAU;EACH;EACP,GAAI;EACJ,yBAAyB,EAAE,QAAQ,KAAK;CACzC,CAAA;AAEL"}
|