@intechstudio/grid-uikit 1.20260714.912 → 1.20260805.1241
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/InfoBox.svelte +1 -1
- package/dist/LogMessage.svelte +1 -1
- package/dist/MeltCheckbox.svelte +31 -25
- package/dist/MeltRadio.svelte +2 -2
- package/dist/MeltSlider.svelte +1 -4
- package/dist/MoltenPushButton.svelte +18 -19
- package/dist/MoltenPushButton.svelte.d.ts +1 -2
- package/dist/MoltenTooltip.svelte +2 -2
- package/dist/SvgIcon.svelte +13 -4
- package/dist/SvgIcon.svelte.d.ts +2 -0
- package/dist/Toggle.svelte +27 -16
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/theme.css +67 -8
- package/package.json +1 -1
- package/src/lib/theme.css +67 -8
- package/dist/MoltenPushButtonDropdown.svelte +0 -244
- package/dist/MoltenPushButtonDropdown.svelte.d.ts +0 -28
package/dist/InfoBox.svelte
CHANGED
package/dist/LogMessage.svelte
CHANGED
package/dist/MeltCheckbox.svelte
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
const {
|
|
13
13
|
elements: { root, input },
|
|
14
|
-
helpers: { isChecked, isIndeterminate },
|
|
15
14
|
states: { checked },
|
|
16
15
|
} = createCheckbox({
|
|
17
16
|
defaultChecked: target,
|
|
@@ -42,6 +41,7 @@
|
|
|
42
41
|
<button
|
|
43
42
|
{...$root}
|
|
44
43
|
use:root
|
|
44
|
+
class="checkbox-button"
|
|
45
45
|
class:disabled
|
|
46
46
|
on:keydown={(e) => {
|
|
47
47
|
if (e.key === "Enter") {
|
|
@@ -58,18 +58,12 @@
|
|
|
58
58
|
/>
|
|
59
59
|
</div>
|
|
60
60
|
|
|
61
|
+
{#if title}
|
|
62
|
+
<span class:disabled>{title}</span>
|
|
63
|
+
{/if}
|
|
64
|
+
|
|
61
65
|
<input {...$input} use:input />
|
|
62
66
|
</button>
|
|
63
|
-
|
|
64
|
-
{#if title}
|
|
65
|
-
<div
|
|
66
|
-
class:checkbox-title-selected={target}
|
|
67
|
-
class="checkbox-title"
|
|
68
|
-
class:disabled
|
|
69
|
-
>
|
|
70
|
-
{title}
|
|
71
|
-
</div>
|
|
72
|
-
{/if}
|
|
73
67
|
</label>
|
|
74
68
|
|
|
75
69
|
<style>
|
|
@@ -77,7 +71,8 @@
|
|
|
77
71
|
display: flex;
|
|
78
72
|
align-items: center;
|
|
79
73
|
cursor: pointer;
|
|
80
|
-
padding: 0.5em;
|
|
74
|
+
padding-left: 0.5em;
|
|
75
|
+
padding-right: 0.5em;
|
|
81
76
|
}
|
|
82
77
|
|
|
83
78
|
label.disabled {
|
|
@@ -90,10 +85,11 @@
|
|
|
90
85
|
}
|
|
91
86
|
|
|
92
87
|
.checkbox-outer {
|
|
88
|
+
position: relative;
|
|
93
89
|
width: 1.5em;
|
|
94
90
|
height: 1.5em;
|
|
95
|
-
border-radius:
|
|
96
|
-
margin:
|
|
91
|
+
border-radius: var(--radius);
|
|
92
|
+
margin-right: 0.75em;
|
|
97
93
|
border: 1px solid var(--foreground);
|
|
98
94
|
display: flex;
|
|
99
95
|
align-items: center;
|
|
@@ -105,32 +101,38 @@
|
|
|
105
101
|
}
|
|
106
102
|
|
|
107
103
|
.checkbox-inner {
|
|
104
|
+
position: absolute;
|
|
108
105
|
width: 0.75em;
|
|
109
106
|
height: 0.75em;
|
|
110
107
|
background-color: var(--foreground);
|
|
111
|
-
border-radius:
|
|
108
|
+
border-radius: var(--radius);
|
|
112
109
|
}
|
|
113
110
|
|
|
114
111
|
.checkbox-inner.disabled {
|
|
115
112
|
background-color: var(--foreground-disabled);
|
|
116
113
|
}
|
|
117
114
|
|
|
118
|
-
.checkbox-title {
|
|
119
|
-
padding-left: 0.5em;
|
|
120
|
-
color: var(--foreground-muted);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.checkbox-title.disabled {
|
|
124
|
-
color: var(--foreground-disabled);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
115
|
button {
|
|
116
|
+
font-family: inherit;
|
|
117
|
+
font-feature-settings: inherit;
|
|
118
|
+
font-variation-settings: inherit;
|
|
119
|
+
font-size: 100%;
|
|
120
|
+
font-weight: inherit;
|
|
121
|
+
line-height: inherit;
|
|
122
|
+
letter-spacing: inherit;
|
|
123
|
+
color: inherit;
|
|
128
124
|
margin: 0; /* 2 */
|
|
129
125
|
padding: 0; /* 3 */
|
|
130
126
|
background-color: transparent; /* 2 */
|
|
131
127
|
cursor: pointer;
|
|
132
|
-
|
|
128
|
+
display: inline-flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
button.checkbox-button {
|
|
133
|
+
color: var(--foreground-muted);
|
|
133
134
|
}
|
|
135
|
+
|
|
134
136
|
button:focus {
|
|
135
137
|
outline: var(--focus-outline);
|
|
136
138
|
outline-offset: var(--focus-offset);
|
|
@@ -139,4 +141,8 @@
|
|
|
139
141
|
button.disabled {
|
|
140
142
|
cursor: default;
|
|
141
143
|
}
|
|
144
|
+
|
|
145
|
+
span.disabled {
|
|
146
|
+
color: var(--foreground-disabled);
|
|
147
|
+
}
|
|
142
148
|
</style>
|
package/dist/MeltRadio.svelte
CHANGED
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
overflow: visible;
|
|
123
123
|
display: grid;
|
|
124
124
|
grid-auto-flow: column;
|
|
125
|
-
padding:
|
|
125
|
+
padding: 0em 0;
|
|
126
126
|
}
|
|
127
127
|
div.container-full {
|
|
128
128
|
width: 100%;
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
position: relative;
|
|
196
196
|
padding: 0.25em 0.5em;
|
|
197
197
|
width: 100%;
|
|
198
|
-
border-radius:
|
|
198
|
+
border-radius: var(--radius);
|
|
199
199
|
border: 1px solid var(--background-soft);
|
|
200
200
|
justify-content: center;
|
|
201
201
|
}
|
package/dist/MeltSlider.svelte
CHANGED
|
@@ -88,19 +88,16 @@
|
|
|
88
88
|
width: 100%;
|
|
89
89
|
background-color: var(--background-muted);
|
|
90
90
|
border: 1px solid var(--background-soft);
|
|
91
|
-
border-radius: 9999px;
|
|
92
91
|
height: 8px;
|
|
93
92
|
}
|
|
94
93
|
span.range-selected {
|
|
95
94
|
height: 8px;
|
|
96
95
|
background-color: var(--foreground-disabled);
|
|
97
|
-
border-radius: 9999px;
|
|
98
96
|
}
|
|
99
97
|
span.thumb {
|
|
100
98
|
display: block;
|
|
101
99
|
height: var(--thumb-size);
|
|
102
|
-
width: var(--thumb-size);
|
|
103
|
-
border-radius: 9999px;
|
|
100
|
+
width: calc(var(--thumb-size) / 2);
|
|
104
101
|
background-color: var(--foreground-muted);
|
|
105
102
|
}
|
|
106
103
|
span.thumb:focus {
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
export let text: string = "";
|
|
5
5
|
export let style: "normal" | "outlined" | "accept" = "normal";
|
|
6
|
+
export let snap: "auto" | "full" | "wide" = "auto";
|
|
6
7
|
export let disabled: boolean = false;
|
|
7
8
|
export let popup: { duration?: number } | undefined = undefined;
|
|
8
|
-
export let ratio = "normal";
|
|
9
|
-
export let snap = "auto";
|
|
10
9
|
export let click: (...args: any) => void;
|
|
11
10
|
export let options: any = undefined;
|
|
12
11
|
export let target: any = undefined;
|
|
@@ -67,10 +66,9 @@
|
|
|
67
66
|
}}
|
|
68
67
|
{disabled}
|
|
69
68
|
class="main style-{style}"
|
|
70
|
-
class:px-4={ratio === "normal"}
|
|
71
|
-
class:px-1={ratio === "box"}
|
|
72
69
|
class:w-full={snap === "full"}
|
|
73
70
|
class:w-fit={snap === "auto"}
|
|
71
|
+
class:w-wide={snap === "wide"}
|
|
74
72
|
class:grouped
|
|
75
73
|
>
|
|
76
74
|
<span>{text}</span>
|
|
@@ -105,11 +103,11 @@
|
|
|
105
103
|
|
|
106
104
|
button {
|
|
107
105
|
cursor: pointer;
|
|
108
|
-
border-radius:
|
|
106
|
+
border-radius: var(--radius);
|
|
109
107
|
overflow: hidden;
|
|
110
108
|
text-overflow: ellipsis;
|
|
111
109
|
white-space: nowrap;
|
|
112
|
-
padding: 0.
|
|
110
|
+
padding: 0.5rem;
|
|
113
111
|
|
|
114
112
|
font-family: inherit;
|
|
115
113
|
font-feature-settings: inherit;
|
|
@@ -132,16 +130,16 @@
|
|
|
132
130
|
width: 100%;
|
|
133
131
|
}
|
|
134
132
|
|
|
133
|
+
button.w-wide {
|
|
134
|
+
width: 10em;
|
|
135
|
+
height: 3em;
|
|
136
|
+
}
|
|
137
|
+
|
|
135
138
|
button.w-fit {
|
|
136
139
|
width: -moz-fit-content;
|
|
137
140
|
width: fit-content;
|
|
138
141
|
}
|
|
139
142
|
|
|
140
|
-
button.px-4 {
|
|
141
|
-
padding-left: 1rem;
|
|
142
|
-
padding-right: 1rem;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
143
|
button:focus {
|
|
146
144
|
outline: var(--focus-outline);
|
|
147
145
|
outline-offset: var(--focus-offset);
|
|
@@ -157,24 +155,24 @@
|
|
|
157
155
|
}
|
|
158
156
|
|
|
159
157
|
button.style-normal {
|
|
160
|
-
color: var(--foreground
|
|
158
|
+
color: var(--foreground);
|
|
161
159
|
background-color: var(--background-muted);
|
|
162
|
-
border: 1px solid var(--
|
|
160
|
+
border: 1px solid var(--foreground-soft);
|
|
163
161
|
}
|
|
164
162
|
|
|
165
163
|
button.style-normal:hover {
|
|
166
|
-
background-color: var(--background
|
|
164
|
+
background-color: var(--background);
|
|
167
165
|
}
|
|
168
166
|
|
|
169
167
|
button.style-normal:disabled {
|
|
170
168
|
color: var(--foreground-disabled);
|
|
171
169
|
background-color: var(--background-soft);
|
|
172
|
-
border:
|
|
170
|
+
border: var(--border-thickness) solid var(--background-soft);
|
|
173
171
|
}
|
|
174
172
|
|
|
175
173
|
button.style-outlined {
|
|
176
174
|
background-color: var(--background-muted);
|
|
177
|
-
border:
|
|
175
|
+
border: var(--border-thickness) solid var(--accent);
|
|
178
176
|
color: var(--foreground-muted);
|
|
179
177
|
}
|
|
180
178
|
|
|
@@ -186,16 +184,17 @@
|
|
|
186
184
|
button.style-outlined:disabled {
|
|
187
185
|
background-color: var(--background-muted);
|
|
188
186
|
color: var(--foreground-disabled);
|
|
189
|
-
border:
|
|
187
|
+
border: var(--border-thickness) solid var(--accent-soft);
|
|
190
188
|
}
|
|
191
189
|
|
|
192
190
|
button.style-accept {
|
|
193
191
|
color: var(--foreground);
|
|
194
|
-
background-color: var(--accent);
|
|
192
|
+
background-color: var(--accent-soft);
|
|
193
|
+
border: var(--border-thickness) solid var(--accent-muted);
|
|
195
194
|
}
|
|
196
195
|
|
|
197
196
|
button.style-accept:hover {
|
|
198
|
-
background-color: var(--accent
|
|
197
|
+
background-color: var(--accent);
|
|
199
198
|
}
|
|
200
199
|
|
|
201
200
|
button.style-accept:disabled {
|
|
@@ -14,12 +14,11 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
14
14
|
declare const MoltenPushButton: $$__sveltets_2_IsomorphicComponent<{
|
|
15
15
|
text?: string;
|
|
16
16
|
style?: "normal" | "outlined" | "accept";
|
|
17
|
+
snap?: "auto" | "full" | "wide";
|
|
17
18
|
disabled?: boolean;
|
|
18
19
|
popup?: {
|
|
19
20
|
duration?: number;
|
|
20
21
|
} | undefined;
|
|
21
|
-
ratio?: string;
|
|
22
|
-
snap?: string;
|
|
23
22
|
click: (...args: any) => void;
|
|
24
23
|
options?: any;
|
|
25
24
|
target?: any;
|
|
@@ -312,14 +312,14 @@
|
|
|
312
312
|
</Popover>
|
|
313
313
|
{/key}
|
|
314
314
|
|
|
315
|
-
<style
|
|
315
|
+
<style>
|
|
316
316
|
div.tooltip-container {
|
|
317
317
|
background-color: var(--popover-background);
|
|
318
318
|
cursor: default;
|
|
319
319
|
display: flex;
|
|
320
320
|
flex-direction: column;
|
|
321
321
|
position: relative;
|
|
322
|
-
border-radius:
|
|
322
|
+
border-radius: 0em;
|
|
323
323
|
z-index: 99;
|
|
324
324
|
padding: 0.25rem;
|
|
325
325
|
outline: 1px dashed transparent;
|
package/dist/SvgIcon.svelte
CHANGED
|
@@ -2,14 +2,23 @@
|
|
|
2
2
|
import iconMap from "./icons";
|
|
3
3
|
|
|
4
4
|
export let iconPath: string = "";
|
|
5
|
-
export let width: number =
|
|
6
|
-
export let height: number =
|
|
5
|
+
export let width: number = 1.2;
|
|
6
|
+
export let height: number = 1.2;
|
|
7
7
|
export let fill: string | undefined = undefined;
|
|
8
|
+
export let iconData: string | undefined = undefined;
|
|
9
|
+
export let scale: number = 1;
|
|
8
10
|
</script>
|
|
9
11
|
|
|
10
|
-
<svg
|
|
12
|
+
<svg
|
|
13
|
+
style:fill
|
|
14
|
+
style:width={`${width}em`}
|
|
15
|
+
style:height={`${height}em`}
|
|
16
|
+
style:transform={`scale(${scale})`}
|
|
17
|
+
>
|
|
11
18
|
<g>
|
|
12
|
-
{#if
|
|
19
|
+
{#if iconData}
|
|
20
|
+
{@html iconData}
|
|
21
|
+
{:else if iconMap[iconPath]}
|
|
13
22
|
{@html iconMap[iconPath]}
|
|
14
23
|
{:else}
|
|
15
24
|
<text x="10" y="20">Icon not found: {iconPath}</text>
|
package/dist/SvgIcon.svelte.d.ts
CHANGED
package/dist/Toggle.svelte
CHANGED
|
@@ -13,12 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
|
-
<
|
|
17
|
-
{#if title}
|
|
18
|
-
<span class="toggle-label">
|
|
19
|
-
{title}
|
|
20
|
-
</span>
|
|
21
|
-
{/if}
|
|
16
|
+
<label class="toggle-container" class:disabled>
|
|
22
17
|
<input
|
|
23
18
|
data-testid={testid}
|
|
24
19
|
type="checkbox"
|
|
@@ -34,16 +29,31 @@
|
|
|
34
29
|
}
|
|
35
30
|
}}
|
|
36
31
|
/>
|
|
37
|
-
|
|
32
|
+
{#if title}
|
|
33
|
+
<span class="toggle-label" class:disabled>
|
|
34
|
+
{title}
|
|
35
|
+
</span>
|
|
36
|
+
{/if}
|
|
37
|
+
</label>
|
|
38
38
|
|
|
39
39
|
<style>
|
|
40
40
|
.toggle-container {
|
|
41
41
|
display: flex;
|
|
42
42
|
align-items: center;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
color: var(--foreground-muted);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.toggle-container.disabled {
|
|
48
|
+
cursor: default;
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
.toggle-label {
|
|
46
|
-
margin-
|
|
52
|
+
margin-left: 0.75em;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.toggle-label.disabled {
|
|
56
|
+
color: var(--foreground-disabled);
|
|
47
57
|
}
|
|
48
58
|
|
|
49
59
|
input[type="checkbox"] {
|
|
@@ -61,9 +71,9 @@
|
|
|
61
71
|
}
|
|
62
72
|
|
|
63
73
|
.toggle {
|
|
64
|
-
--toggle-height: 1.
|
|
74
|
+
--toggle-height: 1.5em;
|
|
65
75
|
--toggle-padding: 0.25em;
|
|
66
|
-
--toggle-border:
|
|
76
|
+
--toggle-border: 1px;
|
|
67
77
|
--toggle-knob-size: calc(
|
|
68
78
|
var(--toggle-height) - 2 * var(--toggle-padding) - 2 *
|
|
69
79
|
var(--toggle-border)
|
|
@@ -76,13 +86,13 @@
|
|
|
76
86
|
|
|
77
87
|
height: var(--toggle-height);
|
|
78
88
|
width: var(--toggle-width);
|
|
79
|
-
border-radius:
|
|
89
|
+
border-radius: var(--radius);
|
|
80
90
|
display: inline-block;
|
|
81
91
|
position: relative;
|
|
82
92
|
margin: 0;
|
|
83
|
-
border: var(--toggle-border) solid var(--
|
|
93
|
+
border: var(--toggle-border) solid var(--border);
|
|
84
94
|
background-color: var(--background-muted);
|
|
85
|
-
transition:
|
|
95
|
+
transition: background-color 0.2s ease;
|
|
86
96
|
pointer-events: auto;
|
|
87
97
|
box-sizing: border-box;
|
|
88
98
|
}
|
|
@@ -94,7 +104,7 @@
|
|
|
94
104
|
left: var(--toggle-padding);
|
|
95
105
|
width: var(--toggle-knob-size);
|
|
96
106
|
height: var(--toggle-knob-size);
|
|
97
|
-
border-radius:
|
|
107
|
+
border-radius: var(--radius);
|
|
98
108
|
background-color: var(--foreground-muted);
|
|
99
109
|
transition:
|
|
100
110
|
transform 0.15s ease-out,
|
|
@@ -102,11 +112,12 @@
|
|
|
102
112
|
}
|
|
103
113
|
|
|
104
114
|
.toggle:checked {
|
|
105
|
-
|
|
115
|
+
background-color: var(--accent-soft);
|
|
106
116
|
}
|
|
107
117
|
|
|
108
118
|
.toggle:checked::after {
|
|
109
119
|
transform: translateX(var(--toggle-translate));
|
|
120
|
+
background-color: var(--foreground-muted);
|
|
110
121
|
}
|
|
111
122
|
|
|
112
123
|
.toggle:disabled {
|
|
@@ -118,6 +129,6 @@
|
|
|
118
129
|
}
|
|
119
130
|
|
|
120
131
|
.toggle:checked:disabled {
|
|
121
|
-
|
|
132
|
+
background-color: var(--background-muted);
|
|
122
133
|
}
|
|
123
134
|
</style>
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export { default as MeltSelect } from "./MeltSelect.svelte";
|
|
|
10
10
|
export { default as MoltenInput } from "./MoltenInput.svelte";
|
|
11
11
|
export { default as MoltenTooltip } from "./MoltenTooltip.svelte";
|
|
12
12
|
export { default as MoltenPushButton } from "./MoltenPushButton.svelte";
|
|
13
|
-
export { default as MoltenPushButtonDropdown } from "./MoltenPushButtonDropdown.svelte";
|
|
14
13
|
export { default as MoltenPushButtonGroup } from "./MoltenPushButtonGroup.svelte";
|
|
15
14
|
export { contextMenu, contextTarget, type ContextMenuOptions, } from "./context-target";
|
|
16
15
|
export { default as SvgIcon } from "./SvgIcon.svelte";
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,6 @@ export { default as MeltSelect } from "./MeltSelect.svelte";
|
|
|
10
10
|
export { default as MoltenInput } from "./MoltenInput.svelte";
|
|
11
11
|
export { default as MoltenTooltip } from "./MoltenTooltip.svelte";
|
|
12
12
|
export { default as MoltenPushButton } from "./MoltenPushButton.svelte";
|
|
13
|
-
export { default as MoltenPushButtonDropdown } from "./MoltenPushButtonDropdown.svelte";
|
|
14
13
|
export { default as MoltenPushButtonGroup } from "./MoltenPushButtonGroup.svelte";
|
|
15
14
|
export { contextMenu, contextTarget, } from "./context-target";
|
|
16
15
|
export { default as SvgIcon } from "./SvgIcon.svelte";
|
package/dist/theme.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--foreground: #
|
|
3
|
-
--background: #
|
|
2
|
+
--foreground: #e3e3e3;
|
|
3
|
+
--background: #1f1f1f;
|
|
4
4
|
--shadow: #000;
|
|
5
5
|
|
|
6
6
|
--foreground-muted: color-mix(
|
|
@@ -22,15 +22,16 @@
|
|
|
22
22
|
--background-muted: color-mix(in srgb, var(--background), var(--shadow) 20%);
|
|
23
23
|
--background-soft: color-mix(in srgb, var(--background), var(--shadow) 50%);
|
|
24
24
|
|
|
25
|
+
--border: #6a6a6a;
|
|
25
26
|
--accent: #0ba484;
|
|
26
27
|
--accent-muted: color-mix(in srgb, var(--accent), var(--shadow) 30%);
|
|
27
28
|
--accent-soft: color-mix(in srgb, var(--accent), var(--shadow) 50%);
|
|
28
29
|
|
|
29
|
-
--focus: #
|
|
30
|
+
--focus: #ffffff6a;
|
|
30
31
|
--focus-outline: 1px solid var(--focus);
|
|
31
32
|
--focus-offset: 1px;
|
|
32
33
|
|
|
33
|
-
--error: #
|
|
34
|
+
--error: #ff0000;
|
|
34
35
|
|
|
35
36
|
--popover-background: color-mix(
|
|
36
37
|
in srgb,
|
|
@@ -40,17 +41,75 @@
|
|
|
40
41
|
|
|
41
42
|
--popover-selection: var(--background-muted);
|
|
42
43
|
--popover-reference: var(--background-soft);
|
|
44
|
+
|
|
45
|
+
--radius: 0em;
|
|
46
|
+
--border-thickness: 1px;
|
|
43
47
|
}
|
|
44
48
|
|
|
45
|
-
html[color-scheme="
|
|
46
|
-
--foreground: #
|
|
47
|
-
--background: #
|
|
49
|
+
html[color-scheme="moss"] {
|
|
50
|
+
--foreground: #24352c;
|
|
51
|
+
--background: #e1ebdf;
|
|
52
|
+
--shadow: #8ca08d;
|
|
53
|
+
|
|
54
|
+
--border: #6e8473;
|
|
55
|
+
--accent: #16735f;
|
|
56
|
+
--focus: #16735f80;
|
|
57
|
+
--error: #af4355;
|
|
58
|
+
|
|
59
|
+
--foreground-disabled: #5c715f;
|
|
60
|
+
--background-soft: #b7c9b5;
|
|
61
|
+
|
|
48
62
|
--popover-background: color-mix(
|
|
49
63
|
in srgb,
|
|
50
64
|
var(--background),
|
|
51
65
|
rgba(255, 255, 255, 1) 70%
|
|
52
66
|
);
|
|
53
|
-
|
|
67
|
+
|
|
68
|
+
--popover-selection: var(--background-soft);
|
|
69
|
+
--popover-reference: var(--background-muted);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
html[color-scheme="sunset"] {
|
|
73
|
+
--foreground: #30194d;
|
|
74
|
+
--background: #fffaf2;
|
|
75
|
+
--shadow: #76519a;
|
|
76
|
+
|
|
77
|
+
--border: #69458b;
|
|
78
|
+
--accent: #e76f2d;
|
|
79
|
+
--focus: #69458b80;
|
|
80
|
+
--error: #bd3b4c;
|
|
81
|
+
|
|
82
|
+
--foreground-disabled: #c7bcd2;
|
|
83
|
+
--background-soft: #d2cac0;
|
|
84
|
+
|
|
85
|
+
--popover-background: color-mix(
|
|
86
|
+
in srgb,
|
|
87
|
+
var(--background),
|
|
88
|
+
rgba(255, 255, 255, 1) 78%
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
--popover-selection: var(--background-soft);
|
|
92
|
+
--popover-reference: var(--background-muted);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
html[color-scheme="icy"] {
|
|
96
|
+
--foreground: #000000;
|
|
97
|
+
--background: #ffffff;
|
|
98
|
+
--shadow: #3d5899;
|
|
99
|
+
|
|
100
|
+
--border: #5d8d9b;
|
|
101
|
+
--accent: #087ea4;
|
|
102
|
+
--focus: #087ea480;
|
|
103
|
+
--error: #b74c61;
|
|
104
|
+
|
|
105
|
+
--foreground-disabled: #818282;
|
|
106
|
+
--background-soft: #d1f6fe;
|
|
107
|
+
|
|
108
|
+
--popover-background: color-mix(
|
|
109
|
+
in srgb,
|
|
110
|
+
var(--background),
|
|
111
|
+
rgba(255, 255, 255, 1) 82%
|
|
112
|
+
);
|
|
54
113
|
|
|
55
114
|
--popover-selection: var(--background-soft);
|
|
56
115
|
--popover-reference: var(--background-muted);
|
package/package.json
CHANGED
package/src/lib/theme.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--foreground: #
|
|
3
|
-
--background: #
|
|
2
|
+
--foreground: #e3e3e3;
|
|
3
|
+
--background: #1f1f1f;
|
|
4
4
|
--shadow: #000;
|
|
5
5
|
|
|
6
6
|
--foreground-muted: color-mix(
|
|
@@ -22,15 +22,16 @@
|
|
|
22
22
|
--background-muted: color-mix(in srgb, var(--background), var(--shadow) 20%);
|
|
23
23
|
--background-soft: color-mix(in srgb, var(--background), var(--shadow) 50%);
|
|
24
24
|
|
|
25
|
+
--border: #6a6a6a;
|
|
25
26
|
--accent: #0ba484;
|
|
26
27
|
--accent-muted: color-mix(in srgb, var(--accent), var(--shadow) 30%);
|
|
27
28
|
--accent-soft: color-mix(in srgb, var(--accent), var(--shadow) 50%);
|
|
28
29
|
|
|
29
|
-
--focus: #
|
|
30
|
+
--focus: #ffffff6a;
|
|
30
31
|
--focus-outline: 1px solid var(--focus);
|
|
31
32
|
--focus-offset: 1px;
|
|
32
33
|
|
|
33
|
-
--error: #
|
|
34
|
+
--error: #ff0000;
|
|
34
35
|
|
|
35
36
|
--popover-background: color-mix(
|
|
36
37
|
in srgb,
|
|
@@ -40,17 +41,75 @@
|
|
|
40
41
|
|
|
41
42
|
--popover-selection: var(--background-muted);
|
|
42
43
|
--popover-reference: var(--background-soft);
|
|
44
|
+
|
|
45
|
+
--radius: 0em;
|
|
46
|
+
--border-thickness: 1px;
|
|
43
47
|
}
|
|
44
48
|
|
|
45
|
-
html[color-scheme="
|
|
46
|
-
--foreground: #
|
|
47
|
-
--background: #
|
|
49
|
+
html[color-scheme="moss"] {
|
|
50
|
+
--foreground: #24352c;
|
|
51
|
+
--background: #e1ebdf;
|
|
52
|
+
--shadow: #8ca08d;
|
|
53
|
+
|
|
54
|
+
--border: #6e8473;
|
|
55
|
+
--accent: #16735f;
|
|
56
|
+
--focus: #16735f80;
|
|
57
|
+
--error: #af4355;
|
|
58
|
+
|
|
59
|
+
--foreground-disabled: #5c715f;
|
|
60
|
+
--background-soft: #b7c9b5;
|
|
61
|
+
|
|
48
62
|
--popover-background: color-mix(
|
|
49
63
|
in srgb,
|
|
50
64
|
var(--background),
|
|
51
65
|
rgba(255, 255, 255, 1) 70%
|
|
52
66
|
);
|
|
53
|
-
|
|
67
|
+
|
|
68
|
+
--popover-selection: var(--background-soft);
|
|
69
|
+
--popover-reference: var(--background-muted);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
html[color-scheme="sunset"] {
|
|
73
|
+
--foreground: #30194d;
|
|
74
|
+
--background: #fffaf2;
|
|
75
|
+
--shadow: #76519a;
|
|
76
|
+
|
|
77
|
+
--border: #69458b;
|
|
78
|
+
--accent: #e76f2d;
|
|
79
|
+
--focus: #69458b80;
|
|
80
|
+
--error: #bd3b4c;
|
|
81
|
+
|
|
82
|
+
--foreground-disabled: #c7bcd2;
|
|
83
|
+
--background-soft: #d2cac0;
|
|
84
|
+
|
|
85
|
+
--popover-background: color-mix(
|
|
86
|
+
in srgb,
|
|
87
|
+
var(--background),
|
|
88
|
+
rgba(255, 255, 255, 1) 78%
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
--popover-selection: var(--background-soft);
|
|
92
|
+
--popover-reference: var(--background-muted);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
html[color-scheme="icy"] {
|
|
96
|
+
--foreground: #000000;
|
|
97
|
+
--background: #ffffff;
|
|
98
|
+
--shadow: #3d5899;
|
|
99
|
+
|
|
100
|
+
--border: #5d8d9b;
|
|
101
|
+
--accent: #087ea4;
|
|
102
|
+
--focus: #087ea480;
|
|
103
|
+
--error: #b74c61;
|
|
104
|
+
|
|
105
|
+
--foreground-disabled: #818282;
|
|
106
|
+
--background-soft: #d1f6fe;
|
|
107
|
+
|
|
108
|
+
--popover-background: color-mix(
|
|
109
|
+
in srgb,
|
|
110
|
+
var(--background),
|
|
111
|
+
rgba(255, 255, 255, 1) 82%
|
|
112
|
+
);
|
|
54
113
|
|
|
55
114
|
--popover-selection: var(--background-soft);
|
|
56
115
|
--popover-reference: var(--background-muted);
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { tick } from "svelte";
|
|
3
|
-
|
|
4
|
-
export let options;
|
|
5
|
-
export let style: "normal" | "outlined" | "accept" = "normal";
|
|
6
|
-
export let disabled: boolean = false;
|
|
7
|
-
export let target: any;
|
|
8
|
-
export let menuWidth: number = 0;
|
|
9
|
-
export let width = 0;
|
|
10
|
-
|
|
11
|
-
import { writable } from "svelte/store";
|
|
12
|
-
import { createSelect, melt } from "@melt-ui/svelte";
|
|
13
|
-
|
|
14
|
-
let windowWidth = 0;
|
|
15
|
-
|
|
16
|
-
async function updateWidth() {
|
|
17
|
-
if (element) {
|
|
18
|
-
await tick();
|
|
19
|
-
requestAnimationFrame(() => {
|
|
20
|
-
if (element) {
|
|
21
|
-
width = element.offsetWidth;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
$: (element, windowWidth, updateWidth());
|
|
28
|
-
|
|
29
|
-
const customOpen = writable(false);
|
|
30
|
-
|
|
31
|
-
function getDefaultSelected() {
|
|
32
|
-
if (typeof options === "undefined") {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const obj = options.find((e) => e.value === target);
|
|
37
|
-
return { label: obj?.title, value: obj?.value };
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const {
|
|
41
|
-
elements: { trigger, menu, option },
|
|
42
|
-
states: { selected, selectedLabel, open },
|
|
43
|
-
helpers: { isSelected },
|
|
44
|
-
} = createSelect({
|
|
45
|
-
open: customOpen,
|
|
46
|
-
disabled: disabled,
|
|
47
|
-
forceVisible: true,
|
|
48
|
-
positioning: {
|
|
49
|
-
placement: "bottom-start",
|
|
50
|
-
fitViewport: true,
|
|
51
|
-
},
|
|
52
|
-
defaultSelected: getDefaultSelected(),
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
$: if ($selected) {
|
|
56
|
-
handleSelectionChange();
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
$: if (target) {
|
|
60
|
-
handleTargetChange();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function handleTargetChange() {
|
|
64
|
-
if ($selected.value === target) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const obj = options.find((e) => e.value === target);
|
|
69
|
-
selected.set({ label: obj?.title, value: obj?.value });
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function handleSelectionChange() {
|
|
73
|
-
if ($selected.value === target) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
target = $selected.value;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
let element: HTMLButtonElement;
|
|
80
|
-
|
|
81
|
-
export function focus() {
|
|
82
|
-
element?.focus();
|
|
83
|
-
}
|
|
84
|
-
</script>
|
|
85
|
-
|
|
86
|
-
<svelte:window bind:innerWidth={windowWidth} />
|
|
87
|
-
|
|
88
|
-
<div
|
|
89
|
-
class="dropdown-container"
|
|
90
|
-
style={menuWidth > 0 ? `margin-left: -${menuWidth}px;` : ""}
|
|
91
|
-
>
|
|
92
|
-
<div {...$trigger} use:trigger style="display: inline-flex;">
|
|
93
|
-
<button
|
|
94
|
-
bind:this={element}
|
|
95
|
-
on:click={(e) => {
|
|
96
|
-
e.stopPropagation();
|
|
97
|
-
$customOpen = !$customOpen;
|
|
98
|
-
}}
|
|
99
|
-
{disabled}
|
|
100
|
-
class="dropdown-button style-{style}"
|
|
101
|
-
class:grouped={menuWidth > 0}
|
|
102
|
-
style={menuWidth > 0 ? `padding-left: ${menuWidth}px;` : ""}
|
|
103
|
-
>
|
|
104
|
-
▼
|
|
105
|
-
</button>
|
|
106
|
-
|
|
107
|
-
{#if $open}
|
|
108
|
-
<div
|
|
109
|
-
{...$menu}
|
|
110
|
-
use:menu
|
|
111
|
-
class="menu"
|
|
112
|
-
style={`min-width: ${menuWidth > 0 ? menuWidth : width}px;`}
|
|
113
|
-
>
|
|
114
|
-
{#each options as item}
|
|
115
|
-
<div
|
|
116
|
-
{...$option({ value: item.value, label: item.title })}
|
|
117
|
-
use:option
|
|
118
|
-
class="option"
|
|
119
|
-
class:option-selected={$isSelected(item.value)}
|
|
120
|
-
>
|
|
121
|
-
{item.title}
|
|
122
|
-
</div>
|
|
123
|
-
{/each}
|
|
124
|
-
</div>
|
|
125
|
-
{/if}
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
<style>
|
|
130
|
-
.dropdown-container {
|
|
131
|
-
position: relative;
|
|
132
|
-
display: inline-flex;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.menu {
|
|
136
|
-
background-color: var(--popover-background);
|
|
137
|
-
color: var(--foreground-muted);
|
|
138
|
-
border: 1px solid var(--foreground-muted);
|
|
139
|
-
border-radius: 0.25rem;
|
|
140
|
-
z-index: 40;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
div.option {
|
|
144
|
-
cursor: pointer;
|
|
145
|
-
padding: 0.5rem;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
div.option:hover {
|
|
149
|
-
background-color: var(--popover-selection);
|
|
150
|
-
color: var(--foreground);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
div.option-selected {
|
|
154
|
-
background-color: var(--popover-reference);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.dropdown-button {
|
|
158
|
-
cursor: pointer;
|
|
159
|
-
border-radius: 0.25rem;
|
|
160
|
-
overflow: hidden;
|
|
161
|
-
text-overflow: ellipsis;
|
|
162
|
-
white-space: nowrap;
|
|
163
|
-
padding: 0.25rem;
|
|
164
|
-
display: flex;
|
|
165
|
-
align-items: center;
|
|
166
|
-
justify-content: center;
|
|
167
|
-
min-width: 1.5rem;
|
|
168
|
-
|
|
169
|
-
font-family: inherit;
|
|
170
|
-
font-feature-settings: inherit;
|
|
171
|
-
font-variation-settings: inherit;
|
|
172
|
-
font-size: 100%;
|
|
173
|
-
font-weight: inherit;
|
|
174
|
-
line-height: inherit;
|
|
175
|
-
letter-spacing: inherit;
|
|
176
|
-
color: inherit;
|
|
177
|
-
margin: 0;
|
|
178
|
-
text-transform: none;
|
|
179
|
-
background-color: transparent;
|
|
180
|
-
border: 1px solid transparent;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.dropdown-button:disabled {
|
|
184
|
-
cursor: default;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.dropdown-button:focus {
|
|
188
|
-
outline: var(--focus-outline);
|
|
189
|
-
outline-offset: var(--focus-offset);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.dropdown-button.grouped {
|
|
193
|
-
border-top-left-radius: 0;
|
|
194
|
-
border-bottom-left-radius: 0;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/* Style variants */
|
|
198
|
-
.dropdown-button.style-normal {
|
|
199
|
-
color: var(--foreground-muted);
|
|
200
|
-
background-color: var(--background-muted);
|
|
201
|
-
border: 1px solid var(--background-soft);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.dropdown-button.style-normal:hover {
|
|
205
|
-
background-color: var(--background-soft);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.dropdown-button.style-normal:disabled {
|
|
209
|
-
color: var(--foreground-disabled);
|
|
210
|
-
background-color: var(--background-soft);
|
|
211
|
-
border: 1px solid var(--background-soft);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.dropdown-button.style-outlined {
|
|
215
|
-
background-color: var(--background-muted);
|
|
216
|
-
border: 1px solid var(--accent);
|
|
217
|
-
color: var(--foreground-muted);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.dropdown-button.style-outlined:hover {
|
|
221
|
-
background-color: var(--accent-soft);
|
|
222
|
-
border-color: var(--accent-muted);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.dropdown-button.style-outlined:disabled {
|
|
226
|
-
background-color: var(--background-muted);
|
|
227
|
-
color: var(--foreground-disabled);
|
|
228
|
-
border: 1px solid var(--accent);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.dropdown-button.style-accept {
|
|
232
|
-
color: var(--foreground);
|
|
233
|
-
background-color: var(--accent);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.dropdown-button.style-accept:hover {
|
|
237
|
-
background-color: var(--accent-soft);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.dropdown-button.style-accept:disabled {
|
|
241
|
-
color: var(--foreground-disabled);
|
|
242
|
-
background-color: var(--accent-soft);
|
|
243
|
-
}
|
|
244
|
-
</style>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const MoltenPushButtonDropdown: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
-
options: any;
|
|
16
|
-
style?: "normal" | "outlined" | "accept";
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
target: any;
|
|
19
|
-
menuWidth?: number;
|
|
20
|
-
width?: number;
|
|
21
|
-
focus?: () => void;
|
|
22
|
-
}, {
|
|
23
|
-
[evt: string]: CustomEvent<any>;
|
|
24
|
-
}, {}, {
|
|
25
|
-
focus: () => void;
|
|
26
|
-
}, string>;
|
|
27
|
-
type MoltenPushButtonDropdown = InstanceType<typeof MoltenPushButtonDropdown>;
|
|
28
|
-
export default MoltenPushButtonDropdown;
|