@noxlovette/material 0.2.2 → 0.3.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.
- package/claude-skill/material-design/SKILL.md +3 -1
- package/claude-skill/material-design/references/component-patterns.md +15 -0
- package/dist/components/badge/Badge.stories.svelte +58 -0
- package/dist/components/badge/Badge.stories.svelte.d.ts +19 -0
- package/dist/components/buttons/Button.stories.svelte +50 -0
- package/dist/components/buttons/Button.stories.svelte.d.ts +19 -0
- package/dist/components/buttons/ButtonIcon.stories.svelte +74 -0
- package/dist/components/buttons/ButtonIcon.stories.svelte.d.ts +19 -0
- package/dist/components/buttons/FAB.stories.svelte +59 -0
- package/dist/components/buttons/FAB.stories.svelte.d.ts +19 -0
- package/dist/components/buttons/Toggle.stories.svelte +46 -0
- package/dist/components/buttons/Toggle.stories.svelte.d.ts +19 -0
- package/dist/components/cards/Card.stories.svelte +72 -0
- package/dist/components/cards/Card.stories.svelte.d.ts +19 -0
- package/dist/components/containers/bottom-sheet/BottomSheet.stories.svelte +35 -0
- package/dist/components/containers/bottom-sheet/BottomSheet.stories.svelte.d.ts +4 -0
- package/dist/components/containers/dialogue/Dialogue.stories.svelte +86 -0
- package/dist/components/containers/dialogue/Dialogue.stories.svelte.d.ts +4 -0
- package/dist/components/containers/menu/Menu.stories.svelte +62 -0
- package/dist/components/containers/menu/Menu.stories.svelte.d.ts +19 -0
- package/dist/components/containers/panes/SinglePane.stories.svelte +67 -0
- package/dist/components/containers/panes/SinglePane.stories.svelte.d.ts +19 -0
- package/dist/components/containers/panes/SplitPane.stories.svelte +124 -0
- package/dist/components/containers/panes/SplitPane.stories.svelte.d.ts +19 -0
- package/dist/components/containers/panes/SplitPane.svelte +25 -21
- package/dist/components/containers/panes/SplitPane.svelte.d.ts +4 -1
- package/dist/components/containers/panes/SupportingPane.stories.svelte +113 -0
- package/dist/components/containers/panes/SupportingPane.stories.svelte.d.ts +19 -0
- package/dist/components/containers/panes/theme.d.ts +18 -0
- package/dist/components/containers/panes/theme.js +11 -0
- package/dist/components/containers/panes/types.d.ts +17 -1
- package/dist/components/containers/popover/Popover.stories.svelte +65 -0
- package/dist/components/containers/popover/Popover.stories.svelte.d.ts +19 -0
- package/dist/components/containers/side-sheet/SideSheet.stories.svelte +54 -0
- package/dist/components/containers/side-sheet/SideSheet.stories.svelte.d.ts +4 -0
- package/dist/components/forms/checkbox/Checkbox.stories.svelte +42 -0
- package/dist/components/forms/checkbox/Checkbox.stories.svelte.d.ts +19 -0
- package/dist/components/forms/search/Search.stories.svelte +41 -0
- package/dist/components/forms/search/Search.stories.svelte.d.ts +19 -0
- package/dist/components/forms/select/Select.stories.svelte +89 -0
- package/dist/components/forms/select/Select.stories.svelte.d.ts +19 -0
- package/dist/components/forms/select/Select.svelte +1 -1
- package/dist/components/forms/slider/Slider.stories.svelte +76 -0
- package/dist/components/forms/slider/Slider.stories.svelte.d.ts +19 -0
- package/dist/components/forms/switch/Switch.stories.svelte +47 -0
- package/dist/components/forms/switch/Switch.stories.svelte.d.ts +19 -0
- package/dist/components/forms/textfield/Textfield.stories.svelte +74 -0
- package/dist/components/forms/textfield/Textfield.stories.svelte.d.ts +19 -0
- package/dist/components/misc/Avatar.svelte +2 -2
- package/dist/components/misc/types.d.ts +4 -0
- package/dist/components/nav/appbar/AppBar.stories.svelte +49 -0
- package/dist/components/nav/appbar/AppBar.stories.svelte.d.ts +19 -0
- package/dist/components/nav/navbar/Navbar.stories.svelte +33 -0
- package/dist/components/nav/navbar/Navbar.stories.svelte.d.ts +19 -0
- package/dist/components/nav/rail/Rail.stories.svelte +73 -0
- package/dist/components/nav/rail/Rail.stories.svelte.d.ts +19 -0
- package/dist/components/nav/tabs/Tabs.stories.svelte +55 -0
- package/dist/components/nav/tabs/Tabs.stories.svelte.d.ts +18 -0
- package/dist/components/pill/Pill.stories.svelte +48 -0
- package/dist/components/pill/Pill.stories.svelte.d.ts +19 -0
- package/dist/components/progress/Progress.stories.svelte +64 -0
- package/dist/components/progress/Progress.stories.svelte.d.ts +18 -0
- package/dist/components/snackbar/Snackbar.stories.svelte +76 -0
- package/dist/components/snackbar/Snackbar.stories.svelte.d.ts +4 -0
- package/dist/components/typography/body/Body.stories.svelte +30 -0
- package/dist/components/typography/body/Body.stories.svelte.d.ts +19 -0
- package/dist/components/typography/display/Display.stories.svelte +30 -0
- package/dist/components/typography/display/Display.stories.svelte.d.ts +19 -0
- package/dist/components/typography/headline/Headline.stories.svelte +30 -0
- package/dist/components/typography/headline/Headline.stories.svelte.d.ts +19 -0
- package/dist/components/typography/label/Label.stories.svelte +30 -0
- package/dist/components/typography/label/Label.stories.svelte.d.ts +19 -0
- package/dist/components/typography/title/Title.stories.svelte +30 -0
- package/dist/components/typography/title/Title.stories.svelte.d.ts +19 -0
- package/dist/utils/Layer.svelte +4 -3
- package/package.json +12 -4
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Headline from './Headline.svelte';
|
|
4
|
+
|
|
5
|
+
const { Story } = defineMeta({
|
|
6
|
+
title: 'Typography/Headline',
|
|
7
|
+
component: Headline,
|
|
8
|
+
argTypes: {
|
|
9
|
+
size: {
|
|
10
|
+
control: 'select',
|
|
11
|
+
options: ['small', 'medium', 'large']
|
|
12
|
+
},
|
|
13
|
+
emphasized: { control: 'boolean' }
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
size: 'medium',
|
|
17
|
+
emphasized: false
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<Story name="Playground">Headline text</Story>
|
|
23
|
+
|
|
24
|
+
<Story name="Sizes" asChild>
|
|
25
|
+
<div class="flex flex-col gap-4 p-6">
|
|
26
|
+
<Headline size="small">Headline small</Headline>
|
|
27
|
+
<Headline size="medium">Headline medium</Headline>
|
|
28
|
+
<Headline size="large">Headline large</Headline>
|
|
29
|
+
</div>
|
|
30
|
+
</Story>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Headline from './Headline.svelte';
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const Headline: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
+
[evt: string]: CustomEvent<any>;
|
|
17
|
+
}, {}, {}, string>;
|
|
18
|
+
type Headline = InstanceType<typeof Headline>;
|
|
19
|
+
export default Headline;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Label from './Label.svelte';
|
|
4
|
+
|
|
5
|
+
const { Story } = defineMeta({
|
|
6
|
+
title: 'Typography/Label',
|
|
7
|
+
component: Label,
|
|
8
|
+
argTypes: {
|
|
9
|
+
size: {
|
|
10
|
+
control: 'select',
|
|
11
|
+
options: ['small', 'medium', 'large']
|
|
12
|
+
},
|
|
13
|
+
emphasized: { control: 'boolean' }
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
size: 'medium',
|
|
17
|
+
emphasized: false
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<Story name="Playground">Label text</Story>
|
|
23
|
+
|
|
24
|
+
<Story name="Sizes" asChild>
|
|
25
|
+
<div class="flex flex-col gap-4 p-6">
|
|
26
|
+
<Label size="small">Label small</Label>
|
|
27
|
+
<Label size="medium">Label medium</Label>
|
|
28
|
+
<Label size="large">Label large</Label>
|
|
29
|
+
</div>
|
|
30
|
+
</Story>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Label from './Label.svelte';
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const Label: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
+
[evt: string]: CustomEvent<any>;
|
|
17
|
+
}, {}, {}, string>;
|
|
18
|
+
type Label = InstanceType<typeof Label>;
|
|
19
|
+
export default Label;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Title from './Title.svelte';
|
|
4
|
+
|
|
5
|
+
const { Story } = defineMeta({
|
|
6
|
+
title: 'Typography/Title',
|
|
7
|
+
component: Title,
|
|
8
|
+
argTypes: {
|
|
9
|
+
size: {
|
|
10
|
+
control: 'select',
|
|
11
|
+
options: ['small', 'medium', 'large']
|
|
12
|
+
},
|
|
13
|
+
emphasized: { control: 'boolean' }
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
size: 'medium',
|
|
17
|
+
emphasized: false
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<Story name="Playground">Title text</Story>
|
|
23
|
+
|
|
24
|
+
<Story name="Sizes" asChild>
|
|
25
|
+
<div class="flex flex-col gap-4 p-6">
|
|
26
|
+
<Title size="small">Title small</Title>
|
|
27
|
+
<Title size="medium">Title medium</Title>
|
|
28
|
+
<Title size="large">Title large</Title>
|
|
29
|
+
</div>
|
|
30
|
+
</Story>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Title from './Title.svelte';
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const Title: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
+
[evt: string]: CustomEvent<any>;
|
|
17
|
+
}, {}, {}, string>;
|
|
18
|
+
type Title = InstanceType<typeof Title>;
|
|
19
|
+
export default Title;
|
package/dist/utils/Layer.svelte
CHANGED
|
@@ -120,7 +120,8 @@
|
|
|
120
120
|
|
|
121
121
|
document.addEventListener('pointerdown', (e) => {
|
|
122
122
|
if (e.button !== 0) return;
|
|
123
|
-
|
|
123
|
+
if (!(e.target instanceof Element)) return;
|
|
124
|
+
const layer = e.target.closest('.m3-layer');
|
|
124
125
|
if (!layer || !isEnabled(layer)) return;
|
|
125
126
|
const rect = layer.getBoundingClientRect();
|
|
126
127
|
const cancel = createRippleSvg(
|
|
@@ -142,8 +143,8 @@
|
|
|
142
143
|
|
|
143
144
|
document.addEventListener('keydown', (e) => {
|
|
144
145
|
if (e.repeat) return;
|
|
145
|
-
|
|
146
|
-
const layer = target.closest('.m3-layer');
|
|
146
|
+
if (!(e.target instanceof Element)) return;
|
|
147
|
+
const layer = e.target.closest('.m3-layer');
|
|
147
148
|
if (!layer || !isEnabled(layer)) return;
|
|
148
149
|
const isActivate = e.key === 'Enter' || (e.key === ' ' && layer.tagName === 'BUTTON');
|
|
149
150
|
if (!isActivate) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noxlovette/material",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
"check": "svelte-kit sync && svelte-check",
|
|
13
13
|
"test": "vitest run",
|
|
14
14
|
"format": "prettier --write .",
|
|
15
|
-
"dev": "vite dev"
|
|
15
|
+
"dev": "vite dev",
|
|
16
|
+
"storybook": "storybook dev -p 6006",
|
|
17
|
+
"build-storybook": "storybook build"
|
|
16
18
|
},
|
|
17
19
|
"bin": {
|
|
18
20
|
"material-claude-skill": "./bin/install-skill.js"
|
|
@@ -46,10 +48,14 @@
|
|
|
46
48
|
"devDependencies": {
|
|
47
49
|
"@eslint/compat": "^2.1.0",
|
|
48
50
|
"@eslint/js": "^10.0.1",
|
|
51
|
+
"@storybook/addon-a11y": "10.5.2",
|
|
52
|
+
"@storybook/addon-docs": "10.5.2",
|
|
53
|
+
"@storybook/addon-svelte-csf": "5.1.2",
|
|
54
|
+
"@storybook/svelte-vite": "10.5.2",
|
|
49
55
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
50
56
|
"@sveltejs/kit": "^2.69.3",
|
|
51
57
|
"@sveltejs/package": "^2.5.8",
|
|
52
|
-
"@sveltejs/vite-plugin-svelte": "
|
|
58
|
+
"@sveltejs/vite-plugin-svelte": "6.2.4",
|
|
53
59
|
"@tailwindcss/cli": "^4.3.2",
|
|
54
60
|
"@tailwindcss/typography": "^0.5.20",
|
|
55
61
|
"@tailwindcss/vite": "^4.3.2",
|
|
@@ -64,6 +70,8 @@
|
|
|
64
70
|
"prettier-plugin-svelte": "^4.1.1",
|
|
65
71
|
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
66
72
|
"publint": "^0.3.21",
|
|
73
|
+
"shiki": "^4.3.1",
|
|
74
|
+
"storybook": "10.5.2",
|
|
67
75
|
"svelte": "^5.56.5",
|
|
68
76
|
"svelte-check": "^4.7.2",
|
|
69
77
|
"sveltekit-superforms": "^2.30.2",
|
|
@@ -71,7 +79,7 @@
|
|
|
71
79
|
"tailwindcss": "^4.3.2",
|
|
72
80
|
"typescript": "^6.0.3",
|
|
73
81
|
"typescript-eslint": "^8.64.0",
|
|
74
|
-
"vite": "
|
|
82
|
+
"vite": "7.3.6",
|
|
75
83
|
"vite-plugin-devtools-json": "^1.0.0",
|
|
76
84
|
"vitest": "^4.1.10",
|
|
77
85
|
"zod": "^4.4.3"
|