kigumi 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +407 -0
- package/dist/chunk-FG4CIVPT.js +52 -0
- package/dist/chunk-IRCCX2A2.js +72 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6119 -0
- package/dist/path-aliases-3OJ2RKTE.js +95 -0
- package/dist/path-aliases-44XMTAAA.js +89 -0
- package/dist/path-aliases-CNBMGBKE.js +98 -0
- package/dist/path-aliases-L6USUZ4R.js +91 -0
- package/dist/path-aliases-NX2TDEHO.js +92 -0
- package/dist/path-aliases-ZRNAAXX2.js +94 -0
- package/dist/project-config-3XEQHIUM.js +115 -0
- package/dist/project-config-4YGWM3KJ.js +92 -0
- package/dist/project-config-YLUSQM7U.js +108 -0
- package/dist/templates/AGENTS.md +214 -0
- package/dist/templates/react/AnimatedImage/AnimatedImage.css.hbs +19 -0
- package/dist/templates/react/AnimatedImage/AnimatedImage.jsx.hbs +64 -0
- package/dist/templates/react/AnimatedImage/AnimatedImage.test.jsx.hbs +29 -0
- package/dist/templates/react/AnimatedImage/AnimatedImage.test.tsx.hbs +14 -0
- package/dist/templates/react/AnimatedImage/AnimatedImage.tsx.hbs +68 -0
- package/dist/templates/react/Animation/Animation.css.hbs +18 -0
- package/dist/templates/react/Animation/Animation.jsx.hbs +100 -0
- package/dist/templates/react/Animation/Animation.test.jsx.hbs +37 -0
- package/dist/templates/react/Animation/Animation.test.tsx.hbs +14 -0
- package/dist/templates/react/Animation/Animation.tsx.hbs +127 -0
- package/dist/templates/react/Avatar/Avatar.css.hbs +20 -0
- package/dist/templates/react/Avatar/Avatar.jsx.hbs +65 -0
- package/dist/templates/react/Avatar/Avatar.test.jsx.hbs +33 -0
- package/dist/templates/react/Avatar/Avatar.test.tsx.hbs +14 -0
- package/dist/templates/react/Avatar/Avatar.tsx.hbs +71 -0
- package/dist/templates/react/Badge/Badge.css.hbs +18 -0
- package/dist/templates/react/Badge/Badge.jsx.hbs +46 -0
- package/dist/templates/react/Badge/Badge.test.jsx.hbs +28 -0
- package/dist/templates/react/Badge/Badge.test.tsx.hbs +14 -0
- package/dist/templates/react/Badge/Badge.tsx.hbs +50 -0
- package/dist/templates/react/Breadcrumb/Breadcrumb.css.hbs +18 -0
- package/dist/templates/react/Breadcrumb/Breadcrumb.jsx.hbs +48 -0
- package/dist/templates/react/Breadcrumb/Breadcrumb.test.jsx.hbs +34 -0
- package/dist/templates/react/Breadcrumb/Breadcrumb.test.tsx.hbs +14 -0
- package/dist/templates/react/Breadcrumb/Breadcrumb.tsx.hbs +49 -0
- package/dist/templates/react/BreadcrumbItem/BreadcrumbItem.css.hbs +21 -0
- package/dist/templates/react/BreadcrumbItem/BreadcrumbItem.jsx.hbs +55 -0
- package/dist/templates/react/BreadcrumbItem/BreadcrumbItem.test.jsx.hbs +36 -0
- package/dist/templates/react/BreadcrumbItem/BreadcrumbItem.test.tsx.hbs +14 -0
- package/dist/templates/react/BreadcrumbItem/BreadcrumbItem.tsx.hbs +58 -0
- package/dist/templates/react/Button/Button.css.hbs +23 -0
- package/dist/templates/react/Button/Button.jsx.hbs +106 -0
- package/dist/templates/react/Button/Button.test.jsx.hbs +23 -0
- package/dist/templates/react/Button/Button.test.tsx.hbs +14 -0
- package/dist/templates/react/Button/Button.tsx.hbs +131 -0
- package/dist/templates/react/Card/Card.css.hbs +21 -0
- package/dist/templates/react/Card/Card.jsx.hbs +33 -0
- package/dist/templates/react/Card/Card.test.jsx.hbs +23 -0
- package/dist/templates/react/Card/Card.test.tsx.hbs +14 -0
- package/dist/templates/react/Card/Card.tsx.hbs +41 -0
- package/dist/templates/react/Carousel/Carousel.css.hbs +28 -0
- package/dist/templates/react/Carousel/Carousel.jsx.hbs +81 -0
- package/dist/templates/react/Carousel/Carousel.test.jsx.hbs +25 -0
- package/dist/templates/react/Carousel/Carousel.test.tsx.hbs +14 -0
- package/dist/templates/react/Carousel/Carousel.tsx.hbs +108 -0
- package/dist/templates/react/CarouselItem/CarouselItem.css.hbs +18 -0
- package/dist/templates/react/CarouselItem/CarouselItem.jsx.hbs +28 -0
- package/dist/templates/react/CarouselItem/CarouselItem.test.jsx.hbs +21 -0
- package/dist/templates/react/CarouselItem/CarouselItem.test.tsx.hbs +14 -0
- package/dist/templates/react/CarouselItem/CarouselItem.tsx.hbs +33 -0
- package/dist/templates/react/Checkbox/Checkbox.css.hbs +24 -0
- package/dist/templates/react/Checkbox/Checkbox.jsx.hbs +80 -0
- package/dist/templates/react/Checkbox/Checkbox.test.jsx.hbs +25 -0
- package/dist/templates/react/Checkbox/Checkbox.test.tsx.hbs +14 -0
- package/dist/templates/react/Checkbox/Checkbox.tsx.hbs +113 -0
- package/dist/templates/react/ColorPicker/ColorPicker.css.hbs +37 -0
- package/dist/templates/react/ColorPicker/ColorPicker.jsx.hbs +72 -0
- package/dist/templates/react/ColorPicker/ColorPicker.test.jsx.hbs +25 -0
- package/dist/templates/react/ColorPicker/ColorPicker.test.tsx.hbs +14 -0
- package/dist/templates/react/ColorPicker/ColorPicker.tsx.hbs +157 -0
- package/dist/templates/react/Combobox/Combobox.css.hbs +32 -0
- package/dist/templates/react/Combobox/Combobox.jsx.hbs +67 -0
- package/dist/templates/react/Combobox/Combobox.test.jsx.hbs +19 -0
- package/dist/templates/react/Combobox/Combobox.test.tsx.hbs +14 -0
- package/dist/templates/react/Combobox/Combobox.tsx.hbs +154 -0
- package/dist/templates/react/Comparison/Comparison.css.hbs +23 -0
- package/dist/templates/react/Comparison/Comparison.jsx.hbs +27 -0
- package/dist/templates/react/Comparison/Comparison.test.jsx.hbs +27 -0
- package/dist/templates/react/Comparison/Comparison.test.tsx.hbs +14 -0
- package/dist/templates/react/Comparison/Comparison.tsx.hbs +32 -0
- package/dist/templates/react/CopyButton/CopyButton.css.hbs +25 -0
- package/dist/templates/react/CopyButton/CopyButton.jsx.hbs +49 -0
- package/dist/templates/react/CopyButton/CopyButton.test.jsx.hbs +16 -0
- package/dist/templates/react/CopyButton/CopyButton.test.tsx.hbs +14 -0
- package/dist/templates/react/CopyButton/CopyButton.tsx.hbs +71 -0
- package/dist/templates/react/Details/Details.css.hbs +24 -0
- package/dist/templates/react/Details/Details.jsx.hbs +66 -0
- package/dist/templates/react/Details/Details.test.jsx.hbs +27 -0
- package/dist/templates/react/Details/Details.test.tsx.hbs +14 -0
- package/dist/templates/react/Details/Details.tsx.hbs +111 -0
- package/dist/templates/react/Dialog/Dialog.css.hbs +28 -0
- package/dist/templates/react/Dialog/Dialog.jsx.hbs +115 -0
- package/dist/templates/react/Dialog/Dialog.test.jsx.hbs +29 -0
- package/dist/templates/react/Dialog/Dialog.test.tsx.hbs +14 -0
- package/dist/templates/react/Dialog/Dialog.tsx.hbs +165 -0
- package/dist/templates/react/Divider/Divider.css.hbs +21 -0
- package/dist/templates/react/Divider/Divider.jsx.hbs +24 -0
- package/dist/templates/react/Divider/Divider.test.jsx.hbs +16 -0
- package/dist/templates/react/Divider/Divider.test.tsx.hbs +14 -0
- package/dist/templates/react/Divider/Divider.tsx.hbs +24 -0
- package/dist/templates/react/Drawer/Drawer.css.hbs +28 -0
- package/dist/templates/react/Drawer/Drawer.jsx.hbs +75 -0
- package/dist/templates/react/Drawer/Drawer.test.jsx.hbs +27 -0
- package/dist/templates/react/Drawer/Drawer.test.tsx.hbs +14 -0
- package/dist/templates/react/Drawer/Drawer.tsx.hbs +99 -0
- package/dist/templates/react/Dropdown/Dropdown.css.hbs +20 -0
- package/dist/templates/react/Dropdown/Dropdown.jsx.hbs +78 -0
- package/dist/templates/react/Dropdown/Dropdown.test.jsx.hbs +18 -0
- package/dist/templates/react/Dropdown/Dropdown.test.tsx.hbs +14 -0
- package/dist/templates/react/Dropdown/Dropdown.tsx.hbs +104 -0
- package/dist/templates/react/DropdownItem/DropdownItem.css.hbs +23 -0
- package/dist/templates/react/DropdownItem/DropdownItem.jsx.hbs +41 -0
- package/dist/templates/react/DropdownItem/DropdownItem.test.jsx.hbs +18 -0
- package/dist/templates/react/DropdownItem/DropdownItem.test.tsx.hbs +14 -0
- package/dist/templates/react/DropdownItem/DropdownItem.tsx.hbs +56 -0
- package/dist/templates/react/FormatBytes/FormatBytes.css.hbs +18 -0
- package/dist/templates/react/FormatBytes/FormatBytes.jsx.hbs +25 -0
- package/dist/templates/react/FormatBytes/FormatBytes.test.jsx.hbs +16 -0
- package/dist/templates/react/FormatBytes/FormatBytes.test.tsx.hbs +14 -0
- package/dist/templates/react/FormatBytes/FormatBytes.tsx.hbs +27 -0
- package/dist/templates/react/FormatDate/FormatDate.css.hbs +18 -0
- package/dist/templates/react/FormatDate/FormatDate.jsx.hbs +18 -0
- package/dist/templates/react/FormatDate/FormatDate.test.jsx.hbs +11 -0
- package/dist/templates/react/FormatDate/FormatDate.test.tsx.hbs +14 -0
- package/dist/templates/react/FormatDate/FormatDate.tsx.hbs +45 -0
- package/dist/templates/react/FormatNumber/FormatNumber.css.hbs +18 -0
- package/dist/templates/react/FormatNumber/FormatNumber.jsx.hbs +18 -0
- package/dist/templates/react/FormatNumber/FormatNumber.test.jsx.hbs +16 -0
- package/dist/templates/react/FormatNumber/FormatNumber.test.tsx.hbs +14 -0
- package/dist/templates/react/FormatNumber/FormatNumber.tsx.hbs +41 -0
- package/dist/templates/react/Icon/Icon.css.hbs +22 -0
- package/dist/templates/react/Icon/Icon.jsx.hbs +83 -0
- package/dist/templates/react/Icon/Icon.test.jsx.hbs +35 -0
- package/dist/templates/react/Icon/Icon.test.tsx.hbs +14 -0
- package/dist/templates/react/Icon/Icon.tsx.hbs +93 -0
- package/dist/templates/react/Include/Include.css.hbs +18 -0
- package/dist/templates/react/Include/Include.jsx.hbs +40 -0
- package/dist/templates/react/Include/Include.test.jsx.hbs +16 -0
- package/dist/templates/react/Include/Include.test.tsx.hbs +14 -0
- package/dist/templates/react/Include/Include.tsx.hbs +53 -0
- package/dist/templates/react/Input/Input.css.hbs +25 -0
- package/dist/templates/react/Input/Input.jsx.hbs +126 -0
- package/dist/templates/react/Input/Input.test.jsx.hbs +23 -0
- package/dist/templates/react/Input/Input.test.tsx.hbs +14 -0
- package/dist/templates/react/Input/Input.tsx.hbs +154 -0
- package/dist/templates/react/IntersectionObserver/IntersectionObserver.css.hbs +18 -0
- package/dist/templates/react/IntersectionObserver/IntersectionObserver.jsx.hbs +38 -0
- package/dist/templates/react/IntersectionObserver/IntersectionObserver.test.jsx.hbs +15 -0
- package/dist/templates/react/IntersectionObserver/IntersectionObserver.test.tsx.hbs +14 -0
- package/dist/templates/react/IntersectionObserver/IntersectionObserver.tsx.hbs +55 -0
- package/dist/templates/react/KIGUMI_SETUP.md.hbs +52 -0
- package/dist/templates/react/MutationObserver/MutationObserver.css.hbs +18 -0
- package/dist/templates/react/MutationObserver/MutationObserver.jsx.hbs +38 -0
- package/dist/templates/react/MutationObserver/MutationObserver.test.jsx.hbs +15 -0
- package/dist/templates/react/MutationObserver/MutationObserver.test.tsx.hbs +14 -0
- package/dist/templates/react/MutationObserver/MutationObserver.tsx.hbs +55 -0
- package/dist/templates/react/Option/Option.css.hbs +21 -0
- package/dist/templates/react/Option/Option.jsx.hbs +20 -0
- package/dist/templates/react/Option/Option.test.jsx.hbs +11 -0
- package/dist/templates/react/Option/Option.test.tsx.hbs +14 -0
- package/dist/templates/react/Option/Option.tsx.hbs +27 -0
- package/dist/templates/react/Popover/Popover.css.hbs +25 -0
- package/dist/templates/react/Popover/Popover.jsx.hbs +68 -0
- package/dist/templates/react/Popover/Popover.test.jsx.hbs +18 -0
- package/dist/templates/react/Popover/Popover.test.tsx.hbs +14 -0
- package/dist/templates/react/Popover/Popover.tsx.hbs +101 -0
- package/dist/templates/react/Popup/Popup.css.hbs +25 -0
- package/dist/templates/react/Popup/Popup.jsx.hbs +45 -0
- package/dist/templates/react/Popup/Popup.test.jsx.hbs +17 -0
- package/dist/templates/react/Popup/Popup.test.tsx.hbs +14 -0
- package/dist/templates/react/Popup/Popup.tsx.hbs +83 -0
- package/dist/templates/react/ProgressBar/ProgressBar.css.hbs +22 -0
- package/dist/templates/react/ProgressBar/ProgressBar.jsx.hbs +20 -0
- package/dist/templates/react/ProgressBar/ProgressBar.test.jsx.hbs +16 -0
- package/dist/templates/react/ProgressBar/ProgressBar.test.tsx.hbs +14 -0
- package/dist/templates/react/ProgressBar/ProgressBar.tsx.hbs +29 -0
- package/dist/templates/react/ProgressRing/ProgressRing.css.hbs +26 -0
- package/dist/templates/react/ProgressRing/ProgressRing.jsx.hbs +20 -0
- package/dist/templates/react/ProgressRing/ProgressRing.test.jsx.hbs +16 -0
- package/dist/templates/react/ProgressRing/ProgressRing.test.tsx.hbs +14 -0
- package/dist/templates/react/ProgressRing/ProgressRing.tsx.hbs +27 -0
- package/dist/templates/react/QrCode/QrCode.css.hbs +18 -0
- package/dist/templates/react/QrCode/QrCode.jsx.hbs +18 -0
- package/dist/templates/react/QrCode/QrCode.test.jsx.hbs +11 -0
- package/dist/templates/react/QrCode/QrCode.test.tsx.hbs +14 -0
- package/dist/templates/react/QrCode/QrCode.tsx.hbs +35 -0
- package/dist/templates/react/Radio/Radio.css.hbs +21 -0
- package/dist/templates/react/Radio/Radio.jsx.hbs +20 -0
- package/dist/templates/react/Radio/Radio.test.jsx.hbs +11 -0
- package/dist/templates/react/Radio/Radio.test.tsx.hbs +14 -0
- package/dist/templates/react/Radio/Radio.tsx.hbs +31 -0
- package/dist/templates/react/RadioGroup/RadioGroup.css.hbs +22 -0
- package/dist/templates/react/RadioGroup/RadioGroup.jsx.hbs +49 -0
- package/dist/templates/react/RadioGroup/RadioGroup.test.jsx.hbs +17 -0
- package/dist/templates/react/RadioGroup/RadioGroup.test.tsx.hbs +14 -0
- package/dist/templates/react/RadioGroup/RadioGroup.tsx.hbs +79 -0
- package/dist/templates/react/Rating/Rating.css.hbs +20 -0
- package/dist/templates/react/Rating/Rating.jsx.hbs +48 -0
- package/dist/templates/react/Rating/Rating.test.jsx.hbs +18 -0
- package/dist/templates/react/Rating/Rating.test.tsx.hbs +14 -0
- package/dist/templates/react/Rating/Rating.tsx.hbs +78 -0
- package/dist/templates/react/RelativeTime/RelativeTime.css.hbs +18 -0
- package/dist/templates/react/RelativeTime/RelativeTime.jsx.hbs +18 -0
- package/dist/templates/react/RelativeTime/RelativeTime.test.jsx.hbs +11 -0
- package/dist/templates/react/RelativeTime/RelativeTime.test.tsx.hbs +14 -0
- package/dist/templates/react/RelativeTime/RelativeTime.tsx.hbs +29 -0
- package/dist/templates/react/ResizeObserver/ResizeObserver.css.hbs +18 -0
- package/dist/templates/react/ResizeObserver/ResizeObserver.jsx.hbs +38 -0
- package/dist/templates/react/ResizeObserver/ResizeObserver.test.jsx.hbs +15 -0
- package/dist/templates/react/ResizeObserver/ResizeObserver.test.tsx.hbs +14 -0
- package/dist/templates/react/ResizeObserver/ResizeObserver.tsx.hbs +45 -0
- package/dist/templates/react/Scroller/Scroller.css.hbs +19 -0
- package/dist/templates/react/Scroller/Scroller.jsx.hbs +20 -0
- package/dist/templates/react/Scroller/Scroller.test.jsx.hbs +11 -0
- package/dist/templates/react/Scroller/Scroller.test.tsx.hbs +14 -0
- package/dist/templates/react/Scroller/Scroller.tsx.hbs +29 -0
- package/dist/templates/react/Select/Select.css.hbs +32 -0
- package/dist/templates/react/Select/Select.jsx.hbs +79 -0
- package/dist/templates/react/Select/Select.test.jsx.hbs +20 -0
- package/dist/templates/react/Select/Select.test.tsx.hbs +14 -0
- package/dist/templates/react/Select/Select.tsx.hbs +140 -0
- package/dist/templates/react/Skeleton/Skeleton.css.hbs +19 -0
- package/dist/templates/react/Skeleton/Skeleton.jsx.hbs +18 -0
- package/dist/templates/react/Skeleton/Skeleton.test.jsx.hbs +11 -0
- package/dist/templates/react/Skeleton/Skeleton.test.tsx.hbs +14 -0
- package/dist/templates/react/Skeleton/Skeleton.tsx.hbs +23 -0
- package/dist/templates/react/Slider/Slider.css.hbs +26 -0
- package/dist/templates/react/Slider/Slider.jsx.hbs +50 -0
- package/dist/templates/react/Slider/Slider.test.jsx.hbs +19 -0
- package/dist/templates/react/Slider/Slider.test.tsx.hbs +14 -0
- package/dist/templates/react/Slider/Slider.tsx.hbs +100 -0
- package/dist/templates/react/Spinner/Spinner.css.hbs +21 -0
- package/dist/templates/react/Spinner/Spinner.jsx.hbs +18 -0
- package/dist/templates/react/Spinner/Spinner.test.jsx.hbs +11 -0
- package/dist/templates/react/Spinner/Spinner.test.tsx.hbs +14 -0
- package/dist/templates/react/Spinner/Spinner.tsx.hbs +20 -0
- package/dist/templates/react/SplitPanel/SplitPanel.css.hbs +24 -0
- package/dist/templates/react/SplitPanel/SplitPanel.jsx.hbs +38 -0
- package/dist/templates/react/SplitPanel/SplitPanel.test.jsx.hbs +16 -0
- package/dist/templates/react/SplitPanel/SplitPanel.test.tsx.hbs +14 -0
- package/dist/templates/react/SplitPanel/SplitPanel.tsx.hbs +55 -0
- package/dist/templates/react/Switch/Switch.css.hbs +24 -0
- package/dist/templates/react/Switch/Switch.jsx.hbs +51 -0
- package/dist/templates/react/Switch/Switch.test.jsx.hbs +19 -0
- package/dist/templates/react/Switch/Switch.test.tsx.hbs +14 -0
- package/dist/templates/react/Switch/Switch.tsx.hbs +83 -0
- package/dist/templates/react/Tab/Tab.css.hbs +18 -0
- package/dist/templates/react/Tab/Tab.jsx.hbs +20 -0
- package/dist/templates/react/Tab/Tab.test.jsx.hbs +11 -0
- package/dist/templates/react/Tab/Tab.test.tsx.hbs +14 -0
- package/dist/templates/react/Tab/Tab.tsx.hbs +27 -0
- package/dist/templates/react/TabGroup/TabGroup.css.hbs +27 -0
- package/dist/templates/react/TabGroup/TabGroup.jsx.hbs +42 -0
- package/dist/templates/react/TabGroup/TabGroup.test.jsx.hbs +11 -0
- package/dist/templates/react/TabGroup/TabGroup.test.tsx.hbs +14 -0
- package/dist/templates/react/TabGroup/TabGroup.tsx.hbs +57 -0
- package/dist/templates/react/TabPanel/TabPanel.css.hbs +18 -0
- package/dist/templates/react/TabPanel/TabPanel.jsx.hbs +20 -0
- package/dist/templates/react/TabPanel/TabPanel.test.jsx.hbs +11 -0
- package/dist/templates/react/TabPanel/TabPanel.test.tsx.hbs +14 -0
- package/dist/templates/react/TabPanel/TabPanel.tsx.hbs +27 -0
- package/dist/templates/react/Tag/Tag.css.hbs +21 -0
- package/dist/templates/react/Tag/Tag.jsx.hbs +41 -0
- package/dist/templates/react/Tag/Tag.test.jsx.hbs +11 -0
- package/dist/templates/react/Tag/Tag.test.tsx.hbs +14 -0
- package/dist/templates/react/Tag/Tag.tsx.hbs +60 -0
- package/dist/templates/react/Textarea/Textarea.css.hbs +22 -0
- package/dist/templates/react/Textarea/Textarea.jsx.hbs +58 -0
- package/dist/templates/react/Textarea/Textarea.test.jsx.hbs +11 -0
- package/dist/templates/react/Textarea/Textarea.test.tsx.hbs +14 -0
- package/dist/templates/react/Textarea/Textarea.tsx.hbs +114 -0
- package/dist/templates/react/Tooltip/Tooltip.css.hbs +21 -0
- package/dist/templates/react/Tooltip/Tooltip.jsx.hbs +63 -0
- package/dist/templates/react/Tooltip/Tooltip.test.jsx.hbs +15 -0
- package/dist/templates/react/Tooltip/Tooltip.test.tsx.hbs +14 -0
- package/dist/templates/react/Tooltip/Tooltip.tsx.hbs +104 -0
- package/dist/templates/react/Tree/Tree.css.hbs +22 -0
- package/dist/templates/react/Tree/Tree.jsx.hbs +41 -0
- package/dist/templates/react/Tree/Tree.test.jsx.hbs +11 -0
- package/dist/templates/react/Tree/Tree.test.tsx.hbs +14 -0
- package/dist/templates/react/Tree/Tree.tsx.hbs +52 -0
- package/dist/templates/react/TreeItem/TreeItem.css.hbs +32 -0
- package/dist/templates/react/TreeItem/TreeItem.jsx.hbs +57 -0
- package/dist/templates/react/TreeItem/TreeItem.test.jsx.hbs +11 -0
- package/dist/templates/react/TreeItem/TreeItem.test.tsx.hbs +14 -0
- package/dist/templates/react/TreeItem/TreeItem.tsx.hbs +87 -0
- package/dist/templates/react/ZoomableFrame/ZoomableFrame.css.hbs +21 -0
- package/dist/templates/react/ZoomableFrame/ZoomableFrame.jsx.hbs +52 -0
- package/dist/templates/react/ZoomableFrame/ZoomableFrame.test.jsx.hbs +11 -0
- package/dist/templates/react/ZoomableFrame/ZoomableFrame.test.tsx.hbs +14 -0
- package/dist/templates/react/ZoomableFrame/ZoomableFrame.tsx.hbs +92 -0
- package/dist/templates/react/vite-env.d.ts.hbs +21 -0
- package/dist/tier-2ZEZT6E3.js +12 -0
- package/dist/tier-GFXZQZUI.js +12 -0
- package/package.json +82 -0
- package/templates/AGENTS.md +214 -0
- package/templates/react/AnimatedImage/AnimatedImage.css.hbs +19 -0
- package/templates/react/AnimatedImage/AnimatedImage.jsx.hbs +64 -0
- package/templates/react/AnimatedImage/AnimatedImage.test.jsx.hbs +29 -0
- package/templates/react/AnimatedImage/AnimatedImage.test.tsx.hbs +14 -0
- package/templates/react/AnimatedImage/AnimatedImage.tsx.hbs +68 -0
- package/templates/react/Animation/Animation.css.hbs +18 -0
- package/templates/react/Animation/Animation.jsx.hbs +100 -0
- package/templates/react/Animation/Animation.test.jsx.hbs +37 -0
- package/templates/react/Animation/Animation.test.tsx.hbs +14 -0
- package/templates/react/Animation/Animation.tsx.hbs +127 -0
- package/templates/react/Avatar/Avatar.css.hbs +20 -0
- package/templates/react/Avatar/Avatar.jsx.hbs +65 -0
- package/templates/react/Avatar/Avatar.test.jsx.hbs +33 -0
- package/templates/react/Avatar/Avatar.test.tsx.hbs +14 -0
- package/templates/react/Avatar/Avatar.tsx.hbs +71 -0
- package/templates/react/Badge/Badge.css.hbs +18 -0
- package/templates/react/Badge/Badge.jsx.hbs +46 -0
- package/templates/react/Badge/Badge.test.jsx.hbs +28 -0
- package/templates/react/Badge/Badge.test.tsx.hbs +14 -0
- package/templates/react/Badge/Badge.tsx.hbs +50 -0
- package/templates/react/Breadcrumb/Breadcrumb.css.hbs +18 -0
- package/templates/react/Breadcrumb/Breadcrumb.jsx.hbs +48 -0
- package/templates/react/Breadcrumb/Breadcrumb.test.jsx.hbs +34 -0
- package/templates/react/Breadcrumb/Breadcrumb.test.tsx.hbs +14 -0
- package/templates/react/Breadcrumb/Breadcrumb.tsx.hbs +49 -0
- package/templates/react/BreadcrumbItem/BreadcrumbItem.css.hbs +21 -0
- package/templates/react/BreadcrumbItem/BreadcrumbItem.jsx.hbs +55 -0
- package/templates/react/BreadcrumbItem/BreadcrumbItem.test.jsx.hbs +36 -0
- package/templates/react/BreadcrumbItem/BreadcrumbItem.test.tsx.hbs +14 -0
- package/templates/react/BreadcrumbItem/BreadcrumbItem.tsx.hbs +58 -0
- package/templates/react/Button/Button.css.hbs +23 -0
- package/templates/react/Button/Button.jsx.hbs +106 -0
- package/templates/react/Button/Button.test.jsx.hbs +23 -0
- package/templates/react/Button/Button.test.tsx.hbs +14 -0
- package/templates/react/Button/Button.tsx.hbs +131 -0
- package/templates/react/Card/Card.css.hbs +21 -0
- package/templates/react/Card/Card.jsx.hbs +33 -0
- package/templates/react/Card/Card.test.jsx.hbs +23 -0
- package/templates/react/Card/Card.test.tsx.hbs +14 -0
- package/templates/react/Card/Card.tsx.hbs +41 -0
- package/templates/react/Carousel/Carousel.css.hbs +28 -0
- package/templates/react/Carousel/Carousel.jsx.hbs +81 -0
- package/templates/react/Carousel/Carousel.test.jsx.hbs +25 -0
- package/templates/react/Carousel/Carousel.test.tsx.hbs +14 -0
- package/templates/react/Carousel/Carousel.tsx.hbs +108 -0
- package/templates/react/CarouselItem/CarouselItem.css.hbs +18 -0
- package/templates/react/CarouselItem/CarouselItem.jsx.hbs +28 -0
- package/templates/react/CarouselItem/CarouselItem.test.jsx.hbs +21 -0
- package/templates/react/CarouselItem/CarouselItem.test.tsx.hbs +14 -0
- package/templates/react/CarouselItem/CarouselItem.tsx.hbs +33 -0
- package/templates/react/Checkbox/Checkbox.css.hbs +24 -0
- package/templates/react/Checkbox/Checkbox.jsx.hbs +80 -0
- package/templates/react/Checkbox/Checkbox.test.jsx.hbs +25 -0
- package/templates/react/Checkbox/Checkbox.test.tsx.hbs +14 -0
- package/templates/react/Checkbox/Checkbox.tsx.hbs +113 -0
- package/templates/react/ColorPicker/ColorPicker.css.hbs +37 -0
- package/templates/react/ColorPicker/ColorPicker.jsx.hbs +72 -0
- package/templates/react/ColorPicker/ColorPicker.test.jsx.hbs +25 -0
- package/templates/react/ColorPicker/ColorPicker.test.tsx.hbs +14 -0
- package/templates/react/ColorPicker/ColorPicker.tsx.hbs +157 -0
- package/templates/react/Combobox/Combobox.css.hbs +32 -0
- package/templates/react/Combobox/Combobox.jsx.hbs +67 -0
- package/templates/react/Combobox/Combobox.test.jsx.hbs +19 -0
- package/templates/react/Combobox/Combobox.test.tsx.hbs +14 -0
- package/templates/react/Combobox/Combobox.tsx.hbs +154 -0
- package/templates/react/Comparison/Comparison.css.hbs +23 -0
- package/templates/react/Comparison/Comparison.jsx.hbs +27 -0
- package/templates/react/Comparison/Comparison.test.jsx.hbs +27 -0
- package/templates/react/Comparison/Comparison.test.tsx.hbs +14 -0
- package/templates/react/Comparison/Comparison.tsx.hbs +32 -0
- package/templates/react/CopyButton/CopyButton.css.hbs +25 -0
- package/templates/react/CopyButton/CopyButton.jsx.hbs +49 -0
- package/templates/react/CopyButton/CopyButton.test.jsx.hbs +16 -0
- package/templates/react/CopyButton/CopyButton.test.tsx.hbs +14 -0
- package/templates/react/CopyButton/CopyButton.tsx.hbs +71 -0
- package/templates/react/Details/Details.css.hbs +24 -0
- package/templates/react/Details/Details.jsx.hbs +66 -0
- package/templates/react/Details/Details.test.jsx.hbs +27 -0
- package/templates/react/Details/Details.test.tsx.hbs +14 -0
- package/templates/react/Details/Details.tsx.hbs +111 -0
- package/templates/react/Dialog/Dialog.css.hbs +28 -0
- package/templates/react/Dialog/Dialog.jsx.hbs +115 -0
- package/templates/react/Dialog/Dialog.test.jsx.hbs +29 -0
- package/templates/react/Dialog/Dialog.test.tsx.hbs +14 -0
- package/templates/react/Dialog/Dialog.tsx.hbs +165 -0
- package/templates/react/Divider/Divider.css.hbs +21 -0
- package/templates/react/Divider/Divider.jsx.hbs +24 -0
- package/templates/react/Divider/Divider.test.jsx.hbs +16 -0
- package/templates/react/Divider/Divider.test.tsx.hbs +14 -0
- package/templates/react/Divider/Divider.tsx.hbs +24 -0
- package/templates/react/Drawer/Drawer.css.hbs +28 -0
- package/templates/react/Drawer/Drawer.jsx.hbs +75 -0
- package/templates/react/Drawer/Drawer.test.jsx.hbs +27 -0
- package/templates/react/Drawer/Drawer.test.tsx.hbs +14 -0
- package/templates/react/Drawer/Drawer.tsx.hbs +99 -0
- package/templates/react/Dropdown/Dropdown.css.hbs +20 -0
- package/templates/react/Dropdown/Dropdown.jsx.hbs +78 -0
- package/templates/react/Dropdown/Dropdown.test.jsx.hbs +18 -0
- package/templates/react/Dropdown/Dropdown.test.tsx.hbs +14 -0
- package/templates/react/Dropdown/Dropdown.tsx.hbs +104 -0
- package/templates/react/DropdownItem/DropdownItem.css.hbs +23 -0
- package/templates/react/DropdownItem/DropdownItem.jsx.hbs +41 -0
- package/templates/react/DropdownItem/DropdownItem.test.jsx.hbs +18 -0
- package/templates/react/DropdownItem/DropdownItem.test.tsx.hbs +14 -0
- package/templates/react/DropdownItem/DropdownItem.tsx.hbs +56 -0
- package/templates/react/FormatBytes/FormatBytes.css.hbs +18 -0
- package/templates/react/FormatBytes/FormatBytes.jsx.hbs +25 -0
- package/templates/react/FormatBytes/FormatBytes.test.jsx.hbs +16 -0
- package/templates/react/FormatBytes/FormatBytes.test.tsx.hbs +14 -0
- package/templates/react/FormatBytes/FormatBytes.tsx.hbs +27 -0
- package/templates/react/FormatDate/FormatDate.css.hbs +18 -0
- package/templates/react/FormatDate/FormatDate.jsx.hbs +18 -0
- package/templates/react/FormatDate/FormatDate.test.jsx.hbs +11 -0
- package/templates/react/FormatDate/FormatDate.test.tsx.hbs +14 -0
- package/templates/react/FormatDate/FormatDate.tsx.hbs +45 -0
- package/templates/react/FormatNumber/FormatNumber.css.hbs +18 -0
- package/templates/react/FormatNumber/FormatNumber.jsx.hbs +18 -0
- package/templates/react/FormatNumber/FormatNumber.test.jsx.hbs +16 -0
- package/templates/react/FormatNumber/FormatNumber.test.tsx.hbs +14 -0
- package/templates/react/FormatNumber/FormatNumber.tsx.hbs +41 -0
- package/templates/react/Icon/Icon.css.hbs +22 -0
- package/templates/react/Icon/Icon.jsx.hbs +83 -0
- package/templates/react/Icon/Icon.test.jsx.hbs +35 -0
- package/templates/react/Icon/Icon.test.tsx.hbs +14 -0
- package/templates/react/Icon/Icon.tsx.hbs +93 -0
- package/templates/react/Include/Include.css.hbs +18 -0
- package/templates/react/Include/Include.jsx.hbs +40 -0
- package/templates/react/Include/Include.test.jsx.hbs +16 -0
- package/templates/react/Include/Include.test.tsx.hbs +14 -0
- package/templates/react/Include/Include.tsx.hbs +53 -0
- package/templates/react/Input/Input.css.hbs +25 -0
- package/templates/react/Input/Input.jsx.hbs +126 -0
- package/templates/react/Input/Input.test.jsx.hbs +23 -0
- package/templates/react/Input/Input.test.tsx.hbs +14 -0
- package/templates/react/Input/Input.tsx.hbs +154 -0
- package/templates/react/IntersectionObserver/IntersectionObserver.css.hbs +18 -0
- package/templates/react/IntersectionObserver/IntersectionObserver.jsx.hbs +38 -0
- package/templates/react/IntersectionObserver/IntersectionObserver.test.jsx.hbs +15 -0
- package/templates/react/IntersectionObserver/IntersectionObserver.test.tsx.hbs +14 -0
- package/templates/react/IntersectionObserver/IntersectionObserver.tsx.hbs +55 -0
- package/templates/react/MutationObserver/MutationObserver.css.hbs +18 -0
- package/templates/react/MutationObserver/MutationObserver.jsx.hbs +38 -0
- package/templates/react/MutationObserver/MutationObserver.test.jsx.hbs +15 -0
- package/templates/react/MutationObserver/MutationObserver.test.tsx.hbs +14 -0
- package/templates/react/MutationObserver/MutationObserver.tsx.hbs +55 -0
- package/templates/react/Option/Option.css.hbs +21 -0
- package/templates/react/Option/Option.jsx.hbs +20 -0
- package/templates/react/Option/Option.test.jsx.hbs +11 -0
- package/templates/react/Option/Option.test.tsx.hbs +14 -0
- package/templates/react/Option/Option.tsx.hbs +27 -0
- package/templates/react/Popover/Popover.css.hbs +25 -0
- package/templates/react/Popover/Popover.jsx.hbs +68 -0
- package/templates/react/Popover/Popover.test.jsx.hbs +18 -0
- package/templates/react/Popover/Popover.test.tsx.hbs +14 -0
- package/templates/react/Popover/Popover.tsx.hbs +101 -0
- package/templates/react/Popup/Popup.css.hbs +25 -0
- package/templates/react/Popup/Popup.jsx.hbs +45 -0
- package/templates/react/Popup/Popup.test.jsx.hbs +17 -0
- package/templates/react/Popup/Popup.test.tsx.hbs +14 -0
- package/templates/react/Popup/Popup.tsx.hbs +83 -0
- package/templates/react/ProgressBar/ProgressBar.css.hbs +22 -0
- package/templates/react/ProgressBar/ProgressBar.jsx.hbs +20 -0
- package/templates/react/ProgressBar/ProgressBar.test.jsx.hbs +16 -0
- package/templates/react/ProgressBar/ProgressBar.test.tsx.hbs +14 -0
- package/templates/react/ProgressBar/ProgressBar.tsx.hbs +29 -0
- package/templates/react/ProgressRing/ProgressRing.css.hbs +26 -0
- package/templates/react/ProgressRing/ProgressRing.jsx.hbs +20 -0
- package/templates/react/ProgressRing/ProgressRing.test.jsx.hbs +16 -0
- package/templates/react/ProgressRing/ProgressRing.test.tsx.hbs +14 -0
- package/templates/react/ProgressRing/ProgressRing.tsx.hbs +27 -0
- package/templates/react/QrCode/QrCode.css.hbs +18 -0
- package/templates/react/QrCode/QrCode.jsx.hbs +18 -0
- package/templates/react/QrCode/QrCode.test.jsx.hbs +11 -0
- package/templates/react/QrCode/QrCode.test.tsx.hbs +14 -0
- package/templates/react/QrCode/QrCode.tsx.hbs +35 -0
- package/templates/react/Radio/Radio.css.hbs +21 -0
- package/templates/react/Radio/Radio.jsx.hbs +20 -0
- package/templates/react/Radio/Radio.test.jsx.hbs +11 -0
- package/templates/react/Radio/Radio.test.tsx.hbs +14 -0
- package/templates/react/Radio/Radio.tsx.hbs +31 -0
- package/templates/react/RadioGroup/RadioGroup.css.hbs +22 -0
- package/templates/react/RadioGroup/RadioGroup.jsx.hbs +49 -0
- package/templates/react/RadioGroup/RadioGroup.test.jsx.hbs +17 -0
- package/templates/react/RadioGroup/RadioGroup.test.tsx.hbs +14 -0
- package/templates/react/RadioGroup/RadioGroup.tsx.hbs +79 -0
- package/templates/react/Rating/Rating.css.hbs +20 -0
- package/templates/react/Rating/Rating.jsx.hbs +48 -0
- package/templates/react/Rating/Rating.test.jsx.hbs +18 -0
- package/templates/react/Rating/Rating.test.tsx.hbs +14 -0
- package/templates/react/Rating/Rating.tsx.hbs +78 -0
- package/templates/react/RelativeTime/RelativeTime.css.hbs +18 -0
- package/templates/react/RelativeTime/RelativeTime.jsx.hbs +18 -0
- package/templates/react/RelativeTime/RelativeTime.test.jsx.hbs +11 -0
- package/templates/react/RelativeTime/RelativeTime.test.tsx.hbs +14 -0
- package/templates/react/RelativeTime/RelativeTime.tsx.hbs +29 -0
- package/templates/react/ResizeObserver/ResizeObserver.css.hbs +18 -0
- package/templates/react/ResizeObserver/ResizeObserver.jsx.hbs +38 -0
- package/templates/react/ResizeObserver/ResizeObserver.test.jsx.hbs +15 -0
- package/templates/react/ResizeObserver/ResizeObserver.test.tsx.hbs +14 -0
- package/templates/react/ResizeObserver/ResizeObserver.tsx.hbs +45 -0
- package/templates/react/Scroller/Scroller.css.hbs +19 -0
- package/templates/react/Scroller/Scroller.jsx.hbs +20 -0
- package/templates/react/Scroller/Scroller.test.jsx.hbs +11 -0
- package/templates/react/Scroller/Scroller.test.tsx.hbs +14 -0
- package/templates/react/Scroller/Scroller.tsx.hbs +29 -0
- package/templates/react/Select/Select.css.hbs +32 -0
- package/templates/react/Select/Select.jsx.hbs +79 -0
- package/templates/react/Select/Select.test.jsx.hbs +20 -0
- package/templates/react/Select/Select.test.tsx.hbs +14 -0
- package/templates/react/Select/Select.tsx.hbs +140 -0
- package/templates/react/Skeleton/Skeleton.css.hbs +19 -0
- package/templates/react/Skeleton/Skeleton.jsx.hbs +18 -0
- package/templates/react/Skeleton/Skeleton.test.jsx.hbs +11 -0
- package/templates/react/Skeleton/Skeleton.test.tsx.hbs +14 -0
- package/templates/react/Skeleton/Skeleton.tsx.hbs +23 -0
- package/templates/react/Slider/Slider.css.hbs +26 -0
- package/templates/react/Slider/Slider.jsx.hbs +50 -0
- package/templates/react/Slider/Slider.test.jsx.hbs +19 -0
- package/templates/react/Slider/Slider.test.tsx.hbs +14 -0
- package/templates/react/Slider/Slider.tsx.hbs +100 -0
- package/templates/react/Spinner/Spinner.css.hbs +21 -0
- package/templates/react/Spinner/Spinner.jsx.hbs +18 -0
- package/templates/react/Spinner/Spinner.test.jsx.hbs +11 -0
- package/templates/react/Spinner/Spinner.test.tsx.hbs +14 -0
- package/templates/react/Spinner/Spinner.tsx.hbs +20 -0
- package/templates/react/SplitPanel/SplitPanel.css.hbs +24 -0
- package/templates/react/SplitPanel/SplitPanel.jsx.hbs +38 -0
- package/templates/react/SplitPanel/SplitPanel.test.jsx.hbs +16 -0
- package/templates/react/SplitPanel/SplitPanel.test.tsx.hbs +14 -0
- package/templates/react/SplitPanel/SplitPanel.tsx.hbs +55 -0
- package/templates/react/Switch/Switch.css.hbs +24 -0
- package/templates/react/Switch/Switch.jsx.hbs +51 -0
- package/templates/react/Switch/Switch.test.jsx.hbs +19 -0
- package/templates/react/Switch/Switch.test.tsx.hbs +14 -0
- package/templates/react/Switch/Switch.tsx.hbs +83 -0
- package/templates/react/Tab/Tab.css.hbs +18 -0
- package/templates/react/Tab/Tab.jsx.hbs +20 -0
- package/templates/react/Tab/Tab.test.jsx.hbs +11 -0
- package/templates/react/Tab/Tab.test.tsx.hbs +14 -0
- package/templates/react/Tab/Tab.tsx.hbs +27 -0
- package/templates/react/TabGroup/TabGroup.css.hbs +27 -0
- package/templates/react/TabGroup/TabGroup.jsx.hbs +42 -0
- package/templates/react/TabGroup/TabGroup.test.jsx.hbs +11 -0
- package/templates/react/TabGroup/TabGroup.test.tsx.hbs +14 -0
- package/templates/react/TabGroup/TabGroup.tsx.hbs +57 -0
- package/templates/react/TabPanel/TabPanel.css.hbs +18 -0
- package/templates/react/TabPanel/TabPanel.jsx.hbs +20 -0
- package/templates/react/TabPanel/TabPanel.test.jsx.hbs +11 -0
- package/templates/react/TabPanel/TabPanel.test.tsx.hbs +14 -0
- package/templates/react/TabPanel/TabPanel.tsx.hbs +27 -0
- package/templates/react/Tag/Tag.css.hbs +21 -0
- package/templates/react/Tag/Tag.jsx.hbs +41 -0
- package/templates/react/Tag/Tag.test.jsx.hbs +11 -0
- package/templates/react/Tag/Tag.test.tsx.hbs +14 -0
- package/templates/react/Tag/Tag.tsx.hbs +60 -0
- package/templates/react/Textarea/Textarea.css.hbs +22 -0
- package/templates/react/Textarea/Textarea.jsx.hbs +58 -0
- package/templates/react/Textarea/Textarea.test.jsx.hbs +11 -0
- package/templates/react/Textarea/Textarea.test.tsx.hbs +14 -0
- package/templates/react/Textarea/Textarea.tsx.hbs +114 -0
- package/templates/react/Tooltip/Tooltip.css.hbs +21 -0
- package/templates/react/Tooltip/Tooltip.jsx.hbs +63 -0
- package/templates/react/Tooltip/Tooltip.test.jsx.hbs +15 -0
- package/templates/react/Tooltip/Tooltip.test.tsx.hbs +14 -0
- package/templates/react/Tooltip/Tooltip.tsx.hbs +104 -0
- package/templates/react/Tree/Tree.css.hbs +22 -0
- package/templates/react/Tree/Tree.jsx.hbs +41 -0
- package/templates/react/Tree/Tree.test.jsx.hbs +11 -0
- package/templates/react/Tree/Tree.test.tsx.hbs +14 -0
- package/templates/react/Tree/Tree.tsx.hbs +52 -0
- package/templates/react/TreeItem/TreeItem.css.hbs +32 -0
- package/templates/react/TreeItem/TreeItem.jsx.hbs +57 -0
- package/templates/react/TreeItem/TreeItem.test.jsx.hbs +11 -0
- package/templates/react/TreeItem/TreeItem.test.tsx.hbs +14 -0
- package/templates/react/TreeItem/TreeItem.tsx.hbs +87 -0
- package/templates/react/ZoomableFrame/ZoomableFrame.css.hbs +21 -0
- package/templates/react/ZoomableFrame/ZoomableFrame.jsx.hbs +52 -0
- package/templates/react/ZoomableFrame/ZoomableFrame.test.jsx.hbs +11 -0
- package/templates/react/ZoomableFrame/ZoomableFrame.test.tsx.hbs +14 -0
- package/templates/react/ZoomableFrame/ZoomableFrame.tsx.hbs +92 -0
- package/templates/react/vite-env.d.ts.hbs +21 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { forwardRef, type HTMLAttributes } from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import '{{{importPath}}}';
|
|
4
|
+
import './Option.css';
|
|
5
|
+
|
|
6
|
+
export interface OptionProps extends Omit<HTMLAttributes<HTMLElement>, 'dir'> {
|
|
7
|
+
/** The option's value */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** Draws the option in a disabled state */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const Option = forwardRef<HTMLElement, OptionProps>(
|
|
14
|
+
({ children, className, ...props }, ref) => {
|
|
15
|
+
return (
|
|
16
|
+
<wa-option
|
|
17
|
+
ref={ref}
|
|
18
|
+
class={clsx('Option', className)}
|
|
19
|
+
{...(props as Record<string, unknown>)}
|
|
20
|
+
>
|
|
21
|
+
{children}
|
|
22
|
+
</wa-option>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
Option.displayName = 'Option';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Popover Component Styles
|
|
3
|
+
* Documentation: https://webawesome.com/docs/components/popover
|
|
4
|
+
*
|
|
5
|
+
* CSS Custom Properties:
|
|
6
|
+
* - --arrow-size: The size of the tiny arrow that points to the popover (Default: 0.375rem)
|
|
7
|
+
* - --max-width: The maximum width of the popover's body content (Default: 25rem)
|
|
8
|
+
* - --show-duration: The speed of the show animation (Default: 100ms)
|
|
9
|
+
* - --hide-duration: The speed of the hide animation (Default: 100ms)
|
|
10
|
+
*
|
|
11
|
+
* CSS Parts:
|
|
12
|
+
* - dialog: The native dialog element that contains the popover content
|
|
13
|
+
* - body: The popover's body where its content is rendered
|
|
14
|
+
* - popup: The internal <wa-popup> element that positions the popover
|
|
15
|
+
* - popup__popup: The popup's exported popup part
|
|
16
|
+
* - popup__arrow: The popup's exported arrow part
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* .Popover::part(body) {
|
|
20
|
+
* // Custom styles
|
|
21
|
+
* }
|
|
22
|
+
*/
|
|
23
|
+
.Popover {
|
|
24
|
+
/* Add your custom styles here */
|
|
25
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import '{{{importPath}}}';
|
|
4
|
+
import './Popover.css';
|
|
5
|
+
|
|
6
|
+
export const Popover = React.forwardRef(
|
|
7
|
+
({ children, className, open, onShow, onAfterShow, onHide, onAfterHide, ...props }, ref) => {
|
|
8
|
+
const popoverRef = React.useRef(null);
|
|
9
|
+
|
|
10
|
+
React.useImperativeHandle(
|
|
11
|
+
ref,
|
|
12
|
+
() => ({
|
|
13
|
+
show: () => popoverRef.current?.show?.(),
|
|
14
|
+
hide: () => popoverRef.current?.hide?.(),
|
|
15
|
+
get element() {
|
|
16
|
+
return popoverRef.current;
|
|
17
|
+
},
|
|
18
|
+
}),
|
|
19
|
+
[]
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
React.useEffect(() => {
|
|
23
|
+
const el = popoverRef.current;
|
|
24
|
+
if (!el || open === undefined) return;
|
|
25
|
+
|
|
26
|
+
const isOpen = el.open ?? false;
|
|
27
|
+
if (open && !isOpen) {
|
|
28
|
+
el.show?.();
|
|
29
|
+
} else if (!open && isOpen) {
|
|
30
|
+
el.hide?.();
|
|
31
|
+
}
|
|
32
|
+
}, [open]);
|
|
33
|
+
|
|
34
|
+
React.useEffect(() => {
|
|
35
|
+
const el = popoverRef.current;
|
|
36
|
+
if (!el) return;
|
|
37
|
+
|
|
38
|
+
const handleShow = (e) => onShow?.(e);
|
|
39
|
+
const handleAfterShow = (e) => onAfterShow?.(e);
|
|
40
|
+
const handleHide = (e) => onHide?.(e);
|
|
41
|
+
const handleAfterHide = (e) => onAfterHide?.(e);
|
|
42
|
+
|
|
43
|
+
el.addEventListener('wa-show', handleShow);
|
|
44
|
+
el.addEventListener('wa-after-show', handleAfterShow);
|
|
45
|
+
el.addEventListener('wa-hide', handleHide);
|
|
46
|
+
el.addEventListener('wa-after-hide', handleAfterHide);
|
|
47
|
+
|
|
48
|
+
return () => {
|
|
49
|
+
el.removeEventListener('wa-show', handleShow);
|
|
50
|
+
el.removeEventListener('wa-after-show', handleAfterShow);
|
|
51
|
+
el.removeEventListener('wa-hide', handleHide);
|
|
52
|
+
el.removeEventListener('wa-after-hide', handleAfterHide);
|
|
53
|
+
};
|
|
54
|
+
}, [onShow, onAfterShow, onHide, onAfterHide]);
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<wa-popover
|
|
58
|
+
ref={popoverRef}
|
|
59
|
+
class={clsx('Popover', className)}
|
|
60
|
+
{...props}
|
|
61
|
+
>
|
|
62
|
+
{children}
|
|
63
|
+
</wa-popover>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
Popover.displayName = 'Popover';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Popover } from './Popover';
|
|
5
|
+
|
|
6
|
+
describe('Popover', () => {
|
|
7
|
+
it('renders without crashing', () => {
|
|
8
|
+
const { container } = render(<Popover>Content</Popover>);
|
|
9
|
+
expect(container.querySelector('wa-popover')).toBeInTheDocument();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('exposes ref methods', () => {
|
|
13
|
+
const ref = React.createRef();
|
|
14
|
+
render(<Popover ref={ref}>Content</Popover>);
|
|
15
|
+
expect(ref.current).toHaveProperty('show');
|
|
16
|
+
expect(ref.current).toHaveProperty('hide');
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import { Popover } from './Popover';
|
|
3
|
+
|
|
4
|
+
describe('Popover', () => {
|
|
5
|
+
it('renders children', () => {
|
|
6
|
+
render(<Popover>Test</Popover>);
|
|
7
|
+
expect(screen.getByText('Test')).toBeInTheDocument();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('applies custom className', () => {
|
|
11
|
+
const { container } = render(<Popover className="custom-class">Test</Popover>);
|
|
12
|
+
expect(container.querySelector('.custom-class')).toBeInTheDocument();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { forwardRef, useRef, useImperativeHandle, useEffect, type HTMLAttributes } from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import '{{{importPath}}}';
|
|
4
|
+
import './Popover.css';
|
|
5
|
+
|
|
6
|
+
export interface PopoverProps extends Omit<HTMLAttributes<HTMLElement>, 'dir'> {
|
|
7
|
+
/** Shows or hides the popover */
|
|
8
|
+
open?: boolean;
|
|
9
|
+
/** The ID of the popover's anchor element */
|
|
10
|
+
for?: string | null;
|
|
11
|
+
/** The preferred placement of the popover */
|
|
12
|
+
placement?: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
13
|
+
/** The distance in pixels from the target element */
|
|
14
|
+
distance?: number;
|
|
15
|
+
/** The offset distance in pixels along the target edge */
|
|
16
|
+
skidding?: number;
|
|
17
|
+
/** Removes the arrow from the popover */
|
|
18
|
+
'without-arrow'?: boolean;
|
|
19
|
+
/** Event fired when the popover is shown */
|
|
20
|
+
onShow?: (event: CustomEvent) => void;
|
|
21
|
+
/** Event fired after the popover is shown */
|
|
22
|
+
onAfterShow?: (event: CustomEvent) => void;
|
|
23
|
+
/** Event fired when the popover is about to hide */
|
|
24
|
+
onHide?: (event: CustomEvent) => void;
|
|
25
|
+
/** Event fired after the popover is hidden */
|
|
26
|
+
onAfterHide?: (event: CustomEvent) => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface PopoverRef {
|
|
30
|
+
show: () => void;
|
|
31
|
+
hide: () => void;
|
|
32
|
+
element: HTMLElement | null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const Popover = forwardRef<PopoverRef, PopoverProps>(
|
|
36
|
+
({ children, className, open, onShow, onAfterShow, onHide, onAfterHide, ...props }, ref) => {
|
|
37
|
+
const popoverRef = useRef<HTMLElement & {
|
|
38
|
+
show?: () => void;
|
|
39
|
+
hide?: () => void;
|
|
40
|
+
open?: boolean;
|
|
41
|
+
}>(null);
|
|
42
|
+
|
|
43
|
+
useImperativeHandle(
|
|
44
|
+
ref,
|
|
45
|
+
() => ({
|
|
46
|
+
show: () => popoverRef.current?.show?.(),
|
|
47
|
+
hide: () => popoverRef.current?.hide?.(),
|
|
48
|
+
get element() {
|
|
49
|
+
return popoverRef.current;
|
|
50
|
+
},
|
|
51
|
+
}),
|
|
52
|
+
[]
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const el = popoverRef.current;
|
|
57
|
+
if (!el || open === undefined) return;
|
|
58
|
+
|
|
59
|
+
const isOpen = el.open ?? false;
|
|
60
|
+
if (open && !isOpen) {
|
|
61
|
+
el.show?.();
|
|
62
|
+
} else if (!open && isOpen) {
|
|
63
|
+
el.hide?.();
|
|
64
|
+
}
|
|
65
|
+
}, [open]);
|
|
66
|
+
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
const el = popoverRef.current;
|
|
69
|
+
if (!el) return;
|
|
70
|
+
|
|
71
|
+
const handleShow = (e: Event) => onShow?.(e as CustomEvent);
|
|
72
|
+
const handleAfterShow = (e: Event) => onAfterShow?.(e as CustomEvent);
|
|
73
|
+
const handleHide = (e: Event) => onHide?.(e as CustomEvent);
|
|
74
|
+
const handleAfterHide = (e: Event) => onAfterHide?.(e as CustomEvent);
|
|
75
|
+
|
|
76
|
+
el.addEventListener('wa-show', handleShow);
|
|
77
|
+
el.addEventListener('wa-after-show', handleAfterShow);
|
|
78
|
+
el.addEventListener('wa-hide', handleHide);
|
|
79
|
+
el.addEventListener('wa-after-hide', handleAfterHide);
|
|
80
|
+
|
|
81
|
+
return () => {
|
|
82
|
+
el.removeEventListener('wa-show', handleShow);
|
|
83
|
+
el.removeEventListener('wa-after-show', handleAfterShow);
|
|
84
|
+
el.removeEventListener('wa-hide', handleHide);
|
|
85
|
+
el.removeEventListener('wa-after-hide', handleAfterHide);
|
|
86
|
+
};
|
|
87
|
+
}, [onShow, onAfterShow, onHide, onAfterHide]);
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<wa-popover
|
|
91
|
+
ref={popoverRef}
|
|
92
|
+
class={clsx('Popover', className)}
|
|
93
|
+
{...(props as Record<string, unknown>)}
|
|
94
|
+
>
|
|
95
|
+
{children}
|
|
96
|
+
</wa-popover>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
Popover.displayName = 'Popover';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Popup Component Styles
|
|
3
|
+
* Documentation: https://webawesome.com/docs/components/popup
|
|
4
|
+
*
|
|
5
|
+
* CSS Custom Properties:
|
|
6
|
+
* - --arrow-size: The size of the arrow (Default: 6px)
|
|
7
|
+
* - --arrow-color: The color of the arrow (Default: black)
|
|
8
|
+
* - --auto-size-available-width: A read-only custom property for available width when using auto-size
|
|
9
|
+
* - --auto-size-available-height: A read-only custom property for available height when using auto-size
|
|
10
|
+
* - --show-duration: The show duration to use when applying built-in animation classes (Default: 100ms)
|
|
11
|
+
* - --hide-duration: The hide duration to use when applying built-in animation classes (Default: 100ms)
|
|
12
|
+
*
|
|
13
|
+
* CSS Parts:
|
|
14
|
+
* - arrow: The arrow's container
|
|
15
|
+
* - popup: The popup's container
|
|
16
|
+
* - hover-bridge: The hover bridge element
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* .Popup::part(popup) {
|
|
20
|
+
* // Custom styles
|
|
21
|
+
* }
|
|
22
|
+
*/
|
|
23
|
+
.Popup {
|
|
24
|
+
/* Add your custom styles here */
|
|
25
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import '{{{importPath}}}';
|
|
4
|
+
import './Popup.css';
|
|
5
|
+
|
|
6
|
+
export const Popup = React.forwardRef(
|
|
7
|
+
({ children, className, onReposition, ...props }, ref) => {
|
|
8
|
+
const popupRef = React.useRef(null);
|
|
9
|
+
|
|
10
|
+
React.useImperativeHandle(
|
|
11
|
+
ref,
|
|
12
|
+
() => ({
|
|
13
|
+
reposition: () => popupRef.current?.reposition?.(),
|
|
14
|
+
get element() {
|
|
15
|
+
return popupRef.current;
|
|
16
|
+
},
|
|
17
|
+
}),
|
|
18
|
+
[]
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
React.useEffect(() => {
|
|
22
|
+
const el = popupRef.current;
|
|
23
|
+
if (!el) return;
|
|
24
|
+
|
|
25
|
+
const handleReposition = (e) => onReposition?.(e);
|
|
26
|
+
el.addEventListener('wa-reposition', handleReposition);
|
|
27
|
+
|
|
28
|
+
return () => {
|
|
29
|
+
el.removeEventListener('wa-reposition', handleReposition);
|
|
30
|
+
};
|
|
31
|
+
}, [onReposition]);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<wa-popup
|
|
35
|
+
ref={popupRef}
|
|
36
|
+
class={clsx('Popup', className)}
|
|
37
|
+
{...props}
|
|
38
|
+
>
|
|
39
|
+
{children}
|
|
40
|
+
</wa-popup>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
Popup.displayName = 'Popup';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Popup } from './Popup';
|
|
5
|
+
|
|
6
|
+
describe('Popup', () => {
|
|
7
|
+
it('renders without crashing', () => {
|
|
8
|
+
const { container } = render(<Popup>Content</Popup>);
|
|
9
|
+
expect(container.querySelector('wa-popup')).toBeInTheDocument();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('exposes ref methods', () => {
|
|
13
|
+
const ref = React.createRef();
|
|
14
|
+
render(<Popup ref={ref}>Content</Popup>);
|
|
15
|
+
expect(ref.current).toHaveProperty('reposition');
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import { Popup } from './Popup';
|
|
3
|
+
|
|
4
|
+
describe('Popup', () => {
|
|
5
|
+
it('renders children', () => {
|
|
6
|
+
render(<Popup>Test</Popup>);
|
|
7
|
+
expect(screen.getByText('Test')).toBeInTheDocument();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('applies custom className', () => {
|
|
11
|
+
const { container } = render(<Popup className="custom-class">Test</Popup>);
|
|
12
|
+
expect(container.querySelector('.custom-class')).toBeInTheDocument();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { forwardRef, useRef, useImperativeHandle, useEffect, type HTMLAttributes } from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import '{{{importPath}}}';
|
|
4
|
+
import './Popup.css';
|
|
5
|
+
|
|
6
|
+
export interface PopupProps extends Omit<HTMLAttributes<HTMLElement>, 'dir'> {
|
|
7
|
+
/** Activates positioning logic and displays the popup */
|
|
8
|
+
active?: boolean;
|
|
9
|
+
/** Element to anchor to (id, reference, or VirtualElement) */
|
|
10
|
+
anchor?: string;
|
|
11
|
+
/** The preferred placement of the popup */
|
|
12
|
+
placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
|
13
|
+
/** Offset distance from anchor in pixels */
|
|
14
|
+
distance?: number;
|
|
15
|
+
/** Offset along anchor's axis in pixels */
|
|
16
|
+
skidding?: number;
|
|
17
|
+
/** Attaches an arrow to the popup */
|
|
18
|
+
arrow?: boolean;
|
|
19
|
+
/** Padding between arrow and popup edges */
|
|
20
|
+
'arrow-padding'?: number;
|
|
21
|
+
/** Arrow alignment behavior */
|
|
22
|
+
'arrow-placement'?: 'start' | 'end' | 'center' | 'anchor';
|
|
23
|
+
/** Flip placement when insufficient space */
|
|
24
|
+
flip?: boolean;
|
|
25
|
+
/** Move along axis to keep in view */
|
|
26
|
+
shift?: boolean;
|
|
27
|
+
/** Auto-resize to prevent overflow */
|
|
28
|
+
'auto-size'?: 'horizontal' | 'vertical' | 'both';
|
|
29
|
+
/** Sync dimension(s) with anchor */
|
|
30
|
+
sync?: 'width' | 'height' | 'both';
|
|
31
|
+
/** Invisible bridge for hover continuity */
|
|
32
|
+
'hover-bridge'?: boolean;
|
|
33
|
+
/** Event fired when popup recalculates position */
|
|
34
|
+
onReposition?: (event: CustomEvent) => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface PopupRef {
|
|
38
|
+
reposition: () => void;
|
|
39
|
+
element: HTMLElement | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const Popup = forwardRef<PopupRef, PopupProps>(
|
|
43
|
+
({ children, className, onReposition, ...props }, ref) => {
|
|
44
|
+
const popupRef = useRef<HTMLElement & {
|
|
45
|
+
reposition?: () => void;
|
|
46
|
+
}>(null);
|
|
47
|
+
|
|
48
|
+
useImperativeHandle(
|
|
49
|
+
ref,
|
|
50
|
+
() => ({
|
|
51
|
+
reposition: () => popupRef.current?.reposition?.(),
|
|
52
|
+
get element() {
|
|
53
|
+
return popupRef.current;
|
|
54
|
+
},
|
|
55
|
+
}),
|
|
56
|
+
[]
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
const el = popupRef.current;
|
|
61
|
+
if (!el) return;
|
|
62
|
+
|
|
63
|
+
const handleReposition = (e: Event) => onReposition?.(e as CustomEvent);
|
|
64
|
+
el.addEventListener('wa-reposition', handleReposition);
|
|
65
|
+
|
|
66
|
+
return () => {
|
|
67
|
+
el.removeEventListener('wa-reposition', handleReposition);
|
|
68
|
+
};
|
|
69
|
+
}, [onReposition]);
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<wa-popup
|
|
73
|
+
ref={popupRef}
|
|
74
|
+
class={clsx('Popup', className)}
|
|
75
|
+
{...(props as Record<string, unknown>)}
|
|
76
|
+
>
|
|
77
|
+
{children}
|
|
78
|
+
</wa-popup>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
Popup.displayName = 'Popup';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProgressBar Component Styles
|
|
3
|
+
* Documentation: https://webawesome.com/docs/components/progress-bar
|
|
4
|
+
*
|
|
5
|
+
* CSS Custom Properties:
|
|
6
|
+
* - --indicator-color: The indicator's color
|
|
7
|
+
* - --track-color: The track's color
|
|
8
|
+
* - --track-height: The height of the progress bar's track (Default: 1rem)
|
|
9
|
+
*
|
|
10
|
+
* CSS Parts:
|
|
11
|
+
* - base: The component's base wrapper
|
|
12
|
+
* - indicator: The progress bar's indicator
|
|
13
|
+
* - label: The progress bar's label
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* .ProgressBar::part(indicator) {
|
|
17
|
+
* // Custom styles
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
.ProgressBar {
|
|
21
|
+
/* Add your custom styles here */
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import '{{{importPath}}}';
|
|
4
|
+
import './ProgressBar.css';
|
|
5
|
+
|
|
6
|
+
export const ProgressBar = React.forwardRef(
|
|
7
|
+
({ children, className, ...props }, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<wa-progress-bar
|
|
10
|
+
ref={ref}
|
|
11
|
+
class={clsx('ProgressBar', className)}
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
{children}
|
|
15
|
+
</wa-progress-bar>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
ProgressBar.displayName = 'ProgressBar';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ProgressBar } from './ProgressBar';
|
|
5
|
+
|
|
6
|
+
describe('ProgressBar', () => {
|
|
7
|
+
it('renders without crashing', () => {
|
|
8
|
+
const { container } = render(<ProgressBar value={50} />);
|
|
9
|
+
expect(container.querySelector('wa-progress-bar')).toBeInTheDocument();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('applies value prop', () => {
|
|
13
|
+
const { container } = render(<ProgressBar value={75} />);
|
|
14
|
+
expect(container.querySelector('wa-progress-bar')).toHaveAttribute('value', '75');
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { render } from '@testing-library/react';
|
|
2
|
+
import { ProgressBar } from './ProgressBar';
|
|
3
|
+
|
|
4
|
+
describe('ProgressBar', () => {
|
|
5
|
+
it('renders without crashing', () => {
|
|
6
|
+
const { container } = render(<ProgressBar value={50} />);
|
|
7
|
+
expect(container.querySelector('wa-progress-bar')).toBeInTheDocument();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('applies custom className', () => {
|
|
11
|
+
const { container } = render(<ProgressBar value={50} className="custom-class" />);
|
|
12
|
+
expect(container.querySelector('.custom-class')).toBeInTheDocument();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { forwardRef, type HTMLAttributes } from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import '{{{importPath}}}';
|
|
4
|
+
import './ProgressBar.css';
|
|
5
|
+
|
|
6
|
+
export interface ProgressBarProps extends Omit<HTMLAttributes<HTMLElement>, 'dir'> {
|
|
7
|
+
/** The current progress as a percentage, 0 to 100 */
|
|
8
|
+
value?: number;
|
|
9
|
+
/** When true, shows an indeterminate state */
|
|
10
|
+
indeterminate?: boolean;
|
|
11
|
+
/** A custom label for assistive devices */
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const ProgressBar = forwardRef<HTMLElement, ProgressBarProps>(
|
|
16
|
+
({ children, className, ...props }, ref) => {
|
|
17
|
+
return (
|
|
18
|
+
<wa-progress-bar
|
|
19
|
+
ref={ref}
|
|
20
|
+
class={clsx('ProgressBar', className)}
|
|
21
|
+
{...(props as Record<string, unknown>)}
|
|
22
|
+
>
|
|
23
|
+
{children}
|
|
24
|
+
</wa-progress-bar>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
ProgressBar.displayName = 'ProgressBar';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProgressRing Component Styles
|
|
3
|
+
* Documentation: https://webawesome.com/docs/components/progress-ring
|
|
4
|
+
*
|
|
5
|
+
* CSS Custom Properties:
|
|
6
|
+
* - --size: The diameter of the progress ring
|
|
7
|
+
* - --track-width: The width of the track
|
|
8
|
+
* - --track-color: The color of the track
|
|
9
|
+
* - --indicator-width: The width of the indicator
|
|
10
|
+
* - --indicator-color: The color of the indicator
|
|
11
|
+
* - --indicator-transition-duration: The duration of the indicator's transition when the value changes
|
|
12
|
+
*
|
|
13
|
+
* CSS Parts:
|
|
14
|
+
* - base: The component's base wrapper
|
|
15
|
+
* - track: The progress ring's track
|
|
16
|
+
* - indicator: The progress ring's indicator
|
|
17
|
+
* - label: The progress ring's label
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* .ProgressRing::part(indicator) {
|
|
21
|
+
* // Custom styles
|
|
22
|
+
* }
|
|
23
|
+
*/
|
|
24
|
+
.ProgressRing {
|
|
25
|
+
/* Add your custom styles here */
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import '{{{importPath}}}';
|
|
4
|
+
import './ProgressRing.css';
|
|
5
|
+
|
|
6
|
+
export const ProgressRing = React.forwardRef(
|
|
7
|
+
({ children, className, ...props }, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<wa-progress-ring
|
|
10
|
+
ref={ref}
|
|
11
|
+
class={clsx('ProgressRing', className)}
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
{children}
|
|
15
|
+
</wa-progress-ring>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
ProgressRing.displayName = 'ProgressRing';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ProgressRing } from './ProgressRing';
|
|
5
|
+
|
|
6
|
+
describe('ProgressRing', () => {
|
|
7
|
+
it('renders without crashing', () => {
|
|
8
|
+
const { container } = render(<ProgressRing value={50} />);
|
|
9
|
+
expect(container.querySelector('wa-progress-ring')).toBeInTheDocument();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('applies value prop', () => {
|
|
13
|
+
const { container } = render(<ProgressRing value={75} />);
|
|
14
|
+
expect(container.querySelector('wa-progress-ring')).toHaveAttribute('value', '75');
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { render } from '@testing-library/react';
|
|
2
|
+
import { ProgressRing } from './ProgressRing';
|
|
3
|
+
|
|
4
|
+
describe('ProgressRing', () => {
|
|
5
|
+
it('renders without crashing', () => {
|
|
6
|
+
const { container } = render(<ProgressRing value={50} />);
|
|
7
|
+
expect(container.querySelector('wa-progress-ring')).toBeInTheDocument();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('applies custom className', () => {
|
|
11
|
+
const { container } = render(<ProgressRing value={50} className="custom-class" />);
|
|
12
|
+
expect(container.querySelector('.custom-class')).toBeInTheDocument();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { forwardRef, type HTMLAttributes } from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import '{{{importPath}}}';
|
|
4
|
+
import './ProgressRing.css';
|
|
5
|
+
|
|
6
|
+
export interface ProgressRingProps extends Omit<HTMLAttributes<HTMLElement>, 'dir'> {
|
|
7
|
+
/** The current progress as a percentage, 0 to 100 */
|
|
8
|
+
value?: number;
|
|
9
|
+
/** A custom label for assistive devices */
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const ProgressRing = forwardRef<HTMLElement, ProgressRingProps>(
|
|
14
|
+
({ children, className, ...props }, ref) => {
|
|
15
|
+
return (
|
|
16
|
+
<wa-progress-ring
|
|
17
|
+
ref={ref}
|
|
18
|
+
class={clsx('ProgressRing', className)}
|
|
19
|
+
{...(props as Record<string, unknown>)}
|
|
20
|
+
>
|
|
21
|
+
{children}
|
|
22
|
+
</wa-progress-ring>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
ProgressRing.displayName = 'ProgressRing';
|