@imput/helium-prism 0.1.2 → 0.1.4

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/README.md CHANGED
@@ -2,11 +2,9 @@
2
2
  <img width="1000" alt="Helium Prism" src="https://raw.githubusercontent.com/imputnet/helium-prism/refs/heads/main/docs/prism-splash.png">
3
3
  </p>
4
4
 
5
- <p align="center">
6
- Shared UI components of
7
- <a href="https://github.com/imputnet/helium">Helium</a>
8
- web interfaces for Svelte.
9
- </p>
5
+ ## Helium Prism
6
+
7
+ Shared UI components of [Helium](https://github.com/imputnet/helium) web interfaces for Svelte.
10
8
 
11
9
  Prism UI library contains the shared building blocks used by web-based Helium applications and
12
10
  websites, such as: typography, buttons, inputs, loading states, icons, and the brand gradient
@@ -15,6 +13,9 @@ shimmer effect.
15
13
  This library isn't built for use outside of Helium web apps, so it may feel clunky for anything
16
14
  else.
17
15
 
16
+ Demo: [prism.helium.computer](https://prism.helium.computer/)\
17
+ npm: [@imput/helium-prism](https://www.npmjs.com/package/@imput/helium-prism)
18
+
18
19
  ## Installation
19
20
 
20
21
  deno:
@@ -1,14 +1,24 @@
1
1
  <script lang="ts">
2
2
  import type { Snippet } from "svelte";
3
- import type { HTMLButtonAttributes } from "svelte/elements";
3
+ import type { ClassValue, HTMLButtonAttributes } from "svelte/elements";
4
4
 
5
- type Props = HTMLButtonAttributes & {
5
+ type ButtonVariantProps =
6
+ | {
7
+ primary?: boolean;
8
+ transparent?: false;
9
+ }
10
+ | {
11
+ primary?: false;
12
+ transparent?: boolean;
13
+ };
14
+
15
+ type Props = Omit<HTMLButtonAttributes, "class"> & {
6
16
  children: Snippet;
7
- primary?: boolean;
17
+ class?: ClassValue;
8
18
  card?: boolean;
9
19
  selected?: boolean;
10
20
  circle?: boolean;
11
- };
21
+ } & ButtonVariantProps;
12
22
 
13
23
  let {
14
24
  children,
@@ -18,17 +28,21 @@
18
28
  card = false,
19
29
  selected = false,
20
30
  circle = false,
31
+ transparent = false,
21
32
  ...rest
22
33
  }: Props = $props();
23
34
  </script>
24
35
 
25
36
  <button
26
37
  class={[
27
- "button",
28
- primary && "primary",
29
- card && "card",
30
- selected && "selected",
31
- circle && "circle",
38
+ {
39
+ button: true,
40
+ primary,
41
+ card,
42
+ selected,
43
+ circle,
44
+ transparent,
45
+ },
32
46
  className,
33
47
  ]}
34
48
  {type}
@@ -1,12 +1,19 @@
1
1
  import type { Snippet } from "svelte";
2
- import type { HTMLButtonAttributes } from "svelte/elements";
3
- type Props = HTMLButtonAttributes & {
4
- children: Snippet;
2
+ import type { ClassValue, HTMLButtonAttributes } from "svelte/elements";
3
+ type ButtonVariantProps = {
5
4
  primary?: boolean;
5
+ transparent?: false;
6
+ } | {
7
+ primary?: false;
8
+ transparent?: boolean;
9
+ };
10
+ type Props = Omit<HTMLButtonAttributes, "class"> & {
11
+ children: Snippet;
12
+ class?: ClassValue;
6
13
  card?: boolean;
7
14
  selected?: boolean;
8
15
  circle?: boolean;
9
- };
16
+ } & ButtonVariantProps;
10
17
  declare const Button: import("svelte").Component<Props, {}, "">;
11
18
  type Button = ReturnType<typeof Button>;
12
19
  export default Button;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/Button.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGxD,KAAK,KAAK,GAAG,oBAAoB,GAAG;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AA+BN,QAAA,MAAM,MAAM,2CAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Button.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/Button.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGpE,KAAK,kBAAkB,GACjB;IACE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC;CACvB,GACC;IACE,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEN,KAAK,KAAK,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,GAAG;IAC/C,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,kBAAkB,CAAC;AAoC3B,QAAA,MAAM,MAAM,2CAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
@@ -13,7 +13,14 @@
13
13
  </script>
14
14
 
15
15
  <a
16
- class={["button card card-link", className]}
16
+ class={[
17
+ {
18
+ button: true,
19
+ card: true,
20
+ "card-link": true,
21
+ },
22
+ className,
23
+ ]}
17
24
  {href}
18
25
  target="_blank"
19
26
  rel="noopener noreferrer"
@@ -1 +1 @@
1
- {"version":3,"file":"CardLink.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/CardLink.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI9C,KAAK,KAAK,GAAG;IACT,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,UAAU,CAAC;CACtB,CAAC;AAqBN,QAAA,MAAM,QAAQ,2CAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"CardLink.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/CardLink.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI9C,KAAK,KAAK,GAAG;IACT,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,UAAU,CAAC;CACtB,CAAC;AA4BN,QAAA,MAAM,QAAQ,2CAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import type { Snippet } from "svelte";
3
- import type { HTMLInputAttributes } from "svelte/elements";
3
+ import type { ClassValue, HTMLInputAttributes } from "svelte/elements";
4
4
  import IconCheck from "./icons/IconCheck.svelte";
5
5
 
6
6
  type CheckboxLabelProps =
@@ -20,8 +20,9 @@
20
20
  "aria-labelledby": string;
21
21
  };
22
22
 
23
- type Props = Omit<HTMLInputAttributes, "id" | "type" | "checked"> & {
23
+ type Props = Omit<HTMLInputAttributes, "class" | "id" | "type" | "checked"> & {
24
24
  id: string;
25
+ class?: ClassValue;
25
26
  checked?: boolean;
26
27
  } & CheckboxLabelProps;
27
28
 
@@ -51,7 +52,16 @@
51
52
  });
52
53
  </script>
53
54
 
54
- <label class={["checkbox", disabled && "disabled", toggling && "toggling", className]}>
55
+ <label
56
+ class={[
57
+ {
58
+ checkbox: true,
59
+ disabled,
60
+ toggling,
61
+ },
62
+ className,
63
+ ]}
64
+ >
55
65
  <input {id} type="checkbox" bind:checked {disabled} {...rest} />
56
66
  <span class="checkbox-control" aria-hidden="true">
57
67
  <IconCheck />
@@ -112,12 +122,14 @@
112
122
  transition: transform 0.2s;
113
123
  }
114
124
 
115
- .checkbox:hover input:not(:checked) + .checkbox-control {
116
- background-color: var(--helium-elevated-10);
117
- }
125
+ @media (hover: hover) {
126
+ .checkbox:hover input:not(:checked) + .checkbox-control {
127
+ background-color: var(--helium-elevated-10);
128
+ }
118
129
 
119
- .checkbox:hover input:checked + .checkbox-control {
120
- background-color: var(--helium-blue-hover);
130
+ .checkbox:hover input:checked + .checkbox-control {
131
+ background-color: var(--helium-blue-hover);
132
+ }
121
133
  }
122
134
 
123
135
  .checkbox:active .checkbox-control {
@@ -1,5 +1,5 @@
1
1
  import type { Snippet } from "svelte";
2
- import type { HTMLInputAttributes } from "svelte/elements";
2
+ import type { ClassValue, HTMLInputAttributes } from "svelte/elements";
3
3
  type CheckboxLabelProps = {
4
4
  children: Snippet;
5
5
  "aria-label"?: string;
@@ -13,8 +13,9 @@ type CheckboxLabelProps = {
13
13
  "aria-label"?: string;
14
14
  "aria-labelledby": string;
15
15
  };
16
- type Props = Omit<HTMLInputAttributes, "id" | "type" | "checked"> & {
16
+ type Props = Omit<HTMLInputAttributes, "class" | "id" | "type" | "checked"> & {
17
17
  id: string;
18
+ class?: ClassValue;
18
19
  checked?: boolean;
19
20
  } & CheckboxLabelProps;
20
21
  declare const Checkbox: import("svelte").Component<Props, {}, "checked">;
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/Checkbox.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAIv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AM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEN,KAAK,KAAK,GAAG,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC,GAAG;IAC1E,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,kBAAkB,CAAC;AAyD3B,QAAA,MAAM,QAAQ,kDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import type { Snippet } from "svelte";
3
- import type { HTMLSelectAttributes } from "svelte/elements";
3
+ import type { ClassValue, HTMLSelectAttributes } from "svelte/elements";
4
4
  import IconChevronDown from "./icons/IconChevronDown.svelte";
5
5
 
6
6
  type DropdownOption = {
@@ -10,7 +10,7 @@
10
10
  };
11
11
  type NativeSelectProps = Omit<
12
12
  HTMLSelectAttributes,
13
- "aria-label" | "id" | "size" | "value"
13
+ "aria-label" | "class" | "id" | "size" | "value"
14
14
  >;
15
15
  type DropdownContentProps =
16
16
  | {
@@ -32,6 +32,7 @@
32
32
  type Props = NativeSelectProps & {
33
33
  id: string;
34
34
  "aria-label": string;
35
+ class?: ClassValue;
35
36
  value?: string;
36
37
  width?: string;
37
38
  select?: HTMLSelectElement;
@@ -52,7 +53,16 @@
52
53
  }: Props = $props();
53
54
  </script>
54
55
 
55
- <label class={["dropdown", disabled && "disabled", className]} style:width>
56
+ <label
57
+ class={[
58
+ {
59
+ dropdown: true,
60
+ disabled,
61
+ },
62
+ className,
63
+ ]}
64
+ style:width
65
+ >
56
66
  <select
57
67
  bind:this={select}
58
68
  bind:value
@@ -84,10 +94,11 @@
84
94
  .dropdown {
85
95
  --dropdown-padding-inline: 16px;
86
96
  --dropdown-icon-size: 18px;
97
+ --dropdown-height: 40px;
87
98
  position: relative;
88
99
  width: fit-content;
89
100
  max-width: 100%;
90
- min-height: 40px;
101
+ min-height: var(--dropdown-height);
91
102
  cursor: pointer;
92
103
  }
93
104
 
@@ -95,7 +106,7 @@
95
106
  cursor: inherit;
96
107
  font-size: 16px;
97
108
  line-height: 122%;
98
- height: 100%;
109
+ min-height: var(--dropdown-height);
99
110
  padding-inline: var(--dropdown-padding-inline);
100
111
  padding-right: calc(var(--dropdown-padding-inline) + var(--dropdown-icon-size) + 9px);
101
112
  user-select: none;
@@ -1,11 +1,11 @@
1
1
  import type { Snippet } from "svelte";
2
- import type { HTMLSelectAttributes } from "svelte/elements";
2
+ import type { ClassValue, HTMLSelectAttributes } from "svelte/elements";
3
3
  type DropdownOption = {
4
4
  value: string;
5
5
  label: string;
6
6
  disabled?: boolean;
7
7
  };
8
- type NativeSelectProps = Omit<HTMLSelectAttributes, "aria-label" | "id" | "size" | "value">;
8
+ type NativeSelectProps = Omit<HTMLSelectAttributes, "aria-label" | "class" | "id" | "size" | "value">;
9
9
  type DropdownContentProps = {
10
10
  options: readonly DropdownOption[];
11
11
  placeholder?: string;
@@ -22,6 +22,7 @@ type DropdownContentProps = {
22
22
  type Props = NativeSelectProps & {
23
23
  id: string;
24
24
  "aria-label": string;
25
+ class?: ClassValue;
25
26
  value?: string;
26
27
  width?: string;
27
28
  select?: HTMLSelectElement;
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/Dropdown.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAIxD,KAAK,cAAc,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AACF,KAA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BAAoB,EACpB,YAAY,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CACnD,CAAC;AACF,KAAK,oBAAoB,GACnB;IACE,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC;CACpB,GACC;IACE,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACrB,GACC;IACE,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC;AAEN,KAAK,KAAK,GAAG,iBAAiB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC9B,GAAG,oBAAoB,CAAC;AAuD7B,QAAA,MAAM,QAAQ,2DAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
@@ -1,15 +1,16 @@
1
1
  <script lang="ts">
2
2
  import type { Snippet } from "svelte";
3
- import type { HTMLInputAttributes } from "svelte/elements";
3
+ import type { ClassValue, HTMLInputAttributes } from "svelte/elements";
4
4
 
5
5
  type NativeInputProps = Omit<
6
6
  HTMLInputAttributes,
7
- "aria-label" | "id" | "input" | "size" | "value" | "width"
7
+ "aria-label" | "class" | "id" | "input" | "size" | "value" | "width"
8
8
  >;
9
9
 
10
10
  type Props = NativeInputProps & {
11
11
  id: string;
12
12
  "aria-label": string;
13
+ class?: ClassValue;
13
14
  value?: HTMLInputAttributes["value"];
14
15
  small?: boolean;
15
16
  width?: string;
@@ -35,7 +36,14 @@
35
36
  </script>
36
37
 
37
38
  <label
38
- class={["input-field", small && "small", disabled && "disabled", className]}
39
+ class={[
40
+ {
41
+ "input-field": true,
42
+ small,
43
+ disabled,
44
+ },
45
+ className,
46
+ ]}
39
47
  style:width
40
48
  >
41
49
  {#if leading}
@@ -1,9 +1,10 @@
1
1
  import type { Snippet } from "svelte";
2
- import type { HTMLInputAttributes } from "svelte/elements";
3
- type NativeInputProps = Omit<HTMLInputAttributes, "aria-label" | "id" | "input" | "size" | "value" | "width">;
2
+ import type { ClassValue, HTMLInputAttributes } from "svelte/elements";
3
+ type NativeInputProps = Omit<HTMLInputAttributes, "aria-label" | "class" | "id" | "input" | "size" | "value" | "width">;
4
4
  type Props = NativeInputProps & {
5
5
  id: string;
6
6
  "aria-label": string;
7
+ class?: ClassValue;
7
8
  value?: HTMLInputAttributes["value"];
8
9
  small?: boolean;
9
10
  width?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/Input.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGvD,KAAK,gBAAgB,GAAG,IAAI,CACxB,mBAAmB,EACnB,YAAY,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAC7D,CAAC;AAEF,KAAK,KAAK,GAAG,gBAAgB,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAyCN,QAAA,MAAM,KAAK,0DAAwC,CAAC;AACpD,KAAK,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AACtC,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Input.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/Input.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGnE,KAAK,gBAAgB,GAAG,IAAI,CACxB,mBAAmB,EACnB,YAAY,GAAG,OAAO,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CACvE,CAAC;AAEF,KAAK,KAAK,GAAG,gBAAgB,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAgDN,QAAA,MAAM,KAAK,0DAAwC,CAAC;AACpD,KAAK,KAAK,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AACtC,eAAe,KAAK,CAAC"}
@@ -1,9 +1,10 @@
1
1
  <script lang="ts">
2
2
  import type { Snippet } from "svelte";
3
- import type { HTMLAnchorAttributes } from "svelte/elements";
3
+ import type { ClassValue, HTMLAnchorAttributes } from "svelte/elements";
4
4
 
5
- type Props = Omit<HTMLAnchorAttributes, "href"> & {
5
+ type Props = Omit<HTMLAnchorAttributes, "class" | "href"> & {
6
6
  href: string;
7
+ class?: ClassValue;
7
8
  children: Snippet;
8
9
  };
9
10
 
@@ -15,7 +16,9 @@
15
16
  rel: relProp,
16
17
  ...rest
17
18
  }: Props = $props();
18
- let target = $derived(targetProp ?? (href.startsWith("#") ? undefined : "_blank"));
19
+ let url = $derived(new URL(href, document.location.href));
20
+ let isLocalHref = $derived(url.origin === document.location.origin);
21
+ let target = $derived(targetProp ?? (isLocalHref ? undefined : "_blank"));
19
22
  let rel = $derived(relProp ?? (target ? "noopener noreferrer" : undefined));
20
23
  </script>
21
24
 
@@ -1,7 +1,8 @@
1
1
  import type { Snippet } from "svelte";
2
- import type { HTMLAnchorAttributes } from "svelte/elements";
3
- type Props = Omit<HTMLAnchorAttributes, "href"> & {
2
+ import type { ClassValue, HTMLAnchorAttributes } from "svelte/elements";
3
+ type Props = Omit<HTMLAnchorAttributes, "class" | "href"> & {
4
4
  href: string;
5
+ class?: ClassValue;
5
6
  children: Snippet;
6
7
  };
7
8
  declare const OuterLink: import("svelte").Component<Props, {}, "">;
@@ -1 +1 @@
1
- {"version":3,"file":"OuterLink.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/OuterLink.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGxD,KAAK,KAAK,GAAG,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,GAAG;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACrB,CAAC;AA0BN,QAAA,MAAM,SAAS,2CAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"OuterLink.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/OuterLink.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGpE,KAAK,KAAK,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,MAAM,CAAC,GAAG;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACrB,CAAC;AA4BN,QAAA,MAAM,SAAS,2CAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
@@ -1,16 +1,17 @@
1
1
  <script lang="ts">
2
- import type { HTMLInputAttributes } from "svelte/elements";
2
+ import type { ClassValue, HTMLInputAttributes } from "svelte/elements";
3
3
  import Input from "./Input.svelte";
4
4
  import IconSearch from "./icons/IconSearch.svelte";
5
5
 
6
6
  type NativeInputProps = Omit<
7
7
  HTMLInputAttributes,
8
- "aria-label" | "id" | "input" | "type" | "value" | "size" | "width"
8
+ "aria-label" | "class" | "id" | "input" | "type" | "value" | "size" | "width"
9
9
  >;
10
10
 
11
11
  type Props = NativeInputProps & {
12
12
  id: string;
13
13
  "aria-label": string;
14
+ class?: ClassValue;
14
15
  value?: string;
15
16
  input?: HTMLInputElement | undefined;
16
17
  container?: HTMLDivElement | undefined;
@@ -25,7 +26,7 @@
25
26
  container = $bindable(),
26
27
  small = false,
27
28
  width,
28
- class: className,
29
+ class: className = "",
29
30
  placeholder,
30
31
  "aria-label": ariaLabel,
31
32
  ...rest
@@ -1,8 +1,9 @@
1
- import type { HTMLInputAttributes } from "svelte/elements";
2
- type NativeInputProps = Omit<HTMLInputAttributes, "aria-label" | "id" | "input" | "type" | "value" | "size" | "width">;
1
+ import type { ClassValue, HTMLInputAttributes } from "svelte/elements";
2
+ type NativeInputProps = Omit<HTMLInputAttributes, "aria-label" | "class" | "id" | "input" | "type" | "value" | "size" | "width">;
3
3
  type Props = NativeInputProps & {
4
4
  id: string;
5
5
  "aria-label": string;
6
+ class?: ClassValue;
6
7
  value?: string;
7
8
  input?: HTMLInputElement | undefined;
8
9
  container?: HTMLDivElement | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"SearchBar.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/SearchBar.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAKvD,KAAK,gBAAgB,GAAG,IAAI,CACxB,mBAAmB,EACnB,YAAY,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CACtE,CAAC;AAEF,KAAK,KAAK,GAAG,gBAAgB,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACrC,SAAS,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAkCN,QAAA,MAAM,SAAS,wEAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"SearchBar.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/SearchBar.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAKnE,KAAK,gBAAgB,GAAG,IAAI,CACxB,mBAAmB,EACnB,YAAY,GAAG,OAAO,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAChF,CAAC;AAEF,KAAK,KAAK,GAAG,gBAAgB,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACrC,SAAS,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAkCN,QAAA,MAAM,SAAS,wEAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
@@ -50,7 +50,14 @@
50
50
 
51
51
  <svelte:element
52
52
  this={element}
53
- class={["text", tone && `tone-${tone}`, center && "center", className]}
53
+ class={[
54
+ {
55
+ text: true,
56
+ [`tone-${tone}`]: tone,
57
+ center,
58
+ },
59
+ className,
60
+ ]}
54
61
  >
55
62
  {@render children()}
56
63
  </svelte:element>
@@ -1 +1 @@
1
- {"version":3,"file":"Text.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/Text.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG9C,KAAK,OAAO,GACN,SAAS,GACT,OAAO,GACP,SAAS,GACT,YAAY,GACZ,MAAM,GACN,SAAS,CAAC;AAChB,KAAK,IAAI,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,OAAO,CAAC;AAC3D,KAAK,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,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C,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,UAAU,CAAC;CACtB,CAAC;AACF,KAAK,YAAY,GAAG,SAAS,GAAG;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AACF,KAAK,QAAQ,GAAG,SAAS,GAAG;IACxB,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,CAAC,EAAE,KAAK,CAAC;CACnB,CAAC;AACF,KAAK,KAAK,GAAG,YAAY,GAAG,QAAQ,CAAC;AA+CzC,QAAA,MAAM,IAAI,2CAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import type { Snippet } from "svelte";
3
- import type { HTMLButtonAttributes } from "svelte/elements";
3
+ import type { ClassValue, HTMLButtonAttributes } from "svelte/elements";
4
4
 
5
5
  type ToggleContentProps =
6
6
  | {
@@ -14,7 +14,8 @@
14
14
  desc?: string;
15
15
  };
16
16
 
17
- type Props = Omit<HTMLButtonAttributes, "aria-checked" | "onchange"> & {
17
+ type Props = Omit<HTMLButtonAttributes, "aria-checked" | "class" | "onchange"> & {
18
+ class?: ClassValue;
18
19
  checked?: boolean;
19
20
  onchange?: (checked: boolean) => void;
20
21
  } & ToggleContentProps;
@@ -1,5 +1,5 @@
1
1
  import type { Snippet } from "svelte";
2
- import type { HTMLButtonAttributes } from "svelte/elements";
2
+ import type { ClassValue, HTMLButtonAttributes } from "svelte/elements";
3
3
  type ToggleContentProps = {
4
4
  children: Snippet;
5
5
  name?: never;
@@ -9,7 +9,8 @@ type ToggleContentProps = {
9
9
  name: string;
10
10
  desc?: string;
11
11
  };
12
- type Props = Omit<HTMLButtonAttributes, "aria-checked" | "onchange"> & {
12
+ type Props = Omit<HTMLButtonAttributes, "aria-checked" | "class" | "onchange"> & {
13
+ class?: ClassValue;
13
14
  checked?: boolean;
14
15
  onchange?: (checked: boolean) => void;
15
16
  } & ToggleContentProps;
@@ -1 +1 @@
1
- {"version":3,"file":"Toggle.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/Toggle.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGxD,KAAK,kBAAkB,GACjB;IACE,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC;CAChB,GACC;IACE,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN,KAAK,KAAK,GAAG,IAAI,CAAC,oBAAoB,EAAE,cAAc,GAAG,UAAU,CAAC,GAAG;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC,GAAG,kBAAkB,CAAC;AAwD3B,QAAA,MAAM,MAAM,kDAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Toggle.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/Toggle.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGpE,KAAK,kBAAkB,GACjB;IACE,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC;CAChB,GACC;IACE,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN,KAAK,KAAK,GAAG,IAAI,CAAC,oBAAoB,EAAE,cAAc,GAAG,OAAO,GAAG,UAAU,CAAC,GAAG;IAC7E,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC,GAAG,kBAAkB,CAAC;AAwD3B,QAAA,MAAM,MAAM,kDAAwC,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
@@ -81,7 +81,7 @@
81
81
  position: relative;
82
82
  width: fit-content;
83
83
  height: fit-content;
84
- gap: var(--gap);
84
+ gap: var(--gap-1);
85
85
  }
86
86
 
87
87
  .tooltip-container {
package/dist/styles.css CHANGED
@@ -30,11 +30,10 @@
30
30
  --helium-elevated-40: color-mix(in srgb, var(--helium-elevated) 40%, transparent);
31
31
  --helium-elevated-50: color-mix(in srgb, var(--helium-elevated) 50%, transparent);
32
32
 
33
- --gap: 6px;
34
- --gap-1: 12px;
35
- --gap-2: 20px;
36
- --content-padding: 32px;
37
- --section-padding: 48px;
33
+ --gap-1: 6px;
34
+ --gap-2: 8px;
35
+ --gap-3: 12px;
36
+ --gap-4: 20px;
38
37
 
39
38
  --mid-border-radius: 12px;
40
39
  --card-border-radius: 20px;
@@ -197,7 +196,7 @@ button,
197
196
  --size: 38px;
198
197
 
199
198
  color: var(--primary);
200
- background-color: var(--helium-elevated-7);
199
+ background-color: transparent;
201
200
  font-size: 16px;
202
201
  min-height: 38px;
203
202
  padding: 9px 16px;
@@ -211,8 +210,8 @@ button,
211
210
  -webkit-user-select: none;
212
211
  -webkit-user-drag: none;
213
212
 
214
- &:hover {
215
- background-color: var(--helium-elevated-10);
213
+ &:not(.transparent) {
214
+ background-color: var(--helium-elevated-7);
216
215
  }
217
216
 
218
217
  &:active {
@@ -224,10 +223,6 @@ button,
224
223
  color: var(--white);
225
224
  background-color: var(--helium-blue);
226
225
 
227
- &:hover {
228
- background-color: var(--helium-blue-hover);
229
- }
230
-
231
226
  &:active {
232
227
  background-color: var(--helium-blue-press);
233
228
  }
@@ -246,7 +241,7 @@ button,
246
241
  text-align: left;
247
242
  border-radius: 14px;
248
243
  padding: 14px 18px;
249
- gap: var(--gap-1);
244
+ gap: var(--gap-3);
250
245
 
251
246
  &:active {
252
247
  transform: none;
@@ -264,9 +259,12 @@ button,
264
259
 
265
260
  &:disabled {
266
261
  color: var(--tertiary);
267
- background-color: var(--helium-elevated-5);
268
262
  pointer-events: none;
269
263
 
264
+ &:not(.transparent) {
265
+ background-color: var(--helium-elevated-5);
266
+ }
267
+
270
268
  &:not(.selected) {
271
269
  box-shadow: none;
272
270
  }
@@ -284,6 +282,28 @@ button,
284
282
  }
285
283
  }
286
284
 
285
+ @media (hover: hover) {
286
+ button:hover,
287
+ .button:hover {
288
+ background-color: var(--helium-elevated-10);
289
+ }
290
+
291
+ button:hover:active,
292
+ .button:hover:active {
293
+ background-color: var(--helium-elevated-15);
294
+ }
295
+
296
+ button.primary:hover,
297
+ .button.primary:hover {
298
+ background-color: var(--helium-blue-hover);
299
+ }
300
+
301
+ button.primary:hover:active,
302
+ .button.primary:hover:active {
303
+ background-color: var(--helium-blue-press);
304
+ }
305
+ }
306
+
287
307
  a.button {
288
308
  text-decoration: none;
289
309
  }
@@ -297,7 +317,7 @@ a:focus-visible {
297
317
 
298
318
  .action-buttons {
299
319
  display: flex;
300
- gap: var(--gap);
320
+ gap: var(--gap-1);
301
321
 
302
322
  & > button,
303
323
  & > .button {
@@ -318,7 +338,6 @@ a:focus-visible {
318
338
  background-color: var(--helium-elevated-7);
319
339
  display: inline-flex;
320
340
 
321
- &:hover,
322
341
  &:focus-within {
323
342
  background-color: var(--helium-elevated-10);
324
343
  }
@@ -329,6 +348,13 @@ a:focus-visible {
329
348
  }
330
349
  }
331
350
 
351
+ @media (hover: hover) {
352
+ .input-field:hover,
353
+ .dropdown:hover {
354
+ background-color: var(--helium-elevated-10);
355
+ }
356
+ }
357
+
332
358
  .input-field {
333
359
  gap: 9px;
334
360
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imput/helium-prism",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Shared UI components of Helium web interfaces for Svelte",
5
5
  "type": "module",
6
6
  "license": "GPL-3.0-only",