@once-ui-system/core 1.8.3 → 2.0.0-alpha.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/ai/catalog.json +166 -78
- package/ai/components/Accordion.json +1 -1
- package/ai/components/BarChart.json +34 -3
- package/ai/components/Book.json +128 -0
- package/ai/components/Button.json +1 -1
- package/ai/components/Card.json +1 -0
- package/ai/components/Carousel.json +1 -1
- package/ai/components/ChartHeader.json +2 -1
- package/ai/components/ChartStatus.json +2 -1
- package/ai/components/Checkbox.json +2 -2
- package/ai/components/CodeBlock.json +23 -2
- package/ai/components/ColorInput.json +1 -1
- package/ai/components/DataTooltip.json +3 -2
- package/ai/components/DatePicker.json +2 -2
- package/ai/components/Dialog.json +1 -1
- package/ai/components/DropdownWrapper.json +6 -4
- package/ai/components/Effect.json +133 -0
- package/ai/components/Fade.json +1 -1
- package/ai/components/Feedback.json +1 -1
- package/ai/components/IconButton.json +1 -1
- package/ai/components/InfoTip.json +125 -0
- package/ai/components/Input.json +5 -4
- package/ai/components/Legend.json +2 -1
- package/ai/components/LineBarChart.json +34 -3
- package/ai/components/LineChart.json +39 -3
- package/ai/components/LinearGauge.json +3 -2
- package/ai/components/LinearGradient.json +2 -1
- package/ai/components/Logo.json +2 -2
- package/ai/components/Media.json +1 -1
- package/ai/components/MediaUpload.json +21 -2
- package/ai/components/Modal.json +1 -1
- package/ai/components/NavGroup.json +130 -0
- package/ai/components/NavIcon.json +1 -1
- package/ai/components/NavItem.json +14 -0
- package/ai/components/Option.json +2 -2
- package/ai/components/Particle.json +1 -1
- package/ai/components/PieChart.json +32 -3
- package/ai/components/ProgressBar.json +1 -1
- package/ai/components/Pulse.json +1 -1
- package/ai/components/RadialGauge.json +4 -3
- package/ai/components/RadialGradient.json +2 -1
- package/ai/components/RadioButton.json +1 -1
- package/ai/components/RevealFx.json +1 -1
- package/ai/components/Scrubber.json +136 -0
- package/ai/components/SegmentedControl.json +3 -3
- package/ai/components/Setting.json +128 -0
- package/ai/components/SettingAxes.json +127 -0
- package/ai/components/SettingGroup.json +129 -0
- package/ai/components/ShineFx.json +1 -1
- package/ai/components/Skeleton.json +2 -3
- package/ai/components/SplitView.json +2 -0
- package/ai/components/StylePanel.json +4 -2
- package/ai/components/Swatch.json +11 -0
- package/ai/components/Swiper.json +1 -1
- package/ai/components/Switch.json +1 -1
- package/ai/components/Tag.json +1 -1
- package/ai/components/Textarea.json +6 -5
- package/ai/components/ThemeSwitcher.json +3 -0
- package/ai/components/Toast.json +1 -1
- package/ai/components/ToggleButton.json +2 -1
- package/ai/eval-tasks.md +8 -0
- package/ai/examples/app-shell.tsx +111 -0
- package/ai/examples/auth.tsx +1 -1
- package/ai/examples/blocks/Dashboard1.tsx +17 -28
- package/ai/examples/blocks/Feed3.tsx +4 -4
- package/ai/examples/blocks/Footer1.tsx +5 -3
- package/ai/examples/blocks/Footer2.tsx +3 -3
- package/ai/examples/blocks/Footer3.tsx +1 -1
- package/ai/examples/blocks/Footer4.tsx +6 -5
- package/ai/examples/blocks/Header1.tsx +7 -6
- package/ai/examples/blocks/Header3.tsx +7 -7
- package/ai/examples/blocks/Header4.tsx +5 -5
- package/ai/examples/blocks/Sidebar4.tsx +1 -1
- package/ai/examples/blocks/Streaming1.tsx +4 -4
- package/ai/examples/blocks/Table1.tsx +6 -6
- package/ai/examples/blocks/Waitlist1.tsx +5 -5
- package/ai/examples/blocks/content/resources.ts +3 -1
- package/ai/examples/dashboard.tsx +8 -9
- package/ai/examples/marketing-hero.tsx +2 -2
- package/ai/examples/pricing.tsx +4 -5
- package/ai/examples/settings.tsx +3 -3
- package/ai/gotchas.json +80 -23
- package/ai/layouts.md +154 -0
- package/ai/manifest.json +3 -2
- package/ai/recipes.md +49 -4
- package/ai/rules.compact.md +18 -3
- package/ai/rules.md +68 -10
- package/ai/spec.json +634 -176
- package/dist/ai/catalog.json +166 -78
- package/dist/ai/components/Accordion.json +1 -1
- package/dist/ai/components/BarChart.json +34 -3
- package/dist/ai/components/Book.json +128 -0
- package/dist/ai/components/Button.json +1 -1
- package/dist/ai/components/Card.json +1 -0
- package/dist/ai/components/Carousel.json +1 -1
- package/dist/ai/components/ChartHeader.json +2 -1
- package/dist/ai/components/ChartStatus.json +2 -1
- package/dist/ai/components/Checkbox.json +2 -2
- package/dist/ai/components/CodeBlock.json +23 -2
- package/dist/ai/components/ColorInput.json +1 -1
- package/dist/ai/components/DataTooltip.json +3 -2
- package/dist/ai/components/DatePicker.json +2 -2
- package/dist/ai/components/Dialog.json +1 -1
- package/dist/ai/components/DropdownWrapper.json +6 -4
- package/dist/ai/components/Effect.json +133 -0
- package/dist/ai/components/Fade.json +1 -1
- package/dist/ai/components/Feedback.json +1 -1
- package/dist/ai/components/IconButton.json +1 -1
- package/dist/ai/components/InfoTip.json +125 -0
- package/dist/ai/components/Input.json +5 -4
- package/dist/ai/components/Legend.json +2 -1
- package/dist/ai/components/LineBarChart.json +34 -3
- package/dist/ai/components/LineChart.json +39 -3
- package/dist/ai/components/LinearGauge.json +3 -2
- package/dist/ai/components/LinearGradient.json +2 -1
- package/dist/ai/components/Logo.json +2 -2
- package/dist/ai/components/Media.json +1 -1
- package/dist/ai/components/MediaUpload.json +21 -2
- package/dist/ai/components/Modal.json +1 -1
- package/dist/ai/components/NavGroup.json +130 -0
- package/dist/ai/components/NavIcon.json +1 -1
- package/dist/ai/components/NavItem.json +14 -0
- package/dist/ai/components/Option.json +2 -2
- package/dist/ai/components/Particle.json +1 -1
- package/dist/ai/components/PieChart.json +32 -3
- package/dist/ai/components/ProgressBar.json +1 -1
- package/dist/ai/components/Pulse.json +1 -1
- package/dist/ai/components/RadialGauge.json +4 -3
- package/dist/ai/components/RadialGradient.json +2 -1
- package/dist/ai/components/RadioButton.json +1 -1
- package/dist/ai/components/RevealFx.json +1 -1
- package/dist/ai/components/Scrubber.json +136 -0
- package/dist/ai/components/SegmentedControl.json +3 -3
- package/dist/ai/components/Setting.json +128 -0
- package/dist/ai/components/SettingAxes.json +127 -0
- package/dist/ai/components/SettingGroup.json +129 -0
- package/dist/ai/components/ShineFx.json +1 -1
- package/dist/ai/components/Skeleton.json +2 -3
- package/dist/ai/components/SplitView.json +2 -0
- package/dist/ai/components/StylePanel.json +4 -2
- package/dist/ai/components/Swatch.json +11 -0
- package/dist/ai/components/Swiper.json +1 -1
- package/dist/ai/components/Switch.json +1 -1
- package/dist/ai/components/Tag.json +1 -1
- package/dist/ai/components/Textarea.json +6 -5
- package/dist/ai/components/ThemeSwitcher.json +3 -0
- package/dist/ai/components/Toast.json +1 -1
- package/dist/ai/components/ToggleButton.json +2 -1
- package/dist/ai/eval-tasks.md +8 -0
- package/dist/ai/gotchas.json +80 -23
- package/dist/ai/layouts.md +154 -0
- package/dist/ai/manifest.json +3 -2
- package/dist/ai/recipes.md +49 -4
- package/dist/ai/rules.compact.md +18 -3
- package/dist/ai/rules.md +68 -10
- package/dist/ai/spec.json +634 -176
- package/dist/components/Accordion.d.ts +2 -1
- package/dist/components/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion.js.map +1 -1
- package/dist/components/Avatar.js +1 -1
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/Background.d.ts +6 -6
- package/dist/components/Background.d.ts.map +1 -1
- package/dist/components/Book.d.ts +28 -0
- package/dist/components/Book.d.ts.map +1 -0
- package/dist/components/Book.js +24 -0
- package/dist/components/Book.js.map +1 -0
- package/dist/components/Book.module.scss +45 -0
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +4 -4
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Card.d.ts +8 -0
- package/dist/components/Card.d.ts.map +1 -1
- package/dist/components/Card.js +10 -2
- package/dist/components/Card.js.map +1 -1
- package/dist/components/Card.module.scss +11 -1
- package/dist/components/Carousel.d.ts +7 -1
- package/dist/components/Carousel.d.ts.map +1 -1
- package/dist/components/Carousel.js +7 -7
- package/dist/components/Carousel.js.map +1 -1
- package/dist/components/Carousel.module.scss +1 -8
- package/dist/components/Checkbox.d.ts +3 -3
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +5 -5
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/ClientFlex.d.ts.map +1 -1
- package/dist/components/ClientFlex.js +5 -10
- package/dist/components/ClientFlex.js.map +1 -1
- package/dist/components/ClientGrid.d.ts.map +1 -1
- package/dist/components/ClientGrid.js +2 -7
- package/dist/components/ClientGrid.js.map +1 -1
- package/dist/components/ColorInput.d.ts +1 -1
- package/dist/components/ColorInput.d.ts.map +1 -1
- package/dist/components/ColorInput.js +7 -13
- package/dist/components/ColorInput.js.map +1 -1
- package/dist/components/CompareImage.d.ts +1 -1
- package/dist/components/CompareImage.d.ts.map +1 -1
- package/dist/components/CompareImage.js +2 -2
- package/dist/components/CompareImage.js.map +1 -1
- package/dist/components/DateInput.d.ts.map +1 -1
- package/dist/components/DateInput.js +10 -1
- package/dist/components/DateInput.js.map +1 -1
- package/dist/components/DatePicker.d.ts +2 -2
- package/dist/components/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker.js +21 -14
- package/dist/components/DatePicker.js.map +1 -1
- package/dist/components/DateRangeInput.js +3 -3
- package/dist/components/DateRangeInput.js.map +1 -1
- package/dist/components/Dialog.d.ts +1 -1
- package/dist/components/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog.js +14 -14
- package/dist/components/Dialog.js.map +1 -1
- package/dist/components/DropdownWrapper.d.ts +8 -3
- package/dist/components/DropdownWrapper.d.ts.map +1 -1
- package/dist/components/DropdownWrapper.js +17 -6
- package/dist/components/DropdownWrapper.js.map +1 -1
- package/dist/components/Effect.d.ts +41 -0
- package/dist/components/Effect.d.ts.map +1 -0
- package/dist/components/Effect.js +30 -0
- package/dist/components/Effect.js.map +1 -0
- package/dist/components/ElementType.d.ts +2 -1
- package/dist/components/ElementType.d.ts.map +1 -1
- package/dist/components/ElementType.js +4 -2
- package/dist/components/ElementType.js.map +1 -1
- package/dist/components/EmojiPicker.d.ts +1 -1
- package/dist/components/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker.js +1 -1
- package/dist/components/EmojiPicker.js.map +1 -1
- package/dist/components/FadingLettersFx.d.ts +1 -1
- package/dist/components/FadingLettersFx.d.ts.map +1 -1
- package/dist/components/Feedback.d.ts +1 -1
- package/dist/components/Feedback.d.ts.map +1 -1
- package/dist/components/Feedback.js +2 -2
- package/dist/components/Feedback.js.map +1 -1
- package/dist/components/Flex.d.ts.map +1 -1
- package/dist/components/Flex.js +46 -5
- package/dist/components/Flex.js.map +1 -1
- package/dist/components/Heading.d.ts +1 -1
- package/dist/components/Icon.d.ts.map +1 -1
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/IconButton.d.ts +1 -1
- package/dist/components/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton.js +4 -4
- package/dist/components/IconButton.js.map +1 -1
- package/dist/components/InfiniteScroll.d.ts +1 -1
- package/dist/components/InfiniteScroll.d.ts.map +1 -1
- package/dist/components/InfoTip.d.ts +17 -0
- package/dist/components/InfoTip.d.ts.map +1 -0
- package/dist/components/InfoTip.js +12 -0
- package/dist/components/InfoTip.js.map +1 -0
- package/dist/components/Input.d.ts +11 -5
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.js +32 -16
- package/dist/components/Input.js.map +1 -1
- package/dist/components/Input.module.scss +313 -1
- package/dist/components/InteractiveDetails.d.ts.map +1 -1
- package/dist/components/InteractiveDetails.js +1 -1
- package/dist/components/InteractiveDetails.js.map +1 -1
- package/dist/components/Kbd.d.ts.map +1 -1
- package/dist/components/Kbd.js +4 -1
- package/dist/components/Kbd.js.map +1 -1
- package/dist/components/Logo.d.ts +16 -4
- package/dist/components/Logo.d.ts.map +1 -1
- package/dist/components/Logo.js +32 -14
- package/dist/components/Logo.js.map +1 -1
- package/dist/components/Media.d.ts +9 -2
- package/dist/components/Media.d.ts.map +1 -1
- package/dist/components/Media.js +25 -16
- package/dist/components/Media.js.map +1 -1
- package/dist/components/MediaAudioPlayer.d.ts +29 -0
- package/dist/components/MediaAudioPlayer.d.ts.map +1 -0
- package/dist/components/MediaAudioPlayer.js +115 -0
- package/dist/components/MediaAudioPlayer.js.map +1 -0
- package/dist/components/MediaAudioPlayer.module.scss +38 -0
- package/dist/components/Modal.d.ts +1 -1
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +10 -10
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/NavGroup.d.ts +33 -0
- package/dist/components/NavGroup.d.ts.map +1 -0
- package/dist/components/NavGroup.js +27 -0
- package/dist/components/NavGroup.js.map +1 -0
- package/dist/components/NavIcon.d.ts +1 -1
- package/dist/components/NavIcon.d.ts.map +1 -1
- package/dist/components/NavIcon.js +2 -2
- package/dist/components/NavIcon.js.map +1 -1
- package/dist/components/NavItem.d.ts +24 -0
- package/dist/components/NavItem.d.ts.map +1 -0
- package/dist/components/NavItem.js +18 -0
- package/dist/components/NavItem.js.map +1 -0
- package/dist/components/NumberInput.js +1 -1
- package/dist/components/NumberInput.js.map +1 -1
- package/dist/components/OgCard.d.ts +1 -1
- package/dist/components/OgCard.js +3 -3
- package/dist/components/OgCard.js.map +1 -1
- package/dist/components/Option.d.ts +3 -3
- package/dist/components/Option.d.ts.map +1 -1
- package/dist/components/Option.js +2 -2
- package/dist/components/Option.js.map +1 -1
- package/dist/components/Particle.d.ts +2 -2
- package/dist/components/Particle.d.ts.map +1 -1
- package/dist/components/PasswordInput.d.ts.map +1 -1
- package/dist/components/PasswordInput.js +2 -2
- package/dist/components/PasswordInput.js.map +1 -1
- package/dist/components/ProgressBar.d.ts +1 -1
- package/dist/components/ProgressBar.d.ts.map +1 -1
- package/dist/components/ProgressBar.js +2 -2
- package/dist/components/ProgressBar.js.map +1 -1
- package/dist/components/Pulse.d.ts +1 -1
- package/dist/components/Pulse.d.ts.map +1 -1
- package/dist/components/Pulse.js +2 -2
- package/dist/components/Pulse.js.map +1 -1
- package/dist/components/RadioButton.d.ts +2 -2
- package/dist/components/RadioButton.d.ts.map +1 -1
- package/dist/components/RadioButton.js +1 -1
- package/dist/components/RadioButton.js.map +1 -1
- package/dist/components/RevealFx.d.ts +2 -1
- package/dist/components/RevealFx.d.ts.map +1 -1
- package/dist/components/RevealFx.js +8 -8
- package/dist/components/RevealFx.js.map +1 -1
- package/dist/components/ScrollContainer.d.ts.map +1 -1
- package/dist/components/ScrollContainer.js +1 -1
- package/dist/components/ScrollContainer.js.map +1 -1
- package/dist/components/ScrollToTop.d.ts +1 -1
- package/dist/components/Scrubber.d.ts +70 -0
- package/dist/components/Scrubber.d.ts.map +1 -0
- package/dist/components/Scrubber.js +161 -0
- package/dist/components/Scrubber.js.map +1 -0
- package/dist/components/SegmentedControl.d.ts +4 -4
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +11 -11
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/Select.js +48 -15
- package/dist/components/Select.js.map +1 -1
- package/dist/components/ServerFlex.d.ts +0 -1
- package/dist/components/ServerFlex.d.ts.map +1 -1
- package/dist/components/ServerFlex.js +99 -52
- package/dist/components/ServerFlex.js.map +1 -1
- package/dist/components/ServerGrid.d.ts +0 -1
- package/dist/components/ServerGrid.d.ts.map +1 -1
- package/dist/components/ServerGrid.js +11 -9
- package/dist/components/ServerGrid.js.map +1 -1
- package/dist/components/Setting.d.ts +50 -0
- package/dist/components/Setting.d.ts.map +1 -0
- package/dist/components/Setting.js +43 -0
- package/dist/components/Setting.js.map +1 -0
- package/dist/components/ShineFx.d.ts +1 -0
- package/dist/components/ShineFx.d.ts.map +1 -1
- package/dist/components/ShineFx.js +2 -2
- package/dist/components/ShineFx.js.map +1 -1
- package/dist/components/Skeleton.d.ts +16 -3
- package/dist/components/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton.js +2 -2
- package/dist/components/Skeleton.js.map +1 -1
- package/dist/components/Skeleton.module.scss +14 -51
- package/dist/components/SplitView.d.ts +23 -3
- package/dist/components/SplitView.d.ts.map +1 -1
- package/dist/components/SplitView.js +90 -58
- package/dist/components/SplitView.js.map +1 -1
- package/dist/components/StyleOverlay.d.ts.map +1 -1
- package/dist/components/StyleOverlay.js +1 -1
- package/dist/components/StyleOverlay.js.map +1 -1
- package/dist/components/StylePanel.d.ts +47 -6
- package/dist/components/StylePanel.d.ts.map +1 -1
- package/dist/components/StylePanel.js +16 -189
- package/dist/components/StylePanel.js.map +1 -1
- package/dist/components/StylePanel.module.scss +6 -1
- package/dist/components/StylePanelSections.d.ts +117 -0
- package/dist/components/StylePanelSections.d.ts.map +1 -0
- package/dist/components/StylePanelSections.js +175 -0
- package/dist/components/StylePanelSections.js.map +1 -0
- package/dist/components/Swiper.d.ts +7 -1
- package/dist/components/Swiper.d.ts.map +1 -1
- package/dist/components/Swiper.js +7 -7
- package/dist/components/Swiper.js.map +1 -1
- package/dist/components/Switch.d.ts +2 -2
- package/dist/components/Switch.d.ts.map +1 -1
- package/dist/components/Switch.js +4 -4
- package/dist/components/Switch.js.map +1 -1
- package/dist/components/Table.d.ts +1 -1
- package/dist/components/Table.d.ts.map +1 -1
- package/dist/components/Table.js +2 -2
- package/dist/components/Table.js.map +1 -1
- package/dist/components/Tag.d.ts +1 -1
- package/dist/components/Tag.d.ts.map +1 -1
- package/dist/components/Tag.js +2 -2
- package/dist/components/Tag.js.map +1 -1
- package/dist/components/Text.d.ts +1 -1
- package/dist/components/Textarea.d.ts +15 -5
- package/dist/components/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea.js +31 -17
- package/dist/components/Textarea.js.map +1 -1
- package/dist/components/ThemeInit.d.ts.map +1 -1
- package/dist/components/ThemeInit.js +6 -4
- package/dist/components/ThemeInit.js.map +1 -1
- package/dist/components/ThemeSwitcher.d.ts +14 -1
- package/dist/components/ThemeSwitcher.d.ts.map +1 -1
- package/dist/components/ThemeSwitcher.js +19 -9
- package/dist/components/ThemeSwitcher.js.map +1 -1
- package/dist/components/ThemeSwitcher.module.scss +54 -0
- package/dist/components/Toast.d.ts +1 -1
- package/dist/components/Toast.d.ts.map +1 -1
- package/dist/components/Toast.js +2 -2
- package/dist/components/Toast.js.map +1 -1
- package/dist/components/ToggleButton.d.ts +9 -2
- package/dist/components/ToggleButton.d.ts.map +1 -1
- package/dist/components/ToggleButton.js +5 -5
- package/dist/components/ToggleButton.js.map +1 -1
- package/dist/components/User.js +1 -1
- package/dist/components/User.js.map +1 -1
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +7 -0
- package/dist/components/index.js.map +1 -1
- package/dist/contexts/AdapterProvider.d.ts +50 -0
- package/dist/contexts/AdapterProvider.d.ts.map +1 -0
- package/dist/contexts/AdapterProvider.js +91 -0
- package/dist/contexts/AdapterProvider.js.map +1 -0
- package/dist/contexts/DataThemeProvider.d.ts +1 -1
- package/dist/contexts/DataThemeProvider.d.ts.map +1 -1
- package/dist/contexts/IconProvider.d.ts +3 -3
- package/dist/contexts/IconProvider.d.ts.map +1 -1
- package/dist/contexts/IconProvider.js +2 -2
- package/dist/contexts/IconProvider.js.map +1 -1
- package/dist/contexts/LayoutProvider.d.ts +0 -2
- package/dist/contexts/LayoutProvider.d.ts.map +1 -1
- package/dist/contexts/LayoutProvider.js +15 -10
- package/dist/contexts/LayoutProvider.js.map +1 -1
- package/dist/contexts/ThemeProvider.d.ts +29 -1
- package/dist/contexts/ThemeProvider.d.ts.map +1 -1
- package/dist/contexts/ThemeProvider.js +42 -15
- package/dist/contexts/ThemeProvider.js.map +1 -1
- package/dist/contexts/index.d.ts +3 -2
- package/dist/contexts/index.d.ts.map +1 -1
- package/dist/contexts/index.js +3 -2
- package/dist/contexts/index.js.map +1 -1
- package/dist/css/styles.css +1 -1
- package/dist/css/tokens.css +1 -1
- package/dist/data/emoji-data.json +0 -10
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/icons/ATTRIBUTION.md +19 -0
- package/dist/icons/data.d.ts +1919 -0
- package/dist/icons/data.d.ts.map +1 -0
- package/dist/icons/data.js +102 -0
- package/dist/icons/data.js.map +1 -0
- package/dist/icons/renderIcon.d.ts +26 -0
- package/dist/icons/renderIcon.d.ts.map +1 -0
- package/dist/icons/renderIcon.js +22 -0
- package/dist/icons/renderIcon.js.map +1 -0
- package/dist/icons.d.ts +35 -4
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +13 -60
- package/dist/icons.js.map +1 -1
- package/dist/modules/code/CodeBlock.impl.d.ts +2 -1
- package/dist/modules/code/CodeBlock.impl.d.ts.map +1 -1
- package/dist/modules/code/CodeBlock.impl.js +7 -2
- package/dist/modules/code/CodeBlock.impl.js.map +1 -1
- package/dist/modules/data/ChartHeader.d.ts.map +1 -1
- package/dist/modules/data/ChartHeader.js +1 -1
- package/dist/modules/data/ChartHeader.js.map +1 -1
- package/dist/modules/data/DataTooltip.d.ts +1 -1
- package/dist/modules/data/DataTooltip.d.ts.map +1 -1
- package/dist/modules/data/DataTooltip.js +2 -2
- package/dist/modules/data/DataTooltip.js.map +1 -1
- package/dist/modules/data/LinearGauge.d.ts +4 -3
- package/dist/modules/data/LinearGauge.d.ts.map +1 -1
- package/dist/modules/data/LinearGauge.js +1 -1
- package/dist/modules/data/LinearGauge.js.map +1 -1
- package/dist/modules/data/PieChart.impl.d.ts +1 -1
- package/dist/modules/data/PieChart.impl.d.ts.map +1 -1
- package/dist/modules/data/PieChart.impl.js +4 -1
- package/dist/modules/data/PieChart.impl.js.map +1 -1
- package/dist/modules/data/RadialGauge.d.ts +4 -3
- package/dist/modules/data/RadialGauge.d.ts.map +1 -1
- package/dist/modules/data/RadialGauge.js +1 -1
- package/dist/modules/data/RadialGauge.js.map +1 -1
- package/dist/modules/data/interfaces.d.ts +12 -3
- package/dist/modules/data/interfaces.d.ts.map +1 -1
- package/dist/modules/index.d.ts +1 -4
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +9 -3
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/media/MediaUpload.impl.d.ts +1 -1
- package/dist/modules/media/MediaUpload.impl.d.ts.map +1 -1
- package/dist/modules/media/MediaUpload.impl.js +1 -1
- package/dist/modules/media/MediaUpload.impl.js.map +1 -1
- package/dist/modules/navigation/Kbar.d.ts +5 -4
- package/dist/modules/navigation/Kbar.d.ts.map +1 -1
- package/dist/modules/navigation/Kbar.js +32 -35
- package/dist/modules/navigation/Kbar.js.map +1 -1
- package/dist/modules/navigation/MegaMenu.d.ts +5 -3
- package/dist/modules/navigation/MegaMenu.d.ts.map +1 -1
- package/dist/modules/navigation/MegaMenu.js +24 -12
- package/dist/modules/navigation/MegaMenu.js.map +1 -1
- package/dist/modules/navigation/MobileMegaMenu.d.ts +3 -2
- package/dist/modules/navigation/MobileMegaMenu.d.ts.map +1 -1
- package/dist/modules/navigation/MobileMegaMenu.js +1 -1
- package/dist/modules/navigation/MobileMegaMenu.js.map +1 -1
- package/dist/modules/seo/Meta.d.ts +40 -2
- package/dist/modules/seo/Meta.d.ts.map +1 -1
- package/dist/modules/seo/Meta.js.map +1 -1
- package/dist/modules/seo/Schema.d.ts +2 -1
- package/dist/modules/seo/Schema.d.ts.map +1 -1
- package/dist/modules/seo/Schema.js +1 -2
- package/dist/modules/seo/Schema.js.map +1 -1
- package/dist/next/index.d.ts +35 -0
- package/dist/next/index.d.ts.map +1 -0
- package/dist/next/index.js +56 -0
- package/dist/next/index.js.map +1 -0
- package/dist/package.json +52 -7
- package/dist/scripts/init-agent.js +156 -0
- package/dist/scripts/validate-ai-code.js +213 -0
- package/dist/server/og-utils.d.ts +9 -3
- package/dist/server/og-utils.d.ts.map +1 -1
- package/dist/server/og-utils.js +15 -9
- package/dist/server/og-utils.js.map +1 -1
- package/dist/styles/breakpoints.scss +16 -5
- package/dist/test/setup.js +21 -0
- package/dist/test/setup.js.map +1 -1
- package/dist/types.d.ts +13 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/colorScheme.d.ts +35 -0
- package/dist/utils/colorScheme.d.ts.map +1 -0
- package/dist/utils/colorScheme.js +140 -0
- package/dist/utils/colorScheme.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/navMatch.d.ts +21 -0
- package/dist/utils/navMatch.d.ts.map +1 -0
- package/dist/utils/navMatch.js +26 -0
- package/dist/utils/navMatch.js.map +1 -0
- package/package.json +66 -11
- package/scripts/validate-ai-code.js +74 -10
- package/dist/css/styles.css.map +0 -1
- package/dist/css/tokens.css.map +0 -1
- package/dist/hooks/useResponsiveClasses.d.ts +0 -9
- package/dist/hooks/useResponsiveClasses.d.ts.map +0 -1
- package/dist/hooks/useResponsiveClasses.js +0 -293
- package/dist/hooks/useResponsiveClasses.js.map +0 -1
- package/dist/styles/background.scss +0 -423
- package/dist/styles/border.scss +0 -546
- package/dist/styles/color.scss +0 -183
- package/dist/styles/display.scss +0 -391
- package/dist/styles/flex.scss +0 -518
- package/dist/styles/global.scss +0 -36
- package/dist/styles/grid.scss +0 -293
- package/dist/styles/index.scss +0 -14
- package/dist/styles/position.scss +0 -1549
- package/dist/styles/shadow.scss +0 -19
- package/dist/styles/size.scss +0 -53
- package/dist/styles/spacing.scss +0 -1505
- package/dist/styles/typography.scss +0 -223
- package/dist/styles/utilities.scss +0 -23
- package/dist/tokens/border.scss +0 -95
- package/dist/tokens/data.scss +0 -107
- package/dist/tokens/function.scss +0 -742
- package/dist/tokens/index.scss +0 -8
- package/dist/tokens/layout.scss +0 -275
- package/dist/tokens/scheme.scss +0 -352
- package/dist/tokens/shadow.scss +0 -7
- package/dist/tokens/theme.scss +0 -657
- package/dist/tokens/typography.scss +0 -118
- package/next-env.d.ts +0 -5
- package/scripts/copy-files.js +0 -103
- package/scripts/generate-ai-spec.js +0 -464
- package/scripts/generate-emoji-data.js +0 -128
- package/scss.d.ts +0 -4
- package/tsconfig.vitest.json +0 -20
- package/vitest.config.ts +0 -19
|
@@ -2,9 +2,22 @@ import React from "react";
|
|
|
2
2
|
import { Flex } from ".";
|
|
3
3
|
interface SkeletonProps extends React.ComponentProps<typeof Flex> {
|
|
4
4
|
shape: "line" | "circle" | "block";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The scale: height for a `line`, diameter for a `circle`, ignored by a
|
|
7
|
+
* `block` (which fills its container).
|
|
8
|
+
*
|
|
9
|
+
* Width is deliberately not here. Skeleton extends Flex, so width is a
|
|
10
|
+
* layout concern expressed the same way as on any other element —
|
|
11
|
+
* `width="80%"`, `maxWidth={24}` — instead of a second five-step scale that
|
|
12
|
+
* only meant percentages.
|
|
13
|
+
*/
|
|
14
|
+
size?: "xl" | "l" | "m" | "s" | "xs";
|
|
15
|
+
/**
|
|
16
|
+
* Animation offset in milliseconds, for staggering a group of skeletons.
|
|
17
|
+
* Previously a "1".."6" index into six fixed classes, which is why it read
|
|
18
|
+
* as a step rather than the duration it actually is.
|
|
19
|
+
*/
|
|
20
|
+
delay?: number;
|
|
8
21
|
style?: React.CSSProperties;
|
|
9
22
|
className?: string;
|
|
10
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../src/components/Skeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;AAEzB,UAAU,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC;IAC/D,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACnC,
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../src/components/Skeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;AAEzB,UAAU,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC;IAC/D,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACnC;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;IACrC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAkBrC,CAAC;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -4,8 +4,8 @@ import { forwardRef } from "react";
|
|
|
4
4
|
import classNames from "clsx";
|
|
5
5
|
import styles from "./Skeleton.module.scss";
|
|
6
6
|
import { Flex } from ".";
|
|
7
|
-
const Skeleton = forwardRef(({ shape = "line",
|
|
8
|
-
return (_jsx(Flex, { ...props, ref: ref, style: style, radius: shape === "line" || shape === "circle" ? "full" : undefined, inline: true, className: classNames(styles.skeleton, styles[shape],
|
|
7
|
+
const Skeleton = forwardRef(({ shape = "line", size = "m", delay, style, className, ...props }, ref) => {
|
|
8
|
+
return (_jsx(Flex, { ...props, ref: ref, style: delay !== undefined ? { animationDelay: `${delay}ms`, ...style } : style, radius: shape === "line" || shape === "circle" ? "full" : undefined, inline: true, className: classNames(styles.skeleton, styles[shape], size && styles["size-" + size], className) }));
|
|
9
9
|
});
|
|
10
10
|
Skeleton.displayName = "Skeleton";
|
|
11
11
|
export { Skeleton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../src/components/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ElC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -10,30 +10,6 @@
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.delay-1 {
|
|
14
|
-
animation-delay: 0.1s;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.delay-2 {
|
|
18
|
-
animation-delay: 0.2s;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.delay-3 {
|
|
22
|
-
animation-delay: 0.3s;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.delay-4 {
|
|
26
|
-
animation-delay: 0.4s;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.delay-5 {
|
|
30
|
-
animation-delay: 0.5s;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.delay-6 {
|
|
34
|
-
animation-delay: 0.6s;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
13
|
.skeleton {
|
|
38
14
|
animation-name: skeleton-loading;
|
|
39
15
|
animation-duration: 1.5s;
|
|
@@ -44,77 +20,64 @@
|
|
|
44
20
|
height: 100%;
|
|
45
21
|
}
|
|
46
22
|
|
|
23
|
+
/* For a line the scale is height; width is a layout concern and comes from
|
|
24
|
+
Flex, so a caller writes width="80%" rather than picking from a scale. */
|
|
47
25
|
&.line {
|
|
48
|
-
&.
|
|
26
|
+
&.size-xs {
|
|
49
27
|
height: var(--static-space-8);
|
|
50
28
|
min-height: var(--static-space-8);
|
|
51
29
|
}
|
|
52
|
-
&.
|
|
30
|
+
&.size-s {
|
|
53
31
|
height: var(--static-space-12);
|
|
54
32
|
min-height: var(--static-space-12);
|
|
55
33
|
}
|
|
56
|
-
&.
|
|
34
|
+
&.size-m {
|
|
57
35
|
height: var(--static-space-16);
|
|
58
36
|
min-height: var(--static-space-16);
|
|
59
37
|
}
|
|
60
|
-
&.
|
|
38
|
+
&.size-l {
|
|
61
39
|
height: var(--static-space-20);
|
|
62
40
|
min-height: var(--static-space-20);
|
|
63
41
|
}
|
|
64
|
-
&.
|
|
42
|
+
&.size-xl {
|
|
65
43
|
height: var(--static-space-24);
|
|
66
44
|
min-height: var(--static-space-24);
|
|
67
45
|
}
|
|
68
|
-
|
|
69
|
-
&.w-xs {
|
|
70
|
-
width: 25%;
|
|
71
|
-
}
|
|
72
|
-
&.w-s {
|
|
73
|
-
width: 33%;
|
|
74
|
-
}
|
|
75
|
-
&.w-m {
|
|
76
|
-
width: 50%;
|
|
77
|
-
}
|
|
78
|
-
&.w-l {
|
|
79
|
-
width: 75%;
|
|
80
|
-
}
|
|
81
|
-
&.w-xl {
|
|
82
|
-
width: 100%;
|
|
83
|
-
}
|
|
84
46
|
}
|
|
85
47
|
|
|
48
|
+
/* For a circle the scale is the diameter, so it drives both axes. */
|
|
86
49
|
&.circle {
|
|
87
50
|
border-radius: var(--radius-full);
|
|
88
51
|
|
|
89
|
-
&.
|
|
52
|
+
&.size-xs {
|
|
90
53
|
width: var(--static-space-20);
|
|
91
54
|
min-width: var(--static-space-20);
|
|
92
55
|
height: var(--static-space-20);
|
|
93
56
|
min-height: var(--static-space-20);
|
|
94
57
|
}
|
|
95
|
-
&.
|
|
58
|
+
&.size-s {
|
|
96
59
|
width: var(--static-space-24);
|
|
97
60
|
min-width: var(--static-space-24);
|
|
98
61
|
height: var(--static-space-24);
|
|
99
62
|
min-height: var(--static-space-24);
|
|
100
63
|
}
|
|
101
|
-
&.
|
|
64
|
+
&.size-m {
|
|
102
65
|
width: var(--static-space-32);
|
|
103
66
|
min-width: var(--static-space-32);
|
|
104
67
|
height: var(--static-space-32);
|
|
105
68
|
min-height: var(--static-space-32);
|
|
106
69
|
}
|
|
107
|
-
&.
|
|
70
|
+
&.size-l {
|
|
108
71
|
width: var(--static-space-40);
|
|
109
72
|
min-width: var(--static-space-40);
|
|
110
73
|
height: var(--static-space-40);
|
|
111
74
|
min-height: var(--static-space-40);
|
|
112
75
|
}
|
|
113
|
-
&.
|
|
76
|
+
&.size-xl {
|
|
114
77
|
width: var(--static-space-160);
|
|
115
78
|
min-width: var(--static-space-160);
|
|
116
79
|
height: var(--static-space-160);
|
|
117
80
|
min-height: var(--static-space-160);
|
|
118
81
|
}
|
|
119
82
|
}
|
|
120
|
-
}
|
|
83
|
+
}
|
|
@@ -1,13 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactNode } from
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { Row } from ".";
|
|
4
|
+
import { type BreakpointKey } from "../contexts";
|
|
3
5
|
interface SplitViewProps extends React.ComponentProps<typeof Row> {
|
|
4
6
|
leftPanel: ReactNode;
|
|
5
7
|
rightPanel: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Tab labels for the collapsed layout. Without them the split still
|
|
10
|
+
* collapses, but the tabs read "1" and "2" — so pass these whenever
|
|
11
|
+
* `collapseBelow` is in play.
|
|
12
|
+
*/
|
|
13
|
+
labels?: {
|
|
14
|
+
left: string;
|
|
15
|
+
right: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* At or below this breakpoint the split becomes tabs showing one panel at a
|
|
19
|
+
* time. A drag-resizable split is a poor pattern on a phone whichever way it
|
|
20
|
+
* is oriented: the panes are too small to be useful at any ratio, and a
|
|
21
|
+
* drag handle competes with page scrolling. Pass `false` to keep the split
|
|
22
|
+
* at every size.
|
|
23
|
+
*/
|
|
24
|
+
collapseBelow?: BreakpointKey | false;
|
|
25
|
+
/** Starting ratio for the first panel, 0–1. */
|
|
6
26
|
defaultSplit?: number;
|
|
7
27
|
minSplit?: number;
|
|
8
28
|
maxSplit?: number;
|
|
9
29
|
}
|
|
10
|
-
declare function SplitView({ leftPanel, rightPanel, defaultSplit, minSplit, maxSplit, ...flex }: SplitViewProps):
|
|
30
|
+
declare function SplitView({ leftPanel, rightPanel, labels, collapseBelow, defaultSplit, minSplit, maxSplit, ...flex }: SplitViewProps): React.JSX.Element;
|
|
11
31
|
declare namespace SplitView {
|
|
12
32
|
var displayName: string;
|
|
13
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitView.d.ts","sourceRoot":"","sources":["../../src/components/SplitView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"SplitView.d.ts","sourceRoot":"","sources":["../../src/components/SplitView.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAC;AACjF,OAAO,EAAgB,GAAG,EAAoB,MAAM,GAAG,CAAC;AACxD,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,aAAa,CAAC;AAE5D,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC;IAC/D,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,aAAa,GAAG,KAAK,CAAC;IACtC,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA2DD,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,UAAU,EACV,MAAM,EACN,aAAmB,EACnB,YAAkB,EAClB,QAAc,EACd,QAAc,EACd,GAAG,IAAI,EACR,EAAE,cAAc,qBA6HhB;kBAtIQ,SAAS;;;AA0IlB,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,78 +1,110 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
+
import { Card, Column, Row, SegmentedControl } from ".";
|
|
5
|
+
import { useLayout } from "../contexts";
|
|
6
|
+
/**
|
|
7
|
+
* Drag state for the divider.
|
|
8
|
+
*
|
|
9
|
+
* Pointer events rather than mouse events: `mousedown`/`mousemove` never fire
|
|
10
|
+
* for touch, which is why the divider could not be dragged on a touch device at
|
|
11
|
+
* all. Pointer events cover mouse, touch and pen in one path, and pointer
|
|
12
|
+
* capture keeps the drag alive when the finger or cursor leaves the handle.
|
|
13
|
+
*/
|
|
14
|
+
function useResizeHandle(containerRef, direction, { defaultSplit, minSplit, maxSplit }) {
|
|
15
|
+
const [splitRatio, setSplitRatio] = useState(defaultSplit);
|
|
7
16
|
const [isDragging, setIsDragging] = useState(false);
|
|
17
|
+
const applyClientPosition = useCallback((clientX, clientY) => {
|
|
18
|
+
const container = containerRef.current;
|
|
19
|
+
if (!container)
|
|
20
|
+
return;
|
|
21
|
+
const rect = container.getBoundingClientRect();
|
|
22
|
+
const ratio = direction === "row"
|
|
23
|
+
? (clientX - rect.left) / rect.width
|
|
24
|
+
: (clientY - rect.top) / rect.height;
|
|
25
|
+
if (!Number.isFinite(ratio))
|
|
26
|
+
return;
|
|
27
|
+
setSplitRatio(Math.max(minSplit, Math.min(maxSplit, ratio)));
|
|
28
|
+
}, [containerRef, direction, minSplit, maxSplit]);
|
|
8
29
|
useEffect(() => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// Vertical split: calculate from top
|
|
21
|
-
newRatio = (e.clientY - rect.top) / rect.height;
|
|
22
|
-
}
|
|
23
|
-
setSplitRatio(Math.max(0.2, Math.min(0.8, newRatio)));
|
|
24
|
-
};
|
|
25
|
-
const handleMouseUp = () => {
|
|
26
|
-
setIsDragging(false);
|
|
27
|
-
};
|
|
28
|
-
if (isDragging) {
|
|
29
|
-
document.addEventListener('mousemove', handleMouseMove);
|
|
30
|
-
document.addEventListener('mouseup', handleMouseUp);
|
|
31
|
-
document.body.style.cursor = direction === 'row' ? 'col-resize' : 'row-resize';
|
|
32
|
-
document.body.style.userSelect = 'none';
|
|
33
|
-
}
|
|
30
|
+
if (!isDragging)
|
|
31
|
+
return;
|
|
32
|
+
const onMove = (e) => applyClientPosition(e.clientX, e.clientY);
|
|
33
|
+
const onUp = () => setIsDragging(false);
|
|
34
|
+
document.addEventListener("pointermove", onMove);
|
|
35
|
+
document.addEventListener("pointerup", onUp);
|
|
36
|
+
document.addEventListener("pointercancel", onUp);
|
|
37
|
+
const previousCursor = document.body.style.cursor;
|
|
38
|
+
const previousSelect = document.body.style.userSelect;
|
|
39
|
+
document.body.style.cursor = direction === "row" ? "col-resize" : "row-resize";
|
|
40
|
+
document.body.style.userSelect = "none";
|
|
34
41
|
return () => {
|
|
35
|
-
document.removeEventListener(
|
|
36
|
-
document.removeEventListener(
|
|
37
|
-
document.
|
|
38
|
-
document.body.style.
|
|
42
|
+
document.removeEventListener("pointermove", onMove);
|
|
43
|
+
document.removeEventListener("pointerup", onUp);
|
|
44
|
+
document.removeEventListener("pointercancel", onUp);
|
|
45
|
+
document.body.style.cursor = previousCursor;
|
|
46
|
+
document.body.style.userSelect = previousSelect;
|
|
39
47
|
};
|
|
40
|
-
}, [isDragging, direction]);
|
|
41
|
-
return { splitRatio, isDragging, setIsDragging };
|
|
48
|
+
}, [isDragging, direction, applyClientPosition]);
|
|
49
|
+
return { splitRatio, setSplitRatio, isDragging, setIsDragging, applyClientPosition };
|
|
42
50
|
}
|
|
43
|
-
function SplitView({ leftPanel, rightPanel, defaultSplit = 0.3, minSplit = 0.2, maxSplit = 0.8, ...flex }) {
|
|
51
|
+
function SplitView({ leftPanel, rightPanel, labels, collapseBelow = "s", defaultSplit = 0.3, minSplit = 0.2, maxSplit = 0.8, ...flex }) {
|
|
44
52
|
const containerRef = useRef(null);
|
|
45
|
-
const [direction, setDirection] = useState(
|
|
46
|
-
const {
|
|
47
|
-
|
|
53
|
+
const [direction, setDirection] = useState("row");
|
|
54
|
+
const { maxWidth } = useLayout();
|
|
55
|
+
const [activePanel, setActivePanel] = useState("left");
|
|
56
|
+
const { splitRatio, setSplitRatio, isDragging, setIsDragging, applyClientPosition } = useResizeHandle(containerRef, direction, { defaultSplit, minSplit, maxSplit });
|
|
48
57
|
useEffect(() => {
|
|
49
58
|
const updateDirection = () => {
|
|
50
59
|
if (!containerRef.current)
|
|
51
60
|
return;
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
setDirection(flexDir === 'column' ? 'column' : 'row');
|
|
61
|
+
const flexDir = window.getComputedStyle(containerRef.current).flexDirection;
|
|
62
|
+
setDirection(flexDir === "column" ? "column" : "row");
|
|
55
63
|
};
|
|
56
64
|
updateDirection();
|
|
57
|
-
window.addEventListener(
|
|
58
|
-
return () => window.removeEventListener(
|
|
65
|
+
window.addEventListener("resize", updateDirection);
|
|
66
|
+
return () => window.removeEventListener("resize", updateDirection);
|
|
59
67
|
}, []);
|
|
60
|
-
const
|
|
61
|
-
|
|
68
|
+
const collapsed = collapseBelow !== false && maxWidth(collapseBelow);
|
|
69
|
+
if (collapsed) {
|
|
70
|
+
const leftLabel = labels?.left ?? "1";
|
|
71
|
+
const rightLabel = labels?.right ?? "2";
|
|
72
|
+
return (_jsxs(Column, { fill: true, gap: "12", ...flex, children: [_jsx(SegmentedControl, { fillWidth: true, buttons: [
|
|
73
|
+
{ value: "left", label: leftLabel },
|
|
74
|
+
{ value: "right", label: rightLabel },
|
|
75
|
+
], value: activePanel, onChange: (value) => setActivePanel(value === "right" ? "right" : "left") }), _jsx(Column, { fill: true, overflowY: "auto", minHeight: 0, children: activePanel === "left" ? leftPanel : rightPanel })] }));
|
|
76
|
+
}
|
|
77
|
+
const isHorizontal = direction === "row";
|
|
78
|
+
const step = 0.05;
|
|
62
79
|
return (_jsxs(Row, { ref: containerRef, fill: true, ...flex, children: [_jsx(Column, { fill: true, style: {
|
|
63
|
-
[isHorizontal ?
|
|
64
|
-
[isHorizontal ?
|
|
65
|
-
overflow:
|
|
66
|
-
}, children: leftPanel }), _jsx(Row, { fillHeight: isHorizontal, fillWidth: !isHorizontal, minWidth: isHorizontal ? "12" : undefined, minHeight: !isHorizontal ? "12" : undefined, paddingX: isHorizontal ? "8" : undefined, paddingY: !isHorizontal ? "8" : undefined, center: true,
|
|
67
|
-
|
|
68
|
-
|
|
80
|
+
[isHorizontal ? "width" : "height"]: `${splitRatio * 100}%`,
|
|
81
|
+
[isHorizontal ? "minWidth" : "minHeight"]: 0,
|
|
82
|
+
overflow: "auto",
|
|
83
|
+
}, children: leftPanel }), _jsx(Row, { fillHeight: isHorizontal, fillWidth: !isHorizontal, minWidth: isHorizontal ? "12" : undefined, minHeight: !isHorizontal ? "12" : undefined, paddingX: isHorizontal ? "8" : undefined, paddingY: !isHorizontal ? "8" : undefined, center: true,
|
|
84
|
+
// Keyboard-operable: a pointer-only divider is unreachable without one.
|
|
85
|
+
role: "separator", "aria-orientation": isHorizontal ? "vertical" : "horizontal", "aria-valuenow": Math.round(splitRatio * 100), "aria-valuemin": Math.round(minSplit * 100), "aria-valuemax": Math.round(maxSplit * 100), "aria-label": "Resize panels", tabIndex: 0, onPointerDown: (event) => {
|
|
86
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
87
|
+
setIsDragging(true);
|
|
88
|
+
applyClientPosition(event.clientX, event.clientY);
|
|
89
|
+
}, onKeyDown: (event) => {
|
|
90
|
+
const back = isHorizontal ? "ArrowLeft" : "ArrowUp";
|
|
91
|
+
const forward = isHorizontal ? "ArrowRight" : "ArrowDown";
|
|
92
|
+
if (event.key !== back && event.key !== forward)
|
|
93
|
+
return;
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
const next = splitRatio + (event.key === forward ? step : -step);
|
|
96
|
+
setSplitRatio(Math.max(minSplit, Math.min(maxSplit, next)));
|
|
97
|
+
}, style: {
|
|
98
|
+
cursor: isHorizontal ? "col-resize" : "row-resize",
|
|
99
|
+
userSelect: "none",
|
|
100
|
+
touchAction: "none",
|
|
69
101
|
}, children: _jsx(Row, { fillWidth: isHorizontal, fillHeight: !isHorizontal, height: isHorizontal ? 8 : undefined, width: !isHorizontal ? 8 : undefined, children: _jsx(Card, { fill: true, background: isDragging ? "neutral-strong" : "neutral-weak", border: "neutral-alpha-weak", radius: "full", style: {
|
|
70
|
-
cursor: isHorizontal ?
|
|
71
|
-
transition:
|
|
102
|
+
cursor: isHorizontal ? "col-resize" : "row-resize",
|
|
103
|
+
transition: "background 0.2s ease",
|
|
72
104
|
} }) }) }), _jsx(Column, { fill: true, style: {
|
|
73
|
-
[isHorizontal ?
|
|
74
|
-
[isHorizontal ?
|
|
75
|
-
overflow:
|
|
105
|
+
[isHorizontal ? "width" : "height"]: `${(1 - splitRatio) * 100}%`,
|
|
106
|
+
[isHorizontal ? "minWidth" : "minHeight"]: 0,
|
|
107
|
+
overflow: "auto",
|
|
76
108
|
}, children: rightPanel })] }));
|
|
77
109
|
}
|
|
78
110
|
SplitView.displayName = "SplitView";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitView.js","sourceRoot":"","sources":["../../src/components/SplitView.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;
|
|
1
|
+
{"version":3,"file":"SplitView.js","sourceRoot":"","sources":["../../src/components/SplitView.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAkB,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AACxD,OAAO,EAAsB,SAAS,EAAE,MAAM,aAAa,CAAC;AA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AAEpC,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyleOverlay.d.ts","sourceRoot":"","sources":["../../src/components/StyleOverlay.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAc,IAAI,EAAc,MAAM,GAAG,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC;IACnE,eAAe,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC;IACnE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;CACjC;AAED,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"StyleOverlay.d.ts","sourceRoot":"","sources":["../../src/components/StyleOverlay.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAc,IAAI,EAAc,MAAM,GAAG,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC;IACnE,eAAe,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC;IACnE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;CACjC;AAED,QAAA,MAAM,YAAY,2HAuDjB,CAAC;AAGF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -10,7 +10,7 @@ const StyleOverlay = forwardRef(({ iconButtonProps, children, zIndex = 2, ...res
|
|
|
10
10
|
};
|
|
11
11
|
return (_jsxs(Flex, { ref: ref, position: "static", zIndex: zIndex, children: [!isOpen && _jsx(Flex, { onClick: togglePanel, children: children }), _jsxs(Flex, { as: "aside", zIndex: 3, className: `${styles.panel} ${isOpen && styles.open}`, maxWidth: 28, style: {
|
|
12
12
|
maxHeight: "calc(100% - var(--static-space-4))",
|
|
13
|
-
}, fillHeight: true, position: "absolute", shadow: "xl", top: "2", right: "2", transition: "macro-medium", background: "page", overflow: "hidden", radius: "xl", border: "neutral-medium", ...rest, children: [_jsx(StylePanel, { fill: true, overflowY: "scroll", padding: "8" }), _jsxs(Flex, { position: "absolute", paddingTop: "8", paddingRight: "12", top: "0", right: "0", children: [_jsx(Background, { position: "absolute", top: "0", right: "8", left: undefined, width: 8, height: 4, mask: { x: 100, y: 0, radius: 7 }, dots: { display: true, size: "2", color: "page-background" } }), _jsx(IconButton, { variant: "secondary", onClick: togglePanel, icon: "close", ...iconButtonProps })] })] })] }));
|
|
13
|
+
}, fillHeight: true, position: "absolute", shadow: "xl", top: "2", right: "2", transition: "macro-medium", background: "page", overflow: "hidden", radius: "xl", border: "neutral-medium", ...rest, children: [_jsx(StylePanel, { fill: true, overflowY: "scroll", padding: "8" }), _jsxs(Flex, { position: "absolute", paddingTop: "8", paddingRight: "12", top: "0", right: "0", children: [_jsx(Background, { position: "absolute", top: "0", right: "8", left: undefined, width: 8, height: 4, mask: { x: 100, y: 0, radius: 7 }, dots: { display: true, size: "2", color: "page-background" } }), _jsx(IconButton, { variant: "secondary", onClick: togglePanel, icon: "close", "aria-label": "Close style panel", ...iconButtonProps })] })] })] }));
|
|
14
14
|
});
|
|
15
15
|
StyleOverlay.displayName = "StyleOverlay";
|
|
16
16
|
export { StyleOverlay };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyleOverlay.js","sourceRoot":"","sources":["../../src/components/StyleOverlay.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,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B,eAAe,GACnB,IACG,IACF,IACF,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,8 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { type StylePanelRootProps, type StylePanelVisibility } from "./StylePanelSections";
|
|
2
|
+
export type { StylePanelValue, StylePanelVisibility, StylePanelRootProps, StyleRowProps, StyleGroupProps, } from "./StylePanelSections";
|
|
3
|
+
export { useStylePanel } from "./StylePanelSections";
|
|
4
|
+
export interface StylePanelProps extends StylePanelRootProps {
|
|
5
|
+
/** Hide whole sections or individual rows. Omitted keys stay visible. */
|
|
6
|
+
visibility?: StylePanelVisibility;
|
|
7
|
+
/**
|
|
8
|
+
* Restated from `StylePanelRootProps` — indexed so the types stay tied to
|
|
9
|
+
* one declaration — because this is the component's public surface, and an
|
|
10
|
+
* inherited prop is invisible to anything reading the generated spec.
|
|
11
|
+
*/
|
|
12
|
+
value?: StylePanelRootProps["value"];
|
|
13
|
+
onChange?: StylePanelRootProps["onChange"];
|
|
5
14
|
}
|
|
6
|
-
declare const
|
|
7
|
-
|
|
15
|
+
declare const StylePanelWithSections: import("react").ForwardRefExoticComponent<Omit<StylePanelProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
16
|
+
Root: import("react").ForwardRefExoticComponent<Omit<StylePanelRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
Group: ({ title, description, children, ...rest }: import("./StylePanelSections").StyleGroupProps) => import("react").JSX.Element;
|
|
18
|
+
Row: ({ label, children, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
19
|
+
Theme: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
20
|
+
Shape: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
21
|
+
Brand: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
22
|
+
Accent: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
23
|
+
Neutral: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
24
|
+
Solid: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
25
|
+
Effect: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
26
|
+
Surface: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
27
|
+
Scaling: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
28
|
+
Transition: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
29
|
+
DataStyle: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
30
|
+
BodySize: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
31
|
+
BodyLineHeight: ({ label, ...rest }: import("./StylePanelSections").StyleRowProps) => import("react").JSX.Element;
|
|
32
|
+
Page: ({ title, description, rows, ...rest }: import("./StylePanelSections").StyleGroupProps & {
|
|
33
|
+
rows?: Partial<Record<"shape" | "theme", boolean>> | undefined;
|
|
34
|
+
}) => import("react").JSX.Element;
|
|
35
|
+
Color: ({ title, description, rows, ...rest }: import("./StylePanelSections").StyleGroupProps & {
|
|
36
|
+
rows?: Partial<Record<"neutral" | "brand" | "accent", boolean>> | undefined;
|
|
37
|
+
}) => import("react").JSX.Element;
|
|
38
|
+
SolidStyle: ({ title, description, rows, ...rest }: import("./StylePanelSections").StyleGroupProps & {
|
|
39
|
+
rows?: Partial<Record<"solid" | "effect", boolean>> | undefined;
|
|
40
|
+
}) => import("react").JSX.Element;
|
|
41
|
+
BodyText: ({ title, description, rows, ...rest }: import("./StylePanelSections").StyleGroupProps & {
|
|
42
|
+
rows?: Partial<Record<"size" | "lineHeight", boolean>> | undefined;
|
|
43
|
+
}) => import("react").JSX.Element;
|
|
44
|
+
Advanced: ({ title, description, rows, ...rest }: import("./StylePanelSections").StyleGroupProps & {
|
|
45
|
+
rows?: Partial<Record<"transition" | "surface" | "scaling" | "dataStyle", boolean>> | undefined;
|
|
46
|
+
}) => import("react").JSX.Element;
|
|
47
|
+
};
|
|
48
|
+
export { StylePanelWithSections as StylePanel };
|
|
8
49
|
//# sourceMappingURL=StylePanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StylePanel.d.ts","sourceRoot":"","sources":["../../src/components/StylePanel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"StylePanel.d.ts","sourceRoot":"","sources":["../../src/components/StylePanel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAErG,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D,yEAAyE;IACzE,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC;;;;OAIG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;CAC5C;AAyBD,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAsC,CAAC;AAEnE,OAAO,EAAE,sBAAsB,IAAI,UAAU,EAAE,CAAC"}
|