@aortl/admin-react 0.5.2 → 0.7.0
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/dist/Card.d.ts +9 -1
- package/dist/Card.d.ts.map +1 -1
- package/dist/PropertyList.d.ts +44 -0
- package/dist/PropertyList.d.ts.map +1 -0
- package/dist/admin.scoped.css +181 -36
- package/dist/index.cjs +132 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +132 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/Card.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export interface CardProps extends Omit<ComponentProps<"div">, "title"> {
|
|
|
18
18
|
title?: ReactNode;
|
|
19
19
|
/** Renders as `<Card.Description>`. */
|
|
20
20
|
description?: ReactNode;
|
|
21
|
+
/** Trailing header controls (close, edit, …). Renders as `<Card.Toolbar>`. */
|
|
22
|
+
toolbar?: ReactNode;
|
|
21
23
|
/** Renders as `<Card.Actions>`. */
|
|
22
24
|
actions?: ReactNode;
|
|
23
25
|
}
|
|
@@ -26,9 +28,13 @@ export interface CardProps extends Omit<ComponentProps<"div">, "title"> {
|
|
|
26
28
|
* an optional title (with icon), description, children, and actions. For
|
|
27
29
|
* anything outside that shape, use `<Card.Container>` and compose by hand.
|
|
28
30
|
*/
|
|
29
|
-
declare function CardRoot({ bordered, compact, icon, title, description, actions, className, children, ...rest }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare function CardRoot({ bordered, compact, icon, title, description, toolbar, actions, className, children, ...rest }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
30
32
|
export type CardBodyProps = ComponentProps<"div">;
|
|
31
33
|
declare function CardBody({ className, ...rest }: CardBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export type CardHeaderProps = ComponentProps<"div">;
|
|
35
|
+
declare function CardHeader({ className, ...rest }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export type CardToolbarProps = ComponentProps<"div">;
|
|
37
|
+
declare function CardToolbar({ className, ...rest }: CardToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
32
38
|
export interface CardTitleProps extends ComponentProps<"h3"> {
|
|
33
39
|
/** Leading icon. */
|
|
34
40
|
icon?: IconProp;
|
|
@@ -41,6 +47,8 @@ declare function CardActions({ className, ...rest }: CardActionsProps): import("
|
|
|
41
47
|
export declare const Card: typeof CardRoot & {
|
|
42
48
|
Container: typeof CardContainer;
|
|
43
49
|
Body: typeof CardBody;
|
|
50
|
+
Header: typeof CardHeader;
|
|
51
|
+
Toolbar: typeof CardToolbar;
|
|
44
52
|
Title: typeof CardTitle;
|
|
45
53
|
Description: typeof CardDescription;
|
|
46
54
|
Actions: typeof CardActions;
|
package/dist/Card.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEnD,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,2CAOnF;AAED,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,IAAI,CAAC,EAAE,QAAQ,C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extends Omit<ComponentProps<"section">, "title"> {
|
|
3
|
+
striped?: boolean;
|
|
4
|
+
/** Reveals a copy button on every item's value cell. Per-item `copyable`
|
|
5
|
+
* on `<PropertyList.Item>` opts in for individual rows. */
|
|
6
|
+
copyable?: boolean;
|
|
7
|
+
/** Collapses the whole section when every item rendered the auto em-dash
|
|
8
|
+
* fallback for an empty value. */
|
|
9
|
+
hideIfAllEmpty?: boolean;
|
|
10
|
+
/** Optional section heading rendered as `<h3 class="property-list-title">`
|
|
11
|
+
* above the items grid. */
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare function PropertyListRoot({ striped, copyable, hideIfAllEmpty, title, className, children, ...rest }: PropertyListProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export interface PropertyListItemProps extends Omit<ComponentProps<"dd">, "title" | "label"> {
|
|
16
|
+
label?: ReactNode;
|
|
17
|
+
value?: ReactNode;
|
|
18
|
+
/** Right-aligns the value cell + applies `tabular-nums`. Mirrors `Table.Cell.numeric`. */
|
|
19
|
+
numeric?: boolean;
|
|
20
|
+
/** Opts this row into the copy affordance regardless of list-level `copyable`. */
|
|
21
|
+
copyable?: boolean;
|
|
22
|
+
/** Overrides the text the copy button writes to the clipboard. */
|
|
23
|
+
copyValue?: string;
|
|
24
|
+
}
|
|
25
|
+
declare function PropertyListItem({ label, value, numeric, copyable, copyValue, children, ...rest }: PropertyListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export type PropertyListLabelProps = ComponentProps<"dt">;
|
|
27
|
+
declare function PropertyListLabel({ className, ...rest }: PropertyListLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export interface PropertyListValueProps extends ComponentProps<"dd"> {
|
|
29
|
+
numeric?: boolean;
|
|
30
|
+
copyable?: boolean;
|
|
31
|
+
/** Marks the cell as carrying an auto-rendered em-dash. The list-level
|
|
32
|
+
* `hideIfAllEmpty` collapses the section when every value is empty. */
|
|
33
|
+
empty?: boolean;
|
|
34
|
+
/** Overrides the text the copy button writes to the clipboard. */
|
|
35
|
+
copyValue?: string;
|
|
36
|
+
}
|
|
37
|
+
declare function PropertyListValue({ numeric, copyable, empty, copyValue, className, children, ...rest }: PropertyListValueProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare const PropertyList: typeof PropertyListRoot & {
|
|
39
|
+
Item: typeof PropertyListItem;
|
|
40
|
+
Label: typeof PropertyListLabel;
|
|
41
|
+
Value: typeof PropertyListValue;
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=PropertyList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyList.d.ts","sourceRoot":"","sources":["../src/PropertyList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AA+C9E,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;gEAC4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;uCACmC;IACnC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;gCAC4B;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,iBAAS,gBAAgB,CAAC,EACxB,OAAO,EACP,QAAQ,EACR,cAAc,EACd,KAAK,EACL,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,iBAAiB,2CAoBnB;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1F,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,0FAA0F;IAC1F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAWD,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,KAAK,EACL,OAAO,EACP,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,qBAAqB,2CAmBvB;AAED,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAC1D,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,sBAAsB,2CAExE;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc,CAAC,IAAI,CAAC;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;4EACwE;IACxE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,iBAAiB,CAAC,EACzB,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,sBAAsB,2CA2CxB;AAED,eAAO,MAAM,YAAY;;;;CAIvB,CAAC"}
|
package/dist/admin.scoped.css
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/*! @aortl/admin-css scoped variant — @scope (._ao-admin-root); admin classes prefixed with _ao-. */
|
|
2
2
|
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
3
|
-
@layer properties;
|
|
4
|
-
@layer theme, base, components, utilities;
|
|
5
3
|
@font-face {
|
|
6
4
|
font-family: "IBM Plex Sans";
|
|
7
5
|
font-style: normal;
|
|
@@ -50,6 +48,26 @@
|
|
|
50
48
|
src: url(https://fonts.gstatic.com/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJwlBFgg.woff2) format("woff2");
|
|
51
49
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
52
50
|
}
|
|
51
|
+
@property --tw-rotate-x {
|
|
52
|
+
syntax: "*";
|
|
53
|
+
inherits: false;
|
|
54
|
+
}
|
|
55
|
+
@property --tw-rotate-y {
|
|
56
|
+
syntax: "*";
|
|
57
|
+
inherits: false;
|
|
58
|
+
}
|
|
59
|
+
@property --tw-rotate-z {
|
|
60
|
+
syntax: "*";
|
|
61
|
+
inherits: false;
|
|
62
|
+
}
|
|
63
|
+
@property --tw-skew-x {
|
|
64
|
+
syntax: "*";
|
|
65
|
+
inherits: false;
|
|
66
|
+
}
|
|
67
|
+
@property --tw-skew-y {
|
|
68
|
+
syntax: "*";
|
|
69
|
+
inherits: false;
|
|
70
|
+
}
|
|
53
71
|
@property --tw-ordinal {
|
|
54
72
|
syntax: "*";
|
|
55
73
|
inherits: false;
|
|
@@ -70,6 +88,28 @@
|
|
|
70
88
|
syntax: "*";
|
|
71
89
|
inherits: false;
|
|
72
90
|
}
|
|
91
|
+
@property --tw-leading {
|
|
92
|
+
syntax: "*";
|
|
93
|
+
inherits: false;
|
|
94
|
+
}
|
|
95
|
+
@property --tw-font-weight {
|
|
96
|
+
syntax: "*";
|
|
97
|
+
inherits: false;
|
|
98
|
+
}
|
|
99
|
+
@property --tw-border-style {
|
|
100
|
+
syntax: "*";
|
|
101
|
+
inherits: false;
|
|
102
|
+
initial-value: solid;
|
|
103
|
+
}
|
|
104
|
+
@property --tw-outline-style {
|
|
105
|
+
syntax: "*";
|
|
106
|
+
inherits: false;
|
|
107
|
+
initial-value: solid;
|
|
108
|
+
}
|
|
109
|
+
@property --tw-duration {
|
|
110
|
+
syntax: "*";
|
|
111
|
+
inherits: false;
|
|
112
|
+
}
|
|
73
113
|
@property --tw-shadow {
|
|
74
114
|
syntax: "*";
|
|
75
115
|
inherits: false;
|
|
@@ -135,28 +175,6 @@
|
|
|
135
175
|
inherits: false;
|
|
136
176
|
initial-value: 0 0 #0000;
|
|
137
177
|
}
|
|
138
|
-
@property --tw-leading {
|
|
139
|
-
syntax: "*";
|
|
140
|
-
inherits: false;
|
|
141
|
-
}
|
|
142
|
-
@property --tw-font-weight {
|
|
143
|
-
syntax: "*";
|
|
144
|
-
inherits: false;
|
|
145
|
-
}
|
|
146
|
-
@property --tw-border-style {
|
|
147
|
-
syntax: "*";
|
|
148
|
-
inherits: false;
|
|
149
|
-
initial-value: solid;
|
|
150
|
-
}
|
|
151
|
-
@property --tw-outline-style {
|
|
152
|
-
syntax: "*";
|
|
153
|
-
inherits: false;
|
|
154
|
-
initial-value: solid;
|
|
155
|
-
}
|
|
156
|
-
@property --tw-duration {
|
|
157
|
-
syntax: "*";
|
|
158
|
-
inherits: false;
|
|
159
|
-
}
|
|
160
178
|
@property --tw-translate-x {
|
|
161
179
|
syntax: "*";
|
|
162
180
|
inherits: false;
|
|
@@ -177,6 +195,24 @@
|
|
|
177
195
|
inherits: false;
|
|
178
196
|
}
|
|
179
197
|
@scope (._ao-admin-root) {
|
|
198
|
+
:scope :where(
|
|
199
|
+
h1, h2, h3, h4, h5, h6,
|
|
200
|
+
p, a,
|
|
201
|
+
ul, ol, li, dl, dt, dd,
|
|
202
|
+
blockquote, pre, code,
|
|
203
|
+
button, input, textarea, select, label, fieldset, legend,
|
|
204
|
+
table, thead, tbody, tfoot, tr, th, td
|
|
205
|
+
) {
|
|
206
|
+
font-family: inherit;
|
|
207
|
+
font-style: inherit;
|
|
208
|
+
font-variant: normal;
|
|
209
|
+
font-weight: inherit;
|
|
210
|
+
color: inherit;
|
|
211
|
+
letter-spacing: normal;
|
|
212
|
+
text-transform: none;
|
|
213
|
+
text-decoration: inherit;
|
|
214
|
+
line-height: inherit;
|
|
215
|
+
}
|
|
180
216
|
:scope {
|
|
181
217
|
color-scheme: light dark;
|
|
182
218
|
}
|
|
@@ -188,11 +224,21 @@
|
|
|
188
224
|
}
|
|
189
225
|
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
190
226
|
:scope, :scope *, :scope::before, :scope ::before, :scope::after, :scope ::after, :scope::backdrop, :scope ::backdrop {
|
|
227
|
+
--tw-rotate-x: initial;
|
|
228
|
+
--tw-rotate-y: initial;
|
|
229
|
+
--tw-rotate-z: initial;
|
|
230
|
+
--tw-skew-x: initial;
|
|
231
|
+
--tw-skew-y: initial;
|
|
191
232
|
--tw-ordinal: initial;
|
|
192
233
|
--tw-slashed-zero: initial;
|
|
193
234
|
--tw-numeric-figure: initial;
|
|
194
235
|
--tw-numeric-spacing: initial;
|
|
195
236
|
--tw-numeric-fraction: initial;
|
|
237
|
+
--tw-leading: initial;
|
|
238
|
+
--tw-font-weight: initial;
|
|
239
|
+
--tw-border-style: solid;
|
|
240
|
+
--tw-outline-style: solid;
|
|
241
|
+
--tw-duration: initial;
|
|
196
242
|
--tw-shadow: 0 0 #0000;
|
|
197
243
|
--tw-shadow-color: initial;
|
|
198
244
|
--tw-shadow-alpha: 100%;
|
|
@@ -207,11 +253,6 @@
|
|
|
207
253
|
--tw-ring-offset-width: 0px;
|
|
208
254
|
--tw-ring-offset-color: #fff;
|
|
209
255
|
--tw-ring-offset-shadow: 0 0 #0000;
|
|
210
|
-
--tw-leading: initial;
|
|
211
|
-
--tw-font-weight: initial;
|
|
212
|
-
--tw-border-style: solid;
|
|
213
|
-
--tw-outline-style: solid;
|
|
214
|
-
--tw-duration: initial;
|
|
215
256
|
--tw-translate-x: 0;
|
|
216
257
|
--tw-translate-y: 0;
|
|
217
258
|
--tw-translate-z: 0;
|
|
@@ -236,6 +277,7 @@
|
|
|
236
277
|
--text-xl--line-height: calc(1.75 / 1.25);
|
|
237
278
|
--font-weight-medium: 500;
|
|
238
279
|
--font-weight-semibold: 600;
|
|
280
|
+
--font-weight-bold: 700;
|
|
239
281
|
--tracking-wide: 0.025em;
|
|
240
282
|
--leading-tight: 1.25;
|
|
241
283
|
--leading-snug: 1.375;
|
|
@@ -1124,6 +1166,101 @@
|
|
|
1124
1166
|
-webkit-user-select: none;
|
|
1125
1167
|
user-select: none;
|
|
1126
1168
|
}
|
|
1169
|
+
:scope._ao-property-list, :scope ._ao-property-list {
|
|
1170
|
+
display: flex;
|
|
1171
|
+
flex-direction: column;
|
|
1172
|
+
font-size: var(--text-sm);
|
|
1173
|
+
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
1174
|
+
color: var(--color-text);
|
|
1175
|
+
}
|
|
1176
|
+
:scope._ao-property-list-title, :scope ._ao-property-list-title {
|
|
1177
|
+
margin-bottom: calc(var(--spacing) * 2);
|
|
1178
|
+
font-size: var(--text-sm);
|
|
1179
|
+
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
1180
|
+
--tw-font-weight: var(--font-weight-bold);
|
|
1181
|
+
font-weight: var(--font-weight-bold);
|
|
1182
|
+
color: var(--color-text);
|
|
1183
|
+
}
|
|
1184
|
+
:scope._ao-property-list-items, :scope ._ao-property-list-items {
|
|
1185
|
+
display: grid;
|
|
1186
|
+
grid-template-columns: max-content 1fr;
|
|
1187
|
+
}
|
|
1188
|
+
:scope._ao-property-list-label, :scope ._ao-property-list-label, :scope._ao-property-list-value, :scope ._ao-property-list-value {
|
|
1189
|
+
display: flex;
|
|
1190
|
+
align-items: center;
|
|
1191
|
+
padding: 0.375rem 0.75rem;
|
|
1192
|
+
min-height: 2rem;
|
|
1193
|
+
}
|
|
1194
|
+
:scope._ao-property-list-label, :scope ._ao-property-list-label {
|
|
1195
|
+
color: var(--color-text-muted);
|
|
1196
|
+
}
|
|
1197
|
+
:scope._ao-property-list-value, :scope ._ao-property-list-value {
|
|
1198
|
+
gap: 0.5rem;
|
|
1199
|
+
min-width: 0;
|
|
1200
|
+
}
|
|
1201
|
+
:scope._ao-property-list-value-numeric, :scope ._ao-property-list-value-numeric {
|
|
1202
|
+
justify-content: flex-end;
|
|
1203
|
+
--tw-numeric-spacing: tabular-nums;
|
|
1204
|
+
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
1205
|
+
}
|
|
1206
|
+
:scope._ao-property-list-striped dt:nth-of-type(2n + 2), :scope ._ao-property-list-striped dt:nth-of-type(2n + 2), :scope._ao-property-list-striped dd:nth-of-type(2n + 2), :scope ._ao-property-list-striped dd:nth-of-type(2n + 2) {
|
|
1207
|
+
background-color: var(--color-surface-muted);
|
|
1208
|
+
}
|
|
1209
|
+
:scope._ao-property-list-hide-if-empty:not(:has(._ao-property-list-value:not(._ao-property-list-value-empty))), :scope ._ao-property-list-hide-if-empty:not(:has(._ao-property-list-value:not(._ao-property-list-value-empty))) {
|
|
1210
|
+
display: none;
|
|
1211
|
+
}
|
|
1212
|
+
:scope._ao-property-list-copy, :scope ._ao-property-list-copy {
|
|
1213
|
+
margin-left: auto;
|
|
1214
|
+
display: inline-flex;
|
|
1215
|
+
cursor: pointer;
|
|
1216
|
+
align-items: center;
|
|
1217
|
+
justify-content: center;
|
|
1218
|
+
border-radius: 0.25rem;
|
|
1219
|
+
border-style: var(--tw-border-style);
|
|
1220
|
+
border-width: 0px;
|
|
1221
|
+
background-color: transparent;
|
|
1222
|
+
color: var(--color-text-muted);
|
|
1223
|
+
&:hover {
|
|
1224
|
+
@media (hover: hover) {
|
|
1225
|
+
color: var(--color-text);
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
&:focus-visible {
|
|
1229
|
+
outline-style: var(--tw-outline-style);
|
|
1230
|
+
outline-width: 2px;
|
|
1231
|
+
}
|
|
1232
|
+
&:focus-visible {
|
|
1233
|
+
outline-offset: 2px;
|
|
1234
|
+
}
|
|
1235
|
+
&:focus-visible {
|
|
1236
|
+
outline-color: var(--color-primary);
|
|
1237
|
+
}
|
|
1238
|
+
display: none;
|
|
1239
|
+
flex-shrink: 0;
|
|
1240
|
+
padding: 0.125rem;
|
|
1241
|
+
transition: opacity 100ms ease, color 100ms ease;
|
|
1242
|
+
}
|
|
1243
|
+
:scope._ao-property-list-copyable ._ao-property-list-copy, :scope ._ao-property-list-copyable ._ao-property-list-copy, :scope._ao-property-list-value-copyable ._ao-property-list-copy, :scope ._ao-property-list-value-copyable ._ao-property-list-copy {
|
|
1244
|
+
display: inline-flex;
|
|
1245
|
+
opacity: 0;
|
|
1246
|
+
pointer-events: none;
|
|
1247
|
+
}
|
|
1248
|
+
:scope._ao-property-list-copyable ._ao-property-list-label:hover + ._ao-property-list-value ._ao-property-list-copy, :scope ._ao-property-list-copyable ._ao-property-list-label:hover + ._ao-property-list-value ._ao-property-list-copy, :scope._ao-property-list-copyable ._ao-property-list-value:hover ._ao-property-list-copy, :scope ._ao-property-list-copyable ._ao-property-list-value:hover ._ao-property-list-copy, :scope._ao-property-list-label:has(+ ._ao-property-list-value-copyable):hover + ._ao-property-list-value ._ao-property-list-copy, :scope ._ao-property-list-label:has(+ ._ao-property-list-value-copyable):hover + ._ao-property-list-value ._ao-property-list-copy, :scope._ao-property-list-value-copyable:hover ._ao-property-list-copy, :scope ._ao-property-list-value-copyable:hover ._ao-property-list-copy, :scope._ao-property-list-copy:focus-visible, :scope ._ao-property-list-copy:focus-visible, :scope._ao-property-list-copy[data-copied], :scope ._ao-property-list-copy[data-copied] {
|
|
1249
|
+
opacity: 1;
|
|
1250
|
+
pointer-events: auto;
|
|
1251
|
+
}
|
|
1252
|
+
:scope._ao-property-list-copy ._ao-property-list-copy-icon-copied, :scope ._ao-property-list-copy ._ao-property-list-copy-icon-copied {
|
|
1253
|
+
display: none;
|
|
1254
|
+
}
|
|
1255
|
+
:scope._ao-property-list-copy[data-copied] ._ao-property-list-copy-icon, :scope ._ao-property-list-copy[data-copied] ._ao-property-list-copy-icon {
|
|
1256
|
+
display: none;
|
|
1257
|
+
}
|
|
1258
|
+
:scope._ao-property-list-copy[data-copied] ._ao-property-list-copy-icon-copied, :scope ._ao-property-list-copy[data-copied] ._ao-property-list-copy-icon-copied {
|
|
1259
|
+
display: inline-flex;
|
|
1260
|
+
}
|
|
1261
|
+
:scope._ao-property-list-copy[data-copied], :scope ._ao-property-list-copy[data-copied] {
|
|
1262
|
+
color: var(--color-success);
|
|
1263
|
+
}
|
|
1127
1264
|
:scope._ao-btn, :scope ._ao-btn {
|
|
1128
1265
|
display: inline-flex;
|
|
1129
1266
|
cursor: pointer;
|
|
@@ -1997,6 +2134,18 @@
|
|
|
1997
2134
|
--tw-font-weight: var(--font-weight-semibold);
|
|
1998
2135
|
font-weight: var(--font-weight-semibold);
|
|
1999
2136
|
}
|
|
2137
|
+
:scope._ao-card-header, :scope ._ao-card-header {
|
|
2138
|
+
display: flex;
|
|
2139
|
+
align-items: center;
|
|
2140
|
+
gap: calc(var(--spacing) * 2);
|
|
2141
|
+
}
|
|
2142
|
+
:scope._ao-card-toolbar, :scope ._ao-card-toolbar {
|
|
2143
|
+
margin-top: calc(var(--spacing) * -0.5);
|
|
2144
|
+
margin-left: auto;
|
|
2145
|
+
display: flex;
|
|
2146
|
+
align-items: center;
|
|
2147
|
+
gap: calc(var(--spacing) * 1);
|
|
2148
|
+
}
|
|
2000
2149
|
:scope._ao-card-description, :scope ._ao-card-description {
|
|
2001
2150
|
font-size: var(--text-sm);
|
|
2002
2151
|
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
@@ -3446,9 +3595,6 @@
|
|
|
3446
3595
|
:scope._ao-block, :scope ._ao-block {
|
|
3447
3596
|
display: block;
|
|
3448
3597
|
}
|
|
3449
|
-
:scope._ao-contents, :scope ._ao-contents {
|
|
3450
|
-
display: contents;
|
|
3451
|
-
}
|
|
3452
3598
|
:scope._ao-grid, :scope ._ao-grid {
|
|
3453
3599
|
display: grid;
|
|
3454
3600
|
}
|
|
@@ -3464,6 +3610,9 @@
|
|
|
3464
3610
|
:scope._ao-flex-1, :scope ._ao-flex-1 {
|
|
3465
3611
|
flex: 1;
|
|
3466
3612
|
}
|
|
3613
|
+
:scope._ao-transform, :scope ._ao-transform {
|
|
3614
|
+
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
|
3615
|
+
}
|
|
3467
3616
|
:scope._ao-text-right, :scope ._ao-text-right {
|
|
3468
3617
|
text-align: right;
|
|
3469
3618
|
}
|
|
@@ -3471,10 +3620,6 @@
|
|
|
3471
3620
|
--tw-numeric-spacing: tabular-nums;
|
|
3472
3621
|
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
3473
3622
|
}
|
|
3474
|
-
:scope._ao-shadow, :scope ._ao-shadow {
|
|
3475
|
-
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
3476
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
3477
|
-
}
|
|
3478
3623
|
:scope._ao-select-all, :scope ._ao-select-all {
|
|
3479
3624
|
-webkit-user-select: all;
|
|
3480
3625
|
user-select: all;
|
package/dist/index.cjs
CHANGED
|
@@ -697,18 +697,18 @@ function CardContainer({ bordered, compact, className, ...rest }) {
|
|
|
697
697
|
* an optional title (with icon), description, children, and actions. For
|
|
698
698
|
* anything outside that shape, use `<Card.Container>` and compose by hand.
|
|
699
699
|
*/
|
|
700
|
-
function CardRoot({ bordered, compact, icon, title, description, actions, className, children, ...rest }) {
|
|
701
|
-
const
|
|
700
|
+
function CardRoot({ bordered, compact, icon, title, description, toolbar, actions, className, children, ...rest }) {
|
|
701
|
+
const titleEl = icon !== void 0 || title !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardTitle, {
|
|
702
|
+
icon,
|
|
703
|
+
children: title
|
|
704
|
+
}) : null;
|
|
702
705
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardContainer, {
|
|
703
706
|
bordered,
|
|
704
707
|
compact,
|
|
705
708
|
className,
|
|
706
709
|
...rest,
|
|
707
710
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CardBody, { children: [
|
|
708
|
-
|
|
709
|
-
icon,
|
|
710
|
-
children: title
|
|
711
|
-
}) : null,
|
|
711
|
+
toolbar !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CardHeader, { children: [titleEl, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardToolbar, { children: toolbar })] }) : titleEl,
|
|
712
712
|
description !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardDescription, { children: description }) : null,
|
|
713
713
|
children,
|
|
714
714
|
actions !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardActions, { children: actions }) : null
|
|
@@ -721,6 +721,18 @@ function CardBody({ className, ...rest }) {
|
|
|
721
721
|
...rest
|
|
722
722
|
});
|
|
723
723
|
}
|
|
724
|
+
function CardHeader({ className, ...rest }) {
|
|
725
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
726
|
+
className: cn("card-header", className),
|
|
727
|
+
...rest
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
function CardToolbar({ className, ...rest }) {
|
|
731
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
732
|
+
className: cn("card-toolbar", className),
|
|
733
|
+
...rest
|
|
734
|
+
});
|
|
735
|
+
}
|
|
724
736
|
function CardTitle({ icon, className, children, ...rest }) {
|
|
725
737
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("h3", {
|
|
726
738
|
className: cn("card-title", className),
|
|
@@ -743,6 +755,8 @@ function CardActions({ className, ...rest }) {
|
|
|
743
755
|
var Card = Object.assign(CardRoot, {
|
|
744
756
|
Container: CardContainer,
|
|
745
757
|
Body: CardBody,
|
|
758
|
+
Header: CardHeader,
|
|
759
|
+
Toolbar: CardToolbar,
|
|
746
760
|
Title: CardTitle,
|
|
747
761
|
Description: CardDescription,
|
|
748
762
|
Actions: CardActions
|
|
@@ -1153,6 +1167,117 @@ var Tooltip = Object.assign(TooltipShorthand, {
|
|
|
1153
1167
|
Popup: TooltipPopup
|
|
1154
1168
|
});
|
|
1155
1169
|
//#endregion
|
|
1170
|
+
//#region src/PropertyList.tsx
|
|
1171
|
+
function CopyGlyph({ className }) {
|
|
1172
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
1173
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1174
|
+
width: "14",
|
|
1175
|
+
height: "14",
|
|
1176
|
+
viewBox: "0 0 24 24",
|
|
1177
|
+
fill: "none",
|
|
1178
|
+
stroke: "currentColor",
|
|
1179
|
+
strokeWidth: "2",
|
|
1180
|
+
strokeLinecap: "round",
|
|
1181
|
+
strokeLinejoin: "round",
|
|
1182
|
+
"aria-hidden": "true",
|
|
1183
|
+
className,
|
|
1184
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M7 7m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M15 7v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2" })]
|
|
1185
|
+
});
|
|
1186
|
+
}
|
|
1187
|
+
function CheckGlyph({ className }) {
|
|
1188
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
1189
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1190
|
+
width: "14",
|
|
1191
|
+
height: "14",
|
|
1192
|
+
viewBox: "0 0 24 24",
|
|
1193
|
+
fill: "none",
|
|
1194
|
+
stroke: "currentColor",
|
|
1195
|
+
strokeWidth: "2",
|
|
1196
|
+
strokeLinecap: "round",
|
|
1197
|
+
strokeLinejoin: "round",
|
|
1198
|
+
"aria-hidden": "true",
|
|
1199
|
+
className,
|
|
1200
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M5 12l5 5l10 -10" })
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
function PropertyListRoot({ striped, copyable, hideIfAllEmpty, title, className, children, ...rest }) {
|
|
1204
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
1205
|
+
className: cn([
|
|
1206
|
+
"property-list",
|
|
1207
|
+
striped && "property-list-striped",
|
|
1208
|
+
copyable && "property-list-copyable",
|
|
1209
|
+
hideIfAllEmpty && "property-list-hide-if-empty"
|
|
1210
|
+
], className),
|
|
1211
|
+
...rest,
|
|
1212
|
+
children: [title !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
1213
|
+
className: cn("property-list-title", void 0),
|
|
1214
|
+
children: title
|
|
1215
|
+
}) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dl", {
|
|
1216
|
+
className: cn("property-list-items", void 0),
|
|
1217
|
+
children
|
|
1218
|
+
})]
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
function isEmptyValue(value) {
|
|
1222
|
+
if (value == null) return true;
|
|
1223
|
+
if (typeof value === "string") return value.trim() === "";
|
|
1224
|
+
return false;
|
|
1225
|
+
}
|
|
1226
|
+
function PropertyListItem({ label, value, numeric, copyable, copyValue, children, ...rest }) {
|
|
1227
|
+
if (children !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children });
|
|
1228
|
+
const empty = isEmptyValue(value);
|
|
1229
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PropertyListLabel, { children: label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PropertyListValue, {
|
|
1230
|
+
numeric,
|
|
1231
|
+
copyable,
|
|
1232
|
+
empty,
|
|
1233
|
+
copyValue: copyValue ?? (typeof value === "string" ? value : void 0),
|
|
1234
|
+
...rest,
|
|
1235
|
+
children: empty ? "—" : value
|
|
1236
|
+
})] });
|
|
1237
|
+
}
|
|
1238
|
+
function PropertyListLabel({ className, ...rest }) {
|
|
1239
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", {
|
|
1240
|
+
className: cn("property-list-label", className),
|
|
1241
|
+
...rest
|
|
1242
|
+
});
|
|
1243
|
+
}
|
|
1244
|
+
function PropertyListValue({ numeric, copyable, empty, copyValue, className, children, ...rest }) {
|
|
1245
|
+
const ddRef = (0, react.useRef)(null);
|
|
1246
|
+
const [copied, setCopied] = (0, react.useState)(false);
|
|
1247
|
+
async function handleCopy() {
|
|
1248
|
+
const text = copyValue ?? ddRef.current?.textContent?.trim() ?? "";
|
|
1249
|
+
if (!text) return;
|
|
1250
|
+
try {
|
|
1251
|
+
await navigator.clipboard.writeText(text);
|
|
1252
|
+
setCopied(true);
|
|
1253
|
+
setTimeout(() => setCopied(false), 1200);
|
|
1254
|
+
} catch {}
|
|
1255
|
+
}
|
|
1256
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dd", {
|
|
1257
|
+
ref: ddRef,
|
|
1258
|
+
className: cn([
|
|
1259
|
+
"property-list-value",
|
|
1260
|
+
numeric && "property-list-value-numeric",
|
|
1261
|
+
copyable && "property-list-value-copyable",
|
|
1262
|
+
empty && "property-list-value-empty"
|
|
1263
|
+
], className),
|
|
1264
|
+
...rest,
|
|
1265
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
1266
|
+
type: "button",
|
|
1267
|
+
"aria-label": "Copy",
|
|
1268
|
+
className: cn("property-list-copy", void 0),
|
|
1269
|
+
onClick: handleCopy,
|
|
1270
|
+
"data-copied": copied ? "true" : void 0,
|
|
1271
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopyGlyph, { className: cn("property-list-copy-icon", void 0) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckGlyph, { className: cn("property-list-copy-icon-copied", void 0) })]
|
|
1272
|
+
})]
|
|
1273
|
+
});
|
|
1274
|
+
}
|
|
1275
|
+
var PropertyList = Object.assign(PropertyListRoot, {
|
|
1276
|
+
Item: PropertyListItem,
|
|
1277
|
+
Label: PropertyListLabel,
|
|
1278
|
+
Value: PropertyListValue
|
|
1279
|
+
});
|
|
1280
|
+
//#endregion
|
|
1156
1281
|
//#region src/Table.tsx
|
|
1157
1282
|
function TableRoot({ striped, bordered, relaxed, sticky, className, ...rest }) {
|
|
1158
1283
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", {
|
|
@@ -1403,6 +1528,7 @@ exports.Menu = Menu;
|
|
|
1403
1528
|
exports.Navbar = Navbar;
|
|
1404
1529
|
exports.Pagination = Pagination;
|
|
1405
1530
|
exports.Progress = Progress;
|
|
1531
|
+
exports.PropertyList = PropertyList;
|
|
1406
1532
|
exports.Radio = Radio;
|
|
1407
1533
|
exports.RadioGroup = RadioGroup;
|
|
1408
1534
|
exports.Select = Select;
|