@code0-tech/pictor 0.0.0-mvp.8 → 0.0.0-mvp.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.tab[data-orientation=vertical],.tab__list{display:flex}.tab__list[data-orientation=vertical]{flex-direction:column}.tab__trigger{background:transparent;border:none;padding:0;margin:0;position:relative;box-sizing:border-box}.tab__trigger:after{content:"";position:absolute;background:transparent;border-radius:50rem}.tab__trigger[data-orientation=vertical]:after{height:100%;width:2px;top:0;left:0}.tab__trigger[data-orientation=horizontal]:after{width:100%;height:2px;bottom:0;left:0}.tab__trigger[aria-selected=true][data-orientation=vertical]:after,.tab__trigger[aria-selected=true][data-orientation=horizontal]:after{background:#70ffb2}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Menu as
|
|
4
|
-
import { DUserReactiveService as
|
|
5
|
-
import { useService as
|
|
6
|
-
import { Avatar as
|
|
7
|
-
import { Text as
|
|
8
|
-
import { Flex as
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ i(
|
|
2
|
+
import o from "react";
|
|
3
|
+
import { Menu as l, MenuTrigger as u, MenuPortal as d, MenuContent as h } from "../menu/Menu.js";
|
|
4
|
+
import { DUserReactiveService as s } from "./DUser.service.js";
|
|
5
|
+
import { useService as f, useStore as x } from "../../utils/contextStore.js";
|
|
6
|
+
import { Avatar as y } from "../avatar/Avatar.js";
|
|
7
|
+
import { Text as c } from "../text/Text.js";
|
|
8
|
+
import { Flex as m } from "../flex/Flex.js";
|
|
9
|
+
const z = (t) => {
|
|
10
|
+
const n = f(s), a = x(s), r = o.useMemo(() => n.getById(t.userId), [a, n]);
|
|
11
|
+
return o.useMemo(() => /* @__PURE__ */ i(l, { ...t, children: [
|
|
12
|
+
/* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ i(m, { align: "center", style: {
|
|
13
13
|
gap: ".5rem"
|
|
14
14
|
}, children: [
|
|
15
|
-
/* @__PURE__ */ e(
|
|
16
|
-
/* @__PURE__ */ i(
|
|
15
|
+
/* @__PURE__ */ e(y, { src: r?.avatarPath ?? "", identifier: r?.username ?? "" }),
|
|
16
|
+
/* @__PURE__ */ i(m, { style: {
|
|
17
17
|
flexDirection: "column"
|
|
18
18
|
}, children: [
|
|
19
|
-
/* @__PURE__ */ e(
|
|
20
|
-
/* @__PURE__ */ e(
|
|
19
|
+
/* @__PURE__ */ e(c, { size: "md", hierarchy: "secondary", children: r?.username }),
|
|
20
|
+
/* @__PURE__ */ e(c, { size: "xs", hierarchy: "tertiary", children: r?.email })
|
|
21
21
|
] })
|
|
22
22
|
] }) }),
|
|
23
|
-
/* @__PURE__ */ e(
|
|
24
|
-
] }), [
|
|
23
|
+
/* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(h, { side: "bottom", align: "start", sideOffset: 8, children: t.children }) })
|
|
24
|
+
] }), [r]);
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
z as default
|
|
28
28
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Code0ComponentProps } from '../../utils';
|
|
3
|
+
import { TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps } from '@radix-ui/react-tabs';
|
|
4
|
+
export type TabProps = Code0ComponentProps & TabsProps;
|
|
5
|
+
export type TabListProps = Code0ComponentProps & TabsListProps;
|
|
6
|
+
export type TabTriggerProps = Code0ComponentProps & TabsTriggerProps;
|
|
7
|
+
export type TabContentProps = Code0ComponentProps & TabsContentProps;
|
|
8
|
+
export declare const Tab: React.FC<TabProps>;
|
|
9
|
+
export declare const TabList: React.FC<TabListProps>;
|
|
10
|
+
export declare const TabTrigger: React.FC<TabTriggerProps>;
|
|
11
|
+
export declare const TabContent: React.FC<TabContentProps>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as n } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import "../../utils/contextStore.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { mergeCode0Props as r } from "../../utils/utils.js";
|
|
6
|
+
import { Tabs as c, List as m, Trigger as b, Content as f } from "@radix-ui/react-tabs";
|
|
7
|
+
import '../../assets/components/tab/Tab.style.css';/* empty css */
|
|
8
|
+
const x = (a) => {
|
|
9
|
+
const t = n.c(4);
|
|
10
|
+
let e;
|
|
11
|
+
t[0] !== a ? (e = r("tab", a), t[0] = a, t[1] = e) : e = t[1];
|
|
12
|
+
let l;
|
|
13
|
+
return t[2] !== e ? (l = /* @__PURE__ */ o(c, { "data-slot": "tabs", ...e }), t[2] = e, t[3] = l) : l = t[3], l;
|
|
14
|
+
}, C = (a) => {
|
|
15
|
+
const t = n.c(4);
|
|
16
|
+
let e;
|
|
17
|
+
t[0] !== a ? (e = r("tab__list", a), t[0] = a, t[1] = e) : e = t[1];
|
|
18
|
+
let l;
|
|
19
|
+
return t[2] !== e ? (l = /* @__PURE__ */ o(m, { "data-slot": "tabs", ...e }), t[2] = e, t[3] = l) : l = t[3], l;
|
|
20
|
+
}, L = (a) => {
|
|
21
|
+
const t = n.c(5), e = a.value;
|
|
22
|
+
let l;
|
|
23
|
+
t[0] !== a ? (l = r("tab__trigger", a), t[0] = a, t[1] = l) : l = t[1];
|
|
24
|
+
const s = l;
|
|
25
|
+
let i;
|
|
26
|
+
return t[2] !== a.value || t[3] !== s ? (i = /* @__PURE__ */ o(b, { "data-slot": "tabs", "data-value": e, ...s }), t[2] = a.value, t[3] = s, t[4] = i) : i = t[4], i;
|
|
27
|
+
}, j = (a) => {
|
|
28
|
+
const t = n.c(4);
|
|
29
|
+
let e;
|
|
30
|
+
t[0] !== a ? (e = r("tab__content", a), t[0] = a, t[1] = e) : e = t[1];
|
|
31
|
+
const l = e;
|
|
32
|
+
let s;
|
|
33
|
+
return t[2] !== l ? (s = /* @__PURE__ */ o(f, { "data-slot": "tabs", ...l }), t[2] = l, t[3] = s) : s = t[3], s;
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
x as Tab,
|
|
37
|
+
j as TabContent,
|
|
38
|
+
C as TabList,
|
|
39
|
+
L as TabTrigger
|
|
40
|
+
};
|