@proto.ui/prototypes-shadcn 0.0.1 → 0.1.0
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/README.md +0 -3
- package/dist/dialog/close.d.ts +3 -0
- package/dist/dialog/close.js +95 -0
- package/dist/dialog/content.d.ts +2 -0
- package/dist/dialog/content.js +10 -0
- package/dist/dialog/description.d.ts +2 -0
- package/dist/dialog/description.js +10 -0
- package/dist/dialog/index.d.ts +16 -0
- package/dist/dialog/index.js +15 -0
- package/dist/dialog/overlay.d.ts +2 -0
- package/dist/dialog/overlay.js +10 -0
- package/dist/dialog/root.d.ts +2 -0
- package/dist/dialog/root.js +10 -0
- package/dist/dialog/title.d.ts +2 -0
- package/dist/dialog/title.js +10 -0
- package/dist/dialog/trigger.d.ts +3 -0
- package/dist/dialog/trigger.js +113 -0
- package/dist/dialog/types.d.ts +26 -0
- package/dist/dialog/types.js +1 -0
- package/dist/dropdown/content.d.ts +2 -0
- package/dist/dropdown/content.js +10 -0
- package/dist/dropdown/index.d.ts +10 -0
- package/dist/dropdown/index.js +9 -0
- package/dist/dropdown/item.d.ts +2 -0
- package/dist/dropdown/item.js +49 -0
- package/dist/dropdown/root.d.ts +2 -0
- package/dist/dropdown/root.js +10 -0
- package/dist/dropdown/trigger.d.ts +3 -0
- package/dist/dropdown/trigger.js +111 -0
- package/dist/dropdown/types.d.ts +19 -0
- package/dist/dropdown/types.js +1 -0
- package/dist/hover-card/content.js +1 -2
- package/dist/hover-card/root.js +0 -1
- package/dist/hover-card/trigger.js +0 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.js +13 -0
- package/dist/tabs/content.js +0 -1
- package/dist/tabs/list.js +0 -1
- package/dist/tabs/root.js +0 -1
- package/package.json +6 -9
package/README.md
CHANGED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asDialogClose } from '@proto.ui/prototypes-base';
|
|
3
|
+
const BASE_TOKENS = [
|
|
4
|
+
'group/button',
|
|
5
|
+
'inline-flex',
|
|
6
|
+
'shrink-0',
|
|
7
|
+
'items-center',
|
|
8
|
+
'justify-center',
|
|
9
|
+
'rounded-lg',
|
|
10
|
+
'border',
|
|
11
|
+
'bg-clip-padding',
|
|
12
|
+
'text-sm',
|
|
13
|
+
'font-medium',
|
|
14
|
+
'whitespace-nowrap',
|
|
15
|
+
'transition-all',
|
|
16
|
+
'outline-none',
|
|
17
|
+
'select-none',
|
|
18
|
+
'h-8',
|
|
19
|
+
'gap-1.5',
|
|
20
|
+
'px-2.5',
|
|
21
|
+
].join(' ');
|
|
22
|
+
const VARIANT_TOKENS = {
|
|
23
|
+
default: 'border-transparent bg-primary text-primary-foreground',
|
|
24
|
+
destructive: 'border-transparent bg-destructive/10 text-destructive',
|
|
25
|
+
outline: 'border-border bg-background text-foreground',
|
|
26
|
+
secondary: 'border-transparent bg-secondary text-secondary-foreground',
|
|
27
|
+
ghost: 'border-transparent bg-transparent text-foreground',
|
|
28
|
+
link: 'border-transparent bg-transparent text-primary underline-offset-4',
|
|
29
|
+
};
|
|
30
|
+
const dialogClose = definePrototype({
|
|
31
|
+
name: 'shadcn-dialog-close',
|
|
32
|
+
setup(def) {
|
|
33
|
+
def.props.define({
|
|
34
|
+
variant: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
empty: 'fallback',
|
|
37
|
+
enum: ['default', 'destructive', 'outline', 'secondary', 'ghost', 'link'],
|
|
38
|
+
},
|
|
39
|
+
disabled: { type: 'boolean', empty: 'fallback' },
|
|
40
|
+
});
|
|
41
|
+
def.props.setDefaults({
|
|
42
|
+
variant: 'default',
|
|
43
|
+
disabled: false,
|
|
44
|
+
});
|
|
45
|
+
asDialogClose();
|
|
46
|
+
const disabled = def.state.fromInteraction('disabled');
|
|
47
|
+
const hovered = def.state.fromInteraction('hovered');
|
|
48
|
+
const focusVisible = def.state.fromInteraction('focusVisible');
|
|
49
|
+
const pressed = def.state.fromInteraction('pressed');
|
|
50
|
+
def.feedback.style.use(tw(BASE_TOKENS));
|
|
51
|
+
Object.keys(VARIANT_TOKENS).forEach((variant) => {
|
|
52
|
+
def.rule({
|
|
53
|
+
when: (w) => w.prop('variant').eq(variant),
|
|
54
|
+
intent: (i) => i.feedback.style.use(tw(VARIANT_TOKENS[variant])),
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
def.rule({
|
|
58
|
+
when: (w) => w.state(focusVisible).eq(true),
|
|
59
|
+
intent: (i) => i.feedback.style.use(tw('border-ring ring-3 ring-ring/50')),
|
|
60
|
+
});
|
|
61
|
+
def.rule({
|
|
62
|
+
when: (w) => w.state(pressed).eq(true),
|
|
63
|
+
intent: (i) => i.feedback.style.use(tw('translate-y-px')),
|
|
64
|
+
});
|
|
65
|
+
def.rule({
|
|
66
|
+
when: (w) => w.all(w.state(hovered).eq(true), w.prop('variant').eq('default')),
|
|
67
|
+
intent: (i) => i.feedback.style.use(tw('bg-primary/80')),
|
|
68
|
+
});
|
|
69
|
+
def.rule({
|
|
70
|
+
when: (w) => w.all(w.state(hovered).eq(true), w.prop('variant').eq('secondary')),
|
|
71
|
+
intent: (i) => i.feedback.style.use(tw('bg-secondary/80')),
|
|
72
|
+
});
|
|
73
|
+
def.rule({
|
|
74
|
+
when: (w) => w.all(w.state(hovered).eq(true), w.prop('variant').eq('outline')),
|
|
75
|
+
intent: (i) => i.feedback.style.use(tw('bg-muted text-foreground')),
|
|
76
|
+
});
|
|
77
|
+
def.rule({
|
|
78
|
+
when: (w) => w.all(w.state(hovered).eq(true), w.prop('variant').eq('ghost')),
|
|
79
|
+
intent: (i) => i.feedback.style.use(tw('bg-muted text-foreground')),
|
|
80
|
+
});
|
|
81
|
+
def.rule({
|
|
82
|
+
when: (w) => w.all(w.state(hovered).eq(true), w.prop('variant').eq('link')),
|
|
83
|
+
intent: (i) => i.feedback.style.use(tw('underline')),
|
|
84
|
+
});
|
|
85
|
+
def.rule({
|
|
86
|
+
when: (w) => w.all(w.state(hovered).eq(true), w.prop('variant').eq('destructive')),
|
|
87
|
+
intent: (i) => i.feedback.style.use(tw('bg-destructive/20')),
|
|
88
|
+
});
|
|
89
|
+
def.rule({
|
|
90
|
+
when: (w) => w.state(disabled).eq(true),
|
|
91
|
+
intent: (i) => i.feedback.style.use(tw('pointer-events-none opacity-50')),
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
export default dialogClose;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asDialogContent } from '@proto.ui/prototypes-base';
|
|
3
|
+
const dialogContent = definePrototype({
|
|
4
|
+
name: 'shadcn-dialog-content',
|
|
5
|
+
setup(def) {
|
|
6
|
+
asDialogContent();
|
|
7
|
+
def.feedback.style.use(tw('fixed left-1/2 top-1/2 grid w-full max-w-lg gap-4 -translate-x-1/2 -translate-y-1/2 rounded-lg border border-border bg-background p-6 shadow-lg'));
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
export default dialogContent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asDialogDescription } from '@proto.ui/prototypes-base';
|
|
3
|
+
const dialogDescription = definePrototype({
|
|
4
|
+
name: 'shadcn-dialog-description',
|
|
5
|
+
setup(def) {
|
|
6
|
+
asDialogDescription();
|
|
7
|
+
def.feedback.style.use(tw('text-sm text-muted-foreground'));
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
export default dialogDescription;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import dialogClose from './close';
|
|
2
|
+
import dialogContent from './content';
|
|
3
|
+
import dialogDescription from './description';
|
|
4
|
+
import dialogMask from './overlay';
|
|
5
|
+
import dialogRoot from './root';
|
|
6
|
+
import dialogTitle from './title';
|
|
7
|
+
import dialogTrigger from './trigger';
|
|
8
|
+
export type { ShadcnDialogRootProps, ShadcnDialogRootExposes, ShadcnDialogRootAsHookContract, ShadcnDialogTriggerProps, ShadcnDialogTriggerExposes, ShadcnDialogTriggerAsHookContract, ShadcnDialogMaskProps, ShadcnDialogMaskExposes, ShadcnDialogMaskAsHookContract, ShadcnDialogContentProps, ShadcnDialogContentExposes, ShadcnDialogContentAsHookContract, ShadcnDialogTitleProps, ShadcnDialogTitleExposes, ShadcnDialogTitleAsHookContract, ShadcnDialogDescriptionProps, ShadcnDialogDescriptionExposes, ShadcnDialogDescriptionAsHookContract, ShadcnDialogCloseProps, ShadcnDialogCloseExposes, ShadcnDialogCloseAsHookContract, } from './types';
|
|
9
|
+
export { dialogRoot, dialogTrigger, dialogMask, dialogContent, dialogTitle, dialogDescription, dialogClose, };
|
|
10
|
+
export { default as shadcnDialogRoot } from './root';
|
|
11
|
+
export { default as shadcnDialogTrigger } from './trigger';
|
|
12
|
+
export { default as shadcnDialogMask } from './overlay';
|
|
13
|
+
export { default as shadcnDialogContent } from './content';
|
|
14
|
+
export { default as shadcnDialogTitle } from './title';
|
|
15
|
+
export { default as shadcnDialogDescription } from './description';
|
|
16
|
+
export { default as shadcnDialogClose } from './close';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import dialogClose from './close';
|
|
2
|
+
import dialogContent from './content';
|
|
3
|
+
import dialogDescription from './description';
|
|
4
|
+
import dialogMask from './overlay';
|
|
5
|
+
import dialogRoot from './root';
|
|
6
|
+
import dialogTitle from './title';
|
|
7
|
+
import dialogTrigger from './trigger';
|
|
8
|
+
export { dialogRoot, dialogTrigger, dialogMask, dialogContent, dialogTitle, dialogDescription, dialogClose, };
|
|
9
|
+
export { default as shadcnDialogRoot } from './root';
|
|
10
|
+
export { default as shadcnDialogTrigger } from './trigger';
|
|
11
|
+
export { default as shadcnDialogMask } from './overlay';
|
|
12
|
+
export { default as shadcnDialogContent } from './content';
|
|
13
|
+
export { default as shadcnDialogTitle } from './title';
|
|
14
|
+
export { default as shadcnDialogDescription } from './description';
|
|
15
|
+
export { default as shadcnDialogClose } from './close';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asDialogMask } from '@proto.ui/prototypes-base';
|
|
3
|
+
const dialogMask = definePrototype({
|
|
4
|
+
name: 'shadcn-dialog-mask',
|
|
5
|
+
setup(def) {
|
|
6
|
+
asDialogMask();
|
|
7
|
+
def.feedback.style.use(tw('fixed inset-0 bg-black/80'));
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
export default dialogMask;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asDialogRoot } from '@proto.ui/prototypes-base';
|
|
3
|
+
const dialogRoot = definePrototype({
|
|
4
|
+
name: 'shadcn-dialog-root',
|
|
5
|
+
setup(def) {
|
|
6
|
+
asDialogRoot();
|
|
7
|
+
def.feedback.style.use(tw('relative inline-flex items-start'));
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
export default dialogRoot;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asDialogTitle } from '@proto.ui/prototypes-base';
|
|
3
|
+
const dialogTitle = definePrototype({
|
|
4
|
+
name: 'shadcn-dialog-title',
|
|
5
|
+
setup(def) {
|
|
6
|
+
asDialogTitle();
|
|
7
|
+
def.feedback.style.use(tw('text-lg font-semibold leading-none tracking-tight'));
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
export default dialogTitle;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asDialogTrigger } from '@proto.ui/prototypes-base';
|
|
3
|
+
const BASE_TOKENS = [
|
|
4
|
+
'group/button',
|
|
5
|
+
'inline-flex',
|
|
6
|
+
'shrink-0',
|
|
7
|
+
'items-center',
|
|
8
|
+
'justify-center',
|
|
9
|
+
'rounded-lg',
|
|
10
|
+
'border',
|
|
11
|
+
'bg-clip-padding',
|
|
12
|
+
'text-sm',
|
|
13
|
+
'font-medium',
|
|
14
|
+
'whitespace-nowrap',
|
|
15
|
+
'transition-all',
|
|
16
|
+
'outline-none',
|
|
17
|
+
'select-none',
|
|
18
|
+
'h-8',
|
|
19
|
+
'gap-1.5',
|
|
20
|
+
'px-2.5',
|
|
21
|
+
].join(' ');
|
|
22
|
+
const VARIANT_TOKENS = {
|
|
23
|
+
default: 'border-transparent bg-primary text-primary-foreground',
|
|
24
|
+
destructive: 'border-transparent bg-destructive/10 text-destructive',
|
|
25
|
+
outline: 'border-border bg-background text-foreground',
|
|
26
|
+
secondary: 'border-transparent bg-secondary text-secondary-foreground',
|
|
27
|
+
ghost: 'border-transparent bg-transparent text-foreground',
|
|
28
|
+
link: 'border-transparent bg-transparent text-primary underline-offset-4',
|
|
29
|
+
};
|
|
30
|
+
const dialogTrigger = definePrototype({
|
|
31
|
+
name: 'shadcn-dialog-trigger',
|
|
32
|
+
setup(def) {
|
|
33
|
+
def.props.define({
|
|
34
|
+
variant: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
empty: 'fallback',
|
|
37
|
+
enum: ['default', 'destructive', 'outline', 'secondary', 'ghost', 'link'],
|
|
38
|
+
},
|
|
39
|
+
disabled: { type: 'boolean', empty: 'fallback' },
|
|
40
|
+
});
|
|
41
|
+
def.props.setDefaults({
|
|
42
|
+
variant: 'default',
|
|
43
|
+
disabled: false,
|
|
44
|
+
});
|
|
45
|
+
asDialogTrigger();
|
|
46
|
+
const disabled = def.state.fromInteraction('disabled');
|
|
47
|
+
const hovered = def.state.fromInteraction('hovered');
|
|
48
|
+
const focusVisible = def.state.fromInteraction('focusVisible');
|
|
49
|
+
const pressed = def.state.fromInteraction('pressed');
|
|
50
|
+
const expanded = def.state.fromAccessibility('expanded');
|
|
51
|
+
const invalid = def.state.fromAccessibility('invalid');
|
|
52
|
+
def.feedback.style.use(tw(BASE_TOKENS));
|
|
53
|
+
Object.keys(VARIANT_TOKENS).forEach((variant) => {
|
|
54
|
+
def.rule({
|
|
55
|
+
when: (w) => w.prop('variant').eq(variant),
|
|
56
|
+
intent: (i) => i.feedback.style.use(tw(VARIANT_TOKENS[variant])),
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
def.rule({
|
|
60
|
+
when: (w) => w.state(focusVisible).eq(true),
|
|
61
|
+
intent: (i) => i.feedback.style.use(tw('border-ring ring-3 ring-ring/50')),
|
|
62
|
+
});
|
|
63
|
+
def.rule({
|
|
64
|
+
when: (w) => w.all(w.state(focusVisible).eq(true), w.prop('variant').eq('destructive')),
|
|
65
|
+
intent: (i) => i.feedback.style.use(tw('border-destructive/40 ring-destructive/20')),
|
|
66
|
+
});
|
|
67
|
+
def.rule({
|
|
68
|
+
when: (w) => w.state(pressed).eq(true),
|
|
69
|
+
intent: (i) => i.feedback.style.use(tw('translate-y-px')),
|
|
70
|
+
});
|
|
71
|
+
def.rule({
|
|
72
|
+
when: (w) => w.all(w.state(hovered).eq(true), w.prop('variant').eq('default')),
|
|
73
|
+
intent: (i) => i.feedback.style.use(tw('bg-primary/80')),
|
|
74
|
+
});
|
|
75
|
+
def.rule({
|
|
76
|
+
when: (w) => w.all(w.state(hovered).eq(true), w.prop('variant').eq('secondary')),
|
|
77
|
+
intent: (i) => i.feedback.style.use(tw('bg-secondary/80')),
|
|
78
|
+
});
|
|
79
|
+
def.rule({
|
|
80
|
+
when: (w) => w.all(w.state(hovered).eq(true), w.prop('variant').eq('outline')),
|
|
81
|
+
intent: (i) => i.feedback.style.use(tw('bg-muted text-foreground')),
|
|
82
|
+
});
|
|
83
|
+
def.rule({
|
|
84
|
+
when: (w) => w.all(w.state(hovered).eq(true), w.prop('variant').eq('ghost')),
|
|
85
|
+
intent: (i) => i.feedback.style.use(tw('bg-muted text-foreground')),
|
|
86
|
+
});
|
|
87
|
+
def.rule({
|
|
88
|
+
when: (w) => w.all(w.state(hovered).eq(true), w.prop('variant').eq('link')),
|
|
89
|
+
intent: (i) => i.feedback.style.use(tw('underline')),
|
|
90
|
+
});
|
|
91
|
+
def.rule({
|
|
92
|
+
when: (w) => w.all(w.state(hovered).eq(true), w.prop('variant').eq('destructive')),
|
|
93
|
+
intent: (i) => i.feedback.style.use(tw('bg-destructive/20')),
|
|
94
|
+
});
|
|
95
|
+
def.rule({
|
|
96
|
+
when: (w) => w.all(w.state(expanded).eq(true), w.prop('variant').eq('outline')),
|
|
97
|
+
intent: (i) => i.feedback.style.use(tw('bg-muted text-foreground')),
|
|
98
|
+
});
|
|
99
|
+
def.rule({
|
|
100
|
+
when: (w) => w.all(w.state(expanded).eq(true), w.prop('variant').eq('secondary')),
|
|
101
|
+
intent: (i) => i.feedback.style.use(tw('bg-secondary text-secondary-foreground')),
|
|
102
|
+
});
|
|
103
|
+
def.rule({
|
|
104
|
+
when: (w) => w.state(invalid).eq(true),
|
|
105
|
+
intent: (i) => i.feedback.style.use(tw('border-destructive ring-3 ring-destructive/20')),
|
|
106
|
+
});
|
|
107
|
+
def.rule({
|
|
108
|
+
when: (w) => w.state(disabled).eq(true),
|
|
109
|
+
intent: (i) => i.feedback.style.use(tw('pointer-events-none opacity-50')),
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
export default dialogTrigger;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DialogCloseAsHookContract, DialogCloseExposes, DialogCloseProps, DialogContentAsHookContract, DialogContentExposes, DialogContentProps, DialogDescriptionAsHookContract, DialogDescriptionExposes, DialogDescriptionProps, DialogMaskAsHookContract, DialogMaskExposes, DialogMaskProps, DialogRootAsHookContract, DialogRootExposes, DialogRootProps, DialogTitleAsHookContract, DialogTitleExposes, DialogTitleProps, DialogTriggerAsHookContract, DialogTriggerExposes, DialogTriggerProps } from '@proto.ui/prototypes-base';
|
|
2
|
+
export type ShadcnDialogRootProps = DialogRootProps;
|
|
3
|
+
export type ShadcnDialogRootExposes = DialogRootExposes;
|
|
4
|
+
export type ShadcnDialogRootAsHookContract = DialogRootAsHookContract;
|
|
5
|
+
export type ShadcnDialogTriggerProps = DialogTriggerProps & {
|
|
6
|
+
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
7
|
+
};
|
|
8
|
+
export type ShadcnDialogTriggerExposes = DialogTriggerExposes;
|
|
9
|
+
export type ShadcnDialogTriggerAsHookContract = DialogTriggerAsHookContract;
|
|
10
|
+
export type ShadcnDialogMaskProps = DialogMaskProps;
|
|
11
|
+
export type ShadcnDialogMaskExposes = DialogMaskExposes;
|
|
12
|
+
export type ShadcnDialogMaskAsHookContract = DialogMaskAsHookContract;
|
|
13
|
+
export type ShadcnDialogContentProps = DialogContentProps;
|
|
14
|
+
export type ShadcnDialogContentExposes = DialogContentExposes;
|
|
15
|
+
export type ShadcnDialogContentAsHookContract = DialogContentAsHookContract;
|
|
16
|
+
export type ShadcnDialogTitleProps = DialogTitleProps;
|
|
17
|
+
export type ShadcnDialogTitleExposes = DialogTitleExposes;
|
|
18
|
+
export type ShadcnDialogTitleAsHookContract = DialogTitleAsHookContract;
|
|
19
|
+
export type ShadcnDialogDescriptionProps = DialogDescriptionProps;
|
|
20
|
+
export type ShadcnDialogDescriptionExposes = DialogDescriptionExposes;
|
|
21
|
+
export type ShadcnDialogDescriptionAsHookContract = DialogDescriptionAsHookContract;
|
|
22
|
+
export type ShadcnDialogCloseProps = DialogCloseProps & {
|
|
23
|
+
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
24
|
+
};
|
|
25
|
+
export type ShadcnDialogCloseExposes = DialogCloseExposes;
|
|
26
|
+
export type ShadcnDialogCloseAsHookContract = DialogCloseAsHookContract;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asDropdownContent } from '@proto.ui/prototypes-base';
|
|
3
|
+
const dropdownContent = definePrototype({
|
|
4
|
+
name: 'shadcn-dropdown-content',
|
|
5
|
+
setup(def) {
|
|
6
|
+
asDropdownContent();
|
|
7
|
+
def.feedback.style.use(tw('absolute left-0 top-full z-40 mt-2 block min-w-56 overflow-hidden rounded-xl border border-border/60 bg-background p-1 text-sm shadow-lg'));
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
export default dropdownContent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import dropdownContent from './content';
|
|
2
|
+
import dropdownItem from './item';
|
|
3
|
+
import dropdownRoot from './root';
|
|
4
|
+
import dropdownTrigger from './trigger';
|
|
5
|
+
export type { ShadcnDropdownRootProps, ShadcnDropdownRootExposes, ShadcnDropdownRootAsHookContract, ShadcnDropdownTriggerProps, ShadcnDropdownTriggerExposes, ShadcnDropdownTriggerAsHookContract, ShadcnDropdownContentProps, ShadcnDropdownContentExposes, ShadcnDropdownContentAsHookContract, ShadcnDropdownItemProps, ShadcnDropdownItemExposes, ShadcnDropdownItemAsHookContract, } from './types';
|
|
6
|
+
export { dropdownRoot, dropdownTrigger, dropdownContent, dropdownItem };
|
|
7
|
+
export { default as shadcnDropdownRoot } from './root';
|
|
8
|
+
export { default as shadcnDropdownTrigger } from './trigger';
|
|
9
|
+
export { default as shadcnDropdownContent } from './content';
|
|
10
|
+
export { default as shadcnDropdownItem } from './item';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import dropdownContent from './content';
|
|
2
|
+
import dropdownItem from './item';
|
|
3
|
+
import dropdownRoot from './root';
|
|
4
|
+
import dropdownTrigger from './trigger';
|
|
5
|
+
export { dropdownRoot, dropdownTrigger, dropdownContent, dropdownItem };
|
|
6
|
+
export { default as shadcnDropdownRoot } from './root';
|
|
7
|
+
export { default as shadcnDropdownTrigger } from './trigger';
|
|
8
|
+
export { default as shadcnDropdownContent } from './content';
|
|
9
|
+
export { default as shadcnDropdownItem } from './item';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asDropdownItem } from '@proto.ui/prototypes-base';
|
|
3
|
+
const ITEM_BASE_TOKENS = [
|
|
4
|
+
'relative',
|
|
5
|
+
'flex',
|
|
6
|
+
'w-full',
|
|
7
|
+
'cursor-default',
|
|
8
|
+
'select-none',
|
|
9
|
+
'items-center',
|
|
10
|
+
'gap-2',
|
|
11
|
+
'rounded-lg',
|
|
12
|
+
'border',
|
|
13
|
+
'border-transparent',
|
|
14
|
+
'px-2.5',
|
|
15
|
+
'py-2',
|
|
16
|
+
'text-left',
|
|
17
|
+
'text-sm',
|
|
18
|
+
'outline-none',
|
|
19
|
+
'transition-colors',
|
|
20
|
+
].join(' ');
|
|
21
|
+
const dropdownItem = definePrototype({
|
|
22
|
+
name: 'shadcn-dropdown-item',
|
|
23
|
+
setup(def) {
|
|
24
|
+
asDropdownItem();
|
|
25
|
+
const disabled = def.state.fromInteraction('disabled');
|
|
26
|
+
const hovered = def.state.fromInteraction('hovered');
|
|
27
|
+
const focused = def.state.fromInteraction('focused');
|
|
28
|
+
const focusVisible = def.state.fromInteraction('focusVisible');
|
|
29
|
+
const pressed = def.state.fromInteraction('pressed');
|
|
30
|
+
def.feedback.style.use(tw(ITEM_BASE_TOKENS));
|
|
31
|
+
def.rule({
|
|
32
|
+
when: (w) => w.any(w.state(hovered).eq(true), w.state(focused).eq(true), w.state(focusVisible).eq(true)),
|
|
33
|
+
intent: (i) => i.feedback.style.use(tw('bg-muted text-foreground')),
|
|
34
|
+
});
|
|
35
|
+
def.rule({
|
|
36
|
+
when: (w) => w.state(focusVisible).eq(true),
|
|
37
|
+
intent: (i) => i.feedback.style.use(tw('ring-2 ring-ring/40 ring-inset')),
|
|
38
|
+
});
|
|
39
|
+
def.rule({
|
|
40
|
+
when: (w) => w.state(pressed).eq(true),
|
|
41
|
+
intent: (i) => i.feedback.style.use(tw('bg-muted/80 text-foreground')),
|
|
42
|
+
});
|
|
43
|
+
def.rule({
|
|
44
|
+
when: (w) => w.state(disabled).eq(true),
|
|
45
|
+
intent: (i) => i.feedback.style.use(tw('pointer-events-none opacity-50')),
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
export default dropdownItem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asDropdownRoot } from '@proto.ui/prototypes-base';
|
|
3
|
+
const dropdownRoot = definePrototype({
|
|
4
|
+
name: 'shadcn-dropdown-root',
|
|
5
|
+
setup(def) {
|
|
6
|
+
asDropdownRoot();
|
|
7
|
+
def.feedback.style.use(tw('relative inline-flex items-start'));
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
export default dropdownRoot;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { definePrototype, tw, } from '@proto.ui/core';
|
|
2
|
+
import { asDropdownTrigger } from '@proto.ui/prototypes-base';
|
|
3
|
+
const TRIGGER_BASE_TOKENS = [
|
|
4
|
+
'inline-flex',
|
|
5
|
+
'items-center',
|
|
6
|
+
'justify-center',
|
|
7
|
+
'gap-2',
|
|
8
|
+
'rounded-md',
|
|
9
|
+
'border',
|
|
10
|
+
'border-border/60',
|
|
11
|
+
'bg-background',
|
|
12
|
+
'px-3',
|
|
13
|
+
'py-2',
|
|
14
|
+
'text-sm',
|
|
15
|
+
'font-medium',
|
|
16
|
+
'shadow-xs',
|
|
17
|
+
'transition-colors',
|
|
18
|
+
'outline-none',
|
|
19
|
+
'select-none',
|
|
20
|
+
].join(' ');
|
|
21
|
+
const DEFAULT_INDICATOR_ICON = 'chevron-down';
|
|
22
|
+
const DEFAULT_INDICATOR_SIZE = 16;
|
|
23
|
+
const DEFAULT_INDICATOR_STROKE_WIDTH = 2;
|
|
24
|
+
const INDICATOR_ICON_SHAPES = {
|
|
25
|
+
'chevron-down': (svg) => svg.path({ d: 'm6 9 6 6 6-6' }),
|
|
26
|
+
'chevrons-up-down': (svg) => [svg.path({ d: 'm7 15 5 5 5-5' }), svg.path({ d: 'm7 9 5-5 5 5' })],
|
|
27
|
+
};
|
|
28
|
+
function toPositiveNumber(value, fallback) {
|
|
29
|
+
if (typeof value !== 'number')
|
|
30
|
+
return fallback;
|
|
31
|
+
if (!Number.isFinite(value))
|
|
32
|
+
return fallback;
|
|
33
|
+
if (value <= 0)
|
|
34
|
+
return fallback;
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
function renderIndicatorIcon(renderer, options) {
|
|
38
|
+
return renderer.svg.root({
|
|
39
|
+
viewBox: '0 0 24 24',
|
|
40
|
+
width: options.size,
|
|
41
|
+
height: options.size,
|
|
42
|
+
fill: 'none',
|
|
43
|
+
stroke: 'currentColor',
|
|
44
|
+
strokeWidth: options.strokeWidth,
|
|
45
|
+
strokeLinecap: 'round',
|
|
46
|
+
strokeLinejoin: 'round',
|
|
47
|
+
}, INDICATOR_ICON_SHAPES[options.icon](renderer.svg));
|
|
48
|
+
}
|
|
49
|
+
const dropdownTrigger = definePrototype({
|
|
50
|
+
name: 'shadcn-dropdown-trigger',
|
|
51
|
+
setup(def) {
|
|
52
|
+
def.props.define({
|
|
53
|
+
disabled: { type: 'boolean', empty: 'fallback' },
|
|
54
|
+
indicator: { type: 'boolean', empty: 'fallback' },
|
|
55
|
+
indicatorIcon: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
empty: 'fallback',
|
|
58
|
+
enum: ['chevron-down', 'chevrons-up-down'],
|
|
59
|
+
},
|
|
60
|
+
indicatorSize: { type: 'number', empty: 'fallback' },
|
|
61
|
+
indicatorStrokeWidth: { type: 'number', empty: 'fallback' },
|
|
62
|
+
});
|
|
63
|
+
def.props.setDefaults({
|
|
64
|
+
disabled: false,
|
|
65
|
+
indicator: true,
|
|
66
|
+
indicatorIcon: DEFAULT_INDICATOR_ICON,
|
|
67
|
+
indicatorSize: DEFAULT_INDICATOR_SIZE,
|
|
68
|
+
indicatorStrokeWidth: DEFAULT_INDICATOR_STROKE_WIDTH,
|
|
69
|
+
});
|
|
70
|
+
asDropdownTrigger();
|
|
71
|
+
const disabled = def.state.fromInteraction('disabled');
|
|
72
|
+
const hovered = def.state.fromInteraction('hovered');
|
|
73
|
+
const focusVisible = def.state.fromInteraction('focusVisible');
|
|
74
|
+
const pressed = def.state.fromInteraction('pressed');
|
|
75
|
+
def.feedback.style.use(tw(TRIGGER_BASE_TOKENS));
|
|
76
|
+
def.rule({
|
|
77
|
+
when: (w) => w.state(hovered).eq(true),
|
|
78
|
+
intent: (i) => i.feedback.style.use(tw('bg-muted text-foreground')),
|
|
79
|
+
});
|
|
80
|
+
def.rule({
|
|
81
|
+
when: (w) => w.state(focusVisible).eq(true),
|
|
82
|
+
intent: (i) => i.feedback.style.use(tw('ring-3 ring-ring/50 ring-offset-2')),
|
|
83
|
+
});
|
|
84
|
+
def.rule({
|
|
85
|
+
when: (w) => w.state(pressed).eq(true),
|
|
86
|
+
intent: (i) => i.feedback.style.use(tw('translate-y-px bg-muted text-foreground')),
|
|
87
|
+
});
|
|
88
|
+
def.rule({
|
|
89
|
+
when: (w) => w.state(disabled).eq(true),
|
|
90
|
+
intent: (i) => i.feedback.style.use(tw('pointer-events-none opacity-50')),
|
|
91
|
+
});
|
|
92
|
+
return (renderer) => {
|
|
93
|
+
const props = renderer.read.props.get();
|
|
94
|
+
const indicatorEnabled = props.indicator !== false;
|
|
95
|
+
const indicatorIcon = props.indicatorIcon === 'chevrons-up-down' ? props.indicatorIcon : DEFAULT_INDICATOR_ICON;
|
|
96
|
+
const indicatorSize = toPositiveNumber(props.indicatorSize, DEFAULT_INDICATOR_SIZE);
|
|
97
|
+
const indicatorStrokeWidth = toPositiveNumber(props.indicatorStrokeWidth, DEFAULT_INDICATOR_STROKE_WIDTH);
|
|
98
|
+
return [
|
|
99
|
+
renderer.r.slot(),
|
|
100
|
+
indicatorEnabled
|
|
101
|
+
? renderIndicatorIcon(renderer, {
|
|
102
|
+
icon: indicatorIcon,
|
|
103
|
+
size: indicatorSize,
|
|
104
|
+
strokeWidth: indicatorStrokeWidth,
|
|
105
|
+
})
|
|
106
|
+
: null,
|
|
107
|
+
];
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
export default dropdownTrigger;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DropdownContentAsHookContract, DropdownContentExposes, DropdownContentProps, DropdownItemAsHookContract, DropdownItemExposes, DropdownItemProps, DropdownRootAsHookContract, DropdownRootExposes, DropdownRootProps, DropdownTriggerAsHookContract, DropdownTriggerExposes, DropdownTriggerProps } from '@proto.ui/prototypes-base';
|
|
2
|
+
export type ShadcnDropdownTriggerIndicatorIcon = 'chevron-down' | 'chevrons-up-down';
|
|
3
|
+
export type ShadcnDropdownRootProps = DropdownRootProps;
|
|
4
|
+
export type ShadcnDropdownRootExposes = DropdownRootExposes;
|
|
5
|
+
export type ShadcnDropdownRootAsHookContract = DropdownRootAsHookContract;
|
|
6
|
+
export interface ShadcnDropdownTriggerProps extends DropdownTriggerProps {
|
|
7
|
+
indicator?: boolean;
|
|
8
|
+
indicatorIcon?: ShadcnDropdownTriggerIndicatorIcon;
|
|
9
|
+
indicatorSize?: number;
|
|
10
|
+
indicatorStrokeWidth?: number;
|
|
11
|
+
}
|
|
12
|
+
export type ShadcnDropdownTriggerExposes = DropdownTriggerExposes;
|
|
13
|
+
export type ShadcnDropdownTriggerAsHookContract = DropdownTriggerAsHookContract;
|
|
14
|
+
export type ShadcnDropdownContentProps = DropdownContentProps;
|
|
15
|
+
export type ShadcnDropdownContentExposes = DropdownContentExposes;
|
|
16
|
+
export type ShadcnDropdownContentAsHookContract = DropdownContentAsHookContract;
|
|
17
|
+
export type ShadcnDropdownItemProps = DropdownItemProps;
|
|
18
|
+
export type ShadcnDropdownItemExposes = DropdownItemExposes;
|
|
19
|
+
export type ShadcnDropdownItemAsHookContract = DropdownItemAsHookContract;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,8 +4,7 @@ const hoverCardContent = definePrototype({
|
|
|
4
4
|
name: 'shadcn-hover-card-content',
|
|
5
5
|
setup(def) {
|
|
6
6
|
asHoverCardContent();
|
|
7
|
-
def.feedback.style.use(tw('absolute left-0 top-full z-
|
|
8
|
-
return (r) => r.el('div', r.r.slot());
|
|
7
|
+
def.feedback.style.use(tw('absolute left-0 top-full z-40 mt-2 block w-80 rounded-xl border border-border/60 bg-background p-4 text-sm leading-6 shadow-lg'));
|
|
9
8
|
},
|
|
10
9
|
});
|
|
11
10
|
export default hoverCardContent;
|
package/dist/hover-card/root.js
CHANGED
|
@@ -41,7 +41,6 @@ const hoverCardTrigger = definePrototype({
|
|
|
41
41
|
when: (w) => w.state(disabled).eq(true),
|
|
42
42
|
intent: (i) => i.feedback.style.use(tw('pointer-events-none opacity-50')),
|
|
43
43
|
});
|
|
44
|
-
return (r) => r.el('button', r.r.slot());
|
|
45
44
|
},
|
|
46
45
|
});
|
|
47
46
|
export default hoverCardTrigger;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { default as shadcnSwitchRoot } from './switch/root';
|
|
|
7
7
|
export { default as shadcnSwitchThumb } from './switch/thumb';
|
|
8
8
|
export { tabsRoot, tabsList, tabsTrigger, tabsContent } from './tabs';
|
|
9
9
|
export { hoverCardRoot, hoverCardTrigger, hoverCardContent } from './hover-card';
|
|
10
|
+
export { dropdownRoot, dropdownTrigger, dropdownContent, dropdownItem } from './dropdown';
|
|
10
11
|
export { default as shadcnTabsRoot } from './tabs/root';
|
|
11
12
|
export { default as shadcnTabsList } from './tabs/list';
|
|
12
13
|
export { default as shadcnTabsTrigger } from './tabs/trigger';
|
|
@@ -14,8 +15,22 @@ export { default as shadcnTabsContent } from './tabs/content';
|
|
|
14
15
|
export { default as shadcnHoverCardRoot } from './hover-card/root';
|
|
15
16
|
export { default as shadcnHoverCardTrigger } from './hover-card/trigger';
|
|
16
17
|
export { default as shadcnHoverCardContent } from './hover-card/content';
|
|
18
|
+
export { default as shadcnDropdownRoot } from './dropdown/root';
|
|
19
|
+
export { default as shadcnDropdownTrigger } from './dropdown/trigger';
|
|
20
|
+
export { default as shadcnDropdownContent } from './dropdown/content';
|
|
21
|
+
export { default as shadcnDropdownItem } from './dropdown/item';
|
|
22
|
+
export { dialogRoot, dialogTrigger, dialogMask, dialogContent, dialogTitle, dialogDescription, dialogClose, } from './dialog';
|
|
23
|
+
export { default as shadcnDialogRoot } from './dialog/root';
|
|
24
|
+
export { default as shadcnDialogTrigger } from './dialog/trigger';
|
|
25
|
+
export { default as shadcnDialogMask } from './dialog/overlay';
|
|
26
|
+
export { default as shadcnDialogContent } from './dialog/content';
|
|
27
|
+
export { default as shadcnDialogTitle } from './dialog/title';
|
|
28
|
+
export { default as shadcnDialogDescription } from './dialog/description';
|
|
29
|
+
export { default as shadcnDialogClose } from './dialog/close';
|
|
17
30
|
export type { ShadcnButtonProps, ShadcnButtonExposes, ShadcnButtonSize, ShadcnButtonVariant, } from './button/types';
|
|
18
31
|
export type { ShadcnToggleProps, ShadcnToggleExposes, ShadcnToggleStateHandles, ShadcnToggleAsHookContract, } from './toggle/types';
|
|
19
32
|
export type { ShadcnSwitchRootProps, ShadcnSwitchRootExposes, ShadcnSwitchRootStateHandles, ShadcnSwitchRootAsHookContract, ShadcnSwitchThumbProps, ShadcnSwitchThumbExposes, ShadcnSwitchThumbAsHookContract, } from './switch/types';
|
|
20
33
|
export type { ShadcnTabsRootProps, ShadcnTabsRootExposes, ShadcnTabsRootAsHookContract, ShadcnTabsListProps, ShadcnTabsListExposes, ShadcnTabsListAsHookContract, ShadcnTabsTriggerProps, ShadcnTabsTriggerExposes, ShadcnTabsTriggerStateHandles, ShadcnTabsTriggerAsHookContract, ShadcnTabsContentProps, ShadcnTabsContentExposes, ShadcnTabsContentAsHookContract, } from './tabs/types';
|
|
21
34
|
export type { ShadcnHoverCardRootProps, ShadcnHoverCardRootExposes, ShadcnHoverCardRootAsHookContract, ShadcnHoverCardTriggerProps, ShadcnHoverCardTriggerExposes, ShadcnHoverCardTriggerAsHookContract, ShadcnHoverCardContentProps, ShadcnHoverCardContentExposes, ShadcnHoverCardContentAsHookContract, } from './hover-card/types';
|
|
35
|
+
export type { ShadcnDropdownRootProps, ShadcnDropdownRootExposes, ShadcnDropdownRootAsHookContract, ShadcnDropdownTriggerProps, ShadcnDropdownTriggerExposes, ShadcnDropdownTriggerAsHookContract, ShadcnDropdownContentProps, ShadcnDropdownContentExposes, ShadcnDropdownContentAsHookContract, ShadcnDropdownItemProps, ShadcnDropdownItemExposes, ShadcnDropdownItemAsHookContract, } from './dropdown/types';
|
|
36
|
+
export type { ShadcnDialogRootProps, ShadcnDialogRootExposes, ShadcnDialogRootAsHookContract, ShadcnDialogTriggerProps, ShadcnDialogTriggerExposes, ShadcnDialogTriggerAsHookContract, ShadcnDialogMaskProps, ShadcnDialogMaskExposes, ShadcnDialogMaskAsHookContract, ShadcnDialogContentProps, ShadcnDialogContentExposes, ShadcnDialogContentAsHookContract, ShadcnDialogTitleProps, ShadcnDialogTitleExposes, ShadcnDialogTitleAsHookContract, ShadcnDialogDescriptionProps, ShadcnDialogDescriptionExposes, ShadcnDialogDescriptionAsHookContract, ShadcnDialogCloseProps, ShadcnDialogCloseExposes, ShadcnDialogCloseAsHookContract, } from './dialog/types';
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { default as shadcnSwitchRoot } from './switch/root';
|
|
|
7
7
|
export { default as shadcnSwitchThumb } from './switch/thumb';
|
|
8
8
|
export { tabsRoot, tabsList, tabsTrigger, tabsContent } from './tabs';
|
|
9
9
|
export { hoverCardRoot, hoverCardTrigger, hoverCardContent } from './hover-card';
|
|
10
|
+
export { dropdownRoot, dropdownTrigger, dropdownContent, dropdownItem } from './dropdown';
|
|
10
11
|
export { default as shadcnTabsRoot } from './tabs/root';
|
|
11
12
|
export { default as shadcnTabsList } from './tabs/list';
|
|
12
13
|
export { default as shadcnTabsTrigger } from './tabs/trigger';
|
|
@@ -14,3 +15,15 @@ export { default as shadcnTabsContent } from './tabs/content';
|
|
|
14
15
|
export { default as shadcnHoverCardRoot } from './hover-card/root';
|
|
15
16
|
export { default as shadcnHoverCardTrigger } from './hover-card/trigger';
|
|
16
17
|
export { default as shadcnHoverCardContent } from './hover-card/content';
|
|
18
|
+
export { default as shadcnDropdownRoot } from './dropdown/root';
|
|
19
|
+
export { default as shadcnDropdownTrigger } from './dropdown/trigger';
|
|
20
|
+
export { default as shadcnDropdownContent } from './dropdown/content';
|
|
21
|
+
export { default as shadcnDropdownItem } from './dropdown/item';
|
|
22
|
+
export { dialogRoot, dialogTrigger, dialogMask, dialogContent, dialogTitle, dialogDescription, dialogClose, } from './dialog';
|
|
23
|
+
export { default as shadcnDialogRoot } from './dialog/root';
|
|
24
|
+
export { default as shadcnDialogTrigger } from './dialog/trigger';
|
|
25
|
+
export { default as shadcnDialogMask } from './dialog/overlay';
|
|
26
|
+
export { default as shadcnDialogContent } from './dialog/content';
|
|
27
|
+
export { default as shadcnDialogTitle } from './dialog/title';
|
|
28
|
+
export { default as shadcnDialogDescription } from './dialog/description';
|
|
29
|
+
export { default as shadcnDialogClose } from './dialog/close';
|
package/dist/tabs/content.js
CHANGED
package/dist/tabs/list.js
CHANGED
|
@@ -5,7 +5,6 @@ const tabsList = definePrototype({
|
|
|
5
5
|
setup(def) {
|
|
6
6
|
asTabsList();
|
|
7
7
|
def.feedback.style.use(tw('inline-flex h-10 items-center rounded-xl border border-border/60 bg-muted/80 p-1 text-muted-foreground shadow-xs backdrop-blur-xs'));
|
|
8
|
-
return (r) => r.el('div', r.r.slot());
|
|
9
8
|
},
|
|
10
9
|
});
|
|
11
10
|
export default tabsList;
|
package/dist/tabs/root.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proto.ui/prototypes-shadcn",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@proto.ui/core": "0.0
|
|
7
|
-
"@proto.ui/
|
|
8
|
-
"@proto.ui/module-event": "0.0.1",
|
|
9
|
-
"@proto.ui/module-rule-meta": "0.0.1",
|
|
10
|
-
"@proto.ui/prototypes-base": "0.0.1"
|
|
6
|
+
"@proto.ui/core": "0.1.0",
|
|
7
|
+
"@proto.ui/prototypes-base": "0.1.0"
|
|
11
8
|
},
|
|
12
9
|
"exports": {
|
|
13
10
|
".": {
|
|
@@ -17,14 +14,14 @@
|
|
|
17
14
|
},
|
|
18
15
|
"description": "shadcn-style Proto UI prototype library for adapter-driven components.",
|
|
19
16
|
"license": "MIT",
|
|
20
|
-
"homepage": "https://github.com/
|
|
17
|
+
"homepage": "https://github.com/Proto-UI/Proto-UI/tree/main/packages/prototypes/shadcn",
|
|
21
18
|
"repository": {
|
|
22
19
|
"type": "git",
|
|
23
|
-
"url": "git+https://github.com/
|
|
20
|
+
"url": "git+https://github.com/Proto-UI/Proto-UI.git",
|
|
24
21
|
"directory": "packages/prototypes/shadcn"
|
|
25
22
|
},
|
|
26
23
|
"bugs": {
|
|
27
|
-
"url": "https://github.com/
|
|
24
|
+
"url": "https://github.com/Proto-UI/Proto-UI/issues"
|
|
28
25
|
},
|
|
29
26
|
"publishConfig": {
|
|
30
27
|
"access": "public"
|