Skip to content

Commit 90aaa02

Browse files
authored
fix: props not being passed to Bits Dialog (#42)
1 parent 591e9fe commit 90aaa02

30 files changed

+108
-102
lines changed

.changeset/mean-cherries-dance.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"vaul-svelte": patch
3+
---
4+
5+
fix: forward `$$restProps` to Bits UI dialog

.eslintrc.cjs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ module.exports = {
55
"eslint:recommended",
66
"plugin:@typescript-eslint/recommended",
77
"plugin:svelte/recommended",
8-
"prettier"
8+
"prettier",
99
],
1010
parser: "@typescript-eslint/parser",
1111
plugins: ["@typescript-eslint"],
1212
parserOptions: {
1313
sourceType: "module",
1414
ecmaVersion: "latest",
15-
extraFileExtensions: [".svelte"]
15+
extraFileExtensions: [".svelte"],
1616
},
1717
env: {
1818
browser: true,
1919
es2024: true,
20-
node: true
20+
node: true,
2121
},
2222
globals: { $$Generic: "readable", NodeJS: true },
2323
rules: {
@@ -26,8 +26,8 @@ module.exports = {
2626
"warn",
2727
{
2828
argsIgnorePattern: "^_",
29-
varsIgnorePattern: "^_"
30-
}
29+
varsIgnorePattern: "^_",
30+
},
3131
],
3232
"svelte/no-target-blank": "off",
3333
"svelte/no-immutable-reactive-statements": "error",
@@ -39,24 +39,24 @@ module.exports = {
3939
"svelte/no-at-html-tags": "off",
4040
"svelte/no-unused-svelte-ignore": "off",
4141
"svelte/require-stores-init": "off",
42-
"svelte/css-unused-selector": "off"
42+
"svelte/css-unused-selector": "off",
4343
},
4444
overrides: [
4545
{
4646
files: ["*.svelte"],
4747
parser: "svelte-eslint-parser",
4848
parserOptions: {
49-
parser: "@typescript-eslint/parser"
49+
parser: "@typescript-eslint/parser",
5050
},
5151
rules: {
5252
"@typescript-eslint/no-unused-vars": [
5353
"warn",
5454
{
5555
argsIgnorePattern: "^_",
56-
varsIgnorePattern: "^(\\$\\$(Props|Events|Slots|Generic)|_*)$"
57-
}
58-
]
59-
}
56+
varsIgnorePattern: "^(\\$\\$(Props|Events|Slots|Generic)|_*)$",
57+
},
58+
],
59+
},
6060
},
6161
{
6262
files: ["*.ts"],
@@ -67,11 +67,11 @@ module.exports = {
6767
{
6868
extendDefaults: true,
6969
types: {
70-
"{}": false
71-
}
72-
}
73-
]
74-
}
75-
}
76-
]
70+
"{}": false,
71+
},
72+
},
73+
],
74+
},
75+
},
76+
],
7777
};

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"useTabs": true,
33
"singleQuote": false,
4-
"trailingComma": "none",
4+
"trailingComma": "es5",
55
"printWidth": 100,
66
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
77
"overrides": [

playwright.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import type { PlaywrightTestConfig } from "@playwright/test";
33
const config: PlaywrightTestConfig = {
44
webServer: {
55
command: "npm run build && npm run preview",
6-
port: 4173
6+
port: 4173,
77
},
88
testDir: "tests",
9-
testMatch: /(.+\.)?(test|spec)\.[jt]s/
9+
testMatch: /(.+\.)?(test|spec)\.[jt]s/,
1010
};
1111

1212
export default config;

postcss.config.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const config = {
66
//Some plugins, like tailwindcss/nesting, need to run before Tailwind,
77
tailwindcss(),
88
//But others, like autoprefixer, need to run after,
9-
autoprefixer
10-
]
9+
autoprefixer,
10+
],
1111
};
1212

1313
module.exports = config;

src/config/site.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ export const siteConfig = {
55
ogImage: "https://www.vaul-svelte.com/og.jpg",
66
links: {
77
twitter: "https://twitter.com/huntabyte",
8-
github: "https://github.com/huntabyte/vaul-svelte"
8+
github: "https://github.com/huntabyte/vaul-svelte",
99
},
10-
keywords: `Svelte,SvelteKit,Svelte Components,Headless Svelte Components,Headless UI Svelte,Drawer for Svelte,SvelteKit Drawer,Svelte Drawer,Vaul Svelte`
10+
keywords: `Svelte,SvelteKit,Svelte Components,Headless Svelte Components,Headless UI Svelte,Drawer for Svelte,SvelteKit Drawer,Svelte Drawer,Vaul Svelte`,
1111
};
1212

1313
export type SiteConfig = typeof siteConfig;

src/lib/internal/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const TRANSITIONS = {
22
DURATION: 0.5,
3-
EASE: [0.32, 0.72, 0, 1]
3+
EASE: [0.32, 0.72, 0, 1],
44
};
55

66
export const VELOCITY_THRESHOLD = 0.4;

src/lib/internal/escape-keydown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const documentEscapeKeyStore = readable<KeyboardEvent | undefined>(
2626

2727
// Adds a keydown event listener to the document, calling the keydown function when triggered.
2828
const unsubscribe = addEventListener(document, "keydown", keydown, {
29-
passive: false
29+
passive: false,
3030
});
3131

3232
// Returns a function to unsubscribe from the event listener and stop tracking keydown events.

src/lib/internal/helpers/is.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const nonTextInputTypes = new Set([
1010
"image",
1111
"button",
1212
"submit",
13-
"reset"
13+
"reset",
1414
]);
1515

1616
export const isBrowser = typeof document !== "undefined";

src/lib/internal/helpers/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type Options = Record<string, Writable<unknown>>;
55
export function getOptionUpdater(options: Options) {
66
return function <
77
K extends keyof typeof options,
8-
V extends StoresValues<(typeof options)[keyof typeof options]>
8+
V extends StoresValues<(typeof options)[keyof typeof options]>,
99
>(key: K, value: V | undefined) {
1010
if (value === undefined) return;
1111
const store = options[key];

0 commit comments

Comments
 (0)