@once-ui-system/core 1.8.5 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- 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 +10 -1
- package/ai/examples/app-shell.tsx +111 -0
- package/ai/examples/auth.tsx +2 -3
- package/ai/examples/blocks/Dashboard1.tsx +25 -36
- package/ai/examples/blocks/Feed3.tsx +8 -8
- 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/Header2.tsx +1 -1
- package/ai/examples/blocks/Header3.tsx +7 -7
- package/ai/examples/blocks/Header4.tsx +6 -7
- package/ai/examples/blocks/Productivity1.tsx +1 -1
- package/ai/examples/blocks/Roadmap1.tsx +3 -3
- package/ai/examples/blocks/Sidebar1.tsx +1 -1
- package/ai/examples/blocks/Sidebar2.tsx +1 -1
- package/ai/examples/blocks/Sidebar4.tsx +1 -1
- package/ai/examples/blocks/Streaming1.tsx +4 -4
- package/ai/examples/blocks/Table1.tsx +9 -9
- package/ai/examples/blocks/Waitlist1.tsx +5 -5
- package/ai/examples/blocks/content/resources.ts +3 -1
- package/ai/examples/dashboard.tsx +13 -14
- package/ai/examples/marketing-hero.tsx +4 -4
- package/ai/examples/pricing.tsx +7 -8
- package/ai/examples/settings.tsx +7 -7
- package/ai/gotchas.json +99 -25
- package/ai/layouts.md +154 -0
- package/ai/manifest.json +3 -2
- package/ai/recipes.md +50 -5
- package/ai/rules.compact.md +26 -5
- package/ai/rules.md +84 -14
- package/ai/spec.json +634 -176
- package/ai/tasks/settings.json +1 -1
- package/dist/AGENTS.md +1 -1
- 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 +10 -1
- package/dist/ai/gotchas.json +99 -25
- package/dist/ai/layouts.md +154 -0
- package/dist/ai/manifest.json +3 -2
- package/dist/ai/recipes.md +50 -5
- package/dist/ai/rules.compact.md +26 -5
- package/dist/ai/rules.md +84 -14
- package/dist/ai/spec.json +634 -176
- package/dist/ai/tasks/settings.json +1 -1
- 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.d.ts.map +1 -1
- package/dist/components/Avatar.js +2 -2
- 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.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.map +1 -1
- package/dist/components/EmojiPicker.js +1 -1
- package/dist/components/EmojiPicker.js.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/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/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.map +1 -1
- package/dist/components/OgCard.js +7 -4
- 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/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.map +1 -1
- package/dist/components/Table.js +4 -4
- 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/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/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/IconProvider.d.ts +2 -2
- 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 +8 -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 +3 -2
- 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 +3 -2
- 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.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 +431 -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 +309 -27
- 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
package/ai/recipes.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
# Once UI — decoration recipes
|
|
1
|
+
# Once UI — decoration and restraint recipes
|
|
2
2
|
|
|
3
|
-
Curated
|
|
4
|
-
|
|
3
|
+
Curated patterns that keep pages premium without going over the top: decorative
|
|
4
|
+
layers that carry a section, and controls that earn their room back. Use them
|
|
5
|
+
verbatim, then adjust values. All units follow rules.md #21–24.
|
|
5
6
|
|
|
6
7
|
## Budget (hard limits)
|
|
7
8
|
|
|
@@ -86,7 +87,7 @@ For the emphasized item in a set (e.g. "most popular" pricing tier). Border + to
|
|
|
86
87
|
Self-contained drifting brand/accent blobs (already blurred and pointer-transparent). Use behind a final CTA or feature visual — counts as continuous motion:
|
|
87
88
|
|
|
88
89
|
```tsx
|
|
89
|
-
<Card fillWidth radius="l" border
|
|
90
|
+
<Card fillWidth radius="l" border overflow="hidden" padding="48">
|
|
90
91
|
<BlobFx position="absolute" top="0" left="0" fill opacity={60} seed={2} />
|
|
91
92
|
<Column zIndex={1} center gap="24">
|
|
92
93
|
{/* CTA content */}
|
|
@@ -129,7 +130,7 @@ useEffect(() => {
|
|
|
129
130
|
|
|
130
131
|
<Grid ref={ref} columns="3" gap="16" s={{ columns: 1 }}>
|
|
131
132
|
{items.map((item, index) => (
|
|
132
|
-
<RevealFx key={item.id}
|
|
133
|
+
<RevealFx key={item.id} revealed={seen} translateY="8" delay={index * 100}>
|
|
133
134
|
<Card ... />
|
|
134
135
|
</RevealFx>
|
|
135
136
|
))}
|
|
@@ -138,8 +139,52 @@ useEffect(() => {
|
|
|
138
139
|
|
|
139
140
|
For stats, drive `CountFx` value from the same latch: `<CountFx value={seen ? 2400 : 0} separator="," />`.
|
|
140
141
|
|
|
142
|
+
## 8. Reveal on hover (controls that earn their room back)
|
|
143
|
+
|
|
144
|
+
A control that must be reachable from every page but is used once a session does
|
|
145
|
+
not need permanent width. Show its current state; reveal the options on hover or
|
|
146
|
+
focus.
|
|
147
|
+
|
|
148
|
+
`ThemeSwitcher` ships this as a prop:
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
<ThemeSwitcher collapsed />
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
For any other toggle group, the pattern is the same three rules — and all three
|
|
155
|
+
are load-bearing, because hover-to-reveal is one of the easiest ways to ship an
|
|
156
|
+
inaccessible control:
|
|
157
|
+
|
|
158
|
+
- **Open on `:focus-within` as well as `:hover`,** and keep the hidden options
|
|
159
|
+
focusable. Collapse them with `max-width: 0` and `overflow: hidden`, never
|
|
160
|
+
`display: none` or `visibility: hidden` — those remove the tab stops, and then
|
|
161
|
+
the only way to reach the options is with a mouse.
|
|
162
|
+
- **Stay open under `@media (hover: none)`.** On a touch device the first tap
|
|
163
|
+
lands on the visible control, which means the tap that was meant to open the
|
|
164
|
+
group has already committed to an option.
|
|
165
|
+
- **Animate width only, and drop it under `prefers-reduced-motion`.** The
|
|
166
|
+
control must do exactly the same thing with the transition off.
|
|
167
|
+
|
|
168
|
+
```scss
|
|
169
|
+
.group { overflow: hidden; }
|
|
170
|
+
.group .option { overflow: hidden; max-width: var(--static-space-40); transition: max-width var(--transition-duration-micro-medium) ease; }
|
|
171
|
+
.group .option.inactive { max-width: 0; opacity: 0; }
|
|
172
|
+
.group:hover .option.inactive,
|
|
173
|
+
.group:focus-within .option.inactive { max-width: var(--static-space-40); opacity: 1; }
|
|
174
|
+
|
|
175
|
+
@media (hover: none) { .group .option.inactive { max-width: var(--static-space-40); opacity: 1; } }
|
|
176
|
+
@media (prefers-reduced-motion: reduce) { .group .option { transition: none; } }
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Use it for theme, density, or view-mode switchers in a header or a footer. Do
|
|
180
|
+
not use it for anything a visitor needs to *see* the state of at a glance across
|
|
181
|
+
options, for primary navigation, or for a destructive action — a control that
|
|
182
|
+
hides until pointed at is a control nobody finds.
|
|
183
|
+
|
|
141
184
|
## Anti-patterns
|
|
142
185
|
|
|
186
|
+
- **Hover-only reveals.** A group that opens on `:hover` but not `:focus-within`, or that collapses with `display: none`, is unreachable by keyboard and unusable by touch. See #8.
|
|
187
|
+
|
|
143
188
|
- Glow with `colorStart: "brand-background-weak"` — invisible against the page; use alpha tokens.
|
|
144
189
|
- `width: 500` gradients — that's 125% of the container blown past its edges; stay ≤ 200 for glows.
|
|
145
190
|
- Background layers without `top="0" left="0"` inside padded parents — misaligned.
|
package/ai/rules.compact.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Once UI — compact codegen rules
|
|
2
2
|
|
|
3
|
-
Load with task bundle from `@once-ui-system/core/ai/tasks/{intent}.json`. For production-quality composition, read matching Pro blocks from `examples/blocks/manifest.json`. Fetch component slices on demand.
|
|
3
|
+
Load with task bundle from `@once-ui-system/core/ai/tasks/{intent}.json`. For an app shell, a sidebar nav or an editor, read `ai/layouts.md` first — those are the shapes that are hard to get right from props alone. For production-quality composition, read matching Pro blocks from `examples/blocks/manifest.json`. Fetch component slices on demand.
|
|
4
4
|
|
|
5
5
|
## Layout
|
|
6
6
|
|
|
@@ -11,6 +11,9 @@ Load with task bundle from `@once-ui-system/core/ai/tasks/{intent}.json`. For pr
|
|
|
11
11
|
| `fill` | `fillWidth fillHeight` |
|
|
12
12
|
| `fit` | `fitWidth fitHeight` |
|
|
13
13
|
| `center` | `horizontal="center" vertical="center"` |
|
|
14
|
+
| `maxWidth="l"` | `fillWidth maxWidth="l"` |
|
|
15
|
+
| `fillWidth` | `fillWidth minWidth={0}` |
|
|
16
|
+
| `border` | `border="neutral-alpha-weak"` |
|
|
14
17
|
|
|
15
18
|
- `Flex` only when direction changes at breakpoints: `<Row s={{ direction: "column" }}>`
|
|
16
19
|
- Page skeleton: `Column as="main" fillWidth horizontal="center"` → content `Column maxWidth="l"` → sections
|
|
@@ -22,9 +25,10 @@ Load with task bundle from `@once-ui-system/core/ai/tasks/{intent}.json`. For pr
|
|
|
22
25
|
Static panel recipe (pricing tiers, stats, settings sections):
|
|
23
26
|
|
|
24
27
|
```tsx
|
|
25
|
-
<Column background="surface" border
|
|
28
|
+
<Column background="surface" border radius="l" padding="24" gap="16">
|
|
26
29
|
```
|
|
27
30
|
|
|
31
|
+
- Bare `border` (and `borderTop`, `borderBottom`, …) = the default border. Name a colour only to deviate: `border="brand-alpha-medium"`.
|
|
28
32
|
- `Card` = interactive only (`href` or `onClick`). Static panels = Column + surface recipe.
|
|
29
33
|
- Colors: `{scheme}-{weight}` or `{scheme}-alpha-{weight}`. Never hex/rgb.
|
|
30
34
|
- `background` also: `surface | overlay | page | transparent`
|
|
@@ -40,6 +44,8 @@ Static panel recipe (pricing tiers, stats, settings sections):
|
|
|
40
44
|
|
|
41
45
|
Absolute layers always: `position="absolute" top="0" left="0" fill pointerEvents="none"`, content `zIndex={1}`.
|
|
42
46
|
|
|
47
|
+
- `zIndex` only inside that layer group (or on a sticky header over its pane). Never on a lone element, never a page-wide ladder.
|
|
48
|
+
|
|
43
49
|
- Gradient `width`: quarter-percent (400 = 100%). Glows: 100–200.
|
|
44
50
|
- Glow colors: `brand-alpha-medium`, not `brand-background-weak`
|
|
45
51
|
- Ambient layers on full-bleed section wrapper, outside `maxWidth` column
|
|
@@ -47,9 +53,9 @@ Absolute layers always: `position="absolute" top="0" left="0" fill pointerEvents
|
|
|
47
53
|
|
|
48
54
|
## Motion
|
|
49
55
|
|
|
50
|
-
- `RevealFx delay` in **
|
|
56
|
+
- `RevealFx delay` (and `ShineFx speed`) in **milliseconds**: `delay={index * 100}` — `* 0.1` was 1.8.x
|
|
51
57
|
- `RevealFx translateY`: number = rem; prefer `"8"`–`"16"` tokens
|
|
52
|
-
- Viewport-
|
|
58
|
+
- Viewport-reveal with `useInViewport` + latch into `RevealFx revealed`; `CountFx` driven by `value`, no trigger prop
|
|
53
59
|
- Animate all siblings in a set or none — never one lone animated card
|
|
54
60
|
|
|
55
61
|
## Components
|
|
@@ -64,9 +70,24 @@ Absolute layers always: `position="absolute" top="0" left="0" fill pointerEvents
|
|
|
64
70
|
| Icons | `IconName` from spec only |
|
|
65
71
|
| Logos grid | `LogoCloud` with `columns` set |
|
|
66
72
|
|
|
73
|
+
## Imports
|
|
74
|
+
|
|
75
|
+
Most things come from the package root. Three modules do not, because their
|
|
76
|
+
dependencies are optional peers:
|
|
77
|
+
|
|
78
|
+
| Import | From |
|
|
79
|
+
|--------|------|
|
|
80
|
+
| charts, gauges, chart chrome | `@once-ui-system/core/data` (needs `recharts`) |
|
|
81
|
+
| `CodeBlock` | `@once-ui-system/core/code` (needs `prismjs`) |
|
|
82
|
+
| `MediaUpload` | `@once-ui-system/core/media` (needs `compressorjs`) |
|
|
83
|
+
|
|
84
|
+
Naming one of these from the root does not resolve. `IconName` is a real union,
|
|
85
|
+
so an unregistered icon name is a type error, not a blank space — take names
|
|
86
|
+
from `spec.json`.
|
|
87
|
+
|
|
67
88
|
## Defaults — omit these
|
|
68
89
|
|
|
69
|
-
`position="relative"`, `direction` on Row/Column, `variant="primary"` on Button, `size="m"` when default.
|
|
90
|
+
`position="relative"`, `direction` on Row/Column, `variant="primary"` on Button, `size="m"` when default, `fillWidth` beside `maxWidth`, `minWidth={0}` beside `fillWidth`, a border colour that restates the default.
|
|
70
91
|
|
|
71
92
|
## Before building
|
|
72
93
|
|
package/ai/rules.md
CHANGED
|
@@ -40,14 +40,26 @@ If you can't ask (or the user says "you decide"), default to: restrained, center
|
|
|
40
40
|
<Row fillWidth fillHeight horizontal="center" vertical="center">...</Row>
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
3. Never write a prop that equals its default. The spec marks defaults with `= value`. Common offenders:
|
|
43
|
+
3. Never write a prop that equals its default, or one that another prop on the same element already implies. The spec marks defaults with `= value`. Common offenders:
|
|
44
44
|
- `position="relative"` (default on all layout components)
|
|
45
45
|
- `direction="row"` on `Row`, `direction="column"` on `Column`
|
|
46
46
|
- `variant="primary"`, `size="m"` on `Button`
|
|
47
|
+
- `fillWidth` beside `maxWidth` — `maxWidth` already fills the width up to the cap
|
|
48
|
+
- `minWidth={0}` beside `fillWidth` — `fillWidth` already sets `min-width: 0`
|
|
49
|
+
- a colour on `border` (or `borderTop`, `borderBottom`, `borderX`, …) that only restates the default — bare `border` draws the default border; name a colour only to deviate from it
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
// Good
|
|
53
|
+
<Column maxWidth="l" border radius="l">
|
|
54
|
+
// Bad
|
|
55
|
+
<Column fillWidth maxWidth="l" minWidth={0} position="relative" border="neutral-alpha-weak" radius="l">
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
3b. `zIndex` belongs to a stacking group, not to a page. Use it only inside an isolated group that needs an order — a decorative absolute layer and the content sibling above it (rule 21), a sticky header over the pane it covers — and keep the values small within that group. A `zIndex` on a lone element, or a page-wide ladder of `zIndex={3}`, `{5}`, `{9}`, means the hierarchy is being managed by hand; restructure the tree instead.
|
|
47
59
|
|
|
48
60
|
## Spacing and sizing
|
|
49
61
|
|
|
50
|
-
4. Use spacing tokens, never raw CSS: `gap`, `padding`, `margin`, `paddingX/Y`, `marginX/Y` accept
|
|
62
|
+
4. Use spacing tokens, never raw CSS: `gap`, `padding`, `margin`, `paddingX/Y`, `marginX/Y` accept the full `SpacingToken` scale (`"0" "1" "2" "4" "8" "12" "16" "20" "24" "32" "40" "48" "56" "64" "80" "104" "128" "160"`, or `"xs" "s" "m" "l" "xl"`). The top of the scale is what rule 17 calls for between sections — it is not an extension, it is part of the same list.
|
|
51
63
|
|
|
52
64
|
```tsx
|
|
53
65
|
// Good
|
|
@@ -66,10 +78,10 @@ If you can't ask (or the user says "you decide"), default to: restrained, center
|
|
|
66
78
|
- `background` also accepts `surface | overlay | page | transparent`
|
|
67
79
|
- `onBackground` colors text/icons on a background
|
|
68
80
|
|
|
69
|
-
8. Standard surface recipe: `background="surface"` (or `"overlay"` over imagery) + `border="neutral-alpha-
|
|
81
|
+
8. Standard surface recipe: `background="surface"` (or `"overlay"` over imagery) + `border` + `radius="l"`. Bare `border` is the default border; name a colour (`border="neutral-alpha-medium"`, `border="brand-alpha-medium"`) only when the surface should differ from it.
|
|
70
82
|
|
|
71
83
|
```tsx
|
|
72
|
-
<Column background="surface" border
|
|
84
|
+
<Column background="surface" border radius="l" padding="24" gap="16">
|
|
73
85
|
```
|
|
74
86
|
|
|
75
87
|
## Text
|
|
@@ -109,9 +121,9 @@ If you can't ask (or the user says "you decide"), default to: restrained, center
|
|
|
109
121
|
- `CursorCard`, `HoverCard`, `ContextMenu`, `EmojiPicker`, `CompareImage`, `OgCard`, `Timeline`, `MasonryGrid`, `InfiniteScroll`, `SegmentedControl`, `Kbar` (command palette)
|
|
110
122
|
- Forms: `Input`, `PasswordInput`, `OTPInput`, `NumberInput`, `TagInput`, `Select`, `DatePicker`, `DateRangePicker`, `ColorInput`, `Slider`, `Switch`, `Checkbox`, `Chip`
|
|
111
123
|
|
|
112
|
-
14. Buttons: `variant` = `primary | secondary | tertiary | danger
|
|
124
|
+
14. Buttons: `variant` = `primary | secondary | tertiary | quaternary | subtle | danger | success | warning | ghost | link` (the slice is authoritative; `primary` is the default); pair with `prefixIcon`/`suffixIcon` (icon names, not elements). `IconButton` for icon-only actions with `tooltip`.
|
|
113
125
|
|
|
114
|
-
14b. Icon names must come from
|
|
126
|
+
14b. Icon names must come from `iconNames` in spec.json. In 2.0 `IconName` is a real union, so an unregistered name is a type error rather than a blank space — do not guess a plausible one, and never reach for `as IconName` to silence the check. If no registered icon fits, omit the icon. The registry is 99 icons; brand marks (github, discord, google) are deliberately not among them, so an app registers its own.
|
|
115
127
|
|
|
116
128
|
14c. Components with a text prop render it — never pass the same text as both prop and children, it renders twice:
|
|
117
129
|
|
|
@@ -155,9 +167,47 @@ If you can't ask (or the user says "you decide"), default to: restrained, center
|
|
|
155
167
|
// Good eyebrow
|
|
156
168
|
<Text variant="label-default-s" onBackground="brand-medium">Pricing</Text>
|
|
157
169
|
// Bad eyebrow
|
|
158
|
-
<Tag
|
|
170
|
+
<Tag scheme="neutral" prefixIcon="sparkle">Pricing</Tag>
|
|
159
171
|
```
|
|
160
172
|
|
|
173
|
+
20b. **Proportion is a decision, not a leftover.** Two columns in a row finish at
|
|
174
|
+
roughly the same place, or one of them is wrong. A tall card beside a strip of
|
|
175
|
+
small controls leaves a column of dead space that reads as an unfinished page —
|
|
176
|
+
and the fix is almost never more whitespace tokens.
|
|
177
|
+
|
|
178
|
+
Give the thin side real content instead. Tiles grow to carry their own height,
|
|
179
|
+
with a placeholder, a preview, a swatch, a count — something true about the
|
|
180
|
+
thing they stand for. Then keep them quiet: low-contrast surfaces, small labels,
|
|
181
|
+
no competing headline. A grid of twenty loud tiles takes the section away from
|
|
182
|
+
the card it was meant to support.
|
|
183
|
+
|
|
184
|
+
```tsx
|
|
185
|
+
// Bad: a tall card and 20 chips, most of the row empty
|
|
186
|
+
<Row fillWidth gap="32">
|
|
187
|
+
<Column flex={1} maxWidth={26}><FeatureCard /></Column>
|
|
188
|
+
<Column flex={1}><Row wrap gap="4">{items.map(i => <Button key={i} size="s">{i}</Button>)}</Row></Column>
|
|
189
|
+
</Row>
|
|
190
|
+
|
|
191
|
+
// Good: both sides carry weight, the card still leads
|
|
192
|
+
<Row fillWidth gap="32">
|
|
193
|
+
<Column flex={2}><FeatureCard /></Column>
|
|
194
|
+
<Column flex={3}>
|
|
195
|
+
<Grid columns={5} s={{ columns: 3 }} gap="8" fillWidth>
|
|
196
|
+
{items.map(i => (
|
|
197
|
+
<Column key={i} aspectRatio="1 / 1" padding="12" radius="l"
|
|
198
|
+
background="page" border vertical="between">
|
|
199
|
+
{/* a preview of the thing, not just its name */}
|
|
200
|
+
</Column>
|
|
201
|
+
))}
|
|
202
|
+
</Grid>
|
|
203
|
+
</Column>
|
|
204
|
+
</Row>
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Check it by squinting at the two columns' bottom edges. If one ends halfway up
|
|
208
|
+
the other, change the flex ratio, the tile size, or what the tiles contain —
|
|
209
|
+
in that order.
|
|
210
|
+
|
|
161
211
|
## Decorative layers
|
|
162
212
|
|
|
163
213
|
21. Every absolute decorative layer uses the full recipe — `top="0" left="0"` are required or the layer gets offset by parent padding:
|
|
@@ -166,7 +216,7 @@ If you can't ask (or the user says "you decide"), default to: restrained, center
|
|
|
166
216
|
<Background position="absolute" top="0" left="0" fill pointerEvents="none" ... />
|
|
167
217
|
```
|
|
168
218
|
|
|
169
|
-
Siblings holding content get `zIndex={1}`. `overflow="hidden"` goes on the parent **only when it has a radius** (cards, panels) — clipping a full-bleed section turns the glow into a hard-edged band.
|
|
219
|
+
Siblings holding content get `zIndex={1}`. That layer and its content sibling are the whole stacking group — nothing else in the section needs a `zIndex` (rule 3b). `overflow="hidden"` goes on the parent **only when it has a radius** (cards, panels) — clipping a full-bleed section turns the glow into a hard-edged band.
|
|
170
220
|
|
|
171
221
|
21b. Ambient section layers (hero glows) live on the **full-width section wrapper**, outside the `maxWidth` content column, with generous room (`paddingY="80"`+). Inside a narrow container the gradient gets clipped at the container edge and reads as a misplaced card:
|
|
172
222
|
|
|
@@ -184,21 +234,21 @@ Siblings holding content get `zIndex={1}`. `overflow="hidden"` goes on the paren
|
|
|
184
234
|
|
|
185
235
|
## Effect units
|
|
186
236
|
|
|
187
|
-
24. `RevealFx`: `delay` is in **
|
|
237
|
+
24. `RevealFx`: `delay` is in **milliseconds** — stagger with `delay={index * 100}`, never `index * 0.1` (that was 1.8.x, and 2.0 reads it as a tenth of a millisecond, i.e. no stagger at all). `ShineFx.speed` is milliseconds for the same reason. `translateY` as a number is in **rem** — use `translateY={1}` or a token like `"16"` (1rem); `16` means 16rem.
|
|
188
238
|
|
|
189
239
|
25. `LogoCloud` extends `Grid` — always set `columns` (and responsive overrides), or logos stack in one column: `columns="4" m={{ columns: 3 }} s={{ columns: 2 }}`.
|
|
190
240
|
|
|
191
|
-
26. Use decoration recipes from `recipes.md` verbatim, then adjust. Budget: at most one ambient background layer per section, ambient motion in at most the hero and final CTA, one accent color family per page.
|
|
241
|
+
26. Use decoration recipes from `recipes.md` verbatim, then adjust. Application shells — a dashboard with a sidebar, a data-driven nav, a two-pane editor — come from `layouts.md` the same way. Budget: at most one ambient background layer per section, ambient motion in at most the hero and final CTA, one accent color family per page.
|
|
192
242
|
|
|
193
243
|
## Motion
|
|
194
244
|
|
|
195
|
-
27. Animations are **eye-leading, not eye-grabbing**: they direct attention to the one thing that should be read next, they don't announce themselves. Small distances (`translateY="8"`–`"16"`, i.e. 0.5–1rem), short staggers (`delay={index *
|
|
245
|
+
27. Animations are **eye-leading, not eye-grabbing**: they direct attention to the one thing that should be read next, they don't announce themselves. Small distances (`translateY="8"`–`"16"`, i.e. 0.5–1rem), short staggers (`delay={index * 100}` max), and only on elements worth leading the eye to — the hero heading, stat numbers, the highlighted card in a set.
|
|
196
246
|
|
|
197
247
|
28. Do **not** wrap every section in `RevealFx` — uniform entrance animation on everything reads dated and makes scrolling feel slow. Entry-animation budget per page: the hero, plus at most one or two key moments (stats, a card set). Everything else just renders.
|
|
198
248
|
|
|
199
|
-
28b. Animate **coherent blocks, all-or-none**. Within a sibling set (cards, list items), either every sibling animates with a stagger or none do — never a single item out of the set (e.g. only the highlighted pricing card). For a hero, reveal it as 1–3 stacked chunks with increasing delay (`0 /
|
|
249
|
+
28b. Animate **coherent blocks, all-or-none**. Within a sibling set (cards, list items), either every sibling animates with a stagger or none do — never a single item out of the set (e.g. only the highlighted pricing card). For a hero, reveal it as 1–3 stacked chunks with increasing delay (`0 / 100 / 200`), not individual text fragments. One entrance moment per viewport: if the hero animates, the cards below it don't.
|
|
200
250
|
|
|
201
|
-
29. Trigger below-the-fold animations with `useInViewport`, latched so they play once. `RevealFx` takes `
|
|
251
|
+
29. Trigger below-the-fold animations with `useInViewport`, latched so they play once. `RevealFx` takes `revealed`; `CountFx` has no trigger prop — drive its `value` instead:
|
|
202
252
|
|
|
203
253
|
```tsx
|
|
204
254
|
const ref = useRef<HTMLDivElement>(null);
|
|
@@ -209,9 +259,29 @@ useEffect(() => {
|
|
|
209
259
|
}, [inViewport]);
|
|
210
260
|
|
|
211
261
|
<Column ref={ref} gap="16">
|
|
212
|
-
<RevealFx
|
|
262
|
+
<RevealFx revealed={seen} translateY="8">...</RevealFx>
|
|
213
263
|
<CountFx value={seen ? 2400 : 0} speed={1500} separator="," variant="display-strong-m" />
|
|
214
264
|
</Column>
|
|
215
265
|
```
|
|
216
266
|
|
|
217
267
|
Without this, mount-timed animations play while still off-screen and the user scrolls into an already-finished state.
|
|
268
|
+
|
|
269
|
+
## Imports
|
|
270
|
+
|
|
271
|
+
30. Most things come from the package root, but three modules do not, because
|
|
272
|
+
their dependencies are optional peers and a root re-export would drag the
|
|
273
|
+
specifier into every consumer's module graph:
|
|
274
|
+
|
|
275
|
+
| Import | From | Peer the app installs |
|
|
276
|
+
|--------|------|-----------------------|
|
|
277
|
+
| charts, gauges, chart chrome | `@once-ui-system/core/data` | `recharts` |
|
|
278
|
+
| `CodeBlock` | `@once-ui-system/core/code` | `prismjs` |
|
|
279
|
+
| `MediaUpload` | `@once-ui-system/core/media` | `compressorjs` |
|
|
280
|
+
|
|
281
|
+
Naming one of these from the root does not resolve. Each component slice in
|
|
282
|
+
`ai/components/` carries the specifier to import it from.
|
|
283
|
+
|
|
284
|
+
31. `IconName` is a real union, not `string`. An unregistered name is a type
|
|
285
|
+
error now, where it used to render a blank space with a console warning — so
|
|
286
|
+
take icon names from `spec.json`'s `iconNames` rather than guessing a plausible
|
|
287
|
+
one. An app registers its own by augmenting `IconLibraryOverrides`.
|