opui-css 5.4.2 → 6.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +648 -0
- package/MIGRATING-legacy.md +159 -0
- package/MIGRATING.md +1293 -69
- package/README.md +177 -26
- package/astro/index.ts +142 -13
- package/bin/opui-css.mjs +68 -0
- package/components/Accordion/Accordion.astro +6 -33
- package/components/Accordion/Accordion.react.tsx +23 -0
- package/components/Accordion/Accordion.svelte +27 -0
- package/components/Accordion/Accordion.vue +11 -28
- package/components/Accordion/AccordionActions.astro +16 -0
- package/components/Accordion/AccordionActions.react.tsx +15 -0
- package/components/Accordion/AccordionActions.svelte +23 -0
- package/components/Accordion/AccordionActions.vue +18 -0
- package/components/Accordion/AccordionContent.astro +9 -0
- package/components/Accordion/AccordionContent.react.tsx +6 -0
- package/components/Accordion/AccordionContent.svelte +15 -0
- package/components/Accordion/AccordionContent.vue +12 -0
- package/components/Accordion/AccordionSummary.astro +19 -0
- package/components/Accordion/AccordionSummary.react.tsx +30 -0
- package/components/Accordion/AccordionSummary.svelte +24 -0
- package/components/Accordion/AccordionSummary.vue +27 -0
- package/components/Accordion/icons.ts +2 -0
- package/components/Accordion/types.astro.ts +9 -0
- package/components/Accordion/types.react.ts +14 -0
- package/components/Accordion/types.svelte.ts +10 -2
- package/components/Accordion/types.ts +11 -5
- package/components/Accordion/types.vue-props.ts +22 -0
- package/components/Anchor/Anchor.astro +21 -33
- package/components/Anchor/Anchor.react.tsx +38 -0
- package/components/Anchor/Anchor.svelte +47 -0
- package/components/Anchor/Anchor.vue +32 -30
- package/components/Anchor/AnchorContent.astro +17 -0
- package/components/Anchor/AnchorContent.react.tsx +18 -0
- package/components/Anchor/AnchorContent.svelte +23 -0
- package/components/Anchor/AnchorContent.vue +20 -0
- package/components/Anchor/context.astro.ts +4 -0
- package/components/Anchor/context.react.ts +8 -0
- package/components/Anchor/context.svelte.ts +7 -0
- package/components/Anchor/context.vue.ts +4 -0
- package/components/Anchor/root.ts +12 -0
- package/components/Anchor/types.astro.ts +3 -0
- package/components/Anchor/types.react.ts +7 -0
- package/components/Anchor/types.svelte.ts +3 -3
- package/components/Anchor/types.ts +15 -6
- package/components/Anchor/types.vue-props.ts +15 -0
- package/components/Avatar/Avatar.astro +12 -8
- package/components/Avatar/Avatar.react.tsx +34 -0
- package/components/Avatar/Avatar.svelte +39 -0
- package/components/Avatar/Avatar.vue +10 -8
- package/components/Avatar/AvatarGroup.astro +9 -0
- package/components/Avatar/AvatarGroup.react.tsx +12 -0
- package/components/Avatar/AvatarGroup.svelte +15 -0
- package/components/Avatar/AvatarGroup.vue +12 -0
- package/components/Avatar/types.astro.ts +3 -2
- package/components/Avatar/types.react.ts +11 -0
- package/components/Avatar/types.svelte.ts +3 -4
- package/components/Avatar/types.ts +18 -15
- package/components/Avatar/types.vue-props.ts +11 -0
- package/components/Badge/Badge.astro +27 -22
- package/components/Badge/Badge.react.tsx +50 -0
- package/components/Badge/Badge.svelte +48 -0
- package/components/Badge/Badge.vue +15 -19
- package/components/Badge/types.react.ts +6 -0
- package/components/Badge/types.svelte.ts +4 -1
- package/components/Badge/types.ts +3 -3
- package/components/Badge/types.vue-props.ts +7 -0
- package/components/Button/Button.astro +12 -12
- package/components/Button/Button.react.tsx +33 -0
- package/components/Button/Button.svelte +37 -0
- package/components/Button/Button.vue +9 -9
- package/components/Button/types.astro.ts +2 -2
- package/components/Button/types.react.ts +11 -0
- package/components/Button/types.svelte.ts +11 -2
- package/components/Button/types.ts +20 -4
- package/components/Button/types.vue-props.ts +6 -0
- package/components/ButtonGroup/ButtonGroup.astro +7 -3
- package/components/ButtonGroup/ButtonGroup.react.tsx +30 -0
- package/components/ButtonGroup/ButtonGroup.svelte +34 -0
- package/components/ButtonGroup/ButtonGroup.vue +10 -7
- package/components/ButtonGroup/types.react.ts +4 -0
- package/components/ButtonGroup/types.ts +4 -4
- package/components/ButtonGroup/types.vue-props.ts +6 -0
- package/components/Callout/Callout.astro +7 -59
- package/components/Callout/Callout.react.tsx +26 -0
- package/components/Callout/Callout.svelte +32 -0
- package/components/Callout/Callout.vue +8 -48
- package/components/Callout/CalloutContent.astro +9 -0
- package/components/Callout/CalloutContent.react.tsx +6 -0
- package/components/Callout/CalloutContent.svelte +15 -0
- package/components/Callout/CalloutContent.vue +12 -0
- package/components/Callout/CalloutIcon.astro +25 -0
- package/components/Callout/CalloutIcon.react.tsx +26 -0
- package/components/Callout/CalloutIcon.svelte +24 -0
- package/components/Callout/CalloutIcon.vue +25 -0
- package/components/Callout/context.astro.ts +4 -0
- package/components/Callout/context.react.ts +8 -0
- package/components/Callout/context.svelte.ts +7 -0
- package/components/Callout/context.vue.ts +4 -0
- package/components/Callout/icons.ts +23 -0
- package/components/Callout/types.astro.ts +5 -0
- package/components/Callout/types.react.ts +9 -0
- package/components/Callout/types.svelte.ts +5 -3
- package/components/Callout/types.ts +5 -5
- package/components/Callout/types.vue-props.ts +14 -0
- package/components/Card/Card.astro +9 -25
- package/components/Card/Card.react.tsx +15 -0
- package/components/Card/Card.svelte +23 -0
- package/components/Card/Card.vue +10 -20
- package/components/Card/CardActions.astro +16 -0
- package/components/Card/CardActions.react.tsx +15 -0
- package/components/Card/CardActions.svelte +23 -0
- package/components/Card/CardActions.vue +18 -0
- package/components/Card/CardContent.astro +9 -0
- package/components/Card/CardContent.react.tsx +6 -0
- package/components/Card/CardContent.svelte +15 -0
- package/components/Card/CardContent.vue +12 -0
- package/components/Card/CardHeader.astro +9 -0
- package/components/Card/CardHeader.react.tsx +6 -0
- package/components/Card/CardHeader.svelte +15 -0
- package/components/Card/CardHeader.vue +12 -0
- package/components/Card/types.astro.ts +6 -0
- package/components/Card/types.react.ts +10 -0
- package/components/Card/types.svelte.ts +7 -3
- package/components/Card/types.ts +7 -7
- package/components/Card/types.vue-props.ts +17 -0
- package/components/Carousel/Carousel.astro +44 -0
- package/components/Carousel/Carousel.react.tsx +47 -0
- package/components/Carousel/Carousel.svelte +45 -0
- package/components/Carousel/Carousel.vue +44 -0
- package/components/Carousel/types.astro.ts +4 -0
- package/components/Carousel/types.react.ts +4 -0
- package/components/Carousel/types.svelte.ts +4 -0
- package/components/Carousel/types.ts +11 -0
- package/components/Carousel/types.vue-props.ts +6 -0
- package/components/Checkbox/Checkbox.astro +27 -15
- package/components/Checkbox/Checkbox.react.tsx +51 -0
- package/components/Checkbox/Checkbox.svelte +61 -0
- package/components/Checkbox/Checkbox.vue +39 -18
- package/components/Checkbox/CheckboxInput.astro +6 -2
- package/components/Checkbox/CheckboxInput.react.tsx +39 -0
- package/components/Checkbox/CheckboxInput.svelte +34 -0
- package/components/Checkbox/CheckboxInput.vue +29 -11
- package/components/Checkbox/types.astro.ts +2 -3
- package/components/Checkbox/types.react.ts +11 -0
- package/components/Checkbox/types.svelte.ts +8 -4
- package/components/Checkbox/types.ts +8 -4
- package/components/Checkbox/types.vue-props.ts +15 -0
- package/components/Chip/Chip.astro +22 -6
- package/components/Chip/Chip.react.tsx +45 -0
- package/components/Chip/Chip.svelte +45 -0
- package/components/Chip/Chip.vue +16 -9
- package/components/Chip/types.astro.ts +1 -1
- package/components/Chip/types.react.ts +15 -0
- package/components/Chip/types.svelte.ts +6 -4
- package/components/Chip/types.ts +22 -5
- package/components/Chip/types.vue-props.ts +11 -0
- package/components/DescriptionList/DescriptionList.astro +6 -2
- package/components/DescriptionList/DescriptionList.react.tsx +25 -0
- package/components/DescriptionList/DescriptionList.svelte +29 -0
- package/components/DescriptionList/DescriptionList.vue +7 -8
- package/components/DescriptionList/DescriptionListDescription.astro +9 -0
- package/components/DescriptionList/DescriptionListDescription.react.tsx +9 -0
- package/components/DescriptionList/DescriptionListDescription.svelte +15 -0
- package/components/DescriptionList/DescriptionListDescription.vue +15 -0
- package/components/DescriptionList/DescriptionListItem.astro +9 -0
- package/components/DescriptionList/DescriptionListItem.react.tsx +6 -0
- package/components/DescriptionList/DescriptionListItem.svelte +15 -0
- package/components/DescriptionList/{Item.vue → DescriptionListItem.vue} +5 -2
- package/components/DescriptionList/DescriptionListTerm.astro +9 -0
- package/components/DescriptionList/DescriptionListTerm.react.tsx +6 -0
- package/components/DescriptionList/DescriptionListTerm.svelte +15 -0
- package/components/DescriptionList/{Term.vue → DescriptionListTerm.vue} +5 -2
- package/components/DescriptionList/types.astro.ts +3 -3
- package/components/DescriptionList/types.react.ts +10 -0
- package/components/DescriptionList/types.svelte.ts +6 -0
- package/components/DescriptionList/types.ts +3 -1
- package/components/DescriptionList/types.vue-props.ts +12 -0
- package/components/Dialog/Dialog.astro +12 -26
- package/components/Dialog/Dialog.react.tsx +23 -0
- package/components/Dialog/Dialog.svelte +33 -0
- package/components/Dialog/Dialog.vue +13 -23
- package/components/Dialog/DialogContent.astro +9 -0
- package/components/Dialog/DialogContent.react.tsx +6 -0
- package/components/Dialog/DialogContent.svelte +15 -0
- package/components/Dialog/DialogContent.vue +12 -0
- package/components/Dialog/DialogFooter.astro +16 -0
- package/components/Dialog/DialogFooter.react.tsx +15 -0
- package/components/Dialog/DialogFooter.svelte +23 -0
- package/components/Dialog/DialogFooter.vue +18 -0
- package/components/Dialog/DialogHeader.astro +9 -0
- package/components/Dialog/DialogHeader.react.tsx +6 -0
- package/components/Dialog/DialogHeader.svelte +15 -0
- package/components/Dialog/DialogHeader.vue +12 -0
- package/components/Dialog/DialogTitle.astro +14 -0
- package/components/Dialog/DialogTitle.react.tsx +13 -0
- package/components/Dialog/DialogTitle.svelte +23 -0
- package/components/Dialog/DialogTitle.vue +18 -0
- package/components/Dialog/context.astro.ts +4 -0
- package/components/Dialog/context.react.ts +8 -0
- package/components/Dialog/context.svelte.ts +7 -0
- package/components/Dialog/context.vue.ts +4 -0
- package/components/Dialog/types.astro.ts +8 -0
- package/components/Dialog/types.react.ts +12 -0
- package/components/Dialog/types.svelte.ts +11 -3
- package/components/Dialog/types.ts +13 -6
- package/components/Dialog/types.vue-props.ts +24 -0
- package/components/Divider/Divider.astro +29 -7
- package/components/Divider/Divider.react.tsx +36 -0
- package/components/Divider/Divider.svelte +40 -0
- package/components/Divider/Divider.vue +22 -4
- package/components/Divider/types.react.ts +4 -0
- package/components/Divider/types.ts +3 -1
- package/components/Divider/types.vue-props.ts +6 -0
- package/components/Drawer/Drawer.astro +13 -18
- package/components/Drawer/Drawer.react.tsx +40 -0
- package/components/Drawer/Drawer.svelte +50 -0
- package/components/Drawer/Drawer.vue +14 -19
- package/components/Drawer/DrawerContent.astro +9 -0
- package/components/Drawer/DrawerContent.react.tsx +6 -0
- package/components/Drawer/DrawerContent.svelte +15 -0
- package/components/Drawer/DrawerContent.vue +12 -0
- package/components/Drawer/DrawerFooter.astro +9 -4
- package/components/Drawer/DrawerFooter.react.tsx +15 -0
- package/components/Drawer/DrawerFooter.svelte +23 -0
- package/components/Drawer/DrawerFooter.vue +10 -8
- package/components/Drawer/DrawerHeader.astro +18 -10
- package/components/Drawer/DrawerHeader.react.tsx +41 -0
- package/components/Drawer/DrawerHeader.svelte +42 -0
- package/components/Drawer/DrawerHeader.vue +18 -19
- package/components/Drawer/DrawerTitle.astro +14 -0
- package/components/Drawer/DrawerTitle.react.tsx +13 -0
- package/components/Drawer/DrawerTitle.svelte +23 -0
- package/components/Drawer/DrawerTitle.vue +18 -0
- package/components/Drawer/context.astro.ts +4 -0
- package/components/Drawer/context.react.ts +8 -0
- package/components/Drawer/context.svelte.ts +7 -0
- package/components/Drawer/context.vue.ts +4 -0
- package/components/Drawer/icons.ts +2 -0
- package/components/Drawer/types.astro.ts +5 -1
- package/components/Drawer/types.react.ts +13 -0
- package/components/Drawer/types.svelte.ts +6 -5
- package/components/Drawer/types.ts +15 -10
- package/components/Drawer/types.vue-props.ts +24 -0
- package/components/FieldDescription/FieldDescription.astro +1 -1
- package/components/FieldDescription/FieldDescription.react.tsx +6 -0
- package/components/FieldDescription/FieldDescription.svelte +15 -0
- package/components/FieldDescription/FieldDescription.vue +3 -3
- package/components/FieldDescription/types.react.ts +4 -0
- package/components/FieldDescription/types.vue-props.ts +6 -0
- package/components/FieldGroup/FieldGroup.astro +15 -15
- package/components/FieldGroup/FieldGroup.react.tsx +27 -0
- package/components/FieldGroup/FieldGroup.svelte +32 -0
- package/components/FieldGroup/FieldGroup.vue +8 -10
- package/components/FieldGroup/context.astro.ts +4 -0
- package/components/FieldGroup/context.react.ts +8 -0
- package/components/FieldGroup/context.svelte.ts +8 -0
- package/components/FieldGroup/context.vue.ts +4 -0
- package/components/FieldGroup/types.react.ts +4 -0
- package/components/FieldGroup/types.ts +3 -1
- package/components/FieldGroup/types.vue-props.ts +6 -0
- package/components/FieldLegend/FieldLegend.react.tsx +14 -0
- package/components/FieldLegend/FieldLegend.svelte +20 -0
- package/components/FieldLegend/FieldLegend.vue +8 -6
- package/components/FieldLegend/types.react.ts +6 -0
- package/components/FieldLegend/types.svelte.ts +3 -3
- package/components/FieldLegend/types.vue-props.ts +9 -0
- package/components/{FieldSet/FieldSet.astro → Fieldset/Fieldset.astro} +6 -2
- package/components/Fieldset/Fieldset.react.tsx +15 -0
- package/components/Fieldset/Fieldset.svelte +21 -0
- package/components/Fieldset/Fieldset.vue +21 -0
- package/components/Fieldset/types.react.ts +6 -0
- package/components/Fieldset/types.svelte.ts +6 -0
- package/components/Fieldset/types.ts +1 -0
- package/components/Fieldset/types.vue-props.ts +9 -0
- package/components/Form/Form.react.tsx +9 -0
- package/components/Form/Form.svelte +16 -0
- package/components/Form/Form.vue +7 -5
- package/components/Form/types.react.ts +6 -0
- package/components/Form/types.svelte.ts +3 -4
- package/components/Form/types.vue-props.ts +9 -0
- package/components/List/List.astro +3 -3
- package/components/List/List.react.tsx +27 -0
- package/components/List/List.svelte +31 -0
- package/components/List/List.vue +4 -9
- package/components/List/types.react.ts +4 -0
- package/components/List/types.ts +2 -3
- package/components/List/types.vue-props.ts +6 -0
- package/components/ListItem/ListItem.astro +46 -39
- package/components/ListItem/ListItem.react.tsx +65 -0
- package/components/ListItem/ListItem.svelte +80 -0
- package/components/ListItem/ListItem.vue +41 -46
- package/components/ListItem/types.astro.ts +2 -3
- package/components/ListItem/types.react.ts +17 -0
- package/components/ListItem/types.svelte.ts +7 -4
- package/components/ListItem/types.ts +14 -11
- package/components/ListItem/types.vue-props.ts +14 -0
- package/components/Menu/Menu.astro +86 -0
- package/components/Menu/Menu.react.tsx +87 -0
- package/components/Menu/Menu.svelte +71 -0
- package/components/Menu/Menu.vue +76 -0
- package/components/Menu/context.astro.ts +4 -0
- package/components/Menu/context.react.ts +8 -0
- package/components/Menu/context.svelte.ts +7 -0
- package/components/Menu/context.vue.ts +4 -0
- package/components/Menu/types.astro.ts +12 -0
- package/components/Menu/types.react.ts +12 -0
- package/components/Menu/types.svelte.ts +12 -0
- package/components/Menu/types.ts +23 -0
- package/components/Menu/types.vue-props.ts +16 -0
- package/components/Progress/Progress.astro +10 -21
- package/components/Progress/Progress.react.tsx +27 -0
- package/components/Progress/Progress.svelte +30 -0
- package/components/Progress/Progress.vue +17 -21
- package/components/Progress/types.astro.ts +2 -1
- package/components/Progress/types.react.ts +5 -0
- package/components/Progress/types.svelte.ts +2 -1
- package/components/Progress/types.ts +1 -6
- package/components/Progress/types.vue-props.ts +6 -0
- package/components/Radio/Radio.astro +29 -15
- package/components/Radio/Radio.react.tsx +51 -0
- package/components/Radio/Radio.svelte +59 -0
- package/components/Radio/Radio.vue +37 -16
- package/components/Radio/RadioInput.astro +5 -2
- package/components/Radio/RadioInput.react.tsx +10 -0
- package/components/Radio/RadioInput.svelte +27 -0
- package/components/Radio/RadioInput.vue +28 -3
- package/components/Radio/types.astro.ts +2 -1
- package/components/Radio/types.react.ts +11 -0
- package/components/Radio/types.svelte.ts +9 -5
- package/components/Radio/types.ts +9 -4
- package/components/Radio/types.vue-props.ts +15 -0
- package/components/Range/Range.astro +49 -38
- package/components/Range/Range.react.tsx +157 -0
- package/components/Range/Range.svelte +136 -0
- package/components/Range/Range.vue +116 -32
- package/components/Range/types.astro.ts +1 -3
- package/components/Range/types.react.ts +10 -0
- package/components/Range/types.svelte.ts +8 -3
- package/components/Range/types.ts +13 -14
- package/components/Range/types.vue-props.ts +16 -0
- package/components/Range/value.ts +27 -0
- package/components/Select/Select.astro +70 -31
- package/components/Select/Select.react.tsx +124 -0
- package/components/Select/Select.svelte +123 -0
- package/components/Select/Select.vue +108 -36
- package/components/Select/selection.ts +11 -0
- package/components/Select/types.react.ts +6 -0
- package/components/Select/types.svelte.ts +1 -1
- package/components/Select/types.ts +16 -13
- package/components/Select/types.vue-props.ts +20 -0
- package/components/Switch/Switch.astro +22 -26
- package/components/Switch/Switch.react.tsx +63 -0
- package/components/Switch/Switch.svelte +73 -0
- package/components/Switch/Switch.vue +36 -18
- package/components/Switch/SwitchInput.astro +5 -2
- package/components/Switch/SwitchInput.react.tsx +12 -0
- package/components/Switch/SwitchInput.svelte +30 -0
- package/components/Switch/SwitchInput.vue +25 -3
- package/components/Switch/types.astro.ts +4 -2
- package/components/Switch/types.react.ts +11 -0
- package/components/Switch/types.svelte.ts +11 -4
- package/components/Switch/types.ts +9 -6
- package/components/Switch/types.vue-props.ts +17 -0
- package/components/Table/Table.astro +15 -2
- package/components/Table/Table.react.tsx +24 -0
- package/components/Table/Table.svelte +28 -0
- package/components/Table/Table.vue +9 -8
- package/components/Table/TableBody.astro +9 -0
- package/components/Table/TableBody.react.tsx +5 -0
- package/components/Table/TableBody.svelte +9 -0
- package/components/Table/TableBody.vue +12 -0
- package/components/Table/TableCaption.astro +9 -0
- package/components/Table/TableCaption.react.tsx +5 -0
- package/components/Table/TableCaption.svelte +9 -0
- package/components/Table/TableCaption.vue +12 -0
- package/components/Table/TableCell.astro +9 -0
- package/components/Table/TableCell.react.tsx +6 -0
- package/components/Table/TableCell.svelte +16 -0
- package/components/Table/TableCell.vue +12 -0
- package/components/Table/TableColumn.astro +8 -0
- package/components/Table/TableColumn.react.tsx +7 -0
- package/components/Table/TableColumn.svelte +8 -0
- package/components/Table/TableColumn.vue +12 -0
- package/components/Table/TableColumnGroup.astro +9 -0
- package/components/Table/TableColumnGroup.react.tsx +5 -0
- package/components/Table/TableColumnGroup.svelte +9 -0
- package/components/Table/TableColumnGroup.vue +12 -0
- package/components/Table/TableFoot.astro +9 -0
- package/components/Table/TableFoot.react.tsx +5 -0
- package/components/Table/TableFoot.svelte +9 -0
- package/components/Table/TableFoot.vue +12 -0
- package/components/Table/TableHead.astro +9 -0
- package/components/Table/TableHead.react.tsx +5 -0
- package/components/Table/TableHead.svelte +9 -0
- package/components/Table/TableHead.vue +12 -0
- package/components/Table/TableHeaderCell.astro +9 -0
- package/components/Table/TableHeaderCell.react.tsx +10 -0
- package/components/Table/TableHeaderCell.svelte +16 -0
- package/components/Table/TableHeaderCell.vue +12 -0
- package/components/Table/TableRow.astro +9 -0
- package/components/Table/TableRow.react.tsx +5 -0
- package/components/Table/TableRow.svelte +9 -0
- package/components/{DescriptionList/Description.vue → Table/TableRow.vue} +3 -3
- package/components/Table/types.astro.ts +17 -11
- package/components/Table/types.react.ts +22 -0
- package/components/Table/types.svelte.ts +19 -7
- package/components/Table/types.ts +8 -3
- package/components/Table/types.vue-props.ts +28 -0
- package/components/Tabs/Tabs.astro +23 -13
- package/components/Tabs/Tabs.react.tsx +43 -0
- package/components/Tabs/Tabs.svelte +43 -0
- package/components/Tabs/Tabs.vue +19 -9
- package/components/Tabs/TabsItem.astro +16 -28
- package/components/Tabs/TabsItem.react.tsx +47 -0
- package/components/Tabs/TabsItem.svelte +52 -0
- package/components/Tabs/TabsItem.vue +23 -21
- package/components/Tabs/TabsLabel.astro +16 -0
- package/components/Tabs/TabsLabel.react.tsx +17 -0
- package/components/Tabs/TabsLabel.svelte +19 -0
- package/components/Tabs/TabsLabel.vue +16 -0
- package/components/Tabs/TabsPanel.astro +2 -9
- package/components/Tabs/TabsPanel.react.tsx +6 -0
- package/components/Tabs/TabsPanel.svelte +15 -0
- package/components/Tabs/TabsPanel.vue +3 -22
- package/components/Tabs/context.astro.ts +4 -0
- package/components/Tabs/context.react.ts +8 -0
- package/components/Tabs/context.svelte.ts +7 -0
- package/components/Tabs/context.vue.ts +4 -0
- package/components/Tabs/types.astro.ts +5 -3
- package/components/Tabs/types.react.ts +12 -0
- package/components/Tabs/types.svelte.ts +6 -6
- package/components/Tabs/types.ts +10 -8
- package/components/Tabs/types.vue-props.ts +25 -0
- package/components/TextField/TextField.astro +36 -52
- package/components/TextField/TextField.react.tsx +70 -0
- package/components/TextField/TextField.svelte +84 -0
- package/components/TextField/TextField.vue +59 -39
- package/components/TextField/types.astro.ts +1 -3
- package/components/TextField/types.react.ts +12 -0
- package/components/TextField/types.svelte.ts +2 -4
- package/components/TextField/types.ts +11 -25
- package/components/TextField/types.vue-props.ts +21 -0
- package/components/Textarea/Textarea.astro +34 -48
- package/components/Textarea/Textarea.react.tsx +64 -0
- package/components/Textarea/Textarea.svelte +80 -0
- package/components/Textarea/Textarea.vue +55 -31
- package/components/Textarea/types.astro.ts +1 -3
- package/components/Textarea/types.react.ts +8 -0
- package/components/Textarea/types.svelte.ts +1 -9
- package/components/Textarea/types.ts +10 -22
- package/components/Textarea/types.vue-props.ts +20 -0
- package/components/ToggleButton/ToggleButton.astro +14 -14
- package/components/ToggleButton/ToggleButton.react.tsx +57 -0
- package/components/ToggleButton/ToggleButton.svelte +58 -0
- package/components/ToggleButton/ToggleButton.vue +41 -17
- package/components/ToggleButton/types.react.ts +4 -0
- package/components/ToggleButton/types.svelte.ts +0 -2
- package/components/ToggleButton/types.ts +2 -6
- package/components/ToggleButton/types.vue-props.ts +11 -0
- package/components/ToggleGroup/ToggleGroup.astro +16 -18
- package/components/ToggleGroup/ToggleGroup.react.tsx +54 -0
- package/components/ToggleGroup/ToggleGroup.svelte +54 -0
- package/components/ToggleGroup/ToggleGroup.vue +29 -20
- package/components/ToggleGroup/context.astro.ts +5 -0
- package/components/ToggleGroup/context.react.ts +8 -0
- package/components/ToggleGroup/context.svelte.ts +8 -0
- package/components/ToggleGroup/context.vue.ts +4 -0
- package/components/ToggleGroup/selection.ts +12 -0
- package/components/ToggleGroup/types.react.ts +12 -0
- package/components/ToggleGroup/types.svelte.ts +1 -4
- package/components/ToggleGroup/types.ts +11 -9
- package/components/ToggleGroup/types.vue-props.ts +6 -0
- package/components/Tooltip/Tooltip.astro +6 -7
- package/components/Tooltip/Tooltip.react.tsx +24 -0
- package/components/Tooltip/Tooltip.svelte +29 -0
- package/components/Tooltip/Tooltip.vue +7 -8
- package/components/Tooltip/types.react.ts +4 -0
- package/components/Tooltip/types.svelte.ts +1 -4
- package/components/Tooltip/types.ts +2 -8
- package/components/Tooltip/types.vue-props.ts +6 -0
- package/components/content.svelte +9 -0
- package/components/context.astro.ts +15 -0
- package/components/cx.ts +12 -0
- package/components/dev.ts +63 -0
- package/components/group.ts +2 -0
- package/components/id.ts +9 -0
- package/components/style.ts +33 -0
- package/components/tag.ts +6 -0
- package/components/vue.ts +18 -0
- package/core/normalize.css +56 -79
- package/core/palette.css +99 -282
- package/core/utils.css +31 -44
- package/css/compat/avatar.css +7 -0
- package/css/compat/menu.css +20 -0
- package/css/compat.css +3 -0
- package/css/components/accordion.css +123 -59
- package/css/components/anchor.css +21 -8
- package/css/components/avatar.css +57 -17
- package/css/components/badge.css +84 -45
- package/css/components/button-group.css +120 -129
- package/css/components/button.css +326 -116
- package/css/components/callout.css +88 -47
- package/css/components/card.css +181 -63
- package/css/components/carousel.css +399 -0
- package/css/components/checkbox.css +27 -148
- package/css/components/chip.css +175 -52
- package/css/components/choice.css +291 -0
- package/css/components/description-list.css +51 -41
- package/css/components/dialog.css +120 -30
- package/css/components/divider.css +62 -9
- package/css/components/drawer.css +181 -51
- package/css/components/form.css +51 -66
- package/css/components/layout.css +92 -0
- package/css/components/link.css +44 -12
- package/css/components/list.css +252 -135
- package/css/components/menu.css +174 -0
- package/css/components/progress.css +37 -29
- package/css/components/radio.css +32 -141
- package/css/components/range.css +244 -101
- package/css/components/select.css +84 -65
- package/css/components/spinner.css +31 -12
- package/css/components/switch.css +98 -171
- package/css/components/table.css +120 -79
- package/css/components/tabs.css +230 -36
- package/css/components/text-field.css +296 -186
- package/css/components/textarea.css +5 -11
- package/css/components/toggle-button.css +84 -44
- package/css/components/toggle-group.css +62 -32
- package/css/components/tooltip.css +87 -30
- package/css/components/typography.css +519 -298
- package/css/components.css +25 -18
- package/css/imports.css +2 -4
- package/css/js/checkbox.d.ts +3 -0
- package/css/js/checkbox.js +10 -0
- package/css/js/range.d.ts +1 -0
- package/css/js/range.js +44 -0
- package/css/layers.css +2 -0
- package/css/theme.css +729 -103
- package/dist/op.css +12 -237
- package/dist/op.css.map +1 -1
- package/dist/opui.baseline-2023.css +9209 -0
- package/dist/opui.baseline-2023.css.map +1 -0
- package/dist/opui.baseline-2024.css +9209 -0
- package/dist/opui.baseline-2024.css.map +1 -0
- package/dist/opui.baseline-2025.css +9209 -0
- package/dist/opui.baseline-2025.css.map +1 -0
- package/dist/opui.baseline-2026.css +9209 -0
- package/dist/opui.baseline-2026.css.map +1 -0
- package/dist/opui.components.css +5497 -3291
- package/dist/opui.components.css.map +1 -1
- package/dist/opui.css +6616 -4255
- package/dist/opui.css.map +1 -1
- package/dist/opui.no-compat.css +9182 -0
- package/dist/opui.no-compat.css.map +1 -0
- package/env.d.ts +10 -7
- package/open-props.css +10 -1
- package/package.json +63 -17
- package/react/elements.ts +13 -0
- package/react/index.ts +176 -0
- package/skills/opui/SKILL.md +75 -0
- package/skills/opui/references/accordion.md +253 -0
- package/skills/opui/references/anchor.md +213 -0
- package/skills/opui/references/avatar.md +202 -0
- package/skills/opui/references/badge.md +199 -0
- package/skills/opui/references/button-group.md +239 -0
- package/skills/opui/references/button.md +242 -0
- package/skills/opui/references/callout.md +221 -0
- package/skills/opui/references/card.md +222 -0
- package/skills/opui/references/carousel.md +269 -0
- package/skills/opui/references/checkbox.md +241 -0
- package/skills/opui/references/chip.md +135 -0
- package/skills/opui/references/customizing.md +85 -0
- package/skills/opui/references/description-list.md +191 -0
- package/skills/opui/references/dialog.md +301 -0
- package/skills/opui/references/divider.md +112 -0
- package/skills/opui/references/drawer.md +802 -0
- package/skills/opui/references/form.md +260 -0
- package/skills/opui/references/getting-started.md +398 -0
- package/skills/opui/references/index.md +89 -0
- package/skills/opui/references/layout.md +161 -0
- package/skills/opui/references/list.md +216 -0
- package/skills/opui/references/menu.md +248 -0
- package/skills/opui/references/progress.md +114 -0
- package/skills/opui/references/radio.md +234 -0
- package/skills/opui/references/range.md +150 -0
- package/skills/opui/references/select.md +255 -0
- package/skills/opui/references/spinner.md +85 -0
- package/skills/opui/references/switch.md +223 -0
- package/skills/opui/references/table.md +480 -0
- package/skills/opui/references/tabs.md +257 -0
- package/skills/opui/references/text-field.md +167 -0
- package/skills/opui/references/textarea.md +169 -0
- package/skills/opui/references/theming.md +278 -0
- package/skills/opui/references/toggle.md +222 -0
- package/skills/opui/references/tooltip.md +167 -0
- package/skills/opui/references/typography.md +159 -0
- package/svelte/elements.ts +7 -0
- package/svelte/index.ts +177 -0
- package/themes/bootstrap.css +223 -0
- package/themes/brutalist.css +105 -0
- package/themes/m3.css +152 -0
- package/themes/shadcn.css +125 -0
- package/tokens.json +3729 -0
- package/vue/index.ts +136 -15
- package/components/AGENTS.md +0 -247
- package/components/Accordion/types.d.vue.ts +0 -15
- package/components/Accordion/types.solid.ts +0 -6
- package/components/Anchor/types.d.vue.ts +0 -10
- package/components/Anchor/types.solid.ts +0 -6
- package/components/Avatar/types.d.vue.ts +0 -12
- package/components/Avatar/types.solid.ts +0 -11
- package/components/Badge/types.d.vue.ts +0 -10
- package/components/Badge/types.solid.ts +0 -4
- package/components/Button/types.d.vue.ts +0 -10
- package/components/Button/types.solid.ts +0 -8
- package/components/ButtonGroup/types.d.vue.ts +0 -10
- package/components/ButtonGroup/types.solid.ts +0 -4
- package/components/Callout/types.d.vue.ts +0 -10
- package/components/Callout/types.solid.ts +0 -6
- package/components/Card/types.d.vue.ts +0 -10
- package/components/Card/types.solid.ts +0 -6
- package/components/Checkbox/types.d.vue.ts +0 -11
- package/components/Checkbox/types.solid.ts +0 -9
- package/components/Chip/types.d.vue.ts +0 -10
- package/components/Chip/types.solid.ts +0 -10
- package/components/ClassicSelect/ClassicSelect.astro +0 -60
- package/components/ClassicSelect/ClassicSelect.vue +0 -54
- package/components/ClassicSelect/types.astro.ts +0 -8
- package/components/ClassicSelect/types.d.vue.ts +0 -10
- package/components/ClassicSelect/types.solid.ts +0 -5
- package/components/ClassicSelect/types.svelte.ts +0 -5
- package/components/ClassicSelect/types.ts +0 -15
- package/components/DescriptionList/Description.astro +0 -9
- package/components/DescriptionList/Item.astro +0 -9
- package/components/DescriptionList/Term.astro +0 -9
- package/components/DescriptionList/index.ts +0 -12
- package/components/DescriptionList/types.d.vue.ts +0 -10
- package/components/DescriptionList/types.solid.ts +0 -4
- package/components/Dialog/types.d.vue.ts +0 -10
- package/components/Dialog/types.solid.ts +0 -8
- package/components/Divider/types.d.vue.ts +0 -6
- package/components/Divider/types.solid.ts +0 -4
- package/components/Drawer/types.d.vue.ts +0 -31
- package/components/Drawer/types.solid.ts +0 -12
- package/components/FieldDescription/types.d.vue.ts +0 -10
- package/components/FieldDescription/types.solid.ts +0 -5
- package/components/FieldGroup/types.d.vue.ts +0 -12
- package/components/FieldGroup/types.solid.ts +0 -5
- package/components/FieldLegend/types.d.vue.ts +0 -11
- package/components/FieldLegend/types.solid.ts +0 -5
- package/components/FieldSet/FieldSet.vue +0 -18
- package/components/FieldSet/types.d.vue.ts +0 -11
- package/components/FieldSet/types.solid.ts +0 -5
- package/components/FieldSet/types.svelte.ts +0 -8
- package/components/FieldSet/types.ts +0 -5
- package/components/Form/types.d.vue.ts +0 -11
- package/components/Form/types.solid.ts +0 -5
- package/components/IconButton/IconButton.astro +0 -24
- package/components/IconButton/IconButton.vue +0 -24
- package/components/IconButton/types.astro.ts +0 -6
- package/components/IconButton/types.d.vue.ts +0 -10
- package/components/IconButton/types.solid.ts +0 -8
- package/components/IconButton/types.svelte.ts +0 -6
- package/components/IconButton/types.ts +0 -16
- package/components/List/types.d.vue.ts +0 -10
- package/components/List/types.solid.ts +0 -4
- package/components/ListItem/types.d.vue.ts +0 -10
- package/components/ListItem/types.solid.ts +0 -12
- package/components/Progress/types.d.vue.ts +0 -10
- package/components/Progress/types.solid.ts +0 -4
- package/components/Radio/types.d.vue.ts +0 -11
- package/components/Radio/types.solid.ts +0 -9
- package/components/Range/types.d.vue.ts +0 -14
- package/components/Range/types.solid.ts +0 -6
- package/components/Select/types.d.vue.ts +0 -17
- package/components/Select/types.solid.ts +0 -6
- package/components/Switch/types.d.vue.ts +0 -13
- package/components/Switch/types.solid.ts +0 -9
- package/components/Table/Body.astro +0 -11
- package/components/Table/Body.vue +0 -5
- package/components/Table/Cell.astro +0 -11
- package/components/Table/Cell.vue +0 -5
- package/components/Table/Column.astro +0 -12
- package/components/Table/Column.vue +0 -19
- package/components/Table/ColumnGroup.astro +0 -11
- package/components/Table/ColumnGroup.vue +0 -5
- package/components/Table/Head.astro +0 -11
- package/components/Table/Head.vue +0 -5
- package/components/Table/HeaderCell.astro +0 -11
- package/components/Table/HeaderCell.vue +0 -5
- package/components/Table/Row.astro +0 -11
- package/components/Table/Row.vue +0 -5
- package/components/Table/index.ts +0 -20
- package/components/Table/types.d.vue.ts +0 -10
- package/components/Table/types.solid.ts +0 -8
- package/components/Tabs/TabsTab.astro +0 -15
- package/components/Tabs/TabsTab.vue +0 -24
- package/components/Tabs/index.ts +0 -14
- package/components/Tabs/types.d.vue.ts +0 -31
- package/components/Tabs/types.solid.ts +0 -12
- package/components/TextField/types.d.vue.ts +0 -20
- package/components/TextField/types.solid.ts +0 -22
- package/components/Textarea/types.d.vue.ts +0 -19
- package/components/Textarea/types.solid.ts +0 -6
- package/components/Toast/Toast.astro +0 -42
- package/components/Toast/Toast.vue +0 -48
- package/components/ToggleButton/types.d.vue.ts +0 -10
- package/components/ToggleButton/types.solid.ts +0 -7
- package/components/ToggleGroup/types.d.vue.ts +0 -15
- package/components/ToggleGroup/types.solid.ts +0 -4
- package/components/Tooltip/types.d.vue.ts +0 -10
- package/components/Tooltip/types.solid.ts +0 -6
- package/css/components/icon-button.css +0 -139
- package/css/components/text-input.css +0 -68
- package/css/components/toast.css +0 -157
- package/css/js/toast.js +0 -94
- /package/components/{FieldSet → Fieldset}/types.astro.ts +0 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# Accordion
|
|
2
|
+
|
|
3
|
+
Lets you show and hide content, on its own or as a group.
|
|
4
|
+
|
|
5
|
+
- CSS: `opui-css/css/components/accordion.css` and `opui-css/css/components/card.css`.
|
|
6
|
+
- Full docs with every example: [HTML](https://open-props-ui.netlify.app/html/components/accordion.md), [Astro](https://open-props-ui.netlify.app/astro/components/accordion.md), [React](https://open-props-ui.netlify.app/react/components/accordion.md), [Svelte](https://open-props-ui.netlify.app/svelte/components/accordion.md), [Vue](https://open-props-ui.netlify.app/vue/components/accordion.md).
|
|
7
|
+
|
|
8
|
+
## Accordion
|
|
9
|
+
|
|
10
|
+
### Parts
|
|
11
|
+
|
|
12
|
+
- `details.ui-accordion` (root): Container element.
|
|
13
|
+
- `<summary>` (`AccordionSummary`): The always visible header.
|
|
14
|
+
- `<svg class="ui-marker">`: The marker. In Astro, React, Svelte and Vue, `AccordionSummary` renders a chevron by default. Only `.ui-marker` animates.
|
|
15
|
+
- `.ui-content` (`AccordionContent`): The collapsible content.
|
|
16
|
+
- `.ui-actions` (`AccordionActions`): A group of actions, such as buttons.
|
|
17
|
+
|
|
18
|
+
### Props and modifiers
|
|
19
|
+
|
|
20
|
+
- `markerAnimation`: `"flip"` (`.ui-marker-animation-flip`), `"rotate"` (default), `"turn"` (`.ui-marker-animation-turn`). How the marker animates when the accordion opens. `rotate` turns it upside down, `flip` mirrors it, and `turn` gives a chevron that points to the inline end a quarter turn, so it points down when open.
|
|
21
|
+
- `name`: `string`, `[name]`. Groups accordions so only one of them can be open at a time.
|
|
22
|
+
- `open`: `boolean`, `[open]`. Whether the accordion is open.
|
|
23
|
+
- `variant`: `"elevated"` (`.ui-elevated`), `"outlined"` (`.ui-outlined`), `"plain"` (default), `"tonal"` (`.ui-tonal`), `"transparent"` (`.ui-transparent`). The variant to use. The default `plain` accordion has the page surface and no border, like a Card. `transparent` has no surface, border or padding.
|
|
24
|
+
|
|
25
|
+
### Slots
|
|
26
|
+
|
|
27
|
+
- `default`: The accordion parts.
|
|
28
|
+
|
|
29
|
+
### Notes
|
|
30
|
+
|
|
31
|
+
- HTML: To group accordions, wrap them in a `.ui-card[role="group"]`. A variant on the group styles every accordion in it.
|
|
32
|
+
- Astro, React, Svelte and Vue: Build it from `AccordionSummary`, `AccordionContent` and `AccordionActions`. To group accordions, wrap them in a `<Card role="group">`. Its `variant` styles every accordion in it.
|
|
33
|
+
|
|
34
|
+
## AccordionSummary
|
|
35
|
+
|
|
36
|
+
### Parts
|
|
37
|
+
|
|
38
|
+
- `<summary>` (root): The always visible header.
|
|
39
|
+
- `<svg class="ui-marker">` (slot `marker`): The marker. Renders a chevron by default. Only `.ui-marker` animates.
|
|
40
|
+
|
|
41
|
+
### Slots
|
|
42
|
+
|
|
43
|
+
- `default`: The summary text.
|
|
44
|
+
|
|
45
|
+
## AccordionActions
|
|
46
|
+
|
|
47
|
+
### Parts
|
|
48
|
+
|
|
49
|
+
- `.ui-actions` (root): A group of actions, such as buttons.
|
|
50
|
+
|
|
51
|
+
### Props and modifiers
|
|
52
|
+
|
|
53
|
+
- `align`: `"end"` (default), `"start"` (`.ui-align-start`). Alignment for the actions.
|
|
54
|
+
|
|
55
|
+
### Slots
|
|
56
|
+
|
|
57
|
+
- `default`: The actions, such as buttons.
|
|
58
|
+
|
|
59
|
+
## Component properties
|
|
60
|
+
|
|
61
|
+
Set inputs on the component, inline or in your CSS. Outputs follow the variant and state, so never override them.
|
|
62
|
+
|
|
63
|
+
### accordion.css
|
|
64
|
+
|
|
65
|
+
- `--_actions-gap`: Space between the buttons in `.ui-actions`.
|
|
66
|
+
- `--_actions-margin-block-start`: Space above `.ui-actions`.
|
|
67
|
+
- `--_actions-padding-block-end`: Bottom padding of `.ui-actions`. Defaults to `--_summary-padding-block`.
|
|
68
|
+
- `--_actions-padding-inline`: Inline padding of `.ui-actions`. Defaults to `--_content-padding-inline`, and at least the focus ring's space.
|
|
69
|
+
- `--_content-padding-block`: Block padding of `.ui-content`.
|
|
70
|
+
- `--_content-padding-inline`: Inline padding of `.ui-content`. Defaults to `--_padding-inline`.
|
|
71
|
+
- `--_divider-border-color`: Color of the border between items in a group. Defaults to `--ui-border-color`.
|
|
72
|
+
- `--_ease`: Easing of the transitions. Defaults to `--ui-ease`.
|
|
73
|
+
- `--_focus-ring-offset`: Offset of the `summary` focus ring. Inside the summary, except in `.ui-transparent`.
|
|
74
|
+
- `--_group-radius`: Corner radius of the first and last item in a group. Defaults to `--ui-radius`.
|
|
75
|
+
- `--_item-padding-inline`: Inline padding of the items in a group. `0` when the card is `.ui-transparent`.
|
|
76
|
+
- `--_item-summary-padding-inline`: Inline padding of the item `summary` in a group. Defaults to `--_item-padding-inline`.
|
|
77
|
+
- `--_margin-inline`: The inline margin. `0`, except in `.ui-transparent` outside a group.
|
|
78
|
+
- `--_motion`: Motion multiplier for `--_duration`. `0` turns the transitions off.
|
|
79
|
+
- `--_padding-inline`: Inline padding of `summary`, `.ui-content` and `.ui-actions`. `0` in `.ui-transparent`.
|
|
80
|
+
- `--_radius`: The corner radius, also of the `summary` focus ring. Defaults to `--ui-radius`.
|
|
81
|
+
- `--_summary-padding-block`: Block padding of `summary`.
|
|
82
|
+
- `--_summary-padding-inline`: Inline padding of `summary`. Defaults to `--_padding-inline`.
|
|
83
|
+
|
|
84
|
+
Outputs: `--_bg-color`, `--_border-color`, `--_border-width`, `--_duration`, `--_overflow` and `--_shadow`.
|
|
85
|
+
|
|
86
|
+
### card.css
|
|
87
|
+
|
|
88
|
+
- `--_ease`: Easing of the focus ring animation. Defaults to `--ui-ease`.
|
|
89
|
+
- `--_elevated-bg-color`: Background of `.ui-elevated`. Defaults to `--ui-surface-elevated`.
|
|
90
|
+
- `--_elevated-shadow`: Shadow of `.ui-elevated`. Defaults to `--ui-shadow-elevated`.
|
|
91
|
+
- `--_motion`: Motion multiplier for the focus ring animation. `0` turns it off.
|
|
92
|
+
- `--_outlined-border-color`: Border color of `.ui-outlined`. Defaults to `--ui-border-color`.
|
|
93
|
+
- `--_padding`: Padding of the header, content and actions. `--ui-card-padding`, or `--ui-space-3` when a theme leaves it unset.
|
|
94
|
+
- `--_surface-bg-color`: Background of default and `.ui-outlined` cards, and border color of `.ui-tonal` and `.ui-elevated` unless a theme sets `--ui-border-color-raised`. Defaults to `--ui-surface`.
|
|
95
|
+
- `--_tonal-bg-color`: Background of `.ui-tonal`. Defaults to `--ui-surface-tonal`.
|
|
96
|
+
|
|
97
|
+
Outputs: `--_bg-color`, `--_border-color`, `--_border-width`, `--_duration` and `--_shadow`.
|
|
98
|
+
|
|
99
|
+
## Theme tokens
|
|
100
|
+
|
|
101
|
+
The stylesheets read `--ui-border-color`, `--ui-border-color-on-raised`, `--ui-border-color-raised`, `--ui-border-width`, `--ui-card-padding`, `--ui-duration`, `--ui-ease`, `--ui-field-border-color-on-raised`, `--ui-focus-ring-color`, `--ui-focus-ring-inset`, `--ui-focus-ring-offset`, `--ui-focus-ring-style`, `--ui-focus-ring-width`, `--ui-font-size-body`, `--ui-font-size-caption`, `--ui-font-weight-bold`, `--ui-line-height-tight`, `--ui-motion`, `--ui-radius`, `--ui-shadow-elevated`, `--ui-shadow-surface`, `--ui-space-1`, `--ui-space-2`, `--ui-space-3`, `--ui-surface`, `--ui-surface-elevated`, `--ui-surface-tonal` and `--ui-text`. `theming.md` and `tokens.json` describe them.
|
|
102
|
+
|
|
103
|
+
## HTML
|
|
104
|
+
|
|
105
|
+
### Example: Basics
|
|
106
|
+
|
|
107
|
+
```html
|
|
108
|
+
<details class="ui-accordion">
|
|
109
|
+
<summary>
|
|
110
|
+
Accordion
|
|
111
|
+
<svg
|
|
112
|
+
aria-hidden="true"
|
|
113
|
+
class="ui-marker"
|
|
114
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
115
|
+
width="24"
|
|
116
|
+
height="24"
|
|
117
|
+
viewBox="0 0 24 24"
|
|
118
|
+
>
|
|
119
|
+
<path
|
|
120
|
+
fill="currentColor"
|
|
121
|
+
d="M4.293 8.293a1 1 0 0 1 1.414 0L12 14.586l6.293-6.293a1 1 0 1 1 1.414 1.414l-7 7a1 1 0 0 1-1.414 0l-7-7a1 1 0 0 1 0-1.414"
|
|
122
|
+
/>
|
|
123
|
+
</svg>
|
|
124
|
+
</summary>
|
|
125
|
+
<div class="ui-content">
|
|
126
|
+
<p>
|
|
127
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sodales,
|
|
128
|
+
nulla sit amet porttitor rhoncus, lacus ex vestibulum libero, ac mollis
|
|
129
|
+
neque ante id justo. Nam tempor euismod nisi ac ornare. Pellentesque id
|
|
130
|
+
sapien lacinia, venenatis est aliquam, dignissim elit. Suspendisse
|
|
131
|
+
potenti. Cras ut ante in libero tempus sodales sed quis dolor.
|
|
132
|
+
</p>
|
|
133
|
+
</div>
|
|
134
|
+
</details>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Astro
|
|
138
|
+
|
|
139
|
+
`import { Accordion, AccordionActions, AccordionContent, AccordionSummary } from "opui-css/astro"`
|
|
140
|
+
|
|
141
|
+
- `AccordionSummary` named slots: `marker`. Fill one with `slot="marker"` on a child.
|
|
142
|
+
|
|
143
|
+
### Example: Basics
|
|
144
|
+
|
|
145
|
+
```astro
|
|
146
|
+
---
|
|
147
|
+
import { Accordion, AccordionContent, AccordionSummary } from "opui-css/astro"
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
<Accordion>
|
|
151
|
+
<AccordionSummary>Accordion</AccordionSummary>
|
|
152
|
+
<AccordionContent>
|
|
153
|
+
<p>
|
|
154
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sodales,
|
|
155
|
+
nulla sit amet porttitor rhoncus, lacus ex vestibulum libero, ac mollis
|
|
156
|
+
neque ante id justo. Nam tempor euismod nisi ac ornare. Pellentesque id
|
|
157
|
+
sapien lacinia, venenatis est aliquam, dignissim elit. Suspendisse
|
|
158
|
+
potenti. Cras ut ante in libero tempus sodales sed quis dolor.
|
|
159
|
+
</p>
|
|
160
|
+
</AccordionContent>
|
|
161
|
+
</Accordion>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## React
|
|
165
|
+
|
|
166
|
+
`import { Accordion, AccordionActions, AccordionContent, AccordionSummary } from "opui-css/react"`
|
|
167
|
+
|
|
168
|
+
- `AccordionSummary` slot props (`ReactNode`): `children` and `marker`.
|
|
169
|
+
|
|
170
|
+
### Example: Basics
|
|
171
|
+
|
|
172
|
+
```tsx
|
|
173
|
+
import { Accordion, AccordionContent, AccordionSummary } from "opui-css/react"
|
|
174
|
+
|
|
175
|
+
export default function Basics() {
|
|
176
|
+
return (
|
|
177
|
+
<Accordion>
|
|
178
|
+
<AccordionSummary>Accordion</AccordionSummary>
|
|
179
|
+
<AccordionContent>
|
|
180
|
+
<p>
|
|
181
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus
|
|
182
|
+
sodales, nulla sit amet porttitor rhoncus, lacus ex vestibulum libero,
|
|
183
|
+
ac mollis neque ante id justo. Nam tempor euismod nisi ac ornare.
|
|
184
|
+
Pellentesque id sapien lacinia, venenatis est aliquam, dignissim elit.
|
|
185
|
+
Suspendisse potenti. Cras ut ante in libero tempus sodales sed quis
|
|
186
|
+
dolor.
|
|
187
|
+
</p>
|
|
188
|
+
</AccordionContent>
|
|
189
|
+
</Accordion>
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Svelte
|
|
195
|
+
|
|
196
|
+
`import { Accordion, AccordionActions, AccordionContent, AccordionSummary } from "opui-css/svelte"`
|
|
197
|
+
|
|
198
|
+
- `AccordionSummary` slot snippets: `children` and `marker`.
|
|
199
|
+
|
|
200
|
+
### Example: Basics
|
|
201
|
+
|
|
202
|
+
```svelte
|
|
203
|
+
<script lang="ts">
|
|
204
|
+
import {
|
|
205
|
+
Accordion,
|
|
206
|
+
AccordionContent,
|
|
207
|
+
AccordionSummary,
|
|
208
|
+
} from "opui-css/svelte"
|
|
209
|
+
</script>
|
|
210
|
+
|
|
211
|
+
<Accordion>
|
|
212
|
+
<AccordionSummary>Accordion</AccordionSummary>
|
|
213
|
+
<AccordionContent>
|
|
214
|
+
<p>
|
|
215
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sodales,
|
|
216
|
+
nulla sit amet porttitor rhoncus, lacus ex vestibulum libero, ac mollis
|
|
217
|
+
neque ante id justo. Nam tempor euismod nisi ac ornare. Pellentesque id
|
|
218
|
+
sapien lacinia, venenatis est aliquam, dignissim elit. Suspendisse
|
|
219
|
+
potenti. Cras ut ante in libero tempus sodales sed quis dolor.
|
|
220
|
+
</p>
|
|
221
|
+
</AccordionContent>
|
|
222
|
+
</Accordion>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Vue
|
|
226
|
+
|
|
227
|
+
`import { Accordion, AccordionActions, AccordionContent, AccordionSummary } from "opui-css/vue"`
|
|
228
|
+
|
|
229
|
+
- `AccordionSummary` named slots: `marker`. Fill one with `<template #marker>`.
|
|
230
|
+
|
|
231
|
+
### Example: Basics
|
|
232
|
+
|
|
233
|
+
```vue
|
|
234
|
+
<script setup lang="ts">
|
|
235
|
+
import { Accordion, AccordionContent, AccordionSummary } from "opui-css/vue"
|
|
236
|
+
</script>
|
|
237
|
+
|
|
238
|
+
<template>
|
|
239
|
+
<Accordion>
|
|
240
|
+
<AccordionSummary>Accordion</AccordionSummary>
|
|
241
|
+
<AccordionContent>
|
|
242
|
+
<p>
|
|
243
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus
|
|
244
|
+
sodales, nulla sit amet porttitor rhoncus, lacus ex vestibulum libero,
|
|
245
|
+
ac mollis neque ante id justo. Nam tempor euismod nisi ac ornare.
|
|
246
|
+
Pellentesque id sapien lacinia, venenatis est aliquam, dignissim elit.
|
|
247
|
+
Suspendisse potenti. Cras ut ante in libero tempus sodales sed quis
|
|
248
|
+
dolor.
|
|
249
|
+
</p>
|
|
250
|
+
</AccordionContent>
|
|
251
|
+
</Accordion>
|
|
252
|
+
</template>
|
|
253
|
+
```
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Anchor
|
|
2
|
+
|
|
3
|
+
A structural primitive to enable CSS Anchor Positioning on stuff.
|
|
4
|
+
|
|
5
|
+
- CSS: `opui-css/css/components/anchor.css`.
|
|
6
|
+
- Full docs with every example: [HTML](https://open-props-ui.netlify.app/html/components/anchor.md), [Astro](https://open-props-ui.netlify.app/astro/components/anchor.md), [React](https://open-props-ui.netlify.app/react/components/anchor.md), [Svelte](https://open-props-ui.netlify.app/svelte/components/anchor.md), [Vue](https://open-props-ui.netlify.app/vue/components/anchor.md).
|
|
7
|
+
|
|
8
|
+
## Anchor
|
|
9
|
+
|
|
10
|
+
### Parts
|
|
11
|
+
|
|
12
|
+
- `.ui-anchor` (root): Container element. Scopes the anchor to its content.
|
|
13
|
+
- `& > :first-child`: The content the floating content is anchored to.
|
|
14
|
+
- `.ui-floating` (`AnchorContent`): The floating content.
|
|
15
|
+
|
|
16
|
+
### Props and modifiers
|
|
17
|
+
|
|
18
|
+
- `id`: `string`. The id of the root. With `trigger="hover"`, the id of `AnchorContent`. Add `interestfor` with the same id to the trigger. Required with `trigger="hover"`.
|
|
19
|
+
- `positionArea`: `string`, `--ui-anchor-position-area`, default `"self-start self-end"`. Any valid `position-area` value. Controls where the floating content is placed. The `self-` keywords follow the content's own direction, so the placement mirrors in a right-to-left part of a left-to-right page.
|
|
20
|
+
- `trigger`: `"hover"` (`.ui-floating[popover="hint"]`). Shows the floating content on hover and focus with `popover="hint"`. Without it, the content always shows.
|
|
21
|
+
|
|
22
|
+
### Slots
|
|
23
|
+
|
|
24
|
+
- `default`: The content to anchor to, followed by `AnchorContent`.
|
|
25
|
+
|
|
26
|
+
### Notes
|
|
27
|
+
|
|
28
|
+
- HTML: To show on hover, give `.ui-floating` `popover="hint"` and an id. Add `interestfor` with that id to the trigger.
|
|
29
|
+
|
|
30
|
+
## Component properties
|
|
31
|
+
|
|
32
|
+
Set inputs on the component, inline or in your CSS. Outputs follow the variant and state, so never override them.
|
|
33
|
+
|
|
34
|
+
### anchor.css
|
|
35
|
+
|
|
36
|
+
- `--_shift-x`: Horizontal shift of `.ui-floating`. Defaults to `0`.
|
|
37
|
+
- `--_shift-y`: Vertical shift of `.ui-floating`. Defaults to `0`.
|
|
38
|
+
|
|
39
|
+
## HTML
|
|
40
|
+
|
|
41
|
+
### Example: Always visible
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<span class="ui-anchor" style="--ui-anchor-position-area: inline-end">
|
|
45
|
+
<button type="button" class="ui-button ui-outlined">Export</button>
|
|
46
|
+
<span class="ui-floating">
|
|
47
|
+
<div class="ui-card ui-tonal coach-mark">
|
|
48
|
+
<div class="ui-content">
|
|
49
|
+
<strong>New</strong> Export to PDF and CSV from the same menu.
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</span>
|
|
53
|
+
</span>
|
|
54
|
+
|
|
55
|
+
<style>
|
|
56
|
+
.coach-mark {
|
|
57
|
+
font-size: var(--ui-font-size-body);
|
|
58
|
+
margin-inline-start: var(--ui-space-2);
|
|
59
|
+
max-inline-size: 220px;
|
|
60
|
+
}
|
|
61
|
+
</style>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Astro
|
|
65
|
+
|
|
66
|
+
`import { Anchor, AnchorContent } from "opui-css/astro"`
|
|
67
|
+
|
|
68
|
+
### Example: Always visible
|
|
69
|
+
|
|
70
|
+
```astro
|
|
71
|
+
---
|
|
72
|
+
import {
|
|
73
|
+
Anchor,
|
|
74
|
+
AnchorContent,
|
|
75
|
+
Button,
|
|
76
|
+
Card,
|
|
77
|
+
CardContent,
|
|
78
|
+
} from "opui-css/astro"
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
<Anchor positionArea="inline-end">
|
|
82
|
+
<Button variant="outlined">Export</Button>
|
|
83
|
+
<AnchorContent>
|
|
84
|
+
<Card variant="tonal" class="coach-mark">
|
|
85
|
+
<CardContent>
|
|
86
|
+
<strong>New</strong> Export to PDF and CSV from the same menu.
|
|
87
|
+
</CardContent>
|
|
88
|
+
</Card>
|
|
89
|
+
</AnchorContent>
|
|
90
|
+
</Anchor>
|
|
91
|
+
|
|
92
|
+
<style>
|
|
93
|
+
.coach-mark {
|
|
94
|
+
font-size: var(--ui-font-size-body);
|
|
95
|
+
margin-inline-start: var(--ui-space-2);
|
|
96
|
+
max-inline-size: 220px;
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## React
|
|
102
|
+
|
|
103
|
+
`import { Anchor, AnchorContent } from "opui-css/react"`
|
|
104
|
+
|
|
105
|
+
- Client components (`"use client"`): `Anchor`.
|
|
106
|
+
|
|
107
|
+
### Example: Always visible
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
import {
|
|
111
|
+
Anchor,
|
|
112
|
+
AnchorContent,
|
|
113
|
+
Button,
|
|
114
|
+
Card,
|
|
115
|
+
CardContent,
|
|
116
|
+
} from "opui-css/react"
|
|
117
|
+
|
|
118
|
+
export default function AlwaysVisible() {
|
|
119
|
+
return (
|
|
120
|
+
<>
|
|
121
|
+
<Anchor positionArea="inline-end">
|
|
122
|
+
<Button variant="outlined">Export</Button>
|
|
123
|
+
<AnchorContent>
|
|
124
|
+
<Card variant="tonal" className="coach-mark">
|
|
125
|
+
<CardContent>
|
|
126
|
+
<strong>New</strong> Export to PDF and CSV from the same menu.
|
|
127
|
+
</CardContent>
|
|
128
|
+
</Card>
|
|
129
|
+
</AnchorContent>
|
|
130
|
+
</Anchor>
|
|
131
|
+
<style>{`
|
|
132
|
+
.coach-mark {
|
|
133
|
+
font-size: var(--ui-font-size-body);
|
|
134
|
+
margin-inline-start: var(--ui-space-2);
|
|
135
|
+
max-inline-size: 220px;
|
|
136
|
+
}
|
|
137
|
+
`}</style>
|
|
138
|
+
</>
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Svelte
|
|
144
|
+
|
|
145
|
+
`import { Anchor, AnchorContent } from "opui-css/svelte"`
|
|
146
|
+
|
|
147
|
+
### Example: Always visible
|
|
148
|
+
|
|
149
|
+
```svelte
|
|
150
|
+
<script lang="ts">
|
|
151
|
+
import {
|
|
152
|
+
Anchor,
|
|
153
|
+
AnchorContent,
|
|
154
|
+
Button,
|
|
155
|
+
Card,
|
|
156
|
+
CardContent,
|
|
157
|
+
} from "opui-css/svelte"
|
|
158
|
+
</script>
|
|
159
|
+
|
|
160
|
+
<Anchor positionArea="inline-end">
|
|
161
|
+
<Button variant="outlined">Export</Button>
|
|
162
|
+
<AnchorContent>
|
|
163
|
+
<Card variant="tonal" class="coach-mark">
|
|
164
|
+
<CardContent>
|
|
165
|
+
<strong>New</strong> Export to PDF and CSV from the same menu.
|
|
166
|
+
</CardContent>
|
|
167
|
+
</Card>
|
|
168
|
+
</AnchorContent>
|
|
169
|
+
</Anchor>
|
|
170
|
+
|
|
171
|
+
<style>
|
|
172
|
+
:global {
|
|
173
|
+
.coach-mark {
|
|
174
|
+
font-size: var(--ui-font-size-body);
|
|
175
|
+
margin-inline-start: var(--ui-space-2);
|
|
176
|
+
max-inline-size: 220px;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
</style>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Vue
|
|
183
|
+
|
|
184
|
+
`import { Anchor, AnchorContent } from "opui-css/vue"`
|
|
185
|
+
|
|
186
|
+
### Example: Always visible
|
|
187
|
+
|
|
188
|
+
```vue
|
|
189
|
+
<script setup lang="ts">
|
|
190
|
+
import { Anchor, AnchorContent, Button, Card, CardContent } from "opui-css/vue"
|
|
191
|
+
</script>
|
|
192
|
+
|
|
193
|
+
<template>
|
|
194
|
+
<Anchor positionArea="inline-end">
|
|
195
|
+
<Button variant="outlined">Export</Button>
|
|
196
|
+
<AnchorContent>
|
|
197
|
+
<Card variant="tonal" class="coach-mark">
|
|
198
|
+
<CardContent>
|
|
199
|
+
<strong>New</strong> Export to PDF and CSV from the same menu.
|
|
200
|
+
</CardContent>
|
|
201
|
+
</Card>
|
|
202
|
+
</AnchorContent>
|
|
203
|
+
</Anchor>
|
|
204
|
+
</template>
|
|
205
|
+
|
|
206
|
+
<style>
|
|
207
|
+
.coach-mark {
|
|
208
|
+
font-size: var(--ui-font-size-body);
|
|
209
|
+
margin-inline-start: var(--ui-space-2);
|
|
210
|
+
max-inline-size: 220px;
|
|
211
|
+
}
|
|
212
|
+
</style>
|
|
213
|
+
```
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Avatar
|
|
2
|
+
|
|
3
|
+
Avatars show a person or entity as an image, initials or icon.
|
|
4
|
+
|
|
5
|
+
- CSS: `opui-css/css/components/avatar.css`.
|
|
6
|
+
- Full docs with every example: [HTML](https://open-props-ui.netlify.app/html/components/avatar.md), [Astro](https://open-props-ui.netlify.app/astro/components/avatar.md), [React](https://open-props-ui.netlify.app/react/components/avatar.md), [Svelte](https://open-props-ui.netlify.app/svelte/components/avatar.md), [Vue](https://open-props-ui.netlify.app/vue/components/avatar.md).
|
|
7
|
+
|
|
8
|
+
## Avatar
|
|
9
|
+
|
|
10
|
+
### Parts
|
|
11
|
+
|
|
12
|
+
- `.ui-avatar` (root): Container element.
|
|
13
|
+
- `<img>` (prop `src`, prop `alt`): The avatar image.
|
|
14
|
+
|
|
15
|
+
### Props and modifiers
|
|
16
|
+
|
|
17
|
+
- `alt`: `string`. Alternative text for the image. Required with `src`. Use an empty string when the name is shown next to it.
|
|
18
|
+
- `as`: `"a" | "button" | "div"`, default `"div"`. The element to render. Defaults to `"a"` with `href`.
|
|
19
|
+
- `disabled`: `boolean`. Disables a button avatar. A link avatar drops its `href` and gets `aria-disabled="true"` instead.
|
|
20
|
+
- `href`: `string`. The link to use. Renders an `<a>`.
|
|
21
|
+
- `shape`: `"circle"` (default), `"rounded"` (`.ui-rounded`), `"squared"` (`.ui-squared`), `"squircle"` (`.ui-squircle`). The shape of the avatar.
|
|
22
|
+
- `size`: `"large"` (`.ui-large`), `"medium"` (default), `"small"` (`.ui-small`), `"x-small"` (`.ui-x-small`). The size of the element.
|
|
23
|
+
- `src`: `string`. The image source. Replaces the content.
|
|
24
|
+
- State (HTML): `button` (`button[disabled]`), `link` (`a[aria-disabled="true"]`). Disables a button avatar. A link avatar, which can't take `disabled`, drops its `href` and takes `aria-disabled="true"` instead.
|
|
25
|
+
|
|
26
|
+
### Slots
|
|
27
|
+
|
|
28
|
+
- `default`: Letters or an icon, when there's no image.
|
|
29
|
+
|
|
30
|
+
## AvatarGroup
|
|
31
|
+
|
|
32
|
+
### Parts
|
|
33
|
+
|
|
34
|
+
- `.ui-avatar-group` (root): A group of overlapping avatars.
|
|
35
|
+
|
|
36
|
+
### Slots
|
|
37
|
+
|
|
38
|
+
- `default`: The avatars.
|
|
39
|
+
|
|
40
|
+
### Notes
|
|
41
|
+
|
|
42
|
+
- HTML: The root needs `role="group"` and an `aria-label`.
|
|
43
|
+
|
|
44
|
+
## Component properties
|
|
45
|
+
|
|
46
|
+
Set inputs on the component, inline or in your CSS. Outputs follow the variant and state, so never override them.
|
|
47
|
+
|
|
48
|
+
### avatar.css
|
|
49
|
+
|
|
50
|
+
- `--_bg-color`: The background. Defaults to `--ui-primary`. An avatar with an `img` is always transparent.
|
|
51
|
+
- `--_font-size`: The font size of initials. Set by the size classes.
|
|
52
|
+
- `--_icon-size`: The maximum width of an `svg`. Set by `.ui-x-small` and `.ui-small`.
|
|
53
|
+
- `--_margin`: How much avatars in a `.ui-avatar-group` overlap. Set on the group.
|
|
54
|
+
- `--_outline-color`: The ring around each avatar in a `.ui-avatar-group`. Defaults to `--ui-surface`. Set on the group.
|
|
55
|
+
- `--_outline-width`: Width of the ring around each avatar in a `.ui-avatar-group`. Set on the group.
|
|
56
|
+
- `--_size`: The width and height. Defaults to `--ui-control-size`, set by the size classes.
|
|
57
|
+
- `--_text-color`: The text and icon color. Defaults to `--ui-on-primary`.
|
|
58
|
+
|
|
59
|
+
## Theme tokens
|
|
60
|
+
|
|
61
|
+
The stylesheets read `--ui-border-width`, `--ui-border-width-thick`, `--ui-control-size`, `--ui-control-size-large`, `--ui-control-size-small`, `--ui-control-size-x-small`, `--ui-disabled-opacity`, `--ui-font-size-caption`, `--ui-font-size-large`, `--ui-font-size-small`, `--ui-icon-size`, `--ui-icon-size-large`, `--ui-icon-size-small`, `--ui-on-primary`, `--ui-primary`, `--ui-radius-round`, `--ui-radius-small`, `--ui-space-2` and `--ui-surface`. `theming.md` and `tokens.json` describe them.
|
|
62
|
+
|
|
63
|
+
## HTML
|
|
64
|
+
|
|
65
|
+
### Example: Image
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<div class="ui-avatar">
|
|
69
|
+
<img
|
|
70
|
+
src="https://images.unsplash.com/photo-1614530606961-c4ce986825c1?w=96&h=96&fit=crop&auto=format"
|
|
71
|
+
alt="Maya Lind"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="ui-avatar">
|
|
76
|
+
<img
|
|
77
|
+
src="https://images.unsplash.com/photo-1672714413950-c9f7c5a45fa1?w=96&h=96&fit=crop&auto=format"
|
|
78
|
+
alt="Omar Haddad"
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div class="ui-avatar">
|
|
83
|
+
<img
|
|
84
|
+
src="https://plus.unsplash.com/premium_photo-1675674458649-0c667500f3cc?w=96&h=96&fit=crop&auto=format"
|
|
85
|
+
alt="Priya Nair"
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Astro
|
|
91
|
+
|
|
92
|
+
`import { Avatar, AvatarGroup } from "opui-css/astro"`
|
|
93
|
+
|
|
94
|
+
### Example: Image
|
|
95
|
+
|
|
96
|
+
```astro
|
|
97
|
+
---
|
|
98
|
+
import { Avatar } from "opui-css/astro"
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
<Avatar
|
|
102
|
+
src="https://images.unsplash.com/photo-1614530606961-c4ce986825c1?w=96&h=96&fit=crop&auto=format"
|
|
103
|
+
alt="Maya Lind"
|
|
104
|
+
/>
|
|
105
|
+
|
|
106
|
+
<Avatar
|
|
107
|
+
src="https://images.unsplash.com/photo-1672714413950-c9f7c5a45fa1?w=96&h=96&fit=crop&auto=format"
|
|
108
|
+
alt="Omar Haddad"
|
|
109
|
+
/>
|
|
110
|
+
|
|
111
|
+
<Avatar
|
|
112
|
+
src="https://plus.unsplash.com/premium_photo-1675674458649-0c667500f3cc?w=96&h=96&fit=crop&auto=format"
|
|
113
|
+
alt="Priya Nair"
|
|
114
|
+
/>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## React
|
|
118
|
+
|
|
119
|
+
`import { Avatar, AvatarGroup } from "opui-css/react"`
|
|
120
|
+
|
|
121
|
+
### Example: Image
|
|
122
|
+
|
|
123
|
+
```tsx
|
|
124
|
+
import { Avatar } from "opui-css/react"
|
|
125
|
+
|
|
126
|
+
export default function Image() {
|
|
127
|
+
return (
|
|
128
|
+
<>
|
|
129
|
+
<Avatar
|
|
130
|
+
src="https://images.unsplash.com/photo-1614530606961-c4ce986825c1?w=96&h=96&fit=crop&auto=format"
|
|
131
|
+
alt="Maya Lind"
|
|
132
|
+
/>
|
|
133
|
+
|
|
134
|
+
<Avatar
|
|
135
|
+
src="https://images.unsplash.com/photo-1672714413950-c9f7c5a45fa1?w=96&h=96&fit=crop&auto=format"
|
|
136
|
+
alt="Omar Haddad"
|
|
137
|
+
/>
|
|
138
|
+
|
|
139
|
+
<Avatar
|
|
140
|
+
src="https://plus.unsplash.com/premium_photo-1675674458649-0c667500f3cc?w=96&h=96&fit=crop&auto=format"
|
|
141
|
+
alt="Priya Nair"
|
|
142
|
+
/>
|
|
143
|
+
</>
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Svelte
|
|
149
|
+
|
|
150
|
+
`import { Avatar, AvatarGroup } from "opui-css/svelte"`
|
|
151
|
+
|
|
152
|
+
### Example: Image
|
|
153
|
+
|
|
154
|
+
```svelte
|
|
155
|
+
<script lang="ts">
|
|
156
|
+
import { Avatar } from "opui-css/svelte"
|
|
157
|
+
</script>
|
|
158
|
+
|
|
159
|
+
<Avatar
|
|
160
|
+
src="https://images.unsplash.com/photo-1614530606961-c4ce986825c1?w=96&h=96&fit=crop&auto=format"
|
|
161
|
+
alt="Maya Lind"
|
|
162
|
+
/>
|
|
163
|
+
|
|
164
|
+
<Avatar
|
|
165
|
+
src="https://images.unsplash.com/photo-1672714413950-c9f7c5a45fa1?w=96&h=96&fit=crop&auto=format"
|
|
166
|
+
alt="Omar Haddad"
|
|
167
|
+
/>
|
|
168
|
+
|
|
169
|
+
<Avatar
|
|
170
|
+
src="https://plus.unsplash.com/premium_photo-1675674458649-0c667500f3cc?w=96&h=96&fit=crop&auto=format"
|
|
171
|
+
alt="Priya Nair"
|
|
172
|
+
/>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Vue
|
|
176
|
+
|
|
177
|
+
`import { Avatar, AvatarGroup } from "opui-css/vue"`
|
|
178
|
+
|
|
179
|
+
### Example: Image
|
|
180
|
+
|
|
181
|
+
```vue
|
|
182
|
+
<script setup lang="ts">
|
|
183
|
+
import { Avatar } from "opui-css/vue"
|
|
184
|
+
</script>
|
|
185
|
+
|
|
186
|
+
<template>
|
|
187
|
+
<Avatar
|
|
188
|
+
src="https://images.unsplash.com/photo-1614530606961-c4ce986825c1?w=96&h=96&fit=crop&auto=format"
|
|
189
|
+
alt="Maya Lind"
|
|
190
|
+
/>
|
|
191
|
+
|
|
192
|
+
<Avatar
|
|
193
|
+
src="https://images.unsplash.com/photo-1672714413950-c9f7c5a45fa1?w=96&h=96&fit=crop&auto=format"
|
|
194
|
+
alt="Omar Haddad"
|
|
195
|
+
/>
|
|
196
|
+
|
|
197
|
+
<Avatar
|
|
198
|
+
src="https://plus.unsplash.com/premium_photo-1675674458649-0c667500f3cc?w=96&h=96&fit=crop&auto=format"
|
|
199
|
+
alt="Priya Nair"
|
|
200
|
+
/>
|
|
201
|
+
</template>
|
|
202
|
+
```
|