@canonical/svelte-ds-app-launchpad 0.44.0 → 0.45.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.
@@ -45,6 +45,10 @@
45
45
  display: inline-flex;
46
46
  justify-content: center;
47
47
 
48
+ &:focus-visible {
49
+ outline-color: var(--color-focusRing);
50
+ }
51
+
48
52
  &:disabled,
49
53
  &[aria-disabled="true"] {
50
54
  color: var(--modifier-color-text-disabled, var(--disabled--color-text));
@@ -4,6 +4,7 @@
4
4
  appearance: none;
5
5
  flex-grow: 0;
6
6
  flex-shrink: 0;
7
+ outline-offset: var(--dimension-stroke-thickness-medium);
7
8
 
8
9
  width: var(--dimension-200);
9
10
  height: var(--dimension-200);
@@ -34,10 +34,22 @@
34
34
  ## Example Usage
35
35
  ```svelte
36
36
  <DescriptionList layout="list">
37
- <DescriptionList.Item term="ID">134</DescriptionList.Item>
38
- <DescriptionList.Item term="Requested by">John Smith</DescriptionList.Item>
39
- <DescriptionList.Item term="Created">2023-10-01T12:00:00Z</DescriptionList.Item>
40
- <DescriptionList.Item term="Status">Active</DescriptionList.Item>
37
+ <DescriptionList.Item>
38
+ <dt>ID</dt>
39
+ <dd>134</dd>
40
+ </DescriptionList.Item>
41
+ <DescriptionList.Item>
42
+ <dt>Requested by</dt>
43
+ <dd>John Smith</dd>
44
+ </DescriptionList.Item>
45
+ <DescriptionList.Item>
46
+ <dt>Created</dt>
47
+ <dd>2023-10-01T12:00:00Z</dd>
48
+ </DescriptionList.Item>
49
+ <DescriptionList.Item>
50
+ <dt>Status</dt>
51
+ <dd>Active</dd>
52
+ </DescriptionList.Item>
41
53
  </DescriptionList>
42
54
  ```
43
55
  -->
@@ -6,10 +6,22 @@ import type { DescriptionListProps } from "./types.js";
6
6
  * ## Example Usage
7
7
  * ```svelte
8
8
  * <DescriptionList layout="list">
9
- * <DescriptionList.Item term="ID">134</DescriptionList.Item>
10
- * <DescriptionList.Item term="Requested by">John Smith</DescriptionList.Item>
11
- * <DescriptionList.Item term="Created">2023-10-01T12:00:00Z</DescriptionList.Item>
12
- * <DescriptionList.Item term="Status">Active</DescriptionList.Item>
9
+ * <DescriptionList.Item>
10
+ * <dt>ID</dt>
11
+ * <dd>134</dd>
12
+ * </DescriptionList.Item>
13
+ * <DescriptionList.Item>
14
+ * <dt>Requested by</dt>
15
+ * <dd>John Smith</dd>
16
+ * </DescriptionList.Item>
17
+ * <DescriptionList.Item>
18
+ * <dt>Created</dt>
19
+ * <dd>2023-10-01T12:00:00Z</dd>
20
+ * </DescriptionList.Item>
21
+ * <DescriptionList.Item>
22
+ * <dt>Status</dt>
23
+ * <dd>Active</dd>
24
+ * </DescriptionList.Item>
13
25
  * </DescriptionList>
14
26
  * ```
15
27
  */
@@ -7,7 +7,7 @@
7
7
 
8
8
  const componentCssClassName = "ds description-list-item";
9
9
 
10
- let { class: className, name, children, ...rest }: ItemProps = $props();
10
+ let { class: className, children, ...rest }: ItemProps = $props();
11
11
 
12
12
  const descriptionListContext = getDescriptionListContext();
13
13
  </script>
@@ -16,6 +16,5 @@
16
16
  class={[componentCssClassName, className, descriptionListContext.layout]}
17
17
  {...rest}
18
18
  >
19
- <dt>{name}</dt>
20
- <dd>{@render children()}</dd>
19
+ {@render children?.()}
21
20
  </div>
@@ -1,5 +1,4 @@
1
1
  import "./styles.css";
2
- import type { ItemProps } from "./types.js";
3
- declare const Item: import("svelte").Component<ItemProps, {}, "">;
2
+ declare const Item: import("svelte").Component<import("svelte/elements").HTMLAttributes<HTMLDivElement>, {}, "">;
4
3
  type Item = ReturnType<typeof Item>;
5
4
  export default Item;
@@ -1,14 +1,2 @@
1
- import type { Snippet } from "svelte";
2
1
  import type { SvelteHTMLElements } from "svelte/elements";
3
- type BaseProps = SvelteHTMLElements["div"];
4
- export interface ItemProps extends BaseProps {
5
- /**
6
- * Term/name of the item
7
- */
8
- name: string;
9
- /**
10
- * Description/content of the item
11
- */
12
- children: Snippet<[]>;
13
- }
14
- export {};
2
+ export type ItemProps = SvelteHTMLElements["div"];
@@ -7,8 +7,12 @@ declare const DescriptionList: typeof DescriptionListRoot & {
7
7
  * @example
8
8
  * ```svelte
9
9
  * <DescriptionList>
10
- * <DescriptionList.Item term="ID">134</DescriptionList.Item>
10
+ * <DescriptionList.Item>
11
+ * <dt>ID</dt>
12
+ * <dd>134</dd>
13
+ * </DescriptionList.Item>
11
14
  * </DescriptionList>
15
+ * ```
12
16
  */
13
17
  Item: typeof Item;
14
18
  };
@@ -1,6 +1,7 @@
1
1
  /* Generated by @canonical/summon:component-svelte v0.1.0 */
2
2
 
3
3
  .ds.link {
4
+ outline-offset: 0px;
4
5
  text-decoration: none;
5
6
  color: var(--color-text-link);
6
7
 
@@ -4,6 +4,7 @@
4
4
  appearance: none;
5
5
  flex-grow: 0;
6
6
  flex-shrink: 0;
7
+ outline-offset: var(--dimension-stroke-thickness-medium);
7
8
 
8
9
  width: var(--dimension-200);
9
10
  height: var(--dimension-200);
@@ -2,6 +2,7 @@
2
2
  appearance: none;
3
3
  position: relative;
4
4
  cursor: pointer;
5
+ outline-offset: var(--dimension-stroke-thickness-medium);
5
6
 
6
7
  width: var(--dimension-400);
7
8
  height: var(--dimension-200);
@@ -13,7 +13,7 @@ body {
13
13
  *:focus-visible {
14
14
  outline: var(--dimension-stroke-thickness-large) solid
15
15
  var(--modifier-color-focus-ring, var(--color-focusRing));
16
- outline-offset: var(--dimension-stroke-thickness-large);
16
+ outline-offset: calc(var(--dimension-stroke-thickness-large) * -1);
17
17
  }
18
18
 
19
19
  .visually-hidden {
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.44.0",
4
+ "version": "0.45.0",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -62,16 +62,16 @@
62
62
  "storybook": "storybook dev -p 6008 --no-open --host 0.0.0.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@biomejs/biome": "2.5.14",
65
+ "@biomejs/biome": "2.5.15",
66
66
  "@canonical/biome-config": "0.43.0",
67
- "@canonical/storybook-config": "^0.44.0",
68
- "@canonical/storybook-helpers": "^0.44.0",
69
- "@canonical/svelte-ssr-test": "^0.44.0",
70
- "@canonical/typescript-config-svelte": "^0.44.0",
67
+ "@canonical/storybook-config": "^0.45.0",
68
+ "@canonical/storybook-helpers": "^0.45.0",
69
+ "@canonical/svelte-ssr-test": "^0.45.0",
70
+ "@canonical/typescript-config-svelte": "^0.45.0",
71
71
  "@canonical/webarchitect": "0.43.0",
72
72
  "@storybook/addon-docs": "^10.6.0",
73
73
  "@storybook/addon-svelte-csf": "^5.1.3",
74
- "@sveltejs/package": "3.0.0-next.8",
74
+ "@sveltejs/package": "3.0.0",
75
75
  "@sveltejs/vite-plugin-svelte": "^7.0.0",
76
76
  "@types/bun": "^1.3.10",
77
77
  "@vitest/browser": "^5.0.0",
@@ -86,12 +86,12 @@
86
86
  },
87
87
  "dependencies": {
88
88
  "@canonical/design-tokens": "0.43.0",
89
- "@canonical/styles": "^0.44.0",
89
+ "@canonical/styles": "^0.45.0",
90
90
  "@canonical/svelte-icons": "^0.0.9",
91
91
  "@floating-ui/dom": "^1.7.6"
92
92
  },
93
93
  "peerDependencies": {
94
94
  "svelte": "^5.47.1"
95
95
  },
96
- "gitHead": "c1f2abc7f04aa29a88f0e6036645469e82a5dd33"
96
+ "gitHead": "f8c2473f9aa92d14c24f0976f2f02ebc4944f32f"
97
97
  }