opui-css 5.0.0 → 5.0.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 +282 -276
- package/LICENSE +21 -21
- package/MIGRATING.md +127 -127
- package/README.md +87 -87
- package/astro/index.ts +46 -46
- package/components/AGENTS.md +248 -248
- package/components/Accordion/Accordion.astro +42 -42
- package/components/Anchor/Anchor.astro +51 -51
- package/components/Avatar/Avatar.astro +38 -38
- package/components/Badge/Badge.astro +59 -59
- package/components/Button/Button.astro +45 -45
- package/components/ButtonGroup/ButtonGroup.astro +29 -29
- package/components/Callout/Callout.astro +75 -75
- package/components/Card/Card.astro +36 -36
- package/components/Checkbox/Checkbox.astro +76 -76
- package/components/Checkbox/CheckboxInput.astro +32 -32
- package/components/Chip/Chip.astro +37 -37
- package/components/ClassicSelect/ClassicSelect.astro +83 -83
- package/components/DescriptionList/Description.astro +12 -12
- package/components/DescriptionList/DescriptionList.astro +22 -22
- package/components/DescriptionList/Item.astro +12 -12
- package/components/DescriptionList/Term.astro +12 -12
- package/components/DescriptionList/index.ts +12 -12
- package/components/Dialog/Dialog.astro +41 -41
- package/components/Divider/Divider.astro +17 -17
- package/components/Drawer/Drawer.astro +49 -49
- package/components/Drawer/DrawerFooter.astro +14 -14
- package/components/Drawer/DrawerHeader.astro +31 -31
- package/components/FieldDescription/FieldDescription.astro +13 -13
- package/components/FieldGroup/FieldGroup.astro +31 -31
- package/components/FieldLegend/FieldLegend.astro +15 -15
- package/components/FieldSet/FieldSet.astro +15 -15
- package/components/Form/Form.astro +15 -15
- package/components/IconButton/IconButton.astro +26 -26
- package/components/List/List.astro +36 -36
- package/components/ListItem/ListItem.astro +118 -118
- package/components/Progress/Progress.astro +41 -40
- package/components/Radio/Radio.astro +70 -70
- package/components/Radio/RadioInput.astro +24 -24
- package/components/Range/Range.astro +136 -136
- package/components/Select/Select.astro +106 -106
- package/components/Switch/Switch.astro +101 -101
- package/components/Switch/SwitchInput.astro +25 -25
- package/components/Table/Body.astro +13 -13
- package/components/Table/Cell.astro +13 -13
- package/components/Table/Column.astro +15 -15
- package/components/Table/ColumnGroup.astro +13 -13
- package/components/Table/Head.astro +13 -13
- package/components/Table/HeaderCell.astro +13 -13
- package/components/Table/Row.astro +13 -13
- package/components/Table/Table.astro +18 -18
- package/components/Table/index.ts +20 -20
- package/components/Tabs/Tabs.astro +28 -28
- package/components/Tabs/TabsItem.astro +47 -47
- package/components/Tabs/TabsPanel.astro +21 -21
- package/components/Tabs/TabsTab.astro +19 -19
- package/components/Tabs/index.ts +14 -14
- package/components/TextField/TextField.astro +128 -128
- package/components/Textarea/Textarea.astro +106 -106
- package/components/Toast/Toast.astro +42 -42
- package/components/ToggleButton/ToggleButton.astro +53 -53
- package/components/ToggleGroup/ToggleGroup.astro +49 -49
- package/components/Tooltip/Tooltip.astro +30 -30
- package/core/normalize.css +194 -194
- package/core/palette.css +59 -59
- package/core/utils.css +71 -71
- package/css/components/accordion.css +174 -174
- package/css/components/anchor.css +27 -27
- package/css/components/avatar.css +65 -65
- package/css/components/badge.css +107 -107
- package/css/components/button-group.css +179 -179
- package/css/components/button.css +215 -215
- package/css/components/callout.css +109 -109
- package/css/components/card.css +117 -117
- package/css/components/checkbox.css +205 -205
- package/css/components/chip.css +87 -87
- package/css/components/description-list.css +80 -80
- package/css/components/dialog.css +68 -68
- package/css/components/divider.css +20 -20
- package/css/components/drawer.css +171 -171
- package/css/components/form.css +146 -146
- package/css/components/icon-button.css +139 -139
- package/css/components/link.css +21 -21
- package/css/components/list.css +345 -345
- package/css/components/progress.css +102 -97
- package/css/components/radio.css +172 -172
- package/css/components/range.css +337 -337
- package/css/components/select.css +169 -169
- package/css/components/spinner.css +37 -37
- package/css/components/switch.css +268 -268
- package/css/components/table.css +179 -179
- package/css/components/tabs.css +83 -83
- package/css/components/text-field.css +450 -450
- package/css/components/text-input.css +64 -64
- package/css/components/textarea.css +24 -24
- package/css/components/toast.css +161 -161
- package/css/components/toggle-button.css +87 -87
- package/css/components/toggle-group.css +56 -56
- package/css/components/tooltip.css +67 -67
- package/css/components/typography.css +585 -585
- package/css/components.css +41 -41
- package/css/imports.css +16 -16
- package/css/js/checkbox.js +21 -21
- package/css/js/toast.js +94 -94
- package/css/theme.css +132 -132
- package/dist/op.css +65 -65
- package/dist/op.css.map +1 -1
- package/dist/opui.components.css +5159 -5154
- package/dist/opui.components.css.map +1 -1
- package/dist/opui.css +5668 -5663
- package/dist/opui.css.map +1 -1
- package/env.d.ts +14 -14
- package/open-props.css +9 -9
- package/package.json +81 -81
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
---
|
|
2
|
-
type Props = {
|
|
3
|
-
[key: string]: any
|
|
4
|
-
alignment?: string
|
|
5
|
-
class?: string
|
|
6
|
-
id?: string
|
|
7
|
-
trigger?: "always" | "hover"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const title = "Anchor"
|
|
11
|
-
|
|
12
|
-
const {
|
|
13
|
-
alignment,
|
|
14
|
-
class: className,
|
|
15
|
-
id: idProp,
|
|
16
|
-
trigger = "always",
|
|
17
|
-
...rest
|
|
18
|
-
} = Astro.props
|
|
19
|
-
|
|
20
|
-
const isHover = trigger === "hover"
|
|
21
|
-
const id = isHover ? (idProp ?? Astro.locals.$id("anchor")) : undefined
|
|
22
|
-
|
|
23
|
-
const insetMap: Record<string, string> = {
|
|
24
|
-
"start start": "auto 100% 100% auto",
|
|
25
|
-
"start end": "auto auto 100% 100%",
|
|
26
|
-
"end start": "100% 100% auto auto",
|
|
27
|
-
"end end": "100% auto auto 100%",
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const positionArea = alignment
|
|
31
|
-
? {
|
|
32
|
-
"--anchor-position-area": alignment,
|
|
33
|
-
"--_anchor-inset": insetMap[alignment],
|
|
34
|
-
}
|
|
35
|
-
: {}
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
<span class:list={["ui-anchor", className]} style={positionArea} {...rest}>
|
|
39
|
-
{
|
|
40
|
-
isHover ? (
|
|
41
|
-
<span {...({ interestfor: id } as any)}>
|
|
42
|
-
<slot />
|
|
43
|
-
</span>
|
|
44
|
-
) : (
|
|
45
|
-
<slot />
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
<span class="ui-anchor-floating" id={id} popover={isHover ? "hint" : undefined}>
|
|
49
|
-
<slot name="anchored" />
|
|
50
|
-
</span>
|
|
51
|
-
</span>
|
|
1
|
+
---
|
|
2
|
+
type Props = {
|
|
3
|
+
[key: string]: any
|
|
4
|
+
alignment?: string
|
|
5
|
+
class?: string
|
|
6
|
+
id?: string
|
|
7
|
+
trigger?: "always" | "hover"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const title = "Anchor"
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
alignment,
|
|
14
|
+
class: className,
|
|
15
|
+
id: idProp,
|
|
16
|
+
trigger = "always",
|
|
17
|
+
...rest
|
|
18
|
+
} = Astro.props
|
|
19
|
+
|
|
20
|
+
const isHover = trigger === "hover"
|
|
21
|
+
const id = isHover ? (idProp ?? Astro.locals.$id("anchor")) : undefined
|
|
22
|
+
|
|
23
|
+
const insetMap: Record<string, string> = {
|
|
24
|
+
"start start": "auto 100% 100% auto",
|
|
25
|
+
"start end": "auto auto 100% 100%",
|
|
26
|
+
"end start": "100% 100% auto auto",
|
|
27
|
+
"end end": "100% auto auto 100%",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const positionArea = alignment
|
|
31
|
+
? {
|
|
32
|
+
"--anchor-position-area": alignment,
|
|
33
|
+
"--_anchor-inset": insetMap[alignment],
|
|
34
|
+
}
|
|
35
|
+
: {}
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
<span class:list={["ui-anchor", className]} style={positionArea} {...rest}>
|
|
39
|
+
{
|
|
40
|
+
isHover ? (
|
|
41
|
+
<span {...({ interestfor: id } as any)}>
|
|
42
|
+
<slot />
|
|
43
|
+
</span>
|
|
44
|
+
) : (
|
|
45
|
+
<slot />
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
<span class="ui-anchor-floating" id={id} popover={isHover ? "hint" : undefined}>
|
|
49
|
+
<slot name="anchored" />
|
|
50
|
+
</span>
|
|
51
|
+
</span>
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
---
|
|
2
|
-
type Props = {
|
|
3
|
-
[key: string]: any
|
|
4
|
-
alt?: string
|
|
5
|
-
as?: "div" | "a" | "button" | string
|
|
6
|
-
class?: string
|
|
7
|
-
href?: string
|
|
8
|
-
isGroup?: boolean
|
|
9
|
-
src?: string
|
|
10
|
-
variant?: "squared" | "rounded" | "squircle"
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const title = "Avatar"
|
|
14
|
-
|
|
15
|
-
const {
|
|
16
|
-
alt,
|
|
17
|
-
as,
|
|
18
|
-
class: className,
|
|
19
|
-
href,
|
|
20
|
-
isGroup,
|
|
21
|
-
src,
|
|
22
|
-
variant,
|
|
23
|
-
...rest
|
|
24
|
-
} = Astro.props
|
|
25
|
-
|
|
26
|
-
const Tag = as || (href ? "a" : "div")
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
<!-- prettier-ignore -->
|
|
30
|
-
<Tag
|
|
31
|
-
class:list={[
|
|
32
|
-
{ "ui-avatar": !isGroup },
|
|
33
|
-
!isGroup && variant && `ui-${variant}`,
|
|
34
|
-
className,
|
|
35
|
-
]}
|
|
36
|
-
href={href}
|
|
37
|
-
role={isGroup ? "group" : undefined}
|
|
38
|
-
{...rest}>{src ? <img src={src} alt={alt} /> : <slot />}</Tag>
|
|
1
|
+
---
|
|
2
|
+
type Props = {
|
|
3
|
+
[key: string]: any
|
|
4
|
+
alt?: string
|
|
5
|
+
as?: "div" | "a" | "button" | string
|
|
6
|
+
class?: string
|
|
7
|
+
href?: string
|
|
8
|
+
isGroup?: boolean
|
|
9
|
+
src?: string
|
|
10
|
+
variant?: "squared" | "rounded" | "squircle"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const title = "Avatar"
|
|
14
|
+
|
|
15
|
+
const {
|
|
16
|
+
alt,
|
|
17
|
+
as,
|
|
18
|
+
class: className,
|
|
19
|
+
href,
|
|
20
|
+
isGroup,
|
|
21
|
+
src,
|
|
22
|
+
variant,
|
|
23
|
+
...rest
|
|
24
|
+
} = Astro.props
|
|
25
|
+
|
|
26
|
+
const Tag = as || (href ? "a" : "div")
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
<!-- prettier-ignore -->
|
|
30
|
+
<Tag
|
|
31
|
+
class:list={[
|
|
32
|
+
{ "ui-avatar": !isGroup },
|
|
33
|
+
!isGroup && variant && `ui-${variant}`,
|
|
34
|
+
className,
|
|
35
|
+
]}
|
|
36
|
+
href={href}
|
|
37
|
+
role={isGroup ? "group" : undefined}
|
|
38
|
+
{...rest}>{src ? <img src={src} alt={alt} /> : <slot />}</Tag>
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
---
|
|
2
|
-
import Anchor from "../Anchor/Anchor.astro"
|
|
3
|
-
|
|
4
|
-
type Props = {
|
|
5
|
-
[key: string]: any
|
|
6
|
-
alignment?: "start-start" | "end-start" | "end-end"
|
|
7
|
-
class?: string
|
|
8
|
-
color?: "critical" | "info" | "neutral" | "success" | "warning"
|
|
9
|
-
dot?: boolean
|
|
10
|
-
invisible?: boolean
|
|
11
|
-
label?: string | number
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const title = "Badge"
|
|
15
|
-
|
|
16
|
-
const {
|
|
17
|
-
alignment,
|
|
18
|
-
class: className,
|
|
19
|
-
color,
|
|
20
|
-
dot,
|
|
21
|
-
invisible,
|
|
22
|
-
label,
|
|
23
|
-
...rest
|
|
24
|
-
} = Astro.props
|
|
25
|
-
|
|
26
|
-
const positionArea =
|
|
27
|
-
alignment === "start-start"
|
|
28
|
-
? "start start"
|
|
29
|
-
: alignment === "end-start"
|
|
30
|
-
? "end start"
|
|
31
|
-
: alignment === "end-end"
|
|
32
|
-
? "end end"
|
|
33
|
-
: undefined
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
<Anchor
|
|
37
|
-
alignment={positionArea}
|
|
38
|
-
class:list={[
|
|
39
|
-
"ui-badge",
|
|
40
|
-
{
|
|
41
|
-
"ui-dot": dot,
|
|
42
|
-
"ui-invisible": invisible,
|
|
43
|
-
},
|
|
44
|
-
alignment && `ui-${alignment}`,
|
|
45
|
-
className,
|
|
46
|
-
color && `ui-${color}`,
|
|
47
|
-
]}
|
|
48
|
-
{...rest}
|
|
49
|
-
>
|
|
50
|
-
<slot />
|
|
51
|
-
<span
|
|
52
|
-
class="ui-badge-indicator"
|
|
53
|
-
slot="anchored"
|
|
54
|
-
aria-label={label?.toString()}
|
|
55
|
-
>
|
|
56
|
-
{dot ? "" : label}
|
|
57
|
-
{!dot && <slot name="indicator" />}
|
|
58
|
-
</span>
|
|
59
|
-
</Anchor>
|
|
1
|
+
---
|
|
2
|
+
import Anchor from "../Anchor/Anchor.astro"
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
[key: string]: any
|
|
6
|
+
alignment?: "start-start" | "end-start" | "end-end"
|
|
7
|
+
class?: string
|
|
8
|
+
color?: "critical" | "info" | "neutral" | "success" | "warning"
|
|
9
|
+
dot?: boolean
|
|
10
|
+
invisible?: boolean
|
|
11
|
+
label?: string | number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const title = "Badge"
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
alignment,
|
|
18
|
+
class: className,
|
|
19
|
+
color,
|
|
20
|
+
dot,
|
|
21
|
+
invisible,
|
|
22
|
+
label,
|
|
23
|
+
...rest
|
|
24
|
+
} = Astro.props
|
|
25
|
+
|
|
26
|
+
const positionArea =
|
|
27
|
+
alignment === "start-start"
|
|
28
|
+
? "start start"
|
|
29
|
+
: alignment === "end-start"
|
|
30
|
+
? "end start"
|
|
31
|
+
: alignment === "end-end"
|
|
32
|
+
? "end end"
|
|
33
|
+
: undefined
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
<Anchor
|
|
37
|
+
alignment={positionArea}
|
|
38
|
+
class:list={[
|
|
39
|
+
"ui-badge",
|
|
40
|
+
{
|
|
41
|
+
"ui-dot": dot,
|
|
42
|
+
"ui-invisible": invisible,
|
|
43
|
+
},
|
|
44
|
+
alignment && `ui-${alignment}`,
|
|
45
|
+
className,
|
|
46
|
+
color && `ui-${color}`,
|
|
47
|
+
]}
|
|
48
|
+
{...rest}
|
|
49
|
+
>
|
|
50
|
+
<slot />
|
|
51
|
+
<span
|
|
52
|
+
class="ui-badge-indicator"
|
|
53
|
+
slot="anchored"
|
|
54
|
+
aria-label={label?.toString()}
|
|
55
|
+
>
|
|
56
|
+
{dot ? "" : label}
|
|
57
|
+
{!dot && <slot name="indicator" />}
|
|
58
|
+
</span>
|
|
59
|
+
</Anchor>
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
---
|
|
2
|
-
type CommonProps = {
|
|
3
|
-
[key: string]: any
|
|
4
|
-
as?: string
|
|
5
|
-
class?: string
|
|
6
|
-
color?: "critical" | "primary"
|
|
7
|
-
size?: "x-small" | "small" | "large"
|
|
8
|
-
variant?: "outlined" | "tonal" | "filled"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
type AnchorProps = CommonProps & {
|
|
12
|
-
disabled?: never
|
|
13
|
-
href: string
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type ButtonProps = CommonProps & {
|
|
17
|
-
disabled?: boolean
|
|
18
|
-
href?: undefined
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
type Props = AnchorProps | ButtonProps
|
|
22
|
-
|
|
23
|
-
export const title = "Button"
|
|
24
|
-
|
|
25
|
-
const {
|
|
26
|
-
as,
|
|
27
|
-
class: className,
|
|
28
|
-
color,
|
|
29
|
-
disabled,
|
|
30
|
-
href,
|
|
31
|
-
size,
|
|
32
|
-
variant,
|
|
33
|
-
...rest
|
|
34
|
-
} = Astro.props
|
|
35
|
-
|
|
36
|
-
const Tag = as || (href ? "a" : "button")
|
|
37
|
-
const isButton = Tag === "button"
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
<!-- prettier-ignore -->
|
|
41
|
-
<Tag
|
|
42
|
-
class:list={["ui-button", { "ui-disabled": isButton && disabled }, size && `ui-${size}`, variant && `ui-${variant}`, color && `ui-${color}`, className]}
|
|
43
|
-
disabled={isButton ? disabled : undefined}
|
|
44
|
-
href={href}
|
|
45
|
-
{...rest}><slot /></Tag>
|
|
1
|
+
---
|
|
2
|
+
type CommonProps = {
|
|
3
|
+
[key: string]: any
|
|
4
|
+
as?: string
|
|
5
|
+
class?: string
|
|
6
|
+
color?: "critical" | "primary"
|
|
7
|
+
size?: "x-small" | "small" | "large"
|
|
8
|
+
variant?: "outlined" | "tonal" | "filled"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type AnchorProps = CommonProps & {
|
|
12
|
+
disabled?: never
|
|
13
|
+
href: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type ButtonProps = CommonProps & {
|
|
17
|
+
disabled?: boolean
|
|
18
|
+
href?: undefined
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type Props = AnchorProps | ButtonProps
|
|
22
|
+
|
|
23
|
+
export const title = "Button"
|
|
24
|
+
|
|
25
|
+
const {
|
|
26
|
+
as,
|
|
27
|
+
class: className,
|
|
28
|
+
color,
|
|
29
|
+
disabled,
|
|
30
|
+
href,
|
|
31
|
+
size,
|
|
32
|
+
variant,
|
|
33
|
+
...rest
|
|
34
|
+
} = Astro.props
|
|
35
|
+
|
|
36
|
+
const Tag = as || (href ? "a" : "button")
|
|
37
|
+
const isButton = Tag === "button"
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
<!-- prettier-ignore -->
|
|
41
|
+
<Tag
|
|
42
|
+
class:list={["ui-button", { "ui-disabled": isButton && disabled }, size && `ui-${size}`, variant && `ui-${variant}`, color && `ui-${color}`, className]}
|
|
43
|
+
disabled={isButton ? disabled : undefined}
|
|
44
|
+
href={href}
|
|
45
|
+
{...rest}><slot /></Tag>
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
---
|
|
2
|
-
type Props = {
|
|
3
|
-
[key: string]: any
|
|
4
|
-
class?: string
|
|
5
|
-
color?: "critical" | "primary"
|
|
6
|
-
orientation?: "vertical"
|
|
7
|
-
size?: "small" | "large"
|
|
8
|
-
variant?: "outlined" | "tonal" | "filled"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const title = "Button Group"
|
|
12
|
-
|
|
13
|
-
const {
|
|
14
|
-
class: className,
|
|
15
|
-
color,
|
|
16
|
-
orientation,
|
|
17
|
-
size,
|
|
18
|
-
variant,
|
|
19
|
-
...rest
|
|
20
|
-
} = Astro.props
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
<div
|
|
24
|
-
class:list={["ui-button-group", color && `ui-${color}`, size && `ui-${size}`, variant && `ui-${variant}`, orientation && `ui-${orientation}`, className]}
|
|
25
|
-
role="group"
|
|
26
|
-
{...rest}
|
|
27
|
-
>
|
|
28
|
-
<slot />
|
|
29
|
-
</div>
|
|
1
|
+
---
|
|
2
|
+
type Props = {
|
|
3
|
+
[key: string]: any
|
|
4
|
+
class?: string
|
|
5
|
+
color?: "critical" | "primary"
|
|
6
|
+
orientation?: "vertical"
|
|
7
|
+
size?: "small" | "large"
|
|
8
|
+
variant?: "outlined" | "tonal" | "filled"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const title = "Button Group"
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
class: className,
|
|
15
|
+
color,
|
|
16
|
+
orientation,
|
|
17
|
+
size,
|
|
18
|
+
variant,
|
|
19
|
+
...rest
|
|
20
|
+
} = Astro.props
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<div
|
|
24
|
+
class:list={["ui-button-group", color && `ui-${color}`, size && `ui-${size}`, variant && `ui-${variant}`, orientation && `ui-${orientation}`, className]}
|
|
25
|
+
role="group"
|
|
26
|
+
{...rest}
|
|
27
|
+
>
|
|
28
|
+
<slot />
|
|
29
|
+
</div>
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
---
|
|
2
|
-
type Props = {
|
|
3
|
-
[key: string]: any
|
|
4
|
-
class?: string
|
|
5
|
-
severity?: "critical" | "info" | "neutral" | "success" | "warning"
|
|
6
|
-
variant?: "tonal" | "outlined"
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const title = "Callout"
|
|
10
|
-
|
|
11
|
-
const { class: className, severity, variant, ...rest } = Astro.props
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<article
|
|
15
|
-
role="note"
|
|
16
|
-
class:list={["ui-callout", variant && `ui-${variant}`, severity && `ui-${severity}`, className]}
|
|
17
|
-
{...rest}
|
|
18
|
-
>
|
|
19
|
-
<slot name="icon">
|
|
20
|
-
{
|
|
21
|
-
severity === "info" && (
|
|
22
|
-
<svg
|
|
23
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
-
width="32"
|
|
25
|
-
height="32"
|
|
26
|
-
viewBox="0 0 32 32"
|
|
27
|
-
>
|
|
28
|
-
<path
|
|
29
|
-
fill="currentColor"
|
|
30
|
-
d="M16 13a1 1 0 0 1 1 1v9a1 1 0 1 1-2 0v-9a1 1 0 0 1 1-1m0-2a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3M2 16C2 8.268 8.268 2 16 2s14 6.268 14 14s-6.268 14-14 14S2 23.732 2 16M16 4C9.373 4 4 9.373 4 16s5.373 12 12 12s12-5.373 12-12S22.627 4 16 4"
|
|
31
|
-
/>
|
|
32
|
-
</svg>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
{
|
|
36
|
-
severity === "warning" && (
|
|
37
|
-
<svg
|
|
38
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
39
|
-
width="32"
|
|
40
|
-
height="32"
|
|
41
|
-
viewBox="0 0 32 32"
|
|
42
|
-
>
|
|
43
|
-
<path
|
|
44
|
-
fill="currentColor"
|
|
45
|
-
d="M17.25 22a1.25 1.25 0 1 1-2.5 0a1.25 1.25 0 0 1 2.5 0M16 9a1 1 0 0 0-1 1v8a1 1 0 1 0 2 0v-8a1 1 0 0 0-1-1m-3.064-5.191c1.332-2.41 4.796-2.41 6.128 0l10.493 18.999C30.846 25.14 29.158 28 26.494 28H5.507c-2.665 0-4.352-2.86-3.064-5.192zm4.377.967a1.5 1.5 0 0 0-2.626 0L4.194 23.775A1.5 1.5 0 0 0 5.507 26h20.987a1.5 1.5 0 0 0 1.313-2.225z"
|
|
46
|
-
/>
|
|
47
|
-
</svg>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
{
|
|
51
|
-
severity === "critical" && (
|
|
52
|
-
<svg
|
|
53
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
54
|
-
width="32"
|
|
55
|
-
height="32"
|
|
56
|
-
viewBox="0 0 48 48"
|
|
57
|
-
>
|
|
58
|
-
<path
|
|
59
|
-
fill="currentColor"
|
|
60
|
-
d="M24 13c.69 0 1.25.56 1.25 1.25v12.5a1.25 1.25 0 1 1-2.5 0v-12.5c0-.69.56-1.25 1.25-1.25m0 21a2 2 0 1 0 0-4a2 2 0 0 0 0 4M4 24C4 12.954 12.954 4 24 4s20 8.954 20 20s-8.954 20-20 20S4 35.046 4 24M24 6.5C14.335 6.5 6.5 14.335 6.5 24S14.335 41.5 24 41.5S41.5 33.665 41.5 24S33.665 6.5 24 6.5"
|
|
61
|
-
/>
|
|
62
|
-
</svg>
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
</slot>
|
|
66
|
-
<div class="ui-content">
|
|
67
|
-
{
|
|
68
|
-
Astro.slots.has("title") && (
|
|
69
|
-
<!-- prettier-ignore -->
|
|
70
|
-
<h3 class="ui-title"><slot name="title" /></h3>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
<slot />
|
|
74
|
-
</div>
|
|
75
|
-
</article>
|
|
1
|
+
---
|
|
2
|
+
type Props = {
|
|
3
|
+
[key: string]: any
|
|
4
|
+
class?: string
|
|
5
|
+
severity?: "critical" | "info" | "neutral" | "success" | "warning"
|
|
6
|
+
variant?: "tonal" | "outlined"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const title = "Callout"
|
|
10
|
+
|
|
11
|
+
const { class: className, severity, variant, ...rest } = Astro.props
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<article
|
|
15
|
+
role="note"
|
|
16
|
+
class:list={["ui-callout", variant && `ui-${variant}`, severity && `ui-${severity}`, className]}
|
|
17
|
+
{...rest}
|
|
18
|
+
>
|
|
19
|
+
<slot name="icon">
|
|
20
|
+
{
|
|
21
|
+
severity === "info" && (
|
|
22
|
+
<svg
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
width="32"
|
|
25
|
+
height="32"
|
|
26
|
+
viewBox="0 0 32 32"
|
|
27
|
+
>
|
|
28
|
+
<path
|
|
29
|
+
fill="currentColor"
|
|
30
|
+
d="M16 13a1 1 0 0 1 1 1v9a1 1 0 1 1-2 0v-9a1 1 0 0 1 1-1m0-2a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3M2 16C2 8.268 8.268 2 16 2s14 6.268 14 14s-6.268 14-14 14S2 23.732 2 16M16 4C9.373 4 4 9.373 4 16s5.373 12 12 12s12-5.373 12-12S22.627 4 16 4"
|
|
31
|
+
/>
|
|
32
|
+
</svg>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
{
|
|
36
|
+
severity === "warning" && (
|
|
37
|
+
<svg
|
|
38
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
39
|
+
width="32"
|
|
40
|
+
height="32"
|
|
41
|
+
viewBox="0 0 32 32"
|
|
42
|
+
>
|
|
43
|
+
<path
|
|
44
|
+
fill="currentColor"
|
|
45
|
+
d="M17.25 22a1.25 1.25 0 1 1-2.5 0a1.25 1.25 0 0 1 2.5 0M16 9a1 1 0 0 0-1 1v8a1 1 0 1 0 2 0v-8a1 1 0 0 0-1-1m-3.064-5.191c1.332-2.41 4.796-2.41 6.128 0l10.493 18.999C30.846 25.14 29.158 28 26.494 28H5.507c-2.665 0-4.352-2.86-3.064-5.192zm4.377.967a1.5 1.5 0 0 0-2.626 0L4.194 23.775A1.5 1.5 0 0 0 5.507 26h20.987a1.5 1.5 0 0 0 1.313-2.225z"
|
|
46
|
+
/>
|
|
47
|
+
</svg>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
{
|
|
51
|
+
severity === "critical" && (
|
|
52
|
+
<svg
|
|
53
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
54
|
+
width="32"
|
|
55
|
+
height="32"
|
|
56
|
+
viewBox="0 0 48 48"
|
|
57
|
+
>
|
|
58
|
+
<path
|
|
59
|
+
fill="currentColor"
|
|
60
|
+
d="M24 13c.69 0 1.25.56 1.25 1.25v12.5a1.25 1.25 0 1 1-2.5 0v-12.5c0-.69.56-1.25 1.25-1.25m0 21a2 2 0 1 0 0-4a2 2 0 0 0 0 4M4 24C4 12.954 12.954 4 24 4s20 8.954 20 20s-8.954 20-20 20S4 35.046 4 24M24 6.5C14.335 6.5 6.5 14.335 6.5 24S14.335 41.5 24 41.5S41.5 33.665 41.5 24S33.665 6.5 24 6.5"
|
|
61
|
+
/>
|
|
62
|
+
</svg>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
</slot>
|
|
66
|
+
<div class="ui-content">
|
|
67
|
+
{
|
|
68
|
+
Astro.slots.has("title") && (
|
|
69
|
+
<!-- prettier-ignore -->
|
|
70
|
+
<h3 class="ui-title"><slot name="title" /></h3>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
<slot />
|
|
74
|
+
</div>
|
|
75
|
+
</article>
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
---
|
|
2
|
-
type Props = {
|
|
3
|
-
actionsAlign?: "start" | "end"
|
|
4
|
-
variant?: "text" | "outlined" | "elevated" | "tonal"
|
|
5
|
-
[key: string]: any
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const title = "Card"
|
|
9
|
-
|
|
10
|
-
const { variant, actionsAlign, class: className, ...rest } = Astro.props
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<div class:list={["ui-card", variant && `ui-${variant}`, className]} {...rest}>
|
|
14
|
-
{
|
|
15
|
-
Astro.slots.has("header") && (
|
|
16
|
-
<hgroup>
|
|
17
|
-
<slot name="header" />
|
|
18
|
-
</hgroup>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
{
|
|
22
|
-
Astro.slots.has("content") && (
|
|
23
|
-
<div class="ui-content">
|
|
24
|
-
<slot name="content" />
|
|
25
|
-
</div>
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
<slot />
|
|
29
|
-
{
|
|
30
|
-
Astro.slots.has("actions") && (
|
|
31
|
-
<div class:list={["ui-actions", actionsAlign && `ui-align-${actionsAlign}`]}>
|
|
32
|
-
<slot name="actions" />
|
|
33
|
-
</div>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
</div>
|
|
1
|
+
---
|
|
2
|
+
type Props = {
|
|
3
|
+
actionsAlign?: "start" | "end"
|
|
4
|
+
variant?: "text" | "outlined" | "elevated" | "tonal"
|
|
5
|
+
[key: string]: any
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const title = "Card"
|
|
9
|
+
|
|
10
|
+
const { variant, actionsAlign, class: className, ...rest } = Astro.props
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<div class:list={["ui-card", variant && `ui-${variant}`, className]} {...rest}>
|
|
14
|
+
{
|
|
15
|
+
Astro.slots.has("header") && (
|
|
16
|
+
<hgroup>
|
|
17
|
+
<slot name="header" />
|
|
18
|
+
</hgroup>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
{
|
|
22
|
+
Astro.slots.has("content") && (
|
|
23
|
+
<div class="ui-content">
|
|
24
|
+
<slot name="content" />
|
|
25
|
+
</div>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
<slot />
|
|
29
|
+
{
|
|
30
|
+
Astro.slots.has("actions") && (
|
|
31
|
+
<div class:list={["ui-actions", actionsAlign && `ui-align-${actionsAlign}`]}>
|
|
32
|
+
<slot name="actions" />
|
|
33
|
+
</div>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
</div>
|