@florianke/components 0.0.2 → 0.0.6
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 +467 -31
- package/dist/alert-dialog.d.mts +13 -0
- package/dist/alert-dialog.d.mts.map +1 -0
- package/dist/alert-dialog.mjs +13 -0
- package/dist/alert-dialog.mjs.map +1 -0
- package/dist/avatar.mjs +2 -2
- package/dist/button.d.mts +1 -1
- package/dist/button.d.mts.map +1 -1
- package/dist/button.mjs +4 -3
- package/dist/button.mjs.map +1 -1
- package/dist/card.mjs +1 -1
- package/dist/components/alert-dialog/alert-dialog.d.mts +35 -0
- package/dist/components/alert-dialog/alert-dialog.d.mts.map +1 -0
- package/dist/components/alert-dialog/alert-dialog.mjs +50 -0
- package/dist/components/alert-dialog/alert-dialog.mjs.map +1 -0
- package/dist/components/select/select.d.mts +42 -0
- package/dist/components/select/select.d.mts.map +1 -0
- package/dist/components/select/select.mjs +102 -0
- package/dist/components/select/select.mjs.map +1 -0
- package/dist/components/toast/toast.d.mts +45 -0
- package/dist/components/toast/toast.d.mts.map +1 -0
- package/dist/components/toast/toast.mjs +156 -0
- package/dist/components/toast/toast.mjs.map +1 -0
- package/dist/components/tooltip/tooltip.d.mts +30 -0
- package/dist/components/tooltip/tooltip.d.mts.map +1 -0
- package/dist/components/tooltip/tooltip.mjs +40 -0
- package/dist/components/tooltip/tooltip.mjs.map +1 -0
- package/dist/dropdown-menu.mjs +1 -1
- package/dist/field.d.mts +11 -0
- package/dist/field.d.mts.map +1 -0
- package/dist/field.mjs +14 -0
- package/dist/field.mjs.map +1 -0
- package/dist/heading.d.mts +17 -0
- package/dist/heading.d.mts.map +1 -0
- package/dist/heading.mjs +20 -0
- package/dist/heading.mjs.map +1 -0
- package/dist/hint.d.mts +17 -0
- package/dist/hint.d.mts.map +1 -0
- package/dist/hint.mjs +22 -0
- package/dist/hint.mjs.map +1 -0
- package/dist/hooks/use-confirm.d.mts +23 -0
- package/dist/hooks/use-confirm.d.mts.map +1 -0
- package/dist/hooks/use-confirm.mjs +97 -0
- package/dist/hooks/use-confirm.mjs.map +1 -0
- package/dist/index.d.mts +11 -1
- package/dist/index.mjs +12 -2
- package/dist/input.d.mts +1 -0
- package/dist/input.d.mts.map +1 -1
- package/dist/input.mjs +74 -7
- package/dist/input.mjs.map +1 -1
- package/dist/label.d.mts +20 -0
- package/dist/label.d.mts.map +1 -0
- package/dist/label.mjs +19 -0
- package/dist/label.mjs.map +1 -0
- package/dist/{cn-BpvCVwZv.mjs → lib/cn.mjs} +2 -2
- package/dist/lib/cn.mjs.map +1 -0
- package/dist/providers.d.mts +12 -0
- package/dist/providers.d.mts.map +1 -0
- package/dist/providers.mjs +14 -0
- package/dist/providers.mjs.map +1 -0
- package/dist/select.d.mts +2 -38
- package/dist/select.d.mts.map +1 -1
- package/dist/select.mjs +2 -98
- package/dist/select.mjs.map +1 -1
- package/dist/text.d.mts +30 -0
- package/dist/text.d.mts.map +1 -0
- package/dist/text.mjs +37 -0
- package/dist/text.mjs.map +1 -0
- package/dist/toast.d.mts +18 -0
- package/dist/toast.d.mts.map +1 -0
- package/dist/toast.mjs +17 -0
- package/dist/toast.mjs.map +1 -0
- package/dist/tooltip.d.mts +11 -0
- package/dist/tooltip.d.mts.map +1 -0
- package/dist/tooltip.mjs +11 -0
- package/dist/tooltip.mjs.map +1 -0
- package/package.json +41 -1
- package/src/styles.css +13 -1
- package/dist/cn-BpvCVwZv.mjs.map +0 -1
package/dist/select.d.mts
CHANGED
|
@@ -1,42 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Select as Select$1 } from "@base-ui/react/select";
|
|
1
|
+
import { SelectContent, SelectItem, SelectRoot, SelectSeparator, SelectTrigger } from "./components/select/select.mjs";
|
|
3
2
|
|
|
4
|
-
//#region src/components/select/
|
|
5
|
-
type SelectRootProps = React.ComponentProps<typeof Select$1.Root>;
|
|
6
|
-
declare function SelectRoot({
|
|
7
|
-
items,
|
|
8
|
-
children,
|
|
9
|
-
...props
|
|
10
|
-
}: SelectRootProps): React.JSX.Element;
|
|
11
|
-
type SelectTriggerProps = React.ComponentPropsWithoutRef<typeof Select$1.Trigger> & {
|
|
12
|
-
placeholder?: string;
|
|
13
|
-
};
|
|
14
|
-
declare function SelectTrigger({
|
|
15
|
-
className,
|
|
16
|
-
placeholder,
|
|
17
|
-
...props
|
|
18
|
-
}: SelectTriggerProps): React.JSX.Element;
|
|
19
|
-
type SelectContentProps = React.ComponentPropsWithoutRef<typeof Select$1.Popup> & Pick<React.ComponentPropsWithoutRef<typeof Select$1.Positioner>, "side" | "align" | "sideOffset" | "alignOffset">;
|
|
20
|
-
declare function SelectContent({
|
|
21
|
-
className,
|
|
22
|
-
children,
|
|
23
|
-
side,
|
|
24
|
-
align,
|
|
25
|
-
sideOffset,
|
|
26
|
-
alignOffset,
|
|
27
|
-
...props
|
|
28
|
-
}: SelectContentProps): React.JSX.Element;
|
|
29
|
-
type SelectItemProps = React.ComponentPropsWithoutRef<typeof Select$1.Item>;
|
|
30
|
-
declare function SelectItem({
|
|
31
|
-
className,
|
|
32
|
-
children,
|
|
33
|
-
...props
|
|
34
|
-
}: SelectItemProps): React.JSX.Element;
|
|
35
|
-
type SelectSeparatorProps = React.ComponentPropsWithoutRef<typeof Select$1.Separator>;
|
|
36
|
-
declare function SelectSeparator({
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: SelectSeparatorProps): React.JSX.Element;
|
|
3
|
+
//#region src/components/select/index.d.ts
|
|
40
4
|
declare const Select: typeof SelectRoot & {
|
|
41
5
|
Trigger: typeof SelectTrigger;
|
|
42
6
|
Content: typeof SelectContent;
|
package/dist/select.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.mts","names":[],"sources":["../src/components/select/
|
|
1
|
+
{"version":3,"file":"select.d.mts","names":[],"sources":["../src/components/select/index.ts"],"mappings":";;;cAca,MAAA,SAAM,UAAA"}
|
package/dist/select.mjs
CHANGED
|
@@ -1,101 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { Select as Select$1 } from "@base-ui/react/select";
|
|
6
|
-
//#region src/components/select/select.tsx
|
|
7
|
-
function collectItemLabels(children, items) {
|
|
8
|
-
React.Children.forEach(children, (child) => {
|
|
9
|
-
if (!React.isValidElement(child)) return;
|
|
10
|
-
const props = child.props;
|
|
11
|
-
if (child.type === SelectItem) {
|
|
12
|
-
if (props.value != null) items[String(props.value)] = props.children;
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
if (props.children != null) collectItemLabels(props.children, items);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function SelectRoot({ items, children, ...props }) {
|
|
19
|
-
const derivedItems = React.useMemo(() => {
|
|
20
|
-
if (items) return items;
|
|
21
|
-
const map = {};
|
|
22
|
-
collectItemLabels(children, map);
|
|
23
|
-
return map;
|
|
24
|
-
}, [items, children]);
|
|
25
|
-
return /* @__PURE__ */ jsx(Select$1.Root, {
|
|
26
|
-
items: derivedItems,
|
|
27
|
-
...props,
|
|
28
|
-
children
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function SelectTrigger({ className, placeholder, ...props }) {
|
|
32
|
-
return /* @__PURE__ */ jsxs(Select$1.Trigger, {
|
|
33
|
-
className: cn("flex h-8 w-full min-w-40 items-center justify-between gap-2 rounded-md border border-(--input-border) bg-(--input) px-2 text-[14px] text-(--foreground) outline-none", "transition-[border-color,box-shadow] duration-150 ease-out", "hover:not-data-disabled:bg-(--foreground)/4", "focus-visible:border-(--ring) focus-visible:ring-[3px] focus-visible:ring-(--ring)/20", "data-popup-open:border-(--ring) data-popup-open:ring-[3px] data-popup-open:ring-(--ring)/20", "data-disabled:pointer-events-none data-disabled:opacity-50", className),
|
|
34
|
-
...props,
|
|
35
|
-
children: [/* @__PURE__ */ jsx(Select$1.Value, {
|
|
36
|
-
placeholder,
|
|
37
|
-
className: "data-placeholder:text-(--muted-foreground)"
|
|
38
|
-
}), /* @__PURE__ */ jsx(Select$1.Icon, {
|
|
39
|
-
className: "flex shrink-0 items-center text-(--muted-foreground) transition-transform duration-200 ease-[cubic-bezier(0.16,1,0.3,1)] data-popup-open:rotate-180",
|
|
40
|
-
children: /* @__PURE__ */ jsx("svg", {
|
|
41
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
42
|
-
viewBox: "0 0 24 24",
|
|
43
|
-
fill: "none",
|
|
44
|
-
stroke: "currentColor",
|
|
45
|
-
strokeWidth: "2",
|
|
46
|
-
strokeLinecap: "round",
|
|
47
|
-
strokeLinejoin: "round",
|
|
48
|
-
className: "size-3.5",
|
|
49
|
-
children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
|
|
50
|
-
})
|
|
51
|
-
})]
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function SelectContent({ className, children, side = "bottom", align = "start", sideOffset = 6, alignOffset, ...props }) {
|
|
55
|
-
return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
56
|
-
alignItemWithTrigger: false,
|
|
57
|
-
side,
|
|
58
|
-
align,
|
|
59
|
-
sideOffset,
|
|
60
|
-
alignOffset,
|
|
61
|
-
collisionAvoidance: { side: "none" },
|
|
62
|
-
className: "z-50 outline-none",
|
|
63
|
-
children: /* @__PURE__ */ jsx(Select$1.Popup, {
|
|
64
|
-
className: cn("min-w-(--anchor-width) origin-(--transform-origin) scale-100 rounded-lg border border-(--border) bg-(--popover) p-1 text-(--popover-foreground) opacity-100 shadow-lg outline-none", "transition-[scale,opacity] duration-200 ease-[cubic-bezier(0.16,1,0.3,1)]", "data-ending-style:duration-100 data-ending-style:ease-in", "data-starting-style:scale-95 data-starting-style:opacity-0", "data-ending-style:scale-95 data-ending-style:opacity-0", className),
|
|
65
|
-
...props,
|
|
66
|
-
children: /* @__PURE__ */ jsx(Select$1.List, { children })
|
|
67
|
-
})
|
|
68
|
-
}) });
|
|
69
|
-
}
|
|
70
|
-
function SelectItem({ className, children, ...props }) {
|
|
71
|
-
return /* @__PURE__ */ jsxs(Select$1.Item, {
|
|
72
|
-
className: cn("grid cursor-default grid-cols-[0.875rem_1fr] items-center gap-2 rounded-md py-1.5 pr-2 pl-1.5 text-[13px] text-(--popover-foreground) select-none outline-none transition-colors duration-150 ease-out", "data-highlighted:bg-(--accent)", "data-disabled:pointer-events-none data-disabled:opacity-50", className),
|
|
73
|
-
...props,
|
|
74
|
-
children: [/* @__PURE__ */ jsx(Select$1.ItemIndicator, {
|
|
75
|
-
className: "col-start-1 text-(--foreground)",
|
|
76
|
-
children: /* @__PURE__ */ jsx("svg", {
|
|
77
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
78
|
-
viewBox: "0 0 24 24",
|
|
79
|
-
fill: "none",
|
|
80
|
-
stroke: "currentColor",
|
|
81
|
-
strokeWidth: "2.5",
|
|
82
|
-
strokeLinecap: "round",
|
|
83
|
-
strokeLinejoin: "round",
|
|
84
|
-
className: "size-3.5",
|
|
85
|
-
children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
|
|
86
|
-
})
|
|
87
|
-
}), /* @__PURE__ */ jsx(Select$1.ItemText, {
|
|
88
|
-
className: "col-start-2",
|
|
89
|
-
children
|
|
90
|
-
})]
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
function SelectSeparator({ className, ...props }) {
|
|
94
|
-
return /* @__PURE__ */ jsx(Select$1.Separator, {
|
|
95
|
-
className: cn("-mx-1 my-1 h-px bg-(--border)", className),
|
|
96
|
-
...props
|
|
97
|
-
});
|
|
98
|
-
}
|
|
1
|
+
import { SelectContent, SelectItem, SelectRoot, SelectSeparator, SelectTrigger } from "./components/select/select.mjs";
|
|
2
|
+
//#region src/components/select/index.ts
|
|
99
3
|
const Select = Object.assign(SelectRoot, {
|
|
100
4
|
Trigger: SelectTrigger,
|
|
101
5
|
Content: SelectContent,
|
package/dist/select.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.mjs","names":[
|
|
1
|
+
{"version":3,"file":"select.mjs","names":[],"sources":["../src/components/select/index.ts"],"sourcesContent":["import {\n SelectContent,\n SelectItem,\n SelectRoot,\n SelectSeparator,\n SelectTrigger,\n} from \"./select\";\n\n// Composed in a module without \"use client\" on purpose: Next.js/Turbopack\n// generates a client-reference proxy for each export of a \"use client\"\n// module, and that proxy does not forward extra static properties attached\n// via Object.assign. Doing the composition here (a plain module that just\n// re-imports the already-resolved client references) keeps `Select.Trigger`\n// etc. working when consumed from a Server Component.\nexport const Select = Object.assign(SelectRoot, {\n Trigger: SelectTrigger,\n Content: SelectContent,\n Item: SelectItem,\n Separator: SelectSeparator,\n});\n"],"mappings":";;AAcA,MAAa,SAAS,OAAO,OAAO,YAAY;CAC9C,SAAS;CACT,SAAS;CACT,MAAM;CACN,WAAW;CACZ,CAAC"}
|
package/dist/text.d.mts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/text/text.d.ts
|
|
4
|
+
type TextSize = "small" | "base" | "large";
|
|
5
|
+
type TextWeight = "regular" | "plus";
|
|
6
|
+
type TextFamily = "sans" | "mono";
|
|
7
|
+
type TextLeading = "normal" | "compact";
|
|
8
|
+
type TextElement = "p" | "span" | "div" | "label";
|
|
9
|
+
type TextProps = React.HTMLAttributes<HTMLElement> & {
|
|
10
|
+
as?: TextElement;
|
|
11
|
+
size?: TextSize;
|
|
12
|
+
weight?: TextWeight;
|
|
13
|
+
family?: TextFamily;
|
|
14
|
+
leading?: TextLeading;
|
|
15
|
+
htmlFor?: string;
|
|
16
|
+
ref?: React.Ref<HTMLElement>;
|
|
17
|
+
};
|
|
18
|
+
declare function Text({
|
|
19
|
+
className,
|
|
20
|
+
as: Tag,
|
|
21
|
+
size,
|
|
22
|
+
weight,
|
|
23
|
+
family,
|
|
24
|
+
leading,
|
|
25
|
+
ref,
|
|
26
|
+
...props
|
|
27
|
+
}: TextProps): React.JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { Text };
|
|
30
|
+
//# sourceMappingURL=text.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.mts","names":[],"sources":["../src/components/text/text.tsx"],"mappings":";;;KAGK,QAAA;AAAA,KACA,UAAA;AAAA,KACA,UAAA;AAAA,KACA,WAAA;AAAA,KACA,WAAA;AAAA,KA2BA,SAAA,GAAY,KAAA,CAAM,cAAA,CAAe,WAAA;EACpC,EAAA,GAAK,WAAA;EACL,IAAA,GAAO,QAAA;EACP,MAAA,GAAS,UAAA;EACT,MAAA,GAAS,UAAA;EACT,OAAA,GAAU,WAAA;EACV,OAAA;EACA,GAAA,GAAM,KAAA,CAAM,GAAA,CAAI,WAAA;AAAA;AAAA,iBAGF,IAAA,CAAA;EACd,SAAA;EACA,EAAA,EAAI,GAAA;EACJ,IAAA;EACA,MAAA;EACA,MAAA;EACA,OAAA;EACA,GAAA;EAAA,GACG;AAAA,GACF,SAAA,GAAS,KAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/text.mjs
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { cn } from "./lib/cn.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/text/text.tsx
|
|
5
|
+
const sizes = {
|
|
6
|
+
small: {
|
|
7
|
+
normal: "text-[0.8125rem] leading-6",
|
|
8
|
+
compact: "text-[0.8125rem] leading-5"
|
|
9
|
+
},
|
|
10
|
+
base: {
|
|
11
|
+
normal: "text-sm leading-6",
|
|
12
|
+
compact: "text-sm leading-5"
|
|
13
|
+
},
|
|
14
|
+
large: {
|
|
15
|
+
normal: "text-base leading-7",
|
|
16
|
+
compact: "text-base leading-5"
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const weights = {
|
|
20
|
+
regular: "font-normal",
|
|
21
|
+
plus: "font-medium"
|
|
22
|
+
};
|
|
23
|
+
const families = {
|
|
24
|
+
sans: "font-sans",
|
|
25
|
+
mono: "font-mono"
|
|
26
|
+
};
|
|
27
|
+
function Text({ className, as: Tag = "p", size = "base", weight = "regular", family = "sans", leading = "normal", ref, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(Tag, {
|
|
29
|
+
ref,
|
|
30
|
+
className: cn(sizes[size][leading], weights[weight], families[family], className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { Text };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=text.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.mjs","names":["Element"],"sources":["../src/components/text/text.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/lib/cn\";\n\ntype TextSize = \"small\" | \"base\" | \"large\";\ntype TextWeight = \"regular\" | \"plus\";\ntype TextFamily = \"sans\" | \"mono\";\ntype TextLeading = \"normal\" | \"compact\";\ntype TextElement = \"p\" | \"span\" | \"div\" | \"label\";\n\nconst sizes: Record<TextSize, Record<TextLeading, string>> = {\n small: {\n normal: \"text-[0.8125rem] leading-6\",\n compact: \"text-[0.8125rem] leading-5\",\n },\n base: {\n normal: \"text-sm leading-6\",\n compact: \"text-sm leading-5\",\n },\n large: {\n normal: \"text-base leading-7\",\n compact: \"text-base leading-5\",\n },\n};\n\nconst weights: Record<TextWeight, string> = {\n regular: \"font-normal\",\n plus: \"font-medium\",\n};\n\nconst families: Record<TextFamily, string> = {\n sans: \"font-sans\",\n mono: \"font-mono\",\n};\n\ntype TextProps = React.HTMLAttributes<HTMLElement> & {\n as?: TextElement;\n size?: TextSize;\n weight?: TextWeight;\n family?: TextFamily;\n leading?: TextLeading;\n htmlFor?: string;\n ref?: React.Ref<HTMLElement>;\n};\n\nexport function Text({\n className,\n as: Tag = \"p\",\n size = \"base\",\n weight = \"regular\",\n family = \"sans\",\n leading = \"normal\",\n ref,\n ...props\n}: TextProps) {\n const Element = Tag as React.ElementType;\n\n return (\n <Element\n ref={ref}\n className={cn(\n sizes[size][leading],\n weights[weight],\n families[family],\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":";;;;AASA,MAAM,QAAuD;CAC3D,OAAO;EACL,QAAQ;EACR,SAAS;EACV;CACD,MAAM;EACJ,QAAQ;EACR,SAAS;EACV;CACD,OAAO;EACL,QAAQ;EACR,SAAS;EACV;CACF;AAED,MAAM,UAAsC;CAC1C,SAAS;CACT,MAAM;CACP;AAED,MAAM,WAAuC;CAC3C,MAAM;CACN,MAAM;CACP;AAYD,SAAgB,KAAK,EACnB,WACA,IAAI,MAAM,KACV,OAAO,QACP,SAAS,WACT,SAAS,QACT,UAAU,UACV,KACA,GAAG,SACS;AAGZ,QACE,oBAACA,KAAD;EACO;EACL,WAAW,GACT,MAAM,MAAM,UACZ,QAAQ,SACR,SAAS,SACT,UACD;EACD,GAAI;EACJ,CAAA"}
|
package/dist/toast.d.mts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ToastClose, ToastContent, ToastDescription, ToastIcon, ToastList, ToastProvider, ToastRoot, ToastTitle, ToastViewport } from "./components/toast/toast.mjs";
|
|
2
|
+
import * as _$_base_ui_react0 from "@base-ui/react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/toast/index.d.ts
|
|
5
|
+
declare const Toast: typeof ToastRoot & {
|
|
6
|
+
Provider: typeof ToastProvider;
|
|
7
|
+
Viewport: typeof ToastViewport;
|
|
8
|
+
Content: typeof ToastContent;
|
|
9
|
+
Title: typeof ToastTitle;
|
|
10
|
+
Description: typeof ToastDescription;
|
|
11
|
+
Close: typeof ToastClose;
|
|
12
|
+
Icon: typeof ToastIcon;
|
|
13
|
+
List: typeof ToastList;
|
|
14
|
+
useToastManager: typeof _$_base_ui_react0.useToastManager;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Toast };
|
|
18
|
+
//# sourceMappingURL=toast.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.d.mts","names":[],"sources":["../src/components/toast/index.ts"],"mappings":";;;;cAmBa,KAAA,SAAK,SAAA"}
|
package/dist/toast.mjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ToastClose, ToastContent, ToastDescription, ToastIcon, ToastList, ToastProvider, ToastRoot, ToastTitle, ToastViewport, useToastManager } from "./components/toast/toast.mjs";
|
|
2
|
+
//#region src/components/toast/index.ts
|
|
3
|
+
const Toast = Object.assign(ToastRoot, {
|
|
4
|
+
Provider: ToastProvider,
|
|
5
|
+
Viewport: ToastViewport,
|
|
6
|
+
Content: ToastContent,
|
|
7
|
+
Title: ToastTitle,
|
|
8
|
+
Description: ToastDescription,
|
|
9
|
+
Close: ToastClose,
|
|
10
|
+
Icon: ToastIcon,
|
|
11
|
+
List: ToastList,
|
|
12
|
+
useToastManager
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Toast };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=toast.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.mjs","names":[],"sources":["../src/components/toast/index.ts"],"sourcesContent":["import {\n ToastClose,\n ToastContent,\n ToastDescription,\n ToastIcon,\n ToastList,\n ToastProvider,\n ToastRoot,\n ToastTitle,\n ToastViewport,\n useToastManager,\n} from \"./toast\";\n\n// Composed in a module without \"use client\" on purpose: Next.js/Turbopack\n// generates a client-reference proxy for each export of a \"use client\"\n// module, and that proxy does not forward extra static properties attached\n// via Object.assign. Doing the composition here (a plain module that just\n// re-imports the already-resolved client references) keeps `Toast.Content`\n// etc. working when consumed from a Server Component.\nexport const Toast = Object.assign(ToastRoot, {\n Provider: ToastProvider,\n Viewport: ToastViewport,\n Content: ToastContent,\n Title: ToastTitle,\n Description: ToastDescription,\n Close: ToastClose,\n Icon: ToastIcon,\n List: ToastList,\n useToastManager,\n});\n"],"mappings":";;AAmBA,MAAa,QAAQ,OAAO,OAAO,WAAW;CAC5C,UAAU;CACV,UAAU;CACV,SAAS;CACT,OAAO;CACP,aAAa;CACb,OAAO;CACP,MAAM;CACN,MAAM;CACN;CACD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from "./components/tooltip/tooltip.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/components/tooltip/index.d.ts
|
|
4
|
+
declare const Tooltip: typeof TooltipRoot & {
|
|
5
|
+
Provider: typeof TooltipProvider;
|
|
6
|
+
Trigger: typeof TooltipTrigger;
|
|
7
|
+
Content: typeof TooltipContent;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Tooltip };
|
|
11
|
+
//# sourceMappingURL=tooltip.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.mts","names":[],"sources":["../src/components/tooltip/index.ts"],"mappings":";;;cAaa,OAAA,SAAO,WAAA"}
|
package/dist/tooltip.mjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from "./components/tooltip/tooltip.mjs";
|
|
2
|
+
//#region src/components/tooltip/index.ts
|
|
3
|
+
const Tooltip = Object.assign(TooltipRoot, {
|
|
4
|
+
Provider: TooltipProvider,
|
|
5
|
+
Trigger: TooltipTrigger,
|
|
6
|
+
Content: TooltipContent
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Tooltip };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=tooltip.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.mjs","names":[],"sources":["../src/components/tooltip/index.ts"],"sourcesContent":["import {\n TooltipContent,\n TooltipProvider,\n TooltipRoot,\n TooltipTrigger,\n} from \"./tooltip\";\n\n// Composed in a module without \"use client\" on purpose: Next.js/Turbopack\n// generates a client-reference proxy for each export of a \"use client\"\n// module, and that proxy does not forward extra static properties attached\n// via Object.assign. Doing the composition here (a plain module that just\n// re-imports the already-resolved client references) keeps `Tooltip.Content`\n// etc. working when consumed from a Server Component.\nexport const Tooltip = Object.assign(TooltipRoot, {\n Provider: TooltipProvider,\n Trigger: TooltipTrigger,\n Content: TooltipContent,\n});\n"],"mappings":";;AAaA,MAAa,UAAU,OAAO,OAAO,aAAa;CAChD,UAAU;CACV,SAAS;CACT,SAAS;CACV,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@florianke/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"main": "./dist/index.mjs",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.mts",
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"types": "./dist/index.d.mts",
|
|
19
19
|
"import": "./dist/index.mjs"
|
|
20
20
|
},
|
|
21
|
+
"./alert-dialog": {
|
|
22
|
+
"types": "./dist/alert-dialog.d.mts",
|
|
23
|
+
"import": "./dist/alert-dialog.mjs"
|
|
24
|
+
},
|
|
21
25
|
"./avatar": {
|
|
22
26
|
"types": "./dist/avatar.d.mts",
|
|
23
27
|
"import": "./dist/avatar.mjs"
|
|
@@ -34,14 +38,50 @@
|
|
|
34
38
|
"types": "./dist/dropdown-menu.d.mts",
|
|
35
39
|
"import": "./dist/dropdown-menu.mjs"
|
|
36
40
|
},
|
|
41
|
+
"./field": {
|
|
42
|
+
"types": "./dist/field.d.mts",
|
|
43
|
+
"import": "./dist/field.mjs"
|
|
44
|
+
},
|
|
45
|
+
"./heading": {
|
|
46
|
+
"types": "./dist/heading.d.mts",
|
|
47
|
+
"import": "./dist/heading.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./hint": {
|
|
50
|
+
"types": "./dist/hint.d.mts",
|
|
51
|
+
"import": "./dist/hint.mjs"
|
|
52
|
+
},
|
|
37
53
|
"./input": {
|
|
38
54
|
"types": "./dist/input.d.mts",
|
|
39
55
|
"import": "./dist/input.mjs"
|
|
40
56
|
},
|
|
57
|
+
"./label": {
|
|
58
|
+
"types": "./dist/label.d.mts",
|
|
59
|
+
"import": "./dist/label.mjs"
|
|
60
|
+
},
|
|
61
|
+
"./providers": {
|
|
62
|
+
"types": "./dist/providers.d.mts",
|
|
63
|
+
"import": "./dist/providers.mjs"
|
|
64
|
+
},
|
|
41
65
|
"./select": {
|
|
42
66
|
"types": "./dist/select.d.mts",
|
|
43
67
|
"import": "./dist/select.mjs"
|
|
44
68
|
},
|
|
69
|
+
"./text": {
|
|
70
|
+
"types": "./dist/text.d.mts",
|
|
71
|
+
"import": "./dist/text.mjs"
|
|
72
|
+
},
|
|
73
|
+
"./toast": {
|
|
74
|
+
"types": "./dist/toast.d.mts",
|
|
75
|
+
"import": "./dist/toast.mjs"
|
|
76
|
+
},
|
|
77
|
+
"./tooltip": {
|
|
78
|
+
"types": "./dist/tooltip.d.mts",
|
|
79
|
+
"import": "./dist/tooltip.mjs"
|
|
80
|
+
},
|
|
81
|
+
"./hooks/use-confirm": {
|
|
82
|
+
"types": "./dist/hooks/use-confirm.d.mts",
|
|
83
|
+
"import": "./dist/hooks/use-confirm.mjs"
|
|
84
|
+
},
|
|
45
85
|
"./hooks/use-initials": {
|
|
46
86
|
"types": "./dist/hooks/use-initials.d.mts",
|
|
47
87
|
"import": "./dist/hooks/use-initials.mjs"
|
package/src/styles.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
6
6
|
|
|
7
7
|
:root {
|
|
8
|
-
--background: oklch(
|
|
8
|
+
--background: oklch(1 0 0);
|
|
9
9
|
--foreground: oklch(0.15 0 0);
|
|
10
10
|
--card: oklch(1 0 0);
|
|
11
11
|
--card-foreground: oklch(0.15 0 0);
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
--accent: oklch(0.975 0 0);
|
|
20
20
|
--accent-foreground: oklch(0.15 0 0);
|
|
21
21
|
--ring: oklch(0.62 0.19 259);
|
|
22
|
+
--success: oklch(0.6 0.15 145);
|
|
23
|
+
--warning: oklch(0.72 0.16 80);
|
|
24
|
+
--destructive: oklch(0.58 0.22 25);
|
|
25
|
+
--info: oklch(0.6 0.19 259);
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
@media (prefers-color-scheme: dark) {
|
|
@@ -37,6 +41,10 @@
|
|
|
37
41
|
--accent: oklch(0.23 0.006 264);
|
|
38
42
|
--accent-foreground: oklch(0.97 0.003 264);
|
|
39
43
|
--ring: oklch(0.72 0.16 262);
|
|
44
|
+
--success: oklch(0.72 0.17 145);
|
|
45
|
+
--warning: oklch(0.8 0.16 80);
|
|
46
|
+
--destructive: oklch(0.7 0.19 25);
|
|
47
|
+
--info: oklch(0.72 0.16 262);
|
|
40
48
|
}
|
|
41
49
|
}
|
|
42
50
|
|
|
@@ -55,6 +63,10 @@
|
|
|
55
63
|
--accent: oklch(0.23 0.006 264);
|
|
56
64
|
--accent-foreground: oklch(0.97 0.003 264);
|
|
57
65
|
--ring: oklch(0.72 0.16 262);
|
|
66
|
+
--success: oklch(0.72 0.17 145);
|
|
67
|
+
--warning: oklch(0.8 0.16 80);
|
|
68
|
+
--destructive: oklch(0.7 0.19 25);
|
|
69
|
+
--info: oklch(0.72 0.16 262);
|
|
58
70
|
}
|
|
59
71
|
|
|
60
72
|
body {
|
package/dist/cn-BpvCVwZv.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cn-BpvCVwZv.mjs","names":[],"sources":["../src/lib/cn.ts"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;AAGA,SAAgB,GAAG,GAAG,QAAsB;AAC1C,QAAO,QAAQ,KAAK,OAAO,CAAC"}
|