compote-ui 0.51.1 → 0.52.1
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.
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { QrCode, type QrCodeRootBaseProps } from '@ark-ui/svelte/qr-code';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
type Size = 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
+
|
|
7
|
+
interface Props extends QrCodeRootBaseProps {
|
|
8
|
+
size?: Size;
|
|
9
|
+
class?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const sizeMap: Record<Size, number> = {
|
|
13
|
+
sm: 80,
|
|
14
|
+
md: 120,
|
|
15
|
+
lg: 160,
|
|
16
|
+
xl: 200
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
let { size = 'md', class: className, ...restProps }: Props = $props();
|
|
20
|
+
|
|
21
|
+
const px = $derived(sizeMap[size]);
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<QrCode.Root {...restProps} class={cn('inline-flex flex-col', className)} style="--qr-size: {px}px">
|
|
25
|
+
<QrCode.Frame class="fill-current" style="width: var(--qr-size); height: var(--qr-size);">
|
|
26
|
+
<QrCode.Pattern />
|
|
27
|
+
</QrCode.Frame>
|
|
28
|
+
</QrCode.Root>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { QrCode, type QrCodeRootBaseProps } from '@ark-ui/svelte/qr-code';
|
|
2
|
+
type Size = 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
interface Props extends QrCodeRootBaseProps {
|
|
4
|
+
size?: Size;
|
|
5
|
+
class?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const QrCode: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type QrCode = ReturnType<typeof QrCode>;
|
|
9
|
+
export default QrCode;
|
package/dist/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export * as Listbox from './components/listbox';
|
|
|
36
36
|
export { default as NumberInput } from './components/number-input/number-input.svelte';
|
|
37
37
|
export type { NumberInputProps } from './components/number-input/types';
|
|
38
38
|
export * as Popover from './components/popover';
|
|
39
|
+
export { default as QrCode } from './components/qr-code/qr-code.svelte';
|
|
39
40
|
export { default as Select } from './components/select/select.svelte';
|
|
40
41
|
export { default as Splitter } from './components/splitter/splitter.svelte';
|
|
41
42
|
export type { SplitterPanelConfig, SplitterProps } from './components/splitter/types';
|
|
@@ -55,5 +56,5 @@ export type { PortalProps } from '@ark-ui/svelte/portal';
|
|
|
55
56
|
export { createListCollection, createTreeCollection } from './utils/collections';
|
|
56
57
|
export type { ListItem, TreeItem } from './utils/collections';
|
|
57
58
|
export type { ListCollection, TreeCollection } from '@ark-ui/svelte/collection';
|
|
58
|
-
export { PersistedState } from 'runed';
|
|
59
|
+
export { PersistedState, Debounced } from 'runed';
|
|
59
60
|
export { cn } from 'tailwind-variants';
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export { default as JsonTreeView } from './components/json-tree-view/json-tree-v
|
|
|
26
26
|
export * as Listbox from './components/listbox';
|
|
27
27
|
export { default as NumberInput } from './components/number-input/number-input.svelte';
|
|
28
28
|
export * as Popover from './components/popover';
|
|
29
|
+
export { default as QrCode } from './components/qr-code/qr-code.svelte';
|
|
29
30
|
export { default as Select } from './components/select/select.svelte';
|
|
30
31
|
export { default as Splitter } from './components/splitter/splitter.svelte';
|
|
31
32
|
export { default as Switch } from './components/switch/switch.svelte';
|
|
@@ -40,5 +41,5 @@ export { default as TreeView } from './components/tree-view/tree-view.svelte';
|
|
|
40
41
|
export { LocaleProvider, useLocaleContext } from '@ark-ui/svelte/locale';
|
|
41
42
|
export { Portal } from '@ark-ui/svelte/portal';
|
|
42
43
|
export { createListCollection, createTreeCollection } from './utils/collections';
|
|
43
|
-
export { PersistedState } from 'runed';
|
|
44
|
+
export { PersistedState, Debounced } from 'runed';
|
|
44
45
|
export { cn } from 'tailwind-variants';
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "compote-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev --open",
|
|
7
7
|
"build": "vite build && npm run prepack",
|
|
8
|
+
"build:docs": "vite build",
|
|
8
9
|
"preview": "vite preview",
|
|
9
10
|
"prepare": "svelte-kit sync || echo ''",
|
|
10
11
|
"prepack": "svelte-kit sync && svelte-package && publint",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"@faker-js/faker": "^10.4.0",
|
|
61
62
|
"@iconify-json/ph": "^1.2.2",
|
|
62
63
|
"@sveltejs/adapter-auto": "^7.0.0",
|
|
64
|
+
"@sveltejs/adapter-cloudflare": "^7.2.8",
|
|
63
65
|
"@sveltejs/kit": "^2.61.1",
|
|
64
66
|
"@sveltejs/package": "^2.5.7",
|
|
65
67
|
"@sveltejs/vite-plugin-svelte": "7.1.2",
|