@panneau/ui 5.0.0-alpha.43 → 5.0.0-alpha.44
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/avatar/Avatar.css +87 -0
- package/dist/avatar/Avatar.d.ts +31 -0
- package/dist/avatar/Avatar.d.ts.map +1 -0
- package/dist/avatar/Avatar.js +113 -0
- package/dist/avatar/Avatar.js.map +1 -0
- package/dist/avatar/Avatar.module.js +30 -0
- package/dist/avatar/Avatar.module.js.map +1 -0
- package/dist/avatar/AvatarGroup.d.ts +27 -0
- package/dist/avatar/AvatarGroup.d.ts.map +1 -0
- package/dist/avatar/AvatarGroup.js +109 -0
- package/dist/avatar/AvatarGroup.js.map +1 -0
- package/dist/avatar/initials.d.ts +11 -0
- package/dist/avatar/initials.d.ts.map +1 -0
- package/dist/avatar/initials.js +34 -0
- package/dist/avatar/initials.js.map +1 -0
- package/dist/avatar/tokens.d.ts +3 -0
- package/dist/avatar/tokens.d.ts.map +1 -0
- package/dist/avatar/tokens.js +33 -0
- package/dist/avatar/tokens.js.map +1 -0
- package/dist/badge/tokens.d.ts +1 -1
- package/dist/breadcrumbs/Breadcrumbs.css +66 -0
- package/dist/breadcrumbs/Breadcrumbs.d.ts +25 -0
- package/dist/breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/breadcrumbs/Breadcrumbs.js +158 -0
- package/dist/breadcrumbs/Breadcrumbs.js.map +1 -0
- package/dist/breadcrumbs/Breadcrumbs.module.js +20 -0
- package/dist/breadcrumbs/Breadcrumbs.module.js.map +1 -0
- package/dist/breadcrumbs/tokens.d.ts +3 -0
- package/dist/breadcrumbs/tokens.d.ts.map +1 -0
- package/dist/breadcrumbs/tokens.js +23 -0
- package/dist/breadcrumbs/tokens.js.map +1 -0
- package/dist/button/tokens.d.ts +1 -1
- package/dist/button-group/ButtonGroup.css +75 -0
- package/dist/button-group/ButtonGroup.d.ts +19 -0
- package/dist/button-group/ButtonGroup.d.ts.map +1 -0
- package/dist/button-group/ButtonGroup.js +42 -0
- package/dist/button-group/ButtonGroup.js.map +1 -0
- package/dist/button-group/ButtonGroup.module.js +12 -0
- package/dist/button-group/ButtonGroup.module.js.map +1 -0
- package/dist/button-group/tokens.d.ts +3 -0
- package/dist/button-group/tokens.d.ts.map +1 -0
- package/dist/button-group/tokens.js +10 -0
- package/dist/button-group/tokens.js.map +1 -0
- package/dist/combo-box/ComboBox.js +2 -2
- package/dist/date-picker/DatePicker.js +2 -2
- package/dist/date-range-picker/DateRangePicker.js +1 -1
- package/dist/empty-state/EmptyState.css +73 -0
- package/dist/empty-state/EmptyState.d.ts +24 -0
- package/dist/empty-state/EmptyState.d.ts.map +1 -0
- package/dist/empty-state/EmptyState.js +96 -0
- package/dist/empty-state/EmptyState.js.map +1 -0
- package/dist/empty-state/EmptyState.module.js +22 -0
- package/dist/empty-state/EmptyState.module.js.map +1 -0
- package/dist/empty-state/tokens.d.ts +3 -0
- package/dist/empty-state/tokens.d.ts.map +1 -0
- package/dist/empty-state/tokens.js +35 -0
- package/dist/empty-state/tokens.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -4
- package/dist/pill-trigger/tokens.d.ts +1 -1
- package/dist/prose/tokens.d.ts +1 -1
- package/dist/select/Select.js +2 -2
- package/dist/text-area/TextArea.css +38 -0
- package/dist/text-area/TextArea.d.ts +11 -1
- package/dist/text-area/TextArea.d.ts.map +1 -1
- package/dist/text-area/TextArea.js +129 -91
- package/dist/text-area/TextArea.js.map +1 -1
- package/dist/text-area/TextArea.module.js +12 -2
- package/dist/text-area/TextArea.module.js.map +1 -1
- package/dist/theme/components.d.ts +9 -4
- package/dist/theme/components.d.ts.map +1 -1
- package/dist/theme/components.js +10 -0
- package/dist/theme/components.js.map +1 -1
- package/dist/tile/Tile.css +169 -0
- package/dist/tile/Tile.d.ts +40 -0
- package/dist/tile/Tile.d.ts.map +1 -0
- package/dist/tile/Tile.js +165 -0
- package/dist/tile/Tile.js.map +1 -0
- package/dist/tile/Tile.module.js +40 -0
- package/dist/tile/Tile.module.js.map +1 -0
- package/dist/tile/tokens.d.ts +3 -0
- package/dist/tile/tokens.d.ts.map +1 -0
- package/dist/tile/tokens.js +39 -0
- package/dist/tile/tokens.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
.panneau-tile {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: var(--panneau-tile-gap, var(--panneau-space-3));
|
|
6
|
+
min-width: 0;
|
|
7
|
+
padding: var(--panneau-tile-padding-y, var(--panneau-space-3))
|
|
8
|
+
var(--panneau-tile-padding-x, var(--panneau-space-3));
|
|
9
|
+
color: var(--panneau-color-text);
|
|
10
|
+
border: var(--panneau-border-width) solid transparent;
|
|
11
|
+
border-radius: var(--panneau-tile-radius, var(--panneau-radius-lg));
|
|
12
|
+
transition: background-color var(--panneau-duration);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.panneau-tile-sm {
|
|
16
|
+
gap: var(--panneau-space-2);
|
|
17
|
+
padding-block: var(--panneau-tile-padding-y-sm, var(--panneau-space-2));
|
|
18
|
+
font-size: var(--panneau-font-size-sm);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.panneau-tile-plain {
|
|
22
|
+
background-color: transparent;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.panneau-tile-outline {
|
|
26
|
+
background-color: var(--panneau-color-surface);
|
|
27
|
+
border-color: var(--panneau-tile-border-color, var(--panneau-color-border));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.panneau-tile-subtle {
|
|
31
|
+
background-color: var(--panneau-tile-subtle-bg, var(--panneau-color-surface-sunken));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.panneau-tile-linked:has(.panneau-tile-link[data-hovered]) {
|
|
35
|
+
background-color: var(--panneau-tile-hover-bg, var(--panneau-color-hover));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.panneau-tile-linked:has(.panneau-tile-link[data-focus-visible]) {
|
|
39
|
+
outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
|
|
40
|
+
outline-offset: -1px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.panneau-tile-media {
|
|
44
|
+
display: inline-grid;
|
|
45
|
+
flex: none;
|
|
46
|
+
place-items: center;
|
|
47
|
+
width: var(--panneau-tile-media-size, 2.5rem);
|
|
48
|
+
height: var(--panneau-tile-media-size, 2.5rem);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.panneau-tile-sm .panneau-tile-media {
|
|
52
|
+
width: var(--panneau-tile-media-size-sm, 2rem);
|
|
53
|
+
height: var(--panneau-tile-media-size-sm, 2rem);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.panneau-tile-media > img {
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: 100%;
|
|
59
|
+
object-fit: cover;
|
|
60
|
+
border-radius: var(--panneau-radius-md);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.panneau-tile-icon {
|
|
64
|
+
color: var(--panneau-tile-icon-color, var(--panneau-color-text-muted));
|
|
65
|
+
background-color: var(--panneau-tile-icon-bg, var(--panneau-color-surface-sunken));
|
|
66
|
+
border-radius: var(--panneau-tile-icon-radius, var(--panneau-radius-md));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.panneau-tile-content {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex: 1 1 auto;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
gap: 0.125rem;
|
|
74
|
+
min-width: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.panneau-tile-title {
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
font-weight: var(--panneau-tile-title-font-weight, var(--panneau-font-weight-medium));
|
|
80
|
+
line-height: var(--panneau-line-height-tight);
|
|
81
|
+
text-overflow: ellipsis;
|
|
82
|
+
white-space: nowrap;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.panneau-tile-link {
|
|
86
|
+
color: inherit;
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
outline: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* The link's hit area covers the tile; the actions sit above it. */
|
|
93
|
+
.panneau-tile-link::after {
|
|
94
|
+
position: absolute;
|
|
95
|
+
inset: 0;
|
|
96
|
+
content: '';
|
|
97
|
+
border-radius: inherit;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.panneau-tile-description {
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
font-size: var(--panneau-font-size-sm);
|
|
103
|
+
line-height: var(--panneau-line-height-tight);
|
|
104
|
+
color: var(--panneau-tile-description-color, var(--panneau-color-text-muted));
|
|
105
|
+
text-overflow: ellipsis;
|
|
106
|
+
white-space: nowrap;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.panneau-tile-sm .panneau-tile-description {
|
|
110
|
+
font-size: var(--panneau-font-size-xs);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.panneau-tile-children {
|
|
114
|
+
margin-top: var(--panneau-space-1);
|
|
115
|
+
font-size: var(--panneau-font-size-sm);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.panneau-tile-actions {
|
|
119
|
+
position: relative;
|
|
120
|
+
z-index: 1;
|
|
121
|
+
display: flex;
|
|
122
|
+
flex: none;
|
|
123
|
+
align-items: center;
|
|
124
|
+
gap: var(--panneau-space-1);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* TileGroup: a list, with a line between its tiles. */
|
|
128
|
+
.panneau-tile-group {
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
min-width: 0;
|
|
132
|
+
margin: 0;
|
|
133
|
+
padding: 0;
|
|
134
|
+
list-style: none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.panneau-tile-group > .panneau-tile + .panneau-tile {
|
|
138
|
+
border-top-color: var(--panneau-tile-border-color, var(--panneau-color-border));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.panneau-tile-group > .panneau-tile {
|
|
142
|
+
border-radius: 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.panneau-tile-group > .panneau-tile:first-child {
|
|
146
|
+
border-start-start-radius: inherit;
|
|
147
|
+
border-start-end-radius: inherit;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.panneau-tile-group > .panneau-tile:last-child {
|
|
151
|
+
border-end-start-radius: inherit;
|
|
152
|
+
border-end-end-radius: inherit;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.panneau-tile-group-outline {
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
background-color: var(--panneau-color-surface);
|
|
158
|
+
border: var(--panneau-border-width) solid
|
|
159
|
+
var(--panneau-tile-border-color, var(--panneau-color-border));
|
|
160
|
+
border-radius: var(--panneau-tile-radius, var(--panneau-radius-lg));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.panneau-tile-group-outline > .panneau-tile.panneau-tile-outline {
|
|
164
|
+
border-color: transparent;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.panneau-tile-group-outline > .panneau-tile.panneau-tile-outline + .panneau-tile.panneau-tile-outline {
|
|
168
|
+
border-top-color: var(--panneau-tile-border-color, var(--panneau-color-border));
|
|
169
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type IconComponent } from '../icon/Icon.js';
|
|
3
|
+
export type TileAppearance = 'plain' | 'outline' | 'subtle';
|
|
4
|
+
export interface TileProps {
|
|
5
|
+
/** What the tile shows: a name, a file, a session. */
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
/** A line under the title. */
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
/** More content under the description. */
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
/** An icon, in a rounded square. */
|
|
12
|
+
icon?: IconComponent | undefined;
|
|
13
|
+
/** A media other than an icon: an `Avatar`, a thumbnail. */
|
|
14
|
+
media?: ReactNode;
|
|
15
|
+
/** Buttons or a menu, at the end. They stay pressable on their own in a tile with a link. */
|
|
16
|
+
actions?: ReactNode;
|
|
17
|
+
/** Makes the whole tile a link, through the app's router: the title is the link. */
|
|
18
|
+
href?: string | undefined;
|
|
19
|
+
/** Opens the link in a new tab, without access to the admin. */
|
|
20
|
+
external?: boolean;
|
|
21
|
+
/** Defaults to `plain`. */
|
|
22
|
+
appearance?: TileAppearance;
|
|
23
|
+
/** Defaults to `md`. */
|
|
24
|
+
size?: 'sm' | 'md';
|
|
25
|
+
className?: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
/** A row that shows one thing: a media, a title, a description, and actions. */
|
|
28
|
+
export declare function Tile({ title, description, children, icon, media, actions, href, external, appearance, size, className, }: TileProps): import("react").JSX.Element;
|
|
29
|
+
export interface TileGroupProps {
|
|
30
|
+
/** `Tile`s: each one is an item of the list. */
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
/** `plain` (default) draws a line between the tiles; `outline` adds a border around them. */
|
|
33
|
+
appearance?: 'plain' | 'outline';
|
|
34
|
+
/** Names the list. */
|
|
35
|
+
label?: string | undefined;
|
|
36
|
+
className?: string | undefined;
|
|
37
|
+
}
|
|
38
|
+
/** A list of tiles, with a line between them. */
|
|
39
|
+
export declare function TileGroup({ children, appearance, label, className }: TileGroupProps): import("react").JSX.Element;
|
|
40
|
+
//# sourceMappingURL=Tile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../src/tile/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAI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,EAAE,EAAE,cAAc,+BAc7F"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { cx } from "../utils/cx.js";
|
|
2
|
+
import { Icon } from "../icon/Icon.js";
|
|
3
|
+
import Tile_module_default from "./Tile.module.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { Link } from "react-aria-components";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { createContext, use } from "react";
|
|
8
|
+
//#region src/tile/Tile.tsx
|
|
9
|
+
var TileGroupContext = createContext(false);
|
|
10
|
+
/** A row that shows one thing: a media, a title, a description, and actions. */
|
|
11
|
+
function Tile(t0) {
|
|
12
|
+
const $ = c(29);
|
|
13
|
+
const { title, description, children, icon, media, actions, href, external: t1, appearance: t2, size: t3, className } = t0;
|
|
14
|
+
const external = t1 === void 0 ? false : t1;
|
|
15
|
+
const appearance = t2 === void 0 ? "plain" : t2;
|
|
16
|
+
const size = t3 === void 0 ? "md" : t3;
|
|
17
|
+
const Element = use(TileGroupContext) ? "li" : "div";
|
|
18
|
+
const t4 = Tile_module_default[appearance];
|
|
19
|
+
const t5 = size === "sm" && Tile_module_default.sm;
|
|
20
|
+
const t6 = href !== void 0 && Tile_module_default.linked;
|
|
21
|
+
let t7;
|
|
22
|
+
if ($[0] !== className || $[1] !== t4 || $[2] !== t5 || $[3] !== t6) {
|
|
23
|
+
t7 = cx("panneau-tile", Tile_module_default.tile, t4, t5, t6, className);
|
|
24
|
+
$[0] = className;
|
|
25
|
+
$[1] = t4;
|
|
26
|
+
$[2] = t5;
|
|
27
|
+
$[3] = t6;
|
|
28
|
+
$[4] = t7;
|
|
29
|
+
} else t7 = $[4];
|
|
30
|
+
let t8;
|
|
31
|
+
if ($[5] !== icon || $[6] !== media || $[7] !== size) {
|
|
32
|
+
t8 = media !== void 0 && media !== null ? /* @__PURE__ */ jsx("span", {
|
|
33
|
+
className: Tile_module_default.media,
|
|
34
|
+
children: media
|
|
35
|
+
}) : icon !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
36
|
+
className: cx(Tile_module_default.media, Tile_module_default.icon),
|
|
37
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
38
|
+
icon,
|
|
39
|
+
size: size === "sm" ? "sm" : "md"
|
|
40
|
+
})
|
|
41
|
+
}) : null;
|
|
42
|
+
$[5] = icon;
|
|
43
|
+
$[6] = media;
|
|
44
|
+
$[7] = size;
|
|
45
|
+
$[8] = t8;
|
|
46
|
+
} else t8 = $[8];
|
|
47
|
+
let t9;
|
|
48
|
+
if ($[9] !== external || $[10] !== href || $[11] !== title) {
|
|
49
|
+
t9 = href !== void 0 ? /* @__PURE__ */ jsx(Link, {
|
|
50
|
+
href,
|
|
51
|
+
...external ? {
|
|
52
|
+
target: "_blank",
|
|
53
|
+
rel: "noopener noreferrer"
|
|
54
|
+
} : {},
|
|
55
|
+
className: cx(Tile_module_default.title, Tile_module_default.link),
|
|
56
|
+
children: title
|
|
57
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: Tile_module_default.title,
|
|
59
|
+
children: title
|
|
60
|
+
});
|
|
61
|
+
$[9] = external;
|
|
62
|
+
$[10] = href;
|
|
63
|
+
$[11] = title;
|
|
64
|
+
$[12] = t9;
|
|
65
|
+
} else t9 = $[12];
|
|
66
|
+
let t10;
|
|
67
|
+
if ($[13] !== description) {
|
|
68
|
+
t10 = description !== void 0 && description !== null ? /* @__PURE__ */ jsx("span", {
|
|
69
|
+
className: Tile_module_default.description,
|
|
70
|
+
children: description
|
|
71
|
+
}) : null;
|
|
72
|
+
$[13] = description;
|
|
73
|
+
$[14] = t10;
|
|
74
|
+
} else t10 = $[14];
|
|
75
|
+
let t11;
|
|
76
|
+
if ($[15] !== children) {
|
|
77
|
+
t11 = children !== void 0 && children !== null ? /* @__PURE__ */ jsx("div", {
|
|
78
|
+
className: Tile_module_default.children,
|
|
79
|
+
children
|
|
80
|
+
}) : null;
|
|
81
|
+
$[15] = children;
|
|
82
|
+
$[16] = t11;
|
|
83
|
+
} else t11 = $[16];
|
|
84
|
+
let t12;
|
|
85
|
+
if ($[17] !== t10 || $[18] !== t11 || $[19] !== t9) {
|
|
86
|
+
t12 = /* @__PURE__ */ jsxs("div", {
|
|
87
|
+
className: Tile_module_default.content,
|
|
88
|
+
children: [
|
|
89
|
+
t9,
|
|
90
|
+
t10,
|
|
91
|
+
t11
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
$[17] = t10;
|
|
95
|
+
$[18] = t11;
|
|
96
|
+
$[19] = t9;
|
|
97
|
+
$[20] = t12;
|
|
98
|
+
} else t12 = $[20];
|
|
99
|
+
let t13;
|
|
100
|
+
if ($[21] !== actions) {
|
|
101
|
+
t13 = actions !== void 0 && actions !== null ? /* @__PURE__ */ jsx("div", {
|
|
102
|
+
className: Tile_module_default.actions,
|
|
103
|
+
children: actions
|
|
104
|
+
}) : null;
|
|
105
|
+
$[21] = actions;
|
|
106
|
+
$[22] = t13;
|
|
107
|
+
} else t13 = $[22];
|
|
108
|
+
let t14;
|
|
109
|
+
if ($[23] !== Element || $[24] !== t12 || $[25] !== t13 || $[26] !== t7 || $[27] !== t8) {
|
|
110
|
+
t14 = /* @__PURE__ */ jsxs(Element, {
|
|
111
|
+
className: t7,
|
|
112
|
+
children: [
|
|
113
|
+
t8,
|
|
114
|
+
t12,
|
|
115
|
+
t13
|
|
116
|
+
]
|
|
117
|
+
});
|
|
118
|
+
$[23] = Element;
|
|
119
|
+
$[24] = t12;
|
|
120
|
+
$[25] = t13;
|
|
121
|
+
$[26] = t7;
|
|
122
|
+
$[27] = t8;
|
|
123
|
+
$[28] = t14;
|
|
124
|
+
} else t14 = $[28];
|
|
125
|
+
return t14;
|
|
126
|
+
}
|
|
127
|
+
/** A list of tiles, with a line between them. */
|
|
128
|
+
function TileGroup(t0) {
|
|
129
|
+
const $ = c(9);
|
|
130
|
+
const { children, appearance: t1, label, className } = t0;
|
|
131
|
+
const t2 = (t1 === void 0 ? "plain" : t1) === "outline" && Tile_module_default.groupOutline;
|
|
132
|
+
let t3;
|
|
133
|
+
if ($[0] !== className || $[1] !== t2) {
|
|
134
|
+
t3 = cx("panneau-tile-group", Tile_module_default.group, t2, className);
|
|
135
|
+
$[0] = className;
|
|
136
|
+
$[1] = t2;
|
|
137
|
+
$[2] = t3;
|
|
138
|
+
} else t3 = $[2];
|
|
139
|
+
let t4;
|
|
140
|
+
if ($[3] !== children) {
|
|
141
|
+
t4 = /* @__PURE__ */ jsx(TileGroupContext, {
|
|
142
|
+
value: true,
|
|
143
|
+
children
|
|
144
|
+
});
|
|
145
|
+
$[3] = children;
|
|
146
|
+
$[4] = t4;
|
|
147
|
+
} else t4 = $[4];
|
|
148
|
+
let t5;
|
|
149
|
+
if ($[5] !== label || $[6] !== t3 || $[7] !== t4) {
|
|
150
|
+
t5 = /* @__PURE__ */ jsx("ul", {
|
|
151
|
+
"aria-label": label,
|
|
152
|
+
className: t3,
|
|
153
|
+
children: t4
|
|
154
|
+
});
|
|
155
|
+
$[5] = label;
|
|
156
|
+
$[6] = t3;
|
|
157
|
+
$[7] = t4;
|
|
158
|
+
$[8] = t5;
|
|
159
|
+
} else t5 = $[8];
|
|
160
|
+
return t5;
|
|
161
|
+
}
|
|
162
|
+
//#endregion
|
|
163
|
+
export { Tile, TileGroup };
|
|
164
|
+
|
|
165
|
+
//# sourceMappingURL=Tile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tile.js","names":["ReactNode","createContext","use","Link","Icon","IconComponent","cx","styles","TileAppearance","TileProps","title","description","children","icon","media","actions","href","external","appearance","size","className","TileGroupContext","Tile","t0","$","_c","t1","t2","t3","undefined","inGroup","Element","t4","t5","sm","t6","linked","t7","tile","t8","t9","target","rel","link","t10","t11","t12","content","t13","t14","TileGroupProps","label","TileGroup","groupOutline","group","_c","styles"],"sources":["../../src/tile/Tile.tsx"],"sourcesContent":["import { type ReactNode, createContext, use } from 'react';\nimport { Link } from 'react-aria-components';\n\nimport { Icon, type IconComponent } from '../icon/Icon';\nimport { cx } from '../utils/cx';\nimport styles from './Tile.module.css';\n\nexport type TileAppearance = 'plain' | 'outline' | 'subtle';\n\nexport interface TileProps {\n /** What the tile shows: a name, a file, a session. */\n title: ReactNode;\n /** A line under the title. */\n description?: ReactNode;\n /** More content under the description. */\n children?: ReactNode;\n /** An icon, in a rounded square. */\n icon?: IconComponent | undefined;\n /** A media other than an icon: an `Avatar`, a thumbnail. */\n media?: ReactNode;\n /** Buttons or a menu, at the end. They stay pressable on their own in a tile with a link. */\n actions?: ReactNode;\n /** Makes the whole tile a link, through the app's router: the title is the link. */\n href?: string | undefined;\n /** Opens the link in a new tab, without access to the admin. */\n external?: boolean;\n /** Defaults to `plain`. */\n appearance?: TileAppearance;\n /** Defaults to `md`. */\n size?: 'sm' | 'md';\n className?: string | undefined;\n}\n\nconst TileGroupContext = createContext(false);\n\n/** A row that shows one thing: a media, a title, a description, and actions. */\nexport function Tile({\n title,\n description,\n children,\n icon,\n media,\n actions,\n href,\n external = false,\n appearance = 'plain',\n size = 'md',\n className,\n}: TileProps) {\n const inGroup = use(TileGroupContext);\n const Element = inGroup ? 'li' : 'div';\n return (\n <Element\n className={cx(\n 'panneau-tile',\n styles.tile,\n styles[appearance],\n size === 'sm' && styles.sm,\n href !== undefined && styles.linked,\n className,\n )}\n >\n {media !== undefined && media !== null ? (\n <span className={styles.media}>{media}</span>\n ) : icon !== undefined ? (\n <span className={cx(styles.media, styles.icon)}>\n <Icon icon={icon} size={size === 'sm' ? 'sm' : 'md'} />\n </span>\n ) : null}\n <div className={styles.content}>\n {href !== undefined ? (\n <Link\n href={href}\n {...(external ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n className={cx(styles.title, styles.link)}\n >\n {title}\n </Link>\n ) : (\n <span className={styles.title}>{title}</span>\n )}\n {description !== undefined && description !== null ? (\n <span className={styles.description}>{description}</span>\n ) : null}\n {children !== undefined && children !== null ? (\n <div className={styles.children}>{children}</div>\n ) : null}\n </div>\n {actions !== undefined && actions !== null ? (\n <div className={styles.actions}>{actions}</div>\n ) : null}\n </Element>\n );\n}\n\nexport interface TileGroupProps {\n /** `Tile`s: each one is an item of the list. */\n children?: ReactNode;\n /** `plain` (default) draws a line between the tiles; `outline` adds a border around them. */\n appearance?: 'plain' | 'outline';\n /** Names the list. */\n label?: string | undefined;\n className?: string | undefined;\n}\n\n/** A list of tiles, with a line between them. */\nexport function TileGroup({ children, appearance = 'plain', label, className }: TileGroupProps) {\n return (\n <ul\n aria-label={label}\n className={cx(\n 'panneau-tile-group',\n styles.group,\n appearance === 'outline' && styles.groupOutline,\n className,\n )}\n >\n <TileGroupContext value>{children}</TileGroupContext>\n </ul>\n );\n}\n"],"mappings":";;;;;;;;AAiCA,IAAMqB,mBAAmBpB,cAAc,KAAK;;AAG5C,SAAOqB,KAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAc,MAAA,EAAAf,OAAAC,aAAAC,UAAAC,MAAAC,OAAAC,SAAAC,MAAAC,UAAAS,IAAAR,YAAAS,IAAAR,MAAAS,IAAAR,cAAAG;CAQjB,MAAAN,WAAAS,OAAAG,KAAAA,IAAA,QAAAH;CACA,MAAAR,aAAAS,OAAAE,KAAAA,IAAA,UAAAF;CACA,MAAAR,OAAAS,OAAAC,KAAAA,IAAA,OAAAD;CAIA,MAAAG,UADgB7B,IAAImB,gBACJS,IAAA,OAAA;CAMJ,MAAAE,KAAAzB,oBAAOW;CACP,MAAAe,KAAAd,SAAS,QAAQZ,oBAAM2B;CACvB,MAAAC,KAAAnB,SAASa,KAAAA,KAAatB,oBAAM6B;CAAO,IAAAC;CAAA,IAAAb,EAAA,OAAAJ,aAAAI,EAAA,OAAAQ,MAAAR,EAAA,OAAAS,MAAAT,EAAA,OAAAW,IAAA;EAL5BE,KAAA/B,GACP,gBACAC,oBAAM+B,MACNN,IACAC,IACAE,IACAf,SACJ;EAACI,EAAA,KAAAJ;EAAAI,EAAA,KAAAQ;EAA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elB,SAAOG,UAAA7B,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAmB,MAAA,EAAAb,UAAAM,YAAAQ,IAAAyB,OAAA/B,cAAAG;CAOV,MAAAI,MAPsBD,OAAAG,KAAAA,IAAA,UAAAH,QAOP,aAAanB,oBAAM8C;CAAa,IAAAzB;CAAA,IAAAJ,EAAA,OAAAJ,aAAAI,EAAA,OAAAG,IAAA;EAHxCC,KAAAtB,GACP,sBACAC,oBAAM+C,OACN3B,IACAP,SACJ;EAACI,EAAA,KAAAJ;EAAAI,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAZ,UAAA;EAEDoB,KAAA,oBAAC,kBAAD;GAAkB,OAAA;GAAOpB;EAAR,CAAA;EAAoCY,EAAA,KAAAZ;EAAAY,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,OAAA2B,SAAA3B,EAAA,OAAAI,MAAAJ,EAAA,OAAAQ,IAAA;EATzDC,KAAA,oBAAA,MAAA;GACgBkB,cAAAA;GACD,WAAAvB;GAOXI,UAAAA;EACC,CAAA;EAAAR,EAAA,KAAA2B;EAAA3B,EAAA,KAAAI;EAAAJ,EAAA,KAAAQ;EAAAR,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OAVLS;AAUK"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import "./Tile.css";
|
|
2
|
+
//#region src/tile/Tile.module.css
|
|
3
|
+
var tile = "panneau-tile";
|
|
4
|
+
var sm = "panneau-tile-sm";
|
|
5
|
+
var plain = "panneau-tile-plain";
|
|
6
|
+
var outline = "panneau-tile-outline";
|
|
7
|
+
var subtle = "panneau-tile-subtle";
|
|
8
|
+
var linked = "panneau-tile-linked";
|
|
9
|
+
var link = "panneau-tile-link";
|
|
10
|
+
var media = "panneau-tile-media";
|
|
11
|
+
var icon = "panneau-tile-icon";
|
|
12
|
+
var content = "panneau-tile-content";
|
|
13
|
+
var title = "panneau-tile-title";
|
|
14
|
+
var description = "panneau-tile-description";
|
|
15
|
+
var children = "panneau-tile-children";
|
|
16
|
+
var actions = "panneau-tile-actions";
|
|
17
|
+
var group = "panneau-tile-group";
|
|
18
|
+
var groupOutline = "panneau-tile-group-outline";
|
|
19
|
+
var Tile_module_default = {
|
|
20
|
+
tile,
|
|
21
|
+
sm,
|
|
22
|
+
plain,
|
|
23
|
+
outline,
|
|
24
|
+
subtle,
|
|
25
|
+
linked,
|
|
26
|
+
link,
|
|
27
|
+
media,
|
|
28
|
+
icon,
|
|
29
|
+
content,
|
|
30
|
+
title,
|
|
31
|
+
description,
|
|
32
|
+
children,
|
|
33
|
+
actions,
|
|
34
|
+
group,
|
|
35
|
+
groupOutline
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { actions, children, content, Tile_module_default as default, description, group, groupOutline, icon, link, linked, media, outline, plain, sm, subtle, tile, title };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=Tile.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tile.module.js","names":[],"sources":["../../src/tile/Tile.module.css"],"sourcesContent":[".tile {\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--panneau-tile-gap, var(--panneau-space-3));\n min-width: 0;\n padding: var(--panneau-tile-padding-y, var(--panneau-space-3))\n var(--panneau-tile-padding-x, var(--panneau-space-3));\n color: var(--panneau-color-text);\n border: var(--panneau-border-width) solid transparent;\n border-radius: var(--panneau-tile-radius, var(--panneau-radius-lg));\n transition: background-color var(--panneau-duration);\n}\n\n.sm {\n gap: var(--panneau-space-2);\n padding-block: var(--panneau-tile-padding-y-sm, var(--panneau-space-2));\n font-size: var(--panneau-font-size-sm);\n}\n\n.plain {\n background-color: transparent;\n}\n\n.outline {\n background-color: var(--panneau-color-surface);\n border-color: var(--panneau-tile-border-color, var(--panneau-color-border));\n}\n\n.subtle {\n background-color: var(--panneau-tile-subtle-bg, var(--panneau-color-surface-sunken));\n}\n\n.linked:has(.link[data-hovered]) {\n background-color: var(--panneau-tile-hover-bg, var(--panneau-color-hover));\n}\n\n.linked:has(.link[data-focus-visible]) {\n outline: var(--panneau-focus-width) solid var(--panneau-color-focus);\n outline-offset: -1px;\n}\n\n.media {\n display: inline-grid;\n flex: none;\n place-items: center;\n width: var(--panneau-tile-media-size, 2.5rem);\n height: var(--panneau-tile-media-size, 2.5rem);\n}\n\n.sm .media {\n width: var(--panneau-tile-media-size-sm, 2rem);\n height: var(--panneau-tile-media-size-sm, 2rem);\n}\n\n.media > img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: var(--panneau-radius-md);\n}\n\n.icon {\n color: var(--panneau-tile-icon-color, var(--panneau-color-text-muted));\n background-color: var(--panneau-tile-icon-bg, var(--panneau-color-surface-sunken));\n border-radius: var(--panneau-tile-icon-radius, var(--panneau-radius-md));\n}\n\n.content {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 0.125rem;\n min-width: 0;\n}\n\n.title {\n overflow: hidden;\n font-weight: var(--panneau-tile-title-font-weight, var(--panneau-font-weight-medium));\n line-height: var(--panneau-line-height-tight);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.link {\n color: inherit;\n text-decoration: none;\n cursor: pointer;\n outline: none;\n}\n\n/* The link's hit area covers the tile; the actions sit above it. */\n.link::after {\n position: absolute;\n inset: 0;\n content: '';\n border-radius: inherit;\n}\n\n.description {\n overflow: hidden;\n font-size: var(--panneau-font-size-sm);\n line-height: var(--panneau-line-height-tight);\n color: var(--panneau-tile-description-color, var(--panneau-color-text-muted));\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sm .description {\n font-size: var(--panneau-font-size-xs);\n}\n\n.children {\n margin-top: var(--panneau-space-1);\n font-size: var(--panneau-font-size-sm);\n}\n\n.actions {\n position: relative;\n z-index: 1;\n display: flex;\n flex: none;\n align-items: center;\n gap: var(--panneau-space-1);\n}\n\n/* TileGroup: a list, with a line between its tiles. */\n.group {\n display: flex;\n flex-direction: column;\n min-width: 0;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.group > .tile + .tile {\n border-top-color: var(--panneau-tile-border-color, var(--panneau-color-border));\n}\n\n.group > .tile {\n border-radius: 0;\n}\n\n.group > .tile:first-child {\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n}\n\n.group > .tile:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n}\n\n.groupOutline {\n overflow: hidden;\n background-color: var(--panneau-color-surface);\n border: var(--panneau-border-width) solid\n var(--panneau-tile-border-color, var(--panneau-color-border));\n border-radius: var(--panneau-tile-radius, var(--panneau-radius-lg));\n}\n\n.groupOutline > .tile.outline {\n border-color: transparent;\n}\n\n.groupOutline > .tile.outline + .tile.outline {\n border-top-color: var(--panneau-tile-border-color, var(--panneau-color-border));\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Tokens of Tile and TileGroup. */
|
|
2
|
+
export declare const tileTokens: import("../index.js").ComponentTokens<"tile", "panneau-tile-radius" | "panneau-tile-gap" | "panneau-tile-padding-y" | "panneau-tile-padding-x" | "panneau-tile-title-font-weight" | "panneau-tile-border-color" | "panneau-tile-padding-y-sm" | "panneau-tile-icon-bg" | "panneau-tile-icon-color" | "panneau-tile-icon-radius" | "panneau-tile-description-color" | "panneau-tile-media-size" | "panneau-tile-media-size-sm" | "panneau-tile-subtle-bg" | "panneau-tile-hover-bg">;
|
|
3
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/tile/tokens.ts"],"names":[],"mappings":"AAEA,oCAAoC;AACpC,eAAO,MAAM,UAAU,4cA+BrB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponentTokens } from "../theme/componentTokens.js";
|
|
2
|
+
//#region src/tile/tokens.ts
|
|
3
|
+
/** Tokens of Tile and TileGroup. */
|
|
4
|
+
var tileTokens = defineComponentTokens("tile", {
|
|
5
|
+
/** Space between the media, the text and the actions. */
|
|
6
|
+
gap: "var(--panneau-space-3)",
|
|
7
|
+
/** Horizontal padding. */
|
|
8
|
+
"padding-x": "var(--panneau-space-3)",
|
|
9
|
+
/** Vertical padding of `md`. */
|
|
10
|
+
"padding-y": "var(--panneau-space-3)",
|
|
11
|
+
/** Vertical padding of `sm`. */
|
|
12
|
+
"padding-y-sm": "var(--panneau-space-2)",
|
|
13
|
+
/** Corner radius of a tile, and of an outlined group. */
|
|
14
|
+
radius: "var(--panneau-radius-lg)",
|
|
15
|
+
/** Color of the border of `outline`, and of the lines of a group. */
|
|
16
|
+
"border-color": "var(--panneau-color-border)",
|
|
17
|
+
/** Background of `subtle`. */
|
|
18
|
+
"subtle-bg": "var(--panneau-color-surface-sunken)",
|
|
19
|
+
/** Background of a tile with a link, on hover. */
|
|
20
|
+
"hover-bg": "var(--panneau-color-hover)",
|
|
21
|
+
/** Size of the media of `md`. */
|
|
22
|
+
"media-size": "2.5rem",
|
|
23
|
+
/** Size of the media of `sm`. */
|
|
24
|
+
"media-size-sm": "2rem",
|
|
25
|
+
/** Background of the square around an icon. */
|
|
26
|
+
"icon-bg": "var(--panneau-color-surface-sunken)",
|
|
27
|
+
/** Color of an icon. */
|
|
28
|
+
"icon-color": "var(--panneau-color-text-muted)",
|
|
29
|
+
/** Corner radius of the square around an icon. */
|
|
30
|
+
"icon-radius": "var(--panneau-radius-md)",
|
|
31
|
+
/** Font weight of the title. */
|
|
32
|
+
"title-font-weight": "var(--panneau-font-weight-medium)",
|
|
33
|
+
/** Color of the description. */
|
|
34
|
+
"description-color": "var(--panneau-color-text-muted)"
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
export { tileTokens };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["defineComponentTokens","tileTokens","gap","radius"],"sources":["../../src/tile/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Tile and TileGroup. */\nexport const tileTokens = defineComponentTokens('tile', {\n /** Space between the media, the text and the actions. */\n gap: 'var(--panneau-space-3)',\n /** Horizontal padding. */\n 'padding-x': 'var(--panneau-space-3)',\n /** Vertical padding of `md`. */\n 'padding-y': 'var(--panneau-space-3)',\n /** Vertical padding of `sm`. */\n 'padding-y-sm': 'var(--panneau-space-2)',\n /** Corner radius of a tile, and of an outlined group. */\n radius: 'var(--panneau-radius-lg)',\n /** Color of the border of `outline`, and of the lines of a group. */\n 'border-color': 'var(--panneau-color-border)',\n /** Background of `subtle`. */\n 'subtle-bg': 'var(--panneau-color-surface-sunken)',\n /** Background of a tile with a link, on hover. */\n 'hover-bg': 'var(--panneau-color-hover)',\n /** Size of the media of `md`. */\n 'media-size': '2.5rem',\n /** Size of the media of `sm`. */\n 'media-size-sm': '2rem',\n /** Background of the square around an icon. */\n 'icon-bg': 'var(--panneau-color-surface-sunken)',\n /** Color of an icon. */\n 'icon-color': 'var(--panneau-color-text-muted)',\n /** Corner radius of the square around an icon. */\n 'icon-radius': 'var(--panneau-radius-md)',\n /** Font weight of the title. */\n 'title-font-weight': 'var(--panneau-font-weight-medium)',\n /** Color of the description. */\n 'description-color': 'var(--panneau-color-text-muted)',\n});\n"],"mappings":";;;AAGA,IAAaC,aAAaD,sBAAsB,QAAQ;;CAEpDE,KAAK;;CAEL,aAAa;;CAEb,aAAa;;CAEb,gBAAgB;;CAEhBC,QAAQ;;CAER,gBAAgB;;CAEhB,aAAa;;CAEb,YAAY;;CAEZ,cAAc;;CAEd,iBAAiB;;CAEjB,WAAW;;CAEX,cAAc;;CAEd,eAAe;;CAEf,qBAAqB;;CAErB,qBAAqB;AACzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/ui",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.44",
|
|
4
4
|
"description": "Design tokens, themes and accessible primitives of Panneau, built on React Aria Components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"react-intl": "^12.0.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@panneau/intl": "5.0.0-alpha.
|
|
60
|
+
"@panneau/intl": "5.0.0-alpha.44",
|
|
61
61
|
"lucide-react": "^1.57.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@panneau/protocol": "5.0.0-alpha.
|
|
64
|
+
"@panneau/protocol": "5.0.0-alpha.44"
|
|
65
65
|
}
|
|
66
66
|
}
|