@pihanga2/shadcn 0.2.2 → 0.2.4
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 +3 -12
- package/cards/badge/badge.component.js +1 -1
- package/cards/box/box.component.js +1 -1
- package/cards/button/button.component.js +13 -13
- package/cards/chart/chart.types.d.ts +63 -0
- package/cards/checkbox/checkbox.component.js +1 -1
- package/cards/conditional/conditional.component.js +5 -5
- package/cards/dataTable/dataTable.component.js +8 -8
- package/cards/dataTable/dataTableRowDetail.component.js +1 -1
- package/cards/dialog/dialog.component.js +7 -7
- package/cards/dropDownMenu/drop-down.component.js +7 -7
- package/cards/field/field.component.js +4 -4
- package/cards/fileDrop/fileDrop.component.js +15 -15
- package/cards/flexGrid/flexGrid.component.js +1 -1
- package/cards/form/form.component.js +6 -6
- package/cards/framework/framework.component.js +4 -4
- package/cards/graphin/graphin.types.d.ts +106 -0
- package/cards/graphin/legend.component.d.ts +6 -0
- package/cards/input/input.component.js +1 -1
- package/cards/jsonViewer/index.js +13 -0
- package/cards/jsonViewer/index.js.map +1 -0
- package/cards/jsonViewer/jsonViewer.component.js +89 -0
- package/cards/jsonViewer/jsonViewer.component.js.map +1 -0
- package/cards/jsonViewer/jsonViewer.types.js +7 -0
- package/cards/jsonViewer/jsonViewer.types.js.map +1 -0
- package/cards/list/list.component.js +32 -32
- package/cards/list/list.types.js +1 -1
- package/cards/loadingOverlay/loadingOverlay.component.js +1 -1
- package/cards/loadingSkeleton/loading-skeleton.component.js +1 -1
- package/cards/pageWithNavbar/pageWithNavbar.component.js +43 -43
- package/cards/resizable/index.js +12 -0
- package/cards/resizable/index.js.map +1 -0
- package/cards/resizable/resizable.component.js +42 -0
- package/cards/resizable/resizable.component.js.map +1 -0
- package/cards/resizable/resizable.types.js +10 -0
- package/cards/resizable/resizable.types.js.map +1 -0
- package/cards/select/select.component.js +1 -1
- package/cards/slider/slider.component.js +1 -1
- package/cards/sliderValue/sliderValue.component.js +1 -1
- package/cards/stack/stack.component.js +4 -4
- package/cards/stepper/stepper.component.js +7 -7
- package/cards/switch/switch.component.js +1 -1
- package/cards/tabs/tabs.component.js +6 -6
- package/cards/textField/textField.component.js +1 -1
- package/cards/toast/toast.component.js +12 -12
- package/cards/toggleGroup/toggleGroup.component.js +1 -1
- package/cards/typography/typography.component.js +4 -4
- package/cards/typography/typography.types.js +1 -1
- package/components/ui/resizable.js +34 -0
- package/components/ui/resizable.js.map +1 -0
- package/package.json +13 -7
- package/pihanga-shadcn.css +1 -1
- package/cards/core-index.js +0 -68
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ResizableHandle as e, ResizablePanel as t, ResizablePanelGroup as n } from "../../components/ui/resizable.js";
|
|
2
|
+
import { DefResizableHandle as r } from "./resizable.types.js";
|
|
3
|
+
import { Fragment as i } from "react";
|
|
4
|
+
import { Card as a } from "@pihanga2/core";
|
|
5
|
+
import { clsx as o } from "clsx";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
//#region src/cards/resizable/resizable.component.tsx
|
|
8
|
+
var l = (l) => {
|
|
9
|
+
let { content: u, handles: d, direction: f, className: p, style: m, cardName: h } = l, g = m ?? {}, _ = Array.isArray(d) ? d : Array(u.length - 1).fill(d ?? r);
|
|
10
|
+
function v(e, n) {
|
|
11
|
+
let r = e.name ?? `panel${n}`, l = {
|
|
12
|
+
defaultSize: e.defaultSize ?? 50,
|
|
13
|
+
collapsible: e.collapsible
|
|
14
|
+
};
|
|
15
|
+
return e.maxSize !== void 0 && (l.maxSize = e.maxSize), e.minSize !== void 0 && (l.minSize = e.minSize), /* @__PURE__ */ c(i, { children: [y(n), /* @__PURE__ */ s(t, {
|
|
16
|
+
...l,
|
|
17
|
+
className: o(g.panel, p && `${p}-${r}`),
|
|
18
|
+
children: /* @__PURE__ */ s(a, {
|
|
19
|
+
cardName: e.content,
|
|
20
|
+
parentCard: h
|
|
21
|
+
})
|
|
22
|
+
})] }, n);
|
|
23
|
+
}
|
|
24
|
+
function y(t) {
|
|
25
|
+
if (t === 0) return null;
|
|
26
|
+
let n = _[t - 1];
|
|
27
|
+
return /* @__PURE__ */ s(e, {
|
|
28
|
+
...n,
|
|
29
|
+
className: o(g.handle)
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return /* @__PURE__ */ s(n, {
|
|
33
|
+
direction: f ?? "horizontal",
|
|
34
|
+
className: o(p, g.root),
|
|
35
|
+
"data-pihanga": h,
|
|
36
|
+
children: u.map(v)
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { l as ResizableComponent };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=resizable.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable.component.js","names":[],"sources":["../../../src/cards/resizable/resizable.component.tsx"],"sourcesContent":["import React, {Fragment} from \"react\";\nimport {Card, type PiCardProps} from \"@pihanga2/core\";\nimport {clsx} from \"clsx\";\nimport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@/components/ui/resizable\";\nimport {\n DefResizableHandle,\n type PiResizableHandle,\n type PiResizablePanel,\n type ResizableProps,\n} from \"./resizable.types\";\n\nexport const ResizableComponent = (\n props: PiCardProps<ResizableProps>,\n): React.ReactNode => {\n const {content, handles, direction, className, style, cardName} = props;\n\n const sy =\n (style as {root?: string; panel?: string; handle?: string} | undefined) ??\n {};\n\n const _handles: PiResizableHandle[] = Array.isArray(handles)\n ? handles\n : Array(content.length - 1).fill(handles ?? DefResizableHandle);\n\n function renderPanel(el: PiResizablePanel, idx: number) {\n const name = el.name ?? `panel${idx}`;\n const panelProps: {\n defaultSize: number;\n collapsible?: boolean;\n maxSize?: number;\n minSize?: number;\n } = {\n defaultSize: el.defaultSize ?? 50,\n collapsible: el.collapsible,\n };\n if (el.maxSize !== undefined) panelProps.maxSize = el.maxSize;\n if (el.minSize !== undefined) panelProps.minSize = el.minSize;\n\n return (\n <Fragment key={idx}>\n {renderHandle(idx)}\n <ResizablePanel\n {...panelProps}\n className={clsx(sy.panel, className && `${className}-${name}`)}\n >\n <Card cardName={el.content} parentCard={cardName} />\n </ResizablePanel>\n </Fragment>\n );\n }\n\n function renderHandle(idx: number) {\n if (idx === 0) return null;\n const h = _handles[idx - 1];\n return <ResizableHandle {...h} className={clsx(sy.handle)} />;\n }\n\n return (\n <ResizablePanelGroup\n direction={direction ?? \"horizontal\"}\n className={clsx(className, sy.root)}\n data-pihanga={cardName}\n >\n {content.map(renderPanel)}\n </ResizablePanelGroup>\n );\n};\n"],"mappings":";;;;;;;AAeA,IAAa,KACX,MACoB;CACpB,IAAM,EAAC,YAAS,YAAS,cAAW,cAAW,UAAO,gBAAY,GAE5D,IACH,KACD,CAAC,GAEG,IAAgC,MAAM,QAAQ,CAAO,IACvD,IACA,MAAM,EAAQ,SAAS,CAAC,EAAE,KAAK,KAAW,CAAkB;CAEhE,SAAS,EAAY,GAAsB,GAAa;EACtD,IAAM,IAAO,EAAG,QAAQ,QAAQ,KAC1B,IAKF;GACF,aAAa,EAAG,eAAe;GAC/B,aAAa,EAAG;EAClB;EAIA,OAHI,EAAG,YAAY,KAAA,MAAW,EAAW,UAAU,EAAG,UAClD,EAAG,YAAY,KAAA,MAAW,EAAW,UAAU,EAAG,UAGpD,kBAAC,GAAD,EAAA,UAAA,CACG,EAAa,CAAG,GACjB,kBAAC,GAAD;GACE,GAAI;GACJ,WAAW,EAAK,EAAG,OAAO,KAAa,GAAG,EAAU,GAAG,GAAM;aAE7D,kBAAC,GAAD;IAAM,UAAU,EAAG;IAAS,YAAY;GAAW,CAAA;EACrC,CAAA,CACR,EAAA,GARK,CAQL;CAEd;CAEA,SAAS,EAAa,GAAa;EACjC,IAAI,MAAQ,GAAG,OAAO;EACtB,IAAM,IAAI,EAAS,IAAM;EACzB,OAAO,kBAAC,GAAD;GAAiB,GAAI;GAAG,WAAW,EAAK,EAAG,MAAM;EAAI,CAAA;CAC9D;CAEA,OACE,kBAAC,GAAD;EACE,WAAW,KAAa;EACxB,WAAW,EAAK,GAAW,EAAG,IAAI;EAClC,gBAAc;YAEb,EAAQ,IAAI,CAAW;CACL,CAAA;AAEzB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createCardDeclaration as e } from "@pihanga2/core";
|
|
2
|
+
//#region src/cards/resizable/resizable.types.ts
|
|
3
|
+
var t = "shad/resizable", n = e(t), r = n, i = {
|
|
4
|
+
withHandle: !0,
|
|
5
|
+
disabled: !1
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { i as DefResizableHandle, t as RESIZABLE_CARD, r as Resizable, n as SdResizable };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=resizable.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable.types.js","names":[],"sources":["../../../src/cards/resizable/resizable.types.ts"],"sourcesContent":["import {type PiCardRef, createCardDeclaration} from \"@pihanga2/core\";\n\nexport const RESIZABLE_CARD = \"shad/resizable\";\n\nexport const SdResizable =\n createCardDeclaration<ResizableProps>(RESIZABLE_CARD);\n\n/** Convenience alias — same as {@link SdResizable}. */\nexport const Resizable = SdResizable;\n\nexport type ResizableProps<S = unknown> = {\n /** Ordered list of panels to render inside the resizable group. */\n content: PiResizablePanel[];\n /** Layout direction of the panel group. Defaults to `\"horizontal\"`. */\n direction?: \"horizontal\" | \"vertical\";\n /**\n * Handle configuration(s) between panels.\n *\n * - A single `PiResizableHandle` is used for every handle in the group.\n * - An array must have exactly `content.length - 1` entries.\n *\n * Defaults to {@link DefResizableHandle} (visible drag handle).\n */\n handles?: PiResizableHandle | PiResizableHandle[];\n className?: string;\n /**\n * Optional Shadcn-style style overrides.\n *\n * When provided as `{ shad?: { root?: string; panel?: string; handle?: string } }`,\n * the nested class names are applied to the corresponding elements in\n * addition to any `className` already set.\n */\n style?: S;\n};\n\nexport type PiResizablePanel = {\n /** Used for CSS class suffixes and stable ordering. Defaults to `\"panel{idx}\"`. */\n name?: string;\n /** The card to render inside this panel. */\n content: PiCardRef;\n /** Initial size as a percentage of the group. Defaults to `50`. */\n defaultSize?: number;\n minSize?: number;\n maxSize?: number;\n /** When `true`, the panel can be collapsed to zero size. */\n collapsible?: boolean;\n};\n\nexport type PiResizableHandle = {\n /** When `true`, renders a visible drag-handle grip indicator. */\n withHandle?: boolean;\n /** When `true`, the handle is decorative only (not draggable). */\n disabled?: boolean;\n};\n\n/** Default handle configuration: visible grip, draggable. */\nexport const DefResizableHandle: PiResizableHandle = {\n withHandle: true,\n disabled: false,\n};\n"],"mappings":";;AAEA,IAAa,IAAiB,kBAEjB,IACX,EAAsC,CAAc,GAGzC,IAAY,GAgDZ,IAAwC;CACnD,YAAY;CACZ,UAAU;AACZ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFormContext as e } from "../form/form.context.js";
|
|
2
2
|
import { Select as t, SelectContent as n, SelectGroup as r, SelectItem as i, SelectTrigger as a, SelectValue as o } from "../../components/ui/select.js";
|
|
3
|
-
import "@pihanga2/core";
|
|
4
3
|
import { useState as s } from "react";
|
|
4
|
+
import "@pihanga2/core";
|
|
5
5
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
6
|
//#region src/cards/select/select.component.tsx
|
|
7
7
|
var u = (u) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFormContext as e } from "../form/form.context.js";
|
|
2
2
|
import { Slider as t } from "../../components/ui/slider.js";
|
|
3
|
-
import "@pihanga2/core";
|
|
4
3
|
import { useEffect as n, useRef as r, useState as i } from "react";
|
|
4
|
+
import "@pihanga2/core";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
6
|
//#region src/cards/slider/slider.component.tsx
|
|
7
7
|
var s = (s) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Fragment as e } from "react";
|
|
2
|
+
import { Card as t } from "@pihanga2/core";
|
|
3
3
|
import n from "clsx";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/cards/stack/stack.component.tsx
|
|
@@ -63,10 +63,10 @@ var a = (a) => {
|
|
|
63
63
|
}
|
|
64
64
|
l && l > 0 && h.push(`gap-${l}`);
|
|
65
65
|
function g() {
|
|
66
|
-
return o ? o.map((n, a) => /* @__PURE__ */ i(
|
|
66
|
+
return o ? o.map((n, a) => /* @__PURE__ */ i(e, { children: [/* @__PURE__ */ r(t, {
|
|
67
67
|
cardName: n,
|
|
68
68
|
parentCard: m
|
|
69
|
-
}, `item-${a}`), c && a < o.length - 1 && /* @__PURE__ */ r(
|
|
69
|
+
}, `item-${a}`), c && a < o.length - 1 && /* @__PURE__ */ r(t, {
|
|
70
70
|
cardName: c,
|
|
71
71
|
parentCard: m
|
|
72
72
|
}, `divider-${a}`)] }, a)) : null;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { StepperUI as e } from "../../components/ui/stepper.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useState as t } from "react";
|
|
4
|
+
import { Card as n } from "@pihanga2/core";
|
|
5
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
6
6
|
//#region src/cards/stepper/stepper.component.tsx
|
|
7
7
|
var i = (i) => {
|
|
8
|
-
let { steps: a, activeStep: o, defaultActiveStep: s = 0, selfManaged: c = !1, orientation: l = "horizontal", size: u = "md", showContent: d = !1, className: f, cardName: p, onStepClicked: m } = i, [h, g] =
|
|
8
|
+
let { steps: a, activeStep: o, defaultActiveStep: s = 0, selfManaged: c = !1, orientation: l = "horizontal", size: u = "md", showContent: d = !1, className: f, cardName: p, onStepClicked: m } = i, [h, g] = t(o ?? s), _ = c ? h : o ?? 0, v = a.map((e) => ({
|
|
9
9
|
id: e.id,
|
|
10
10
|
title: e.title,
|
|
11
11
|
description: e.description,
|
|
12
12
|
optional: e.optional,
|
|
13
|
-
labelNode: e.labelCard ? /* @__PURE__ */ r(
|
|
13
|
+
labelNode: e.labelCard ? /* @__PURE__ */ r(n, {
|
|
14
14
|
cardName: e.labelCard,
|
|
15
15
|
parentCard: p
|
|
16
16
|
}) : void 0
|
|
@@ -23,9 +23,9 @@ var i = (i) => {
|
|
|
23
23
|
}
|
|
24
24
|
function b(e) {
|
|
25
25
|
if (!d || l !== "vertical") return null;
|
|
26
|
-
let
|
|
27
|
-
return
|
|
28
|
-
cardName:
|
|
26
|
+
let t = a[e];
|
|
27
|
+
return t?.contentCard ? /* @__PURE__ */ r(n, {
|
|
28
|
+
cardName: t.contentCard,
|
|
29
29
|
parentCard: p
|
|
30
30
|
}) : null;
|
|
31
31
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useFormContext as e } from "../form/form.context.js";
|
|
2
2
|
import { Label as t } from "../../components/ui/label.js";
|
|
3
3
|
import { Switch as n } from "../../components/ui/switch.js";
|
|
4
|
-
import "@pihanga2/core";
|
|
5
4
|
import "react";
|
|
5
|
+
import "@pihanga2/core";
|
|
6
6
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
7
7
|
//#region src/cards/switch/switch.component.tsx
|
|
8
8
|
var a = (a) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Select as e, SelectContent as t, SelectItem as n, SelectTrigger as r, SelectValue as i } from "../../components/ui/select.js";
|
|
2
2
|
import { Tabs as a, TabsContent as o, TabsList as s, TabsTrigger as c } from "../../components/ui/tabs.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useState as l } from "react";
|
|
4
|
+
import { Card as u } from "@pihanga2/core";
|
|
5
5
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
6
6
|
//#region src/cards/tabs/tabs.component.tsx
|
|
7
7
|
var p = (p) => {
|
|
8
|
-
let { tabs: m, value: h, defaultValue: g, selfManaged: _ = !1, orientation: v = "horizontal", className: y, listClassName: b, contentClassName: x, maxTabs: S, cardName: C, onTabChanged: w } = p, [T, E] =
|
|
8
|
+
let { tabs: m, value: h, defaultValue: g, selfManaged: _ = !1, orientation: v = "horizontal", className: y, listClassName: b, contentClassName: x, maxTabs: S, cardName: C, onTabChanged: w } = p, [T, E] = l(h ?? g ?? m[0]?.id ?? ""), D = _ ? T : h ?? g ?? m[0]?.id ?? "";
|
|
9
9
|
function O(e) {
|
|
10
10
|
_ && E(e), typeof w == "function" && w({ tabId: e });
|
|
11
11
|
}
|
|
@@ -27,7 +27,7 @@ var p = (p) => {
|
|
|
27
27
|
}, e.id)) })]
|
|
28
28
|
}), a && /* @__PURE__ */ d("div", {
|
|
29
29
|
className: x,
|
|
30
|
-
children: /* @__PURE__ */ d(
|
|
30
|
+
children: /* @__PURE__ */ d(u, {
|
|
31
31
|
cardName: a.contentCard,
|
|
32
32
|
parentCard: C
|
|
33
33
|
})
|
|
@@ -46,7 +46,7 @@ var p = (p) => {
|
|
|
46
46
|
children: m.map((e) => /* @__PURE__ */ d(c, {
|
|
47
47
|
value: e.id,
|
|
48
48
|
disabled: e.disabled,
|
|
49
|
-
children: typeof e.title == "string" ? e.title : /* @__PURE__ */ d(
|
|
49
|
+
children: typeof e.title == "string" ? e.title : /* @__PURE__ */ d(u, {
|
|
50
50
|
cardName: e.title,
|
|
51
51
|
parentCard: C
|
|
52
52
|
})
|
|
@@ -54,7 +54,7 @@ var p = (p) => {
|
|
|
54
54
|
}), m.map((e) => /* @__PURE__ */ d(o, {
|
|
55
55
|
value: e.id,
|
|
56
56
|
className: x,
|
|
57
|
-
children: /* @__PURE__ */ d(
|
|
57
|
+
children: /* @__PURE__ */ d(u, {
|
|
58
58
|
cardName: e.contentCard,
|
|
59
59
|
parentCard: C
|
|
60
60
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFormContext as e } from "../form/form.context.js";
|
|
2
2
|
import { Input as t } from "../../components/ui/input.js";
|
|
3
|
-
import "@pihanga2/core";
|
|
4
3
|
import "react";
|
|
4
|
+
import "@pihanga2/core";
|
|
5
5
|
import { jsx as n } from "react/jsx-runtime";
|
|
6
6
|
//#region src/cards/textField/textField.component.tsx
|
|
7
7
|
var r = (r) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TOAST_OP_ACTION as e } from "./toast.types.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useEffect as t, useRef as n, useState as r } from "react";
|
|
3
|
+
import { Card as i, usePiReducer as a } from "@pihanga2/core";
|
|
4
4
|
import { jsx as o } from "react/jsx-runtime";
|
|
5
5
|
import { toast as s } from "sonner";
|
|
6
6
|
//#region src/cards/toast/toast.component.tsx
|
|
7
7
|
var c = (c) => {
|
|
8
|
-
let { variant: l = "default", duration: u = 4e3, dismissible: d = !0, className: f, onClosed: p, cardName: m } = c, [h, g] =
|
|
9
|
-
|
|
8
|
+
let { variant: l = "default", duration: u = 4e3, dismissible: d = !0, className: f, onClosed: p, cardName: m } = c, [h, g] = r(null);
|
|
9
|
+
a(e.SHOW, (e, t) => {
|
|
10
10
|
t.cardName && t.cardName !== m || g({
|
|
11
11
|
message: t.message,
|
|
12
12
|
description: t.description,
|
|
@@ -16,8 +16,8 @@ var c = (c) => {
|
|
|
16
16
|
duration: t.duration ?? u
|
|
17
17
|
});
|
|
18
18
|
}, m);
|
|
19
|
-
let _ =
|
|
20
|
-
return
|
|
19
|
+
let _ = n(void 0);
|
|
20
|
+
return t(() => {
|
|
21
21
|
if (!h) return;
|
|
22
22
|
let e = {
|
|
23
23
|
success: s.success,
|
|
@@ -25,17 +25,17 @@ var c = (c) => {
|
|
|
25
25
|
info: s.info,
|
|
26
26
|
warning: s.warning,
|
|
27
27
|
default: s
|
|
28
|
-
}[h.variant] || s,
|
|
28
|
+
}[h.variant] || s, t = [f, `toast-${h.variant}`].filter(Boolean).join(" ");
|
|
29
29
|
if (h.contentCard) {
|
|
30
|
-
let
|
|
31
|
-
_.current = e(() => /* @__PURE__ */ o(
|
|
32
|
-
cardName:
|
|
30
|
+
let n = h.contentCard;
|
|
31
|
+
_.current = e(() => /* @__PURE__ */ o(i, {
|
|
32
|
+
cardName: n,
|
|
33
33
|
parentCard: m
|
|
34
34
|
}), {
|
|
35
35
|
duration: h.duration,
|
|
36
36
|
position: h.position || "bottom-right",
|
|
37
37
|
dismissible: d,
|
|
38
|
-
className:
|
|
38
|
+
className: t,
|
|
39
39
|
onDismiss: () => {
|
|
40
40
|
g(null), p({});
|
|
41
41
|
},
|
|
@@ -48,7 +48,7 @@ var c = (c) => {
|
|
|
48
48
|
duration: h.duration,
|
|
49
49
|
position: h.position || "bottom-right",
|
|
50
50
|
dismissible: d,
|
|
51
|
-
className:
|
|
51
|
+
className: t,
|
|
52
52
|
onDismiss: () => {
|
|
53
53
|
g(null), p({});
|
|
54
54
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFormContext as e } from "../form/form.context.js";
|
|
2
2
|
import { ToggleGroup as t, ToggleGroupItem as n } from "../../components/ui/toggle-group.js";
|
|
3
|
-
import "@pihanga2/core";
|
|
4
3
|
import r from "react";
|
|
4
|
+
import "@pihanga2/core";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
6
|
//#region src/cards/toggleGroup/toggleGroup.component.tsx
|
|
7
7
|
var a = (a) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { Card as n } from "@pihanga2/core";
|
|
4
4
|
import { Fragment as r, jsx as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/cards/typography/typography.component.tsx
|
|
6
6
|
var a = {
|
|
@@ -18,7 +18,7 @@ var a = {
|
|
|
18
18
|
}, o = (s) => {
|
|
19
19
|
let { text: c, childCard: l, paragraph: u, level: d, className: f, style: p, cardName: m, _dispatch: h, _cls: g } = s, [_, v] = d ? a[d] : ["div", ""];
|
|
20
20
|
function y() {
|
|
21
|
-
return l ? /* @__PURE__ */ i(
|
|
21
|
+
return l ? /* @__PURE__ */ i(n, {
|
|
22
22
|
cardName: l,
|
|
23
23
|
parentCard: m
|
|
24
24
|
}) : u ? /* @__PURE__ */ i(r, { children: u.map((e, t) => b(e, t)) }) : c;
|
|
@@ -32,7 +32,7 @@ var a = {
|
|
|
32
32
|
key: t
|
|
33
33
|
}) : null;
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return t.createElement(_, {
|
|
36
36
|
className: e(v, f),
|
|
37
37
|
style: p,
|
|
38
38
|
"data-pihanga": m
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { GripVerticalIcon as n } from "lucide-react";
|
|
5
|
+
import * as r from "react-resizable-panels";
|
|
6
|
+
//#region src/components/ui/resizable.tsx
|
|
7
|
+
function i({ className: n, ...i }) {
|
|
8
|
+
return /* @__PURE__ */ t(r.PanelGroup, {
|
|
9
|
+
"data-slot": "resizable-panel-group",
|
|
10
|
+
className: e("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", n),
|
|
11
|
+
...i
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function a({ ...e }) {
|
|
15
|
+
return /* @__PURE__ */ t(r.Panel, {
|
|
16
|
+
"data-slot": "resizable-panel",
|
|
17
|
+
...e
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function o({ withHandle: i, className: a, ...o }) {
|
|
21
|
+
return /* @__PURE__ */ t(r.PanelResizeHandle, {
|
|
22
|
+
"data-slot": "resizable-handle",
|
|
23
|
+
className: e("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90", a),
|
|
24
|
+
...o,
|
|
25
|
+
children: i && /* @__PURE__ */ t("div", {
|
|
26
|
+
className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",
|
|
27
|
+
children: /* @__PURE__ */ t(n, { className: "size-2.5" })
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { o as ResizableHandle, a as ResizablePanel, i as ResizablePanelGroup };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=resizable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable.js","names":[],"sources":["../../../src/components/ui/resizable.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { GripVerticalIcon } from \"lucide-react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/components/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n return (\n <ResizablePrimitive.PanelGroup\n data-slot=\"resizable-panel-group\"\n className={cn(\n \"flex h-full w-full data-[panel-group-direction=vertical]:flex-col\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />\n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n withHandle?: boolean\n}) {\n return (\n <ResizablePrimitive.PanelResizeHandle\n data-slot=\"resizable-handle\"\n className={cn(\n \"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border\">\n <GripVerticalIcon className=\"size-2.5\" />\n </div>\n )}\n </ResizablePrimitive.PanelResizeHandle>\n )\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\n"],"mappings":";;;;;;AAMA,SAAS,EAAoB,EAC3B,cACA,GAAG,KAC0D;CAC7D,OACE,kBAAC,EAAmB,YAApB;EACE,aAAU;EACV,WAAW,EACT,qEACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAe,EACtB,GAAG,KACqD;CACxD,OAAO,kBAAC,EAAmB,OAApB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;AAEA,SAAS,EAAgB,EACvB,eACA,cACA,GAAG,KAGF;CACD,OACE,kBAAC,EAAmB,mBAApB;EACE,aAAU;EACV,WAAW,EACT,6oBACA,CACF;EACA,GAAI;YAEH,KACC,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,GAAD,EAAkB,WAAU,WAAY,CAAA;EACrC,CAAA;CAE6B,CAAA;AAE1C"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pihanga2/shadcn",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Pihanga core card components built on shadcn/ui and Radix UI — the npm distribution of pihanga-shadcn.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
|
-
".": {
|
|
8
|
-
"import": "./cards/core-index.js",
|
|
9
|
-
"types": "./cards/core-index.d.ts"
|
|
10
|
-
},
|
|
11
7
|
"./cards/badge": {
|
|
12
8
|
"import": "./cards/badge/index.js",
|
|
13
9
|
"types": "./cards/badge/index.d.ts"
|
|
@@ -64,6 +60,10 @@
|
|
|
64
60
|
"import": "./cards/input/index.js",
|
|
65
61
|
"types": "./cards/input/index.d.ts"
|
|
66
62
|
},
|
|
63
|
+
"./cards/jsonViewer": {
|
|
64
|
+
"import": "./cards/jsonViewer/index.js",
|
|
65
|
+
"types": "./cards/jsonViewer/index.d.ts"
|
|
66
|
+
},
|
|
67
67
|
"./cards/list": {
|
|
68
68
|
"import": "./cards/list/index.js",
|
|
69
69
|
"types": "./cards/list/index.d.ts"
|
|
@@ -96,6 +96,10 @@
|
|
|
96
96
|
"import": "./cards/pasteTarget/index.js",
|
|
97
97
|
"types": "./cards/pasteTarget/index.d.ts"
|
|
98
98
|
},
|
|
99
|
+
"./cards/resizable": {
|
|
100
|
+
"import": "./cards/resizable/index.js",
|
|
101
|
+
"types": "./cards/resizable/index.d.ts"
|
|
102
|
+
},
|
|
99
103
|
"./cards/select": {
|
|
100
104
|
"import": "./cards/select/index.js",
|
|
101
105
|
"types": "./cards/select/index.d.ts"
|
|
@@ -149,8 +153,6 @@
|
|
|
149
153
|
"types": "./cards/icons.d.ts"
|
|
150
154
|
}
|
|
151
155
|
},
|
|
152
|
-
"main": "./cards/core-index.js",
|
|
153
|
-
"types": "./cards/core-index.d.ts",
|
|
154
156
|
"sideEffects": [
|
|
155
157
|
"./cards/badge/index.js",
|
|
156
158
|
"./cards/box/index.js",
|
|
@@ -166,6 +168,7 @@
|
|
|
166
168
|
"./cards/form/index.js",
|
|
167
169
|
"./cards/framework/index.js",
|
|
168
170
|
"./cards/input/index.js",
|
|
171
|
+
"./cards/jsonViewer/index.js",
|
|
169
172
|
"./cards/list/index.js",
|
|
170
173
|
"./cards/loadingOverlay/index.js",
|
|
171
174
|
"./cards/loadingSkeleton/index.js",
|
|
@@ -174,6 +177,7 @@
|
|
|
174
177
|
"./cards/navbarSearch/index.js",
|
|
175
178
|
"./cards/pageWithNavbar/index.js",
|
|
176
179
|
"./cards/pasteTarget/index.js",
|
|
180
|
+
"./cards/resizable/index.js",
|
|
177
181
|
"./cards/select/index.js",
|
|
178
182
|
"./cards/slider/index.js",
|
|
179
183
|
"./cards/sliderValue/index.js",
|
|
@@ -222,6 +226,8 @@
|
|
|
222
226
|
"lucide-react": "^0.513.0",
|
|
223
227
|
"radix-ui": "^1.4.3",
|
|
224
228
|
"react-drag-drop-files": "^3.0.1",
|
|
229
|
+
"react-json-view-lite": "^2.5.0",
|
|
230
|
+
"react-resizable-panels": "^2.0.0",
|
|
225
231
|
"sonner": "^2.0.7",
|
|
226
232
|
"tailwind-merge": "^3.3.0"
|
|
227
233
|
}
|
package/pihanga-shadcn.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.pi-file-drop-root label{border:2px dashed #999;flex-grow:1;justify-content:space-between;max-width:100%;display:flex}.pi-file-drop-root .dropzone-msg{cursor:pointer;text-align:center;flex-grow:4;margin:3em 0}.pi-file-drop-root .pi-progress{max-width:100%;padding:1.25em}.pi-file-drop-root .pi-progress-label{font-size:1rem;font-weight:600;line-height:1.5rem}.pi-file-drop -root.pi-progress-container{background-color:#dadfe5;border-radius:4px;height:1rem;display:flex;position:relative;overflow:hidden}.pi-file-drop-root .pi-progress-bar{color:#fff;background-color:#0054a6;flex-direction:column;justify-content:center;display:flex;overflow:hidden}.pi-file-drop-root .pi-progress .label{font-size:1em;display:block}.overlay-wrapper{flex-direction:column;width:100%;min-width:0;display:flex;position:relative}.overlay-wrapper.is-loading.fill-parent{min-height:12rem}.overlay-content{flex-direction:column;flex-grow:1;width:100%;min-width:0;display:flex;position:relative;overflow-y:hidden}.overlay-wrapper.fill-parent .overlay-content{min-height:inherit}.loading-overlay{opacity:0;pointer-events:none;z-index:2;background:oklch(100% 0 0/.7);justify-content:center;align-items:center;transition:opacity .15s;display:flex;position:absolute;inset:0}.overlay-wrapper.viewport-centered .loading-overlay{z-index:50;position:fixed;inset:0}.dark .loading-overlay{background:oklch(14.5% 0 0/.5)}.overlay-wrapper.is-loading .loading-overlay{opacity:1;pointer-events:auto}.loading-overlay__content{color:var(--muted-foreground);align-items:center;gap:.5rem;font-size:.875rem;display:flex}.window{justify-content:center;width:100%;height:100%;display:flex}.page{flex-direction:column;flex:1;width:100%;height:100%;display:flex}.header{border-bottom:1px solid var(--border);background-color:var(--background);flex-shrink:0;align-items:center;gap:1rem;padding-left:1rem;padding-right:1rem;display:flex}@media (width>=768px){.header{padding-left:1.5rem;padding-right:1.5rem}}.title-section{align-items:center;gap:.5rem;display:inline-flex}.title-section .title-icon{flex-shrink:0;width:1.5rem;height:1.5rem}.title-section .title-text{color:var(--foreground);font-size:1.125rem;font-weight:600;line-height:1.75rem}.nav-md{display:none}@media (width>=768px){.nav-md{flex-direction:row;align-items:center;gap:1.25rem;display:flex}}@media (width>=1024px){.nav-md{gap:1.5rem}}.nav-md .nav-link{color:var(--muted-foreground);padding-left:0;padding-right:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nav-md .nav-link:hover{color:var(--foreground)}.nav-sm{gap:1.5rem;padding:1rem;font-size:1.125rem;font-weight:500;line-height:1.75rem;display:grid}.nav-sm .nav-link{color:var(--muted-foreground);justify-content:flex-start;padding-left:0;padding-right:0;font-size:1.125rem;line-height:1.75rem}.nav-sm .nav-link:hover{color:var(--foreground)}.header-actions{align-items:center;gap:.5rem;margin-left:auto;display:flex}@media (width>=1024px){.header-actions{gap:1rem}}.main{background-color:var(--background);flex:1;min-height:0;padding:.5rem 1rem;overflow-y:auto}@media (width>=768px){.main{padding:1rem 2rem}}.footer{background-color:var(--background);color:var(--muted-foreground);flex-shrink:0;padding:.5rem 1rem}@media (width>=768px){.footer{padding:1rem 2rem}}.pihanga-paste-target{border:2px dashed #999}.pihanga-paste-target .paste-target-msg-title{font-size:1.2em}.pihanga-paste-target textarea:focus{outline:none}.pihanga-paste-target-focused{border-width:3px;border-color:#007bff}.pihanga-paste-target-focused .paste-target-focus-reminder{display:none}.pi-stepper{--pi-stepper-indicator-size-sm:1.5rem;--pi-stepper-indicator-size-md:2rem;--pi-stepper-indicator-size-lg:2.5rem;--pi-stepper-indicator-size:var(--pi-stepper-indicator-size-md);--pi-stepper-connector-thickness:2px;--pi-stepper-connector-min-height:1.5rem;--pi-stepper-label-max-width:6rem}.pi-stepper--sm{--pi-stepper-indicator-size:var(--pi-stepper-indicator-size-sm)}.pi-stepper--md{--pi-stepper-indicator-size:var(--pi-stepper-indicator-size-md)}.pi-stepper--lg{--pi-stepper-indicator-size:var(--pi-stepper-indicator-size-lg)}.pi-stepper__indicator{transition:background-color .2s,border-color .2s,color .2s,outline-color .2s}.pi-stepper__indicator--clickable{cursor:pointer}.pi-stepper__indicator--clickable:hover{opacity:.8}.pi-stepper__indicator--static{cursor:default}.pi-stepper__connector{transition:background-color .3s}.pi-stepper__connector--vertical{min-height:var(--pi-stepper-connector-min-height)}.pi-stepper__label-title{transition:color .2s}
|
|
1
|
+
.pi-file-drop-root label{border:2px dashed #999;flex-grow:1;justify-content:space-between;max-width:100%;display:flex}.pi-file-drop-root .dropzone-msg{cursor:pointer;text-align:center;flex-grow:4;margin:3em 0}.pi-file-drop-root .pi-progress{max-width:100%;padding:1.25em}.pi-file-drop-root .pi-progress-label{font-size:1rem;font-weight:600;line-height:1.5rem}.pi-file-drop -root.pi-progress-container{background-color:#dadfe5;border-radius:4px;height:1rem;display:flex;position:relative;overflow:hidden}.pi-file-drop-root .pi-progress-bar{color:#fff;background-color:#0054a6;flex-direction:column;justify-content:center;display:flex;overflow:hidden}.pi-file-drop-root .pi-progress .label{font-size:1em;display:block}._GzYRV{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;line-height:1.2}._3eOF8{margin-right:5px;font-weight:700}._3eOF8+._3eOF8{margin-left:-5px}._1MFti{cursor:pointer}._f10Tu{-webkit-user-select:none;user-select:none;margin-right:5px;font-size:1.2em}._1UmXx:after{content:"▸"}._1LId0:after{content:"▾"}._1pNG9{margin-right:5px}._1pNG9:after{content:"...";font-size:.8em}._2IvMF{background:#eee}._2bkNM{margin:0;padding:0 10px}._1BXBN{margin:0;padding:0}._1MGIk{color:#000;margin-right:5px;font-weight:600}._3uHL6{color:#000}._2T6PJ,._1Gho6{color:#df113a}._vGjyY{color:#2a3f3c}._1bQdo{color:#0b75f5}._3zQKs{color:#469038}._1xvuR{color:#43413d}._oLqym,._2AXVT,._2KJWg{color:#000}._11RoI{background:#002b36}._17H2C,._3QHg2,._3fDAz{color:#fdf6e3}._2bSDX{color:#fdf6e3;margin-right:5px;font-weight:bolder}._gsbQL{color:#fdf6e3}._LaAZe,._GTKgm{color:#81b5ac}._Chy1W{color:#cb4b16}._2bveF{color:#d33682}._2vRm-{color:#ae81ff}._1prJR{color:#268bd2}.jv-wrapper{position:relative}.jv-copy-btn{z-index:10;width:22px;height:22px;color:hsl(var(--muted-foreground,0 0% 55%));cursor:pointer;opacity:.35;background:0 0;border:1px solid #0000;border-radius:4px;justify-content:center;align-items:center;padding:0;transition:opacity .15s,color .15s,background .15s,border-color .15s;display:inline-flex;position:absolute;top:4px;right:4px}.jv-wrapper:hover .jv-copy-btn,.jv-wrapper:focus-within .jv-copy-btn{opacity:1}.jv-copy-btn:hover{color:hsl(var(--foreground));background:hsl(var(--muted,0 0% 96%));border-color:hsl(var(--border,0 0% 88%))}.jv-copy-btn--done{opacity:1;color:#2e7d32}.dark .jv-copy-btn--done{color:#81c784}.jv-container{white-space:pre-wrap;word-wrap:break-word;color:var(--foreground);background:0 0;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:12.5px;font-weight:400;line-height:1.55}.jv-basic-child{margin:0;padding:0 0 0 1.1em;display:block;position:relative}.jv-label{color:var(--foreground);margin-right:0;font-weight:400}.jv-clickable-label{color:var(--foreground);cursor:pointer;margin-right:0;font-weight:400}.jv-clickable-label:hover{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.jv-punctuation{color:var(--foreground);font-weight:400}.jv-expand-icon,.jv-collapse-icon{width:1em;color:hsl(var(--muted-foreground,0 0% 55%));-webkit-user-select:none;user-select:none;cursor:pointer;justify-content:center;align-items:center;font-size:.65em;line-height:1;display:inline-flex;position:absolute;top:.775em;left:0;transform:translateY(-50%)}.jv-expand-icon:after{content:"▶"}.jv-collapse-icon:after{content:"▼"}.jv-collapsed-content{cursor:pointer;color:hsl(var(--muted-foreground,0 0% 55%))}.jv-collapsed-content:after{content:" …"}.jv-child-fields-container{border-left:1px solid hsl(var(--border,0 0% 88%));margin:0 0 0 .3em;padding:0 0 0 1.25em}.jv-null,.jv-undefined{color:#c0392b}.jv-string{color:#2e7d32}.jv-number{color:#1565c0}.jv-boolean{color:#00796b}.jv-other{color:var(--foreground)}.dark .jv-string{color:#81c784}.dark .jv-number{color:#64b5f6}.dark .jv-boolean{color:#4db6ac}.dark .jv-null,.dark .jv-undefined{color:#ef9a9a}.dark .jv-child-fields-container{border-left-color:hsl(var(--border,0 0% 25%))}.overlay-wrapper{flex-direction:column;width:100%;min-width:0;display:flex;position:relative}.overlay-wrapper.is-loading.fill-parent{min-height:12rem}.overlay-content{flex-direction:column;flex-grow:1;width:100%;min-width:0;display:flex;position:relative;overflow-y:hidden}.overlay-wrapper.fill-parent .overlay-content{min-height:inherit}.loading-overlay{opacity:0;pointer-events:none;z-index:2;background:oklch(100% 0 0/.7);justify-content:center;align-items:center;transition:opacity .15s;display:flex;position:absolute;inset:0}.overlay-wrapper.viewport-centered .loading-overlay{z-index:50;position:fixed;inset:0}.dark .loading-overlay{background:oklch(14.5% 0 0/.5)}.overlay-wrapper.is-loading .loading-overlay{opacity:1;pointer-events:auto}.loading-overlay__content{color:var(--muted-foreground);align-items:center;gap:.5rem;font-size:.875rem;display:flex}.window{justify-content:center;width:100%;height:100%;display:flex}.page{flex-direction:column;flex:1;width:100%;height:100%;display:flex}.header{border-bottom:1px solid var(--border);background-color:var(--background);flex-shrink:0;align-items:center;gap:1rem;padding-left:1rem;padding-right:1rem;display:flex}@media (width>=768px){.header{padding-left:1.5rem;padding-right:1.5rem}}.title-section{align-items:center;gap:.5rem;display:inline-flex}.title-section .title-icon{flex-shrink:0;width:1.5rem;height:1.5rem}.title-section .title-text{color:var(--foreground);font-size:1.125rem;font-weight:600;line-height:1.75rem}.nav-md{display:none}@media (width>=768px){.nav-md{flex-direction:row;align-items:center;gap:1.25rem;display:flex}}@media (width>=1024px){.nav-md{gap:1.5rem}}.nav-md .nav-link{color:var(--muted-foreground);padding-left:0;padding-right:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nav-md .nav-link:hover{color:var(--foreground)}.nav-sm{gap:1.5rem;padding:1rem;font-size:1.125rem;font-weight:500;line-height:1.75rem;display:grid}.nav-sm .nav-link{color:var(--muted-foreground);justify-content:flex-start;padding-left:0;padding-right:0;font-size:1.125rem;line-height:1.75rem}.nav-sm .nav-link:hover{color:var(--foreground)}.header-actions{align-items:center;gap:.5rem;margin-left:auto;display:flex}@media (width>=1024px){.header-actions{gap:1rem}}.main{background-color:var(--background);flex:1;min-height:0;padding:.5rem 1rem;overflow-y:auto}@media (width>=768px){.main{padding:1rem 2rem}}.footer{background-color:var(--background);color:var(--muted-foreground);flex-shrink:0;padding:.5rem 1rem}@media (width>=768px){.footer{padding:1rem 2rem}}.pihanga-paste-target{border:2px dashed #999}.pihanga-paste-target .paste-target-msg-title{font-size:1.2em}.pihanga-paste-target textarea:focus{outline:none}.pihanga-paste-target-focused{border-width:3px;border-color:#007bff}.pihanga-paste-target-focused .paste-target-focus-reminder{display:none}.pi-stepper{--pi-stepper-indicator-size-sm:1.5rem;--pi-stepper-indicator-size-md:2rem;--pi-stepper-indicator-size-lg:2.5rem;--pi-stepper-indicator-size:var(--pi-stepper-indicator-size-md);--pi-stepper-connector-thickness:2px;--pi-stepper-connector-min-height:1.5rem;--pi-stepper-label-max-width:6rem}.pi-stepper--sm{--pi-stepper-indicator-size:var(--pi-stepper-indicator-size-sm)}.pi-stepper--md{--pi-stepper-indicator-size:var(--pi-stepper-indicator-size-md)}.pi-stepper--lg{--pi-stepper-indicator-size:var(--pi-stepper-indicator-size-lg)}.pi-stepper__indicator{transition:background-color .2s,border-color .2s,color .2s,outline-color .2s}.pi-stepper__indicator--clickable{cursor:pointer}.pi-stepper__indicator--clickable:hover{opacity:.8}.pi-stepper__indicator--static{cursor:default}.pi-stepper__connector{transition:background-color .3s}.pi-stepper__connector--vertical{min-height:var(--pi-stepper-connector-min-height)}.pi-stepper__label-title{transition:color .2s}
|
|
2
2
|
/*$vite$:1*/
|
package/cards/core-index.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { BADGE_CARD as e, ShadBadge as t } from "./badge/badge.types.js";
|
|
2
|
-
import "./badge/index.js";
|
|
3
|
-
import { BOX_CARD as n, Box as r } from "./box/box.types.js";
|
|
4
|
-
import "./box/index.js";
|
|
5
|
-
import { Button as i, PI_BUTTON_ACTION as a, PI_BUTTON_CARD as o, onButtonClicked as s, onPiButtonClicked as c } from "./button/button.types.js";
|
|
6
|
-
import "./button/index.js";
|
|
7
|
-
import { FormContext as l, useFormContext as u } from "./form/form.context.js";
|
|
8
|
-
import { Checkbox as d, PI_CHECKBOX_ACTION as f, PI_CHECKBOX_CARD as p, onCheckboxChanged as m, onPiCheckboxChanged as h } from "./checkbox/checkbox.types.js";
|
|
9
|
-
import "./checkbox/index.js";
|
|
10
|
-
import { CONDITIONAL_CARD as g, Conditional as _ } from "./conditional/conditional.types.js";
|
|
11
|
-
import "./conditional/index.js";
|
|
12
|
-
import { DATA_TABLE_ACTION as v, DATA_TABLE_CARD as y, DATA_TABLE_ROW_DETAIL_CARD as b, DataTable as x, DataTableRowDetail as S, onDataTableHideDetail as C, onDataTablePageChanged as w, onDataTableRowClicked as T, onDataTableShowDetail as E, onDataTableSortChanged as D } from "./dataTable/dataTable.types.js";
|
|
13
|
-
import "./dataTable/index.js";
|
|
14
|
-
import { Dialog as O, PI_DIALOG_ACTION as k, PI_DIALOG_CARD as A, onDialogClosed as j, onDialogOpenChanged as M, onDialogOpened as N } from "./dialog/dialog.types.js";
|
|
15
|
-
import "./dialog/index.js";
|
|
16
|
-
import { DROP_DOWN_MENU_ACTION as P, DROP_DOWN_MENU_CARD as F, DropDownMenu as I, onDropDownMenuClicked as L } from "./dropDownMenu/drop-down.types.js";
|
|
17
|
-
import "./dropDownMenu/index.js";
|
|
18
|
-
import { Field as R, PI_FIELD_CARD as z } from "./field/field.types.js";
|
|
19
|
-
import "./field/index.js";
|
|
20
|
-
import { DEF_FILE_DROP_FILE_TYPES as B, FILE_DROP_ACTION as V, FILE_DROP_CARD as H, FileDrop as U, onFileDropError as W, onFileDropped as G } from "./fileDrop/fileDrop.types.js";
|
|
21
|
-
import { get_last_dropped as K } from "./fileDrop/fileDrop.component.js";
|
|
22
|
-
import "./fileDrop/index.js";
|
|
23
|
-
import { FLEX_GRID_CARD as q, FlexGrid as J } from "./flexGrid/flexGrid.types.js";
|
|
24
|
-
import "./flexGrid/index.js";
|
|
25
|
-
import { Form as Y, PI_FORM_ACTION as X, PI_FORM_CARD as Z, onFormSubmitted as Q, onPiFormSubmitted as $ } from "./form/form.types.js";
|
|
26
|
-
import "./form/index.js";
|
|
27
|
-
import { SdFramework as ee } from "./framework/index.js";
|
|
28
|
-
import { PI_INPUT_ACTION as te, PI_INPUT_CARD as ne, PiInput as re, onInputChanged as ie, onInputCommitted as ae, onPiInputChanged as oe, onPiInputCommitted as se } from "./input/input.types.js";
|
|
29
|
-
import "./input/index.js";
|
|
30
|
-
import { LIST_ACTION as ce, LIST_CARD as le, List as ue, onListItemClicked as de } from "./list/list.types.js";
|
|
31
|
-
import "./list/index.js";
|
|
32
|
-
import { LOADING_OVERLAY_CARD as fe, LoadingOverlay as pe } from "./loadingOverlay/loadingOverlay.types.js";
|
|
33
|
-
import "./loadingOverlay/index.js";
|
|
34
|
-
import { LOADING_SKELETON_CARD as me, LoadingSkeleton as he } from "./loadingSkeleton/loading-skeleton.types.js";
|
|
35
|
-
import "./loadingSkeleton/index.js";
|
|
36
|
-
import { MENU_ACTION as ge, MENU_CARD as _e, Menu as ve, onMenuClicked as ye } from "./menu/menu.types.js";
|
|
37
|
-
import "./menu/index.js";
|
|
38
|
-
import { MODE_TOGGLE_ACTION as be, MODE_TOGGLE_CARD as xe, ModeToggle as Se, onModeToggleChanged as Ce } from "./modeToggle/mode-toggle.types.js";
|
|
39
|
-
import "./modeToggle/index.js";
|
|
40
|
-
import { NAVBAR_SEARCH_ACTION as we, NAVBAR_SEARCH_CARD as Te, NavbarSearch as Ee, onNavbarSearchFocus as De, onNavbarSearchItems as Oe, onNavbarSearchSubmit as ke } from "./navbarSearch/navbarSearch.type.js";
|
|
41
|
-
import "./navbarSearch/index.js";
|
|
42
|
-
import { PAGE_WITH_NAVBAR_ACTION as Ae, PAGE_WITH_NAVBAR_CARD as je, PageWithNavbar as Me, onPageWithNavbarNavigateTo as Ne } from "./pageWithNavbar/pageWithNavbar.type.js";
|
|
43
|
-
import { SdPageWithNavbar as Pe } from "./pageWithNavbar/index.js";
|
|
44
|
-
import { DEF_ERROR_COLOR as Fe, DEF_EVENT_DURATION_SECONDS as Ie, DEF_HEIGHT as Le, DEF_OVERLAY_OPACITY as Re, DEF_PASTE_FIRST_REMINDER as ze, DEF_PASTE_TARGET_FILE_TYPES as Be, DEF_SUCCESS_COLOR as Ve, PASTE_TARGET_ACTION as He, PASTE_TARGET_CARD as Ue, PasteTarget as We, onContentPasted as Ge, onPasteError as Ke } from "./pasteTarget/pasteTarget.types.js";
|
|
45
|
-
import "./pasteTarget/index.js";
|
|
46
|
-
import { PI_SELECT_ACTION as qe, PI_SELECT_CARD as Je, Select as Ye, onPiSelectChanged as Xe, onPiSelectClosed as Ze, onPiSelectOpened as Qe, onSelectChanged as $e, onSelectClosed as et, onSelectOpened as tt } from "./select/select.types.js";
|
|
47
|
-
import "./select/index.js";
|
|
48
|
-
import { PI_SLIDER_ACTION as nt, PI_SLIDER_CARD as rt, Slider as it, onPiSliderChanged as at, onPiSliderCommitted as ot, onSliderChanged as st, onSliderCommitted as ct } from "./slider/slider.types.js";
|
|
49
|
-
import "./slider/index.js";
|
|
50
|
-
import { PI_SLIDER_VALUE_CARD as lt, SliderValue as ut } from "./sliderValue/sliderValue.types.js";
|
|
51
|
-
import "./sliderValue/index.js";
|
|
52
|
-
import { STACK_CARD as dt, Stack as ft } from "./stack/stack.types.js";
|
|
53
|
-
import "./stack/index.js";
|
|
54
|
-
import { STEPPER_ACTION as pt, STEPPER_CARD as mt, Stepper as ht, onStepperStepClicked as gt } from "./stepper/stepper.types.js";
|
|
55
|
-
import "./stepper/index.js";
|
|
56
|
-
import { PI_SWITCH_ACTION as _t, PI_SWITCH_CARD as vt, Switch as yt, onPiSwitchChanged as bt, onSwitchChanged as xt } from "./switch/switch.types.js";
|
|
57
|
-
import "./switch/index.js";
|
|
58
|
-
import { SdTabs as St, TABS_ACTION as Ct, TABS_CARD as wt, Tabs as Tt, onTabsTabChanged as Et } from "./tabs/tabs.types.js";
|
|
59
|
-
import "./tabs/index.js";
|
|
60
|
-
import { PI_TEXT_FIELD_ACTION as Dt, PI_TEXT_FIELD_CARD as Ot, TextField as kt, onPiTextFieldChanged as At, onTextFieldChanged as jt } from "./textField/textField.types.js";
|
|
61
|
-
import "./textField/index.js";
|
|
62
|
-
import { PI_TOAST_ACTION as Mt, PI_TOAST_CARD as Nt, TOAST_OP_ACTION as Pt, Toast as Ft, dispatchShowToast as It, onPiToastClosed as Lt, onShowToast as Rt, onToastClosed as zt } from "./toast/toast.types.js";
|
|
63
|
-
import "./toast/index.js";
|
|
64
|
-
import { PI_TOGGLE_GROUP_ACTION as Bt, PI_TOGGLE_GROUP_CARD as Vt, ToggleGroup as Ht, onPiToggleGroupChanged as Ut, onToggleGroupChanged as Wt } from "./toggleGroup/toggleGroup.types.js";
|
|
65
|
-
import "./toggleGroup/index.js";
|
|
66
|
-
import { TYPOGRAPHY_CARD as Gt, Typography as Kt } from "./typography/typography.types.js";
|
|
67
|
-
import "./typography/index.js";
|
|
68
|
-
export { e as BADGE_CARD, n as BOX_CARD, r as Box, i as Button, g as CONDITIONAL_CARD, d as Checkbox, _ as Conditional, v as DATA_TABLE_ACTION, y as DATA_TABLE_CARD, b as DATA_TABLE_ROW_DETAIL_CARD, Fe as DEF_ERROR_COLOR, Ie as DEF_EVENT_DURATION_SECONDS, B as DEF_FILE_DROP_FILE_TYPES, Le as DEF_HEIGHT, Re as DEF_OVERLAY_OPACITY, ze as DEF_PASTE_FIRST_REMINDER, Be as DEF_PASTE_TARGET_FILE_TYPES, Ve as DEF_SUCCESS_COLOR, P as DROP_DOWN_MENU_ACTION, F as DROP_DOWN_MENU_CARD, x as DataTable, S as DataTableRowDetail, O as Dialog, I as DropDownMenu, V as FILE_DROP_ACTION, H as FILE_DROP_CARD, q as FLEX_GRID_CARD, R as Field, U as FileDrop, J as FlexGrid, Y as Form, l as FormContext, ce as LIST_ACTION, le as LIST_CARD, fe as LOADING_OVERLAY_CARD, me as LOADING_SKELETON_CARD, ue as List, pe as LoadingOverlay, he as LoadingSkeleton, ge as MENU_ACTION, _e as MENU_CARD, be as MODE_TOGGLE_ACTION, xe as MODE_TOGGLE_CARD, ve as Menu, Se as ModeToggle, we as NAVBAR_SEARCH_ACTION, Te as NAVBAR_SEARCH_CARD, Ee as NavbarSearch, Ae as PAGE_WITH_NAVBAR_ACTION, je as PAGE_WITH_NAVBAR_CARD, He as PASTE_TARGET_ACTION, Ue as PASTE_TARGET_CARD, a as PI_BUTTON_ACTION, o as PI_BUTTON_CARD, f as PI_CHECKBOX_ACTION, p as PI_CHECKBOX_CARD, k as PI_DIALOG_ACTION, A as PI_DIALOG_CARD, z as PI_FIELD_CARD, X as PI_FORM_ACTION, Z as PI_FORM_CARD, te as PI_INPUT_ACTION, ne as PI_INPUT_CARD, qe as PI_SELECT_ACTION, Je as PI_SELECT_CARD, nt as PI_SLIDER_ACTION, rt as PI_SLIDER_CARD, lt as PI_SLIDER_VALUE_CARD, _t as PI_SWITCH_ACTION, vt as PI_SWITCH_CARD, Dt as PI_TEXT_FIELD_ACTION, Ot as PI_TEXT_FIELD_CARD, Mt as PI_TOAST_ACTION, Nt as PI_TOAST_CARD, Bt as PI_TOGGLE_GROUP_ACTION, Vt as PI_TOGGLE_GROUP_CARD, Me as PageWithNavbar, We as PasteTarget, re as PiInput, dt as STACK_CARD, pt as STEPPER_ACTION, mt as STEPPER_CARD, ee as SdFramework, Pe as SdPageWithNavbar, St as SdTabs, Ye as Select, t as ShadBadge, it as Slider, ut as SliderValue, ft as Stack, ht as Stepper, yt as Switch, Ct as TABS_ACTION, wt as TABS_CARD, Pt as TOAST_OP_ACTION, Gt as TYPOGRAPHY_CARD, Tt as Tabs, kt as TextField, Ft as Toast, Ht as ToggleGroup, Kt as Typography, It as dispatchShowToast, K as get_last_dropped, s as onButtonClicked, m as onCheckboxChanged, Ge as onContentPasted, C as onDataTableHideDetail, w as onDataTablePageChanged, T as onDataTableRowClicked, E as onDataTableShowDetail, D as onDataTableSortChanged, j as onDialogClosed, M as onDialogOpenChanged, N as onDialogOpened, L as onDropDownMenuClicked, W as onFileDropError, G as onFileDropped, Q as onFormSubmitted, ie as onInputChanged, ae as onInputCommitted, de as onListItemClicked, ye as onMenuClicked, Ce as onModeToggleChanged, De as onNavbarSearchFocus, Oe as onNavbarSearchItems, ke as onNavbarSearchSubmit, Ne as onPageWithNavbarNavigateTo, Ke as onPasteError, c as onPiButtonClicked, h as onPiCheckboxChanged, $ as onPiFormSubmitted, oe as onPiInputChanged, se as onPiInputCommitted, Xe as onPiSelectChanged, Ze as onPiSelectClosed, Qe as onPiSelectOpened, at as onPiSliderChanged, ot as onPiSliderCommitted, bt as onPiSwitchChanged, At as onPiTextFieldChanged, Lt as onPiToastClosed, Ut as onPiToggleGroupChanged, $e as onSelectChanged, et as onSelectClosed, tt as onSelectOpened, Rt as onShowToast, st as onSliderChanged, ct as onSliderCommitted, gt as onStepperStepClicked, xt as onSwitchChanged, Et as onTabsTabChanged, jt as onTextFieldChanged, zt as onToastClosed, Wt as onToggleGroupChanged, u as useFormContext };
|