@ada-cx/lovelace 1.0.0-setup.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 +113 -0
- package/dist/components/AgentMessage/AgentMessage.css.d.ts +2 -0
- package/dist/components/AgentMessage/AgentMessage.css.js +7 -0
- package/dist/components/AgentMessage/AgentMessage.css.js.map +1 -0
- package/dist/components/AgentMessage/AgentMessage.d.ts +21 -0
- package/dist/components/AgentMessage/AgentMessage.js +24 -0
- package/dist/components/AgentMessage/AgentMessage.js.map +1 -0
- package/dist/components/AgentMessage/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.css.d.ts +48 -0
- package/dist/components/Avatar/Avatar.css.js +28 -0
- package/dist/components/Avatar/Avatar.css.js.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +35 -0
- package/dist/components/Avatar/Avatar.js +26 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Avatar/AvatarPlaceholder.d.ts +14 -0
- package/dist/components/Avatar/AvatarPlaceholder.js +18 -0
- package/dist/components/Avatar/AvatarPlaceholder.js.map +1 -0
- package/dist/components/Avatar/index.d.ts +4 -0
- package/dist/components/BubbleOverlay/BubbleOverlay.css.d.ts +3 -0
- package/dist/components/BubbleOverlay/BubbleOverlay.css.js +8 -0
- package/dist/components/BubbleOverlay/BubbleOverlay.css.js.map +1 -0
- package/dist/components/BubbleOverlay/BubbleOverlay.d.ts +24 -0
- package/dist/components/BubbleOverlay/BubbleOverlay.js +28 -0
- package/dist/components/BubbleOverlay/BubbleOverlay.js.map +1 -0
- package/dist/components/BubbleOverlay/index.d.ts +1 -0
- package/dist/components/Button/Button.css.d.ts +48 -0
- package/dist/components/Button/Button.css.js +29 -0
- package/dist/components/Button/Button.css.js.map +1 -0
- package/dist/components/Button/Button.d.ts +14 -0
- package/dist/components/Button/Button.js +24 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.css.d.ts +19 -0
- package/dist/components/Checkbox/Checkbox.css.js +7 -0
- package/dist/components/Checkbox/Checkbox.css.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +22 -0
- package/dist/components/Checkbox/Checkbox.js +42 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Chip/Chip.css.d.ts +19 -0
- package/dist/components/Chip/Chip.css.js +51 -0
- package/dist/components/Chip/Chip.css.js.map +1 -0
- package/dist/components/Chip/Chip.d.ts +23 -0
- package/dist/components/Chip/Chip.js +21 -0
- package/dist/components/Chip/Chip.js.map +1 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/Dialog/Dialog.css.d.ts +15 -0
- package/dist/components/Dialog/Dialog.css.js +16 -0
- package/dist/components/Dialog/Dialog.css.js.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +15 -0
- package/dist/components/Dialog/Dialog.js +18 -0
- package/dist/components/Dialog/Dialog.js.map +1 -0
- package/dist/components/Dialog/DialogActions.d.ts +8 -0
- package/dist/components/Dialog/DialogActions.js +14 -0
- package/dist/components/Dialog/DialogActions.js.map +1 -0
- package/dist/components/Dialog/DialogBody.d.ts +7 -0
- package/dist/components/Dialog/DialogBody.js +14 -0
- package/dist/components/Dialog/DialogBody.js.map +1 -0
- package/dist/components/Dialog/DialogContent.d.ts +8 -0
- package/dist/components/Dialog/DialogContent.js +14 -0
- package/dist/components/Dialog/DialogContent.js.map +1 -0
- package/dist/components/Dialog/DialogIcon.d.ts +11 -0
- package/dist/components/Dialog/DialogIcon.js +18 -0
- package/dist/components/Dialog/DialogIcon.js.map +1 -0
- package/dist/components/Dialog/DialogRoot.d.ts +15 -0
- package/dist/components/Dialog/DialogRoot.js +14 -0
- package/dist/components/Dialog/DialogRoot.js.map +1 -0
- package/dist/components/Dialog/DialogTitle.d.ts +7 -0
- package/dist/components/Dialog/DialogTitle.js +16 -0
- package/dist/components/Dialog/DialogTitle.js.map +1 -0
- package/dist/components/Dialog/index.d.ts +6 -0
- package/dist/components/DialogOverlay/DialogOverlay.css.d.ts +3 -0
- package/dist/components/DialogOverlay/DialogOverlay.css.js +8 -0
- package/dist/components/DialogOverlay/DialogOverlay.css.js.map +1 -0
- package/dist/components/DialogOverlay/DialogOverlay.d.ts +30 -0
- package/dist/components/DialogOverlay/DialogOverlay.js +29 -0
- package/dist/components/DialogOverlay/DialogOverlay.js.map +1 -0
- package/dist/components/DialogOverlay/index.d.ts +1 -0
- package/dist/components/Divider/Divider.css.d.ts +27 -0
- package/dist/components/Divider/Divider.css.js +17 -0
- package/dist/components/Divider/Divider.css.js.map +1 -0
- package/dist/components/Divider/Divider.d.ts +27 -0
- package/dist/components/Divider/Divider.js +35 -0
- package/dist/components/Divider/Divider.js.map +1 -0
- package/dist/components/Divider/index.d.ts +1 -0
- package/dist/components/FullscreenOverlay/FullscreenOverlay.css.d.ts +3 -0
- package/dist/components/FullscreenOverlay/FullscreenOverlay.css.js +8 -0
- package/dist/components/FullscreenOverlay/FullscreenOverlay.css.js.map +1 -0
- package/dist/components/FullscreenOverlay/FullscreenOverlay.d.ts +22 -0
- package/dist/components/FullscreenOverlay/FullscreenOverlay.js +28 -0
- package/dist/components/FullscreenOverlay/FullscreenOverlay.js.map +1 -0
- package/dist/components/FullscreenOverlay/index.d.ts +1 -0
- package/dist/components/Header/Header.css.d.ts +2 -0
- package/dist/components/Header/Header.css.js +7 -0
- package/dist/components/Header/Header.css.js.map +1 -0
- package/dist/components/Header/Header.d.ts +6 -0
- package/dist/components/Header/Header.js +8 -0
- package/dist/components/Header/Header.js.map +1 -0
- package/dist/components/Header/HeaderRoot.d.ts +11 -0
- package/dist/components/Header/HeaderRoot.js +16 -0
- package/dist/components/Header/HeaderRoot.js.map +1 -0
- package/dist/components/Header/HeaderTitle.d.ts +10 -0
- package/dist/components/Header/HeaderTitle.js +16 -0
- package/dist/components/Header/HeaderTitle.js.map +1 -0
- package/dist/components/Header/index.d.ts +2 -0
- package/dist/components/Icon/Icon.css.d.ts +1 -0
- package/dist/components/Icon/Icon.css.js +7 -0
- package/dist/components/Icon/Icon.css.js.map +1 -0
- package/dist/components/Icon/Icon.d.ts +7 -0
- package/dist/components/Icon/Icon.js +22 -0
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/Icon/icons/AdaLogo.css.d.ts +1 -0
- package/dist/components/Icon/icons/AdaLogo.css.js +7 -0
- package/dist/components/Icon/icons/AdaLogo.css.js.map +1 -0
- package/dist/components/Icon/icons/AdaLogo.d.ts +6 -0
- package/dist/components/Icon/icons/AdaLogo.js +27 -0
- package/dist/components/Icon/icons/AdaLogo.js.map +1 -0
- package/dist/components/Icon/icons/ArrowDown.d.ts +2 -0
- package/dist/components/Icon/icons/ArrowDown.js +17 -0
- package/dist/components/Icon/icons/ArrowDown.js.map +1 -0
- package/dist/components/Icon/icons/ArrowLeft.d.ts +8 -0
- package/dist/components/Icon/icons/ArrowLeft.js +18 -0
- package/dist/components/Icon/icons/ArrowLeft.js.map +1 -0
- package/dist/components/Icon/icons/ArrowNortheast.d.ts +2 -0
- package/dist/components/Icon/icons/ArrowNortheast.js +14 -0
- package/dist/components/Icon/icons/ArrowNortheast.js.map +1 -0
- package/dist/components/Icon/icons/ArrowNorthwest.d.ts +2 -0
- package/dist/components/Icon/icons/ArrowNorthwest.js +14 -0
- package/dist/components/Icon/icons/ArrowNorthwest.js.map +1 -0
- package/dist/components/Icon/icons/ArrowRight.d.ts +8 -0
- package/dist/components/Icon/icons/ArrowRight.js +18 -0
- package/dist/components/Icon/icons/ArrowRight.js.map +1 -0
- package/dist/components/Icon/icons/Bell.d.ts +2 -0
- package/dist/components/Icon/icons/Bell.js +14 -0
- package/dist/components/Icon/icons/Bell.js.map +1 -0
- package/dist/components/Icon/icons/BellSlash.d.ts +2 -0
- package/dist/components/Icon/icons/BellSlash.js +14 -0
- package/dist/components/Icon/icons/BellSlash.js.map +1 -0
- package/dist/components/Icon/icons/Checkmark.d.ts +2 -0
- package/dist/components/Icon/icons/Checkmark.js +14 -0
- package/dist/components/Icon/icons/Checkmark.js.map +1 -0
- package/dist/components/Icon/icons/ChevronLeft.d.ts +2 -0
- package/dist/components/Icon/icons/ChevronLeft.js +14 -0
- package/dist/components/Icon/icons/ChevronLeft.js.map +1 -0
- package/dist/components/Icon/icons/ChevronRight.d.ts +2 -0
- package/dist/components/Icon/icons/ChevronRight.js +14 -0
- package/dist/components/Icon/icons/ChevronRight.js.map +1 -0
- package/dist/components/Icon/icons/CloudUpload.d.ts +2 -0
- package/dist/components/Icon/icons/CloudUpload.js +14 -0
- package/dist/components/Icon/icons/CloudUpload.js.map +1 -0
- package/dist/components/Icon/icons/Download.d.ts +2 -0
- package/dist/components/Icon/icons/Download.js +14 -0
- package/dist/components/Icon/icons/Download.js.map +1 -0
- package/dist/components/Icon/icons/Ellipses.d.ts +2 -0
- package/dist/components/Icon/icons/Ellipses.js +14 -0
- package/dist/components/Icon/icons/Ellipses.js.map +1 -0
- package/dist/components/Icon/icons/Email.d.ts +2 -0
- package/dist/components/Icon/icons/Email.js +14 -0
- package/dist/components/Icon/icons/Email.js.map +1 -0
- package/dist/components/Icon/icons/ExclamationSync.d.ts +2 -0
- package/dist/components/Icon/icons/ExclamationSync.js +14 -0
- package/dist/components/Icon/icons/ExclamationSync.js.map +1 -0
- package/dist/components/Icon/icons/ExclamationTriangle.d.ts +2 -0
- package/dist/components/Icon/icons/ExclamationTriangle.js +18 -0
- package/dist/components/Icon/icons/ExclamationTriangle.js.map +1 -0
- package/dist/components/Icon/icons/Eye.d.ts +2 -0
- package/dist/components/Icon/icons/Eye.js +14 -0
- package/dist/components/Icon/icons/Eye.js.map +1 -0
- package/dist/components/Icon/icons/EyeSlash.d.ts +2 -0
- package/dist/components/Icon/icons/EyeSlash.js +14 -0
- package/dist/components/Icon/icons/EyeSlash.js.map +1 -0
- package/dist/components/Icon/icons/Glyph.d.ts +16 -0
- package/dist/components/Icon/icons/Glyph.js +24 -0
- package/dist/components/Icon/icons/Glyph.js.map +1 -0
- package/dist/components/Icon/icons/Language.d.ts +2 -0
- package/dist/components/Icon/icons/Language.js +14 -0
- package/dist/components/Icon/icons/Language.js.map +1 -0
- package/dist/components/Icon/icons/MediaSlash.d.ts +2 -0
- package/dist/components/Icon/icons/MediaSlash.js +14 -0
- package/dist/components/Icon/icons/MediaSlash.js.map +1 -0
- package/dist/components/Icon/icons/MessagingFill.d.ts +2 -0
- package/dist/components/Icon/icons/MessagingFill.js +18 -0
- package/dist/components/Icon/icons/MessagingFill.js.map +1 -0
- package/dist/components/Icon/icons/Minimize.d.ts +2 -0
- package/dist/components/Icon/icons/Minimize.js +14 -0
- package/dist/components/Icon/icons/Minimize.js.map +1 -0
- package/dist/components/Icon/icons/Mute.d.ts +2 -0
- package/dist/components/Icon/icons/Mute.js +14 -0
- package/dist/components/Icon/icons/Mute.js.map +1 -0
- package/dist/components/Icon/icons/Paperclip.d.ts +2 -0
- package/dist/components/Icon/icons/Paperclip.js +14 -0
- package/dist/components/Icon/icons/Paperclip.js.map +1 -0
- package/dist/components/Icon/icons/PersonFill.d.ts +2 -0
- package/dist/components/Icon/icons/PersonFill.js +14 -0
- package/dist/components/Icon/icons/PersonFill.js.map +1 -0
- package/dist/components/Icon/icons/PlayFill.d.ts +2 -0
- package/dist/components/Icon/icons/PlayFill.js +14 -0
- package/dist/components/Icon/icons/PlayFill.js.map +1 -0
- package/dist/components/Icon/icons/SendFill.d.ts +2 -0
- package/dist/components/Icon/icons/SendFill.js +14 -0
- package/dist/components/Icon/icons/SendFill.js.map +1 -0
- package/dist/components/Icon/icons/StarBadgeFill.d.ts +2 -0
- package/dist/components/Icon/icons/StarBadgeFill.js +18 -0
- package/dist/components/Icon/icons/StarBadgeFill.js.map +1 -0
- package/dist/components/Icon/icons/ThumbsDown.d.ts +2 -0
- package/dist/components/Icon/icons/ThumbsDown.js +14 -0
- package/dist/components/Icon/icons/ThumbsDown.js.map +1 -0
- package/dist/components/Icon/icons/ThumbsUp.d.ts +2 -0
- package/dist/components/Icon/icons/ThumbsUp.js +14 -0
- package/dist/components/Icon/icons/ThumbsUp.js.map +1 -0
- package/dist/components/Icon/icons/Volume.d.ts +2 -0
- package/dist/components/Icon/icons/Volume.js +14 -0
- package/dist/components/Icon/icons/Volume.js.map +1 -0
- package/dist/components/Icon/icons/Xmark.d.ts +2 -0
- package/dist/components/Icon/icons/Xmark.js +14 -0
- package/dist/components/Icon/icons/Xmark.js.map +1 -0
- package/dist/components/Icon/icons/XmarkCircle.d.ts +2 -0
- package/dist/components/Icon/icons/XmarkCircle.js +14 -0
- package/dist/components/Icon/icons/XmarkCircle.js.map +1 -0
- package/dist/components/Icon/icons/index.d.ts +34 -0
- package/dist/components/Icon/index.d.ts +3 -0
- package/dist/components/IconButton/IconButton.css.d.ts +54 -0
- package/dist/components/IconButton/IconButton.css.js +30 -0
- package/dist/components/IconButton/IconButton.css.js.map +1 -0
- package/dist/components/IconButton/IconButton.d.ts +18 -0
- package/dist/components/IconButton/IconButton.js +25 -0
- package/dist/components/IconButton/IconButton.js.map +1 -0
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/Image/Image.css.d.ts +1 -0
- package/dist/components/Image/Image.css.js +7 -0
- package/dist/components/Image/Image.css.js.map +1 -0
- package/dist/components/Image/Image.d.ts +16 -0
- package/dist/components/Image/Image.js +44 -0
- package/dist/components/Image/Image.js.map +1 -0
- package/dist/components/Image/index.d.ts +2 -0
- package/dist/components/Input/Input.context.d.ts +12 -0
- package/dist/components/Input/Input.context.js +11 -0
- package/dist/components/Input/Input.context.js.map +1 -0
- package/dist/components/Input/Input.css.d.ts +11 -0
- package/dist/components/Input/Input.css.js +16 -0
- package/dist/components/Input/Input.css.js.map +1 -0
- package/dist/components/Input/Input.d.ts +22 -0
- package/dist/components/Input/Input.js +20 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Input/InputButton.d.ts +12 -0
- package/dist/components/Input/InputButton.js +21 -0
- package/dist/components/Input/InputButton.js.map +1 -0
- package/dist/components/Input/InputControl.d.ts +8 -0
- package/dist/components/Input/InputControl.js +15 -0
- package/dist/components/Input/InputControl.js.map +1 -0
- package/dist/components/Input/InputField.d.ts +9 -0
- package/dist/components/Input/InputField.js +23 -0
- package/dist/components/Input/InputField.js.map +1 -0
- package/dist/components/Input/InputHelperText.d.ts +8 -0
- package/dist/components/Input/InputHelperText.js +20 -0
- package/dist/components/Input/InputHelperText.js.map +1 -0
- package/dist/components/Input/InputLabel.d.ts +8 -0
- package/dist/components/Input/InputLabel.js +16 -0
- package/dist/components/Input/InputLabel.js.map +1 -0
- package/dist/components/Input/InputRoot.d.ts +11 -0
- package/dist/components/Input/InputRoot.js +30 -0
- package/dist/components/Input/InputRoot.js.map +1 -0
- package/dist/components/Input/InputTextArea.d.ts +15 -0
- package/dist/components/Input/InputTextArea.js +39 -0
- package/dist/components/Input/InputTextArea.js.map +1 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Link/Link.css.d.ts +8 -0
- package/dist/components/Link/Link.css.js +16 -0
- package/dist/components/Link/Link.css.js.map +1 -0
- package/dist/components/Link/Link.d.ts +12 -0
- package/dist/components/Link/Link.js +24 -0
- package/dist/components/Link/Link.js.map +1 -0
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/MenuItem/Menu.d.ts +14 -0
- package/dist/components/MenuItem/Menu.js +15 -0
- package/dist/components/MenuItem/Menu.js.map +1 -0
- package/dist/components/MenuItem/MenuItem.css.d.ts +4 -0
- package/dist/components/MenuItem/MenuItem.css.js +7 -0
- package/dist/components/MenuItem/MenuItem.css.js.map +1 -0
- package/dist/components/MenuItem/MenuItem.d.ts +10 -0
- package/dist/components/MenuItem/MenuItem.js +12 -0
- package/dist/components/MenuItem/MenuItem.js.map +1 -0
- package/dist/components/MenuItem/MenuItemLeading.d.ts +11 -0
- package/dist/components/MenuItem/MenuItemLeading.js +17 -0
- package/dist/components/MenuItem/MenuItemLeading.js.map +1 -0
- package/dist/components/MenuItem/MenuItemRoot.d.ts +18 -0
- package/dist/components/MenuItem/MenuItemRoot.js +15 -0
- package/dist/components/MenuItem/MenuItemRoot.js.map +1 -0
- package/dist/components/MenuItem/MenuItemTrailing.d.ts +14 -0
- package/dist/components/MenuItem/MenuItemTrailing.js +17 -0
- package/dist/components/MenuItem/MenuItemTrailing.js.map +1 -0
- package/dist/components/MenuItem/index.d.ts +4 -0
- package/dist/components/Overlay/overlay.css.d.ts +2 -0
- package/dist/components/PictureMessage/PictureMessage.css.d.ts +27 -0
- package/dist/components/PictureMessage/PictureMessage.css.js +25 -0
- package/dist/components/PictureMessage/PictureMessage.css.js.map +1 -0
- package/dist/components/PictureMessage/PictureMessage.d.ts +37 -0
- package/dist/components/PictureMessage/PictureMessage.js +34 -0
- package/dist/components/PictureMessage/PictureMessage.js.map +1 -0
- package/dist/components/PictureMessage/index.d.ts +1 -0
- package/dist/components/PillButton/PillButton.css.d.ts +10 -0
- package/dist/components/PillButton/PillButton.css.js +16 -0
- package/dist/components/PillButton/PillButton.css.js.map +1 -0
- package/dist/components/PillButton/PillButton.d.ts +16 -0
- package/dist/components/PillButton/PillButton.js +18 -0
- package/dist/components/PillButton/PillButton.js.map +1 -0
- package/dist/components/PillButton/index.d.ts +2 -0
- package/dist/components/ProactiveMessage/ProactiveMessage.css.d.ts +1 -0
- package/dist/components/ProactiveMessage/ProactiveMessage.css.js +7 -0
- package/dist/components/ProactiveMessage/ProactiveMessage.css.js.map +1 -0
- package/dist/components/ProactiveMessage/ProactiveMessage.d.ts +19 -0
- package/dist/components/ProactiveMessage/ProactiveMessage.js +16 -0
- package/dist/components/ProactiveMessage/ProactiveMessage.js.map +1 -0
- package/dist/components/ProactiveMessage/index.d.ts +2 -0
- package/dist/components/Radio/Radio.css.d.ts +5 -0
- package/dist/components/Radio/Radio.css.js +7 -0
- package/dist/components/Radio/Radio.css.js.map +1 -0
- package/dist/components/Radio/Radio.d.ts +15 -0
- package/dist/components/Radio/Radio.js +23 -0
- package/dist/components/Radio/Radio.js.map +1 -0
- package/dist/components/Radio/RadioGroup.d.ts +15 -0
- package/dist/components/Radio/RadioGroup.js +16 -0
- package/dist/components/Radio/RadioGroup.js.map +1 -0
- package/dist/components/Radio/index.d.ts +4 -0
- package/dist/components/ScrollMarker/ScrollMarker.css.d.ts +24 -0
- package/dist/components/ScrollMarker/ScrollMarker.css.js +25 -0
- package/dist/components/ScrollMarker/ScrollMarker.css.js.map +1 -0
- package/dist/components/ScrollMarker/ScrollMarker.d.ts +26 -0
- package/dist/components/ScrollMarker/ScrollMarker.js +29 -0
- package/dist/components/ScrollMarker/ScrollMarker.js.map +1 -0
- package/dist/components/ScrollMarker/index.d.ts +1 -0
- package/dist/components/Sheet/Sheet.css.d.ts +8 -0
- package/dist/components/Sheet/Sheet.css.js +7 -0
- package/dist/components/Sheet/Sheet.css.js.map +1 -0
- package/dist/components/Sheet/Sheet.d.ts +14 -0
- package/dist/components/Sheet/Sheet.js +14 -0
- package/dist/components/Sheet/Sheet.js.map +1 -0
- package/dist/components/Sheet/SheetActions.d.ts +7 -0
- package/dist/components/Sheet/SheetActions.js +14 -0
- package/dist/components/Sheet/SheetActions.js.map +1 -0
- package/dist/components/Sheet/SheetBody.d.ts +11 -0
- package/dist/components/Sheet/SheetBody.js +20 -0
- package/dist/components/Sheet/SheetBody.js.map +1 -0
- package/dist/components/Sheet/SheetHeader.d.ts +17 -0
- package/dist/components/Sheet/SheetHeader.js +44 -0
- package/dist/components/Sheet/SheetHeader.js.map +1 -0
- package/dist/components/Sheet/SheetRoot.d.ts +9 -0
- package/dist/components/Sheet/SheetRoot.js +16 -0
- package/dist/components/Sheet/SheetRoot.js.map +1 -0
- package/dist/components/Sheet/index.d.ts +4 -0
- package/dist/components/SheetOverlay/SheetOverlay.css.d.ts +3 -0
- package/dist/components/SheetOverlay/SheetOverlay.css.js +8 -0
- package/dist/components/SheetOverlay/SheetOverlay.css.js.map +1 -0
- package/dist/components/SheetOverlay/SheetOverlay.d.ts +24 -0
- package/dist/components/SheetOverlay/SheetOverlay.js +28 -0
- package/dist/components/SheetOverlay/SheetOverlay.js.map +1 -0
- package/dist/components/SheetOverlay/index.d.ts +1 -0
- package/dist/components/Spinner/Spinner.css.d.ts +22 -0
- package/dist/components/Spinner/Spinner.css.js +25 -0
- package/dist/components/Spinner/Spinner.css.js.map +1 -0
- package/dist/components/Spinner/Spinner.d.ts +19 -0
- package/dist/components/Spinner/Spinner.js +24 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Survey/SurveyRating/SurveyRating.css.d.ts +3 -0
- package/dist/components/Survey/SurveyRating/SurveyRating.css.js +7 -0
- package/dist/components/Survey/SurveyRating/SurveyRating.css.js.map +1 -0
- package/dist/components/Survey/SurveyRating/SurveyRating.d.ts +39 -0
- package/dist/components/Survey/SurveyRating/SurveyRating.js +51 -0
- package/dist/components/Survey/SurveyRating/SurveyRating.js.map +1 -0
- package/dist/components/Survey/SurveyRating/index.d.ts +1 -0
- package/dist/components/Survey/SurveySelect/SurveySelect.css.d.ts +1 -0
- package/dist/components/Survey/SurveySelect/SurveySelect.css.js +7 -0
- package/dist/components/Survey/SurveySelect/SurveySelect.css.js.map +1 -0
- package/dist/components/Survey/SurveySelect/SurveySelect.d.ts +40 -0
- package/dist/components/Survey/SurveySelect/SurveySelect.js +38 -0
- package/dist/components/Survey/SurveySelect/SurveySelect.js.map +1 -0
- package/dist/components/Survey/SurveySelect/index.d.ts +1 -0
- package/dist/components/Survey/index.d.ts +2 -0
- package/dist/components/ThinkingShimmer/ThinkingShimmer.css.d.ts +6 -0
- package/dist/components/ThinkingShimmer/ThinkingShimmer.css.js +7 -0
- package/dist/components/ThinkingShimmer/ThinkingShimmer.css.js.map +1 -0
- package/dist/components/ThinkingShimmer/ThinkingShimmer.d.ts +36 -0
- package/dist/components/ThinkingShimmer/ThinkingShimmer.js +44 -0
- package/dist/components/ThinkingShimmer/ThinkingShimmer.js.map +1 -0
- package/dist/components/ThinkingShimmer/index.d.ts +2 -0
- package/dist/components/ToastNotification/ToastNotification.css.d.ts +30 -0
- package/dist/components/ToastNotification/ToastNotification.css.js +25 -0
- package/dist/components/ToastNotification/ToastNotification.css.js.map +1 -0
- package/dist/components/ToastNotification/ToastNotification.d.ts +36 -0
- package/dist/components/ToastNotification/ToastNotification.js +31 -0
- package/dist/components/ToastNotification/ToastNotification.js.map +1 -0
- package/dist/components/ToastNotification/index.d.ts +2 -0
- package/dist/components/Toggle/Toggle.css.d.ts +14 -0
- package/dist/components/Toggle/Toggle.css.js +7 -0
- package/dist/components/Toggle/Toggle.css.js.map +1 -0
- package/dist/components/Toggle/Toggle.d.ts +18 -0
- package/dist/components/Toggle/Toggle.js +19 -0
- package/dist/components/Toggle/Toggle.js.map +1 -0
- package/dist/components/Toggle/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.css.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.css.js +7 -0
- package/dist/components/Tooltip/Tooltip.css.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +19 -0
- package/dist/components/Tooltip/Tooltip.js +32 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/TypingIndicator/TypingIndicator.css.d.ts +3 -0
- package/dist/components/TypingIndicator/TypingIndicator.css.js +7 -0
- package/dist/components/TypingIndicator/TypingIndicator.css.js.map +1 -0
- package/dist/components/TypingIndicator/TypingIndicator.d.ts +27 -0
- package/dist/components/TypingIndicator/TypingIndicator.js +34 -0
- package/dist/components/TypingIndicator/TypingIndicator.js.map +1 -0
- package/dist/components/TypingIndicator/index.d.ts +2 -0
- package/dist/components/UserMessage/UserMessage.css.d.ts +7 -0
- package/dist/components/UserMessage/UserMessage.css.js +7 -0
- package/dist/components/UserMessage/UserMessage.css.js.map +1 -0
- package/dist/components/UserMessage/UserMessage.d.ts +22 -0
- package/dist/components/UserMessage/UserMessage.js +45 -0
- package/dist/components/UserMessage/UserMessage.js.map +1 -0
- package/dist/components/UserMessage/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/usePrefersReducedMotion.d.ts +3 -0
- package/dist/hooks/usePrefersReducedMotion.js +20 -0
- package/dist/hooks/usePrefersReducedMotion.js.map +1 -0
- package/dist/hooks/useSubmitOnEnter.d.ts +7 -0
- package/dist/hooks/useSubmitOnEnter.js +11 -0
- package/dist/hooks/useSubmitOnEnter.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +75 -0
- package/dist/runtime/LovelaceProvider.d.ts +24 -0
- package/dist/runtime/LovelaceProvider.js +45 -0
- package/dist/runtime/LovelaceProvider.js.map +1 -0
- package/dist/runtime/branding.d.ts +133 -0
- package/dist/runtime/branding.js +92 -0
- package/dist/runtime/branding.js.map +1 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/style.css +2 -0
- package/dist/tokens/generated/tokens.d.ts +4 -0
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/index.js +2 -0
- package/dist/tokens/tokens.d.ts +8 -0
- package/dist/tokens/tokens.js +6 -0
- package/dist/tokens/tokens.js.map +1 -0
- package/dist/tokens.css +316 -0
- package/dist/utils/cx.d.ts +2 -0
- package/dist/utils/cx.js +6 -0
- package/dist/utils/cx.js.map +1 -0
- package/dist/vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js +80 -0
- package/dist/vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js.map +1 -0
- package/package.json +74 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MenuItemLeading } from "./MenuItemLeading.js";
|
|
2
|
+
import { MenuItemRoot } from "./MenuItemRoot.js";
|
|
3
|
+
import { MenuItemTrailing } from "./MenuItemTrailing.js";
|
|
4
|
+
export type { MenuItemLeadingProps } from "./MenuItemLeading.js";
|
|
5
|
+
export type { MenuItemProps } from "./MenuItemRoot.js";
|
|
6
|
+
export type { MenuItemTrailingProps } from "./MenuItemTrailing.js";
|
|
7
|
+
export declare const MenuItem: typeof MenuItemRoot & {
|
|
8
|
+
Leading: typeof MenuItemLeading;
|
|
9
|
+
Trailing: typeof MenuItemTrailing;
|
|
10
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MenuItemLeading as e } from "./MenuItemLeading.js";
|
|
2
|
+
import { MenuItemRoot as t } from "./MenuItemRoot.js";
|
|
3
|
+
import { MenuItemTrailing as n } from "./MenuItemTrailing.js";
|
|
4
|
+
//#region src/components/MenuItem/MenuItem.tsx
|
|
5
|
+
var r = Object.assign(t, {
|
|
6
|
+
Leading: e,
|
|
7
|
+
Trailing: n
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { r as MenuItem };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=MenuItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuItem.js","names":[],"sources":["../../../src/components/MenuItem/MenuItem.tsx"],"sourcesContent":["import { MenuItemLeading } from \"./MenuItemLeading.js\";\nimport { MenuItemRoot } from \"./MenuItemRoot.js\";\nimport { MenuItemTrailing } from \"./MenuItemTrailing.js\";\n\nexport type { MenuItemLeadingProps } from \"./MenuItemLeading.js\";\nexport type { MenuItemProps } from \"./MenuItemRoot.js\";\nexport type { MenuItemTrailingProps } from \"./MenuItemTrailing.js\";\n\nexport const MenuItem = Object.assign(MenuItemRoot, {\n\tLeading: MenuItemLeading,\n\tTrailing: MenuItemTrailing,\n});\n"],"mappings":";;;;AAQA,IAAa,IAAW,OAAO,OAAO,GAAc;CACnD,SAAS;CACT,UAAU;CACV,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
+
export interface MenuItemLeadingProps extends HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
ref?: Ref<HTMLSpanElement>;
|
|
4
|
+
/**
|
|
5
|
+
* Slot content — an `<Icon>`, or a checkbox/radio/switch-styled selection
|
|
6
|
+
* indicator. Keep it decorative; the row itself carries selection state.
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/** Leading (row-start) slot: a fixed 24px box that centres an icon or indicator. */
|
|
11
|
+
export declare function MenuItemLeading({ className, children, ref, ...rest }: MenuItemLeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cx as e } from "../../utils/cx.js";
|
|
2
|
+
import { menuItemLeading as t } from "./MenuItem.css.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/MenuItem/MenuItemLeading.tsx
|
|
5
|
+
function r({ className: r, children: i, ref: a, ...o }) {
|
|
6
|
+
return /* @__PURE__ */ n("span", {
|
|
7
|
+
ref: a,
|
|
8
|
+
...o,
|
|
9
|
+
"data-slot": "leading",
|
|
10
|
+
className: e(t, r),
|
|
11
|
+
children: i
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { r as MenuItemLeading };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=MenuItemLeading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuItemLeading.js","names":[],"sources":["../../../src/components/MenuItem/MenuItemLeading.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { menuItemLeading } from \"./MenuItem.css.js\";\n\nexport interface MenuItemLeadingProps extends HTMLAttributes<HTMLSpanElement> {\n\tref?: Ref<HTMLSpanElement>;\n\t/**\n\t * Slot content — an `<Icon>`, or a checkbox/radio/switch-styled selection\n\t * indicator. Keep it decorative; the row itself carries selection state.\n\t */\n\tchildren?: ReactNode;\n}\n\n/** Leading (row-start) slot: a fixed 24px box that centres an icon or indicator. */\nexport function MenuItemLeading({\n\tclassName,\n\tchildren,\n\tref,\n\t...rest\n}: MenuItemLeadingProps) {\n\treturn (\n\t\t<span\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t\tdata-slot=\"leading\"\n\t\t\tclassName={cx(menuItemLeading, className)}\n\t\t>\n\t\t\t{children}\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;AAcA,SAAgB,EAAgB,EAC/B,cACA,aACA,QACA,GAAG,KACqB;AACxB,QACC,kBAAC,QAAD;EACM;EACL,GAAI;EACJ,aAAU;EACV,WAAW,EAAG,GAAiB,EAAU;EAExC;EACK,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CSSProperties, Ref } from "react";
|
|
2
|
+
import type { MenuItemProps as AriaMenuItemProps } from "react-aria-components";
|
|
3
|
+
export interface MenuItemProps extends Omit<AriaMenuItemProps, "className" | "style"> {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
ref?: Ref<HTMLDivElement>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A selectable row within a `Menu` — `role="menuitem"`, or
|
|
10
|
+
* `menuitemcheckbox`/`menuitemradio` when the `Menu` sets `selectionMode`.
|
|
11
|
+
* Hover/focus/pressed/selected/disabled states come from the data-attributes
|
|
12
|
+
* React Aria sets, so this takes no state props; pass `isDisabled` to disable
|
|
13
|
+
* and `onAction` to handle activation. Compose row content with the
|
|
14
|
+
* `MenuItem.Leading` / `MenuItem.Trailing` slots around a text label, and supply
|
|
15
|
+
* `textValue` when the label isn't a plain string child. Children may be a
|
|
16
|
+
* render function to react to `isSelected` / `isFocused`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function MenuItemRoot({ className, ...rest }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cx as e } from "../../utils/cx.js";
|
|
2
|
+
import { menuItem as t } from "./MenuItem.css.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { MenuItem as r } from "react-aria-components";
|
|
5
|
+
//#region src/components/MenuItem/MenuItemRoot.tsx
|
|
6
|
+
function i({ className: i, ...a }) {
|
|
7
|
+
return /* @__PURE__ */ n(r, {
|
|
8
|
+
...a,
|
|
9
|
+
className: e(t, i)
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { i as MenuItemRoot };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=MenuItemRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuItemRoot.js","names":[],"sources":["../../../src/components/MenuItem/MenuItemRoot.tsx"],"sourcesContent":["import type { CSSProperties, Ref } from \"react\";\nimport type { MenuItemProps as AriaMenuItemProps } from \"react-aria-components\";\nimport { MenuItem as AriaMenuItem } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { menuItem } from \"./MenuItem.css.js\";\n\nexport interface MenuItemProps\n\textends Omit<AriaMenuItemProps, \"className\" | \"style\"> {\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n}\n\n/**\n * A selectable row within a `Menu` — `role=\"menuitem\"`, or\n * `menuitemcheckbox`/`menuitemradio` when the `Menu` sets `selectionMode`.\n * Hover/focus/pressed/selected/disabled states come from the data-attributes\n * React Aria sets, so this takes no state props; pass `isDisabled` to disable\n * and `onAction` to handle activation. Compose row content with the\n * `MenuItem.Leading` / `MenuItem.Trailing` slots around a text label, and supply\n * `textValue` when the label isn't a plain string child. Children may be a\n * render function to react to `isSelected` / `isFocused`.\n */\nexport function MenuItemRoot({ className, ...rest }: MenuItemProps) {\n\treturn <AriaMenuItem {...rest} className={cx(menuItem, className)} />;\n}\n"],"mappings":";;;;;AAuBA,SAAgB,EAAa,EAAE,cAAW,GAAG,KAAuB;AACnE,QAAO,kBAAC,GAAD;EAAc,GAAI;EAAM,WAAW,EAAG,GAAU,EAAU;EAAI,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
+
export interface MenuItemTrailingProps extends HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
ref?: Ref<HTMLSpanElement>;
|
|
4
|
+
/**
|
|
5
|
+
* Slot content — an `<Icon>`, or a checkbox/radio/switch-styled selection
|
|
6
|
+
* indicator. Keep it decorative; the row itself carries selection state.
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Trailing (row-end) slot: a fixed 24px box pinned to the far end of the row, so
|
|
12
|
+
* the label takes the remaining space. Centres an icon or indicator.
|
|
13
|
+
*/
|
|
14
|
+
export declare function MenuItemTrailing({ className, children, ref, ...rest }: MenuItemTrailingProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cx as e } from "../../utils/cx.js";
|
|
2
|
+
import { menuItemTrailing as t } from "./MenuItem.css.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/MenuItem/MenuItemTrailing.tsx
|
|
5
|
+
function r({ className: r, children: i, ref: a, ...o }) {
|
|
6
|
+
return /* @__PURE__ */ n("span", {
|
|
7
|
+
ref: a,
|
|
8
|
+
...o,
|
|
9
|
+
"data-slot": "trailing",
|
|
10
|
+
className: e(t, r),
|
|
11
|
+
children: i
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { r as MenuItemTrailing };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=MenuItemTrailing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuItemTrailing.js","names":[],"sources":["../../../src/components/MenuItem/MenuItemTrailing.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { menuItemTrailing } from \"./MenuItem.css.js\";\n\nexport interface MenuItemTrailingProps extends HTMLAttributes<HTMLSpanElement> {\n\tref?: Ref<HTMLSpanElement>;\n\t/**\n\t * Slot content — an `<Icon>`, or a checkbox/radio/switch-styled selection\n\t * indicator. Keep it decorative; the row itself carries selection state.\n\t */\n\tchildren?: ReactNode;\n}\n\n/**\n * Trailing (row-end) slot: a fixed 24px box pinned to the far end of the row, so\n * the label takes the remaining space. Centres an icon or indicator.\n */\nexport function MenuItemTrailing({\n\tclassName,\n\tchildren,\n\tref,\n\t...rest\n}: MenuItemTrailingProps) {\n\treturn (\n\t\t<span\n\t\t\tref={ref}\n\t\t\t{...rest}\n\t\t\tdata-slot=\"trailing\"\n\t\t\tclassName={cx(menuItemTrailing, className)}\n\t\t>\n\t\t\t{children}\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;AAiBA,SAAgB,EAAiB,EAChC,cACA,aACA,QACA,GAAG,KACsB;AACzB,QACC,kBAAC,QAAD;EACM;EACL,GAAI;EACJ,aAAU;EACV,WAAW,EAAG,GAAkB,EAAU;EAEzC;EACK,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const pictureRoot: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
|
+
aspectRatio: {
|
|
3
|
+
"16:9": {
|
|
4
|
+
aspectRatio: "16 / 9";
|
|
5
|
+
};
|
|
6
|
+
"4:3": {
|
|
7
|
+
aspectRatio: "4 / 3";
|
|
8
|
+
};
|
|
9
|
+
"1:1": {
|
|
10
|
+
aspectRatio: "1 / 1";
|
|
11
|
+
};
|
|
12
|
+
"3:4": {
|
|
13
|
+
aspectRatio: "3 / 4";
|
|
14
|
+
};
|
|
15
|
+
"9:16": {
|
|
16
|
+
aspectRatio: "9 / 16";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
unavailable: {
|
|
20
|
+
true: {
|
|
21
|
+
backgroundColor: "var(--lovelace-color-neutral-0)" | "var(--lovelace-color-neutral-50)" | "var(--lovelace-color-neutral-100)" | "var(--lovelace-color-neutral-200)" | "var(--lovelace-color-neutral-300)" | "var(--lovelace-color-neutral-400)" | "var(--lovelace-color-neutral-500)" | "var(--lovelace-color-neutral-600)" | "var(--lovelace-color-neutral-700)" | "var(--lovelace-color-neutral-800)" | "var(--lovelace-color-neutral-900)" | "var(--lovelace-color-red-50)" | "var(--lovelace-color-orange-50)" | "var(--lovelace-color-green-50)" | "var(--lovelace-color-green-100)" | "var(--lovelace-color-green-200)" | "var(--lovelace-color-green-300)" | "var(--lovelace-color-green-400)" | "var(--lovelace-color-green-500)" | "var(--lovelace-color-green-600)" | "var(--lovelace-color-green-700)" | "var(--lovelace-color-green-800)" | "var(--lovelace-color-green-900)" | "var(--lovelace-color-orange-100)" | "var(--lovelace-color-orange-200)" | "var(--lovelace-color-orange-300)" | "var(--lovelace-color-orange-400)" | "var(--lovelace-color-orange-500)" | "var(--lovelace-color-orange-600)" | "var(--lovelace-color-orange-700)" | "var(--lovelace-color-orange-800)" | "var(--lovelace-color-orange-900)" | "var(--lovelace-color-red-100)" | "var(--lovelace-color-red-200)" | "var(--lovelace-color-red-300)" | "var(--lovelace-color-red-400)" | "var(--lovelace-color-red-500)" | "var(--lovelace-color-red-600)" | "var(--lovelace-color-red-700)" | "var(--lovelace-color-red-800)" | "var(--lovelace-color-red-900)" | "var(--lovelace-spacing-4)" | "var(--lovelace-spacing-8)" | "var(--lovelace-spacing-12)" | "var(--lovelace-spacing-16)" | "var(--lovelace-spacing-20)" | "var(--lovelace-spacing-24)" | "var(--lovelace-spacing-32)" | "var(--lovelace-spacing-40)" | "var(--lovelace-spacing-48)" | "var(--lovelace-font-weight-400)" | "var(--lovelace-font-weight-500)" | "var(--lovelace-font-weight-600)" | "var(--lovelace-color-blue-50)" | "var(--lovelace-color-blue-100)" | "var(--lovelace-color-blue-200)" | "var(--lovelace-color-blue-300)" | "var(--lovelace-color-blue-400)" | "var(--lovelace-color-blue-500)" | "var(--lovelace-color-blue-600)" | "var(--lovelace-color-blue-700)" | "var(--lovelace-color-blue-800)" | "var(--lovelace-color-blue-900)" | "var(--lovelace-font-size-12)" | "var(--lovelace-font-size-14)" | "var(--lovelace-font-size-16)" | "var(--lovelace-font-size-18)" | "var(--lovelace-font-size-20)" | "var(--lovelace-font-size-22)" | "var(--lovelace-font-size-24)" | "var(--lovelace-font-size-26)" | "var(--lovelace-font-size-28)" | "var(--lovelace-font-line-height-16)" | "var(--lovelace-font-line-height-18)" | "var(--lovelace-font-line-height-22)" | "var(--lovelace-font-line-height-24)" | "var(--lovelace-font-line-height-26)" | "var(--lovelace-font-line-height-28)" | "var(--lovelace-font-line-height-30)" | "var(--lovelace-font-line-height-32)" | "var(--lovelace-font-line-height-34)" | "var(--lovelace-border-radius-0)" | "var(--lovelace-p-border-radius-6)" | "var(--lovelace-p-border-radius-10)" | "var(--lovelace-p-border-radius-14)" | "var(--lovelace-p-border-radius-20)" | "var(--lovelace-p-border-radius-24)" | "var(--lovelace-border-radius-999)" | "var(--lovelace-font-paragraph-spacing-4)" | "var(--lovelace-font-paragraph-spacing-6)" | "var(--lovelace-font-paragraph-spacing-8)" | "var(--lovelace-font-paragraph-spacing-10)" | "var(--lovelace-font-paragraph-spacing-12)" | "var(--lovelace-color-accent-50)" | "var(--lovelace-color-accent-100)" | "var(--lovelace-color-accent-200)" | "var(--lovelace-color-accent-300)" | "var(--lovelace-color-accent-400)" | "var(--lovelace-color-accent-500)" | "var(--lovelace-color-accent-600)" | "var(--lovelace-color-accent-700)" | "var(--lovelace-color-accent-800)" | "var(--lovelace-color-accent-900)" | "var(--lovelace-font-family-sans-serif)" | "var(--lovelace-font-family-mono)" | "var(--lovelace-border-width-1)" | "var(--lovelace-border-width-2)" | "var(--lovelace-dimension-16)" | "var(--lovelace-dimension-20)" | "var(--lovelace-dimension-22)" | "var(--lovelace-dimension-24)" | "var(--lovelace-dimension-32)" | "var(--lovelace-dimension-36)" | "var(--lovelace-color-content-default)" | "var(--lovelace-color-content-secondary)" | "var(--lovelace-color-content-secondary-inverse)" | "var(--lovelace-color-content-disabled)" | "var(--lovelace-color-content-inverse)" | "var(--lovelace-color-background-default)" | "var(--lovelace-color-background-secondary)" | "var(--lovelace-color-background-tertiary)" | "var(--lovelace-color-background-quaternary)" | "var(--lovelace-color-background-disabled)" | "var(--lovelace-color-background-inverse)" | "var(--lovelace-color-background-neutral-overlay)" | "var(--lovelace-color-border-default)" | "var(--lovelace-color-border-medium)" | "var(--lovelace-color-border-strong)" | "var(--lovelace-color-content-link)" | "var(--lovelace-color-background-destructive)" | "var(--lovelace-color-content-destructive)" | "var(--lovelace-color-background-destructive-light)" | "var(--lovelace-color-border-destructive)" | "var(--lovelace-color-content-on-destructive)" | "var(--lovelace-color-content-warning)" | "var(--lovelace-color-background-warning)" | "var(--lovelace-color-background-warning-light)" | "var(--lovelace-color-border-warning)" | "var(--lovelace-color-content-success)" | "var(--lovelace-color-background-success)" | "var(--lovelace-color-background-success-light)" | "var(--lovelace-color-border-success)" | "var(--lovelace-color-content-accent)" | "var(--lovelace-color-content-on-accent)" | "var(--lovelace-color-content-on-scrim)" | "var(--lovelace-color-background-accent)" | "var(--lovelace-color-background-highlight-overlay)" | "var(--lovelace-color-border-focus)" | "var(--lovelace-color-border-accent)" | "var(--lovelace-color-border-highlight)" | "var(--lovelace-font-weight-regular)" | "var(--lovelace-font-size-caption)" | "var(--lovelace-line-height-caption)" | "var(--lovelace-paragraph-spacing-caption)" | "var(--lovelace-paragraph-spacing-body)" | "var(--lovelace-paragraph-spacing-title)" | "var(--lovelace-line-height-body)" | "var(--lovelace-line-height-title-small)" | "var(--lovelace-line-height-title-large)" | "var(--lovelace-font-size-body)" | "var(--lovelace-font-size-title-small)" | "var(--lovelace-font-size-title-large)" | "var(--lovelace-font-weight-medium)" | "var(--lovelace-font-weight-semi-bold)" | "var(--lovelace-font-family-body)" | "var(--lovelace-font-family-heading)" | "var(--lovelace-font-family-code)" | "var(--lovelace-border-radius-none)" | "var(--lovelace-border-radius-6)" | "var(--lovelace-border-radius-10)" | "var(--lovelace-border-radius-14)" | "var(--lovelace-border-radius-20)" | "var(--lovelace-border-radius-24)" | "var(--lovelace-border-radius-full)" | "var(--lovelace-padding-4)" | "var(--lovelace-padding-8)" | "var(--lovelace-padding-12)" | "var(--lovelace-gap-4)" | "var(--lovelace-padding-16)" | "var(--lovelace-gap-8)" | "var(--lovelace-gap-12)" | "var(--lovelace-gap-16)" | "var(--lovelace-gap-20)" | "var(--lovelace-padding-20)" | "var(--lovelace-border-width-default)" | "var(--lovelace-border-width-focus)" | "var(--lovelace-opacity-state-hover)" | "var(--lovelace-opacity-state-focus)" | "var(--lovelace-opacity-state-pressed)" | "var(--lovelace-icon-size-sm)" | "var(--lovelace-icon-size-md)" | "var(--lovelace-icon-size-control)" | "var(--lovelace-icon-size-lg)" | "var(--lovelace-easing-standard)" | "var(--lovelace-easing-emphasized)" | "var(--lovelace-easing-decelerate)" | "var(--lovelace-easing-accelerate)" | "var(--lovelace-duration-fast)" | "var(--lovelace-duration-medium)" | "var(--lovelace-duration-slow)" | "var(--lovelace-message-user-background)" | "var(--lovelace-message-user-content)" | "var(--lovelace-button-primary-background)" | "var(--lovelace-button-primary-content)" | "var(--lovelace-header-background)" | "var(--lovelace-pill-content-primary)" | "var(--lovelace-header-content)" | "var(--lovelace-chip-background-selected)" | "var(--lovelace-chatfab-background)" | "var(--lovelace-chatfab-content)" | "var(--lovelace-composer-background)" | "var(--lovelace-composer-border-default)" | "var(--lovelace-composer-content-default)" | "var(--lovelace-composer-content-secondary)" | "var(--lovelace-composer-border-focus)" | "var(--lovelace-composer-border-active)" | "var(--lovelace-avatar-background)" | "var(--lovelace-avatar-content)" | "var(--lovelace-scrollmarker-background)" | "var(--lovelace-scrollmarker-content)" | "var(--lovelace-send-button-background)" | "var(--lovelace-chat-background)" | "var(--lovelace-border-radius-button)" | "var(--lovelace-border-radius-message)" | "var(--lovelace-border-radius-input)" | "var(--lovelace-border-radius-composer)" | "var(--lovelace-border-radius-avatar)" | "var(--lovelace-border-radius-pill)" | "var(--lovelace-border-radius-media-preview)" | "var(--lovelace-border-radius-container)";
|
|
22
|
+
color: "var(--lovelace-color-neutral-0)" | "var(--lovelace-color-neutral-50)" | "var(--lovelace-color-neutral-100)" | "var(--lovelace-color-neutral-200)" | "var(--lovelace-color-neutral-300)" | "var(--lovelace-color-neutral-400)" | "var(--lovelace-color-neutral-500)" | "var(--lovelace-color-neutral-600)" | "var(--lovelace-color-neutral-700)" | "var(--lovelace-color-neutral-800)" | "var(--lovelace-color-neutral-900)" | "var(--lovelace-color-red-50)" | "var(--lovelace-color-orange-50)" | "var(--lovelace-color-green-50)" | "var(--lovelace-color-green-100)" | "var(--lovelace-color-green-200)" | "var(--lovelace-color-green-300)" | "var(--lovelace-color-green-400)" | "var(--lovelace-color-green-500)" | "var(--lovelace-color-green-600)" | "var(--lovelace-color-green-700)" | "var(--lovelace-color-green-800)" | "var(--lovelace-color-green-900)" | "var(--lovelace-color-orange-100)" | "var(--lovelace-color-orange-200)" | "var(--lovelace-color-orange-300)" | "var(--lovelace-color-orange-400)" | "var(--lovelace-color-orange-500)" | "var(--lovelace-color-orange-600)" | "var(--lovelace-color-orange-700)" | "var(--lovelace-color-orange-800)" | "var(--lovelace-color-orange-900)" | "var(--lovelace-color-red-100)" | "var(--lovelace-color-red-200)" | "var(--lovelace-color-red-300)" | "var(--lovelace-color-red-400)" | "var(--lovelace-color-red-500)" | "var(--lovelace-color-red-600)" | "var(--lovelace-color-red-700)" | "var(--lovelace-color-red-800)" | "var(--lovelace-color-red-900)" | "var(--lovelace-spacing-4)" | "var(--lovelace-spacing-8)" | "var(--lovelace-spacing-12)" | "var(--lovelace-spacing-16)" | "var(--lovelace-spacing-20)" | "var(--lovelace-spacing-24)" | "var(--lovelace-spacing-32)" | "var(--lovelace-spacing-40)" | "var(--lovelace-spacing-48)" | "var(--lovelace-font-weight-400)" | "var(--lovelace-font-weight-500)" | "var(--lovelace-font-weight-600)" | "var(--lovelace-color-blue-50)" | "var(--lovelace-color-blue-100)" | "var(--lovelace-color-blue-200)" | "var(--lovelace-color-blue-300)" | "var(--lovelace-color-blue-400)" | "var(--lovelace-color-blue-500)" | "var(--lovelace-color-blue-600)" | "var(--lovelace-color-blue-700)" | "var(--lovelace-color-blue-800)" | "var(--lovelace-color-blue-900)" | "var(--lovelace-font-size-12)" | "var(--lovelace-font-size-14)" | "var(--lovelace-font-size-16)" | "var(--lovelace-font-size-18)" | "var(--lovelace-font-size-20)" | "var(--lovelace-font-size-22)" | "var(--lovelace-font-size-24)" | "var(--lovelace-font-size-26)" | "var(--lovelace-font-size-28)" | "var(--lovelace-font-line-height-16)" | "var(--lovelace-font-line-height-18)" | "var(--lovelace-font-line-height-22)" | "var(--lovelace-font-line-height-24)" | "var(--lovelace-font-line-height-26)" | "var(--lovelace-font-line-height-28)" | "var(--lovelace-font-line-height-30)" | "var(--lovelace-font-line-height-32)" | "var(--lovelace-font-line-height-34)" | "var(--lovelace-border-radius-0)" | "var(--lovelace-p-border-radius-6)" | "var(--lovelace-p-border-radius-10)" | "var(--lovelace-p-border-radius-14)" | "var(--lovelace-p-border-radius-20)" | "var(--lovelace-p-border-radius-24)" | "var(--lovelace-border-radius-999)" | "var(--lovelace-font-paragraph-spacing-4)" | "var(--lovelace-font-paragraph-spacing-6)" | "var(--lovelace-font-paragraph-spacing-8)" | "var(--lovelace-font-paragraph-spacing-10)" | "var(--lovelace-font-paragraph-spacing-12)" | "var(--lovelace-color-accent-50)" | "var(--lovelace-color-accent-100)" | "var(--lovelace-color-accent-200)" | "var(--lovelace-color-accent-300)" | "var(--lovelace-color-accent-400)" | "var(--lovelace-color-accent-500)" | "var(--lovelace-color-accent-600)" | "var(--lovelace-color-accent-700)" | "var(--lovelace-color-accent-800)" | "var(--lovelace-color-accent-900)" | "var(--lovelace-font-family-sans-serif)" | "var(--lovelace-font-family-mono)" | "var(--lovelace-border-width-1)" | "var(--lovelace-border-width-2)" | "var(--lovelace-dimension-16)" | "var(--lovelace-dimension-20)" | "var(--lovelace-dimension-22)" | "var(--lovelace-dimension-24)" | "var(--lovelace-dimension-32)" | "var(--lovelace-dimension-36)" | "var(--lovelace-color-content-default)" | "var(--lovelace-color-content-secondary)" | "var(--lovelace-color-content-secondary-inverse)" | "var(--lovelace-color-content-disabled)" | "var(--lovelace-color-content-inverse)" | "var(--lovelace-color-background-default)" | "var(--lovelace-color-background-secondary)" | "var(--lovelace-color-background-tertiary)" | "var(--lovelace-color-background-quaternary)" | "var(--lovelace-color-background-disabled)" | "var(--lovelace-color-background-inverse)" | "var(--lovelace-color-background-neutral-overlay)" | "var(--lovelace-color-border-default)" | "var(--lovelace-color-border-medium)" | "var(--lovelace-color-border-strong)" | "var(--lovelace-color-content-link)" | "var(--lovelace-color-background-destructive)" | "var(--lovelace-color-content-destructive)" | "var(--lovelace-color-background-destructive-light)" | "var(--lovelace-color-border-destructive)" | "var(--lovelace-color-content-on-destructive)" | "var(--lovelace-color-content-warning)" | "var(--lovelace-color-background-warning)" | "var(--lovelace-color-background-warning-light)" | "var(--lovelace-color-border-warning)" | "var(--lovelace-color-content-success)" | "var(--lovelace-color-background-success)" | "var(--lovelace-color-background-success-light)" | "var(--lovelace-color-border-success)" | "var(--lovelace-color-content-accent)" | "var(--lovelace-color-content-on-accent)" | "var(--lovelace-color-content-on-scrim)" | "var(--lovelace-color-background-accent)" | "var(--lovelace-color-background-highlight-overlay)" | "var(--lovelace-color-border-focus)" | "var(--lovelace-color-border-accent)" | "var(--lovelace-color-border-highlight)" | "var(--lovelace-font-weight-regular)" | "var(--lovelace-font-size-caption)" | "var(--lovelace-line-height-caption)" | "var(--lovelace-paragraph-spacing-caption)" | "var(--lovelace-paragraph-spacing-body)" | "var(--lovelace-paragraph-spacing-title)" | "var(--lovelace-line-height-body)" | "var(--lovelace-line-height-title-small)" | "var(--lovelace-line-height-title-large)" | "var(--lovelace-font-size-body)" | "var(--lovelace-font-size-title-small)" | "var(--lovelace-font-size-title-large)" | "var(--lovelace-font-weight-medium)" | "var(--lovelace-font-weight-semi-bold)" | "var(--lovelace-font-family-body)" | "var(--lovelace-font-family-heading)" | "var(--lovelace-font-family-code)" | "var(--lovelace-border-radius-none)" | "var(--lovelace-border-radius-6)" | "var(--lovelace-border-radius-10)" | "var(--lovelace-border-radius-14)" | "var(--lovelace-border-radius-20)" | "var(--lovelace-border-radius-24)" | "var(--lovelace-border-radius-full)" | "var(--lovelace-padding-4)" | "var(--lovelace-padding-8)" | "var(--lovelace-padding-12)" | "var(--lovelace-gap-4)" | "var(--lovelace-padding-16)" | "var(--lovelace-gap-8)" | "var(--lovelace-gap-12)" | "var(--lovelace-gap-16)" | "var(--lovelace-gap-20)" | "var(--lovelace-padding-20)" | "var(--lovelace-border-width-default)" | "var(--lovelace-border-width-focus)" | "var(--lovelace-opacity-state-hover)" | "var(--lovelace-opacity-state-focus)" | "var(--lovelace-opacity-state-pressed)" | "var(--lovelace-icon-size-sm)" | "var(--lovelace-icon-size-md)" | "var(--lovelace-icon-size-control)" | "var(--lovelace-icon-size-lg)" | "var(--lovelace-easing-standard)" | "var(--lovelace-easing-emphasized)" | "var(--lovelace-easing-decelerate)" | "var(--lovelace-easing-accelerate)" | "var(--lovelace-duration-fast)" | "var(--lovelace-duration-medium)" | "var(--lovelace-duration-slow)" | "var(--lovelace-message-user-background)" | "var(--lovelace-message-user-content)" | "var(--lovelace-button-primary-background)" | "var(--lovelace-button-primary-content)" | "var(--lovelace-header-background)" | "var(--lovelace-pill-content-primary)" | "var(--lovelace-header-content)" | "var(--lovelace-chip-background-selected)" | "var(--lovelace-chatfab-background)" | "var(--lovelace-chatfab-content)" | "var(--lovelace-composer-background)" | "var(--lovelace-composer-border-default)" | "var(--lovelace-composer-content-default)" | "var(--lovelace-composer-content-secondary)" | "var(--lovelace-composer-border-focus)" | "var(--lovelace-composer-border-active)" | "var(--lovelace-avatar-background)" | "var(--lovelace-avatar-content)" | "var(--lovelace-scrollmarker-background)" | "var(--lovelace-scrollmarker-content)" | "var(--lovelace-send-button-background)" | "var(--lovelace-chat-background)" | "var(--lovelace-border-radius-button)" | "var(--lovelace-border-radius-message)" | "var(--lovelace-border-radius-input)" | "var(--lovelace-border-radius-composer)" | "var(--lovelace-border-radius-avatar)" | "var(--lovelace-border-radius-pill)" | "var(--lovelace-border-radius-media-preview)" | "var(--lovelace-border-radius-container)";
|
|
23
|
+
};
|
|
24
|
+
false: {};
|
|
25
|
+
};
|
|
26
|
+
}>;
|
|
27
|
+
export declare const pictureImage: string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createRuntimeFn as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
//#region src/components/PictureMessage/PictureMessage.css.ts
|
|
4
|
+
var t = e({
|
|
5
|
+
defaultClassName: "_14rcj9q1 _14rcj9q0",
|
|
6
|
+
variantClassNames: {
|
|
7
|
+
aspectRatio: {
|
|
8
|
+
"16:9": "_14rcj9q2",
|
|
9
|
+
"4:3": "_14rcj9q3",
|
|
10
|
+
"1:1": "_14rcj9q4",
|
|
11
|
+
"3:4": "_14rcj9q5",
|
|
12
|
+
"9:16": "_14rcj9q6"
|
|
13
|
+
},
|
|
14
|
+
unavailable: {
|
|
15
|
+
true: "_14rcj9q7",
|
|
16
|
+
false: "_14rcj9q8"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: { unavailable: !1 },
|
|
20
|
+
compoundVariants: []
|
|
21
|
+
}), n = "_14rcj9q9";
|
|
22
|
+
//#endregion
|
|
23
|
+
export { n as pictureImage, t as pictureRoot };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=PictureMessage.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PictureMessage.css.js","names":[],"sources":["../../../src/components/PictureMessage/PictureMessage.css.ts"],"sourcesContent":["import { globalStyle, style } from \"@vanilla-extract/css\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport { t } from \"../../tokens/index.js\";\n\nconst pictureBase = style({});\n\nexport const pictureRoot = recipe({\n\tbase: [\n\t\tpictureBase,\n\t\t{\n\t\t\tposition: \"relative\",\n\t\t\tdisplay: \"flex\",\n\t\t\talignItems: \"center\",\n\t\t\tjustifyContent: \"center\",\n\t\t\tboxSizing: \"border-box\",\n\t\t\toverflow: \"hidden\",\n\t\t\tborderRadius: t(\"border-radius-media-preview\"),\n\t\t\tborder: `${t(\"border-width-default\")} solid ${t(\"color-border-default\")}`,\n\t\t},\n\t],\n\tvariants: {\n\t\taspectRatio: {\n\t\t\t\"16:9\": { aspectRatio: \"16 / 9\" },\n\t\t\t\"4:3\": { aspectRatio: \"4 / 3\" },\n\t\t\t\"1:1\": { aspectRatio: \"1 / 1\" },\n\t\t\t\"3:4\": { aspectRatio: \"3 / 4\" },\n\t\t\t\"9:16\": { aspectRatio: \"9 / 16\" },\n\t\t},\n\t\tunavailable: {\n\t\t\ttrue: {\n\t\t\t\tbackgroundColor: t(\"color-background-disabled\"),\n\t\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t\t},\n\t\t\tfalse: {},\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tunavailable: false,\n\t},\n});\n\nexport const pictureImage = style({\n\tdisplay: \"block\",\n\twidth: \"100%\",\n\theight: \"100%\",\n\tobjectFit: \"cover\",\n});\n\nglobalStyle(`${pictureBase} [data-slot='icon']`, {\n\tfontSize: t(\"icon-size-lg\"),\n});\n"],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { CSSProperties, Ref } from "react";
|
|
2
|
+
import type { ImageLoadingStatus } from "../Image/index.js";
|
|
3
|
+
export type PictureAspectRatio = "16:9" | "4:3" | "1:1" | "3:4" | "9:16";
|
|
4
|
+
export interface PictureMessageProps {
|
|
5
|
+
/**
|
|
6
|
+
* Image URL. When absent — or when `unavailable` is set — the muted
|
|
7
|
+
* "image unavailable" placeholder renders instead of the picture.
|
|
8
|
+
*/
|
|
9
|
+
src?: string;
|
|
10
|
+
/** Alt text describing the image. Never leave empty for content images. */
|
|
11
|
+
alt: string;
|
|
12
|
+
/**
|
|
13
|
+
* Frame proportions — bind to the source image's proportions so it isn't
|
|
14
|
+
* cropped. The frame is context-sized (fills its container's width); the
|
|
15
|
+
* consumer constrains it to the message column. When omitted, the frame
|
|
16
|
+
* takes its height from the image's natural proportions.
|
|
17
|
+
*/
|
|
18
|
+
aspectRatio?: PictureAspectRatio;
|
|
19
|
+
/** Force the "image unavailable" placeholder (media-slash on a muted box). */
|
|
20
|
+
unavailable?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Reports the underlying image's load state so a consumer can reserve space
|
|
23
|
+
* while loading or react to a load failure. The frame already swaps to the
|
|
24
|
+
* unavailable placeholder on error on its own.
|
|
25
|
+
*/
|
|
26
|
+
onLoadingStatusChange?: (status: ImageLoadingStatus) => void;
|
|
27
|
+
className?: string;
|
|
28
|
+
style?: CSSProperties;
|
|
29
|
+
ref?: Ref<HTMLDivElement>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A rounded image attachment rendered inside a chat message. Clips the picture to
|
|
33
|
+
* the media-preview corner radius and holds it at a fixed aspect ratio; when the
|
|
34
|
+
* image is missing or unavailable — or when the image fails to load — it shows a
|
|
35
|
+
* muted media-slash placeholder.
|
|
36
|
+
*/
|
|
37
|
+
export declare function PictureMessage({ src, alt, aspectRatio, unavailable, onLoadingStatusChange, className, ...rest }: PictureMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { cx as e } from "../../utils/cx.js";
|
|
2
|
+
import { MediaSlash as t } from "../Icon/icons/MediaSlash.js";
|
|
3
|
+
import { Image as n } from "../Image/Image.js";
|
|
4
|
+
import { pictureImage as r, pictureRoot as i } from "./PictureMessage.css.js";
|
|
5
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
6
|
+
import { useState as o } from "react";
|
|
7
|
+
//#region src/components/PictureMessage/PictureMessage.tsx
|
|
8
|
+
var s = "Image unavailable";
|
|
9
|
+
function c({ src: c, alt: l, aspectRatio: u, unavailable: d = !1, onLoadingStatusChange: f, className: p, ...m }) {
|
|
10
|
+
let [h, g] = o("loading"), _ = d || !c, v = _ || h === "error", y = typeof l == "string" ? l.trim() : "", b = y ? `${s}: ${y}` : s;
|
|
11
|
+
return /* @__PURE__ */ a("div", {
|
|
12
|
+
...m,
|
|
13
|
+
"data-aspect-ratio": u,
|
|
14
|
+
"data-unavailable": v || void 0,
|
|
15
|
+
"data-status": _ ? void 0 : h,
|
|
16
|
+
className: e(i({
|
|
17
|
+
aspectRatio: u,
|
|
18
|
+
unavailable: v
|
|
19
|
+
}), p),
|
|
20
|
+
children: _ ? /* @__PURE__ */ a(t, { label: b }) : /* @__PURE__ */ a(n, {
|
|
21
|
+
className: r,
|
|
22
|
+
src: c,
|
|
23
|
+
alt: l,
|
|
24
|
+
fallback: /* @__PURE__ */ a(t, { label: b }),
|
|
25
|
+
onLoadingStatusChange: (e) => {
|
|
26
|
+
g(e), f?.(e);
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { c as PictureMessage };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=PictureMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PictureMessage.js","names":[],"sources":["../../../src/components/PictureMessage/PictureMessage.tsx"],"sourcesContent":["import type { CSSProperties, Ref } from \"react\";\nimport { useState } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { MediaSlash } from \"../Icon/icons/MediaSlash.js\";\nimport type { ImageLoadingStatus } from \"../Image/index.js\";\nimport { Image } from \"../Image/index.js\";\nimport { pictureImage, pictureRoot } from \"./PictureMessage.css.js\";\n\nexport type PictureAspectRatio = \"16:9\" | \"4:3\" | \"1:1\" | \"3:4\" | \"9:16\";\n\nexport interface PictureMessageProps {\n\t/**\n\t * Image URL. When absent — or when `unavailable` is set — the muted\n\t * \"image unavailable\" placeholder renders instead of the picture.\n\t */\n\tsrc?: string;\n\t/** Alt text describing the image. Never leave empty for content images. */\n\talt: string;\n\t/**\n\t * Frame proportions — bind to the source image's proportions so it isn't\n\t * cropped. The frame is context-sized (fills its container's width); the\n\t * consumer constrains it to the message column. When omitted, the frame\n\t * takes its height from the image's natural proportions.\n\t */\n\taspectRatio?: PictureAspectRatio;\n\t/** Force the \"image unavailable\" placeholder (media-slash on a muted box). */\n\tunavailable?: boolean;\n\t/**\n\t * Reports the underlying image's load state so a consumer can reserve space\n\t * while loading or react to a load failure. The frame already swaps to the\n\t * unavailable placeholder on error on its own.\n\t */\n\tonLoadingStatusChange?: (status: ImageLoadingStatus) => void;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n}\n\nconst UNAVAILABLE_LABEL = \"Image unavailable\";\n\n/**\n * A rounded image attachment rendered inside a chat message. Clips the picture to\n * the media-preview corner radius and holds it at a fixed aspect ratio; when the\n * image is missing or unavailable — or when the image fails to load — it shows a\n * muted media-slash placeholder.\n */\nexport function PictureMessage({\n\tsrc,\n\talt,\n\taspectRatio,\n\tunavailable = false,\n\tonLoadingStatusChange,\n\tclassName,\n\t...rest\n}: PictureMessageProps) {\n\tconst [status, setStatus] = useState<ImageLoadingStatus>(\"loading\");\n\tconst forced = unavailable || !src;\n\tconst showPlaceholder = forced || status === \"error\";\n\t// Lovelace can be consumed from older/untyped JavaScript even though the TS\n\t// contract requires a string, so the failure path must remain total.\n\tconst description = typeof alt === \"string\" ? alt.trim() : \"\";\n\tconst unavailableLabel = description\n\t\t? `${UNAVAILABLE_LABEL}: ${description}`\n\t\t: UNAVAILABLE_LABEL;\n\treturn (\n\t\t<div\n\t\t\t{...rest}\n\t\t\tdata-aspect-ratio={aspectRatio}\n\t\t\tdata-unavailable={showPlaceholder || undefined}\n\t\t\tdata-status={forced ? undefined : status}\n\t\t\tclassName={cx(\n\t\t\t\tpictureRoot({ aspectRatio, unavailable: showPlaceholder }),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{forced ? (\n\t\t\t\t<MediaSlash label={unavailableLabel} />\n\t\t\t) : (\n\t\t\t\t<Image\n\t\t\t\t\tclassName={pictureImage}\n\t\t\t\t\tsrc={src}\n\t\t\t\t\talt={alt}\n\t\t\t\t\tfallback={<MediaSlash label={unavailableLabel} />}\n\t\t\t\t\tonLoadingStatusChange={(next) => {\n\t\t\t\t\t\tsetStatus(next);\n\t\t\t\t\t\tonLoadingStatusChange?.(next);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAsCA,IAAM,IAAoB;AAQ1B,SAAgB,EAAe,EAC9B,QACA,QACA,gBACA,iBAAc,IACd,0BACA,cACA,GAAG,KACoB;CACvB,IAAM,CAAC,GAAQ,KAAa,EAA6B,UAAU,EAC7D,IAAS,KAAe,CAAC,GACzB,IAAkB,KAAU,MAAW,SAGvC,IAAc,OAAO,KAAQ,WAAW,EAAI,MAAM,GAAG,IACrD,IAAmB,IACtB,GAAG,EAAkB,IAAI,MACzB;AACH,QACC,kBAAC,OAAD;EACC,GAAI;EACJ,qBAAmB;EACnB,oBAAkB,KAAmB,KAAA;EACrC,eAAa,IAAS,KAAA,IAAY;EAClC,WAAW,EACV,EAAY;GAAE;GAAa,aAAa;GAAiB,CAAC,EAC1D,EACA;YAEA,IACA,kBAAC,GAAD,EAAY,OAAO,GAAoB,CAAA,GAEvC,kBAAC,GAAD;GACC,WAAW;GACN;GACA;GACL,UAAU,kBAAC,GAAD,EAAY,OAAO,GAAoB,CAAA;GACjD,wBAAwB,MAAS;AAEhC,IADA,EAAU,EAAK,EACf,IAAwB,EAAK;;GAE7B,CAAA;EAEE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type PictureAspectRatio, PictureMessage, type PictureMessageProps, } from "./PictureMessage.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRuntimeFn as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
//#region src/components/PillButton/PillButton.css.ts
|
|
4
|
+
var t = e({
|
|
5
|
+
defaultClassName: "rygqx10",
|
|
6
|
+
variantClassNames: { size: {
|
|
7
|
+
md: "rygqx11",
|
|
8
|
+
sm: "rygqx12"
|
|
9
|
+
} },
|
|
10
|
+
defaultVariants: { size: "md" },
|
|
11
|
+
compoundVariants: []
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { t as pillButtonRoot };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=PillButton.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PillButton.css.js","names":[],"sources":["../../../src/components/PillButton/PillButton.css.ts"],"sourcesContent":["import { globalStyle } from \"@vanilla-extract/css\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport { t } from \"../../tokens/index.js\";\n\nexport const pillButtonRoot = recipe({\n\tbase: {\n\t\tposition: \"relative\",\n\t\tisolation: \"isolate\",\n\t\tdisplay: \"inline-flex\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\tgap: t(\"gap-8\"),\n\t\tpaddingInline: t(\"padding-12\"),\n\t\tboxSizing: \"border-box\",\n\t\tborder: `${t(\"border-width-default\")} solid ${t(\"color-border-default\")}`,\n\t\tborderRadius: t(\"border-radius-pill\"),\n\t\tbackgroundColor: t(\"color-background-default\"),\n\t\tcolor: t(\"pill-content-primary\"),\n\t\tfontFamily: t(\"font-family-body\"),\n\t\tfontWeight: t(\"font-weight-medium\"),\n\t\tfontSize: t(\"font-size-body\"),\n\t\tlineHeight: t(\"line-height-body\"),\n\t\twhiteSpace: \"nowrap\",\n\t\tcursor: \"pointer\",\n\t\tuserSelect: \"none\",\n\t\tappearance: \"none\",\n\t\ttextDecoration: \"none\",\n\t\toutline: \"none\",\n\t\ttransitionProperty: \"background-color, border-color\",\n\t\ttransitionDuration: t(\"duration-fast\"),\n\t\ttransitionTimingFunction: t(\"easing-standard\"),\n\t\t\"::after\": {\n\t\t\tcontent: '\"\"',\n\t\t\tposition: \"absolute\",\n\t\t\tinset: 0,\n\t\t\tborderRadius: \"inherit\",\n\t\t\tbackgroundColor: \"currentColor\",\n\t\t\topacity: 0,\n\t\t\tpointerEvents: \"none\",\n\t\t\tzIndex: -1,\n\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t},\n\t\tselectors: {\n\t\t\t\"&[data-hovered]:not([data-disabled])::after\": {\n\t\t\t\topacity: t(\"opacity-state-hover\"),\n\t\t\t},\n\t\t\t\"&[data-focus-visible]:not([data-disabled])::after\": {\n\t\t\t\topacity: t(\"opacity-state-focus\"),\n\t\t\t},\n\t\t\t\"&[data-pressed]:not([data-disabled])::after\": {\n\t\t\t\topacity: t(\"opacity-state-pressed\"),\n\t\t\t},\n\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\tborderColor: t(\"color-border-accent\"),\n\t\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t\t},\n\t\t\t\"&[data-disabled]\": {\n\t\t\t\tcursor: \"not-allowed\",\n\t\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t\t},\n\t\t},\n\t\t\"@media\": {\n\t\t\t\"(forced-colors: active)\": {\n\t\t\t\tselectors: {\n\t\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\tvariants: {\n\t\t// Hardcoded heights are correct.\n\t\tsize: {\n\t\t\tmd: { height: \"40px\" },\n\t\t\tsm: { height: \"32px\" },\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tsize: \"md\",\n\t},\n});\n\n// Icon children render at the control icon size (not the body text size), so an\n// icon-only pill reads as an icon button rather than a tiny glyph. <Icon> is 1em,\n// so this drives its size; flex-shrink keeps it from collapsing next to text.\nglobalStyle(`[data-slot='pill-button'] [data-slot='icon']`, {\n\tflexShrink: 0,\n\tfontSize: t(\"icon-size-control\"),\n});\n"],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode, Ref } from "react";
|
|
2
|
+
import type { ButtonProps as AriaButtonProps } from "react-aria-components";
|
|
3
|
+
export type PillButtonSize = "md" | "sm";
|
|
4
|
+
export interface PillButtonProps extends Omit<AriaButtonProps, "children" | "className" | "style"> {
|
|
5
|
+
size?: PillButtonSize;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
ref?: Ref<HTMLButtonElement>;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Fully-rounded action button with a single accent-on-surface style. Unlike
|
|
13
|
+
* `Button`, it has no intent/destructive variants. Accepts text and/or an
|
|
14
|
+
* `<Icon>` child; an icon-only pill needs an `aria-label`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function PillButton({ size, className, children, ...rest }: PillButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cx as e } from "../../utils/cx.js";
|
|
2
|
+
import { pillButtonRoot as t } from "./PillButton.css.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { Button as r } from "react-aria-components";
|
|
5
|
+
//#region src/components/PillButton/PillButton.tsx
|
|
6
|
+
function i({ size: i = "md", className: a, children: o, ...s }) {
|
|
7
|
+
return /* @__PURE__ */ n(r, {
|
|
8
|
+
...s,
|
|
9
|
+
"data-slot": "pill-button",
|
|
10
|
+
"data-size": i,
|
|
11
|
+
className: e(t({ size: i }), a),
|
|
12
|
+
children: o
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { i as PillButton };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=PillButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PillButton.js","names":[],"sources":["../../../src/components/PillButton/PillButton.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { ButtonProps as AriaButtonProps } from \"react-aria-components\";\nimport { Button as AriaButton } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { pillButtonRoot } from \"./PillButton.css.js\";\n\nexport type PillButtonSize = \"md\" | \"sm\";\n\nexport interface PillButtonProps\n\textends Omit<AriaButtonProps, \"children\" | \"className\" | \"style\"> {\n\tsize?: PillButtonSize;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLButtonElement>;\n\tchildren?: ReactNode;\n}\n\n/**\n * Fully-rounded action button with a single accent-on-surface style. Unlike\n * `Button`, it has no intent/destructive variants. Accepts text and/or an\n * `<Icon>` child; an icon-only pill needs an `aria-label`.\n */\nexport function PillButton({\n\tsize = \"md\",\n\tclassName,\n\tchildren,\n\t...rest\n}: PillButtonProps) {\n\treturn (\n\t\t<AriaButton\n\t\t\t{...rest}\n\t\t\tdata-slot=\"pill-button\"\n\t\t\tdata-size={size}\n\t\t\tclassName={cx(pillButtonRoot({ size }), className)}\n\t\t>\n\t\t\t{children}\n\t\t</AriaButton>\n\t);\n}\n"],"mappings":";;;;;AAsBA,SAAgB,EAAW,EAC1B,UAAO,MACP,cACA,aACA,GAAG,KACgB;AACnB,QACC,kBAAC,GAAD;EACC,GAAI;EACJ,aAAU;EACV,aAAW;EACX,WAAW,EAAG,EAAe,EAAE,SAAM,CAAC,EAAE,EAAU;EAEjD;EACW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const proactiveMessageRoot: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProactiveMessage.css.js","names":[],"sources":["../../../src/components/ProactiveMessage/ProactiveMessage.css.ts"],"sourcesContent":["import { style } from \"@vanilla-extract/css\";\nimport { t } from \"../../tokens/index.js\";\n\n// Elevation shadow — no `elevation-*` token tier yet (contract rule 2). Dark\n// mode keeps the same geometry and opacity but a white tint, since a black\n// shadow is invisible on the dark canvas.\nconst SHADOW_LIGHT = \"0 8px 24px rgba(0, 0, 0, 0.08)\";\nconst SHADOW_DARK = \"0 8px 24px rgba(255, 255, 255, 0.08)\";\n\n// Content-hugging, non-interactive message bubble — no variant/size axes, so a\n// plain `style()` rather than a `recipe()`.\nexport const proactiveMessageRoot = style({\n\tboxSizing: \"border-box\",\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\talignItems: \"flex-start\",\n\t// Center content against the 48px minimum so short messages keep the pill\n\t// height (matches the Figma bubble's `justify-center`).\n\tjustifyContent: \"center\",\n\t// Hug the content; the surrounding layout constrains the max width to the\n\t// chat column, keeping this bubble in lockstep with the agent/user message\n\t// bubbles rather than baking a column-width literal into this one component.\n\twidth: \"fit-content\",\n\t// Figma pins the bubble to a 48px floor; no control-size token tier exists\n\t// yet (cf. AgentMessage's 24px literal).\n\tminHeight: \"48px\",\n\tpaddingBlock: t(\"padding-8\"),\n\tpaddingInline: t(\"padding-16\"),\n\tborderRadius: t(\"border-radius-message\"),\n\tbackgroundColor: t(\"color-background-default\"),\n\tborder: `${t(\"border-width-default\")} solid ${t(\"color-border-default\")}`,\n\tboxShadow: SHADOW_LIGHT,\n\tcolor: t(\"color-content-default\"),\n\tfontFamily: t(\"font-family-body\"),\n\tfontWeight: t(\"font-weight-regular\"),\n\tfontSize: t(\"font-size-body\"),\n\tlineHeight: t(\"line-height-body\"),\n\t// `start` follows the content's resolved direction (see `dir=\"auto\"` on the\n\t// element), keeping mixed-direction messages aligned to their own edge.\n\ttextAlign: \"start\",\n\t// `anywhere` (not `break-word`) so a single long unbroken token — e.g. a raw\n\t// URL in body text — breaks mid-string instead of overflowing the column.\n\toverflowWrap: \"anywhere\",\n\tselectors: {\n\t\t'[data-theme=\"dark\"] &': { boxShadow: SHADOW_DARK },\n\t},\n});\n"],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode, Ref } from "react";
|
|
2
|
+
export interface ProactiveMessageProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
ref?: Ref<HTMLDivElement>;
|
|
6
|
+
/** Message content — body text, or an inline link/element. */
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A proactive (campaign) message bubble: a rounded, elevated surface holding a
|
|
11
|
+
* short outbound message. The content is whatever you pass as `children` — body
|
|
12
|
+
* text (the Figma "Message" variant) or an inline link (the "Link" variant).
|
|
13
|
+
* Direction is detected from the content so the bubble mirrors under RTL.
|
|
14
|
+
*
|
|
15
|
+
* Picture and grouped campaigns are compositions, not props: render
|
|
16
|
+
* `PictureMessage` for a picture, and stack these bubbles beside a dismiss
|
|
17
|
+
* `IconButton` for a group.
|
|
18
|
+
*/
|
|
19
|
+
export declare function ProactiveMessage({ className, children, ...rest }: ProactiveMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { cx as e } from "../../utils/cx.js";
|
|
2
|
+
import { proactiveMessageRoot as t } from "./ProactiveMessage.css.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ProactiveMessage/ProactiveMessage.tsx
|
|
5
|
+
function r({ className: r, children: i, ...a }) {
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
...a,
|
|
8
|
+
dir: "auto",
|
|
9
|
+
className: e(t, r),
|
|
10
|
+
children: i
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { r as ProactiveMessage };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=ProactiveMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProactiveMessage.js","names":[],"sources":["../../../src/components/ProactiveMessage/ProactiveMessage.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { proactiveMessageRoot } from \"./ProactiveMessage.css.js\";\n\nexport interface ProactiveMessageProps {\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n\t/** Message content — body text, or an inline link/element. */\n\tchildren?: ReactNode;\n}\n\n/**\n * A proactive (campaign) message bubble: a rounded, elevated surface holding a\n * short outbound message. The content is whatever you pass as `children` — body\n * text (the Figma \"Message\" variant) or an inline link (the \"Link\" variant).\n * Direction is detected from the content so the bubble mirrors under RTL.\n *\n * Picture and grouped campaigns are compositions, not props: render\n * `PictureMessage` for a picture, and stack these bubbles beside a dismiss\n * `IconButton` for a group.\n */\nexport function ProactiveMessage({\n\tclassName,\n\tchildren,\n\t...rest\n}: ProactiveMessageProps) {\n\treturn (\n\t\t<div {...rest} dir=\"auto\" className={cx(proactiveMessageRoot, className)}>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;AAsBA,SAAgB,EAAiB,EAChC,cACA,aACA,GAAG,KACsB;AACzB,QACC,kBAAC,OAAD;EAAK,GAAI;EAAM,KAAI;EAAO,WAAW,EAAG,GAAsB,EAAU;EACtE;EACI,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
//#region src/components/Radio/Radio.css.ts
|
|
3
|
+
var e = "mufew30", t = "mufew31", n = "mufew32", r = "mufew33", i = "mufew34";
|
|
4
|
+
//#endregion
|
|
5
|
+
export { n as radioControl, e as radioGroup, r as radioIndicator, i as radioLabel, t as radioRoot };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=Radio.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.css.js","names":[],"sources":["../../../src/components/Radio/Radio.css.ts"],"sourcesContent":["import { style } from \"@vanilla-extract/css\";\nimport { t } from \"../../tokens/index.js\";\n\n// Figma's `button-size/xs` (24px) has no LovelaceToken; the checked indicator's\n// inset is likewise fixed visual detail Figma renders as a flattened raster with\n// no token (5px inset inside the 1px border → 12px center dot). Both are\n// hardcoded like a fixed frame size.\nconst CONTROL_SIZE = \"24px\";\nconst INDICATOR_INSET = \"5px\";\n\nexport const radioGroup = style({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tgap: t(\"gap-20\"),\n\tselectors: {\n\t\t'&[data-orientation=\"horizontal\"]': {\n\t\t\tflexDirection: \"row\",\n\t\t},\n\t},\n});\n\nexport const radioRoot = style({\n\tdisplay: \"inline-flex\",\n\talignItems: \"center\",\n\tgap: t(\"gap-12\"),\n\tcursor: \"pointer\",\n\tuserSelect: \"none\",\n\tselectors: {\n\t\t\"&[data-disabled]\": {\n\t\t\tcursor: \"not-allowed\",\n\t\t},\n\t},\n});\n\nexport const radioControl = style({\n\tposition: \"relative\",\n\tboxSizing: \"border-box\",\n\tflexShrink: 0,\n\twidth: CONTROL_SIZE,\n\theight: CONTROL_SIZE,\n\tborderRadius: t(\"border-radius-full\"),\n\tborderStyle: \"solid\",\n\tborderWidth: t(\"border-width-default\"),\n\ttransition:\n\t\t\"background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease\",\n\tselectors: {\n\t\t// Unchecked — default resting state.\n\t\t[`${radioRoot}:not([data-selected]) &`]: {\n\t\t\tbackgroundColor: t(\"color-background-default\"),\n\t\t\tborderColor: t(\"color-border-default\"),\n\t\t},\n\t\t// Unchecked — hover darkens the border only (no fill).\n\t\t[`${radioRoot}[data-hovered]:not([data-selected]):not([data-disabled]) &`]:\n\t\t\t{\n\t\t\t\tborderColor: t(\"color-border-medium\"),\n\t\t\t},\n\t\t// Checked — solid inverse disc; the white ring is drawn by radioIndicator.\n\t\t[`${radioRoot}[data-selected] &`]: {\n\t\t\tbackgroundColor: t(\"color-background-inverse\"),\n\t\t\tborderColor: t(\"color-background-inverse\"),\n\t\t},\n\t\t// Focus — outer 2px focus ring for both states (matches Chip's double ring).\n\t\t[`${radioRoot}[data-focus-visible]:not([data-disabled]) &`]: {\n\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t},\n\t\t// Focus (unchecked) — inner accent border completes the double ring.\n\t\t[`${radioRoot}[data-focus-visible]:not([data-selected]):not([data-disabled]) &`]:\n\t\t\t{\n\t\t\t\tborderColor: t(\"color-border-accent\"),\n\t\t\t},\n\t\t// Disabled — unchecked.\n\t\t[`${radioRoot}[data-disabled]:not([data-selected]) &`]: {\n\t\t\tbackgroundColor: t(\"color-background-tertiary\"),\n\t\t\tborderColor: t(\"color-border-default\"),\n\t\t},\n\t\t// Disabled — checked disc fades to the disabled background.\n\t\t[`${radioRoot}[data-disabled][data-selected] &`]: {\n\t\t\tbackgroundColor: t(\"color-background-disabled\"),\n\t\t\tborderColor: t(\"color-background-disabled\"),\n\t\t},\n\t},\n\t\"@media\": {\n\t\t\"(forced-colors: active)\": {\n\t\t\tselectors: {\n\t\t\t\t[`${radioRoot}[data-focus-visible]:not([data-disabled]) &`]: {\n\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n});\n\n// Solid center dot on the checked disc (dark disc → filled light center circle).\n// Hidden (transparent) until the option is selected.\nexport const radioIndicator = style({\n\tposition: \"absolute\",\n\tinset: INDICATOR_INSET,\n\tborderRadius: t(\"border-radius-full\"),\n\tbackgroundColor: \"transparent\",\n\tpointerEvents: \"none\",\n\tselectors: {\n\t\t[`${radioRoot}[data-selected] &`]: {\n\t\t\tbackgroundColor: t(\"color-background-default\"),\n\t\t},\n\t\t[`${radioRoot}[data-selected][data-disabled] &`]: {\n\t\t\tbackgroundColor: t(\"color-background-tertiary\"),\n\t\t},\n\t},\n\t\"@media\": {\n\t\t// Author background-colors collapse to Canvas in forced-colors mode, so the\n\t\t// disc/dot contrast is lost — redraw the dot with a system color instead.\n\t\t\"(forced-colors: active)\": {\n\t\t\tselectors: {\n\t\t\t\t[`${radioRoot}[data-selected] &`]: {\n\t\t\t\t\tbackgroundColor: \"CanvasText\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport const radioLabel = style({\n\tfontFamily: t(\"font-family-body\"),\n\tfontSize: t(\"font-size-body\"),\n\tfontWeight: t(\"font-weight-regular\"),\n\tlineHeight: t(\"line-height-body\"),\n\tcolor: t(\"color-content-default\"),\n\tselectors: {\n\t\t[`${radioRoot}[data-disabled] &`]: {\n\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t},\n\t},\n});\n"],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode, Ref } from "react";
|
|
2
|
+
import type { RadioProps as AriaRadioProps } from "react-aria-components";
|
|
3
|
+
export interface RadioProps extends Omit<AriaRadioProps, "className" | "style" | "children"> {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
ref?: Ref<HTMLLabelElement>;
|
|
7
|
+
/** Label shown beside the control. Omit only when the option is labelled externally. */
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A single option within a `RadioGroup`. The visual circle is drawn here; the
|
|
12
|
+
* checked/hover/focus/disabled states are driven by the data-attributes React
|
|
13
|
+
* Aria sets on the label, so this component takes no state props of its own.
|
|
14
|
+
*/
|
|
15
|
+
export declare function Radio({ className, children, ...rest }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cx as e } from "../../utils/cx.js";
|
|
2
|
+
import { radioControl as t, radioIndicator as n, radioRoot as r } from "./Radio.css.js";
|
|
3
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
+
import { Radio as o } from "react-aria-components";
|
|
5
|
+
//#region src/components/Radio/Radio.tsx
|
|
6
|
+
function s({ className: s, children: c, ...l }) {
|
|
7
|
+
return /* @__PURE__ */ a(o, {
|
|
8
|
+
...l,
|
|
9
|
+
className: e(r, s),
|
|
10
|
+
children: [/* @__PURE__ */ i("span", {
|
|
11
|
+
className: t,
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
children: /* @__PURE__ */ i("span", { className: n })
|
|
14
|
+
}), c != null && /* @__PURE__ */ i("span", {
|
|
15
|
+
className: "mufew34",
|
|
16
|
+
children: c
|
|
17
|
+
})]
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { s as Radio };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=Radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.js","names":[],"sources":["../../../src/components/Radio/Radio.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { RadioProps as AriaRadioProps } from \"react-aria-components\";\nimport { Radio as AriaRadio } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport {\n\tradioControl,\n\tradioIndicator,\n\tradioLabel,\n\tradioRoot,\n} from \"./Radio.css.js\";\n\nexport interface RadioProps\n\textends Omit<AriaRadioProps, \"className\" | \"style\" | \"children\"> {\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLLabelElement>;\n\t/** Label shown beside the control. Omit only when the option is labelled externally. */\n\tchildren?: ReactNode;\n}\n\n/**\n * A single option within a `RadioGroup`. The visual circle is drawn here; the\n * checked/hover/focus/disabled states are driven by the data-attributes React\n * Aria sets on the label, so this component takes no state props of its own.\n */\nexport function Radio({ className, children, ...rest }: RadioProps) {\n\treturn (\n\t\t<AriaRadio {...rest} className={cx(radioRoot, className)}>\n\t\t\t<span className={radioControl} aria-hidden=\"true\">\n\t\t\t\t<span className={radioIndicator} />\n\t\t\t</span>\n\t\t\t{children != null && <span className={radioLabel}>{children}</span>}\n\t\t</AriaRadio>\n\t);\n}\n"],"mappings":";;;;;AAyBA,SAAgB,EAAM,EAAE,cAAW,aAAU,GAAG,KAAoB;AACnE,QACC,kBAAC,GAAD;EAAW,GAAI;EAAM,WAAW,EAAG,GAAW,EAAU;YAAxD,CACC,kBAAC,QAAD;GAAM,WAAW;GAAc,eAAY;aAC1C,kBAAC,QAAD,EAAM,WAAW,GAAkB,CAAA;GAC7B,CAAA,EACN,KAAY,QAAQ,kBAAC,QAAD;GAAM,WAAA;GAAwB;GAAgB,CAAA,CACxD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode, Ref } from "react";
|
|
2
|
+
import type { RadioGroupProps as AriaRadioGroupProps } from "react-aria-components";
|
|
3
|
+
export interface RadioGroupProps extends Omit<AriaRadioGroupProps, "className" | "style" | "children"> {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
ref?: Ref<HTMLDivElement>;
|
|
7
|
+
/** The `Radio` options for this group. */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Single-select group: exactly one child `Radio` may be selected at a time.
|
|
12
|
+
* Owns the selected value (`value`/`onChange`), keyboard navigation, and the
|
|
13
|
+
* group's accessible name — supply `aria-label` or `aria-labelledby`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function RadioGroup({ className, children, ...rest }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
|