opui-css 4.0.0 → 4.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 +6 -0
- package/components/Card/Card.astro +38 -38
- package/components/Chip/Chip.astro +37 -37
- package/components/DescriptionList/index.ts +12 -12
- package/components/List/List.astro +36 -36
- package/components/Radio/RadioInput.astro +24 -24
- package/components/Switch/SwitchInput.astro +25 -25
- package/components/Table/index.ts +20 -20
- package/css/components/text-field.css +1 -1
- package/css/components/text-input.css +19 -8
- package/dist/opui.components.css +20 -9
- package/dist/opui.components.css.map +1 -1
- package/dist/opui.css +20 -9
- package/dist/opui.css.map +1 -1
- package/package.json +81 -80
package/CHANGELOG.md
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
---
|
|
2
|
-
type Props = {
|
|
3
|
-
variant?: "text" | "outlined" | "elevated" | "tonal"
|
|
4
|
-
actions?: {
|
|
5
|
-
align?: "end"
|
|
6
|
-
}
|
|
7
|
-
[key: string]: any
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const title = "Card"
|
|
11
|
-
|
|
12
|
-
const { variant, actions, class: className, ...rest } = Astro.props
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<div class:list={["card", variant, className]} {...rest}>
|
|
16
|
-
{
|
|
17
|
-
Astro.slots.has("header") && (
|
|
18
|
-
<hgroup>
|
|
19
|
-
<slot name="header" />
|
|
20
|
-
</hgroup>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
{
|
|
24
|
-
Astro.slots.has("content") && (
|
|
25
|
-
<div class="content">
|
|
26
|
-
<slot name="content" />
|
|
27
|
-
</div>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
<slot />
|
|
31
|
-
{
|
|
32
|
-
Astro.slots.has("actions") && (
|
|
33
|
-
<div class:list={["actions", actions?.align && `align-${actions.align}`]}>
|
|
34
|
-
<slot name="actions" />
|
|
35
|
-
</div>
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
</div>
|
|
1
|
+
---
|
|
2
|
+
type Props = {
|
|
3
|
+
variant?: "text" | "outlined" | "elevated" | "tonal"
|
|
4
|
+
actions?: {
|
|
5
|
+
align?: "end"
|
|
6
|
+
}
|
|
7
|
+
[key: string]: any
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const title = "Card"
|
|
11
|
+
|
|
12
|
+
const { variant, actions, class: className, ...rest } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<div class:list={["card", variant, className]} {...rest}>
|
|
16
|
+
{
|
|
17
|
+
Astro.slots.has("header") && (
|
|
18
|
+
<hgroup>
|
|
19
|
+
<slot name="header" />
|
|
20
|
+
</hgroup>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
{
|
|
24
|
+
Astro.slots.has("content") && (
|
|
25
|
+
<div class="content">
|
|
26
|
+
<slot name="content" />
|
|
27
|
+
</div>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
<slot />
|
|
31
|
+
{
|
|
32
|
+
Astro.slots.has("actions") && (
|
|
33
|
+
<div class:list={["actions", actions?.align && `align-${actions.align}`]}>
|
|
34
|
+
<slot name="actions" />
|
|
35
|
+
</div>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
</div>
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
type Props = {
|
|
3
|
-
[key: string]: any
|
|
4
|
-
as?: "a" | "button" | "div" | string
|
|
5
|
-
class?: string
|
|
6
|
-
label?: string
|
|
7
|
-
multiline?: boolean
|
|
8
|
-
size?: "small"
|
|
9
|
-
variant?: "tonal" | "outlined"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const title = "Chip"
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
as: Tag = Astro.props.href ? "a" : "div",
|
|
16
|
-
class: className,
|
|
17
|
-
label,
|
|
18
|
-
multiline,
|
|
19
|
-
size,
|
|
20
|
-
variant = "tonal",
|
|
21
|
-
...rest
|
|
22
|
-
} = Astro.props
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
<!-- prettier-ignore -->
|
|
26
|
-
<Tag
|
|
27
|
-
class:list={[
|
|
28
|
-
"chip",
|
|
29
|
-
{
|
|
30
|
-
multiline,
|
|
31
|
-
},
|
|
32
|
-
size,
|
|
33
|
-
variant,
|
|
34
|
-
className,
|
|
35
|
-
]}
|
|
36
|
-
{...rest}
|
|
37
|
-
><slot name="start" /><slot />{label && <span class="text">{label}</span>}<slot name="end" /></Tag>
|
|
1
|
+
---
|
|
2
|
+
type Props = {
|
|
3
|
+
[key: string]: any
|
|
4
|
+
as?: "a" | "button" | "div" | string
|
|
5
|
+
class?: string
|
|
6
|
+
label?: string
|
|
7
|
+
multiline?: boolean
|
|
8
|
+
size?: "small"
|
|
9
|
+
variant?: "tonal" | "outlined"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const title = "Chip"
|
|
13
|
+
|
|
14
|
+
const {
|
|
15
|
+
as: Tag = Astro.props.href ? "a" : "div",
|
|
16
|
+
class: className,
|
|
17
|
+
label,
|
|
18
|
+
multiline,
|
|
19
|
+
size,
|
|
20
|
+
variant = "tonal",
|
|
21
|
+
...rest
|
|
22
|
+
} = Astro.props
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
<!-- prettier-ignore -->
|
|
26
|
+
<Tag
|
|
27
|
+
class:list={[
|
|
28
|
+
"chip",
|
|
29
|
+
{
|
|
30
|
+
multiline,
|
|
31
|
+
},
|
|
32
|
+
size,
|
|
33
|
+
variant,
|
|
34
|
+
className,
|
|
35
|
+
]}
|
|
36
|
+
{...rest}
|
|
37
|
+
><slot name="start" /><slot />{label && <span class="text">{label}</span>}<slot name="end" /></Tag>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import DescriptionList from "./DescriptionList.astro"
|
|
2
|
-
import Item from "./Item.astro"
|
|
3
|
-
import Term from "./Term.astro"
|
|
4
|
-
import Description from "./Description.astro"
|
|
5
|
-
|
|
6
|
-
export { Item, Term, Description }
|
|
7
|
-
|
|
8
|
-
export default Object.assign(DescriptionList, {
|
|
9
|
-
Item,
|
|
10
|
-
Term,
|
|
11
|
-
Description,
|
|
12
|
-
})
|
|
1
|
+
import DescriptionList from "./DescriptionList.astro"
|
|
2
|
+
import Item from "./Item.astro"
|
|
3
|
+
import Term from "./Term.astro"
|
|
4
|
+
import Description from "./Description.astro"
|
|
5
|
+
|
|
6
|
+
export { Item, Term, Description }
|
|
7
|
+
|
|
8
|
+
export default Object.assign(DescriptionList, {
|
|
9
|
+
Item,
|
|
10
|
+
Term,
|
|
11
|
+
Description,
|
|
12
|
+
})
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
---
|
|
2
|
-
type Props = {
|
|
3
|
-
bordered?: boolean
|
|
4
|
-
dense?: boolean
|
|
5
|
-
gutterless?: boolean
|
|
6
|
-
variant?: "default" | "tonal" | "transparent"
|
|
7
|
-
[key: string]: any
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const title = "List"
|
|
11
|
-
|
|
12
|
-
const {
|
|
13
|
-
bordered,
|
|
14
|
-
class: className,
|
|
15
|
-
dense,
|
|
16
|
-
gutterless,
|
|
17
|
-
variant,
|
|
18
|
-
...rest
|
|
19
|
-
} = Astro.props
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
<ul
|
|
23
|
-
class:list={[
|
|
24
|
-
"list",
|
|
25
|
-
{
|
|
26
|
-
bordered,
|
|
27
|
-
dense,
|
|
28
|
-
gutterless,
|
|
29
|
-
},
|
|
30
|
-
variant,
|
|
31
|
-
className,
|
|
32
|
-
]}
|
|
33
|
-
{...rest}
|
|
34
|
-
>
|
|
35
|
-
<slot />
|
|
36
|
-
</ul>
|
|
1
|
+
---
|
|
2
|
+
type Props = {
|
|
3
|
+
bordered?: boolean
|
|
4
|
+
dense?: boolean
|
|
5
|
+
gutterless?: boolean
|
|
6
|
+
variant?: "default" | "tonal" | "transparent"
|
|
7
|
+
[key: string]: any
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const title = "List"
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
bordered,
|
|
14
|
+
class: className,
|
|
15
|
+
dense,
|
|
16
|
+
gutterless,
|
|
17
|
+
variant,
|
|
18
|
+
...rest
|
|
19
|
+
} = Astro.props
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<ul
|
|
23
|
+
class:list={[
|
|
24
|
+
"list",
|
|
25
|
+
{
|
|
26
|
+
bordered,
|
|
27
|
+
dense,
|
|
28
|
+
gutterless,
|
|
29
|
+
},
|
|
30
|
+
variant,
|
|
31
|
+
className,
|
|
32
|
+
]}
|
|
33
|
+
{...rest}
|
|
34
|
+
>
|
|
35
|
+
<slot />
|
|
36
|
+
</ul>
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
---
|
|
2
|
-
type Props = {
|
|
3
|
-
[key: string]: any
|
|
4
|
-
checked?: boolean
|
|
5
|
-
disabled?: boolean
|
|
6
|
-
id?: string
|
|
7
|
-
name?: string
|
|
8
|
-
required?: boolean
|
|
9
|
-
value?: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const { checked, disabled, id, name, required, value, ...rest } = Astro.props
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<input
|
|
16
|
-
type="radio"
|
|
17
|
-
{checked}
|
|
18
|
-
{disabled}
|
|
19
|
-
{id}
|
|
20
|
-
{name}
|
|
21
|
-
{required}
|
|
22
|
-
{value}
|
|
23
|
-
{...rest}
|
|
24
|
-
/>
|
|
1
|
+
---
|
|
2
|
+
type Props = {
|
|
3
|
+
[key: string]: any
|
|
4
|
+
checked?: boolean
|
|
5
|
+
disabled?: boolean
|
|
6
|
+
id?: string
|
|
7
|
+
name?: string
|
|
8
|
+
required?: boolean
|
|
9
|
+
value?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { checked, disabled, id, name, required, value, ...rest } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<input
|
|
16
|
+
type="radio"
|
|
17
|
+
{checked}
|
|
18
|
+
{disabled}
|
|
19
|
+
{id}
|
|
20
|
+
{name}
|
|
21
|
+
{required}
|
|
22
|
+
{value}
|
|
23
|
+
{...rest}
|
|
24
|
+
/>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
---
|
|
2
|
-
type Props = {
|
|
3
|
-
[key: string]: any
|
|
4
|
-
checked?: boolean
|
|
5
|
-
disabled?: boolean
|
|
6
|
-
id?: string
|
|
7
|
-
name?: string
|
|
8
|
-
required?: boolean
|
|
9
|
-
value?: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const { checked, disabled, id, name, required, value, ...rest } = Astro.props
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<input
|
|
16
|
-
type="checkbox"
|
|
17
|
-
role="switch"
|
|
18
|
-
{checked}
|
|
19
|
-
{disabled}
|
|
20
|
-
{id}
|
|
21
|
-
{name}
|
|
22
|
-
{required}
|
|
23
|
-
{value}
|
|
24
|
-
{...rest}
|
|
25
|
-
/>
|
|
1
|
+
---
|
|
2
|
+
type Props = {
|
|
3
|
+
[key: string]: any
|
|
4
|
+
checked?: boolean
|
|
5
|
+
disabled?: boolean
|
|
6
|
+
id?: string
|
|
7
|
+
name?: string
|
|
8
|
+
required?: boolean
|
|
9
|
+
value?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { checked, disabled, id, name, required, value, ...rest } = Astro.props
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<input
|
|
16
|
+
type="checkbox"
|
|
17
|
+
role="switch"
|
|
18
|
+
{checked}
|
|
19
|
+
{disabled}
|
|
20
|
+
{id}
|
|
21
|
+
{name}
|
|
22
|
+
{required}
|
|
23
|
+
{value}
|
|
24
|
+
{...rest}
|
|
25
|
+
/>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import Table from "./Table.astro"
|
|
2
|
-
import Head from "./Head.astro"
|
|
3
|
-
import Body from "./Body.astro"
|
|
4
|
-
import Row from "./Row.astro"
|
|
5
|
-
import HeaderCell from "./HeaderCell.astro"
|
|
6
|
-
import Cell from "./Cell.astro"
|
|
7
|
-
import Column from "./Column.astro"
|
|
8
|
-
import ColumnGroup from "./ColumnGroup.astro"
|
|
9
|
-
|
|
10
|
-
export { Head, Body, Row, HeaderCell, Cell, Column, ColumnGroup }
|
|
11
|
-
|
|
12
|
-
export default Object.assign(Table, {
|
|
13
|
-
Head,
|
|
14
|
-
Body,
|
|
15
|
-
Row,
|
|
16
|
-
HeaderCell,
|
|
17
|
-
Cell,
|
|
18
|
-
Column,
|
|
19
|
-
ColumnGroup,
|
|
20
|
-
})
|
|
1
|
+
import Table from "./Table.astro"
|
|
2
|
+
import Head from "./Head.astro"
|
|
3
|
+
import Body from "./Body.astro"
|
|
4
|
+
import Row from "./Row.astro"
|
|
5
|
+
import HeaderCell from "./HeaderCell.astro"
|
|
6
|
+
import Cell from "./Cell.astro"
|
|
7
|
+
import Column from "./Column.astro"
|
|
8
|
+
import ColumnGroup from "./ColumnGroup.astro"
|
|
9
|
+
|
|
10
|
+
export { Head, Body, Row, HeaderCell, Cell, Column, ColumnGroup }
|
|
11
|
+
|
|
12
|
+
export default Object.assign(Table, {
|
|
13
|
+
Head,
|
|
14
|
+
Body,
|
|
15
|
+
Row,
|
|
16
|
+
HeaderCell,
|
|
17
|
+
Cell,
|
|
18
|
+
Column,
|
|
19
|
+
ColumnGroup,
|
|
20
|
+
})
|
|
@@ -23,31 +23,42 @@
|
|
|
23
23
|
|
|
24
24
|
/* Autosuggest */
|
|
25
25
|
:where(.text-field:has(input[list])) {
|
|
26
|
+
.field {
|
|
27
|
+
position: relative;
|
|
28
|
+
}
|
|
26
29
|
|
|
27
30
|
/* Hide native arrow */
|
|
28
|
-
input::-webkit-calendar-picker-indicator {
|
|
31
|
+
input[list]::-webkit-calendar-picker-indicator {
|
|
29
32
|
cursor: pointer;
|
|
30
33
|
opacity: 0;
|
|
31
34
|
pointer-events: none;
|
|
32
35
|
position: absolute;
|
|
33
36
|
}
|
|
34
|
-
}
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
input[list] {
|
|
39
|
+
padding-inline-end: var(--size-8);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.field::after {
|
|
40
43
|
block-size: 0;
|
|
41
44
|
border-block-start: 5px solid;
|
|
42
45
|
border-inline: 5px solid transparent;
|
|
43
46
|
content: "";
|
|
44
|
-
display: inline-block;
|
|
45
|
-
flex-shrink: 0;
|
|
46
47
|
inline-size: 0;
|
|
47
48
|
inset: 50% var(--size-3) auto auto;
|
|
48
49
|
pointer-events: none;
|
|
49
50
|
position: absolute;
|
|
50
51
|
translate: 0 -50%;
|
|
51
52
|
}
|
|
53
|
+
|
|
54
|
+
&.small {
|
|
55
|
+
input[list] {
|
|
56
|
+
padding-inline-end: var(--size-7);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.field::after {
|
|
60
|
+
inset-inline-end: var(--size-2);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
52
63
|
}
|
|
53
64
|
}
|
package/dist/opui.components.css
CHANGED
|
@@ -4406,7 +4406,7 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
4406
4406
|
}
|
|
4407
4407
|
}
|
|
4408
4408
|
|
|
4409
|
-
:where(.field input,
|
|
4409
|
+
:where(.field) :where(input, textarea, select) {
|
|
4410
4410
|
background: transparent;
|
|
4411
4411
|
border: 0;
|
|
4412
4412
|
color: var(--text-primary);
|
|
@@ -5011,32 +5011,43 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
5011
5011
|
|
|
5012
5012
|
/* Autosuggest */
|
|
5013
5013
|
:where(.text-field:has(input[list])) {
|
|
5014
|
+
.field {
|
|
5015
|
+
position: relative;
|
|
5016
|
+
}
|
|
5014
5017
|
|
|
5015
5018
|
/* Hide native arrow */
|
|
5016
|
-
input::-webkit-calendar-picker-indicator {
|
|
5019
|
+
input[list]::-webkit-calendar-picker-indicator {
|
|
5017
5020
|
cursor: pointer;
|
|
5018
5021
|
opacity: 0;
|
|
5019
5022
|
pointer-events: none;
|
|
5020
5023
|
position: absolute;
|
|
5021
5024
|
}
|
|
5022
|
-
}
|
|
5023
5025
|
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5026
|
+
input[list] {
|
|
5027
|
+
padding-inline-end: var(--size-8);
|
|
5028
|
+
}
|
|
5029
|
+
|
|
5030
|
+
.field::after {
|
|
5028
5031
|
block-size: 0;
|
|
5029
5032
|
border-block-start: 5px solid;
|
|
5030
5033
|
border-inline: 5px solid transparent;
|
|
5031
5034
|
content: "";
|
|
5032
|
-
display: inline-block;
|
|
5033
|
-
flex-shrink: 0;
|
|
5034
5035
|
inline-size: 0;
|
|
5035
5036
|
inset: 50% var(--size-3) auto auto;
|
|
5036
5037
|
pointer-events: none;
|
|
5037
5038
|
position: absolute;
|
|
5038
5039
|
translate: 0 -50%;
|
|
5039
5040
|
}
|
|
5041
|
+
|
|
5042
|
+
&.small {
|
|
5043
|
+
input[list] {
|
|
5044
|
+
padding-inline-end: var(--size-7);
|
|
5045
|
+
}
|
|
5046
|
+
|
|
5047
|
+
.field::after {
|
|
5048
|
+
inset-inline-end: var(--size-2);
|
|
5049
|
+
}
|
|
5050
|
+
}
|
|
5040
5051
|
}
|
|
5041
5052
|
}
|
|
5042
5053
|
|