@x33025/sveltely 0.1.11 → 0.1.13
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/Library/HStack/HStack.svelte +12 -7
- package/dist/components/Library/TextEditor/TextEditor.svelte +16 -12
- package/dist/components/Library/TextEditor/TextEditor.svelte.d.ts +4 -5
- package/dist/components/Library/TokenSearchField/TokenSearchField.svelte +2 -1
- package/dist/components/Library/VStack/VStack.svelte +12 -7
- package/dist/components/Local/StyleControls.svelte +2 -2
- package/dist/style/index.css +2 -2
- package/dist/style.css +2 -2
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
const styleProps = $derived(extractedStyleProps.styleProps);
|
|
25
25
|
const props = $derived(extractedStyleProps.restProps);
|
|
26
26
|
const rootStyle = $derived.by(() =>
|
|
27
|
-
[layoutStyle(layoutProps), surfaceStyle(styleProps, '
|
|
27
|
+
[layoutStyle(layoutProps), surfaceStyle(styleProps, 'hstack')].filter(Boolean).join(' ')
|
|
28
28
|
);
|
|
29
29
|
</script>
|
|
30
30
|
|
|
@@ -36,14 +36,19 @@
|
|
|
36
36
|
|
|
37
37
|
<style>
|
|
38
38
|
.hstack {
|
|
39
|
+
--hstack-gap: 0px;
|
|
40
|
+
--hstack-border-radius: 0px;
|
|
41
|
+
--hstack-padding-x: 0px;
|
|
42
|
+
--hstack-padding-y: 0px;
|
|
43
|
+
--hstack-font-size: inherit;
|
|
39
44
|
display: flex;
|
|
40
|
-
min-width:
|
|
41
|
-
min-height:
|
|
45
|
+
min-width: 0;
|
|
46
|
+
min-height: 0;
|
|
42
47
|
flex-direction: row;
|
|
43
|
-
gap: var(--
|
|
44
|
-
border-radius: var(--
|
|
45
|
-
padding: var(--
|
|
46
|
-
font-size: var(--
|
|
48
|
+
gap: var(--hstack-gap);
|
|
49
|
+
border-radius: var(--hstack-border-radius);
|
|
50
|
+
padding: var(--hstack-padding-y) var(--hstack-padding-x);
|
|
51
|
+
font-size: var(--hstack-font-size);
|
|
47
52
|
--divider-width: 1px;
|
|
48
53
|
--divider-height: auto;
|
|
49
54
|
--divider-align-self: stretch;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { HTMLTextareaAttributes } from 'svelte/elements';
|
|
2
3
|
import { textEditorStyle, type TextEditorProps } from '../../../style/text-editor';
|
|
3
4
|
|
|
4
|
-
type Props = {
|
|
5
|
+
type Props = Omit<HTMLTextareaAttributes, 'value' | 'class'> & {
|
|
5
6
|
value?: string;
|
|
6
|
-
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
spellcheck?: boolean;
|
|
7
|
+
class?: HTMLTextareaAttributes['class'];
|
|
9
8
|
autosize?: boolean;
|
|
10
9
|
className?: string;
|
|
11
10
|
onInput?: (event: Event) => void;
|
|
@@ -16,18 +15,20 @@
|
|
|
16
15
|
} & TextEditorProps;
|
|
17
16
|
|
|
18
17
|
let {
|
|
19
|
-
value = '',
|
|
18
|
+
value = $bindable(''),
|
|
20
19
|
rows = 1,
|
|
21
|
-
|
|
22
|
-
spellcheck,
|
|
20
|
+
class: classProp = '',
|
|
23
21
|
autosize = false,
|
|
24
22
|
className = '',
|
|
25
23
|
onInput,
|
|
26
24
|
onKeyDown,
|
|
25
|
+
oninput,
|
|
26
|
+
onkeydown,
|
|
27
27
|
shouldFocus = false,
|
|
28
28
|
focusPosition = null,
|
|
29
29
|
onFocused,
|
|
30
|
-
textAlign
|
|
30
|
+
textAlign,
|
|
31
|
+
...textareaProps
|
|
31
32
|
}: Props = $props();
|
|
32
33
|
|
|
33
34
|
let textarea: HTMLTextAreaElement | undefined;
|
|
@@ -60,15 +61,18 @@
|
|
|
60
61
|
bind:this={textarea}
|
|
61
62
|
{value}
|
|
62
63
|
{rows}
|
|
63
|
-
{
|
|
64
|
-
{spellcheck}
|
|
64
|
+
{...textareaProps}
|
|
65
65
|
style={rootStyle}
|
|
66
66
|
oninput={(event) => {
|
|
67
67
|
resize();
|
|
68
|
+
oninput?.(event);
|
|
68
69
|
onInput?.(event);
|
|
69
70
|
}}
|
|
70
|
-
onkeydown={(event) =>
|
|
71
|
-
|
|
71
|
+
onkeydown={(event) => {
|
|
72
|
+
onkeydown?.(event);
|
|
73
|
+
onKeyDown?.(event);
|
|
74
|
+
}}
|
|
75
|
+
class={`text-editor ${classProp} ${className}`}
|
|
72
76
|
></textarea>
|
|
73
77
|
|
|
74
78
|
<style>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import type { HTMLTextareaAttributes } from 'svelte/elements';
|
|
1
2
|
import { type TextEditorProps } from '../../../style/text-editor';
|
|
2
|
-
type Props = {
|
|
3
|
+
type Props = Omit<HTMLTextareaAttributes, 'value' | 'class'> & {
|
|
3
4
|
value?: string;
|
|
4
|
-
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
spellcheck?: boolean;
|
|
5
|
+
class?: HTMLTextareaAttributes['class'];
|
|
7
6
|
autosize?: boolean;
|
|
8
7
|
className?: string;
|
|
9
8
|
onInput?: (event: Event) => void;
|
|
@@ -12,6 +11,6 @@ type Props = {
|
|
|
12
11
|
focusPosition?: number | null;
|
|
13
12
|
onFocused?: () => void;
|
|
14
13
|
} & TextEditorProps;
|
|
15
|
-
declare const TextEditor: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
declare const TextEditor: import("svelte").Component<Props, {}, "value">;
|
|
16
15
|
type TextEditor = ReturnType<typeof TextEditor>;
|
|
17
16
|
export default TextEditor;
|
|
@@ -135,11 +135,12 @@
|
|
|
135
135
|
--token-search-field-confirm-font-size: calc(var(--token-search-field-font-size) * 0.857);
|
|
136
136
|
--sveltely-nested-inset: var(--token-search-field-inset);
|
|
137
137
|
min-width: 0;
|
|
138
|
+
flex: 1 1 0;
|
|
138
139
|
border: 1px solid var(--sveltely-border-color);
|
|
139
140
|
border-radius: var(--sveltely-border-radius);
|
|
140
141
|
color: var(--sveltely-primary-color);
|
|
141
142
|
gap: var(--token-search-field-inset);
|
|
142
|
-
padding: calc(var(--sveltely-padding-y) * 0.
|
|
143
|
+
padding: calc(var(--sveltely-padding-y) * 0.67 * var(--token-search-field-scale))
|
|
143
144
|
calc(var(--sveltely-padding-x) * var(--token-search-field-scale));
|
|
144
145
|
font-size: var(--token-search-field-font-size);
|
|
145
146
|
line-height: var(--token-search-field-line-height);
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
const styleProps = $derived(extractedStyleProps.styleProps);
|
|
25
25
|
const props = $derived(extractedStyleProps.restProps);
|
|
26
26
|
const rootStyle = $derived.by(() =>
|
|
27
|
-
[layoutStyle(layoutProps), surfaceStyle(styleProps, '
|
|
27
|
+
[layoutStyle(layoutProps), surfaceStyle(styleProps, 'vstack')].filter(Boolean).join(' ')
|
|
28
28
|
);
|
|
29
29
|
</script>
|
|
30
30
|
|
|
@@ -36,14 +36,19 @@
|
|
|
36
36
|
|
|
37
37
|
<style>
|
|
38
38
|
.vstack {
|
|
39
|
+
--vstack-gap: 0px;
|
|
40
|
+
--vstack-border-radius: 0px;
|
|
41
|
+
--vstack-padding-x: 0px;
|
|
42
|
+
--vstack-padding-y: 0px;
|
|
43
|
+
--vstack-font-size: inherit;
|
|
39
44
|
display: flex;
|
|
40
|
-
min-width:
|
|
41
|
-
min-height:
|
|
45
|
+
min-width: 0;
|
|
46
|
+
min-height: 0;
|
|
42
47
|
flex-direction: column;
|
|
43
|
-
gap: var(--
|
|
44
|
-
border-radius: var(--
|
|
45
|
-
padding: var(--
|
|
46
|
-
font-size: var(--
|
|
48
|
+
gap: var(--vstack-gap);
|
|
49
|
+
border-radius: var(--vstack-border-radius);
|
|
50
|
+
padding: var(--vstack-padding-y) var(--vstack-padding-x);
|
|
51
|
+
font-size: var(--vstack-font-size);
|
|
47
52
|
--divider-width: 100%;
|
|
48
53
|
--divider-height: 1px;
|
|
49
54
|
--divider-align-self: auto;
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
borderColor = $bindable('#e4e4e7'),
|
|
27
27
|
primaryColor = $bindable('#18181b'),
|
|
28
28
|
secondaryColor = $bindable('#71717a'),
|
|
29
|
-
activeColor = $bindable('#
|
|
30
|
-
inactiveColor = $bindable('#
|
|
29
|
+
activeColor = $bindable('#f4f4f5'),
|
|
30
|
+
inactiveColor = $bindable('#f4f4f5'),
|
|
31
31
|
backgroundColor = $bindable('#ffffff')
|
|
32
32
|
}: Props = $props();
|
|
33
33
|
</script>
|
package/dist/style/index.css
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
--sveltely-gap: 0.5rem;
|
|
15
15
|
--sveltely-primary-color: var(--color-zinc-900);
|
|
16
16
|
--sveltely-secondary-color: var(--color-zinc-500);
|
|
17
|
-
--sveltely-active-color: var(--color-zinc-
|
|
18
|
-
--sveltely-inactive-color: var(--
|
|
17
|
+
--sveltely-active-color: var(--color-zinc-100);
|
|
18
|
+
--sveltely-inactive-color: var(--color-zinc-100);
|
|
19
19
|
--sveltely-background-color: white;
|
|
20
20
|
--sveltely-hover-color: color-mix(in oklab, var(--sveltely-active-color) 5%, transparent);
|
|
21
21
|
--sveltely-inactive-hover-color: color-mix(in oklab, var(--sveltely-inactive-color) 88%, white);
|
package/dist/style.css
CHANGED
|
@@ -855,8 +855,8 @@
|
|
|
855
855
|
--sveltely-gap: 0.5rem;
|
|
856
856
|
--sveltely-primary-color: var(--color-zinc-900);
|
|
857
857
|
--sveltely-secondary-color: var(--color-zinc-500);
|
|
858
|
-
--sveltely-active-color: var(--color-zinc-
|
|
859
|
-
--sveltely-inactive-color: var(--
|
|
858
|
+
--sveltely-active-color: var(--color-zinc-100);
|
|
859
|
+
--sveltely-inactive-color: var(--color-zinc-100);
|
|
860
860
|
--sveltely-background-color: white;
|
|
861
861
|
--sveltely-hover-color: var(--sveltely-active-color);
|
|
862
862
|
@supports (color: color-mix(in lab, red, red)) {
|