@once-ui-system/core 2.0.0-alpha.1 → 2.0.0-alpha.3
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 +11 -4
- package/ai/components/Effect.json +1 -1
- package/ai/components/Feedback.json +1 -0
- package/ai/components/Form.json +15 -0
- package/ai/components/Input.json +3 -2
- package/ai/components/{Particle.json → ParticleFx.json} +1 -1
- package/ai/components/ScrollContainer.json +9 -1
- package/ai/components/Textarea.json +3 -2
- package/ai/components/ThemeSwitcher.json +2 -1
- package/ai/examples/blocks/Footer4.tsx +2 -2
- package/ai/examples/blocks/manifest.json +2 -2
- package/ai/gotchas.json +7 -0
- package/ai/manifest.json +2 -2
- package/ai/rules.md +1 -1
- package/ai/spec.json +35 -10
- package/dist/ai/catalog.json +11 -4
- package/dist/ai/components/Effect.json +1 -1
- package/dist/ai/components/Feedback.json +1 -0
- package/dist/ai/components/Form.json +15 -0
- package/dist/ai/components/Input.json +3 -2
- package/dist/ai/components/{Particle.json → ParticleFx.json} +1 -1
- package/dist/ai/components/ScrollContainer.json +9 -1
- package/dist/ai/components/Textarea.json +3 -2
- package/dist/ai/components/ThemeSwitcher.json +2 -1
- package/dist/ai/examples/blocks/manifest.json +2 -2
- package/dist/ai/gotchas.json +7 -0
- package/dist/ai/manifest.json +2 -2
- package/dist/ai/rules.md +1 -1
- package/dist/ai/spec.json +35 -10
- package/dist/components/Accordion.d.ts +3 -1
- package/dist/components/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion.js +4 -1
- package/dist/components/Accordion.js.map +1 -1
- package/dist/components/AccordionGroup.d.ts +1 -1
- package/dist/components/AccordionGroup.d.ts.map +1 -1
- package/dist/components/AccordionGroup.js +3 -1
- package/dist/components/AccordionGroup.js.map +1 -1
- package/dist/components/Animation.d.ts +2 -3
- package/dist/components/Animation.d.ts.map +1 -1
- package/dist/components/Animation.js +2 -2
- package/dist/components/Animation.js.map +1 -1
- package/dist/components/Arrow.d.ts +1 -1
- package/dist/components/Arrow.d.ts.map +1 -1
- package/dist/components/Arrow.js +1 -1
- package/dist/components/Arrow.js.map +1 -1
- package/dist/components/ArrowNavigationContext.d.ts.map +1 -1
- package/dist/components/ArrowNavigationContext.js +12 -3
- package/dist/components/ArrowNavigationContext.js.map +1 -1
- package/dist/components/AutoScroll.d.ts +1 -1
- package/dist/components/AutoScroll.d.ts.map +1 -1
- package/dist/components/AutoScroll.js +1 -1
- package/dist/components/AutoScroll.js.map +1 -1
- package/dist/components/Avatar.d.ts +1 -1
- package/dist/components/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar.js +6 -1
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/AvatarGroup.d.ts +2 -1
- package/dist/components/AvatarGroup.d.ts.map +1 -1
- package/dist/components/AvatarGroup.js +2 -1
- package/dist/components/AvatarGroup.js.map +1 -1
- package/dist/components/Background.d.ts +2 -1
- package/dist/components/Background.d.ts.map +1 -1
- package/dist/components/Background.js +2 -1
- package/dist/components/Background.js.map +1 -1
- package/dist/components/Badge.d.ts +1 -1
- package/dist/components/Badge.d.ts.map +1 -1
- package/dist/components/Badge.js +4 -1
- package/dist/components/Badge.js.map +1 -1
- package/dist/components/BlobFx.d.ts +1 -1
- package/dist/components/BlobFx.d.ts.map +1 -1
- package/dist/components/BlobFx.js +2 -1
- package/dist/components/BlobFx.js.map +1 -1
- package/dist/components/BlockQuote.d.ts +1 -1
- package/dist/components/BlockQuote.d.ts.map +1 -1
- package/dist/components/BlockQuote.js +6 -1
- package/dist/components/BlockQuote.js.map +1 -1
- package/dist/components/Book.d.ts +1 -1
- package/dist/components/Book.d.ts.map +1 -1
- package/dist/components/Book.js +4 -1
- package/dist/components/Book.js.map +1 -1
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +4 -1
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Card.d.ts +1 -1
- package/dist/components/Card.d.ts.map +1 -1
- package/dist/components/Card.js +9 -4
- package/dist/components/Card.js.map +1 -1
- package/dist/components/Carousel.d.ts +1 -1
- package/dist/components/Carousel.d.ts.map +1 -1
- package/dist/components/Carousel.js +7 -1
- package/dist/components/Carousel.js.map +1 -1
- package/dist/components/CelebrationFx.d.ts +1 -1
- package/dist/components/CelebrationFx.d.ts.map +1 -1
- package/dist/components/CelebrationFx.js +1 -1
- package/dist/components/CelebrationFx.js.map +1 -1
- package/dist/components/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +3 -1
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/Chip.d.ts +2 -1
- package/dist/components/Chip.d.ts.map +1 -1
- package/dist/components/Chip.js +4 -1
- package/dist/components/Chip.js.map +1 -1
- package/dist/components/ClientFlex.d.ts.map +1 -1
- package/dist/components/ClientFlex.js +3 -2
- package/dist/components/ClientFlex.js.map +1 -1
- package/dist/components/ClientGrid.d.ts.map +1 -1
- package/dist/components/ClientGrid.js +3 -2
- 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 -1
- 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 +3 -1
- package/dist/components/CompareImage.js.map +1 -1
- package/dist/components/ContextMenu.d.ts +1 -1
- package/dist/components/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu.js +3 -1
- package/dist/components/ContextMenu.js.map +1 -1
- package/dist/components/CountFx.d.ts +1 -1
- package/dist/components/CountFx.d.ts.map +1 -1
- package/dist/components/CountFx.js +2 -1
- package/dist/components/CountFx.js.map +1 -1
- package/dist/components/CountdownFx.d.ts +1 -1
- package/dist/components/CountdownFx.d.ts.map +1 -1
- package/dist/components/CountdownFx.js +3 -1
- package/dist/components/CountdownFx.js.map +1 -1
- package/dist/components/Cursor.js +1 -1
- package/dist/components/Cursor.js.map +1 -1
- package/dist/components/CursorCard.d.ts +2 -2
- package/dist/components/CursorCard.d.ts.map +1 -1
- package/dist/components/CursorCard.js +1 -1
- package/dist/components/CursorCard.js.map +1 -1
- package/dist/components/DateInput.d.ts +1 -1
- package/dist/components/DateInput.d.ts.map +1 -1
- package/dist/components/DateInput.js +3 -1
- package/dist/components/DateInput.js.map +1 -1
- package/dist/components/DatePicker.d.ts +1 -1
- package/dist/components/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker.js +22 -2
- package/dist/components/DatePicker.js.map +1 -1
- package/dist/components/DateRangeInput.d.ts +2 -1
- package/dist/components/DateRangeInput.d.ts.map +1 -1
- package/dist/components/DateRangeInput.js +5 -1
- package/dist/components/DateRangeInput.js.map +1 -1
- package/dist/components/DateRangePicker.d.ts +1 -1
- package/dist/components/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DateRangePicker.js +2 -1
- package/dist/components/DateRangePicker.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 +6 -1
- package/dist/components/Dialog.js.map +1 -1
- package/dist/components/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown.d.ts.map +1 -1
- package/dist/components/Dropdown.js +2 -1
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/DropdownWrapper.d.ts +1 -1
- package/dist/components/DropdownWrapper.d.ts.map +1 -1
- package/dist/components/DropdownWrapper.js +186 -37
- package/dist/components/DropdownWrapper.js.map +1 -1
- package/dist/components/DropdownWrapper.module.scss +3 -1
- package/dist/components/Effect.d.ts +7 -2
- package/dist/components/Effect.d.ts.map +1 -1
- package/dist/components/Effect.js +7 -2
- package/dist/components/Effect.js.map +1 -1
- package/dist/components/ElementType.js +1 -1
- package/dist/components/ElementType.js.map +1 -1
- package/dist/components/EmojiPicker.d.ts +3 -2
- package/dist/components/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker.js +8 -1
- package/dist/components/EmojiPicker.js.map +1 -1
- package/dist/components/EmojiPickerDropdown.d.ts +4 -3
- package/dist/components/EmojiPickerDropdown.d.ts.map +1 -1
- package/dist/components/EmojiPickerDropdown.js +2 -1
- package/dist/components/EmojiPickerDropdown.js.map +1 -1
- package/dist/components/Fade.d.ts +1 -1
- package/dist/components/Fade.d.ts.map +1 -1
- package/dist/components/Fade.js +1 -1
- package/dist/components/Fade.js.map +1 -1
- package/dist/components/FadingLettersFx.d.ts.map +1 -1
- package/dist/components/FadingLettersFx.js +1 -1
- package/dist/components/FadingLettersFx.js.map +1 -1
- package/dist/components/FadingLettersFx.module.scss +214 -37
- package/dist/components/Feedback.d.ts +5 -1
- package/dist/components/Feedback.d.ts.map +1 -1
- package/dist/components/Feedback.js +7 -3
- package/dist/components/Feedback.js.map +1 -1
- package/dist/components/FlipFx.d.ts +1 -1
- package/dist/components/FlipFx.d.ts.map +1 -1
- package/dist/components/FlipFx.js +1 -1
- package/dist/components/FlipFx.js.map +1 -1
- package/dist/components/FocusTrap.d.ts +3 -3
- package/dist/components/FocusTrap.d.ts.map +1 -1
- package/dist/components/FocusTrap.js +10 -0
- package/dist/components/FocusTrap.js.map +1 -1
- package/dist/components/Form.d.ts +48 -0
- package/dist/components/Form.d.ts.map +1 -0
- package/dist/components/Form.js +191 -0
- package/dist/components/Form.js.map +1 -0
- package/dist/components/Form.module.scss +160 -0
- package/dist/components/FormContext.d.ts +20 -0
- package/dist/components/FormContext.d.ts.map +1 -0
- package/dist/components/FormContext.js +12 -0
- package/dist/components/FormContext.js.map +1 -0
- package/dist/components/GlitchFx.d.ts +1 -1
- package/dist/components/GlitchFx.d.ts.map +1 -1
- package/dist/components/GlitchFx.js +1 -1
- package/dist/components/GlitchFx.js.map +1 -1
- package/dist/components/Heading.d.ts.map +1 -1
- package/dist/components/Heading.js +17 -10
- package/dist/components/Heading.js.map +1 -1
- package/dist/components/HoloFx.d.ts +1 -1
- package/dist/components/HoloFx.d.ts.map +1 -1
- package/dist/components/HoloFx.js +1 -1
- package/dist/components/HoloFx.js.map +1 -1
- package/dist/components/Hover.d.ts +1 -1
- package/dist/components/Hover.d.ts.map +1 -1
- package/dist/components/Hover.js +1 -1
- package/dist/components/Hover.js.map +1 -1
- package/dist/components/HoverCard.d.ts +1 -1
- package/dist/components/HoverCard.d.ts.map +1 -1
- package/dist/components/HoverCard.js +1 -1
- package/dist/components/HoverCard.js.map +1 -1
- package/dist/components/Icon.d.ts +1 -1
- package/dist/components/Icon.d.ts.map +1 -1
- package/dist/components/Icon.js +3 -1
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton.js +5 -1
- 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/InfiniteScroll.js +3 -1
- package/dist/components/InfiniteScroll.js.map +1 -1
- package/dist/components/InfoTip.d.ts +2 -1
- package/dist/components/InfoTip.d.ts.map +1 -1
- package/dist/components/InfoTip.js +4 -1
- package/dist/components/InfoTip.js.map +1 -1
- package/dist/components/InlineCode.d.ts +1 -1
- package/dist/components/InlineCode.d.ts.map +1 -1
- package/dist/components/InlineCode.js +1 -1
- package/dist/components/InlineCode.js.map +1 -1
- package/dist/components/Input.d.ts +3 -0
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.js +17 -3
- package/dist/components/Input.js.map +1 -1
- package/dist/components/Input.module.scss +27 -6
- package/dist/components/InteractiveDetails.d.ts +1 -1
- package/dist/components/InteractiveDetails.d.ts.map +1 -1
- package/dist/components/InteractiveDetails.js +4 -1
- package/dist/components/InteractiveDetails.js.map +1 -1
- package/dist/components/Kbd.d.ts +1 -1
- package/dist/components/Kbd.d.ts.map +1 -1
- package/dist/components/Kbd.js +2 -1
- package/dist/components/Kbd.js.map +1 -1
- package/dist/components/Line.d.ts +1 -1
- package/dist/components/Line.d.ts.map +1 -1
- package/dist/components/Line.js +1 -1
- package/dist/components/Line.js.map +1 -1
- package/dist/components/List.d.ts +1 -1
- package/dist/components/List.d.ts.map +1 -1
- package/dist/components/List.js +1 -1
- package/dist/components/List.js.map +1 -1
- package/dist/components/ListItem.d.ts +1 -1
- package/dist/components/ListItem.d.ts.map +1 -1
- package/dist/components/ListItem.js +1 -1
- package/dist/components/ListItem.js.map +1 -1
- package/dist/components/Logo.d.ts.map +1 -1
- package/dist/components/Logo.js +8 -2
- package/dist/components/Logo.js.map +1 -1
- package/dist/components/LogoCloud.d.ts +2 -1
- package/dist/components/LogoCloud.d.ts.map +1 -1
- package/dist/components/LogoCloud.js +3 -1
- package/dist/components/LogoCloud.js.map +1 -1
- package/dist/components/Mask.d.ts +1 -1
- package/dist/components/Mask.d.ts.map +1 -1
- package/dist/components/Mask.js +1 -1
- package/dist/components/Mask.js.map +1 -1
- package/dist/components/MatrixFx.d.ts +1 -1
- package/dist/components/MatrixFx.d.ts.map +1 -1
- package/dist/components/MatrixFx.js +1 -1
- package/dist/components/MatrixFx.js.map +1 -1
- package/dist/components/Media.d.ts +1 -1
- package/dist/components/Media.d.ts.map +1 -1
- package/dist/components/Media.js +5 -1
- package/dist/components/Media.js.map +1 -1
- package/dist/components/MediaAudioPlayer.d.ts +1 -1
- package/dist/components/MediaAudioPlayer.d.ts.map +1 -1
- package/dist/components/MediaAudioPlayer.js +4 -1
- package/dist/components/MediaAudioPlayer.js.map +1 -1
- package/dist/components/MediaVideoPlayer.d.ts.map +1 -1
- package/dist/components/MediaVideoPlayer.js +4 -1
- package/dist/components/MediaVideoPlayer.js.map +1 -1
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +5 -1
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/NavGroup.d.ts +1 -1
- package/dist/components/NavGroup.d.ts.map +1 -1
- package/dist/components/NavGroup.js +5 -1
- package/dist/components/NavGroup.js.map +1 -1
- package/dist/components/NavIcon.d.ts +1 -1
- package/dist/components/NavIcon.d.ts.map +1 -1
- package/dist/components/NavIcon.js +1 -1
- package/dist/components/NavIcon.js.map +1 -1
- package/dist/components/NavItem.d.ts +1 -1
- package/dist/components/NavItem.d.ts.map +1 -1
- package/dist/components/NavItem.js +4 -1
- package/dist/components/NavItem.js.map +1 -1
- package/dist/components/NumberInput.d.ts +1 -1
- package/dist/components/NumberInput.d.ts.map +1 -1
- package/dist/components/NumberInput.js +4 -1
- package/dist/components/NumberInput.js.map +1 -1
- package/dist/components/OTPInput.d.ts.map +1 -1
- package/dist/components/OTPInput.js +4 -1
- package/dist/components/OTPInput.js.map +1 -1
- package/dist/components/OgCard.d.ts +1 -1
- package/dist/components/OgCard.d.ts.map +1 -1
- package/dist/components/OgCard.js +6 -1
- package/dist/components/OgCard.js.map +1 -1
- package/dist/components/Option.d.ts +1 -1
- package/dist/components/Option.d.ts.map +1 -1
- package/dist/components/Option.js +4 -1
- package/dist/components/Option.js.map +1 -1
- package/dist/components/{Particle.d.ts → ParticleFx.d.ts} +10 -5
- package/dist/components/ParticleFx.d.ts.map +1 -0
- package/dist/components/{Particle.js → ParticleFx.js} +10 -5
- package/dist/components/ParticleFx.js.map +1 -0
- package/dist/components/PasswordInput.d.ts +1 -1
- package/dist/components/PasswordInput.d.ts.map +1 -1
- package/dist/components/PasswordInput.js +2 -1
- 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 +5 -1
- 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 +1 -1
- package/dist/components/Pulse.js.map +1 -1
- package/dist/components/RadioButton.d.ts +1 -1
- package/dist/components/RadioButton.d.ts.map +1 -1
- package/dist/components/RadioButton.js +2 -1
- package/dist/components/RadioButton.js.map +1 -1
- package/dist/components/RevealFx.d.ts +1 -1
- package/dist/components/RevealFx.d.ts.map +1 -1
- package/dist/components/RevealFx.js +1 -1
- package/dist/components/RevealFx.js.map +1 -1
- package/dist/components/ScrollContainer.d.ts +70 -3
- package/dist/components/ScrollContainer.d.ts.map +1 -1
- package/dist/components/ScrollContainer.js +380 -46
- package/dist/components/ScrollContainer.js.map +1 -1
- package/dist/components/ScrollContainer.module.scss +131 -0
- package/dist/components/ScrollToTop.d.ts +1 -1
- package/dist/components/ScrollToTop.d.ts.map +1 -1
- package/dist/components/ScrollToTop.js +1 -1
- package/dist/components/ScrollToTop.js.map +1 -1
- package/dist/components/Scroller.d.ts +2 -1
- package/dist/components/Scroller.d.ts.map +1 -1
- package/dist/components/Scroller.js +3 -1
- package/dist/components/Scroller.js.map +1 -1
- package/dist/components/Scrubber.d.ts +1 -1
- package/dist/components/Scrubber.d.ts.map +1 -1
- package/dist/components/Scrubber.js +3 -1
- package/dist/components/Scrubber.js.map +1 -1
- package/dist/components/SegmentedControl.d.ts +2 -1
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +3 -1
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/Select.d.ts +6 -3
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/Select.js +8 -1
- package/dist/components/Select.js.map +1 -1
- package/dist/components/ServerFlex.d.ts.map +1 -1
- package/dist/components/ServerFlex.js +17 -42
- package/dist/components/ServerFlex.js.map +1 -1
- package/dist/components/ServerGrid.d.ts.map +1 -1
- package/dist/components/ServerGrid.js +17 -42
- package/dist/components/ServerGrid.js.map +1 -1
- package/dist/components/Setting.d.ts +1 -1
- package/dist/components/Setting.d.ts.map +1 -1
- package/dist/components/Setting.js +10 -2
- package/dist/components/Setting.js.map +1 -1
- package/dist/components/ShineFx.d.ts +1 -1
- package/dist/components/ShineFx.d.ts.map +1 -1
- package/dist/components/ShineFx.js +1 -1
- package/dist/components/ShineFx.js.map +1 -1
- package/dist/components/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton.js +1 -1
- package/dist/components/Skeleton.js.map +1 -1
- package/dist/components/Slider.d.ts.map +1 -1
- package/dist/components/Slider.js +3 -1
- package/dist/components/Slider.js.map +1 -1
- package/dist/components/SmartLink.d.ts.map +1 -1
- package/dist/components/SmartLink.js +2 -1
- package/dist/components/SmartLink.js.map +1 -1
- package/dist/components/Spinner.d.ts +1 -1
- package/dist/components/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner.js +1 -1
- package/dist/components/Spinner.js.map +1 -1
- package/dist/components/SplitView.d.ts +2 -2
- package/dist/components/SplitView.d.ts.map +1 -1
- package/dist/components/SplitView.js +5 -2
- package/dist/components/SplitView.js.map +1 -1
- package/dist/components/StatusIndicator.d.ts +1 -1
- package/dist/components/StatusIndicator.d.ts.map +1 -1
- package/dist/components/StatusIndicator.js +1 -1
- package/dist/components/StatusIndicator.js.map +1 -1
- package/dist/components/StyleOverlay.d.ts +2 -1
- package/dist/components/StyleOverlay.d.ts.map +1 -1
- package/dist/components/StyleOverlay.js +4 -1
- package/dist/components/StyleOverlay.js.map +1 -1
- package/dist/components/StylePanelSections.d.ts +3 -2
- package/dist/components/StylePanelSections.d.ts.map +1 -1
- package/dist/components/StylePanelSections.js +7 -1
- package/dist/components/StylePanelSections.js.map +1 -1
- package/dist/components/Swiper.d.ts +1 -1
- package/dist/components/Swiper.d.ts.map +1 -1
- package/dist/components/Swiper.js +5 -1
- package/dist/components/Swiper.js.map +1 -1
- package/dist/components/Switch.d.ts +1 -1
- package/dist/components/Switch.d.ts.map +1 -1
- package/dist/components/Switch.js +3 -1
- 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 +10 -1
- 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 +3 -1
- package/dist/components/Tag.js.map +1 -1
- package/dist/components/TagInput.d.ts +1 -1
- package/dist/components/TagInput.d.ts.map +1 -1
- package/dist/components/TagInput.js +3 -1
- package/dist/components/TagInput.js.map +1 -1
- package/dist/components/Text.d.ts.map +1 -1
- package/dist/components/Text.js +17 -10
- package/dist/components/Text.js.map +1 -1
- package/dist/components/Textarea.d.ts +3 -0
- package/dist/components/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea.js +25 -7
- package/dist/components/Textarea.js.map +1 -1
- package/dist/components/ThemeSwitcher.d.ts +17 -1
- package/dist/components/ThemeSwitcher.d.ts.map +1 -1
- package/dist/components/ThemeSwitcher.js +67 -10
- package/dist/components/ThemeSwitcher.js.map +1 -1
- package/dist/components/ThemeSwitcher.module.scss +140 -3
- package/dist/components/TiltFx.d.ts +1 -1
- package/dist/components/TiltFx.d.ts.map +1 -1
- package/dist/components/TiltFx.js +1 -1
- package/dist/components/TiltFx.js.map +1 -1
- package/dist/components/Timeline.d.ts +1 -1
- package/dist/components/Timeline.d.ts.map +1 -1
- package/dist/components/Timeline.js +4 -1
- package/dist/components/Timeline.js.map +1 -1
- package/dist/components/Toast.d.ts.map +1 -1
- package/dist/components/Toast.js +4 -1
- package/dist/components/Toast.js.map +1 -1
- package/dist/components/Toaster.d.ts.map +1 -1
- package/dist/components/Toaster.js +4 -2
- package/dist/components/Toaster.js.map +1 -1
- package/dist/components/ToggleButton.d.ts.map +1 -1
- package/dist/components/ToggleButton.js +3 -1
- package/dist/components/ToggleButton.js.map +1 -1
- package/dist/components/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip.js +2 -1
- package/dist/components/Tooltip.js.map +1 -1
- package/dist/components/TypeFx.d.ts +1 -1
- package/dist/components/TypeFx.d.ts.map +1 -1
- package/dist/components/TypeFx.js +1 -1
- package/dist/components/TypeFx.js.map +1 -1
- package/dist/components/User.d.ts +3 -2
- package/dist/components/User.d.ts.map +1 -1
- package/dist/components/User.js +6 -1
- package/dist/components/User.js.map +1 -1
- package/dist/components/UserMenu.d.ts +4 -3
- package/dist/components/UserMenu.d.ts.map +1 -1
- package/dist/components/UserMenu.js +3 -1
- package/dist/components/UserMenu.js.map +1 -1
- package/dist/components/WeatherFx.d.ts +1 -1
- package/dist/components/WeatherFx.d.ts.map +1 -1
- package/dist/components/WeatherFx.js +1 -1
- package/dist/components/WeatherFx.js.map +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -1
- package/dist/components/index.js.map +1 -1
- package/dist/contexts/DataThemeProvider.d.ts +1 -1
- package/dist/contexts/DataThemeProvider.d.ts.map +1 -1
- package/dist/contexts/ThemeProvider.js +1 -1
- package/dist/contexts/ThemeProvider.js.map +1 -1
- package/dist/contexts/ToastProvider.js +1 -1
- package/dist/contexts/ToastProvider.js.map +1 -1
- package/dist/hooks/useArrowNavigation.d.ts.map +1 -1
- package/dist/hooks/useArrowNavigation.js +52 -7
- package/dist/hooks/useArrowNavigation.js.map +1 -1
- package/dist/modules/code/CodeBlock.impl.d.ts +1 -1
- package/dist/modules/code/CodeBlock.impl.d.ts.map +1 -1
- package/dist/modules/code/CodeBlock.impl.js +10 -1
- package/dist/modules/code/CodeBlock.impl.js.map +1 -1
- package/dist/modules/data/BarChart.impl.d.ts +1 -1
- package/dist/modules/data/BarChart.impl.d.ts.map +1 -1
- package/dist/modules/data/BarChart.impl.js +8 -3
- package/dist/modules/data/BarChart.impl.js.map +1 -1
- package/dist/modules/data/ChartHeader.d.ts +2 -1
- package/dist/modules/data/ChartHeader.d.ts.map +1 -1
- package/dist/modules/data/ChartHeader.js +7 -1
- package/dist/modules/data/ChartHeader.js.map +1 -1
- package/dist/modules/data/ChartStatus.d.ts.map +1 -1
- package/dist/modules/data/ChartStatus.js +3 -1
- package/dist/modules/data/ChartStatus.js.map +1 -1
- package/dist/modules/data/DataTooltip.d.ts.map +1 -1
- package/dist/modules/data/DataTooltip.js +4 -1
- package/dist/modules/data/DataTooltip.js.map +1 -1
- package/dist/modules/data/Legend.d.ts.map +1 -1
- package/dist/modules/data/Legend.js +3 -2
- package/dist/modules/data/Legend.js.map +1 -1
- package/dist/modules/data/LineBarChart.impl.d.ts +1 -1
- package/dist/modules/data/LineBarChart.impl.d.ts.map +1 -1
- package/dist/modules/data/LineBarChart.impl.js +8 -3
- package/dist/modules/data/LineBarChart.impl.js.map +1 -1
- package/dist/modules/data/LineChart.impl.d.ts +1 -1
- package/dist/modules/data/LineChart.impl.d.ts.map +1 -1
- package/dist/modules/data/LineChart.impl.js +8 -3
- package/dist/modules/data/LineChart.impl.js.map +1 -1
- package/dist/modules/data/LinearGauge.d.ts +1 -1
- package/dist/modules/data/LinearGauge.d.ts.map +1 -1
- package/dist/modules/data/LinearGauge.js +3 -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 +8 -3
- package/dist/modules/data/PieChart.impl.js.map +1 -1
- package/dist/modules/data/RadialGauge.d.ts +1 -1
- package/dist/modules/data/RadialGauge.d.ts.map +1 -1
- package/dist/modules/data/RadialGauge.js +3 -1
- package/dist/modules/data/RadialGauge.js.map +1 -1
- package/dist/modules/data/Swatch.js +2 -2
- package/dist/modules/data/Swatch.js.map +1 -1
- package/dist/modules/data/interfaces.d.ts +3 -2
- package/dist/modules/data/interfaces.d.ts.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 +5 -1
- package/dist/modules/media/MediaUpload.impl.js.map +1 -1
- package/dist/modules/navigation/HeadingLink.d.ts +1 -1
- package/dist/modules/navigation/HeadingLink.d.ts.map +1 -1
- package/dist/modules/navigation/HeadingLink.js +5 -2
- package/dist/modules/navigation/HeadingLink.js.map +1 -1
- package/dist/modules/navigation/HeadingNav.d.ts +1 -1
- package/dist/modules/navigation/HeadingNav.d.ts.map +1 -1
- package/dist/modules/navigation/HeadingNav.js +7 -1
- package/dist/modules/navigation/HeadingNav.js.map +1 -1
- package/dist/modules/navigation/Kbar.d.ts +1 -1
- package/dist/modules/navigation/Kbar.d.ts.map +1 -1
- package/dist/modules/navigation/Kbar.js +10 -1
- package/dist/modules/navigation/Kbar.js.map +1 -1
- package/dist/modules/navigation/MegaMenu.d.ts +1 -1
- package/dist/modules/navigation/MegaMenu.d.ts.map +1 -1
- package/dist/modules/navigation/MegaMenu.js +230 -16
- package/dist/modules/navigation/MegaMenu.js.map +1 -1
- package/dist/modules/navigation/MobileMegaMenu.d.ts +1 -1
- package/dist/modules/navigation/MobileMegaMenu.d.ts.map +1 -1
- package/dist/modules/navigation/MobileMegaMenu.js +7 -1
- package/dist/modules/navigation/MobileMegaMenu.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/types.d.ts +14 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/MissingDependency.d.ts.map +1 -1
- package/dist/utils/MissingDependency.js +3 -1
- package/dist/utils/MissingDependency.js.map +1 -1
- package/dist/utils/spacingStyle.d.ts +33 -0
- package/dist/utils/spacingStyle.d.ts.map +1 -0
- package/dist/utils/spacingStyle.js +34 -0
- package/dist/utils/spacingStyle.js.map +1 -0
- package/package.json +1 -1
- package/dist/components/Particle.d.ts.map +0 -1
- package/dist/components/Particle.js.map +0 -1
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import classNames from "clsx";
|
|
4
|
+
import React, { forwardRef } from "react";
|
|
5
|
+
import styles from "./Form.module.scss";
|
|
6
|
+
import { FormFieldContext } from "./FormContext";
|
|
7
|
+
import { Grid } from "./Grid";
|
|
8
|
+
const BREAKPOINTS = ["xl", "l", "m", "s", "xs"];
|
|
9
|
+
const DENSITY_GAP = {
|
|
10
|
+
stacked: "0",
|
|
11
|
+
tight: "8",
|
|
12
|
+
spacious: "24",
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Simulate CSS grid's row-major auto-placement for items that declare only a
|
|
16
|
+
* span.
|
|
17
|
+
*
|
|
18
|
+
* This is why the corners are computed here rather than written as
|
|
19
|
+
* `:nth-child()` rules. An item with `span={2}` occupies two tracks but is
|
|
20
|
+
* still one child, so nth-child arithmetic counts the wrong thing as soon as
|
|
21
|
+
* anything spans: in a two-column grid holding four fields where the last two
|
|
22
|
+
* span both columns, the first cell of each row is child 1, 3 and 4 — a set
|
|
23
|
+
* no `an + b` can name. Running this per breakpoint covers the responsive
|
|
24
|
+
* case that defeats corners computed once; see `resolveColumns`.
|
|
25
|
+
*/
|
|
26
|
+
function place(spans, columns) {
|
|
27
|
+
const placements = [];
|
|
28
|
+
let row = 0;
|
|
29
|
+
let col = 0;
|
|
30
|
+
for (const raw of spans) {
|
|
31
|
+
const span = Math.min(Math.max(1, Math.floor(raw)), columns);
|
|
32
|
+
// A span that no longer fits the current row moves to the next one and
|
|
33
|
+
// leaves the tail of this row empty — what the browser does.
|
|
34
|
+
if (col + span > columns) {
|
|
35
|
+
row += 1;
|
|
36
|
+
col = 0;
|
|
37
|
+
}
|
|
38
|
+
placements.push({ row, col, span });
|
|
39
|
+
col += span;
|
|
40
|
+
if (col >= columns) {
|
|
41
|
+
row += 1;
|
|
42
|
+
col = 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return placements;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Which edges of a cell lie on the outside of the occupied region, and so
|
|
49
|
+
* which of its corners stay round.
|
|
50
|
+
*
|
|
51
|
+
* A corner is round only where both edges meeting at it are exposed. That is
|
|
52
|
+
* what makes a ragged last row come out right: three fields in two columns
|
|
53
|
+
* leave the second field's bottom-right on the outside of the group, so it
|
|
54
|
+
* keeps that corner even though it is not the last child.
|
|
55
|
+
*/
|
|
56
|
+
function geometry(placements, columns) {
|
|
57
|
+
const rows = placements.length ? Math.max(...placements.map((p) => p.row)) + 1 : 0;
|
|
58
|
+
// occupancy[row][col] — the index of the cell owning that track, if any.
|
|
59
|
+
const occupancy = Array.from({ length: rows }, () => Array.from({ length: columns }, () => undefined));
|
|
60
|
+
placements.forEach((p, index) => {
|
|
61
|
+
for (let c = p.col; c < p.col + p.span; c += 1) {
|
|
62
|
+
occupancy[p.row][c] = index;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const occupied = (row, col) => row >= 0 && row < rows && col >= 0 && col < columns && occupancy[row][col] !== undefined;
|
|
66
|
+
return placements.map((p) => {
|
|
67
|
+
const cols = Array.from({ length: p.span }, (_, i) => p.col + i);
|
|
68
|
+
const topExposed = cols.every((c) => !occupied(p.row - 1, c));
|
|
69
|
+
const bottomExposed = cols.every((c) => !occupied(p.row + 1, c));
|
|
70
|
+
const leftExposed = !occupied(p.row, p.col - 1);
|
|
71
|
+
const rightExposed = !occupied(p.row, p.col + p.span);
|
|
72
|
+
const corners = [];
|
|
73
|
+
if (topExposed && leftExposed)
|
|
74
|
+
corners.push("tl");
|
|
75
|
+
if (topExposed && rightExposed)
|
|
76
|
+
corners.push("tr");
|
|
77
|
+
if (bottomExposed && leftExposed)
|
|
78
|
+
corners.push("bl");
|
|
79
|
+
if (bottomExposed && rightExposed)
|
|
80
|
+
corners.push("br");
|
|
81
|
+
return {
|
|
82
|
+
// Only an interior edge collapses; a cell whose top edge is on the
|
|
83
|
+
// outside has nothing above it to collapse onto.
|
|
84
|
+
fuseTop: !topExposed,
|
|
85
|
+
fuseLeft: !leftExposed,
|
|
86
|
+
corners,
|
|
87
|
+
span: p.span,
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/** Column count at each breakpoint, cascading xl → xs the way `Grid` does. */
|
|
92
|
+
function resolveColumns(columns) {
|
|
93
|
+
if (typeof columns === "number") {
|
|
94
|
+
return { base: Math.max(1, Math.floor(columns)), perBreakpoint: undefined };
|
|
95
|
+
}
|
|
96
|
+
if (!columns) {
|
|
97
|
+
return { base: 1, perBreakpoint: undefined };
|
|
98
|
+
}
|
|
99
|
+
// The widest value given becomes the base, so a map naming only `xs` and `m`
|
|
100
|
+
// still renders something sensible above `m`.
|
|
101
|
+
const widest = BREAKPOINTS.find((bp) => columns[bp] !== undefined);
|
|
102
|
+
const base = widest ? Math.max(1, Math.floor(columns[widest])) : 1;
|
|
103
|
+
const perBreakpoint = {};
|
|
104
|
+
let current = base;
|
|
105
|
+
for (const bp of BREAKPOINTS) {
|
|
106
|
+
const value = columns[bp];
|
|
107
|
+
if (value !== undefined)
|
|
108
|
+
current = Math.max(1, Math.floor(value));
|
|
109
|
+
perBreakpoint[bp] = current;
|
|
110
|
+
}
|
|
111
|
+
return { base, perBreakpoint };
|
|
112
|
+
}
|
|
113
|
+
/** `corner-tl` at the base, `m-corner-tl` inside the `m` media query. */
|
|
114
|
+
const scoped = (bp, name) => styles[bp ? `${bp}-${name}` : name];
|
|
115
|
+
const Form = forwardRef(({ density = "tight", columns, size, as = "div", onSubmit, className, style, children, ...rest }, ref) => {
|
|
116
|
+
// `toArray` drops the `null`, `undefined` and `false` a conditionally
|
|
117
|
+
// rendered field leaves behind, so everything below is computed over the
|
|
118
|
+
// fields that actually rendered — which is the whole point.
|
|
119
|
+
const items = React.Children.toArray(children).filter(React.isValidElement);
|
|
120
|
+
const spans = items.map((child) => {
|
|
121
|
+
const span = child.props.span;
|
|
122
|
+
return typeof span === "number" && Number.isFinite(span) ? span : 1;
|
|
123
|
+
});
|
|
124
|
+
const fieldDefaults = React.useMemo(() => ({ size }), [size]);
|
|
125
|
+
const { base, perBreakpoint } = resolveColumns(columns);
|
|
126
|
+
const stacked = density === "stacked";
|
|
127
|
+
const responsive = perBreakpoint !== undefined;
|
|
128
|
+
const baseGeometry = geometry(place(spans, base), base);
|
|
129
|
+
// Every breakpoint gets a full set of classes, not just the ones whose
|
|
130
|
+
// column count differs. A cell keeps its base classes at all widths, so a
|
|
131
|
+
// breakpoint that places it differently must be able to state the whole
|
|
132
|
+
// answer — reset included — rather than add to a stale one.
|
|
133
|
+
const breakpointGeometry = {};
|
|
134
|
+
if (perBreakpoint) {
|
|
135
|
+
for (const bp of BREAKPOINTS) {
|
|
136
|
+
const count = perBreakpoint[bp];
|
|
137
|
+
if (count === undefined)
|
|
138
|
+
continue;
|
|
139
|
+
breakpointGeometry[bp] = geometry(place(spans, count), count);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const cells = items.map((child, index) => {
|
|
143
|
+
const cellClasses = [styles.cell];
|
|
144
|
+
const apply = (bp, geo) => {
|
|
145
|
+
if (geo.span > 1)
|
|
146
|
+
cellClasses.push(scoped(bp, `span-${geo.span}`));
|
|
147
|
+
if (!stacked)
|
|
148
|
+
return;
|
|
149
|
+
if (geo.fuseTop)
|
|
150
|
+
cellClasses.push(scoped(bp, "fuse-top"));
|
|
151
|
+
if (geo.fuseLeft)
|
|
152
|
+
cellClasses.push(scoped(bp, "fuse-left"));
|
|
153
|
+
for (const corner of geo.corners) {
|
|
154
|
+
cellClasses.push(scoped(bp, `corner-${corner}`));
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
// With a responsive column map, every viewport is already covered by one
|
|
158
|
+
// of the five breakpoint queries — `xl` is a min-width, `l` a max-width,
|
|
159
|
+
// and the two meet — so base classes would only be a wider answer left
|
|
160
|
+
// lying around for a narrower one to undo.
|
|
161
|
+
if (responsive) {
|
|
162
|
+
for (const bp of BREAKPOINTS) {
|
|
163
|
+
const geo = breakpointGeometry[bp];
|
|
164
|
+
if (!geo)
|
|
165
|
+
continue;
|
|
166
|
+
cellClasses.push(scoped(bp, "reset"));
|
|
167
|
+
apply(bp, geo[index]);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
apply(undefined, baseGeometry[index]);
|
|
172
|
+
}
|
|
173
|
+
return (_jsx("div", { className: classNames(cellClasses), "data-testid": `form-cell-${index}`, children: React.cloneElement(child, {
|
|
174
|
+
span: undefined,
|
|
175
|
+
}) }, child.key ?? index));
|
|
176
|
+
});
|
|
177
|
+
// `Grid`'s own `xl`/`l`/`m`/`s`/`xs` props would do this, but they switch it
|
|
178
|
+
// to `ClientGrid`, which reads `useLayout` and so requires a
|
|
179
|
+
// `LayoutProvider` above it. Nothing here is dynamic — foundations already
|
|
180
|
+
// ships `.m-columns-2` and friends — so the classes go on directly and
|
|
181
|
+
// Form keeps working anywhere.
|
|
182
|
+
const columnClasses = perBreakpoint
|
|
183
|
+
? BREAKPOINTS.filter((bp) => perBreakpoint[bp] !== undefined).map((bp) => `${bp}-columns-${perBreakpoint[bp]}`)
|
|
184
|
+
: [];
|
|
185
|
+
return (_jsx(Grid, { ref: ref, as: as, ...(as === "form" && onSubmit
|
|
186
|
+
? { onSubmit: onSubmit }
|
|
187
|
+
: {}), fillWidth: true, columns: String(base), gap: DENSITY_GAP[density], className: classNames(styles.form, stacked && styles.stacked, columnClasses, className), style: style, "data-density": density, ...rest, children: _jsx(FormFieldContext.Provider, { value: fieldDefaults, children: cells }) }));
|
|
188
|
+
});
|
|
189
|
+
Form.displayName = "Form";
|
|
190
|
+
export { Form };
|
|
191
|
+
//# sourceMappingURL=Form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../src/components/Form.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,UAAU,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAqB9B,MAAM,WAAW,GAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AA6B9D,MAAM,WAAW,GAA4D;IAC3E,O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@@ -0,0 +1,160 @@
|
|
|
1
|
+
@use "../styles/breakpoints.scss" as breakpoints;
|
|
2
|
+
|
|
3
|
+
/* Form — density and grouping
|
|
4
|
+
----------------------------------------------------------------------------
|
|
5
|
+
Two things are worth knowing before editing this file.
|
|
6
|
+
|
|
7
|
+
1. The element that carries the border and the radius is not Form's child.
|
|
8
|
+
`Input` and `Textarea` render an outer `Column` — which also holds the
|
|
9
|
+
error and description rows — wrapping the bordered `Row`. So Form's cell
|
|
10
|
+
is the grandparent of the surface, and every rule here reaches it through
|
|
11
|
+
`[data-surface]`, a hook those components set on that `Row`, rather than
|
|
12
|
+
through `> *`. Bounded to two levels on purpose: a field nested deeper
|
|
13
|
+
inside a cell belongs to somebody else's group, not this one's.
|
|
14
|
+
|
|
15
|
+
2. Nothing here relies on source order to win. The utility already on the
|
|
16
|
+
surface is `.radius-l`, specificity (0,1,0); every rule below that has to
|
|
17
|
+
beat it is at least (0,3,0). Where a breakpoint has to undo what a wider
|
|
18
|
+
one set, it does so through a reset class that is strictly *less*
|
|
19
|
+
specific than the rules re-applying over it, so the cascade resolves the
|
|
20
|
+
same way whichever order a bundler emits them in. */
|
|
21
|
+
|
|
22
|
+
/* The two shapes a cell can hold: a surface that is the cell's own child, and
|
|
23
|
+
the field case, where an outer Column sits in between. */
|
|
24
|
+
@mixin surface {
|
|
25
|
+
> [data-surface],
|
|
26
|
+
> * > [data-surface] {
|
|
27
|
+
@content;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.form {
|
|
32
|
+
/* Corners travel as custom properties rather than going straight to
|
|
33
|
+
`border-radius`, so a breakpoint can move one corner without restating
|
|
34
|
+
the other three. */
|
|
35
|
+
--form-radius: var(--radius-l);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.cell {
|
|
39
|
+
position: relative;
|
|
40
|
+
/* A grid item's default `min-width: auto` refuses to shrink below its
|
|
41
|
+
content, so one long placeholder would widen the whole column. */
|
|
42
|
+
min-width: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.stacked {
|
|
46
|
+
.cell {
|
|
47
|
+
--form-tl: 0px;
|
|
48
|
+
--form-tr: 0px;
|
|
49
|
+
--form-bl: 0px;
|
|
50
|
+
--form-br: 0px;
|
|
51
|
+
|
|
52
|
+
@include surface {
|
|
53
|
+
border-radius: var(--form-tl) var(--form-tr) var(--form-br) var(--form-bl);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* A focused field has to paint over its neighbours — all four of them in two
|
|
58
|
+
dimensions. `SegmentedControl` omits this in compact mode, and its focused
|
|
59
|
+
button loses an edge to the next one; the fix belongs here, where the
|
|
60
|
+
overlap is created. Note there is no `overflow: hidden` anywhere in this
|
|
61
|
+
file, for the same reason: the focus ring is an `outline` with a 2px
|
|
62
|
+
offset, and clipping the cell would clip the ring. */
|
|
63
|
+
.cell:focus-within {
|
|
64
|
+
z-index: 1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Placement rules, emitted once bare and once inside each breakpoint.
|
|
69
|
+
`$p` is the class prefix; the bare pass has none. */
|
|
70
|
+
@mixin placement($p: "") {
|
|
71
|
+
$sep: if($p == "", "", "-");
|
|
72
|
+
|
|
73
|
+
/* Every breakpoint clears the wider one's answer before giving its own,
|
|
74
|
+
because at 375px the `l`, `m`, `s` and `xs` queries all match at once and
|
|
75
|
+
only the narrowest should be heard.
|
|
76
|
+
|
|
77
|
+
Reset and rules sit at the same specificity, (0,3,0), with the reset
|
|
78
|
+
written first — the same way `grid.generated.scss` orders its own
|
|
79
|
+
breakpoint classes, and the reason `placement()` is invoked below in
|
|
80
|
+
cascade order. What is deliberately NOT left to order is the fight
|
|
81
|
+
against the surface's own `.radius-l` utility from another file: that is
|
|
82
|
+
(0,1,0), and everything here outranks it outright.
|
|
83
|
+
|
|
84
|
+
Split in two because a span has to reset at every density, while corners
|
|
85
|
+
and collapsed margins exist only when stacked. */
|
|
86
|
+
@if $p != "" {
|
|
87
|
+
.form .cell.#{$p}#{$sep}reset {
|
|
88
|
+
grid-column: auto;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.stacked .cell.#{$p}#{$sep}reset {
|
|
92
|
+
--form-tl: 0px;
|
|
93
|
+
--form-tr: 0px;
|
|
94
|
+
--form-bl: 0px;
|
|
95
|
+
--form-br: 0px;
|
|
96
|
+
margin-top: 0;
|
|
97
|
+
margin-left: 0;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.stacked .cell.#{$p}#{$sep}corner-tl {
|
|
102
|
+
--form-tl: var(--form-radius);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.stacked .cell.#{$p}#{$sep}corner-tr {
|
|
106
|
+
--form-tr: var(--form-radius);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.stacked .cell.#{$p}#{$sep}corner-bl {
|
|
110
|
+
--form-bl: var(--form-radius);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.stacked .cell.#{$p}#{$sep}corner-br {
|
|
114
|
+
--form-br: var(--form-radius);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Two adjacent 1px borders pulled together by -1px collapse onto exactly one
|
|
118
|
+
line — the trick `gap="-1"` plays for flex, which has no grid equivalent.
|
|
119
|
+
`g--1` does not exist, and the flex classes key off `:not(:first-child)`,
|
|
120
|
+
which in a grid would drag the first cell of every row after the first
|
|
121
|
+
sideways. Applied per cell, because Form knows the row and the column that
|
|
122
|
+
a utility class cannot. */
|
|
123
|
+
.stacked .cell.#{$p}#{$sep}fuse-top {
|
|
124
|
+
margin-top: -1px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.stacked .cell.#{$p}#{$sep}fuse-left {
|
|
128
|
+
margin-left: -1px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@for $n from 2 through 12 {
|
|
132
|
+
.form .cell.#{$p}#{$sep}span-#{$n} {
|
|
133
|
+
grid-column: span #{$n};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@include placement();
|
|
139
|
+
|
|
140
|
+
/* Order matches grid.generated.scss: xl leads, then the max-width queries from
|
|
141
|
+
widest to narrowest, so the narrowest one that matches wins. */
|
|
142
|
+
@include breakpoints.xl {
|
|
143
|
+
@include placement("xl");
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@include breakpoints.l {
|
|
147
|
+
@include placement("l");
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@include breakpoints.m {
|
|
151
|
+
@include placement("m");
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@include breakpoints.s {
|
|
155
|
+
@include placement("s");
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@include breakpoints.xs {
|
|
159
|
+
@include placement("xs");
|
|
160
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TShirtSizes } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* What a `Form` hands down to the fields inside it.
|
|
4
|
+
*
|
|
5
|
+
* Kept out of the package's exports on purpose: this is how `Form` and the
|
|
6
|
+
* field primitives agree on a default, not an API for callers to reach into.
|
|
7
|
+
* A context rather than a cloned prop because `Form` wraps arbitrary children
|
|
8
|
+
* — cloning `size` onto one that is not a field would put a stray attribute
|
|
9
|
+
* in the DOM.
|
|
10
|
+
*/
|
|
11
|
+
export interface FormFieldDefaults {
|
|
12
|
+
size?: TShirtSizes;
|
|
13
|
+
}
|
|
14
|
+
export declare const FormFieldContext: import("react").Context<FormFieldDefaults>;
|
|
15
|
+
/**
|
|
16
|
+
* Resolve a field's size. The field's own prop always wins; a `Form` only
|
|
17
|
+
* supplies a default, and `"m"` remains the default outside one.
|
|
18
|
+
*/
|
|
19
|
+
export declare const useFieldSize: (own?: TShirtSizes) => TShirtSizes;
|
|
20
|
+
//# sourceMappingURL=FormContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormContext.d.ts","sourceRoot":"","sources":["../../src/components/FormContext.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB,4CAAuC,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,WAAW,KAAG,WAGhD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
export const FormFieldContext = createContext({});
|
|
4
|
+
/**
|
|
5
|
+
* Resolve a field's size. The field's own prop always wins; a `Form` only
|
|
6
|
+
* supplies a default, and `"m"` remains the default outside one.
|
|
7
|
+
*/
|
|
8
|
+
export const useFieldSize = (own) => {
|
|
9
|
+
const inherited = useContext(FormFieldContext).size;
|
|
10
|
+
return own ?? inherited ?? "m";
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=FormContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormContext.js","sourceRoot":"","sources":["../../src/components/FormContext.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAgBlD,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAoB,EAAE,CAAC,CAAC;AAErE;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAiB,EAAe,EAAE;IAC7D,MAAM,SAAS,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC;IACpD,OAAO,GAAG,IAAI,SAAS,IAAI,GAAG,CAAC;AACjC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlitchFx.d.ts","sourceRoot":"","sources":["../../src/components/GlitchFx.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GlitchFx.d.ts","sourceRoot":"","sources":["../../src/components/GlitchFx.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,UAAU,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC;IAC/D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,QAAQ,mGA0Fb,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useState, forwardRef, useCallback } from "react";
|
|
4
4
|
import styles from "./GlitchFx.module.scss";
|
|
5
|
-
import { Flex } from "
|
|
5
|
+
import { Flex } from "./Flex";
|
|
6
6
|
import classNames from "clsx";
|
|
7
7
|
const GlitchFx = forwardRef(({ children, speed = "medium", interval = 2500, trigger = "instant", continuous = true, ...rest }, ref) => {
|
|
8
8
|
const [isGlitching, setIsGlitching] = useState(continuous || trigger === "instant");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlitchFx.js","sourceRoot":"","sources":["../../src/components/GlitchFx.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,SAAS,EAA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,EAAC,UAAU,EACnB,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,GAAG,EACR,IAAI,QACJ,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,EAAE,EACX,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,YAEzD,QAAQ,GACJ,IACF,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../src/components/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAG9D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../src/components/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAG9D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAInF,KAAK,YAAY,CAAC,CAAC,SAAS,WAAW,IAAI,SAAS,CAAC,CAAC,CAAC,GACrD,WAAW,GACX,YAAY,GACZ,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,GACxB,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAE9B,QAAA,MAAM,OAAO;KAAI,CAAC,SAAS,WAAW,4SA8BnC,YAAY,CAAC,CAAC,CAAC;;CA6FjB,CAAC;AAIF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import classNames from "clsx";
|
|
3
|
+
import { numericSpacingStyle } from "../utils/spacingStyle";
|
|
3
4
|
const Heading = ({ as, variant, size, weight, family, onBackground, onSolid, align, wrap = "balance", padding, paddingLeft, paddingRight, paddingTop, paddingBottom, paddingX, paddingY, margin, marginLeft, marginRight, marginTop, marginBottom, marginX, marginY, children, style, truncate, opacity, className, ...props }) => {
|
|
4
5
|
const Component = as || "h1";
|
|
5
6
|
if (variant && (size || weight)) {
|
|
@@ -34,16 +35,22 @@ const Heading = ({ as, variant, size, weight, family, onBackground, onSolid, ali
|
|
|
34
35
|
const combinedStyle = {
|
|
35
36
|
textAlign: align,
|
|
36
37
|
textWrap: wrap,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
...numericSpacingStyle({
|
|
39
|
+
padding,
|
|
40
|
+
paddingX,
|
|
41
|
+
paddingY,
|
|
42
|
+
paddingTop,
|
|
43
|
+
paddingRight,
|
|
44
|
+
paddingBottom,
|
|
45
|
+
paddingLeft,
|
|
46
|
+
margin,
|
|
47
|
+
marginX,
|
|
48
|
+
marginY,
|
|
49
|
+
marginTop,
|
|
50
|
+
marginRight,
|
|
51
|
+
marginBottom,
|
|
52
|
+
marginLeft,
|
|
53
|
+
}),
|
|
47
54
|
...style,
|
|
48
55
|
};
|
|
49
56
|
return (_jsx(Component, { className: combinedClasses, style: combinedStyle, ...props, children: children }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../src/components/Heading.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../src/components/Heading.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,MAAM,CAAC;AAI9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAQ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C9B,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,EACnC,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC,EACpC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,EAClC,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,EACrC,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,EAChC,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,EAChC,QAAQ,IAAI,UAAU,EACtB,OAAO,IAAI,WAAW,OAAO,EAAE,EAC/B,MAAM,IAAI,eAAe,MAAM,EAAE,CAClC,CAAC;IAEF,MAAM,aAAa,GAAG;QACpB,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,IAAI;QACd,GAAG,mBAAmB,CAAC;YACrB,OAAO;YACP,QAAQ;YACR,QAAQ;YACR,UAAU;YACV,YAAY;YACZ,aAAa;YACb,WAAW;YACX,MAAM;YACN,OAAO;YACP,OAAO;YACP,SAAS;YACT,WAAW;YACX,YAAY;YACZ,UAAU;SACX,CAAC;QACF,GAAG,KAAK;KACT,CAAC;IAEF,OAAO,CACL,KAAC,SAAS,IACR,SAAS,EAAE,eAAe,EAC1B,KAAK,EAAE,aAAa,KAChB,KAAK,YAER,QAAQ,GACC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HoloFx.d.ts","sourceRoot":"","sources":["../../src/components/HoloFx.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"HoloFx.d.ts","sourceRoot":"","sources":["../../src/components/HoloFx.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAKtC,UAAU,WAAW;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC;IAC7D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;QACzC,IAAI,CAAC,EAAE,WAAW,CAAC;KACpB,CAAC;IACF,IAAI,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;QACzC,IAAI,CAAC,EAAE,WAAW,CAAC;KACpB,CAAC;IACF,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;QACzC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,WAAW,CAAC;KACpB,CAAC;CACH;AAaD,QAAA,MAAM,MAAM,iGA4HV,CAAC;AAGH,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useRef, useCallback, forwardRef } from "react";
|
|
4
4
|
import styles from "./HoloFx.module.scss";
|
|
5
|
-
import { Flex } from "
|
|
5
|
+
import { Flex } from "./Flex";
|
|
6
6
|
import classNames from "clsx";
|
|
7
7
|
import { useInViewport } from "../hooks/useInViewport";
|
|
8
8
|
import { useReducedMotion } from "../hooks/useReducedMotion";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HoloFx.js","sourceRoot":"","sources":["../../src/components/HoloFx.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"HoloFx.js","sourceRoot":"","sources":["../../src/components/HoloFx.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,UAAU,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AA8B7D,MAAM,UAAU,GAAG,CAAC,eAAuB,SAAS,EAAU,EAAE;IAC9D,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,UAAU,GAAG,GAAG,CAAC,GAAG,CAAC;IAC3B,MAAM,UAAU,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACnC,OAAO,2BAA2B,UAAU,IAAI,UAAU,yFAAyF,CAAC;AACtJ,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,IAAkB,EAAU,EAAE;IAClD,OAAO,IAAI,EAAE,YAAY,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E,aAAa,CAAC,MAAM;oBAC5B,YAAY,EAAE,aAAa,CAAC,QAAQ;oBACpC,SAAS,EAAE,aAAa,CAAC,IAAc;iBACxC,YAEA,QAAQ,GACJ,EACP,KAAC,IAAI,IACH,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EACjB,QAAQ,EAAC,UAAU,EACnB,IAAI,QACJ,aAAa,EAAC,MAAM,EACpB,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,EACrD,KAAK,EAAE;oBACL,CAAC,mBAA0B,CAAC,EAAE,eAAe,CAAC,OAAO,GAAG,GAAG;oBAC3D,eAAe,EAAE,eAAe,CAAC,KAAK;oBACtC,MAAM,EAAE,eAAe,CAAC,MAAM;oBAC9B,YAAY,EAAE,eAAe,CAAC,QAAQ;oBACtC,SAAS,EAAE,eAAe,CAAC,IAAc;iBAC1C,GACK,IACH,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hover.d.ts","sourceRoot":"","sources":["../../src/components/Hover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAIZ,SAAS,EAIV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"Hover.d.ts","sourceRoot":"","sources":["../../src/components/Hover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAIZ,SAAS,EAIV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAI9B,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC;IACnE,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CAC1C;AAED,QAAA,MAAM,KAAK,gGA2IV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/dist/components/Hover.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useRef, useEffect, forwardRef, useImperativeHandle, useCallback, } from "react";
|
|
4
|
-
import { Row } from "
|
|
4
|
+
import { Row } from "./Row";
|
|
5
5
|
import styles from "./Hover.module.scss";
|
|
6
6
|
const Hover = forwardRef(({ trigger, overlay, interactive = false, delay = 0, hideDelay = 0, disabled = false, touch = "disable", ...flex }, ref) => {
|
|
7
7
|
const [isHovered, setIsHovered] = useState(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hover.js","sourceRoot":"","sources":["../../src/components/Hover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EACZ,QAAQ,EACR,MAAM,EACN,SAAS,EAET,UAAU,EACV,mBAAmB,EACnB,WAAW,GACZ,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Hover.js","sourceRoot":"","sources":["../../src/components/Hover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EACZ,QAAQ,EACR,MAAM,EACN,SAAS,EAET,UAAU,EACV,mBAAmB,EACnB,WAAW,GACZ,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAYzC,MAAM,KAAK,GAAG,UAAU,CACtB,CACE,EACE,OAAO,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MAAM,YAEvB,OAAO,GACJ,CACP,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimationProps } from "
|
|
1
|
+
import { AnimationProps } from "./Animation";
|
|
2
2
|
type HoverCardProps = Omit<AnimationProps, 'triggerType' | 'portal'>;
|
|
3
3
|
declare const HoverCard: import("react").ForwardRefExoticComponent<Omit<HoverCardProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export { HoverCard };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HoverCard.d.ts","sourceRoot":"","sources":["../../src/components/HoverCard.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAa,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"HoverCard.d.ts","sourceRoot":"","sources":["../../src/components/HoverCard.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAa,cAAc,EAAE,MAAM,aAAa,CAAC;AAExD,KAAK,cAAc,GAAG,IAAI,CAAC,cAAc,EAAE,aAAa,GAAG,QAAQ,CAAC,CAAC;AAErE,QAAA,MAAM,SAAS,wHAkBd,CAAC;AAGF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
|
-
import { Animation } from "
|
|
4
|
+
import { Animation } from "./Animation";
|
|
5
5
|
const HoverCard = forwardRef(({ children, ...props }, ref) => {
|
|
6
6
|
return (_jsx(Animation, { ref: ref, fade: 0, slideUp: 0.5, scale: 0.9, duration: 200, triggerType: "hover", placement: "top", portal: true, ...props, children: children }));
|
|
7
7
|
});
|