@celar-ui/svelte 1.2.0 → 1.2.2

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.
@@ -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 = 0, ...rest }: SurfaceContainerProps = $props();
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-surfaceContainerLow);
13
+ --color-background: var(--color-surface);
11
14
  }
12
15
  &[data-elevated='2'] {
13
- --color-background: var(--color-surfaceContainer);
16
+ --color-background: var(--color-surfaceContainerLow);
14
17
  }
15
18
  &[data-elevated='3'] {
16
- --color-background: var(--color-surfaceContainerHigh);
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
  }
@@ -9,14 +9,22 @@
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
- let { elevated, children, header, footer, ...rest }: MinimalSurfaceDialogProps = $props();
15
+ let {
16
+ open = $bindable(false),
17
+ elevated = 1,
18
+ children,
19
+ header,
20
+ footer,
21
+ ...rest
22
+ }: MinimalSurfaceDialogProps = $props();
16
23
  </script>
17
24
 
18
25
  <MinimalDialog
19
26
  {...rest}
27
+ bind:open
20
28
  data-surface-container
21
29
  data-minimal-surface-dialog
22
30
  data-elevated={elevated}
@@ -6,8 +6,8 @@ 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
- declare const MinimalSurfaceDialog: import("svelte").Component<MinimalSurfaceDialogProps, {}, "">;
11
+ declare const MinimalSurfaceDialog: import("svelte").Component<MinimalSurfaceDialogProps, {}, "open">;
12
12
  type MinimalSurfaceDialog = ReturnType<typeof MinimalSurfaceDialog>;
13
13
  export default MinimalSurfaceDialog;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celar-ui/svelte",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "cuikho210",