@sovereignfs/ui 0.98.0 → 0.99.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/CHANGELOG.md +9 -0
- package/dist/AppTile.module.css +22 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.js +26 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ versions follow [semver](https://semver.org/). A version's section is written in
|
|
|
5
5
|
and becomes the release notes when the version is published. This file starts at 0.96.0; earlier versions are in the repository's
|
|
6
6
|
history and tags.
|
|
7
7
|
|
|
8
|
+
## [0.99.0] - 2026-11-17
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `AppTile` takes `external`: with `href`, the tile opens the address in a new tab with `rel="noopener noreferrer"`, and shows a
|
|
13
|
+
small external-link mark beside the name and says "(opens in a new tab)" to assistive tech. Off by default.
|
|
14
|
+
- `AppTile` takes `monochrome`: the picture is drawn in shades of grey, so icons that come from elsewhere look like one set. Off by
|
|
15
|
+
default.
|
|
16
|
+
|
|
8
17
|
## [0.98.0] - 2026-11-17
|
|
9
18
|
|
|
10
19
|
### Added
|
package/dist/AppTile.module.css
CHANGED
|
@@ -40,6 +40,11 @@
|
|
|
40
40
|
color: var(--sv-color-text-primary);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
/* Every picture in the same greys: a remote icon's colours, or a drawn letter's, are not the tile's to choose. */
|
|
44
|
+
.monochrome .icon {
|
|
45
|
+
filter: grayscale(1);
|
|
46
|
+
}
|
|
47
|
+
|
|
43
48
|
.name {
|
|
44
49
|
max-width: 100%;
|
|
45
50
|
font-size: var(--sv-font-size-md);
|
|
@@ -98,3 +103,20 @@
|
|
|
98
103
|
background: var(--sv-color-surface-sunken);
|
|
99
104
|
}
|
|
100
105
|
}
|
|
106
|
+
|
|
107
|
+
/* Beside the name of a tile that opens another site in a new tab. */
|
|
108
|
+
.external {
|
|
109
|
+
margin-left: var(--sv-space-1);
|
|
110
|
+
color: var(--sv-color-text-muted);
|
|
111
|
+
vertical-align: -0.1em;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Said to assistive tech, not shown. */
|
|
115
|
+
.hidden {
|
|
116
|
+
position: absolute;
|
|
117
|
+
width: 1px;
|
|
118
|
+
height: 1px;
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
clip-path: inset(50%);
|
|
121
|
+
white-space: nowrap;
|
|
122
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1081,13 +1081,20 @@ interface AppTileProps {
|
|
|
1081
1081
|
href?: string;
|
|
1082
1082
|
/** `ghost` is a dashed, flat tile for adding another one: the same size as the others, so it sits in the grid as an empty place. */
|
|
1083
1083
|
variant?: 'solid' | 'ghost';
|
|
1084
|
+
/**
|
|
1085
|
+
* The link leads to another site: it opens in a new tab, without telling the site where it came from
|
|
1086
|
+
* (`noopener noreferrer`), and the tile says so with a small mark beside the name and to assistive tech.
|
|
1087
|
+
*/
|
|
1088
|
+
external?: boolean;
|
|
1089
|
+
/** Draws the picture in shades of grey, so tiles whose icons come from elsewhere still look like one set. */
|
|
1090
|
+
monochrome?: boolean;
|
|
1084
1091
|
className?: string;
|
|
1085
1092
|
}
|
|
1086
1093
|
/**
|
|
1087
1094
|
* AppTile — one app in a grid: a rounded icon box, the name, a line about it and, beneath a divider, what kind of app it is. The
|
|
1088
1095
|
* whole tile is the link when `href` is given. Lay tiles out with `CardTileGrid`.
|
|
1089
1096
|
*/
|
|
1090
|
-
declare function AppTile({ icon, name, description, tags, href, variant, className, }: AppTileProps): react.JSX.Element;
|
|
1097
|
+
declare function AppTile({ icon, name, description, tags, href, variant, external, monochrome, className, }: AppTileProps): react.JSX.Element;
|
|
1091
1098
|
|
|
1092
1099
|
interface CardTileGridProps {
|
|
1093
1100
|
children: ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -5600,19 +5600,42 @@ function AppTile({
|
|
|
5600
5600
|
tags,
|
|
5601
5601
|
href,
|
|
5602
5602
|
variant = "solid",
|
|
5603
|
+
external = false,
|
|
5604
|
+
monochrome = false,
|
|
5603
5605
|
className
|
|
5604
5606
|
}) {
|
|
5605
|
-
const
|
|
5607
|
+
const opensElsewhere = external && href !== void 0;
|
|
5608
|
+
const classes = [
|
|
5609
|
+
styles39.tile,
|
|
5610
|
+
variant === "ghost" && styles39.ghost,
|
|
5611
|
+
href && styles39.link,
|
|
5612
|
+
monochrome && styles39.monochrome,
|
|
5613
|
+
className
|
|
5614
|
+
].filter(Boolean).join(" ");
|
|
5606
5615
|
const content = /* @__PURE__ */ jsxs134(Fragment6, { children: [
|
|
5607
5616
|
/* @__PURE__ */ jsx161("span", { className: styles39.icon, "aria-hidden": "true", children: icon }),
|
|
5608
|
-
/* @__PURE__ */
|
|
5617
|
+
/* @__PURE__ */ jsxs134("span", { className: styles39.name, children: [
|
|
5618
|
+
name,
|
|
5619
|
+
opensElsewhere ? /* @__PURE__ */ jsxs134(Fragment6, { children: [
|
|
5620
|
+
/* @__PURE__ */ jsx161(Icon, { name: "external-link", size: "sm", "aria-hidden": true, className: styles39.external }),
|
|
5621
|
+
/* @__PURE__ */ jsx161("span", { className: styles39.hidden, children: " (opens in a new tab)" })
|
|
5622
|
+
] }) : null
|
|
5623
|
+
] }),
|
|
5609
5624
|
description ? /* @__PURE__ */ jsx161("span", { className: styles39.description, children: description }) : /* @__PURE__ */ jsx161("span", { className: styles39.fill }),
|
|
5610
5625
|
tags ? /* @__PURE__ */ jsxs134(Fragment6, { children: [
|
|
5611
5626
|
/* @__PURE__ */ jsx161("span", { className: styles39.separator, "aria-hidden": "true" }),
|
|
5612
5627
|
/* @__PURE__ */ jsx161("span", { className: styles39.tags, children: tags })
|
|
5613
5628
|
] }) : null
|
|
5614
5629
|
] });
|
|
5615
|
-
return href ? /* @__PURE__ */ jsx161(
|
|
5630
|
+
return href ? /* @__PURE__ */ jsx161(
|
|
5631
|
+
"a",
|
|
5632
|
+
{
|
|
5633
|
+
className: classes,
|
|
5634
|
+
href,
|
|
5635
|
+
...opensElsewhere ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
5636
|
+
children: content
|
|
5637
|
+
}
|
|
5638
|
+
) : /* @__PURE__ */ jsx161("div", { className: classes, children: content });
|
|
5616
5639
|
}
|
|
5617
5640
|
|
|
5618
5641
|
// src/components/CardTile/CardTile.tsx
|