@proto.ui/prototypes-shadcn 0.1.0 → 0.2.0-rc.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/README.md +25 -2
- package/THIRD_PARTY_NOTICES.md +15 -0
- package/dist/button/button.proto.d.ts +11 -0
- package/dist/button/button.proto.js +161 -0
- package/dist/button/index.d.ts +2 -4
- package/dist/button/index.js +1 -175
- package/dist/button/types.d.ts +1 -1
- package/dist/dialog/close.proto.d.ts +4 -0
- package/dist/dialog/{close.js → close.proto.js} +13 -8
- package/dist/dialog/content.proto.d.ts +4 -0
- package/dist/dialog/content.proto.js +26 -0
- package/dist/dialog/description.proto.d.ts +3 -0
- package/dist/dialog/description.proto.js +13 -0
- package/dist/dialog/index.d.ts +14 -14
- package/dist/dialog/index.js +14 -14
- package/dist/dialog/overlay.proto.d.ts +4 -0
- package/dist/dialog/overlay.proto.js +26 -0
- package/dist/dialog/root.proto.d.ts +3 -0
- package/dist/dialog/root.proto.js +13 -0
- package/dist/dialog/title.proto.d.ts +3 -0
- package/dist/dialog/{title.js → title.proto.js} +4 -1
- package/dist/dialog/trigger.proto.d.ts +4 -0
- package/dist/dialog/{trigger.js → trigger.proto.js} +13 -8
- package/dist/dialog/types.d.ts +6 -5
- package/dist/dropdown/content.proto.d.ts +3 -0
- package/dist/dropdown/content.proto.js +43 -0
- package/dist/dropdown/index.d.ts +8 -8
- package/dist/dropdown/index.js +8 -8
- package/dist/dropdown/item.proto.d.ts +4 -0
- package/dist/dropdown/item.proto.js +50 -0
- package/dist/dropdown/root.proto.d.ts +3 -0
- package/dist/dropdown/root.proto.js +12 -0
- package/dist/dropdown/trigger.proto.d.ts +4 -0
- package/dist/dropdown/{trigger.js → trigger.proto.js} +15 -9
- package/dist/dropdown/types.d.ts +5 -2
- package/dist/hover-card/content.proto.d.ts +3 -0
- package/dist/hover-card/content.proto.js +42 -0
- package/dist/hover-card/index.d.ts +6 -6
- package/dist/hover-card/index.js +6 -6
- package/dist/hover-card/root.proto.d.ts +3 -0
- package/dist/hover-card/root.proto.js +14 -0
- package/dist/hover-card/trigger.proto.d.ts +3 -0
- package/dist/hover-card/trigger.proto.js +33 -0
- package/dist/hover-card/types.d.ts +1 -1
- package/dist/index.d.ts +27 -20
- package/dist/index.js +26 -20
- package/dist/select/content.proto.d.ts +4 -0
- package/dist/select/content.proto.js +52 -0
- package/dist/select/index.d.ts +11 -0
- package/dist/select/index.js +10 -0
- package/dist/select/item.proto.d.ts +3 -0
- package/dist/select/item.proto.js +60 -0
- package/dist/select/root.proto.d.ts +3 -0
- package/dist/select/root.proto.js +11 -0
- package/dist/select/trigger.proto.d.ts +4 -0
- package/dist/select/trigger.proto.js +66 -0
- package/dist/select/types.d.ts +20 -0
- package/dist/select/types.js +1 -0
- package/dist/select/value.proto.d.ts +3 -0
- package/dist/select/value.proto.js +16 -0
- package/dist/switch/index.d.ts +4 -4
- package/dist/switch/index.js +4 -4
- package/dist/switch/root.proto.d.ts +8 -0
- package/dist/switch/{root.js → root.proto.js} +19 -9
- package/dist/switch/thumb.proto.d.ts +8 -0
- package/dist/switch/{thumb.js → thumb.proto.js} +10 -1
- package/dist/switch/types.d.ts +1 -1
- package/dist/tabs/content.proto.d.ts +4 -0
- package/dist/tabs/content.proto.js +23 -0
- package/dist/tabs/index.d.ts +8 -8
- package/dist/tabs/index.js +8 -8
- package/dist/tabs/list.proto.d.ts +4 -0
- package/dist/tabs/list.proto.js +13 -0
- package/dist/tabs/root.proto.d.ts +4 -0
- package/dist/tabs/root.proto.js +13 -0
- package/dist/tabs/trigger.proto.d.ts +4 -0
- package/dist/tabs/{trigger.js → trigger.proto.js} +11 -7
- package/dist/tabs/types.d.ts +1 -1
- package/dist/toggle/index.d.ts +2 -4
- package/dist/toggle/index.js +1 -82
- package/dist/toggle/toggle.proto.d.ts +11 -0
- package/dist/toggle/toggle.proto.js +85 -0
- package/dist/toggle/types.d.ts +1 -1
- package/package.json +46 -5
- package/dist/dialog/close.d.ts +0 -3
- package/dist/dialog/content.d.ts +0 -2
- package/dist/dialog/content.js +0 -10
- package/dist/dialog/description.d.ts +0 -2
- package/dist/dialog/description.js +0 -10
- package/dist/dialog/overlay.d.ts +0 -2
- package/dist/dialog/overlay.js +0 -10
- package/dist/dialog/root.d.ts +0 -2
- package/dist/dialog/root.js +0 -10
- package/dist/dialog/title.d.ts +0 -2
- package/dist/dialog/trigger.d.ts +0 -3
- package/dist/dropdown/content.d.ts +0 -2
- package/dist/dropdown/content.js +0 -10
- package/dist/dropdown/item.d.ts +0 -2
- package/dist/dropdown/item.js +0 -49
- package/dist/dropdown/root.d.ts +0 -2
- package/dist/dropdown/root.js +0 -10
- package/dist/dropdown/trigger.d.ts +0 -3
- package/dist/hover-card/content.d.ts +0 -2
- package/dist/hover-card/content.js +0 -10
- package/dist/hover-card/root.d.ts +0 -2
- package/dist/hover-card/root.js +0 -10
- package/dist/hover-card/trigger.d.ts +0 -2
- package/dist/hover-card/trigger.js +0 -46
- package/dist/switch/root.d.ts +0 -3
- package/dist/switch/thumb.d.ts +0 -3
- package/dist/tabs/content.d.ts +0 -3
- package/dist/tabs/content.js +0 -15
- package/dist/tabs/list.d.ts +0 -3
- package/dist/tabs/list.js +0 -10
- package/dist/tabs/root.d.ts +0 -3
- package/dist/tabs/root.js +0 -10
- package/dist/tabs/trigger.d.ts +0 -3
package/dist/index.js
CHANGED
|
@@ -3,27 +3,33 @@ export { default as shadcnButton } from './button';
|
|
|
3
3
|
export { default as toggle } from './toggle';
|
|
4
4
|
export { default as shadcnToggle } from './toggle';
|
|
5
5
|
export { switchRoot, switchThumb } from './switch';
|
|
6
|
-
export { default as shadcnSwitchRoot } from './switch/root';
|
|
7
|
-
export { default as shadcnSwitchThumb } from './switch/thumb';
|
|
6
|
+
export { default as shadcnSwitchRoot } from './switch/root.proto';
|
|
7
|
+
export { default as shadcnSwitchThumb } from './switch/thumb.proto';
|
|
8
8
|
export { tabsRoot, tabsList, tabsTrigger, tabsContent } from './tabs';
|
|
9
9
|
export { hoverCardRoot, hoverCardTrigger, hoverCardContent } from './hover-card';
|
|
10
10
|
export { dropdownRoot, dropdownTrigger, dropdownContent, dropdownItem } from './dropdown';
|
|
11
|
-
export {
|
|
12
|
-
export { default as
|
|
13
|
-
export { default as
|
|
14
|
-
export { default as
|
|
15
|
-
export { default as
|
|
16
|
-
export { default as
|
|
17
|
-
export { default as
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as
|
|
20
|
-
export { default as
|
|
21
|
-
export { default as
|
|
11
|
+
export { selectRoot, selectTrigger, selectValue, selectContent, selectItem } from './select';
|
|
12
|
+
export { default as shadcnTabsRoot } from './tabs/root.proto';
|
|
13
|
+
export { default as shadcnTabsList } from './tabs/list.proto';
|
|
14
|
+
export { default as shadcnTabsTrigger } from './tabs/trigger.proto';
|
|
15
|
+
export { default as shadcnTabsContent } from './tabs/content.proto';
|
|
16
|
+
export { default as shadcnHoverCardRoot } from './hover-card/root.proto';
|
|
17
|
+
export { default as shadcnHoverCardTrigger } from './hover-card/trigger.proto';
|
|
18
|
+
export { default as shadcnHoverCardContent } from './hover-card/content.proto';
|
|
19
|
+
export { default as shadcnDropdownRoot } from './dropdown/root.proto';
|
|
20
|
+
export { default as shadcnDropdownTrigger } from './dropdown/trigger.proto';
|
|
21
|
+
export { default as shadcnDropdownContent } from './dropdown/content.proto';
|
|
22
|
+
export { default as shadcnDropdownItem } from './dropdown/item.proto';
|
|
23
|
+
export { default as shadcnSelectRoot } from './select/root.proto';
|
|
24
|
+
export { default as shadcnSelectTrigger } from './select/trigger.proto';
|
|
25
|
+
export { default as shadcnSelectValue } from './select/value.proto';
|
|
26
|
+
export { default as shadcnSelectContent } from './select/content.proto';
|
|
27
|
+
export { default as shadcnSelectItem } from './select/item.proto';
|
|
22
28
|
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';
|
|
29
|
+
export { default as shadcnDialogRoot } from './dialog/root.proto';
|
|
30
|
+
export { default as shadcnDialogTrigger } from './dialog/trigger.proto';
|
|
31
|
+
export { default as shadcnDialogMask } from './dialog/overlay.proto';
|
|
32
|
+
export { default as shadcnDialogContent } from './dialog/content.proto';
|
|
33
|
+
export { default as shadcnDialogTitle } from './dialog/title.proto';
|
|
34
|
+
export { default as shadcnDialogDescription } from './dialog/description.proto';
|
|
35
|
+
export { default as shadcnDialogClose } from './dialog/close.proto';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ShadcnSelectContentProps } from './types';
|
|
2
|
+
declare const selectContent: import("@proto.ui/core").Prototype<ShadcnSelectContentProps, import("@proto.ui/prototypes-base/select").SelectContentExposes>;
|
|
3
|
+
/** P-SHADCN-SELECT-CONTENT-DIRECT-ENTRY; parity is bounded by P-SHADCN-SELECT-CONTENT-COMPATIBILITY-SUBSET. */
|
|
4
|
+
export default selectContent;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asSelectContent } from '@proto.ui/prototypes-base/select';
|
|
3
|
+
const selectContent = definePrototype({
|
|
4
|
+
name: 'shadcn-select-content',
|
|
5
|
+
setup(def) {
|
|
6
|
+
// P-SHADCN-SELECT-CONTENT-POSITION-PROP
|
|
7
|
+
def.props.define({
|
|
8
|
+
position: {
|
|
9
|
+
type: 'enum',
|
|
10
|
+
empty: 'fallback',
|
|
11
|
+
options: ['item-aligned', 'popper'],
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
def.props.setDefaults({ position: 'item-aligned' });
|
|
15
|
+
// P-SHADCN-SELECT-CONTENT-BASE-INHERITANCE,
|
|
16
|
+
// P-SHADCN-SELECT-CONTENT-CURRENT-BASE-DEVIATIONS
|
|
17
|
+
const select = asSelectContent();
|
|
18
|
+
// P-SHADCN-SELECT-CONTENT-TRANSITION
|
|
19
|
+
select.asTransition.configure({ enterDuration: 150, leaveDuration: 100 });
|
|
20
|
+
const { open } = select.stateHandles;
|
|
21
|
+
const { transitionState } = select.asTransition;
|
|
22
|
+
// P-SHADCN-SELECT-CONTENT-CURRENT-VISUAL-SURFACE
|
|
23
|
+
def.feedback.style.use(tw('relative z-50 w-[var(--proto-ui-anchor-width)] min-w-[var(--proto-ui-anchor-width)] max-h-[var(--proto-ui-available-height)] overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-none transition-none duration-150'));
|
|
24
|
+
// P-SHADCN-SELECT-CONTENT-OPEN-AND-SIDE-STYLES
|
|
25
|
+
def.rule({
|
|
26
|
+
when: (w) => w.any(w.state(transitionState).eq('entering'), w.state(transitionState).eq('entered')),
|
|
27
|
+
intent: (i) => i.feedback.style.use(tw('animate-in fade-in-0 zoom-in-95')),
|
|
28
|
+
});
|
|
29
|
+
def.rule({
|
|
30
|
+
when: (w) => w.state(open).eq(false),
|
|
31
|
+
intent: (i) => i.feedback.style.use(tw('animate-out fade-out-0 zoom-out-95')),
|
|
32
|
+
});
|
|
33
|
+
def.rule({
|
|
34
|
+
when: (w) => w.all(w.state(open).eq(true), w.prop('side').eq('bottom')),
|
|
35
|
+
intent: (i) => i.feedback.style.use(tw('slide-in-from-top-2')),
|
|
36
|
+
});
|
|
37
|
+
def.rule({
|
|
38
|
+
when: (w) => w.all(w.state(open).eq(true), w.prop('side').eq('top')),
|
|
39
|
+
intent: (i) => i.feedback.style.use(tw('slide-in-from-bottom-2')),
|
|
40
|
+
});
|
|
41
|
+
def.rule({
|
|
42
|
+
when: (w) => w.all(w.state(open).eq(true), w.prop('side').eq('left')),
|
|
43
|
+
intent: (i) => i.feedback.style.use(tw('slide-in-from-right-2')),
|
|
44
|
+
});
|
|
45
|
+
def.rule({
|
|
46
|
+
when: (w) => w.all(w.state(open).eq(true), w.prop('side').eq('right')),
|
|
47
|
+
intent: (i) => i.feedback.style.use(tw('slide-in-from-left-2')),
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
/** P-SHADCN-SELECT-CONTENT-DIRECT-ENTRY; parity is bounded by P-SHADCN-SELECT-CONTENT-COMPATIBILITY-SUBSET. */
|
|
52
|
+
export default selectContent;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as selectRoot } from './root.proto';
|
|
2
|
+
export { default as selectTrigger } from './trigger.proto';
|
|
3
|
+
export { default as selectValue } from './value.proto';
|
|
4
|
+
export { default as selectContent } from './content.proto';
|
|
5
|
+
export { default as selectItem } from './item.proto';
|
|
6
|
+
export { default as shadcnSelectRoot } from './root.proto';
|
|
7
|
+
export { default as shadcnSelectTrigger } from './trigger.proto';
|
|
8
|
+
export { default as shadcnSelectValue } from './value.proto';
|
|
9
|
+
export { default as shadcnSelectContent } from './content.proto';
|
|
10
|
+
export { default as shadcnSelectItem } from './item.proto';
|
|
11
|
+
export type { ShadcnSelectRootProps, ShadcnSelectRootExposes, ShadcnSelectRootAsHookContract, ShadcnSelectTriggerProps, ShadcnSelectTriggerExposes, ShadcnSelectTriggerAsHookContract, ShadcnSelectValueProps, ShadcnSelectValueExposes, ShadcnSelectValueAsHookContract, ShadcnSelectContentProps, ShadcnSelectContentExposes, ShadcnSelectContentAsHookContract, ShadcnSelectItemProps, ShadcnSelectItemExposes, ShadcnSelectItemAsHookContract, } from './types';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as selectRoot } from './root.proto';
|
|
2
|
+
export { default as selectTrigger } from './trigger.proto';
|
|
3
|
+
export { default as selectValue } from './value.proto';
|
|
4
|
+
export { default as selectContent } from './content.proto';
|
|
5
|
+
export { default as selectItem } from './item.proto';
|
|
6
|
+
export { default as shadcnSelectRoot } from './root.proto';
|
|
7
|
+
export { default as shadcnSelectTrigger } from './trigger.proto';
|
|
8
|
+
export { default as shadcnSelectValue } from './value.proto';
|
|
9
|
+
export { default as shadcnSelectContent } from './content.proto';
|
|
10
|
+
export { default as shadcnSelectItem } from './item.proto';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const selectItem: import("@proto.ui/core").Prototype<import("@proto.ui/prototypes-base/select").SelectItemProps, import("@proto.ui/prototypes-base/select").SelectItemExposes>;
|
|
2
|
+
/** P-SHADCN-SELECT-ITEM-DIRECT-ENTRY; parity is bounded by P-SHADCN-SELECT-ITEM-COMPATIBILITY-SUBSET. */
|
|
3
|
+
export default selectItem;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { definePrototype, delay, tw } from '@proto.ui/core';
|
|
2
|
+
import { asSelectItem } from '@proto.ui/prototypes-base/select';
|
|
3
|
+
function renderCheck(renderer, selected) {
|
|
4
|
+
return renderer.el('span', { style: tw('pointer-events-none flex size-5 shrink-0 items-center justify-center') }, selected
|
|
5
|
+
? renderer.svg.root({
|
|
6
|
+
viewBox: '0 0 24 24',
|
|
7
|
+
width: 16,
|
|
8
|
+
height: 16,
|
|
9
|
+
fill: 'none',
|
|
10
|
+
stroke: 'currentColor',
|
|
11
|
+
strokeWidth: 2,
|
|
12
|
+
strokeLinecap: 'round',
|
|
13
|
+
strokeLinejoin: 'round',
|
|
14
|
+
}, renderer.svg.path({ d: 'm20 6-11 11-5-5' }))
|
|
15
|
+
: null);
|
|
16
|
+
}
|
|
17
|
+
const selectItem = definePrototype({
|
|
18
|
+
name: 'shadcn-select-item',
|
|
19
|
+
setup(def) {
|
|
20
|
+
// P-SHADCN-SELECT-ITEM-BASE-INHERITANCE,
|
|
21
|
+
// P-SHADCN-SELECT-ITEM-CURRENT-BASE-DEVIATIONS
|
|
22
|
+
const state = asSelectItem().stateHandles;
|
|
23
|
+
if (!state)
|
|
24
|
+
throw new Error('[shadcn-select-item] Select Item must project option states.');
|
|
25
|
+
const { disabled, hovered, focused, focusVisible, pressed, active, selected } = state;
|
|
26
|
+
// P-SHADCN-SELECT-ITEM-CURRENT-VISUAL-SURFACE
|
|
27
|
+
def.feedback.style.use(tw('relative flex w-full cursor-default items-center justify-between gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none'));
|
|
28
|
+
// P-SHADCN-SELECT-ITEM-STATE-DRIVEN-STYLES
|
|
29
|
+
def.rule({
|
|
30
|
+
when: (w) => w.any(w.state(active).eq(true), w.state(hovered).eq(true), w.state(focused).eq(true), w.state(focusVisible).eq(true)),
|
|
31
|
+
intent: (i) => i.feedback.style.use(tw('bg-accent text-accent-foreground')),
|
|
32
|
+
});
|
|
33
|
+
def.rule({
|
|
34
|
+
when: (w) => w.state(pressed).eq(true),
|
|
35
|
+
intent: (i) => i.feedback.style.use(tw('bg-accent/80')),
|
|
36
|
+
});
|
|
37
|
+
def.rule({
|
|
38
|
+
when: (w) => w.state(disabled).eq(true),
|
|
39
|
+
intent: (i) => i.feedback.style.use(tw('pointer-events-none opacity-50')),
|
|
40
|
+
});
|
|
41
|
+
let renderTask = null;
|
|
42
|
+
// P-SHADCN-SELECT-ITEM-SELECTED-INDICATOR
|
|
43
|
+
selected.watch((run, event) => {
|
|
44
|
+
if (event.type !== 'next')
|
|
45
|
+
return;
|
|
46
|
+
renderTask?.cancel();
|
|
47
|
+
renderTask = delay(0, () => {
|
|
48
|
+
renderTask = null;
|
|
49
|
+
run.update();
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
def.lifecycle.onUnmounted(() => {
|
|
53
|
+
renderTask?.cancel();
|
|
54
|
+
renderTask = null;
|
|
55
|
+
});
|
|
56
|
+
return (renderer) => [renderer.r.slot(), renderCheck(renderer, selected.get())];
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
/** P-SHADCN-SELECT-ITEM-DIRECT-ENTRY; parity is bounded by P-SHADCN-SELECT-ITEM-COMPATIBILITY-SUBSET. */
|
|
60
|
+
export default selectItem;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const selectRoot: import("@proto.ui/core").Prototype<import("@proto.ui/prototypes-base/select").SelectRootProps, import("@proto.ui/prototypes-base/select").SelectRootExposes>;
|
|
2
|
+
/** P-SHADCN-SELECT-DIRECT-ENTRY; parity is bounded by P-SHADCN-SELECT-COMPATIBILITY-SUBSET. */
|
|
3
|
+
export default selectRoot;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { definePrototype } from '@proto.ui/core';
|
|
2
|
+
import { asSelectRoot } from '@proto.ui/prototypes-base/select';
|
|
3
|
+
const selectRoot = definePrototype({
|
|
4
|
+
name: 'shadcn-select-root',
|
|
5
|
+
setup() {
|
|
6
|
+
// P-SHADCN-SELECT-BASE-INHERITANCE, P-SHADCN-SELECT-CURRENT-BASE-DEVIATIONS
|
|
7
|
+
asSelectRoot();
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
/** P-SHADCN-SELECT-DIRECT-ENTRY; parity is bounded by P-SHADCN-SELECT-COMPATIBILITY-SUBSET. */
|
|
11
|
+
export default selectRoot;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ShadcnSelectTriggerProps } from './types';
|
|
2
|
+
declare const selectTrigger: import("@proto.ui/core").Prototype<ShadcnSelectTriggerProps, import("@proto.ui/prototypes-base/select").SelectTriggerExposes>;
|
|
3
|
+
/** P-SHADCN-SELECT-TRIGGER-DIRECT-ENTRY; parity is bounded by P-SHADCN-SELECT-TRIGGER-COMPATIBILITY-SUBSET. */
|
|
4
|
+
export default selectTrigger;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asSelectTrigger } from '@proto.ui/prototypes-base/select';
|
|
3
|
+
function renderChevron(renderer) {
|
|
4
|
+
return renderer.el('span', { style: tw('pointer-events-none flex shrink-0 items-center opacity-50') }, renderer.svg.root({
|
|
5
|
+
viewBox: '0 0 24 24',
|
|
6
|
+
width: 16,
|
|
7
|
+
height: 16,
|
|
8
|
+
fill: 'none',
|
|
9
|
+
stroke: 'currentColor',
|
|
10
|
+
strokeWidth: 2,
|
|
11
|
+
strokeLinecap: 'round',
|
|
12
|
+
strokeLinejoin: 'round',
|
|
13
|
+
}, renderer.svg.path({ d: 'm6 9 6 6 6-6' })));
|
|
14
|
+
}
|
|
15
|
+
const selectTrigger = definePrototype({
|
|
16
|
+
name: 'shadcn-select-trigger',
|
|
17
|
+
setup(def) {
|
|
18
|
+
// P-SHADCN-SELECT-TRIGGER-SIZE-PROP
|
|
19
|
+
def.props.define({
|
|
20
|
+
size: { type: 'enum', empty: 'fallback', options: ['sm', 'default'] },
|
|
21
|
+
});
|
|
22
|
+
def.props.setDefaults({ size: 'default' });
|
|
23
|
+
// P-SHADCN-SELECT-TRIGGER-BASE-INHERITANCE,
|
|
24
|
+
// P-SHADCN-SELECT-TRIGGER-CURRENT-BASE-DEVIATIONS
|
|
25
|
+
const state = asSelectTrigger().stateHandles;
|
|
26
|
+
if (!state) {
|
|
27
|
+
throw new Error('[shadcn-select-trigger] Select Trigger must project command states.');
|
|
28
|
+
}
|
|
29
|
+
const { disabled, hovered, focusVisible, pressed, placeholder } = state;
|
|
30
|
+
// P-SHADCN-SELECT-TRIGGER-CURRENT-VISUAL-SURFACE
|
|
31
|
+
def.feedback.style.use(tw('flex items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-colors outline-none select-none'));
|
|
32
|
+
// P-SHADCN-SELECT-TRIGGER-STATE-DRIVEN-STYLES
|
|
33
|
+
def.rule({
|
|
34
|
+
when: (w) => w.prop('size').eq('default'),
|
|
35
|
+
intent: (i) => i.feedback.style.use(tw('h-9')),
|
|
36
|
+
});
|
|
37
|
+
def.rule({
|
|
38
|
+
when: (w) => w.prop('size').eq('sm'),
|
|
39
|
+
intent: (i) => i.feedback.style.use(tw('h-8')),
|
|
40
|
+
});
|
|
41
|
+
def.rule({
|
|
42
|
+
when: (w) => w.state(placeholder).eq(true),
|
|
43
|
+
intent: (i) => i.feedback.style.use(tw('text-muted-foreground')),
|
|
44
|
+
});
|
|
45
|
+
def.rule({
|
|
46
|
+
when: (w) => w.state(hovered).eq(true),
|
|
47
|
+
intent: (i) => i.feedback.style.use(tw('bg-input/50')),
|
|
48
|
+
});
|
|
49
|
+
def.rule({
|
|
50
|
+
when: (w) => w.state(focusVisible).eq(true),
|
|
51
|
+
intent: (i) => i.feedback.style.use(tw('border-ring ring-3 ring-ring/50')),
|
|
52
|
+
});
|
|
53
|
+
def.rule({
|
|
54
|
+
when: (w) => w.state(pressed).eq(true),
|
|
55
|
+
intent: (i) => i.feedback.style.use(tw('bg-input/70')),
|
|
56
|
+
});
|
|
57
|
+
def.rule({
|
|
58
|
+
when: (w) => w.state(disabled).eq(true),
|
|
59
|
+
intent: (i) => i.feedback.style.use(tw('pointer-events-none opacity-50')),
|
|
60
|
+
});
|
|
61
|
+
// P-SHADCN-SELECT-TRIGGER-CHEVRON
|
|
62
|
+
return (renderer) => [renderer.r.slot(), renderChevron(renderer)];
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
/** P-SHADCN-SELECT-TRIGGER-DIRECT-ENTRY; parity is bounded by P-SHADCN-SELECT-TRIGGER-COMPATIBILITY-SUBSET. */
|
|
66
|
+
export default selectTrigger;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SelectContentAsHookContract, SelectContentExposes, SelectContentProps, SelectItemAsHookContract, SelectItemExposes, SelectItemProps, SelectRootAsHookContract, SelectRootExposes, SelectRootProps, SelectTriggerAsHookContract, SelectTriggerExposes, SelectTriggerProps, SelectValueAsHookContract, SelectValueExposes, SelectValueProps } from '@proto.ui/prototypes-base/select';
|
|
2
|
+
export type ShadcnSelectRootProps = SelectRootProps;
|
|
3
|
+
export type ShadcnSelectRootExposes = SelectRootExposes;
|
|
4
|
+
export type ShadcnSelectRootAsHookContract = SelectRootAsHookContract;
|
|
5
|
+
export interface ShadcnSelectTriggerProps extends SelectTriggerProps {
|
|
6
|
+
size?: 'sm' | 'default';
|
|
7
|
+
}
|
|
8
|
+
export type ShadcnSelectTriggerExposes = SelectTriggerExposes;
|
|
9
|
+
export type ShadcnSelectTriggerAsHookContract = SelectTriggerAsHookContract;
|
|
10
|
+
export type ShadcnSelectValueProps = SelectValueProps;
|
|
11
|
+
export type ShadcnSelectValueExposes = SelectValueExposes;
|
|
12
|
+
export type ShadcnSelectValueAsHookContract = SelectValueAsHookContract;
|
|
13
|
+
export interface ShadcnSelectContentProps extends SelectContentProps {
|
|
14
|
+
position?: 'item-aligned' | 'popper';
|
|
15
|
+
}
|
|
16
|
+
export type ShadcnSelectContentExposes = SelectContentExposes;
|
|
17
|
+
export type ShadcnSelectContentAsHookContract = SelectContentAsHookContract;
|
|
18
|
+
export type ShadcnSelectItemProps = SelectItemProps;
|
|
19
|
+
export type ShadcnSelectItemExposes = SelectItemExposes;
|
|
20
|
+
export type ShadcnSelectItemAsHookContract = SelectItemAsHookContract;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const selectValue: import("@proto.ui/core").Prototype<import("@proto.ui/prototypes-base/select").SelectValueProps, import("@proto.ui/prototypes-base/select").SelectValueExposes>;
|
|
2
|
+
/** P-SHADCN-SELECT-VALUE-DIRECT-ENTRY; parity is bounded by P-SHADCN-SELECT-VALUE-COMPATIBILITY-SUBSET. */
|
|
3
|
+
export default selectValue;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { definePrototype } from '@proto.ui/core';
|
|
2
|
+
import { asSelectValue } from '@proto.ui/prototypes-base/select';
|
|
3
|
+
const selectValue = definePrototype({
|
|
4
|
+
name: 'shadcn-select-value',
|
|
5
|
+
setup() {
|
|
6
|
+
// P-SHADCN-SELECT-VALUE-BASE-INHERITANCE,
|
|
7
|
+
// P-SHADCN-SELECT-VALUE-CURRENT-BASE-DEVIATIONS,
|
|
8
|
+
// P-SHADCN-SELECT-VALUE-DISPLAY-RENDER
|
|
9
|
+
const value = asSelectValue().stateHandles;
|
|
10
|
+
if (!value)
|
|
11
|
+
throw new Error('[shadcn-select-value] Select Value must project displayValue.');
|
|
12
|
+
return () => (value.displayValue.get() ? [value.displayValue.get()] : null);
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
/** P-SHADCN-SELECT-VALUE-DIRECT-ENTRY; parity is bounded by P-SHADCN-SELECT-VALUE-COMPATIBILITY-SUBSET. */
|
|
16
|
+
export default selectValue;
|
package/dist/switch/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import switchRoot from './root';
|
|
2
|
-
import switchThumb from './thumb';
|
|
1
|
+
import switchRoot from './root.proto';
|
|
2
|
+
import switchThumb from './thumb.proto';
|
|
3
3
|
export type { ShadcnSwitchRootProps, ShadcnSwitchRootExposes, ShadcnSwitchRootStateHandles, ShadcnSwitchRootAsHookContract, ShadcnSwitchThumbProps, ShadcnSwitchThumbExposes, ShadcnSwitchThumbAsHookContract, } from './types';
|
|
4
4
|
export { switchRoot, switchThumb };
|
|
5
|
-
export { default as shadcnSwitchRoot } from './root';
|
|
6
|
-
export { default as shadcnSwitchThumb } from './thumb';
|
|
5
|
+
export { default as shadcnSwitchRoot } from './root.proto';
|
|
6
|
+
export { default as shadcnSwitchThumb } from './thumb.proto';
|
package/dist/switch/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import switchRoot from './root';
|
|
2
|
-
import switchThumb from './thumb';
|
|
1
|
+
import switchRoot from './root.proto';
|
|
2
|
+
import switchThumb from './thumb.proto';
|
|
3
3
|
export { switchRoot, switchThumb };
|
|
4
|
-
export { default as shadcnSwitchRoot } from './root';
|
|
5
|
-
export { default as shadcnSwitchThumb } from './thumb';
|
|
4
|
+
export { default as shadcnSwitchRoot } from './root.proto';
|
|
5
|
+
export { default as shadcnSwitchThumb } from './thumb.proto';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ShadcnSwitchRootProps } from './types';
|
|
2
|
+
declare const switchRoot: import("@proto.ui/core").Prototype<ShadcnSwitchRootProps, import("@proto.ui/prototypes-base/switch").SwitchRootExposes>;
|
|
3
|
+
/**
|
|
4
|
+
* P-SHADCN-SWITCH-DIRECT-ENTRY exposes the current Root projection.
|
|
5
|
+
* P-SHADCN-SWITCH-COMPATIBILITY-SUBSET and P-SHADCN-SWITCH-AS-CHILD-OMISSION
|
|
6
|
+
* keep upstream parity outside the passing claim unless it is implemented and tested.
|
|
7
|
+
*/
|
|
8
|
+
export default switchRoot;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
-
import { asSwitchRoot } from '@proto.ui/prototypes-base';
|
|
2
|
+
import { asSwitchRoot } from '@proto.ui/prototypes-base/switch';
|
|
3
3
|
const ROOT_BASE_TOKENS = [
|
|
4
4
|
'peer',
|
|
5
5
|
'inline-flex',
|
|
@@ -11,7 +11,7 @@ const ROOT_BASE_TOKENS = [
|
|
|
11
11
|
'border',
|
|
12
12
|
'border-transparent',
|
|
13
13
|
'pl-0.5',
|
|
14
|
-
'pr-[
|
|
14
|
+
'pr-[20px]',
|
|
15
15
|
'shadow-xs',
|
|
16
16
|
'transition-all',
|
|
17
17
|
'duration-200',
|
|
@@ -23,16 +23,19 @@ const ROOT_BASE_TOKENS = [
|
|
|
23
23
|
const switchRoot = definePrototype({
|
|
24
24
|
name: 'shadcn-switch-root',
|
|
25
25
|
setup(def) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
// P-SHADCN-SWITCH-BASE-INHERITANCE,
|
|
27
|
+
// P-SHADCN-SWITCH-CURRENT-BASE-DEVIATIONS
|
|
28
|
+
const switchState = asSwitchRoot().stateHandles;
|
|
29
|
+
if (!switchState) {
|
|
30
|
+
throw new Error('[shadcn-switch-root] asSwitchRoot must project Switch root state handles.');
|
|
31
|
+
}
|
|
32
|
+
const { checked, disabled, hovered, focusVisible, pressed } = switchState;
|
|
33
|
+
// P-SHADCN-SWITCH-CURRENT-VISUAL-SURFACE
|
|
32
34
|
def.feedback.style.use(tw(ROOT_BASE_TOKENS));
|
|
35
|
+
// P-SHADCN-SWITCH-STATE-DRIVEN-STYLES
|
|
33
36
|
def.rule({
|
|
34
37
|
when: (w) => w.state(checked).eq(true),
|
|
35
|
-
intent: (i) => i.feedback.style.use(tw('pl-[
|
|
38
|
+
intent: (i) => i.feedback.style.use(tw('pl-[20px] pr-0.5 bg-primary text-primary-foreground')),
|
|
36
39
|
});
|
|
37
40
|
def.rule({
|
|
38
41
|
when: (w) => w.all(w.state(checked).eq(false), w.state(hovered).eq(true)),
|
|
@@ -47,6 +50,8 @@ const switchRoot = definePrototype({
|
|
|
47
50
|
intent: (i) => i.feedback.style.use(tw('scale-[0.98]')),
|
|
48
51
|
});
|
|
49
52
|
def.rule({
|
|
53
|
+
// Use the Switch-root focusVisible handle so web style projection can emit
|
|
54
|
+
// data-[focus-visible] tokens for custom-element focus.
|
|
50
55
|
when: (w) => w.state(focusVisible).eq(true),
|
|
51
56
|
intent: (i) => i.feedback.style.use(tw('ring-3 ring-ring/50 ring-offset-2 ring-offset-background')),
|
|
52
57
|
});
|
|
@@ -64,4 +69,9 @@ const switchRoot = definePrototype({
|
|
|
64
69
|
});
|
|
65
70
|
},
|
|
66
71
|
});
|
|
72
|
+
/**
|
|
73
|
+
* P-SHADCN-SWITCH-DIRECT-ENTRY exposes the current Root projection.
|
|
74
|
+
* P-SHADCN-SWITCH-COMPATIBILITY-SUBSET and P-SHADCN-SWITCH-AS-CHILD-OMISSION
|
|
75
|
+
* keep upstream parity outside the passing claim unless it is implemented and tested.
|
|
76
|
+
*/
|
|
67
77
|
export default switchRoot;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ShadcnSwitchThumbProps } from './types';
|
|
2
|
+
declare const switchThumb: import("@proto.ui/core").Prototype<ShadcnSwitchThumbProps, import("@proto.ui/prototypes-base/switch").SwitchThumbExposes>;
|
|
3
|
+
/**
|
|
4
|
+
* P-SHADCN-SWITCH-THUMB-DIRECT-ENTRY exposes the current anatomy part.
|
|
5
|
+
* P-SHADCN-SWITCH-THUMB-COMPATIBILITY-SUBSET keeps the upstream composition
|
|
6
|
+
* and token differences outside the passing claim.
|
|
7
|
+
*/
|
|
8
|
+
export default switchThumb;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
-
import { asSwitchThumb } from '@proto.ui/prototypes-base';
|
|
2
|
+
import { asSwitchThumb } from '@proto.ui/prototypes-base/switch';
|
|
3
3
|
const THUMB_TOKENS = [
|
|
4
4
|
'pointer-events-none',
|
|
5
5
|
'block',
|
|
@@ -19,8 +19,17 @@ const THUMB_TOKENS = [
|
|
|
19
19
|
const switchThumb = definePrototype({
|
|
20
20
|
name: 'shadcn-switch-thumb',
|
|
21
21
|
setup(def) {
|
|
22
|
+
// P-SHADCN-SWITCH-THUMB-BASE-INHERITANCE,
|
|
23
|
+
// P-SHADCN-SWITCH-THUMB-CURRENT-BASE-DEVIATIONS,
|
|
24
|
+
// P-SHADCN-SWITCH-THUMB-CONTEXT-INDICATOR
|
|
22
25
|
asSwitchThumb();
|
|
26
|
+
// P-SHADCN-SWITCH-THUMB-CURRENT-VISUAL-SURFACE
|
|
23
27
|
def.feedback.style.use(tw(THUMB_TOKENS));
|
|
24
28
|
},
|
|
25
29
|
});
|
|
30
|
+
/**
|
|
31
|
+
* P-SHADCN-SWITCH-THUMB-DIRECT-ENTRY exposes the current anatomy part.
|
|
32
|
+
* P-SHADCN-SWITCH-THUMB-COMPATIBILITY-SUBSET keeps the upstream composition
|
|
33
|
+
* and token differences outside the passing claim.
|
|
34
|
+
*/
|
|
26
35
|
export default switchThumb;
|
package/dist/switch/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SwitchRootAsHookContract, SwitchRootExposes, SwitchRootProps, SwitchRootStateHandles, SwitchThumbAsHookContract, SwitchThumbExposes, SwitchThumbProps, SwitchThumbStateHandles } from '@proto.ui/prototypes-base';
|
|
1
|
+
import type { SwitchRootAsHookContract, SwitchRootExposes, SwitchRootProps, SwitchRootStateHandles, SwitchThumbAsHookContract, SwitchThumbExposes, SwitchThumbProps, SwitchThumbStateHandles } from '@proto.ui/prototypes-base/switch';
|
|
2
2
|
export interface ShadcnSwitchRootProps extends SwitchRootProps {
|
|
3
3
|
}
|
|
4
4
|
export type ShadcnSwitchRootExposes = SwitchRootExposes;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ShadcnTabsContentProps } from './types';
|
|
2
|
+
declare const tabsContent: import("@proto.ui/core").Prototype<ShadcnTabsContentProps, import("@proto.ui/prototypes-base/tabs").TabsContentExposes>;
|
|
3
|
+
/** P-SHADCN-TABS-CONTENT-DIRECT-ENTRY; parity remains bounded by P-SHADCN-TABS-CONTENT-COMPATIBILITY-SUBSET. */
|
|
4
|
+
export default tabsContent;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asTabsContent } from '@proto.ui/prototypes-base/tabs';
|
|
3
|
+
const tabsContent = definePrototype({
|
|
4
|
+
name: 'shadcn-tabs-content',
|
|
5
|
+
setup(def) {
|
|
6
|
+
// P-SHADCN-TABS-CONTENT-BASE-INHERITANCE,
|
|
7
|
+
// P-SHADCN-TABS-CONTENT-CURRENT-BASE-DEVIATIONS
|
|
8
|
+
const contentState = asTabsContent().stateHandles;
|
|
9
|
+
if (!contentState) {
|
|
10
|
+
throw new Error('[shadcn-tabs-content] asTabsContent must project Tabs content state handles.');
|
|
11
|
+
}
|
|
12
|
+
const { hidden } = contentState;
|
|
13
|
+
// P-SHADCN-TABS-CONTENT-CURRENT-VISUAL-SURFACE
|
|
14
|
+
def.feedback.style.use(tw('block w-full min-h-28 rounded-xl border border-border/60 bg-background p-4 text-sm leading-6 shadow-xs outline-none'));
|
|
15
|
+
// P-SHADCN-TABS-CONTENT-HIDDEN-PROJECTION
|
|
16
|
+
def.rule({
|
|
17
|
+
when: (w) => w.state(hidden).eq(true),
|
|
18
|
+
intent: (i) => i.feedback.style.use(tw('hidden')),
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
/** P-SHADCN-TABS-CONTENT-DIRECT-ENTRY; parity remains bounded by P-SHADCN-TABS-CONTENT-COMPATIBILITY-SUBSET. */
|
|
23
|
+
export default tabsContent;
|
package/dist/tabs/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import tabsContent from './content';
|
|
2
|
-
import tabsList from './list';
|
|
3
|
-
import tabsRoot from './root';
|
|
4
|
-
import tabsTrigger from './trigger';
|
|
1
|
+
import tabsContent from './content.proto';
|
|
2
|
+
import tabsList from './list.proto';
|
|
3
|
+
import tabsRoot from './root.proto';
|
|
4
|
+
import tabsTrigger from './trigger.proto';
|
|
5
5
|
export type { ShadcnTabsRootProps, ShadcnTabsRootExposes, ShadcnTabsRootAsHookContract, ShadcnTabsListProps, ShadcnTabsListExposes, ShadcnTabsListAsHookContract, ShadcnTabsTriggerProps, ShadcnTabsTriggerExposes, ShadcnTabsTriggerStateHandles, ShadcnTabsTriggerAsHookContract, ShadcnTabsContentProps, ShadcnTabsContentExposes, ShadcnTabsContentAsHookContract, } from './types';
|
|
6
6
|
export { tabsRoot, tabsList, tabsTrigger, tabsContent };
|
|
7
|
-
export { default as shadcnTabsRoot } from './root';
|
|
8
|
-
export { default as shadcnTabsList } from './list';
|
|
9
|
-
export { default as shadcnTabsTrigger } from './trigger';
|
|
10
|
-
export { default as shadcnTabsContent } from './content';
|
|
7
|
+
export { default as shadcnTabsRoot } from './root.proto';
|
|
8
|
+
export { default as shadcnTabsList } from './list.proto';
|
|
9
|
+
export { default as shadcnTabsTrigger } from './trigger.proto';
|
|
10
|
+
export { default as shadcnTabsContent } from './content.proto';
|
package/dist/tabs/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import tabsContent from './content';
|
|
2
|
-
import tabsList from './list';
|
|
3
|
-
import tabsRoot from './root';
|
|
4
|
-
import tabsTrigger from './trigger';
|
|
1
|
+
import tabsContent from './content.proto';
|
|
2
|
+
import tabsList from './list.proto';
|
|
3
|
+
import tabsRoot from './root.proto';
|
|
4
|
+
import tabsTrigger from './trigger.proto';
|
|
5
5
|
export { tabsRoot, tabsList, tabsTrigger, tabsContent };
|
|
6
|
-
export { default as shadcnTabsRoot } from './root';
|
|
7
|
-
export { default as shadcnTabsList } from './list';
|
|
8
|
-
export { default as shadcnTabsTrigger } from './trigger';
|
|
9
|
-
export { default as shadcnTabsContent } from './content';
|
|
6
|
+
export { default as shadcnTabsRoot } from './root.proto';
|
|
7
|
+
export { default as shadcnTabsList } from './list.proto';
|
|
8
|
+
export { default as shadcnTabsTrigger } from './trigger.proto';
|
|
9
|
+
export { default as shadcnTabsContent } from './content.proto';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ShadcnTabsListProps } from './types';
|
|
2
|
+
declare const tabsList: import("@proto.ui/core").Prototype<ShadcnTabsListProps, import("@proto.ui/prototypes-base/tabs").TabsListExposes>;
|
|
3
|
+
/** P-SHADCN-TABS-LIST-DIRECT-ENTRY; parity remains bounded by P-SHADCN-TABS-LIST-COMPATIBILITY-SUBSET. */
|
|
4
|
+
export default tabsList;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asTabsList } from '@proto.ui/prototypes-base/tabs';
|
|
3
|
+
const tabsList = definePrototype({
|
|
4
|
+
name: 'shadcn-tabs-list',
|
|
5
|
+
setup(def) {
|
|
6
|
+
// P-SHADCN-TABS-LIST-BASE-INHERITANCE, P-SHADCN-TABS-LIST-CURRENT-BASE-DEVIATIONS
|
|
7
|
+
asTabsList();
|
|
8
|
+
// P-SHADCN-TABS-LIST-CURRENT-VISUAL-SURFACE
|
|
9
|
+
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'));
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
/** P-SHADCN-TABS-LIST-DIRECT-ENTRY; parity remains bounded by P-SHADCN-TABS-LIST-COMPATIBILITY-SUBSET. */
|
|
13
|
+
export default tabsList;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ShadcnTabsRootProps } from './types';
|
|
2
|
+
declare const tabsRoot: import("@proto.ui/core").Prototype<ShadcnTabsRootProps, import("@proto.ui/prototypes-base/tabs").TabsRootExposes>;
|
|
3
|
+
/** P-SHADCN-TABS-DIRECT-ENTRY; parity remains bounded by P-SHADCN-TABS-COMPATIBILITY-SUBSET. */
|
|
4
|
+
export default tabsRoot;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { definePrototype, tw } from '@proto.ui/core';
|
|
2
|
+
import { asTabsRoot } from '@proto.ui/prototypes-base/tabs';
|
|
3
|
+
const tabsRoot = definePrototype({
|
|
4
|
+
name: 'shadcn-tabs-root',
|
|
5
|
+
setup(def) {
|
|
6
|
+
// P-SHADCN-TABS-BASE-INHERITANCE, P-SHADCN-TABS-CURRENT-BASE-DEVIATIONS
|
|
7
|
+
asTabsRoot();
|
|
8
|
+
// P-SHADCN-TABS-CURRENT-VISUAL-SURFACE
|
|
9
|
+
def.feedback.style.use(tw('flex flex-col gap-3 text-foreground'));
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
/** P-SHADCN-TABS-DIRECT-ENTRY; parity remains bounded by P-SHADCN-TABS-COMPATIBILITY-SUBSET. */
|
|
13
|
+
export default tabsRoot;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ShadcnTabsTriggerProps } from './types';
|
|
2
|
+
declare const tabsTrigger: import("@proto.ui/core").Prototype<ShadcnTabsTriggerProps, import("@proto.ui/prototypes-base/tabs").TabsTriggerExposes>;
|
|
3
|
+
/** P-SHADCN-TABS-TRIGGER-DIRECT-ENTRY; parity remains bounded by P-SHADCN-TABS-TRIGGER-COMPATIBILITY-SUBSET. */
|
|
4
|
+
export default tabsTrigger;
|