@canonical/svelte-ds-app-launchpad 0.25.0 → 0.27.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/components/NumberInput/types.d.ts +2 -2
- package/dist/components/Popover/Popover.svelte +1 -1
- package/dist/components/SearchBox/SearchBox.svelte +79 -0
- package/dist/components/SearchBox/SearchBox.svelte.d.ts +36 -0
- package/dist/components/SearchBox/common/SearchButton/SearchButton.svelte +31 -0
- package/dist/components/SearchBox/common/SearchButton/SearchButton.svelte.d.ts +5 -0
- package/dist/components/SearchBox/common/SearchButton/index.d.ts +2 -0
- package/dist/components/SearchBox/common/SearchButton/index.js +1 -0
- package/dist/components/SearchBox/common/SearchButton/styles.css +11 -0
- package/dist/components/SearchBox/common/SearchButton/types.d.ts +2 -0
- package/dist/components/SearchBox/common/SearchButton/types.js +1 -0
- package/dist/components/SearchBox/common/index.d.ts +1 -0
- package/dist/components/SearchBox/common/index.js +1 -0
- package/dist/components/SearchBox/context.d.ts +2 -0
- package/dist/components/SearchBox/context.js +2 -0
- package/dist/components/SearchBox/index.d.ts +22 -0
- package/dist/components/SearchBox/index.js +6 -0
- package/dist/components/SearchBox/styles.css +35 -0
- package/dist/components/SearchBox/types.d.ts +26 -0
- package/dist/components/SearchBox/types.js +2 -0
- package/dist/components/Select/Select.svelte +51 -0
- package/dist/components/Select/Select.svelte.d.ts +17 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/index.js +3 -0
- package/dist/components/Select/styles.css +161 -0
- package/dist/components/Select/types.d.ts +7 -0
- package/dist/components/Select/types.js +2 -0
- package/dist/components/SidePanel/SidePanel.svelte +34 -0
- package/dist/components/SidePanel/SidePanel.svelte.d.ts +13 -0
- package/dist/components/SidePanel/index.d.ts +72 -0
- package/dist/components/SidePanel/index.js +7 -0
- package/dist/components/SidePanel/styles.css +37 -0
- package/dist/components/SidePanel/types.d.ts +3 -0
- package/dist/components/SidePanel/types.js +2 -0
- package/dist/components/Table/Table.svelte +52 -0
- package/dist/components/Table/Table.svelte.d.ts +41 -0
- package/dist/components/Table/common/TH/TH.svelte +40 -0
- package/dist/components/Table/common/TH/TH.svelte.d.ts +5 -0
- package/dist/components/Table/common/TH/common/SortButton/SortButton.svelte +36 -0
- package/dist/components/Table/common/TH/common/SortButton/SortButton.svelte.d.ts +5 -0
- package/dist/components/Table/common/TH/common/SortButton/index.d.ts +2 -0
- package/dist/components/Table/common/TH/common/SortButton/index.js +3 -0
- package/dist/components/Table/common/TH/common/SortButton/styles.css +19 -0
- package/dist/components/Table/common/TH/common/SortButton/types.d.ts +10 -0
- package/dist/components/Table/common/TH/common/SortButton/types.js +2 -0
- package/dist/components/Table/common/TH/common/index.d.ts +1 -0
- package/dist/components/Table/common/TH/common/index.js +1 -0
- package/dist/components/Table/common/TH/context.d.ts +2 -0
- package/dist/components/Table/common/TH/context.js +2 -0
- package/dist/components/Table/common/TH/index.d.ts +10 -0
- package/dist/components/Table/common/TH/index.js +7 -0
- package/dist/components/Table/common/TH/styles.css +22 -0
- package/dist/components/Table/common/TH/types.d.ts +21 -0
- package/dist/components/Table/common/TH/types.js +2 -0
- package/dist/components/Table/common/index.d.ts +1 -0
- package/dist/components/Table/common/index.js +1 -0
- package/dist/components/Table/index.d.ts +21 -0
- package/dist/components/Table/index.js +6 -0
- package/dist/components/Table/styles.css +46 -0
- package/dist/components/Table/types.d.ts +2 -0
- package/dist/components/Table/types.js +2 -0
- package/dist/components/TextInput/types.d.ts +2 -2
- package/dist/components/Timeline/Timeline.svelte +51 -0
- package/dist/components/Timeline/Timeline.svelte.d.ts +40 -0
- package/dist/components/Timeline/common/Event/Event.svelte +54 -0
- package/dist/components/Timeline/common/Event/Event.svelte.d.ts +5 -0
- package/dist/components/Timeline/common/Event/common/TitleRow/TitleRow.svelte +32 -0
- package/dist/components/Timeline/common/Event/common/TitleRow/TitleRow.svelte.d.ts +5 -0
- package/dist/components/Timeline/common/Event/common/TitleRow/index.d.ts +2 -0
- package/dist/components/Timeline/common/Event/common/TitleRow/index.js +3 -0
- package/dist/components/Timeline/common/Event/common/TitleRow/styles.css +38 -0
- package/dist/components/Timeline/common/Event/common/TitleRow/types.d.ts +18 -0
- package/dist/components/Timeline/common/Event/common/TitleRow/types.js +2 -0
- package/dist/components/Timeline/common/Event/common/index.d.ts +1 -0
- package/dist/components/Timeline/common/Event/common/index.js +1 -0
- package/dist/components/Timeline/common/Event/index.d.ts +20 -0
- package/dist/components/Timeline/common/Event/index.js +7 -0
- package/dist/components/Timeline/common/Event/styles.css +115 -0
- package/dist/components/Timeline/common/Event/types.d.ts +25 -0
- package/dist/components/Timeline/common/Event/types.js +2 -0
- package/dist/components/Timeline/common/HiddenEvents/HiddenEvents.svelte +24 -0
- package/dist/components/Timeline/common/HiddenEvents/HiddenEvents.svelte.d.ts +5 -0
- package/dist/components/Timeline/common/HiddenEvents/common/Link/Link.svelte +15 -0
- package/dist/components/Timeline/common/HiddenEvents/common/Link/Link.svelte.d.ts +6 -0
- package/dist/components/Timeline/common/HiddenEvents/common/Link/index.d.ts +2 -0
- package/dist/components/Timeline/common/HiddenEvents/common/Link/index.js +3 -0
- package/dist/components/Timeline/common/HiddenEvents/common/Link/styles.css +9 -0
- package/dist/components/Timeline/common/HiddenEvents/common/Link/types.d.ts +2 -0
- package/dist/components/Timeline/common/HiddenEvents/common/Link/types.js +2 -0
- package/dist/components/Timeline/common/HiddenEvents/common/index.d.ts +1 -0
- package/dist/components/Timeline/common/HiddenEvents/common/index.js +1 -0
- package/dist/components/Timeline/common/HiddenEvents/index.d.ts +17 -0
- package/dist/components/Timeline/common/HiddenEvents/index.js +7 -0
- package/dist/components/Timeline/common/HiddenEvents/styles.css +42 -0
- package/dist/components/Timeline/common/HiddenEvents/types.d.ts +9 -0
- package/dist/components/Timeline/common/HiddenEvents/types.js +2 -0
- package/dist/components/Timeline/common/index.d.ts +2 -0
- package/dist/components/Timeline/common/index.js +2 -0
- package/dist/components/Timeline/index.d.ts +39 -0
- package/dist/components/Timeline/index.js +8 -0
- package/dist/components/Timeline/styles.css +12 -0
- package/dist/components/Timeline/types.d.ts +2 -0
- package/dist/components/Timeline/types.js +2 -0
- package/dist/components/Tooltip/Tooltip.svelte +165 -0
- package/dist/components/Tooltip/Tooltip.svelte.d.ts +23 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/index.js +3 -0
- package/dist/components/Tooltip/styles.css +111 -0
- package/dist/components/Tooltip/types.d.ts +43 -0
- package/dist/components/Tooltip/types.js +2 -0
- package/dist/components/Tooltip/utils/ChainingManager.d.ts +18 -0
- package/dist/components/Tooltip/utils/ChainingManager.js +29 -0
- package/dist/components/Tooltip/utils/useDelayedOpen.svelte.d.ts +15 -0
- package/dist/components/Tooltip/utils/useDelayedOpen.svelte.js +42 -0
- package/dist/components/Tooltip/utils/useTooltipPosition.svelte.d.ts +24 -0
- package/dist/components/Tooltip/utils/useTooltipPosition.svelte.js +40 -0
- package/dist/components/UserAvatar/UserAvatar.svelte +63 -0
- package/dist/components/UserAvatar/UserAvatar.svelte.d.ts +17 -0
- package/dist/components/UserAvatar/index.d.ts +2 -0
- package/dist/components/UserAvatar/index.js +3 -0
- package/dist/components/UserAvatar/styles.css +66 -0
- package/dist/components/UserAvatar/types.d.ts +12 -0
- package/dist/components/UserAvatar/types.js +2 -0
- package/dist/components/UserAvatar/utils/getInitials.d.ts +1 -0
- package/dist/components/UserAvatar/utils/getInitials.js +8 -0
- package/dist/components/UserAvatar/utils/index.d.ts +1 -0
- package/dist/components/UserAvatar/utils/index.js +1 -0
- package/dist/components/icons/SortIcon.svelte +25 -0
- package/dist/components/icons/SortIcon.svelte.d.ts +4 -0
- package/dist/components/icons/index.d.ts +1 -0
- package/dist/components/icons/index.js +2 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.js +7 -0
- package/dist/type-utils/DistributiveOmit.d.ts +4 -0
- package/dist/type-utils/DistributiveOmit.js +1 -0
- package/dist/type-utils/index.d.ts +1 -0
- package/dist/type-utils/index.js +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
.ds.user-avatar {
|
|
2
|
+
display: inline-grid;
|
|
3
|
+
flex: none;
|
|
4
|
+
|
|
5
|
+
border: var(--lp-dimension-stroke-thickness-default) solid
|
|
6
|
+
var(--lp-color-border-default);
|
|
7
|
+
background-color: var(--lp-color-background-alt);
|
|
8
|
+
color: var(--lp-color-text-default);
|
|
9
|
+
|
|
10
|
+
width: var(--lp-dimension-size-m);
|
|
11
|
+
height: var(--lp-dimension-size-m);
|
|
12
|
+
font: var(--lp-typography-paragraph-default-strong);
|
|
13
|
+
|
|
14
|
+
&.small {
|
|
15
|
+
width: var(--lp-dimension-size-s);
|
|
16
|
+
height: var(--lp-dimension-size-s);
|
|
17
|
+
font: var(--lp-typography-paragraph-s-strong);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.large {
|
|
21
|
+
width: var(--lp-dimension-size-l);
|
|
22
|
+
height: var(--lp-dimension-size-l);
|
|
23
|
+
font: var(--lp-typography-h5);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:is(img) {
|
|
27
|
+
object-fit: cover;
|
|
28
|
+
position: relative;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
A fallback for when there is no JS and the image cannot be loaded.
|
|
33
|
+
|
|
34
|
+
When userName is provided, the initials are displayed. When userName is not provided, a "?" is displayed.
|
|
35
|
+
Ideally this would be a user icon instead of "?", but that would require either
|
|
36
|
+
- a base64 encoded SVG, that would bloat CSS (rather unnecessarily, for the rare case of no userName and image load failure),
|
|
37
|
+
- or a url to a static asset (difficult to achieve for a component library without making assumptions on the hosting app's bundler and asset management).
|
|
38
|
+
*/
|
|
39
|
+
&::after {
|
|
40
|
+
position: absolute;
|
|
41
|
+
inset: 0;
|
|
42
|
+
background-color: inherit;
|
|
43
|
+
display: grid;
|
|
44
|
+
place-content: center;
|
|
45
|
+
text-transform: uppercase;
|
|
46
|
+
user-select: none;
|
|
47
|
+
|
|
48
|
+
content: "?";
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&[data-initials]::after {
|
|
52
|
+
content: attr(data-initials);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:is(abbr) {
|
|
57
|
+
user-select: none;
|
|
58
|
+
place-content: center;
|
|
59
|
+
text-transform: uppercase;
|
|
60
|
+
text-decoration: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:is(div) {
|
|
64
|
+
place-content: center;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
export type UserOptions = {
|
|
3
|
+
/** The user's name */
|
|
4
|
+
userName?: string;
|
|
5
|
+
/** The URL of the user's avatar image */
|
|
6
|
+
userAvatarUrl?: string;
|
|
7
|
+
};
|
|
8
|
+
export interface UserAvatarProps extends Omit<HTMLAttributes<HTMLElement>, "children">, UserOptions {
|
|
9
|
+
size?: "small" | "medium" | "large";
|
|
10
|
+
/** The alt text for the avatar image, if available */
|
|
11
|
+
alt?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getInitials(userName: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./getInitials.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./getInitials.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { IconProps } from "@canonical/svelte-icons";
|
|
3
|
+
import { IconBase } from "@canonical/svelte-icons";
|
|
4
|
+
|
|
5
|
+
const props: IconProps = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<IconBase iconName="sort" {...props}>
|
|
9
|
+
<svg
|
|
10
|
+
width="16"
|
|
11
|
+
height="16"
|
|
12
|
+
viewBox="0 0 16 16"
|
|
13
|
+
fill="none"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
>
|
|
16
|
+
<path
|
|
17
|
+
d="M10.5303 1.46973L9.25 2.00006V14.5001H10.75V3.81072L13.4697 6.53039L14.5303 5.46973L10.5303 1.46973Z"
|
|
18
|
+
fill="currentColor"
|
|
19
|
+
></path>
|
|
20
|
+
<path
|
|
21
|
+
d="M5.46967 14.5303L6.75 13.9999V1.49994H5.25V12.1893L2.53033 9.46961L1.46967 10.5303L5.46967 14.5303Z"
|
|
22
|
+
fill="currentColor"
|
|
23
|
+
></path>
|
|
24
|
+
</svg>
|
|
25
|
+
</IconBase>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SortIcon } from "./SortIcon.svelte";
|
|
@@ -11,7 +11,14 @@ export * from "./NumberInput/index.js";
|
|
|
11
11
|
export * from "./Popover/index.js";
|
|
12
12
|
export * from "./Radio/index.js";
|
|
13
13
|
export * from "./RelativeDateTime/index.js";
|
|
14
|
+
export * from "./SearchBox/index.js";
|
|
15
|
+
export * from "./Select/index.js";
|
|
16
|
+
export * from "./SidePanel/index.js";
|
|
14
17
|
export * from "./Spinner/index.js";
|
|
15
18
|
export * from "./Switch/index.js";
|
|
19
|
+
export * from "./Table/index.js";
|
|
16
20
|
export * from "./Textarea/index.js";
|
|
17
21
|
export * from "./TextInput/index.js";
|
|
22
|
+
export * from "./Timeline/index.js";
|
|
23
|
+
export * from "./Tooltip/index.js";
|
|
24
|
+
export * from "./UserAvatar/index.js";
|
package/dist/components/index.js
CHANGED
|
@@ -11,7 +11,14 @@ export * from "./NumberInput/index.js";
|
|
|
11
11
|
export * from "./Popover/index.js";
|
|
12
12
|
export * from "./Radio/index.js";
|
|
13
13
|
export * from "./RelativeDateTime/index.js";
|
|
14
|
+
export * from "./SearchBox/index.js";
|
|
15
|
+
export * from "./Select/index.js";
|
|
16
|
+
export * from "./SidePanel/index.js";
|
|
14
17
|
export * from "./Spinner/index.js";
|
|
15
18
|
export * from "./Switch/index.js";
|
|
19
|
+
export * from "./Table/index.js";
|
|
16
20
|
export * from "./Textarea/index.js";
|
|
17
21
|
export * from "./TextInput/index.js";
|
|
22
|
+
export * from "./Timeline/index.js";
|
|
23
|
+
export * from "./Tooltip/index.js";
|
|
24
|
+
export * from "./UserAvatar/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./DistributiveOmit.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonical/svelte-ds-app-launchpad",
|
|
3
3
|
"description": "Launchpad-specific components for the Pragma design system.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.27.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@biomejs/biome": "2.4.9",
|
|
63
|
-
"@canonical/biome-config": "^0.
|
|
63
|
+
"@canonical/biome-config": "^0.27.0",
|
|
64
64
|
"@canonical/design-tokens": "^0.6.0",
|
|
65
|
-
"@canonical/storybook-config": "^0.
|
|
66
|
-
"@canonical/storybook-helpers": "^0.
|
|
67
|
-
"@canonical/svelte-ssr-test": "^0.
|
|
68
|
-
"@canonical/typescript-config-svelte": "^0.
|
|
69
|
-
"@canonical/webarchitect": "^0.
|
|
65
|
+
"@canonical/storybook-config": "^0.27.0",
|
|
66
|
+
"@canonical/storybook-helpers": "^0.27.0",
|
|
67
|
+
"@canonical/svelte-ssr-test": "^0.27.0",
|
|
68
|
+
"@canonical/typescript-config-svelte": "^0.27.0",
|
|
69
|
+
"@canonical/webarchitect": "^0.27.0",
|
|
70
70
|
"@storybook/addon-docs": "^10.3.1",
|
|
71
71
|
"@storybook/addon-svelte-csf": "^5.0.11",
|
|
72
72
|
"@sveltejs/package": "^2.5.7",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"svelte": "^5.47.1"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "5df5709bf7cb6f2016be2f6eba8391637e2e2a0c"
|
|
94
94
|
}
|