@celar-ui/svelte 1.2.1 → 1.2.3
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/containment/SurfaceContainer.svelte +2 -2
- package/dist/containment/SurfaceContainer.svelte.d.ts +1 -1
- package/dist/containment/styles/surface-container.scss +9 -3
- package/dist/inputs/Slider.svelte +6 -1
- package/dist/overlay/MinimalSurfaceDialog.svelte +3 -3
- package/dist/overlay/MinimalSurfaceDialog.svelte.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import Container, { type ContainerProps } from './Container.svelte';
|
|
4
4
|
|
|
5
5
|
export interface SurfaceContainerProps extends ContainerProps {
|
|
6
|
-
elevated?: 0 | 1 | 2 | 3 | 4;
|
|
6
|
+
elevated?: 0 | 1 | 2 | 3 | 4 | 5;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
let { elevated =
|
|
9
|
+
let { elevated = 1, ...rest }: SurfaceContainerProps = $props();
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<Container {...rest} data-surface-container data-elevated={elevated} />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './styles/surface-container.scss';
|
|
2
2
|
import { type ContainerProps } from './Container.svelte';
|
|
3
3
|
export interface SurfaceContainerProps extends ContainerProps {
|
|
4
|
-
elevated?: 0 | 1 | 2 | 3 | 4;
|
|
4
|
+
elevated?: 0 | 1 | 2 | 3 | 4 | 5;
|
|
5
5
|
}
|
|
6
6
|
declare const SurfaceContainer: import("svelte").Component<SurfaceContainerProps, {}, "">;
|
|
7
7
|
type SurfaceContainer = ReturnType<typeof SurfaceContainer>;
|
|
@@ -6,16 +6,22 @@
|
|
|
6
6
|
// Default: Elevated 0
|
|
7
7
|
background-color: var(--color-background);
|
|
8
8
|
|
|
9
|
+
&[data-elevated='0'] {
|
|
10
|
+
--color-background: var(--color-surfaceContainerLowest);
|
|
11
|
+
}
|
|
9
12
|
&[data-elevated='1'] {
|
|
10
|
-
--color-background: var(--color-
|
|
13
|
+
--color-background: var(--color-surface);
|
|
11
14
|
}
|
|
12
15
|
&[data-elevated='2'] {
|
|
13
|
-
--color-background: var(--color-
|
|
16
|
+
--color-background: var(--color-surfaceContainerLow);
|
|
14
17
|
}
|
|
15
18
|
&[data-elevated='3'] {
|
|
16
|
-
--color-background: var(--color-
|
|
19
|
+
--color-background: var(--color-surfaceContainer);
|
|
17
20
|
}
|
|
18
21
|
&[data-elevated='4'] {
|
|
22
|
+
--color-background: var(--color-surfaceContainerHigh);
|
|
23
|
+
}
|
|
24
|
+
&[data-elevated='5'] {
|
|
19
25
|
--color-background: var(--color-surfaceContainerHighest);
|
|
20
26
|
}
|
|
21
27
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
3
3
|
|
|
4
|
-
let { value = $bindable(), min, max, ...rest }: HTMLInputAttributes = $props();
|
|
4
|
+
let { value = $bindable(), min, max, step, ...rest }: HTMLInputAttributes = $props();
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<div data-slider>
|
|
8
8
|
<input
|
|
9
9
|
type="range"
|
|
10
10
|
bind:value
|
|
11
|
+
{min}
|
|
12
|
+
{max}
|
|
13
|
+
{step}
|
|
11
14
|
style:--val={value || 0}
|
|
12
15
|
style:--min={min || 0}
|
|
13
16
|
style:--max={max || 100}
|
|
@@ -18,6 +21,8 @@
|
|
|
18
21
|
<style>[data-slider] {
|
|
19
22
|
position: relative;
|
|
20
23
|
padding: 0 var(--gap);
|
|
24
|
+
width: 100%;
|
|
25
|
+
box-sizing: border-box;
|
|
21
26
|
}
|
|
22
27
|
[data-slider] > input {
|
|
23
28
|
--range: calc(var(--max) - var(--min));
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
type MinimalSurfaceDialogProps = MinimalDialogProps & {
|
|
10
10
|
header?: Snippet;
|
|
11
11
|
footer?: Snippet;
|
|
12
|
-
elevated?: 0 | 1 | 2 | 3 | 4;
|
|
12
|
+
elevated?: 0 | 1 | 2 | 3 | 4 | 5;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
let {
|
|
16
|
-
open = $bindable(),
|
|
17
|
-
elevated,
|
|
16
|
+
open = $bindable(false),
|
|
17
|
+
elevated = 1,
|
|
18
18
|
children,
|
|
19
19
|
header,
|
|
20
20
|
footer,
|
|
@@ -6,7 +6,7 @@ import type { Snippet } from 'svelte';
|
|
|
6
6
|
type MinimalSurfaceDialogProps = MinimalDialogProps & {
|
|
7
7
|
header?: Snippet;
|
|
8
8
|
footer?: Snippet;
|
|
9
|
-
elevated?: 0 | 1 | 2 | 3 | 4;
|
|
9
|
+
elevated?: 0 | 1 | 2 | 3 | 4 | 5;
|
|
10
10
|
};
|
|
11
11
|
declare const MinimalSurfaceDialog: import("svelte").Component<MinimalSurfaceDialogProps, {}, "open">;
|
|
12
12
|
type MinimalSurfaceDialog = ReturnType<typeof MinimalSurfaceDialog>;
|