@nattstack/ui 0.0.85 → 0.0.87
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/dist/components/button/button-spinner.css +97 -0
- package/dist/components/button/button-spinner.js +14 -0
- package/dist/components/button/button-spinner.module.js +8 -0
- package/dist/components/button/button.css +191 -0
- package/dist/components/button/button.d.ts +25 -0
- package/dist/components/button/button.js +54 -0
- package/dist/components/button/button.module.js +21 -0
- package/dist/components/button-link/button-link.d.ts +18 -0
- package/dist/components/button-link/button-link.js +23 -0
- package/dist/components/checkbox/checkbox-icon.js +22 -0
- package/dist/components/checkbox/checkbox.css +55 -0
- package/dist/components/checkbox/checkbox.d.ts +8 -0
- package/dist/components/checkbox/checkbox.js +21 -0
- package/dist/components/checkbox/checkbox.module.js +9 -0
- package/dist/components/column/column.css +6 -0
- package/dist/components/column/column.d.ts +16 -0
- package/dist/components/column/column.js +23 -0
- package/dist/components/column/column.module.js +5 -0
- package/dist/components/dialog-responsive/dialog-responsive-backdrop.css +28 -0
- package/dist/components/dialog-responsive/dialog-responsive-backdrop.js +17 -0
- package/dist/components/dialog-responsive/dialog-responsive-backdrop.module.js +5 -0
- package/dist/components/dialog-responsive/dialog-responsive-bar.css +16 -0
- package/dist/components/dialog-responsive/dialog-responsive-bar.js +15 -0
- package/dist/components/dialog-responsive/dialog-responsive-bar.module.js +5 -0
- package/dist/components/dialog-responsive/dialog-responsive-popup.css +56 -0
- package/dist/components/dialog-responsive/dialog-responsive-popup.d.ts +8 -0
- package/dist/components/dialog-responsive/dialog-responsive-popup.js +22 -0
- package/dist/components/dialog-responsive/dialog-responsive-popup.module.js +5 -0
- package/dist/components/dialog-responsive/dialog-responsive-portal.css +7 -0
- package/dist/components/dialog-responsive/dialog-responsive-portal.js +17 -0
- package/dist/components/dialog-responsive/dialog-responsive-portal.module.js +5 -0
- package/dist/components/dialog-responsive/dialog-responsive-trigger.d.ts +7 -0
- package/dist/components/dialog-responsive/dialog-responsive-trigger.js +12 -0
- package/dist/components/dialog-responsive/dialog-responsive-viewport.css +18 -0
- package/dist/components/dialog-responsive/dialog-responsive-viewport.js +17 -0
- package/dist/components/dialog-responsive/dialog-responsive-viewport.module.js +5 -0
- package/dist/components/dialog-responsive/dialog-responsive.d.ts +10 -0
- package/dist/components/dialog-responsive/dialog-responsive.js +15 -0
- package/dist/components/icon-button/icon-button.css +21 -0
- package/dist/components/icon-button/icon-button.d.ts +12 -0
- package/dist/components/icon-button/icon-button.js +34 -0
- package/dist/components/icon-button/icon-button.module.js +11 -0
- package/dist/components/index.d.ts +46 -359
- package/dist/components/index.js +46 -1034
- package/dist/components/input/input.css +84 -0
- package/dist/components/input/input.d.ts +22 -0
- package/dist/components/input/input.js +44 -0
- package/dist/components/input/input.module.js +14 -0
- package/dist/components/label/label.css +8 -0
- package/dist/components/label/label.d.ts +7 -0
- package/dist/components/label/label.js +16 -0
- package/dist/components/label/label.module.js +5 -0
- package/dist/components/menu/menu-checkbox-item.d.ts +14 -0
- package/dist/components/menu/menu-checkbox-item.js +44 -0
- package/dist/components/menu/menu-class-names.d.ts +23 -0
- package/dist/components/menu/menu-class-names.js +24 -0
- package/dist/components/menu/menu-content.d.ts +11 -0
- package/dist/components/menu/menu-content.js +38 -0
- package/dist/components/menu/menu-group-label.d.ts +9 -0
- package/dist/components/menu/menu-group-label.js +16 -0
- package/dist/components/menu/menu-group.d.ts +9 -0
- package/dist/components/menu/menu-group.js +16 -0
- package/dist/components/menu/menu-item.d.ts +10 -0
- package/dist/components/menu/menu-item.js +18 -0
- package/dist/components/menu/menu-link-item.d.ts +7 -0
- package/dist/components/menu/menu-link-item.js +13 -0
- package/dist/components/menu/menu-radio-group.d.ts +10 -0
- package/dist/components/menu/menu-radio-group.js +17 -0
- package/dist/components/menu/menu-radio-item.d.ts +12 -0
- package/dist/components/menu/menu-radio-item.js +43 -0
- package/dist/components/menu/menu-separator.d.ts +9 -0
- package/dist/components/menu/menu-separator.js +16 -0
- package/dist/components/menu/menu-submenu-trigger.d.ts +7 -0
- package/dist/components/menu/menu-submenu-trigger.js +13 -0
- package/dist/components/menu/menu-submenu.d.ts +11 -0
- package/dist/components/menu/menu-submenu.js +15 -0
- package/dist/components/menu/menu-trigger.d.ts +7 -0
- package/dist/components/menu/menu-trigger.js +12 -0
- package/dist/components/menu/menu-viewport.d.ts +9 -0
- package/dist/components/menu/menu-viewport.js +16 -0
- package/dist/components/menu/menu.css +209 -0
- package/dist/components/menu/menu.d.ts +12 -0
- package/dist/components/menu/menu.js +16 -0
- package/dist/components/menu/menu.module.js +24 -0
- package/dist/components/otp-field/otp-field-input.css +33 -0
- package/dist/components/otp-field/otp-field-input.d.ts +8 -0
- package/dist/components/otp-field/otp-field-input.js +16 -0
- package/dist/components/otp-field/otp-field-input.module.js +5 -0
- package/dist/components/otp-field/otp-field.css +13 -0
- package/dist/components/otp-field/otp-field.d.ts +13 -0
- package/dist/components/otp-field/otp-field.js +27 -0
- package/dist/components/otp-field/otp-field.module.js +8 -0
- package/dist/components/row/row.css +6 -0
- package/dist/components/row/row.d.ts +16 -0
- package/dist/components/row/row.js +23 -0
- package/dist/components/row/row.module.js +5 -0
- package/dist/components/spacer/spacer.css +5 -0
- package/dist/components/spacer/spacer.d.ts +10 -0
- package/dist/components/spacer/spacer.js +19 -0
- package/dist/components/spacer/spacer.module.js +5 -0
- package/dist/components/switch/switch.css +54 -0
- package/dist/components/switch/switch.d.ts +19 -0
- package/dist/components/switch/switch.js +31 -0
- package/dist/components/switch/switch.module.js +10 -0
- package/dist/components/tabs/tabs-panel.css +14 -0
- package/dist/components/tabs/tabs-panel.d.ts +8 -0
- package/dist/components/tabs/tabs-panel.js +17 -0
- package/dist/components/tabs/tabs-panel.module.js +5 -0
- package/dist/components/tabs/tabs.css +6 -0
- package/dist/components/tabs/tabs.d.ts +8 -0
- package/dist/components/tabs/tabs.js +17 -0
- package/dist/components/tabs/tabs.module.js +5 -0
- package/dist/components/tabs-pill/tabs-pill-indicator.css +14 -0
- package/dist/components/tabs-pill/tabs-pill-indicator.js +18 -0
- package/dist/components/tabs-pill/tabs-pill-indicator.module.js +5 -0
- package/dist/components/tabs-pill/tabs-pill-list.css +9 -0
- package/dist/components/tabs-pill/tabs-pill-list.d.ts +8 -0
- package/dist/components/tabs-pill/tabs-pill-list.js +19 -0
- package/dist/components/tabs-pill/tabs-pill-list.module.js +5 -0
- package/dist/components/tabs-pill/tabs-pill-tab.css +66 -0
- package/dist/components/tabs-pill/tabs-pill-tab.d.ts +10 -0
- package/dist/components/tabs-pill/tabs-pill-tab.js +21 -0
- package/dist/components/tabs-pill/tabs-pill-tab.module.js +9 -0
- package/dist/components/tabs-segmented/tabs-segmented-indicator.css +14 -0
- package/dist/components/tabs-segmented/tabs-segmented-indicator.js +18 -0
- package/dist/components/tabs-segmented/tabs-segmented-indicator.module.js +5 -0
- package/dist/components/tabs-segmented/tabs-segmented-list.css +13 -0
- package/dist/components/tabs-segmented/tabs-segmented-list.d.ts +8 -0
- package/dist/components/tabs-segmented/tabs-segmented-list.js +19 -0
- package/dist/components/tabs-segmented/tabs-segmented-list.module.js +5 -0
- package/dist/components/tabs-segmented/tabs-segmented-tab.css +37 -0
- package/dist/components/tabs-segmented/tabs-segmented-tab.d.ts +10 -0
- package/dist/components/tabs-segmented/tabs-segmented-tab.js +18 -0
- package/dist/components/tabs-segmented/tabs-segmented-tab.module.js +5 -0
- package/dist/components/tabs-underline/tabs-underline-indicator.css +12 -0
- package/dist/components/tabs-underline/tabs-underline-indicator.js +18 -0
- package/dist/components/tabs-underline/tabs-underline-indicator.module.js +5 -0
- package/dist/components/tabs-underline/tabs-underline-list.css +10 -0
- package/dist/components/tabs-underline/tabs-underline-list.d.ts +8 -0
- package/dist/components/tabs-underline/tabs-underline-list.js +19 -0
- package/dist/components/tabs-underline/tabs-underline-list.module.js +5 -0
- package/dist/components/tabs-underline/tabs-underline-tab.css +36 -0
- package/dist/components/tabs-underline/tabs-underline-tab.d.ts +10 -0
- package/dist/components/tabs-underline/tabs-underline-tab.js +18 -0
- package/dist/components/tabs-underline/tabs-underline-tab.module.js +5 -0
- package/dist/components/textarea/textarea.css +9 -0
- package/dist/components/textarea/textarea.d.ts +17 -0
- package/dist/components/textarea/textarea.js +31 -0
- package/dist/components/textarea/textarea.module.js +5 -0
- package/dist/components/toggle-group/toggle-group-item.css +47 -0
- package/dist/components/toggle-group/toggle-group-item.d.ts +11 -0
- package/dist/components/toggle-group/toggle-group-item.js +18 -0
- package/dist/components/toggle-group/toggle-group-item.module.js +5 -0
- package/dist/components/toggle-group/toggle-group.css +7 -0
- package/dist/components/toggle-group/toggle-group.d.ts +12 -0
- package/dist/components/toggle-group/toggle-group.js +19 -0
- package/dist/components/toggle-group/toggle-group.module.js +5 -0
- package/dist/components/tooltip/tooltip-popup.css +32 -0
- package/dist/components/tooltip/tooltip-popup.d.ts +8 -0
- package/dist/components/tooltip/tooltip-popup.js +25 -0
- package/dist/components/tooltip/tooltip-popup.module.js +8 -0
- package/dist/components/tooltip/tooltip-provider.d.ts +7 -0
- package/dist/components/tooltip/tooltip-provider.js +12 -0
- package/dist/components/tooltip/tooltip-trigger.d.ts +7 -0
- package/dist/components/tooltip/tooltip-trigger.js +12 -0
- package/dist/components/tooltip/tooltip.d.ts +10 -0
- package/dist/components/tooltip/tooltip.js +14 -0
- package/package.json +6 -3
- package/dist/components/style.css +0 -1182
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentProps, JSX } from "react";
|
|
2
|
+
//#region src/components/textarea/textarea.d.ts
|
|
3
|
+
interface TextareaProps extends Omit<ComponentProps<"textarea">, "aria-pressed" | "disabled" | "readOnly" | "required"> {
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
isInvalid?: boolean;
|
|
7
|
+
isReadOnly?: boolean;
|
|
8
|
+
isRequired?: boolean;
|
|
9
|
+
isRounded?: boolean;
|
|
10
|
+
isValid?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function Textarea(props: TextareaProps): JSX.Element;
|
|
13
|
+
declare const textareaVariants: (props?: ({
|
|
14
|
+
isRounded?: boolean | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Textarea, TextareaProps, textareaVariants };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import input_module_default from "../input/input.module.js";
|
|
2
|
+
import textarea_module_default from "./textarea.module.js";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/textarea/textarea.tsx
|
|
6
|
+
function Textarea(props) {
|
|
7
|
+
const { className: customClassName = "", isActive = false, isDisabled = false, isInvalid = void 0, isReadOnly = false, isRequired = false, isRounded = false, isValid = void 0, rows = 2, ...rest } = props;
|
|
8
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
9
|
+
className: textareaVariants({
|
|
10
|
+
className: customClassName,
|
|
11
|
+
isRounded
|
|
12
|
+
}),
|
|
13
|
+
"data-is-active": isActive,
|
|
14
|
+
"data-is-invalid": isInvalid,
|
|
15
|
+
"data-is-valid": isValid,
|
|
16
|
+
disabled: isDisabled,
|
|
17
|
+
readOnly: isReadOnly,
|
|
18
|
+
required: isRequired,
|
|
19
|
+
rows,
|
|
20
|
+
...rest
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
const textareaVariants = cva([input_module_default.input, textarea_module_default.textarea], {
|
|
24
|
+
defaultVariants: { isRounded: false },
|
|
25
|
+
variants: { isRounded: {
|
|
26
|
+
false: input_module_default.input__rounded_base,
|
|
27
|
+
true: input_module_default.input__rounded_full
|
|
28
|
+
} }
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Textarea, textareaVariants };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.toggle-group-item-module_toggle_group_item_Q7Q0iq {
|
|
3
|
+
color: var(--color-text-secondary);
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
outline-color: var(--color-outline);
|
|
6
|
+
outline-offset: 2px;
|
|
7
|
+
user-select: none;
|
|
8
|
+
background-color: #0000;
|
|
9
|
+
border-radius: 10px;
|
|
10
|
+
outline-width: 0;
|
|
11
|
+
outline-style: solid;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
column-gap: 8px;
|
|
15
|
+
padding: 8px 12px;
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
transition-property: background-color, box-shadow, color;
|
|
19
|
+
transition-duration: .15s;
|
|
20
|
+
display: flex;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.toggle-group-item-module_toggle_group_item_Q7Q0iq:focus-visible {
|
|
24
|
+
outline-width: 2px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.toggle-group-item-module_toggle_group_item_Q7Q0iq:hover:not(:disabled) {
|
|
28
|
+
background-color: var(--color-gray-4);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.toggle-group-item-module_toggle_group_item_Q7Q0iq:disabled {
|
|
32
|
+
cursor: not-allowed;
|
|
33
|
+
opacity: .5;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.toggle-group-item-module_toggle_group_item_Q7Q0iq[data-pressed] {
|
|
37
|
+
background-color: var(--color-gray-3);
|
|
38
|
+
box-shadow: inset 0 0 0 1px var(--color-primary);
|
|
39
|
+
color: var(--color-text-primary);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.toggle-group-item-module_toggle_group_item_Q7Q0iq > svg {
|
|
43
|
+
--size-icon: 16px;
|
|
44
|
+
height: var(--size-icon);
|
|
45
|
+
width: var(--size-icon);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Toggle } from "@base-ui/react";
|
|
2
|
+
import { JSX } from "react";
|
|
3
|
+
//#region src/components/toggle-group/toggle-group-item.d.ts
|
|
4
|
+
interface ToggleGroupItemProps extends Omit<Toggle.Props, "disabled" | "nativeButton"> {
|
|
5
|
+
isDisabled?: Toggle.Props["disabled"];
|
|
6
|
+
isNativeButton?: Toggle.Props["nativeButton"];
|
|
7
|
+
}
|
|
8
|
+
declare function ToggleGroupItem(props: ToggleGroupItemProps): JSX.Element;
|
|
9
|
+
declare const toggleGroupItemVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { ToggleGroupItem, ToggleGroupItemProps, toggleGroupItemVariants };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import toggle_group_item_module_default from "./toggle-group-item.module.js";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Toggle } from "@base-ui/react";
|
|
5
|
+
//#region src/components/toggle-group/toggle-group-item.tsx
|
|
6
|
+
function ToggleGroupItem(props) {
|
|
7
|
+
const { className: customClassName = "", isDisabled = false, isNativeButton = true, ...rest } = props;
|
|
8
|
+
return /* @__PURE__ */ jsx(Toggle, {
|
|
9
|
+
className: toggleGroupItemVariants({ className: customClassName }),
|
|
10
|
+
"data-slot": "toggle-group-item",
|
|
11
|
+
disabled: isDisabled,
|
|
12
|
+
nativeButton: isNativeButton,
|
|
13
|
+
...rest
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const toggleGroupItemVariants = cva(toggle_group_item_module_default.toggle_group_item);
|
|
17
|
+
//#endregion
|
|
18
|
+
export { ToggleGroupItem, toggleGroupItemVariants };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './toggle-group-item.css';
|
|
2
|
+
//#region src/components/toggle-group/toggle-group-item.module.css
|
|
3
|
+
var toggle_group_item_module_default = { "toggle_group_item": "toggle-group-item-module_toggle_group_item_Q7Q0iq" };
|
|
4
|
+
//#endregion
|
|
5
|
+
export { toggle_group_item_module_default as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ToggleGroup } from "@base-ui/react";
|
|
2
|
+
import { JSX } from "react";
|
|
3
|
+
//#region src/components/toggle-group/toggle-group.d.ts
|
|
4
|
+
interface ToggleGroupProps extends Omit<ToggleGroup.Props, "disabled" | "loopFocus" | "multiple"> {
|
|
5
|
+
isDisabled?: ToggleGroup.Props["disabled"];
|
|
6
|
+
isLoopFocus?: ToggleGroup.Props["loopFocus"];
|
|
7
|
+
isMultiple?: ToggleGroup.Props["multiple"];
|
|
8
|
+
}
|
|
9
|
+
declare function ToggleGroup$1(props: ToggleGroupProps): JSX.Element;
|
|
10
|
+
declare const toggleGroupVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ToggleGroup$1 as ToggleGroup, ToggleGroupProps, toggleGroupVariants };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import toggle_group_module_default from "./toggle-group.module.js";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { ToggleGroup } from "@base-ui/react";
|
|
5
|
+
//#region src/components/toggle-group/toggle-group.tsx
|
|
6
|
+
function ToggleGroup$1(props) {
|
|
7
|
+
const { className: customClassName = "", isDisabled = false, isLoopFocus = true, isMultiple = false, ...rest } = props;
|
|
8
|
+
return /* @__PURE__ */ jsx(ToggleGroup, {
|
|
9
|
+
className: toggleGroupVariants({ className: customClassName }),
|
|
10
|
+
"data-slot": "toggle-group",
|
|
11
|
+
disabled: isDisabled,
|
|
12
|
+
loopFocus: isLoopFocus,
|
|
13
|
+
multiple: isMultiple,
|
|
14
|
+
...rest
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const toggleGroupVariants = cva(toggle_group_module_default.toggle_group);
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ToggleGroup$1 as ToggleGroup, toggleGroupVariants };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.tooltip-popup-module_tooltip_popup_SLo08q {
|
|
3
|
+
background-color: var(--color-gray-dark-1);
|
|
4
|
+
color: var(--color-gray-dark-12);
|
|
5
|
+
transform-origin: var(--transform-origin);
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
padding: 4px 8px;
|
|
8
|
+
font-size: 13px;
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
transition-property: opacity, scale;
|
|
11
|
+
transition-duration: .15s;
|
|
12
|
+
box-shadow: 0 1px 3px #0000001a, 0 1px 2px -1px #0000001a;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.tooltip-popup-module_tooltip_popup_SLo08q[data-ending-style], .tooltip-popup-module_tooltip_popup_SLo08q[data-starting-style] {
|
|
16
|
+
opacity: 0;
|
|
17
|
+
scale: .975;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.tooltip-popup-module_tooltip_popup_SLo08q[data-instant] {
|
|
21
|
+
transition: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tooltip-popup-module_tooltip_popup_portal_SLo08q {
|
|
25
|
+
z-index: 50;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.dark .tooltip-popup-module_tooltip_popup_SLo08q {
|
|
29
|
+
background-color: var(--color-gray-light-1);
|
|
30
|
+
color: var(--color-gray-light-12);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Tooltip } from "@base-ui/react";
|
|
2
|
+
import { JSX } from "react";
|
|
3
|
+
//#region src/components/tooltip/tooltip-popup.d.ts
|
|
4
|
+
interface TooltipPopupProps extends Pick<Tooltip.Positioner.Props, "side" | "sideOffset">, Tooltip.Popup.Props {}
|
|
5
|
+
declare function TooltipPopup(props: TooltipPopupProps): JSX.Element;
|
|
6
|
+
declare const tooltipPopupVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { TooltipPopup, TooltipPopupProps, tooltipPopupVariants };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import tooltip_popup_module_default from "./tooltip-popup.module.js";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Tooltip } from "@base-ui/react";
|
|
5
|
+
//#region src/components/tooltip/tooltip-popup.tsx
|
|
6
|
+
function TooltipPopup(props) {
|
|
7
|
+
const { children = "", className: customClassName = "", side = "top", sideOffset = 4, ...rest } = props;
|
|
8
|
+
const combinedClassName = tooltipPopupVariants({ className: customClassName });
|
|
9
|
+
return /* @__PURE__ */ jsx(Tooltip.Portal, {
|
|
10
|
+
className: tooltip_popup_module_default.tooltip_popup_portal,
|
|
11
|
+
children: /* @__PURE__ */ jsxs(Tooltip.Positioner, {
|
|
12
|
+
side,
|
|
13
|
+
sideOffset,
|
|
14
|
+
children: [/* @__PURE__ */ jsx(Tooltip.Popup, {
|
|
15
|
+
className: combinedClassName,
|
|
16
|
+
"data-slot": "tooltip-popup",
|
|
17
|
+
...rest,
|
|
18
|
+
children
|
|
19
|
+
}), /* @__PURE__ */ jsx(Tooltip.Arrow, {})]
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
const tooltipPopupVariants = cva(tooltip_popup_module_default.tooltip_popup);
|
|
24
|
+
//#endregion
|
|
25
|
+
export { TooltipPopup, tooltipPopupVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './tooltip-popup.css';
|
|
2
|
+
//#region src/components/tooltip/tooltip-popup.module.css
|
|
3
|
+
var tooltip_popup_module_default = {
|
|
4
|
+
"tooltip_popup": "tooltip-popup-module_tooltip_popup_SLo08q",
|
|
5
|
+
"tooltip_popup_portal": "tooltip-popup-module_tooltip_popup_portal_SLo08q"
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { tooltip_popup_module_default as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tooltip } from "@base-ui/react";
|
|
2
|
+
import { JSX } from "react";
|
|
3
|
+
//#region src/components/tooltip/tooltip-provider.d.ts
|
|
4
|
+
interface TooltipProviderProps extends Tooltip.Provider.Props {}
|
|
5
|
+
declare function TooltipProvider(props: TooltipProviderProps): JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { TooltipProvider, TooltipProviderProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip } from "@base-ui/react";
|
|
3
|
+
//#region src/components/tooltip/tooltip-provider.tsx
|
|
4
|
+
function TooltipProvider(props) {
|
|
5
|
+
const { ...rest } = props;
|
|
6
|
+
return /* @__PURE__ */ jsx(Tooltip.Provider, {
|
|
7
|
+
"data-slot": "tooltip-provider",
|
|
8
|
+
...rest
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { TooltipProvider };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tooltip } from "@base-ui/react";
|
|
2
|
+
import { JSX } from "react";
|
|
3
|
+
//#region src/components/tooltip/tooltip-trigger.d.ts
|
|
4
|
+
interface TooltipTriggerProps extends Tooltip.Trigger.Props {}
|
|
5
|
+
declare function TooltipTrigger(props: TooltipTriggerProps): JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { TooltipTrigger, TooltipTriggerProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip } from "@base-ui/react";
|
|
3
|
+
//#region src/components/tooltip/tooltip-trigger.tsx
|
|
4
|
+
function TooltipTrigger(props) {
|
|
5
|
+
const { ...rest } = props;
|
|
6
|
+
return /* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
7
|
+
"data-slot": "tooltip-trigger",
|
|
8
|
+
...rest
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { TooltipTrigger };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Tooltip } from "@base-ui/react";
|
|
2
|
+
import { JSX } from "react";
|
|
3
|
+
//#region src/components/tooltip/tooltip.d.ts
|
|
4
|
+
interface TooltipProps extends Omit<Tooltip.Root.Props, "disabled"> {
|
|
5
|
+
isDisabled?: Tooltip.Root.Props["disabled"];
|
|
6
|
+
isDisableHoverablePopup?: Tooltip.Root.Props["disableHoverablePopup"];
|
|
7
|
+
}
|
|
8
|
+
declare function Tooltip$1(props: TooltipProps): JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Tooltip$1 as Tooltip, TooltipProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip } from "@base-ui/react";
|
|
3
|
+
//#region src/components/tooltip/tooltip.tsx
|
|
4
|
+
function Tooltip$1(props) {
|
|
5
|
+
const { isDisabled = false, isDisableHoverablePopup = true, ...rest } = props;
|
|
6
|
+
return /* @__PURE__ */ jsx(Tooltip.Root, {
|
|
7
|
+
"data-slot": "tooltip",
|
|
8
|
+
disabled: isDisabled,
|
|
9
|
+
disableHoverablePopup: isDisableHoverablePopup,
|
|
10
|
+
...rest
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Tooltip$1 as Tooltip };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nattstack/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.87",
|
|
4
4
|
"description": "A collection of reusable React components built with Base UI, TypeScript, and CSS Modules",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"base-ui",
|
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"type": "module",
|
|
26
|
+
"sideEffects": [
|
|
27
|
+
"**/*.css"
|
|
28
|
+
],
|
|
26
29
|
"exports": {
|
|
27
30
|
".": {
|
|
28
31
|
"types": "./dist/components/index.d.ts",
|
|
@@ -49,9 +52,9 @@
|
|
|
49
52
|
"class-variance-authority": "0.7.1"
|
|
50
53
|
},
|
|
51
54
|
"devDependencies": {
|
|
52
|
-
"@tsdown/css": "0.22.
|
|
55
|
+
"@tsdown/css": "0.22.4",
|
|
53
56
|
"@types/bun": "1.3.14",
|
|
54
|
-
"tsdown": "0.22.
|
|
57
|
+
"tsdown": "0.22.4",
|
|
55
58
|
"typescript": "6.0.3"
|
|
56
59
|
},
|
|
57
60
|
"peerDependencies": {
|