compote-ui 0.0.5 → 0.0.6

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.
@@ -1,20 +1,24 @@
1
1
  <script lang="ts">
2
2
  import { Checkbox } from '@ark-ui/svelte/checkbox';
3
3
  import type { CheckboxProps as Props } from './checkbox-props.js';
4
- import CheckBold from '../../icons/CheckBold.svelte';
4
+ import PhCheck from '../../icons/CheckBold.svelte';
5
5
 
6
- let { label, children, ...rest }: Props = $props();
6
+ let { checked = $bindable(), label, children, ...rest }: Props = $props();
7
7
  </script>
8
8
 
9
- <Checkbox.Root class="inline-flex cursor-pointer items-start gap-2" {...rest}>
10
- <Checkbox.Control class="mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-sm border border-border bg-transparent transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 data-focus-visible:outline-2 data-focus-visible:outline-offset-2 data-focus-visible:outline-ring data-[state=checked]:border-primary data-[state=checked]:bg-primary">
9
+ <Checkbox.Root bind:checked class="inline-flex cursor-pointer items-start gap-2" {...rest}>
10
+ <Checkbox.Control
11
+ class="mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-sm border border-border bg-transparent transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 data-focus-visible:outline-2 data-focus-visible:outline-offset-2 data-focus-visible:outline-ring data-[state=checked]:border-primary data-[state=checked]:bg-primary"
12
+ >
11
13
  <Checkbox.Indicator>
12
- <CheckBold class="size-3.5 text-primary-foreground" />
14
+ <PhCheck class="size-3.5 text-primary-foreground" />
13
15
  </Checkbox.Indicator>
14
16
  </Checkbox.Control>
15
17
  {#if label}
16
18
  <div class="flex flex-col gap-0.5">
17
- <Checkbox.Label class="select-none text-base text-foreground data-disabled:opacity-50">{label}</Checkbox.Label>
19
+ <Checkbox.Label class="text-base text-foreground select-none data-disabled:opacity-50"
20
+ >{label}</Checkbox.Label
21
+ >
18
22
  {#if children}
19
23
  <span class="text-sm text-foreground/60">{@render children()}</span>
20
24
  {/if}
@@ -1,5 +1,5 @@
1
1
  import { Checkbox } from '@ark-ui/svelte/checkbox';
2
2
  import type { CheckboxProps as Props } from './checkbox-props.ts';
3
- declare const Checkbox: import("svelte").Component<Props, {}, "">;
3
+ declare const Checkbox: import("svelte").Component<Props, {}, "checked">;
4
4
  type Checkbox = ReturnType<typeof Checkbox>;
5
5
  export default Checkbox;
@@ -3,5 +3,8 @@
3
3
  </script>
4
4
 
5
5
  <svg class={cls} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" {...rest}>
6
- <path fill="currentColor" d="m232.49 80.49l-128 128a12 12 0 0 1-17 0l-56-56a12 12 0 1 1 17-17L96 183L215.51 63.51a12 12 0 0 1 17 17Z" />
6
+ <path
7
+ fill="currentColor"
8
+ d="m232.49 80.49l-128 128a12 12 0 0 1-17 0l-56-56a12 12 0 1 1 17-17L96 183L215.51 63.51a12 12 0 0 1 17 17Z"
9
+ />
7
10
  </svg>
@@ -0,0 +1,17 @@
1
+ <script lang="ts">
2
+ let { class: cls = '', ...restProps } = $props();
3
+ </script>
4
+
5
+ <!-- Icon from Phosphor by Phosphor Icons - https://github.com/phosphor-icons/core/blob/main/LICENSE -->
6
+ <svg
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ width="1em"
9
+ height="1em"
10
+ viewBox="0 0 256 256"
11
+ {...restProps}
12
+ >
13
+ <path
14
+ fill="#888888"
15
+ d="m229.66 77.66l-128 128a8 8 0 0 1-11.32 0l-56-56a8 8 0 0 1 11.32-11.32L96 188.69L218.34 66.34a8 8 0 0 1 11.32 11.32"
16
+ />
17
+ </svg>
@@ -0,0 +1,5 @@
1
+ declare const PhCheck: import("svelte").Component<{
2
+ class?: string;
3
+ } & Record<string, any>, {}, "">;
4
+ type PhCheck = ReturnType<typeof PhCheck>;
5
+ export default PhCheck;
package/dist/theme.css CHANGED
@@ -1,4 +1,6 @@
1
1
  :root {
2
+ --radius: 6px;
3
+
2
4
  --background: oklch(0.9885 0.0057 84.5659);
3
5
  --foreground: oklch(0.366 0.0251 49.6085);
4
6
  --card: oklch(0.9686 0.0091 78.2818);
@@ -21,7 +23,6 @@
21
23
  --font-sans: 'Wix Madefor Text Variable', sans-serif;
22
24
  --font-serif: Merriweather, serif;
23
25
  --font-mono: Fira Code, monospace;
24
- --radius: 0.3rem;
25
26
  }
26
27
 
27
28
  @media (prefers-color-scheme: dark) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compote-ui",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",