@x33025/sveltely 0.1.19 → 0.1.22

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.
@@ -31,4 +31,11 @@
31
31
  <Label label="Enabled" orientation="trailing" width="fit">
32
32
  <Switch bind:checked={enabled} />
33
33
  </Label>
34
+
35
+ <Label orientation="leading" width="fit">
36
+ {#snippet labelContent()}
37
+ <span>Name <span class="text-[var(--sveltely-text-tertiary-color)]">optional</span></span>
38
+ {/snippet}
39
+ <TextField bind:value={name} placeholder="Sveltely" />
40
+ </Label>
34
41
  </HStack>
@@ -7,6 +7,7 @@
7
7
  type Props = {
8
8
  children?: Snippet;
9
9
  label?: string;
10
+ labelContent?: Snippet;
10
11
  icon?: Component<{ class?: string; size?: number | string }>;
11
12
  iconSize?: number | string;
12
13
  iconColor?: string;
@@ -17,6 +18,7 @@
17
18
  let {
18
19
  children,
19
20
  label,
21
+ labelContent,
20
22
  icon,
21
23
  iconSize,
22
24
  iconColor,
@@ -93,7 +95,7 @@
93
95
  </script>
94
96
 
95
97
  <div class="label" data-orientation={orientation} style={rootStyle}>
96
- {#if icon || label}
98
+ {#if icon || label || labelContent}
97
99
  <span class="label-heading">
98
100
  {#if icon}
99
101
  {@const Icon = icon}
@@ -104,6 +106,10 @@
104
106
 
105
107
  {#if label}
106
108
  <span class="label-text">{label}</span>
109
+ {:else if labelContent}
110
+ <span class="label-text">
111
+ {@render labelContent()}
112
+ </span>
107
113
  {/if}
108
114
  </span>
109
115
  {/if}
@@ -5,6 +5,7 @@ import { type StyleProps } from '../../../style/surface';
5
5
  type Props = {
6
6
  children?: Snippet;
7
7
  label?: string;
8
+ labelContent?: Snippet;
8
9
  icon?: Component<{
9
10
  class?: string;
10
11
  size?: number | string;
@@ -0,0 +1,11 @@
1
+ <script lang="ts">
2
+ import { portalHost } from '../../../actions/portal';
3
+
4
+ type Props = {
5
+ id?: string;
6
+ };
7
+
8
+ let { id = 'default' }: Props = $props();
9
+ </script>
10
+
11
+ <div use:portalHost={id}></div>
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ id?: string;
3
+ };
4
+ declare const Portal: import("svelte").Component<Props, {}, "">;
5
+ type Portal = ReturnType<typeof Portal>;
6
+ export default Portal;
@@ -0,0 +1 @@
1
+ export { default } from './Portal.svelte';
@@ -0,0 +1 @@
1
+ export { default } from './Portal.svelte';
package/dist/index.d.ts CHANGED
@@ -36,6 +36,7 @@ export { default as NavigationStack } from './components/Library/NavigationStack
36
36
  export { default as NumberField } from './components/Library/NumberField';
37
37
  export { default as SegmentedPicker } from './components/Library/SegmentedPicker';
38
38
  export { default as Pagination } from './components/Library/Pagination';
39
+ export { default as Portal } from './components/Library/Portal';
39
40
  export { default as Dropdown } from './components/Library/Dropdown';
40
41
  export { default as Divider } from './components/Library/Divider';
41
42
  export { default as ForEach } from './components/Library/ForEach';
package/dist/index.js CHANGED
@@ -25,6 +25,7 @@ export { default as NavigationStack } from './components/Library/NavigationStack
25
25
  export { default as NumberField } from './components/Library/NumberField';
26
26
  export { default as SegmentedPicker } from './components/Library/SegmentedPicker';
27
27
  export { default as Pagination } from './components/Library/Pagination';
28
+ export { default as Portal } from './components/Library/Portal';
28
29
  export { default as Dropdown } from './components/Library/Dropdown';
29
30
  export { default as Divider } from './components/Library/Divider';
30
31
  export { default as ForEach } from './components/Library/ForEach';
package/dist/style.css CHANGED
@@ -556,6 +556,9 @@
556
556
  .text-\[var\(--sveltely-text-secondary-color\)\] {
557
557
  color: var(--sveltely-text-secondary-color);
558
558
  }
559
+ .text-\[var\(--sveltely-text-tertiary-color\)\] {
560
+ color: var(--sveltely-text-tertiary-color);
561
+ }
559
562
  .text-gray-700 {
560
563
  color: var(--color-gray-700);
561
564
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x33025/sveltely",
3
- "version": "0.1.19",
3
+ "version": "0.1.22",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",