@ztwoint/z-ui 0.1.9 → 0.1.11
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 +2 -1
- package/dist/components/button/button.js +6 -6
- package/dist/components/collapsible-side-nav-bar/side-nav-bar-header.js +19 -19
- package/dist/components/collapsible-side-nav-bar/side-nav-bar-item.js +1 -1
- package/dist/components/dialog/dialog.d.ts +12 -0
- package/dist/components/dialog/dialog.stories.d.ts +10 -0
- package/dist/components/tooltip/tooltip.d.ts +21 -0
- package/dist/components/tooltip/tooltip.js +32 -0
- package/dist/components/tooltip/tooltip.stories.d.ts +10 -0
- package/dist/css/config/colors/components/button.css +2 -2
- package/dist/css/config/colors/components/tab.css +1 -1
- package/dist/css/config/colors/text.css +1 -1
- package/dist/css/config/config.css +1 -1
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -10
- package/dist/types/components/dialog/dialog.d.ts +12 -0
- package/dist/types/components/dialog/dialog.stories.d.ts +10 -0
- package/dist/types/components/tooltip/tooltip.d.ts +21 -0
- package/dist/types/components/tooltip/tooltip.stories.d.ts +10 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { Button as t, buttonVariants as a } from "./components/button/button.js";
|
|
3
3
|
import { NavHeader as f } from "./components/nav-header/nav-header.js";
|
|
4
4
|
import { NavItem as x } from "./components/nav-header/nav-item/nav-item.js";
|
|
5
|
-
import { Input as
|
|
6
|
-
import { CountryFlags as
|
|
7
|
-
import { Z2SideNavBarProvider as
|
|
5
|
+
import { Input as d } from "./components/input/input.js";
|
|
6
|
+
import { CountryFlags as n } from "./components/country-flags/country-flags.js";
|
|
7
|
+
import { Z2SideNavBarProvider as S } from "./components/collapsible-side-nav-bar/side-nav-bar-provider.js";
|
|
8
8
|
import { Z2SideNavBar as u, Z2SidebarVariants as B } from "./components/collapsible-side-nav-bar/side-nav-bar.js";
|
|
9
9
|
import { Z2SideNavBarHeader as C } from "./components/collapsible-side-nav-bar/side-nav-bar-header.js";
|
|
10
10
|
import { Z2SideNavBarContent as b } from "./components/collapsible-side-nav-bar/side-nav-bar-content.js";
|
|
@@ -22,15 +22,16 @@ import { default as j } from "./components/assets/icons/window-left-copy.js";
|
|
|
22
22
|
import { default as q } from "./components/assets/icons/sidebar-left-show-copy.js";
|
|
23
23
|
import { SIDEBAR_WIDTH as J, SIDEBAR_WIDTH_COLLAPSED as K } from "./components/collapsible-side-nav-bar/constants.js";
|
|
24
24
|
import { Z2Tabs as Q, Z2TabsContent as X, Z2TabsList as Y, Z2TabsTrigger as $ } from "./components/tab/tab.js";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
25
|
+
import { Z2Tooltip as or } from "./components/tooltip/tooltip.js";
|
|
26
|
+
import { Z2PopoverTrigger as tr } from "./components/collapsible-side-nav-bar/popover/popover-trigger.js";
|
|
27
|
+
import { Z2PopoverContent as pr } from "./components/collapsible-side-nav-bar/popover/popover-content.js";
|
|
27
28
|
export {
|
|
28
29
|
t as Button,
|
|
29
30
|
h as ChevronUpIcon,
|
|
30
31
|
V as CirclesIcon,
|
|
31
|
-
|
|
32
|
+
n as CountryFlags,
|
|
32
33
|
O as DatabaseCopy,
|
|
33
|
-
|
|
34
|
+
d as Input,
|
|
34
35
|
f as NavHeader,
|
|
35
36
|
x as NavItem,
|
|
36
37
|
J as SIDEBAR_WIDTH,
|
|
@@ -39,21 +40,22 @@ export {
|
|
|
39
40
|
F as SubNavIndicator,
|
|
40
41
|
j as WindowLeftCopy,
|
|
41
42
|
W as Z2Popover,
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
pr as Z2PopoverContent,
|
|
44
|
+
tr as Z2PopoverTrigger,
|
|
44
45
|
u as Z2SideNavBar,
|
|
45
46
|
b as Z2SideNavBarContent,
|
|
46
47
|
l as Z2SideNavBarFooter,
|
|
47
48
|
g as Z2SideNavBarGroup,
|
|
48
49
|
C as Z2SideNavBarHeader,
|
|
49
50
|
P as Z2SideNavBarItem,
|
|
50
|
-
|
|
51
|
+
S as Z2SideNavBarProvider,
|
|
51
52
|
y as Z2SideNavBarSeparator,
|
|
52
53
|
B as Z2SidebarVariants,
|
|
53
54
|
Q as Z2Tabs,
|
|
54
55
|
X as Z2TabsContent,
|
|
55
56
|
Y as Z2TabsList,
|
|
56
57
|
$ as Z2TabsTrigger,
|
|
58
|
+
or as Z2Tooltip,
|
|
57
59
|
a as buttonVariants,
|
|
58
60
|
A as useZ2SideNavBar
|
|
59
61
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
declare function Z2Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function Z2DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function Z2DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function Z2DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function Z2DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function Z2DialogContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function Z2DialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function Z2DialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function Z2DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function Z2DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { Z2Dialog, Z2DialogContent, Z2DialogDescription, Z2DialogFooter, Z2DialogHeader, Z2DialogOverlay, Z2DialogPortal, Z2DialogClose, Z2DialogTitle, Z2DialogTrigger, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Z2Dialog } from './dialog';
|
|
3
|
+
declare const meta: Meta<typeof Z2Dialog>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Z2Dialog>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLongDescription: Story;
|
|
8
|
+
export declare const CustomFooter: Story;
|
|
9
|
+
export declare const Fullscreen: Story;
|
|
10
|
+
export declare const CloseInHeader: Story;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
3
|
+
export interface TooltipProps extends Omit<RadixTooltip.TooltipContentProps, 'children' | 'asChild'> {
|
|
4
|
+
/**
|
|
5
|
+
* The content to show inside the tooltip.
|
|
6
|
+
*/
|
|
7
|
+
message: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* The element that triggers the tooltip (usually a button, icon, etc).
|
|
10
|
+
*/
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Delay in ms before showing the tooltip (default: 300)
|
|
14
|
+
*/
|
|
15
|
+
delayDuration?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A reusable Tooltip component using Radix Tooltip primitive.
|
|
19
|
+
* Wraps any element as a trigger and shows a message on hover/focus.
|
|
20
|
+
*/
|
|
21
|
+
export declare const Z2Tooltip: React.FC<TooltipProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Z2Tooltip } from './tooltip';
|
|
3
|
+
declare const meta: Meta<typeof Z2Tooltip>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Z2Tooltip>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const IconTrigger: Story;
|
|
8
|
+
export declare const AllSides: Story;
|
|
9
|
+
export declare const CustomStyling: Story;
|
|
10
|
+
export declare const CustomDelay: Story;
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ztwoint/z-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -80,8 +80,10 @@
|
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@fontsource-variable/inter": "^5.2.5",
|
|
82
82
|
"@heroicons/react": "^2.2.0",
|
|
83
|
+
"@radix-ui/react-dialog": "^1.1.14",
|
|
83
84
|
"@radix-ui/react-slot": "^1.2.2",
|
|
84
85
|
"@radix-ui/react-tabs": "^1.1.12",
|
|
86
|
+
"@radix-ui/react-tooltip": "^1.2.7",
|
|
85
87
|
"class-variance-authority": "^0.7.1",
|
|
86
88
|
"classnames": "^2.5.1",
|
|
87
89
|
"clsx": "^2.1.1",
|