webadwaita 0.1.0 → 0.2.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/LICENSE +21 -0
- package/README.md +112 -0
- package/dist/native/Box/index.js +120 -0
- package/dist/native/Button/index.js +135 -0
- package/dist/native/Card/index.js +67 -0
- package/dist/native/Checkbox/index.js +112 -0
- package/dist/native/Entry/index.js +76 -0
- package/dist/native/HeaderBar/index.js +79 -0
- package/dist/native/Switch/index.js +83 -0
- package/dist/native/index.js +8 -0
- package/dist/native/theme.js +16 -0
- package/dist/native/tokens.css.js +77 -0
- package/dist/types/Box/index.d.ts +23 -0
- package/dist/types/Box/index.d.ts.map +1 -0
- package/dist/types/Button/index.d.ts +22 -0
- package/dist/types/Button/index.d.ts.map +1 -0
- package/dist/types/Card/index.d.ts +14 -0
- package/dist/types/Card/index.d.ts.map +1 -0
- package/dist/types/Checkbox/index.d.ts +13 -0
- package/dist/types/Checkbox/index.d.ts.map +1 -0
- package/dist/types/Entry/index.d.ts +17 -0
- package/dist/types/Entry/index.d.ts.map +1 -0
- package/dist/types/HeaderBar/index.d.ts +16 -0
- package/dist/types/HeaderBar/index.d.ts.map +1 -0
- package/dist/types/Switch/index.d.ts +13 -0
- package/dist/types/Switch/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/theme.d.ts +77 -0
- package/dist/types/theme.d.ts.map +1 -0
- package/dist/types/tokens.css.d.ts +76 -0
- package/dist/types/tokens.css.d.ts.map +1 -0
- package/dist/web/Box/index.js +150 -0
- package/dist/web/Box/styles.css +39 -0
- package/dist/web/Button/index.js +132 -0
- package/dist/web/Button/styles.css +81 -0
- package/dist/web/Card/index.js +75 -0
- package/dist/web/Card/styles.css +91 -0
- package/dist/web/Checkbox/index.js +116 -0
- package/dist/web/Checkbox/styles.css +99 -0
- package/dist/web/Entry/index.js +74 -0
- package/dist/web/Entry/styles.css +113 -0
- package/dist/web/HeaderBar/index.js +87 -0
- package/dist/web/HeaderBar/styles.css +117 -0
- package/dist/web/Switch/index.js +86 -0
- package/dist/web/Switch/styles.css +134 -0
- package/dist/web/_tokens/styles.css +32 -0
- package/dist/web/index.js +8 -0
- package/dist/web/theme.js +16 -0
- package/dist/web/tokens.css.js +79 -0
- package/package.json +52 -31
- package/dist/Button.d.mts +0 -5
- package/dist/Button.d.ts +0 -5
- package/dist/Button.js +0 -63
- package/dist/Button.mjs +0 -41
- package/dist/button.d.mts +0 -5
- package/dist/button.d.ts +0 -5
- package/dist/button.js +0 -63
- package/dist/button.mjs +0 -15
- package/dist/chunk-FWCSY2DS.mjs +0 -37
- package/dist/styles.css +0 -346
- package/dist/styles.d.mts +0 -2
- package/dist/styles.d.ts +0 -2
- package/dist/styles.js +0 -1
- package/dist/styles.mjs +0 -1
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import './styles.css';
|
|
2
|
+
import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "react-strict-dom/runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { css, html } from 'react-strict-dom';
|
|
5
|
+
import { spacing } from '../tokens.css';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Layout primitive — a flex container, the building block for everything else.
|
|
9
|
+
* Adwaita-inspired apps lean heavily on simple horizontal/vertical stacks.
|
|
10
|
+
*/
|
|
11
|
+
export function Box(props) {
|
|
12
|
+
const {
|
|
13
|
+
children,
|
|
14
|
+
direction = 'column',
|
|
15
|
+
gap,
|
|
16
|
+
padding,
|
|
17
|
+
align,
|
|
18
|
+
justify,
|
|
19
|
+
grow,
|
|
20
|
+
wrap,
|
|
21
|
+
style
|
|
22
|
+
} = props;
|
|
23
|
+
return /*#__PURE__*/_jsx("div", {
|
|
24
|
+
..._rsdMerge(_rsdDefaultStyles.div, styles.base, direction === 'row' ? styles.row : styles.column, wrap && styles.wrap, grow && styles.grow, align != null && alignStyles[align], justify != null && justifyStyles[justify], gap != null && gapStyles[gap], padding != null && paddingStyles[padding], style),
|
|
25
|
+
children: children
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
const styles = {
|
|
29
|
+
base: {
|
|
30
|
+
k1xSpc: "x78zum5",
|
|
31
|
+
k7Eaqz: "xeuugli",
|
|
32
|
+
$$css: true
|
|
33
|
+
},
|
|
34
|
+
row: {
|
|
35
|
+
kXwgrk: "x1q0g3np",
|
|
36
|
+
$$css: true
|
|
37
|
+
},
|
|
38
|
+
column: {
|
|
39
|
+
kXwgrk: "xdt5ytf",
|
|
40
|
+
$$css: true
|
|
41
|
+
},
|
|
42
|
+
wrap: {
|
|
43
|
+
kwnvtZ: "x1a02dak",
|
|
44
|
+
$$css: true
|
|
45
|
+
},
|
|
46
|
+
grow: {
|
|
47
|
+
kzQI83: "x1iyjqo2",
|
|
48
|
+
$$css: true
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const alignStyles = {
|
|
52
|
+
"flex-start": {
|
|
53
|
+
kGNEyG: "x1cy8zhl",
|
|
54
|
+
$$css: true
|
|
55
|
+
},
|
|
56
|
+
center: {
|
|
57
|
+
kGNEyG: "x6s0dn4",
|
|
58
|
+
$$css: true
|
|
59
|
+
},
|
|
60
|
+
"flex-end": {
|
|
61
|
+
kGNEyG: "xuk3077",
|
|
62
|
+
$$css: true
|
|
63
|
+
},
|
|
64
|
+
stretch: {
|
|
65
|
+
kGNEyG: "x1qjc9v5",
|
|
66
|
+
$$css: true
|
|
67
|
+
},
|
|
68
|
+
baseline: {
|
|
69
|
+
kGNEyG: "x1pha0wt",
|
|
70
|
+
$$css: true
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const justifyStyles = {
|
|
74
|
+
"flex-start": {
|
|
75
|
+
kjj79g: "x1nhvcw1",
|
|
76
|
+
$$css: true
|
|
77
|
+
},
|
|
78
|
+
center: {
|
|
79
|
+
kjj79g: "xl56j7k",
|
|
80
|
+
$$css: true
|
|
81
|
+
},
|
|
82
|
+
"flex-end": {
|
|
83
|
+
kjj79g: "x13a6bvl",
|
|
84
|
+
$$css: true
|
|
85
|
+
},
|
|
86
|
+
"space-between": {
|
|
87
|
+
kjj79g: "x1qughib",
|
|
88
|
+
$$css: true
|
|
89
|
+
},
|
|
90
|
+
"space-around": {
|
|
91
|
+
kjj79g: "x1l1ennw",
|
|
92
|
+
$$css: true
|
|
93
|
+
},
|
|
94
|
+
"space-evenly": {
|
|
95
|
+
kjj79g: "xaw8158",
|
|
96
|
+
$$css: true
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const gapStyles = {
|
|
100
|
+
xs: {
|
|
101
|
+
kOIVth: "x1cuygh6",
|
|
102
|
+
$$css: true
|
|
103
|
+
},
|
|
104
|
+
sm: {
|
|
105
|
+
kOIVth: "x15hg9oy",
|
|
106
|
+
$$css: true
|
|
107
|
+
},
|
|
108
|
+
md: {
|
|
109
|
+
kOIVth: "x19u8g8r",
|
|
110
|
+
$$css: true
|
|
111
|
+
},
|
|
112
|
+
lg: {
|
|
113
|
+
kOIVth: "x1od9ebw",
|
|
114
|
+
$$css: true
|
|
115
|
+
},
|
|
116
|
+
xl: {
|
|
117
|
+
kOIVth: "xc9i02s",
|
|
118
|
+
$$css: true
|
|
119
|
+
},
|
|
120
|
+
xxl: {
|
|
121
|
+
kOIVth: "xy744dg",
|
|
122
|
+
$$css: true
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
const paddingStyles = {
|
|
126
|
+
xs: {
|
|
127
|
+
kmVPX3: "xudt4gt",
|
|
128
|
+
$$css: true
|
|
129
|
+
},
|
|
130
|
+
sm: {
|
|
131
|
+
kmVPX3: "x12ldruc",
|
|
132
|
+
$$css: true
|
|
133
|
+
},
|
|
134
|
+
md: {
|
|
135
|
+
kmVPX3: "x1rfi6cy",
|
|
136
|
+
$$css: true
|
|
137
|
+
},
|
|
138
|
+
lg: {
|
|
139
|
+
kmVPX3: "xwmi1nh",
|
|
140
|
+
$$css: true
|
|
141
|
+
},
|
|
142
|
+
xl: {
|
|
143
|
+
kmVPX3: "x14yi81o",
|
|
144
|
+
$$css: true
|
|
145
|
+
},
|
|
146
|
+
xxl: {
|
|
147
|
+
kmVPX3: "x1ck75x5",
|
|
148
|
+
$$css: true
|
|
149
|
+
}
|
|
150
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
@layer priority1, priority2, priority3, priority4;
|
|
3
|
+
@layer priority1{
|
|
4
|
+
.x14yi81o{padding:24px}
|
|
5
|
+
.x12ldruc{padding:8px}
|
|
6
|
+
.x1ck75x5{padding:32px}
|
|
7
|
+
.xudt4gt{padding:4px}
|
|
8
|
+
.x1rfi6cy{padding:12px}
|
|
9
|
+
.xwmi1nh{padding:16px}
|
|
10
|
+
}
|
|
11
|
+
@layer priority2{
|
|
12
|
+
.xc9i02s{gap:24px}
|
|
13
|
+
.x15hg9oy{gap:8px}
|
|
14
|
+
.xy744dg{gap:32px}
|
|
15
|
+
.x1cuygh6{gap:4px}
|
|
16
|
+
.x19u8g8r{gap:12px}
|
|
17
|
+
.x1od9ebw{gap:16px}
|
|
18
|
+
}
|
|
19
|
+
@layer priority3{
|
|
20
|
+
.x1pha0wt{align-items:baseline}
|
|
21
|
+
.x6s0dn4{align-items:center}
|
|
22
|
+
.xuk3077{align-items:flex-end}
|
|
23
|
+
.x1cy8zhl{align-items:flex-start}
|
|
24
|
+
.x1qjc9v5{align-items:stretch}
|
|
25
|
+
.x78zum5{display:flex}
|
|
26
|
+
.xdt5ytf{flex-direction:column}
|
|
27
|
+
.x1q0g3np{flex-direction:row}
|
|
28
|
+
.x1iyjqo2{flex-grow:1}
|
|
29
|
+
.x1a02dak{flex-wrap:wrap}
|
|
30
|
+
.xl56j7k{justify-content:center}
|
|
31
|
+
.x13a6bvl{justify-content:flex-end}
|
|
32
|
+
.x1nhvcw1{justify-content:flex-start}
|
|
33
|
+
.x1l1ennw{justify-content:space-around}
|
|
34
|
+
.x1qughib{justify-content:space-between}
|
|
35
|
+
.xaw8158{justify-content:space-evenly}
|
|
36
|
+
}
|
|
37
|
+
@layer priority4{
|
|
38
|
+
.xeuugli{min-width:0}
|
|
39
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import './styles.css';
|
|
2
|
+
import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "react-strict-dom/runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { css, html } from 'react-strict-dom';
|
|
5
|
+
import { palette, radius, spacing, typography, motion } from '../tokens.css';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Adwaita-style button. Variants follow libadwaita conventions:
|
|
9
|
+
* - default: flat-ish neutral surface
|
|
10
|
+
* - suggested: blue accent (primary)
|
|
11
|
+
* - destructive: red, for irreversible actions
|
|
12
|
+
* - flat: no background, only on hover
|
|
13
|
+
* - pill: fully rounded (Adwaita "circular" buttons)
|
|
14
|
+
*/
|
|
15
|
+
export function Button(props) {
|
|
16
|
+
const {
|
|
17
|
+
children,
|
|
18
|
+
variant = 'default',
|
|
19
|
+
size = 'md',
|
|
20
|
+
disabled = false,
|
|
21
|
+
fullWidth = false,
|
|
22
|
+
onPress,
|
|
23
|
+
type = 'button'
|
|
24
|
+
} = props;
|
|
25
|
+
return /*#__PURE__*/_jsx("button", {
|
|
26
|
+
type: type,
|
|
27
|
+
disabled: disabled,
|
|
28
|
+
onClick: onPress,
|
|
29
|
+
..._rsdMerge(_rsdDefaultStyles.button, styles.base, sizeStyles[size], variantStyles[variant], fullWidth && styles.fullWidth, disabled && styles.disabled),
|
|
30
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
31
|
+
..._rsdMerge(_rsdDefaultStyles.span, styles.label, labelSizeStyles[size]),
|
|
32
|
+
children: children
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const styles = {
|
|
37
|
+
base: {
|
|
38
|
+
k1xSpc: "x78zum5",
|
|
39
|
+
kSGwAc: "xqcrz7y",
|
|
40
|
+
kGNEyG: "x6s0dn4",
|
|
41
|
+
kjj79g: "xl56j7k",
|
|
42
|
+
kXwgrk: "x1q0g3np",
|
|
43
|
+
kMzoRj: "xc342km",
|
|
44
|
+
kkrTdU: "x1ypdohk",
|
|
45
|
+
k1ekBW: "x1koyr57",
|
|
46
|
+
kIyJzY: "xcj3dzi",
|
|
47
|
+
kAMwcw: "xfrgxy7",
|
|
48
|
+
kfSwDN: "x87ps6o",
|
|
49
|
+
$$css: true
|
|
50
|
+
},
|
|
51
|
+
label: {
|
|
52
|
+
kMv6JI: "x164ifzn",
|
|
53
|
+
k63SB2: "xaajq3h",
|
|
54
|
+
k9WMMc: "x2b8uid",
|
|
55
|
+
$$css: true
|
|
56
|
+
},
|
|
57
|
+
fullWidth: {
|
|
58
|
+
kSGwAc: "xkh2ocl",
|
|
59
|
+
$$css: true
|
|
60
|
+
},
|
|
61
|
+
disabled: {
|
|
62
|
+
kSiTet: "xbyyjgo",
|
|
63
|
+
kkrTdU: "x1h6gzvc",
|
|
64
|
+
$$css: true
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const sizeStyles = {
|
|
68
|
+
sm: {
|
|
69
|
+
kg3NbH: "x1of5wme",
|
|
70
|
+
kaIpWk: "xdwrzdg",
|
|
71
|
+
kZKoxP: "x1fgtraw",
|
|
72
|
+
$$css: true
|
|
73
|
+
},
|
|
74
|
+
md: {
|
|
75
|
+
kg3NbH: "x1w4cf6q",
|
|
76
|
+
kaIpWk: "xdamf1x",
|
|
77
|
+
kZKoxP: "xc9qbxq",
|
|
78
|
+
$$css: true
|
|
79
|
+
},
|
|
80
|
+
lg: {
|
|
81
|
+
kg3NbH: "xoawizh",
|
|
82
|
+
kaIpWk: "xdamf1x",
|
|
83
|
+
kZKoxP: "xn3w4p2",
|
|
84
|
+
$$css: true
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const labelSizeStyles = {
|
|
88
|
+
sm: {
|
|
89
|
+
kGuDYH: "x13gn23q",
|
|
90
|
+
kLWn49: "x1aebrpu",
|
|
91
|
+
$$css: true
|
|
92
|
+
},
|
|
93
|
+
md: {
|
|
94
|
+
kGuDYH: "xqwltnl",
|
|
95
|
+
kLWn49: "x7zvn91",
|
|
96
|
+
$$css: true
|
|
97
|
+
},
|
|
98
|
+
lg: {
|
|
99
|
+
kGuDYH: "x1lbyq2x",
|
|
100
|
+
kLWn49: "x11807lh",
|
|
101
|
+
$$css: true
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const variantStyles = {
|
|
105
|
+
default: {
|
|
106
|
+
kWkggS: "x1wvpxmy xvuosku xtkh9g1",
|
|
107
|
+
kMwMTN: "x117bw84",
|
|
108
|
+
$$css: true
|
|
109
|
+
},
|
|
110
|
+
suggested: {
|
|
111
|
+
kWkggS: "xhw1y8f x12s1yt6 xc7rq14",
|
|
112
|
+
kMwMTN: "xgtzv0a",
|
|
113
|
+
$$css: true
|
|
114
|
+
},
|
|
115
|
+
destructive: {
|
|
116
|
+
kWkggS: "x1jedtje xusvk13 x1x0tut",
|
|
117
|
+
kMwMTN: "xk7gp71",
|
|
118
|
+
$$css: true
|
|
119
|
+
},
|
|
120
|
+
flat: {
|
|
121
|
+
kWkggS: "xjbqb8w x1b2b8i4 x1krbwd3",
|
|
122
|
+
kMwMTN: "x117bw84",
|
|
123
|
+
$$css: true
|
|
124
|
+
},
|
|
125
|
+
pill: {
|
|
126
|
+
kWkggS: "x1wvpxmy xvuosku xtkh9g1",
|
|
127
|
+
kMwMTN: "x117bw84",
|
|
128
|
+
kaIpWk: "x4gkjtx",
|
|
129
|
+
kg3NbH: "xoawizh",
|
|
130
|
+
$$css: true
|
|
131
|
+
}
|
|
132
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
|
|
2
|
+
@layer priority1, priority2, priority3, priority4;
|
|
3
|
+
@layer priority1{
|
|
4
|
+
.x1rfi6cy{padding:12px}
|
|
5
|
+
.xwmi1nh{padding:16px}
|
|
6
|
+
.x14yi81o{padding:24px}
|
|
7
|
+
.x1ck75x5{padding:32px}
|
|
8
|
+
.xudt4gt{padding:4px}
|
|
9
|
+
.x12ldruc{padding:8px}
|
|
10
|
+
}
|
|
11
|
+
@layer priority2{
|
|
12
|
+
.xdamf1x{border-radius:9px}
|
|
13
|
+
.x4gkjtx{border-radius:9999px}
|
|
14
|
+
.xdwrzdg{border-radius:6px}
|
|
15
|
+
.x19u8g8r{gap:12px}
|
|
16
|
+
.x1od9ebw{gap:16px}
|
|
17
|
+
.xc9i02s{gap:24px}
|
|
18
|
+
.xy744dg{gap:32px}
|
|
19
|
+
.x1cuygh6{gap:4px}
|
|
20
|
+
.x15hg9oy{gap:8px}
|
|
21
|
+
.xoawizh{padding-inline:24px}
|
|
22
|
+
.x1of5wme{padding-inline:12px}
|
|
23
|
+
.x1w4cf6q{padding-inline:16px}
|
|
24
|
+
}
|
|
25
|
+
@layer priority3{
|
|
26
|
+
.x1pha0wt{align-items:baseline}
|
|
27
|
+
.x6s0dn4{align-items:center}
|
|
28
|
+
.xuk3077{align-items:flex-end}
|
|
29
|
+
.x1cy8zhl{align-items:flex-start}
|
|
30
|
+
.x1qjc9v5{align-items:stretch}
|
|
31
|
+
.xqcrz7y{align-self:flex-start}
|
|
32
|
+
.xkh2ocl{align-self:stretch}
|
|
33
|
+
.xjbqb8w{background-color:transparent}
|
|
34
|
+
.x1jedtje{background-color:#e01b24}
|
|
35
|
+
.x1wvpxmy{background-color:rgba(0, 0, 0, 0.07)}
|
|
36
|
+
.xhw1y8f{background-color:#3584e4}
|
|
37
|
+
.xgtzv0a{color:#ffffff}
|
|
38
|
+
.xk7gp71{color:#ffffff}
|
|
39
|
+
.x117bw84{color:rgba(0, 0, 0, 0.8)}
|
|
40
|
+
.x1h6gzvc{cursor:not-allowed}
|
|
41
|
+
.x1ypdohk{cursor:pointer}
|
|
42
|
+
.x78zum5{display:flex}
|
|
43
|
+
.xdt5ytf{flex-direction:column}
|
|
44
|
+
.x1q0g3np{flex-direction:row}
|
|
45
|
+
.x1iyjqo2{flex-grow:1}
|
|
46
|
+
.x1a02dak{flex-wrap:wrap}
|
|
47
|
+
.x164ifzn{font-family:"Adwaita Sans", "Cantarell", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif}
|
|
48
|
+
.x1lbyq2x{font-size:16px}
|
|
49
|
+
.x13gn23q{font-size:12px}
|
|
50
|
+
.xqwltnl{font-size:14px}
|
|
51
|
+
.xaajq3h{font-weight:600}
|
|
52
|
+
.xl56j7k{justify-content:center}
|
|
53
|
+
.x13a6bvl{justify-content:flex-end}
|
|
54
|
+
.x1nhvcw1{justify-content:flex-start}
|
|
55
|
+
.x1l1ennw{justify-content:space-around}
|
|
56
|
+
.x1qughib{justify-content:space-between}
|
|
57
|
+
.xaw8158{justify-content:space-evenly}
|
|
58
|
+
.x11807lh{line-height:1.3}
|
|
59
|
+
.x1aebrpu{line-height:1.4}
|
|
60
|
+
.x7zvn91{line-height:1.5}
|
|
61
|
+
.xbyyjgo{opacity:.5}
|
|
62
|
+
.x2b8uid{text-align:center}
|
|
63
|
+
.xcj3dzi{transition-duration:120ms}
|
|
64
|
+
.x1koyr57{transition-property:background-color,box-shadow,color}
|
|
65
|
+
.xfrgxy7{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}
|
|
66
|
+
.x87ps6o{user-select:none}
|
|
67
|
+
.x1b2b8i4:hover{background-color:rgba(0, 0, 0, 0.07)}
|
|
68
|
+
.xvuosku:hover{background-color:rgba(0, 0, 0, 0.12)}
|
|
69
|
+
.x12s1yt6:hover{background-color:#4a90e9}
|
|
70
|
+
.xusvk13:hover{background-color:#e8434b}
|
|
71
|
+
.x1x0tut:active{background-color:#b81920}
|
|
72
|
+
.xtkh9g1:active{background-color:rgba(0, 0, 0, 0.18)}
|
|
73
|
+
.x1krbwd3:active{background-color:rgba(0, 0, 0, 0.12)}
|
|
74
|
+
.xc7rq14:active{background-color:#1a6bb8}
|
|
75
|
+
}
|
|
76
|
+
@layer priority4{
|
|
77
|
+
.x1fgtraw{height:28px}
|
|
78
|
+
.xc9qbxq{height:36px}
|
|
79
|
+
.xn3w4p2{height:44px}
|
|
80
|
+
.xeuugli{min-width:0}
|
|
81
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import './styles.css';
|
|
2
|
+
import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "react-strict-dom/runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { css, html } from 'react-strict-dom';
|
|
5
|
+
import { palette, radius, spacing, typography } from '../tokens.css';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Adwaita-style card surface. Default has a soft shadow + rounded corners;
|
|
9
|
+
* "flat" drops the shadow for use inside other surfaces.
|
|
10
|
+
*/
|
|
11
|
+
export function Card(props) {
|
|
12
|
+
const {
|
|
13
|
+
children,
|
|
14
|
+
title,
|
|
15
|
+
variant = 'boxed',
|
|
16
|
+
padding = true
|
|
17
|
+
} = props;
|
|
18
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
19
|
+
..._rsdMerge(_rsdDefaultStyles.div, styles.card, variant === 'boxed' ? styles.boxed : styles.flat),
|
|
20
|
+
children: [title != null && /*#__PURE__*/_jsx("div", {
|
|
21
|
+
..._rsdMerge(_rsdDefaultStyles.div, styles.header),
|
|
22
|
+
children: /*#__PURE__*/_jsx("h3", {
|
|
23
|
+
..._rsdMerge(_rsdDefaultStyles.h3, styles.titleText),
|
|
24
|
+
children: title
|
|
25
|
+
})
|
|
26
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
27
|
+
..._rsdMerge(_rsdDefaultStyles.div, padding ? styles.body : null),
|
|
28
|
+
children: children
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const styles = {
|
|
33
|
+
card: {
|
|
34
|
+
kWkggS: "x2pwvcl",
|
|
35
|
+
kaIpWk: "x3wdnbj",
|
|
36
|
+
kVQacm: "xb3r6kr",
|
|
37
|
+
k1xSpc: "x78zum5",
|
|
38
|
+
kXwgrk: "xdt5ytf",
|
|
39
|
+
$$css: true
|
|
40
|
+
},
|
|
41
|
+
boxed: {
|
|
42
|
+
kGVxlE: "x11j0q79",
|
|
43
|
+
kMzoRj: "xmkeg23",
|
|
44
|
+
ksu8eU: "x1y0btm7",
|
|
45
|
+
kVAM5u: "x1bbxysd",
|
|
46
|
+
$$css: true
|
|
47
|
+
},
|
|
48
|
+
flat: {
|
|
49
|
+
kMzoRj: "xmkeg23",
|
|
50
|
+
ksu8eU: "x1y0btm7",
|
|
51
|
+
kVAM5u: "x1bbxysd",
|
|
52
|
+
$$css: true
|
|
53
|
+
},
|
|
54
|
+
header: {
|
|
55
|
+
k8WAf4: "x83n5x6",
|
|
56
|
+
kg3NbH: "x1w4cf6q",
|
|
57
|
+
kt9PQ7: "xso031l",
|
|
58
|
+
kfdmCh: "x1q0q8m5",
|
|
59
|
+
kL6WhQ: "x14ro01c",
|
|
60
|
+
$$css: true
|
|
61
|
+
},
|
|
62
|
+
titleText: {
|
|
63
|
+
kogj98: "x1ghz6dp",
|
|
64
|
+
kMv6JI: "x164ifzn",
|
|
65
|
+
kGuDYH: "x1lbyq2x",
|
|
66
|
+
kLWn49: "x11807lh",
|
|
67
|
+
k63SB2: "xq8utqp",
|
|
68
|
+
kMwMTN: "x117bw84",
|
|
69
|
+
$$css: true
|
|
70
|
+
},
|
|
71
|
+
body: {
|
|
72
|
+
kmVPX3: "xwmi1nh",
|
|
73
|
+
$$css: true
|
|
74
|
+
}
|
|
75
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
|
|
2
|
+
@layer priority1, priority2, priority3, priority4;
|
|
3
|
+
@layer priority1{
|
|
4
|
+
.x1rfi6cy{padding:12px}
|
|
5
|
+
.xwmi1nh{padding:16px}
|
|
6
|
+
.x14yi81o{padding:24px}
|
|
7
|
+
.x1ck75x5{padding:32px}
|
|
8
|
+
.xudt4gt{padding:4px}
|
|
9
|
+
.x12ldruc{padding:8px}
|
|
10
|
+
}
|
|
11
|
+
@layer priority2{
|
|
12
|
+
.x1bbxysd{border-color:rgba(0, 0, 0, 0.15)}
|
|
13
|
+
.xdwrzdg{border-radius:6px}
|
|
14
|
+
.x4gkjtx{border-radius:9999px}
|
|
15
|
+
.xdamf1x{border-radius:9px}
|
|
16
|
+
.x3wdnbj{border-radius:12px}
|
|
17
|
+
.x19u8g8r{gap:12px}
|
|
18
|
+
.x1od9ebw{gap:16px}
|
|
19
|
+
.xc9i02s{gap:24px}
|
|
20
|
+
.xy744dg{gap:32px}
|
|
21
|
+
.x1cuygh6{gap:4px}
|
|
22
|
+
.x15hg9oy{gap:8px}
|
|
23
|
+
.xb3r6kr{overflow:hidden}
|
|
24
|
+
.x83n5x6{padding-block:12px}
|
|
25
|
+
.x1of5wme{padding-inline:12px}
|
|
26
|
+
.x1w4cf6q{padding-inline:16px}
|
|
27
|
+
.xoawizh{padding-inline:24px}
|
|
28
|
+
}
|
|
29
|
+
@layer priority3{
|
|
30
|
+
.x1pha0wt{align-items:baseline}
|
|
31
|
+
.x6s0dn4{align-items:center}
|
|
32
|
+
.xuk3077{align-items:flex-end}
|
|
33
|
+
.x1cy8zhl{align-items:flex-start}
|
|
34
|
+
.x1qjc9v5{align-items:stretch}
|
|
35
|
+
.xqcrz7y{align-self:flex-start}
|
|
36
|
+
.xkh2ocl{align-self:stretch}
|
|
37
|
+
.xhw1y8f{background-color:#3584e4}
|
|
38
|
+
.x1jedtje{background-color:#e01b24}
|
|
39
|
+
.x1wvpxmy{background-color:rgba(0, 0, 0, 0.07)}
|
|
40
|
+
.xjbqb8w{background-color:transparent}
|
|
41
|
+
.x2pwvcl{background-color:#ffffff}
|
|
42
|
+
.x11j0q79{box-shadow:0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04)}
|
|
43
|
+
.xgtzv0a{color:#ffffff}
|
|
44
|
+
.xk7gp71{color:#ffffff}
|
|
45
|
+
.x117bw84{color:rgba(0, 0, 0, 0.8)}
|
|
46
|
+
.x1h6gzvc{cursor:not-allowed}
|
|
47
|
+
.x1ypdohk{cursor:pointer}
|
|
48
|
+
.x78zum5{display:flex}
|
|
49
|
+
.xdt5ytf{flex-direction:column}
|
|
50
|
+
.x1q0g3np{flex-direction:row}
|
|
51
|
+
.x1iyjqo2{flex-grow:1}
|
|
52
|
+
.x1a02dak{flex-wrap:wrap}
|
|
53
|
+
.x164ifzn{font-family:"Adwaita Sans", "Cantarell", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif}
|
|
54
|
+
.x13gn23q{font-size:12px}
|
|
55
|
+
.xqwltnl{font-size:14px}
|
|
56
|
+
.x1lbyq2x{font-size:16px}
|
|
57
|
+
.xaajq3h{font-weight:600}
|
|
58
|
+
.xq8utqp{font-weight:700}
|
|
59
|
+
.xl56j7k{justify-content:center}
|
|
60
|
+
.x13a6bvl{justify-content:flex-end}
|
|
61
|
+
.x1nhvcw1{justify-content:flex-start}
|
|
62
|
+
.x1l1ennw{justify-content:space-around}
|
|
63
|
+
.x1qughib{justify-content:space-between}
|
|
64
|
+
.xaw8158{justify-content:space-evenly}
|
|
65
|
+
.x11807lh{line-height:1.3}
|
|
66
|
+
.x1aebrpu{line-height:1.4}
|
|
67
|
+
.x7zvn91{line-height:1.5}
|
|
68
|
+
.xbyyjgo{opacity:.5}
|
|
69
|
+
.x2b8uid{text-align:center}
|
|
70
|
+
.xcj3dzi{transition-duration:120ms}
|
|
71
|
+
.x1koyr57{transition-property:background-color,box-shadow,color}
|
|
72
|
+
.xfrgxy7{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}
|
|
73
|
+
.x87ps6o{user-select:none}
|
|
74
|
+
.x12s1yt6:hover{background-color:#4a90e9}
|
|
75
|
+
.xusvk13:hover{background-color:#e8434b}
|
|
76
|
+
.x1b2b8i4:hover{background-color:rgba(0, 0, 0, 0.07)}
|
|
77
|
+
.xvuosku:hover{background-color:rgba(0, 0, 0, 0.12)}
|
|
78
|
+
.xc7rq14:active{background-color:#1a6bb8}
|
|
79
|
+
.x1x0tut:active{background-color:#b81920}
|
|
80
|
+
.x1krbwd3:active{background-color:rgba(0, 0, 0, 0.12)}
|
|
81
|
+
.xtkh9g1:active{background-color:rgba(0, 0, 0, 0.18)}
|
|
82
|
+
}
|
|
83
|
+
@layer priority4{
|
|
84
|
+
.x14ro01c{border-bottom-color:rgba(0, 0, 0, 0.15)}
|
|
85
|
+
.x1q0q8m5{border-bottom-style:solid}
|
|
86
|
+
.xso031l{border-bottom-width:1px}
|
|
87
|
+
.x1fgtraw{height:28px}
|
|
88
|
+
.xc9qbxq{height:36px}
|
|
89
|
+
.xn3w4p2{height:44px}
|
|
90
|
+
.xeuugli{min-width:0}
|
|
91
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import './styles.css';
|
|
2
|
+
import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "react-strict-dom/runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { css, html } from 'react-strict-dom';
|
|
5
|
+
import { palette, radius, motion, typography, spacing } from '../tokens.css';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Adwaita-style checkbox. Solid blue square with a unicode check when on,
|
|
9
|
+
* subtle outlined square when off.
|
|
10
|
+
*/
|
|
11
|
+
export function Checkbox(props) {
|
|
12
|
+
const {
|
|
13
|
+
checked,
|
|
14
|
+
disabled = false,
|
|
15
|
+
onChange,
|
|
16
|
+
label
|
|
17
|
+
} = props;
|
|
18
|
+
const toggle = () => {
|
|
19
|
+
if (!disabled) onChange?.(!checked);
|
|
20
|
+
};
|
|
21
|
+
const box = /*#__PURE__*/_jsx("span", {
|
|
22
|
+
..._rsdMerge(_rsdDefaultStyles.span, styles.box, checked ? styles.boxOn : styles.boxOff),
|
|
23
|
+
children: checked && /*#__PURE__*/_jsx("span", {
|
|
24
|
+
..._rsdMerge(_rsdDefaultStyles.span, styles.check),
|
|
25
|
+
children: '✓'
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
if (label == null) {
|
|
29
|
+
return /*#__PURE__*/_jsx("button", {
|
|
30
|
+
type: "button",
|
|
31
|
+
role: "checkbox",
|
|
32
|
+
"aria-checked": checked,
|
|
33
|
+
disabled: disabled,
|
|
34
|
+
onClick: toggle,
|
|
35
|
+
..._rsdMerge(_rsdDefaultStyles.button, styles.bareButton, disabled && styles.disabled),
|
|
36
|
+
children: box
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return /*#__PURE__*/_jsxs("button", {
|
|
40
|
+
type: "button",
|
|
41
|
+
role: "checkbox",
|
|
42
|
+
"aria-checked": checked,
|
|
43
|
+
disabled: disabled,
|
|
44
|
+
onClick: toggle,
|
|
45
|
+
..._rsdMerge(_rsdDefaultStyles.button, styles.row, disabled && styles.disabled),
|
|
46
|
+
children: [box, /*#__PURE__*/_jsx("span", {
|
|
47
|
+
..._rsdMerge(_rsdDefaultStyles.span, styles.label),
|
|
48
|
+
children: label
|
|
49
|
+
})]
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
const SIZE = 18;
|
|
53
|
+
const styles = {
|
|
54
|
+
bareButton: {
|
|
55
|
+
kWkggS: "xjbqb8w",
|
|
56
|
+
kMzoRj: "xc342km",
|
|
57
|
+
kmVPX3: "x1717udv",
|
|
58
|
+
kkrTdU: "x1ypdohk",
|
|
59
|
+
$$css: true
|
|
60
|
+
},
|
|
61
|
+
row: {
|
|
62
|
+
k1xSpc: "x78zum5",
|
|
63
|
+
kSGwAc: "xqcrz7y",
|
|
64
|
+
kXwgrk: "x1q0g3np",
|
|
65
|
+
kGNEyG: "x6s0dn4",
|
|
66
|
+
kOIVth: "x15hg9oy",
|
|
67
|
+
kWkggS: "xjbqb8w",
|
|
68
|
+
kMzoRj: "xc342km",
|
|
69
|
+
kmVPX3: "x1717udv",
|
|
70
|
+
kkrTdU: "x1ypdohk",
|
|
71
|
+
$$css: true
|
|
72
|
+
},
|
|
73
|
+
box: {
|
|
74
|
+
k1xSpc: "x78zum5",
|
|
75
|
+
kzqmXN: "x1xp8n7a",
|
|
76
|
+
kZKoxP: "xmix8c7",
|
|
77
|
+
kaIpWk: "xdwrzdg",
|
|
78
|
+
kGNEyG: "x6s0dn4",
|
|
79
|
+
kjj79g: "xl56j7k",
|
|
80
|
+
k1ekBW: "xts7igz",
|
|
81
|
+
kIyJzY: "xcj3dzi",
|
|
82
|
+
kAMwcw: "xfrgxy7",
|
|
83
|
+
$$css: true
|
|
84
|
+
},
|
|
85
|
+
boxOff: {
|
|
86
|
+
kWkggS: "xjbqb8w",
|
|
87
|
+
kMzoRj: "xmkeg23",
|
|
88
|
+
ksu8eU: "x1y0btm7",
|
|
89
|
+
kVAM5u: "x16xecvt x1pe04oy",
|
|
90
|
+
$$css: true
|
|
91
|
+
},
|
|
92
|
+
boxOn: {
|
|
93
|
+
kWkggS: "xhw1y8f x12s1yt6",
|
|
94
|
+
kMzoRj: "xc342km",
|
|
95
|
+
$$css: true
|
|
96
|
+
},
|
|
97
|
+
check: {
|
|
98
|
+
kMwMTN: "xgtzv0a",
|
|
99
|
+
kGuDYH: "xif65rj",
|
|
100
|
+
kLWn49: "xo5v014",
|
|
101
|
+
k63SB2: "x1xlr1w8",
|
|
102
|
+
$$css: true
|
|
103
|
+
},
|
|
104
|
+
label: {
|
|
105
|
+
kMwMTN: "x117bw84",
|
|
106
|
+
kMv6JI: "x164ifzn",
|
|
107
|
+
kGuDYH: "xqwltnl",
|
|
108
|
+
kLWn49: "x7zvn91",
|
|
109
|
+
$$css: true
|
|
110
|
+
},
|
|
111
|
+
disabled: {
|
|
112
|
+
kSiTet: "xbyyjgo",
|
|
113
|
+
kkrTdU: "x1h6gzvc",
|
|
114
|
+
$$css: true
|
|
115
|
+
}
|
|
116
|
+
};
|