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,85 @@
|
|
|
1
|
+
# Customizing
|
|
2
|
+
|
|
3
|
+
Where your CSS goes: a theme in `theme.custom` changes the whole library, a component's `--_*` properties change one component or one instance, and your own layer holds the rest.
|
|
4
|
+
|
|
5
|
+
## Your theme
|
|
6
|
+
|
|
7
|
+
A theme is the [knobs, roles and component tokens](https://open-props-ui.netlify.app/html/guide/concepts.md#token-tiers) you change, in the `theme.custom` layer, right after the defaults. Tokens you leave out keep their defaults, also new ones in later releases.
|
|
8
|
+
|
|
9
|
+
```css
|
|
10
|
+
@layer theme.custom {
|
|
11
|
+
:where(html) {
|
|
12
|
+
--ui-density: 0.9;
|
|
13
|
+
--ui-font-body: "Inter", system-ui, sans-serif;
|
|
14
|
+
--ui-font-heading: "Fraunces", serif;
|
|
15
|
+
--ui-palette-chroma: 0.35;
|
|
16
|
+
--ui-palette-hue: 265;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If it might load before `layers.css`, start it with the two `@layer` statements from there, like the example themes do. The [Theme builder](https://open-props-ui.netlify.app/theme-builder.md) writes one for you, and [Theming](https://open-props-ui.netlify.app/html/guide/theming.md) walks through the knobs.
|
|
22
|
+
|
|
23
|
+
Knobs inherit, so `html` is enough for them. A role you pin, such as `--ui-surface` or `--ui-primary`, goes on `:where(html, .ui-palette, .ui-contrast-more)` so the scope classes keep it. The example themes and the Theme builder do that for every token.
|
|
24
|
+
|
|
25
|
+
### Example themes
|
|
26
|
+
|
|
27
|
+
The themes below ship with the package to show how far tokens go. Each is only tokens in `theme.custom`, on `html` and, for the colors of severity scopes such as `.ui-info`, on those classes. No component CSS. Every stress test page runs with each of them in light and dark mode. They copy their originals faithfully, also where those fall short of WCAG contrast (the translucent focus rings of Bootstrap and shadcn, the light field borders of Bootstrap and shadcn, the bright blue of brutalist). They name their fonts (Geist, Roboto, DM Sans) but don't load them. The [Theme builder](https://open-props-ui.netlify.app/theme-builder.md) starts from any of them.
|
|
28
|
+
|
|
29
|
+
- `bootstrap`: Bootstrap 5. Its `oklch(0.578 0.228 260)` blue, gray secondary buttons, the danger, warning, info and success colors with the subtle alert palettes, `oklch(0.91 0.007 248)` borders, 38px controls, regular weight buttons and labels, 16px checks and 32px switches, solid blue selected items, the heading scale, 1.5 line height and the wide translucent focus ring. No shadow on dropdowns and modals.
|
|
30
|
+
- `brutalist`: neobrutalism. Black 2px borders, hard 4px shadows on cards, dialogs and menus and on buttons that press into them on hover without changing color, filled in the main blue, white fields on the gray-blue page, the main blue also behind tooltips and selected items, black links and 500 weight body text.
|
|
31
|
+
- `m3`: Material 3. The baseline purple scheme and its tinted surfaces, the error red, pill buttons with 24px padding that show 8% state layers and lift on hover, outlined ones in the outline gray, 12px cards, 28px dialogs, 4px menus and outlined fields, 8px chips, 18px checkboxes, on-surface text with on-surface-variant secondary text, primary tab labels, 52 by 32px switches, Roboto, the type scale, the emphasized easing and the 3px secondary focus ring over a 32% scrim.
|
|
32
|
+
- `shadcn`: shadcn/ui. Neutral grays, a near-black primary also behind tooltips, 36px controls with 14px text and 16px padding, 32px small and 40px large buttons, light borders with a faint shadow, the accent tint on hover instead of a fill, a 3px gray focus ring, 16px checks with 4px corners, a 32px switch with a white thumb, 8px menus and chips, 10px dialogs and 14px cards with 24px padding, muted secondary text.
|
|
33
|
+
|
|
34
|
+
```css
|
|
35
|
+
@import "opui-css/css/imports.css";
|
|
36
|
+
@import "opui-css/themes/brutalist.css";
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Component properties
|
|
40
|
+
|
|
41
|
+
The `--_*` private properties are each component's wiring, the last [tier](https://open-props-ui.netlify.app/html/guide/concepts.md#token-tiers) before its CSS. Every component page lists its own under Component properties, marked as inputs or outputs, and components share names where they mean the same thing. Button reads these:
|
|
42
|
+
|
|
43
|
+
- `--_accent`: the accent color. Fills, borders, text, hover and active states are all derived from it.
|
|
44
|
+
- `--_bg-color` and `--_text-color`: the current background and text color.
|
|
45
|
+
- `--_duration` and `--_ease`: the transition duration and easing.
|
|
46
|
+
- `--_icon-size`: the size of a direct child `svg`.
|
|
47
|
+
- `--_size`: the control size, set by the size classes: the height, and the width when the control is square.
|
|
48
|
+
- `--_motion`: the motion multiplier, `0` turns transitions off.
|
|
49
|
+
- `--_padding-inline`: the inline padding, set by the size classes.
|
|
50
|
+
|
|
51
|
+
The component declares them on itself, so set them on the component, not on a parent. Theme tokens are the ones to set on a parent:
|
|
52
|
+
|
|
53
|
+
```css
|
|
54
|
+
/* Does nothing: every .ui-button declares its own --_icon-size */
|
|
55
|
+
.toolbar {
|
|
56
|
+
--_icon-size: 1.25em;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Works */
|
|
60
|
+
.toolbar .ui-button {
|
|
61
|
+
--_icon-size: 1.25em;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Theme tokens inherit, so a parent is fine */
|
|
65
|
+
.toolbar {
|
|
66
|
+
--ui-button-radius: var(--ui-radius-round);
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Prefer inputs like `--_accent` over outputs like `--_bg-color`. The states set the outputs, so a new `--_bg-color` freezes the background in every state, while a new `--_accent` flows through all of them.
|
|
71
|
+
|
|
72
|
+
## Unlayered or your own layer
|
|
73
|
+
|
|
74
|
+
Unlayered CSS beats every [layer](https://open-props-ui.netlify.app/html/guide/concepts.md#cascade-layers), which is fine for most apps. If you use layers yourself, add one after `utils`: it beats the library and still loses to your unlayered one-off fixes.
|
|
75
|
+
|
|
76
|
+
```css
|
|
77
|
+
@layer openprops, theme, normalize, components.prose, components.root, components.extended, components.compat, utils, overrides;
|
|
78
|
+
@layer theme.palette, theme.base, theme.custom, theme.severity;
|
|
79
|
+
|
|
80
|
+
@layer overrides {
|
|
81
|
+
.ui-badge {
|
|
82
|
+
--_size: var(--ui-space-5);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# Description list
|
|
2
|
+
|
|
3
|
+
Description lists are used to display a list of terms and their descriptions.
|
|
4
|
+
|
|
5
|
+
- CSS: `opui-css/css/components/description-list.css`.
|
|
6
|
+
- Full docs with every example: [HTML](https://open-props-ui.netlify.app/html/components/description-list.md), [Astro](https://open-props-ui.netlify.app/astro/components/description-list.md), [React](https://open-props-ui.netlify.app/react/components/description-list.md), [Svelte](https://open-props-ui.netlify.app/svelte/components/description-list.md), [Vue](https://open-props-ui.netlify.app/vue/components/description-list.md).
|
|
7
|
+
|
|
8
|
+
## DescriptionList
|
|
9
|
+
|
|
10
|
+
### Parts
|
|
11
|
+
|
|
12
|
+
- `dl.ui-description-list` (root): Container element.
|
|
13
|
+
- `<div>` (`DescriptionListItem`): Groups a term with its description.
|
|
14
|
+
- `<dt>` (`DescriptionListTerm`): The term.
|
|
15
|
+
- `<dd>` (`DescriptionListDescription`): The description.
|
|
16
|
+
|
|
17
|
+
### Props and modifiers
|
|
18
|
+
|
|
19
|
+
- `bordered`: `boolean`, `.ui-bordered`. Adds a line between the term and the description.
|
|
20
|
+
- `dotted`: `boolean`, `.ui-dotted`. Makes the `bordered` line dotted.
|
|
21
|
+
- `orientation`: `"auto"` (default), `"horizontal"` (`.ui-horizontal`). The orientation of the items. `auto` stacks the term and the description when the list is `45ch` or narrower, `horizontal` keeps them side by side at any width.
|
|
22
|
+
|
|
23
|
+
### Slots
|
|
24
|
+
|
|
25
|
+
- `default`: The items.
|
|
26
|
+
|
|
27
|
+
## Component properties
|
|
28
|
+
|
|
29
|
+
Set inputs on the component, inline or in your CSS. Outputs follow the variant and state, so never override them.
|
|
30
|
+
|
|
31
|
+
### description-list.css
|
|
32
|
+
|
|
33
|
+
- `--_border-style`: Style of the line between term and description. `.ui-bordered.ui-dotted` makes it dotted.
|
|
34
|
+
- `--_border-width`: Width of the line between term and description. `.ui-bordered.ui-dotted` sets it to `2px`.
|
|
35
|
+
|
|
36
|
+
## Theme tokens
|
|
37
|
+
|
|
38
|
+
The stylesheets read `--ui-border-color`, `--ui-border-width`, `--ui-border-width-thick`, `--ui-font-weight-bold`, `--ui-space-1`, `--ui-space-3` and `--ui-text`. `theming.md` and `tokens.json` describe them.
|
|
39
|
+
|
|
40
|
+
## HTML
|
|
41
|
+
|
|
42
|
+
### Example: Basics
|
|
43
|
+
|
|
44
|
+
```html
|
|
45
|
+
<dl class="ui-description-list">
|
|
46
|
+
<div>
|
|
47
|
+
<dt>Price</dt>
|
|
48
|
+
<dd>6 950 000</dd>
|
|
49
|
+
</div>
|
|
50
|
+
<div>
|
|
51
|
+
<dt>Size</dt>
|
|
52
|
+
<dd>64 m²</dd>
|
|
53
|
+
</div>
|
|
54
|
+
<div>
|
|
55
|
+
<dt>Rooms</dt>
|
|
56
|
+
<dd>3</dd>
|
|
57
|
+
</div>
|
|
58
|
+
</dl>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Astro
|
|
62
|
+
|
|
63
|
+
`import { DescriptionList, DescriptionListDescription, DescriptionListItem, DescriptionListTerm } from "opui-css/astro"`
|
|
64
|
+
|
|
65
|
+
### Example: Basics
|
|
66
|
+
|
|
67
|
+
```astro
|
|
68
|
+
---
|
|
69
|
+
import {
|
|
70
|
+
DescriptionList,
|
|
71
|
+
DescriptionListDescription,
|
|
72
|
+
DescriptionListItem,
|
|
73
|
+
DescriptionListTerm,
|
|
74
|
+
} from "opui-css/astro"
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
<DescriptionList>
|
|
78
|
+
<DescriptionListItem>
|
|
79
|
+
<DescriptionListTerm>Price</DescriptionListTerm>
|
|
80
|
+
<DescriptionListDescription>6 950 000</DescriptionListDescription>
|
|
81
|
+
</DescriptionListItem>
|
|
82
|
+
<DescriptionListItem>
|
|
83
|
+
<DescriptionListTerm>Size</DescriptionListTerm>
|
|
84
|
+
<DescriptionListDescription>64 m²</DescriptionListDescription>
|
|
85
|
+
</DescriptionListItem>
|
|
86
|
+
<DescriptionListItem>
|
|
87
|
+
<DescriptionListTerm>Rooms</DescriptionListTerm>
|
|
88
|
+
<DescriptionListDescription>3</DescriptionListDescription>
|
|
89
|
+
</DescriptionListItem>
|
|
90
|
+
</DescriptionList>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## React
|
|
94
|
+
|
|
95
|
+
`import { DescriptionList, DescriptionListDescription, DescriptionListItem, DescriptionListTerm } from "opui-css/react"`
|
|
96
|
+
|
|
97
|
+
### Example: Basics
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
import {
|
|
101
|
+
DescriptionList,
|
|
102
|
+
DescriptionListDescription,
|
|
103
|
+
DescriptionListItem,
|
|
104
|
+
DescriptionListTerm,
|
|
105
|
+
} from "opui-css/react"
|
|
106
|
+
|
|
107
|
+
export default function Basics() {
|
|
108
|
+
return (
|
|
109
|
+
<DescriptionList>
|
|
110
|
+
<DescriptionListItem>
|
|
111
|
+
<DescriptionListTerm>Price</DescriptionListTerm>
|
|
112
|
+
<DescriptionListDescription>6 950 000</DescriptionListDescription>
|
|
113
|
+
</DescriptionListItem>
|
|
114
|
+
<DescriptionListItem>
|
|
115
|
+
<DescriptionListTerm>Size</DescriptionListTerm>
|
|
116
|
+
<DescriptionListDescription>64 m²</DescriptionListDescription>
|
|
117
|
+
</DescriptionListItem>
|
|
118
|
+
<DescriptionListItem>
|
|
119
|
+
<DescriptionListTerm>Rooms</DescriptionListTerm>
|
|
120
|
+
<DescriptionListDescription>3</DescriptionListDescription>
|
|
121
|
+
</DescriptionListItem>
|
|
122
|
+
</DescriptionList>
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Svelte
|
|
128
|
+
|
|
129
|
+
`import { DescriptionList, DescriptionListDescription, DescriptionListItem, DescriptionListTerm } from "opui-css/svelte"`
|
|
130
|
+
|
|
131
|
+
### Example: Basics
|
|
132
|
+
|
|
133
|
+
```svelte
|
|
134
|
+
<script lang="ts">
|
|
135
|
+
import {
|
|
136
|
+
DescriptionList,
|
|
137
|
+
DescriptionListDescription,
|
|
138
|
+
DescriptionListItem,
|
|
139
|
+
DescriptionListTerm,
|
|
140
|
+
} from "opui-css/svelte"
|
|
141
|
+
</script>
|
|
142
|
+
|
|
143
|
+
<DescriptionList>
|
|
144
|
+
<DescriptionListItem>
|
|
145
|
+
<DescriptionListTerm>Price</DescriptionListTerm>
|
|
146
|
+
<DescriptionListDescription>6 950 000</DescriptionListDescription>
|
|
147
|
+
</DescriptionListItem>
|
|
148
|
+
<DescriptionListItem>
|
|
149
|
+
<DescriptionListTerm>Size</DescriptionListTerm>
|
|
150
|
+
<DescriptionListDescription>64 m²</DescriptionListDescription>
|
|
151
|
+
</DescriptionListItem>
|
|
152
|
+
<DescriptionListItem>
|
|
153
|
+
<DescriptionListTerm>Rooms</DescriptionListTerm>
|
|
154
|
+
<DescriptionListDescription>3</DescriptionListDescription>
|
|
155
|
+
</DescriptionListItem>
|
|
156
|
+
</DescriptionList>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Vue
|
|
160
|
+
|
|
161
|
+
`import { DescriptionList, DescriptionListDescription, DescriptionListItem, DescriptionListTerm } from "opui-css/vue"`
|
|
162
|
+
|
|
163
|
+
### Example: Basics
|
|
164
|
+
|
|
165
|
+
```vue
|
|
166
|
+
<script setup lang="ts">
|
|
167
|
+
import {
|
|
168
|
+
DescriptionList,
|
|
169
|
+
DescriptionListDescription,
|
|
170
|
+
DescriptionListItem,
|
|
171
|
+
DescriptionListTerm,
|
|
172
|
+
} from "opui-css/vue"
|
|
173
|
+
</script>
|
|
174
|
+
|
|
175
|
+
<template>
|
|
176
|
+
<DescriptionList>
|
|
177
|
+
<DescriptionListItem>
|
|
178
|
+
<DescriptionListTerm>Price</DescriptionListTerm>
|
|
179
|
+
<DescriptionListDescription>6 950 000</DescriptionListDescription>
|
|
180
|
+
</DescriptionListItem>
|
|
181
|
+
<DescriptionListItem>
|
|
182
|
+
<DescriptionListTerm>Size</DescriptionListTerm>
|
|
183
|
+
<DescriptionListDescription>64 m²</DescriptionListDescription>
|
|
184
|
+
</DescriptionListItem>
|
|
185
|
+
<DescriptionListItem>
|
|
186
|
+
<DescriptionListTerm>Rooms</DescriptionListTerm>
|
|
187
|
+
<DescriptionListDescription>3</DescriptionListDescription>
|
|
188
|
+
</DescriptionListItem>
|
|
189
|
+
</DescriptionList>
|
|
190
|
+
</template>
|
|
191
|
+
```
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# Dialog
|
|
2
|
+
|
|
3
|
+
A minimally styled window overlaid on the main content. By design the Dialog is minimal with zero content to allow for both modal and non-modal use.
|
|
4
|
+
|
|
5
|
+
- CSS: `opui-css/css/components/dialog.css` and `opui-css/css/components/card.css`.
|
|
6
|
+
- Full docs with every example: [HTML](https://open-props-ui.netlify.app/html/components/dialog.md), [Astro](https://open-props-ui.netlify.app/astro/components/dialog.md), [React](https://open-props-ui.netlify.app/react/components/dialog.md), [Svelte](https://open-props-ui.netlify.app/svelte/components/dialog.md), [Vue](https://open-props-ui.netlify.app/vue/components/dialog.md).
|
|
7
|
+
|
|
8
|
+
## Dialog
|
|
9
|
+
|
|
10
|
+
### Parts
|
|
11
|
+
|
|
12
|
+
- `dialog.ui-dialog` (root): Container element.
|
|
13
|
+
- `.ui-header` (`DialogHeader`): The header, a row for the title and anything next to it.
|
|
14
|
+
- `<h2>` (`DialogTitle`): The title. Names the dialog through `aria-labelledby`.
|
|
15
|
+
- `.ui-content` (`DialogContent`): The scrollable content.
|
|
16
|
+
- `.ui-footer` (`DialogFooter`): The footer, a row at the end.
|
|
17
|
+
|
|
18
|
+
### Props and modifiers
|
|
19
|
+
|
|
20
|
+
- `closedby`: `"any" | "closerequest" | "none"`, `[closedby]`. How the dialog can be closed. `"any"` also closes it on a click outside.
|
|
21
|
+
|
|
22
|
+
### Slots
|
|
23
|
+
|
|
24
|
+
- `default`: The dialog parts, and any other content.
|
|
25
|
+
|
|
26
|
+
### Notes
|
|
27
|
+
|
|
28
|
+
- HTML: Add `.ui-elevated` to the root for the raised surface.
|
|
29
|
+
- Astro, React, Svelte and Vue: Attributes that aren't props go to the `<dialog>`, like `id`. Without `aria-label` or `aria-labelledby`, the `DialogTitle` names the dialog. A dialog without a `DialogTitle` needs an `aria-label`. An `id` on `DialogTitle` only applies when the dialog has `aria-label` or `aria-labelledby`.
|
|
30
|
+
|
|
31
|
+
## DialogFooter
|
|
32
|
+
|
|
33
|
+
### Parts
|
|
34
|
+
|
|
35
|
+
- `.ui-footer` (root): A row at the end, for buttons, text or anything else.
|
|
36
|
+
- `.ui-footer > .ui-actions`: Groups buttons. Moves to the end when other content comes first.
|
|
37
|
+
|
|
38
|
+
### Props and modifiers
|
|
39
|
+
|
|
40
|
+
- `align`: `"end"` (default), `"start"` (`.ui-align-start`). Alignment for the footer content.
|
|
41
|
+
|
|
42
|
+
### Slots
|
|
43
|
+
|
|
44
|
+
- `default`: The footer content, such as buttons.
|
|
45
|
+
|
|
46
|
+
## Component properties
|
|
47
|
+
|
|
48
|
+
Set inputs on the component, inline or in your CSS. Outputs follow the variant and state, so never override them.
|
|
49
|
+
|
|
50
|
+
### dialog.css
|
|
51
|
+
|
|
52
|
+
- `--_backdrop-bg-color`: The backdrop color. Defaults to `--ui-backdrop-bg-color`.
|
|
53
|
+
- `--_backdrop-blur`: The backdrop filter. Defaults to a `--ui-backdrop-blur` blur.
|
|
54
|
+
- `--_ease`: Easing of the open transition. Defaults to `--ui-ease-enter`.
|
|
55
|
+
- `--_elevated-shadow`: Shadow of the dialog. `card.css` declares it for `.ui-elevated` surfaces, and the dialog sets it to `--ui-shadow-overlay`, like `Drawer` and `Menu`.
|
|
56
|
+
- `--_max-inline-size`: Maximum width, capped to fit the viewport.
|
|
57
|
+
- `--_motion`: Motion multiplier for the transitions. `0` turns them off.
|
|
58
|
+
- `--_scroll-shadow`: Shadow at the edges of `.ui-content` when it scrolls. Defaults to `--ui-shadow-scroll`.
|
|
59
|
+
- `--_title-font-size`: Font size of the title, a heading in `.ui-header`. Defaults to `--ui-font-size-h4`.
|
|
60
|
+
|
|
61
|
+
Outputs: `--_duration`.
|
|
62
|
+
|
|
63
|
+
### card.css
|
|
64
|
+
|
|
65
|
+
- `--_ease`: Easing of the focus ring animation. Defaults to `--ui-ease`.
|
|
66
|
+
- `--_elevated-bg-color`: Background of `.ui-elevated`. Defaults to `--ui-surface-elevated`.
|
|
67
|
+
- `--_elevated-shadow`: Shadow of `.ui-elevated`. Defaults to `--ui-shadow-elevated`.
|
|
68
|
+
- `--_motion`: Motion multiplier for the focus ring animation. `0` turns it off.
|
|
69
|
+
- `--_outlined-border-color`: Border color of `.ui-outlined`. Defaults to `--ui-border-color`.
|
|
70
|
+
- `--_padding`: Padding of the header, content and actions. `--ui-card-padding`, or `--ui-space-3` when a theme leaves it unset.
|
|
71
|
+
- `--_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`.
|
|
72
|
+
- `--_tonal-bg-color`: Background of `.ui-tonal`. Defaults to `--ui-surface-tonal`.
|
|
73
|
+
|
|
74
|
+
Outputs: `--_bg-color`, `--_border-color`, `--_border-width`, `--_duration` and `--_shadow`.
|
|
75
|
+
|
|
76
|
+
## Theme tokens
|
|
77
|
+
|
|
78
|
+
The stylesheets read `--ui-backdrop-bg-color`, `--ui-backdrop-blur`, `--ui-border-color`, `--ui-border-color-on-raised`, `--ui-border-color-raised`, `--ui-border-width`, `--ui-card-padding`, `--ui-dialog-radius`, `--ui-duration`, `--ui-duration-slow`, `--ui-ease`, `--ui-ease-enter`, `--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-size-h4`, `--ui-letter-spacing-heading`, `--ui-line-height-tight`, `--ui-motion`, `--ui-radius`, `--ui-rhythm-step`, `--ui-shadow-elevated`, `--ui-shadow-overlay`, `--ui-shadow-scroll`, `--ui-shadow-surface`, `--ui-space-1`, `--ui-space-2`, `--ui-space-3`, `--ui-space-4`, `--ui-space-6`, `--ui-surface`, `--ui-surface-elevated`, `--ui-surface-tonal`, `--ui-text` and `--ui-text-strong`. `theming.md` and `tokens.json` describe them.
|
|
79
|
+
|
|
80
|
+
## HTML
|
|
81
|
+
|
|
82
|
+
### Example: Basics
|
|
83
|
+
|
|
84
|
+
```html
|
|
85
|
+
<button
|
|
86
|
+
type="button"
|
|
87
|
+
commandfor="dialog-basics-1"
|
|
88
|
+
command="show-modal"
|
|
89
|
+
class="ui-button ui-outlined"
|
|
90
|
+
>
|
|
91
|
+
Open dialog
|
|
92
|
+
</button>
|
|
93
|
+
|
|
94
|
+
<dialog
|
|
95
|
+
id="dialog-basics-1"
|
|
96
|
+
class="ui-dialog ui-elevated"
|
|
97
|
+
aria-labelledby="dialog-basics-1-title"
|
|
98
|
+
>
|
|
99
|
+
<div class="ui-header">
|
|
100
|
+
<h2 id="dialog-basics-1-title">Newsletter</h2>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="ui-content">
|
|
103
|
+
<p>
|
|
104
|
+
Get a short email when we ship something new. No more than once a month.
|
|
105
|
+
</p>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="ui-footer">
|
|
108
|
+
<button
|
|
109
|
+
commandfor="dialog-basics-1"
|
|
110
|
+
command="close"
|
|
111
|
+
class="ui-button"
|
|
112
|
+
type="button"
|
|
113
|
+
>
|
|
114
|
+
Not now
|
|
115
|
+
</button>
|
|
116
|
+
<button
|
|
117
|
+
commandfor="dialog-basics-1"
|
|
118
|
+
command="close"
|
|
119
|
+
class="ui-button ui-filled"
|
|
120
|
+
type="button"
|
|
121
|
+
>
|
|
122
|
+
Subscribe
|
|
123
|
+
</button>
|
|
124
|
+
</div>
|
|
125
|
+
</dialog>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Astro
|
|
129
|
+
|
|
130
|
+
`import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "opui-css/astro"`
|
|
131
|
+
|
|
132
|
+
### Example: Basics
|
|
133
|
+
|
|
134
|
+
```astro
|
|
135
|
+
---
|
|
136
|
+
import {
|
|
137
|
+
Button,
|
|
138
|
+
Dialog,
|
|
139
|
+
DialogContent,
|
|
140
|
+
DialogFooter,
|
|
141
|
+
DialogHeader,
|
|
142
|
+
DialogTitle,
|
|
143
|
+
} from "opui-css/astro"
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
<Button commandfor="dialog-basics-1" command="show-modal" variant="outlined">
|
|
147
|
+
Open dialog
|
|
148
|
+
</Button>
|
|
149
|
+
|
|
150
|
+
<Dialog id="dialog-basics-1">
|
|
151
|
+
<DialogHeader>
|
|
152
|
+
<DialogTitle>Newsletter</DialogTitle>
|
|
153
|
+
</DialogHeader>
|
|
154
|
+
<DialogContent>
|
|
155
|
+
<p>
|
|
156
|
+
Get a short email when we ship something new. No more than once a month.
|
|
157
|
+
</p>
|
|
158
|
+
</DialogContent>
|
|
159
|
+
<DialogFooter>
|
|
160
|
+
<Button commandfor="dialog-basics-1" command="close"> Not now </Button>
|
|
161
|
+
<Button commandfor="dialog-basics-1" command="close" variant="filled">
|
|
162
|
+
Subscribe
|
|
163
|
+
</Button>
|
|
164
|
+
</DialogFooter>
|
|
165
|
+
</Dialog>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## React
|
|
169
|
+
|
|
170
|
+
`import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "opui-css/react"`
|
|
171
|
+
|
|
172
|
+
- Client components (`"use client"`): `Dialog`.
|
|
173
|
+
|
|
174
|
+
### Example: Basics
|
|
175
|
+
|
|
176
|
+
```tsx
|
|
177
|
+
import {
|
|
178
|
+
Button,
|
|
179
|
+
Dialog,
|
|
180
|
+
DialogContent,
|
|
181
|
+
DialogFooter,
|
|
182
|
+
DialogHeader,
|
|
183
|
+
DialogTitle,
|
|
184
|
+
} from "opui-css/react"
|
|
185
|
+
|
|
186
|
+
export default function Basics() {
|
|
187
|
+
return (
|
|
188
|
+
<>
|
|
189
|
+
<Button
|
|
190
|
+
commandfor="dialog-basics-1"
|
|
191
|
+
command="show-modal"
|
|
192
|
+
variant="outlined"
|
|
193
|
+
>
|
|
194
|
+
Open dialog
|
|
195
|
+
</Button>
|
|
196
|
+
|
|
197
|
+
<Dialog id="dialog-basics-1">
|
|
198
|
+
<DialogHeader>
|
|
199
|
+
<DialogTitle>Newsletter</DialogTitle>
|
|
200
|
+
</DialogHeader>
|
|
201
|
+
<DialogContent>
|
|
202
|
+
<p>
|
|
203
|
+
Get a short email when we ship something new. No more than once a
|
|
204
|
+
month.
|
|
205
|
+
</p>
|
|
206
|
+
</DialogContent>
|
|
207
|
+
<DialogFooter>
|
|
208
|
+
<Button commandfor="dialog-basics-1" command="close">
|
|
209
|
+
Not now
|
|
210
|
+
</Button>
|
|
211
|
+
<Button commandfor="dialog-basics-1" command="close" variant="filled">
|
|
212
|
+
Subscribe
|
|
213
|
+
</Button>
|
|
214
|
+
</DialogFooter>
|
|
215
|
+
</Dialog>
|
|
216
|
+
</>
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Svelte
|
|
222
|
+
|
|
223
|
+
`import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "opui-css/svelte"`
|
|
224
|
+
|
|
225
|
+
### Example: Basics
|
|
226
|
+
|
|
227
|
+
```svelte
|
|
228
|
+
<script lang="ts">
|
|
229
|
+
import {
|
|
230
|
+
Button,
|
|
231
|
+
Dialog,
|
|
232
|
+
DialogContent,
|
|
233
|
+
DialogFooter,
|
|
234
|
+
DialogHeader,
|
|
235
|
+
DialogTitle,
|
|
236
|
+
} from "opui-css/svelte"
|
|
237
|
+
</script>
|
|
238
|
+
|
|
239
|
+
<Button commandfor="dialog-basics-1" command="show-modal" variant="outlined">
|
|
240
|
+
Open dialog
|
|
241
|
+
</Button>
|
|
242
|
+
|
|
243
|
+
<Dialog id="dialog-basics-1">
|
|
244
|
+
<DialogHeader>
|
|
245
|
+
<DialogTitle>Newsletter</DialogTitle>
|
|
246
|
+
</DialogHeader>
|
|
247
|
+
<DialogContent>
|
|
248
|
+
<p>
|
|
249
|
+
Get a short email when we ship something new. No more than once a month.
|
|
250
|
+
</p>
|
|
251
|
+
</DialogContent>
|
|
252
|
+
<DialogFooter>
|
|
253
|
+
<Button commandfor="dialog-basics-1" command="close">Not now</Button>
|
|
254
|
+
<Button commandfor="dialog-basics-1" command="close" variant="filled">
|
|
255
|
+
Subscribe
|
|
256
|
+
</Button>
|
|
257
|
+
</DialogFooter>
|
|
258
|
+
</Dialog>
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## Vue
|
|
262
|
+
|
|
263
|
+
`import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "opui-css/vue"`
|
|
264
|
+
|
|
265
|
+
### Example: Basics
|
|
266
|
+
|
|
267
|
+
```vue
|
|
268
|
+
<script setup lang="ts">
|
|
269
|
+
import {
|
|
270
|
+
Button,
|
|
271
|
+
Dialog,
|
|
272
|
+
DialogContent,
|
|
273
|
+
DialogFooter,
|
|
274
|
+
DialogHeader,
|
|
275
|
+
DialogTitle,
|
|
276
|
+
} from "opui-css/vue"
|
|
277
|
+
</script>
|
|
278
|
+
|
|
279
|
+
<template>
|
|
280
|
+
<Button commandfor="dialog-basics-1" command="show-modal" variant="outlined">
|
|
281
|
+
Open dialog
|
|
282
|
+
</Button>
|
|
283
|
+
|
|
284
|
+
<Dialog id="dialog-basics-1">
|
|
285
|
+
<DialogHeader>
|
|
286
|
+
<DialogTitle>Newsletter</DialogTitle>
|
|
287
|
+
</DialogHeader>
|
|
288
|
+
<DialogContent>
|
|
289
|
+
<p>
|
|
290
|
+
Get a short email when we ship something new. No more than once a month.
|
|
291
|
+
</p>
|
|
292
|
+
</DialogContent>
|
|
293
|
+
<DialogFooter>
|
|
294
|
+
<Button commandfor="dialog-basics-1" command="close"> Not now </Button>
|
|
295
|
+
<Button commandfor="dialog-basics-1" command="close" variant="filled">
|
|
296
|
+
Subscribe
|
|
297
|
+
</Button>
|
|
298
|
+
</DialogFooter>
|
|
299
|
+
</Dialog>
|
|
300
|
+
</template>
|
|
301
|
+
```
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Divider
|
|
2
|
+
|
|
3
|
+
It's just a line.
|
|
4
|
+
|
|
5
|
+
- CSS: `opui-css/css/components/divider.css`.
|
|
6
|
+
- Full docs with every example: [HTML](https://open-props-ui.netlify.app/html/components/divider.md), [Astro](https://open-props-ui.netlify.app/astro/components/divider.md), [React](https://open-props-ui.netlify.app/react/components/divider.md), [Svelte](https://open-props-ui.netlify.app/svelte/components/divider.md), [Vue](https://open-props-ui.netlify.app/vue/components/divider.md).
|
|
7
|
+
|
|
8
|
+
## Divider
|
|
9
|
+
|
|
10
|
+
### Parts
|
|
11
|
+
|
|
12
|
+
- `.ui-divider` (root): The divider line. An `<hr>`, or a `<div>` or `<p>` with content in the middle.
|
|
13
|
+
|
|
14
|
+
### Props and modifiers
|
|
15
|
+
|
|
16
|
+
- `align`: `"center"` (default), `"end"` (`.ui-align-end`), `"start"` (`.ui-align-start`). Where the content sits on the line.
|
|
17
|
+
- `color`: `"primary"` (`.ui-primary`). Optional colors.
|
|
18
|
+
- `variant`: `"filled"` (`.ui-filled`), `"outlined"` (default), `"tonal"` (`.ui-tonal`). The variant to use.
|
|
19
|
+
|
|
20
|
+
### Slots
|
|
21
|
+
|
|
22
|
+
- `default`: Optional content in the middle of the line. Renders a `<div>`.
|
|
23
|
+
|
|
24
|
+
## Component properties
|
|
25
|
+
|
|
26
|
+
Set inputs on the component, inline or in your CSS. Outputs follow the variant and state, so never override them.
|
|
27
|
+
|
|
28
|
+
### divider.css
|
|
29
|
+
|
|
30
|
+
- `--_divider-border-color`: The line color. Defaults to `--ui-border-color`, `.ui-filled`, `.ui-primary` and `.ui-tonal` set it.
|
|
31
|
+
|
|
32
|
+
## Theme tokens
|
|
33
|
+
|
|
34
|
+
The stylesheets read `--ui-border-color`, `--ui-border-width`, `--ui-divider-gap`, `--ui-font-size-caption`, `--ui-primary`, `--ui-space-3`, `--ui-space-4`, `--ui-surface-filled`, `--ui-surface-tonal` and `--ui-text`. `theming.md` and `tokens.json` describe them.
|
|
35
|
+
|
|
36
|
+
## HTML
|
|
37
|
+
|
|
38
|
+
### Example: Basics
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
This text is placed over
|
|
42
|
+
<hr class="ui-divider" />
|
|
43
|
+
This text is placed under
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Astro
|
|
47
|
+
|
|
48
|
+
`import { Divider } from "opui-css/astro"`
|
|
49
|
+
|
|
50
|
+
### Example: Basics
|
|
51
|
+
|
|
52
|
+
```astro
|
|
53
|
+
---
|
|
54
|
+
import { Divider } from "opui-css/astro"
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
This text is placed over
|
|
58
|
+
<Divider />
|
|
59
|
+
This text is placed under
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## React
|
|
63
|
+
|
|
64
|
+
`import { Divider } from "opui-css/react"`
|
|
65
|
+
|
|
66
|
+
### Example: Basics
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
import { Divider } from "opui-css/react"
|
|
70
|
+
|
|
71
|
+
export default function Basics() {
|
|
72
|
+
return (
|
|
73
|
+
<>
|
|
74
|
+
This text is placed over <Divider /> This text is placed under
|
|
75
|
+
</>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Svelte
|
|
81
|
+
|
|
82
|
+
`import { Divider } from "opui-css/svelte"`
|
|
83
|
+
|
|
84
|
+
### Example: Basics
|
|
85
|
+
|
|
86
|
+
```svelte
|
|
87
|
+
<script lang="ts">
|
|
88
|
+
import { Divider } from "opui-css/svelte"
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
This text is placed over
|
|
92
|
+
<Divider />
|
|
93
|
+
This text is placed under
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Vue
|
|
97
|
+
|
|
98
|
+
`import { Divider } from "opui-css/vue"`
|
|
99
|
+
|
|
100
|
+
### Example: Basics
|
|
101
|
+
|
|
102
|
+
```vue
|
|
103
|
+
<script setup lang="ts">
|
|
104
|
+
import { Divider } from "opui-css/vue"
|
|
105
|
+
</script>
|
|
106
|
+
|
|
107
|
+
<template>
|
|
108
|
+
This text is placed over
|
|
109
|
+
<Divider />
|
|
110
|
+
This text is placed under
|
|
111
|
+
</template>
|
|
112
|
+
```
|